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"
14 // <msqrt> and <mroot> -- form a radical
17 class nsMathMLmrootFrame
: public nsMathMLContainerFrame
{
19 NS_DECL_FRAMEARENA_HELPERS
21 friend nsIFrame
* NS_NewMathMLmrootFrame(nsIPresShell
* aPresShell
, nsStyleContext
* aContext
);
24 SetAdditionalStyleContext(int32_t aIndex
,
25 nsStyleContext
* aStyleContext
) override
;
26 virtual nsStyleContext
*
27 GetAdditionalStyleContext(int32_t aIndex
) const override
;
30 Init(nsIContent
* aContent
,
31 nsContainerFrame
* aParent
,
32 nsIFrame
* aPrevInFlow
) override
;
35 TransmitAutomaticData() override
;
38 Reflow(nsPresContext
* aPresContext
,
39 nsHTMLReflowMetrics
& aDesiredSize
,
40 const nsHTMLReflowState
& aReflowState
,
41 nsReflowStatus
& aStatus
) override
;
44 GetRadicalXOffsets(nscoord aIndexWidth
, nscoord aSqrWidth
,
45 nsFontMetrics
* aFontMetrics
,
46 nscoord
* aIndexOffset
,
50 GetIntrinsicISizeMetrics(nsRenderingContext
* aRenderingContext
,
51 nsHTMLReflowMetrics
& aDesiredSize
) override
;
53 virtual void BuildDisplayList(nsDisplayListBuilder
* aBuilder
,
54 const nsRect
& aDirtyRect
,
55 const nsDisplayListSet
& aLists
) override
;
58 ScriptIncrement(nsIFrame
* aFrame
) override
60 return (aFrame
&& aFrame
== mFrames
.LastChild()) ? 2 : 0;
64 explicit nsMathMLmrootFrame(nsStyleContext
* aContext
);
65 virtual ~nsMathMLmrootFrame();
67 nsMathMLChar mSqrChar
;
71 #endif /* nsMathMLmrootFrame_h___ */