layout/mathml/nsMathMLmrootFrame.h

branch
TOR_BUG_3246
changeset 6
8bccb770b82d
equal deleted inserted replaced
-1:000000000000 0:ce4bef36c7fd
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/. */
5
6 #ifndef nsMathMLmrootFrame_h___
7 #define nsMathMLmrootFrame_h___
8
9 #include "mozilla/Attributes.h"
10 #include "nsMathMLContainerFrame.h"
11 #include "nsMathMLChar.h"
12
13 //
14 // <msqrt> and <mroot> -- form a radical
15 //
16
17 class nsMathMLmrootFrame : public nsMathMLContainerFrame {
18 public:
19 NS_DECL_FRAMEARENA_HELPERS
20
21 friend nsIFrame* NS_NewMathMLmrootFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
22
23 virtual void
24 SetAdditionalStyleContext(int32_t aIndex,
25 nsStyleContext* aStyleContext) MOZ_OVERRIDE;
26 virtual nsStyleContext*
27 GetAdditionalStyleContext(int32_t aIndex) const MOZ_OVERRIDE;
28
29 virtual void
30 Init(nsIContent* aContent,
31 nsIFrame* aParent,
32 nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
33
34 NS_IMETHOD
35 TransmitAutomaticData() MOZ_OVERRIDE;
36
37 virtual nsresult
38 Reflow(nsPresContext* aPresContext,
39 nsHTMLReflowMetrics& aDesiredSize,
40 const nsHTMLReflowState& aReflowState,
41 nsReflowStatus& aStatus) MOZ_OVERRIDE;
42
43 virtual void
44 GetIntrinsicWidthMetrics(nsRenderingContext* aRenderingContext,
45 nsHTMLReflowMetrics& aDesiredSize) MOZ_OVERRIDE;
46
47 virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
48 const nsRect& aDirtyRect,
49 const nsDisplayListSet& aLists) MOZ_OVERRIDE;
50
51 uint8_t
52 ScriptIncrement(nsIFrame* aFrame) MOZ_OVERRIDE
53 {
54 return (aFrame && aFrame == mFrames.LastChild()) ? 2 : 0;
55 }
56
57 protected:
58 nsMathMLmrootFrame(nsStyleContext* aContext);
59 virtual ~nsMathMLmrootFrame();
60
61 nsMathMLChar mSqrChar;
62 nsRect mBarRect;
63 };
64
65 #endif /* nsMathMLmrootFrame_h___ */

mercurial