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 nsMathMLmrowFrame_h___
8 #define nsMathMLmrowFrame_h___
10 #include "mozilla/Attributes.h"
11 #include "nsMathMLContainerFrame.h"
15 } // namespace mozilla
18 // <mrow> -- horizontally group any number of subexpressions
19 // <mphantom> -- make content invisible but preserve its size
20 // <mstyle> -- make style changes that affect the rendering of its contents
23 class nsMathMLmrowFrame final
: public nsMathMLContainerFrame
{
25 NS_DECL_FRAMEARENA_HELPERS(nsMathMLmrowFrame
)
27 friend nsIFrame
* NS_NewMathMLmrowFrame(mozilla::PresShell
* aPresShell
,
28 ComputedStyle
* aStyle
);
30 virtual nsresult
AttributeChanged(int32_t aNameSpaceID
, nsAtom
* aAttribute
,
31 int32_t aModType
) override
;
34 InheritAutomaticData(nsIFrame
* aParent
) override
;
37 TransmitAutomaticData() override
{
38 return TransmitAutomaticDataForMrowLikeElement();
41 virtual eMathMLFrameType
GetMathMLFrameType() override
;
43 bool IsMrowLike() override
{
44 // <mrow> elements with a single child are treated identically to the case
45 // where the child wasn't within an mrow, so we pretend the mrow isn't an
46 // mrow in that situation.
47 return mFrames
.FirstChild() != mFrames
.LastChild() || !mFrames
.FirstChild();
51 explicit nsMathMLmrowFrame(ComputedStyle
* aStyle
, nsPresContext
* aPresContext
)
52 : nsMathMLContainerFrame(aStyle
, aPresContext
, kClassID
) {}
53 virtual ~nsMathMLmrowFrame();
56 #endif /* nsMathMLmrowFrame_h___ */