Bumping manifests a=b2g-bump
[gecko.git] / layout / mathml / nsMathMLTokenFrame.h
blob8f11ff73f4cd6057d2c20263b21647f4cecf02fe
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 nsMathMLTokenFrame_h___
7 #define nsMathMLTokenFrame_h___
9 #include "mozilla/Attributes.h"
10 #include "nsMathMLContainerFrame.h"
13 // Base class to handle token elements
16 class nsMathMLTokenFrame : public nsMathMLContainerFrame {
17 public:
18 NS_DECL_FRAMEARENA_HELPERS
20 friend nsIFrame* NS_NewMathMLTokenFrame(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 if (mContent->Tag() == nsGkAtoms::mtext_) {
27 mPresentationData.flags |= NS_MATHML_SPACE_LIKE;
29 return NS_OK;
32 NS_IMETHOD
33 InheritAutomaticData(nsIFrame* aParent) MOZ_OVERRIDE;
35 virtual eMathMLFrameType GetMathMLFrameType() MOZ_OVERRIDE;
37 virtual void
38 SetInitialChildList(ChildListID aListID,
39 nsFrameList& aChildList) MOZ_OVERRIDE;
41 virtual void
42 AppendFrames(ChildListID aListID,
43 nsFrameList& aChildList) MOZ_OVERRIDE;
45 virtual void
46 InsertFrames(ChildListID aListID,
47 nsIFrame* aPrevFrame,
48 nsFrameList& aChildList) MOZ_OVERRIDE;
50 virtual void
51 Reflow(nsPresContext* aPresContext,
52 nsHTMLReflowMetrics& aDesiredSize,
53 const nsHTMLReflowState& aReflowState,
54 nsReflowStatus& aStatus) MOZ_OVERRIDE;
56 virtual nsresult
57 Place(nsRenderingContext& aRenderingContext,
58 bool aPlaceOrigin,
59 nsHTMLReflowMetrics& aDesiredSize) MOZ_OVERRIDE;
61 protected:
62 explicit nsMathMLTokenFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
63 virtual ~nsMathMLTokenFrame();
65 void MarkTextFramesAsTokenMathML();
68 #endif /* nsMathMLTokentFrame_h___ */