michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef nsMathMLmrowFrame_h___ michael@0: #define nsMathMLmrowFrame_h___ michael@0: michael@0: #include "mozilla/Attributes.h" michael@0: #include "nsMathMLContainerFrame.h" michael@0: michael@0: // michael@0: // -- horizontally group any number of subexpressions michael@0: // michael@0: michael@0: class nsMathMLmrowFrame : public nsMathMLContainerFrame { michael@0: public: michael@0: NS_DECL_FRAMEARENA_HELPERS michael@0: michael@0: friend nsIFrame* NS_NewMathMLmrowFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); michael@0: michael@0: virtual nsresult michael@0: AttributeChanged(int32_t aNameSpaceID, michael@0: nsIAtom* aAttribute, michael@0: int32_t aModType) MOZ_OVERRIDE; michael@0: michael@0: NS_IMETHOD michael@0: InheritAutomaticData(nsIFrame* aParent) MOZ_OVERRIDE; michael@0: michael@0: NS_IMETHOD michael@0: TransmitAutomaticData() MOZ_OVERRIDE { michael@0: return TransmitAutomaticDataForMrowLikeElement(); michael@0: } michael@0: michael@0: virtual eMathMLFrameType michael@0: GetMathMLFrameType() MOZ_OVERRIDE; michael@0: michael@0: bool michael@0: IsMrowLike() MOZ_OVERRIDE { michael@0: // elements with a single child are treated identically to the case michael@0: // where the child wasn't within an mrow, so we pretend the mrow isn't an michael@0: // mrow in that situation. michael@0: return mFrames.FirstChild() != mFrames.LastChild() || michael@0: !mFrames.FirstChild(); michael@0: } michael@0: michael@0: protected: michael@0: nsMathMLmrowFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {} michael@0: virtual ~nsMathMLmrowFrame(); michael@0: }; michael@0: michael@0: #endif /* nsMathMLmrowFrame_h___ */