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 nsMathMLmspaceFrame_h___
7 #define nsMathMLmspaceFrame_h___
9 #include "mozilla/Attributes.h"
10 #include "nsMathMLContainerFrame.h"
16 class nsMathMLmspaceFrame
: public nsMathMLContainerFrame
{
18 NS_DECL_FRAMEARENA_HELPERS
20 friend nsIFrame
* NS_NewMathMLmspaceFrame(nsIPresShell
* aPresShell
, nsStyleContext
* aContext
);
23 TransmitAutomaticData() MOZ_OVERRIDE
{
24 // The REC defines the following elements to be space-like:
25 // * an mtext, mspace, maligngroup, or malignmark element;
26 mPresentationData
.flags
|= NS_MATHML_SPACE_LIKE
;
30 virtual bool IsLeaf() const MOZ_OVERRIDE
;
33 Reflow(nsPresContext
* aPresContext
,
34 nsHTMLReflowMetrics
& aDesiredSize
,
35 const nsHTMLReflowState
& aReflowState
,
36 nsReflowStatus
& aStatus
) MOZ_OVERRIDE
;
39 explicit nsMathMLmspaceFrame(nsStyleContext
* aContext
) : nsMathMLContainerFrame(aContext
) {}
40 virtual ~nsMathMLmspaceFrame();
43 MeasureForWidth(nsRenderingContext
& aRenderingContext
,
44 nsHTMLReflowMetrics
& aDesiredSize
) MOZ_OVERRIDE
;
51 // helper method to initialize our member data
53 ProcessAttributes(nsPresContext
* aPresContext
);
56 #endif /* nsMathMLmspaceFrame_h___ */