Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #ifndef nsMathMLmrootFrame_h___ |
michael@0 | 7 | #define nsMathMLmrootFrame_h___ |
michael@0 | 8 | |
michael@0 | 9 | #include "mozilla/Attributes.h" |
michael@0 | 10 | #include "nsMathMLContainerFrame.h" |
michael@0 | 11 | #include "nsMathMLChar.h" |
michael@0 | 12 | |
michael@0 | 13 | // |
michael@0 | 14 | // <msqrt> and <mroot> -- form a radical |
michael@0 | 15 | // |
michael@0 | 16 | |
michael@0 | 17 | class nsMathMLmrootFrame : public nsMathMLContainerFrame { |
michael@0 | 18 | public: |
michael@0 | 19 | NS_DECL_FRAMEARENA_HELPERS |
michael@0 | 20 | |
michael@0 | 21 | friend nsIFrame* NS_NewMathMLmrootFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); |
michael@0 | 22 | |
michael@0 | 23 | virtual void |
michael@0 | 24 | SetAdditionalStyleContext(int32_t aIndex, |
michael@0 | 25 | nsStyleContext* aStyleContext) MOZ_OVERRIDE; |
michael@0 | 26 | virtual nsStyleContext* |
michael@0 | 27 | GetAdditionalStyleContext(int32_t aIndex) const MOZ_OVERRIDE; |
michael@0 | 28 | |
michael@0 | 29 | virtual void |
michael@0 | 30 | Init(nsIContent* aContent, |
michael@0 | 31 | nsIFrame* aParent, |
michael@0 | 32 | nsIFrame* aPrevInFlow) MOZ_OVERRIDE; |
michael@0 | 33 | |
michael@0 | 34 | NS_IMETHOD |
michael@0 | 35 | TransmitAutomaticData() MOZ_OVERRIDE; |
michael@0 | 36 | |
michael@0 | 37 | virtual nsresult |
michael@0 | 38 | Reflow(nsPresContext* aPresContext, |
michael@0 | 39 | nsHTMLReflowMetrics& aDesiredSize, |
michael@0 | 40 | const nsHTMLReflowState& aReflowState, |
michael@0 | 41 | nsReflowStatus& aStatus) MOZ_OVERRIDE; |
michael@0 | 42 | |
michael@0 | 43 | virtual void |
michael@0 | 44 | GetIntrinsicWidthMetrics(nsRenderingContext* aRenderingContext, |
michael@0 | 45 | nsHTMLReflowMetrics& aDesiredSize) MOZ_OVERRIDE; |
michael@0 | 46 | |
michael@0 | 47 | virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, |
michael@0 | 48 | const nsRect& aDirtyRect, |
michael@0 | 49 | const nsDisplayListSet& aLists) MOZ_OVERRIDE; |
michael@0 | 50 | |
michael@0 | 51 | uint8_t |
michael@0 | 52 | ScriptIncrement(nsIFrame* aFrame) MOZ_OVERRIDE |
michael@0 | 53 | { |
michael@0 | 54 | return (aFrame && aFrame == mFrames.LastChild()) ? 2 : 0; |
michael@0 | 55 | } |
michael@0 | 56 | |
michael@0 | 57 | protected: |
michael@0 | 58 | nsMathMLmrootFrame(nsStyleContext* aContext); |
michael@0 | 59 | virtual ~nsMathMLmrootFrame(); |
michael@0 | 60 | |
michael@0 | 61 | nsMathMLChar mSqrChar; |
michael@0 | 62 | nsRect mBarRect; |
michael@0 | 63 | }; |
michael@0 | 64 | |
michael@0 | 65 | #endif /* nsMathMLmrootFrame_h___ */ |