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