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 nsMathMLmrowFrame_h___
7 #define nsMathMLmrowFrame_h___
9 #include "mozilla/Attributes.h"
10 #include "nsMathMLContainerFrame.h"
13 // <mrow> -- horizontally group any number of subexpressions
14 // <mphantom> -- make content invisible but preserve its size
15 // <mstyle> -- make style changes that affect the rendering of its contents
18 class nsMathMLmrowFrame
: public nsMathMLContainerFrame
{
20 NS_DECL_FRAMEARENA_HELPERS
22 friend nsIFrame
* NS_NewMathMLmrowFrame(nsIPresShell
* aPresShell
, nsStyleContext
* aContext
);
25 AttributeChanged(int32_t aNameSpaceID
,
27 int32_t aModType
) override
;
30 InheritAutomaticData(nsIFrame
* aParent
) override
;
33 TransmitAutomaticData() override
{
34 return TransmitAutomaticDataForMrowLikeElement();
37 virtual eMathMLFrameType
38 GetMathMLFrameType() override
;
41 IsMrowLike() override
{
42 // <mrow> elements with a single child are treated identically to the case
43 // where the child wasn't within an mrow, so we pretend the mrow isn't an
44 // mrow in that situation.
45 return mFrames
.FirstChild() != mFrames
.LastChild() ||
46 !mFrames
.FirstChild();
50 explicit nsMathMLmrowFrame(nsStyleContext
* aContext
) : nsMathMLContainerFrame(aContext
) {}
51 virtual ~nsMathMLmrowFrame();
54 #endif /* nsMathMLmrowFrame_h___ */