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 nsMathMLmspaceFrame_h___ michael@0: #define nsMathMLmspaceFrame_h___ michael@0: michael@0: #include "mozilla/Attributes.h" michael@0: #include "nsMathMLContainerFrame.h" michael@0: michael@0: // michael@0: // -- space michael@0: // michael@0: michael@0: class nsMathMLmspaceFrame : public nsMathMLContainerFrame { michael@0: public: michael@0: NS_DECL_FRAMEARENA_HELPERS michael@0: michael@0: friend nsIFrame* NS_NewMathMLmspaceFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); michael@0: michael@0: NS_IMETHOD michael@0: TransmitAutomaticData() MOZ_OVERRIDE { michael@0: // The REC defines the following elements to be space-like: michael@0: // * an mtext, mspace, maligngroup, or malignmark element; michael@0: mPresentationData.flags |= NS_MATHML_SPACE_LIKE; michael@0: return NS_OK; michael@0: } michael@0: michael@0: virtual bool IsLeaf() const MOZ_OVERRIDE; michael@0: michael@0: virtual nsresult michael@0: Reflow(nsPresContext* aPresContext, michael@0: nsHTMLReflowMetrics& aDesiredSize, michael@0: const nsHTMLReflowState& aReflowState, michael@0: nsReflowStatus& aStatus) MOZ_OVERRIDE; michael@0: michael@0: protected: michael@0: nsMathMLmspaceFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {} michael@0: virtual ~nsMathMLmspaceFrame(); michael@0: michael@0: virtual nsresult michael@0: MeasureForWidth(nsRenderingContext& aRenderingContext, michael@0: nsHTMLReflowMetrics& aDesiredSize) MOZ_OVERRIDE; michael@0: michael@0: private: michael@0: nscoord mWidth; michael@0: nscoord mHeight; michael@0: nscoord mDepth; michael@0: michael@0: // helper method to initialize our member data michael@0: void michael@0: ProcessAttributes(nsPresContext* aPresContext); michael@0: }; michael@0: michael@0: #endif /* nsMathMLmspaceFrame_h___ */