1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef nsMathMLmspaceFrame_h___
8 #define nsMathMLmspaceFrame_h___
10 #include "mozilla/Attributes.h"
11 #include "nsMathMLContainerFrame.h"
15 } // namespace mozilla
21 class nsMathMLmspaceFrame final
: public nsMathMLContainerFrame
{
23 NS_DECL_FRAMEARENA_HELPERS(nsMathMLmspaceFrame
)
25 friend nsIFrame
* NS_NewMathMLmspaceFrame(mozilla::PresShell
* aPresShell
,
26 ComputedStyle
* aStyle
);
29 TransmitAutomaticData() override
{
30 // The REC defines the following elements to be space-like:
31 // * an mtext, mspace, maligngroup, or malignmark element;
32 mPresentationData
.flags
|= NS_MATHML_SPACE_LIKE
;
36 virtual void Reflow(nsPresContext
* aPresContext
, ReflowOutput
& aDesiredSize
,
37 const ReflowInput
& aReflowInput
,
38 nsReflowStatus
& aStatus
) override
;
41 explicit nsMathMLmspaceFrame(ComputedStyle
* aStyle
,
42 nsPresContext
* aPresContext
)
43 : nsMathMLContainerFrame(aStyle
, aPresContext
, kClassID
),
47 virtual ~nsMathMLmspaceFrame();
49 virtual nsresult
MeasureForWidth(DrawTarget
* aDrawTarget
,
50 ReflowOutput
& aDesiredSize
) override
;
57 // helper method to initialize our member data
58 void ProcessAttributes(nsPresContext
* aPresContext
);
61 #endif /* nsMathMLmspaceFrame_h___ */