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
16 class nsMathMLmrowFrame
: public nsMathMLContainerFrame
{
18 NS_DECL_FRAMEARENA_HELPERS
20 friend nsIFrame
* NS_NewMathMLmrowFrame(nsIPresShell
* aPresShell
, nsStyleContext
* aContext
);
23 AttributeChanged(int32_t aNameSpaceID
,
25 int32_t aModType
) MOZ_OVERRIDE
;
28 InheritAutomaticData(nsIFrame
* aParent
) MOZ_OVERRIDE
;
31 TransmitAutomaticData() MOZ_OVERRIDE
{
32 return TransmitAutomaticDataForMrowLikeElement();
35 virtual eMathMLFrameType
36 GetMathMLFrameType() MOZ_OVERRIDE
;
39 IsMrowLike() MOZ_OVERRIDE
{
40 // <mrow> elements with a single child are treated identically to the case
41 // where the child wasn't within an mrow, so we pretend the mrow isn't an
42 // mrow in that situation.
43 return mFrames
.FirstChild() != mFrames
.LastChild() ||
44 !mFrames
.FirstChild();
48 explicit nsMathMLmrowFrame(nsStyleContext
* aContext
) : nsMathMLContainerFrame(aContext
) {}
49 virtual ~nsMathMLmrowFrame();
52 #endif /* nsMathMLmrowFrame_h___ */