Bumping manifests a=b2g-bump
[gecko.git] / layout / mathml / nsMathMLmspaceFrame.h
blobce8ccb488539d0a1487f9aa772bc6787bde20466
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 nsMathMLmspaceFrame_h___
7 #define nsMathMLmspaceFrame_h___
9 #include "mozilla/Attributes.h"
10 #include "nsMathMLContainerFrame.h"
13 // <mspace> -- space
16 class nsMathMLmspaceFrame : public nsMathMLContainerFrame {
17 public:
18 NS_DECL_FRAMEARENA_HELPERS
20 friend nsIFrame* NS_NewMathMLmspaceFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
22 NS_IMETHOD
23 TransmitAutomaticData() MOZ_OVERRIDE {
24 // The REC defines the following elements to be space-like:
25 // * an mtext, mspace, maligngroup, or malignmark element;
26 mPresentationData.flags |= NS_MATHML_SPACE_LIKE;
27 return NS_OK;
30 virtual bool IsLeaf() const MOZ_OVERRIDE;
32 virtual void
33 Reflow(nsPresContext* aPresContext,
34 nsHTMLReflowMetrics& aDesiredSize,
35 const nsHTMLReflowState& aReflowState,
36 nsReflowStatus& aStatus) MOZ_OVERRIDE;
38 protected:
39 explicit nsMathMLmspaceFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
40 virtual ~nsMathMLmspaceFrame();
42 virtual nsresult
43 MeasureForWidth(nsRenderingContext& aRenderingContext,
44 nsHTMLReflowMetrics& aDesiredSize) MOZ_OVERRIDE;
46 private:
47 nscoord mWidth;
48 nscoord mHeight;
49 nscoord mDepth;
51 // helper method to initialize our member data
52 void
53 ProcessAttributes(nsPresContext* aPresContext);
56 #endif /* nsMathMLmspaceFrame_h___ */