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 "nsCSSValue.h"
12 #include "nsMathMLContainerFrame.h"
16 } // namespace mozilla
22 class nsMathMLmspaceFrame final
: public nsMathMLContainerFrame
{
24 NS_DECL_FRAMEARENA_HELPERS(nsMathMLmspaceFrame
)
26 friend nsIFrame
* NS_NewMathMLmspaceFrame(mozilla::PresShell
* aPresShell
,
27 ComputedStyle
* aStyle
);
30 TransmitAutomaticData() override
{
31 // The REC defines the following elements to be space-like:
32 // * an mtext, mspace, maligngroup, or malignmark element;
33 mPresentationData
.flags
|= NS_MATHML_SPACE_LIKE
;
38 explicit nsMathMLmspaceFrame(ComputedStyle
* aStyle
,
39 nsPresContext
* aPresContext
)
40 : nsMathMLContainerFrame(aStyle
, aPresContext
, kClassID
) {}
41 virtual ~nsMathMLmspaceFrame();
46 enum class ParsingState
: uint8_t {
51 ParsingState mState
= ParsingState::Dirty
;
57 nsresult
AttributeChanged(int32_t aNameSpaceID
, nsAtom
* aAttribute
,
58 int32_t aModType
) final
;
59 nscoord
CalculateAttributeValue(nsAtom
* aAtom
, Attribute
& aAttribute
,
60 uint32_t aFlags
, float aFontSizeInflation
);
61 nsresult
Place(DrawTarget
* aDrawTarget
, const PlaceFlags
& aFlags
,
62 ReflowOutput
& aDesiredSize
) final
;
65 #endif /* nsMathMLmspaceFrame_h___ */