Bumping manifests a=b2g-bump
[gecko.git] / layout / mathml / nsMathMLmoFrame.h
blobb564e824bfb4c25dae56896d59174d52624cd6ca
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 nsMathMLmoFrame_h___
7 #define nsMathMLmoFrame_h___
9 #include "mozilla/Attributes.h"
10 #include "nsMathMLTokenFrame.h"
11 #include "nsMathMLChar.h"
14 // <mo> -- operator, fence, or separator
17 class nsMathMLmoFrame : public nsMathMLTokenFrame {
18 public:
19 NS_DECL_FRAMEARENA_HELPERS
21 friend nsIFrame* NS_NewMathMLmoFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
23 virtual eMathMLFrameType GetMathMLFrameType() MOZ_OVERRIDE;
25 virtual void
26 SetAdditionalStyleContext(int32_t aIndex,
27 nsStyleContext* aStyleContext) MOZ_OVERRIDE;
28 virtual nsStyleContext*
29 GetAdditionalStyleContext(int32_t aIndex) const MOZ_OVERRIDE;
31 virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
32 const nsRect& aDirtyRect,
33 const nsDisplayListSet& aLists) MOZ_OVERRIDE;
35 NS_IMETHOD
36 InheritAutomaticData(nsIFrame* aParent) MOZ_OVERRIDE;
38 NS_IMETHOD
39 TransmitAutomaticData() MOZ_OVERRIDE;
41 virtual void
42 SetInitialChildList(ChildListID aListID,
43 nsFrameList& aChildList) MOZ_OVERRIDE;
45 virtual void
46 Reflow(nsPresContext* aPresContext,
47 nsHTMLReflowMetrics& aDesiredSize,
48 const nsHTMLReflowState& aReflowState,
49 nsReflowStatus& aStatus) MOZ_OVERRIDE;
51 virtual nsresult
52 Place(nsRenderingContext& aRenderingContext,
53 bool aPlaceOrigin,
54 nsHTMLReflowMetrics& aDesiredSize) MOZ_OVERRIDE;
56 virtual void MarkIntrinsicISizesDirty() MOZ_OVERRIDE;
58 virtual void
59 GetIntrinsicISizeMetrics(nsRenderingContext* aRenderingContext,
60 nsHTMLReflowMetrics& aDesiredSize) MOZ_OVERRIDE;
62 virtual nsresult
63 AttributeChanged(int32_t aNameSpaceID,
64 nsIAtom* aAttribute,
65 int32_t aModType) MOZ_OVERRIDE;
67 // This method is called by the parent frame to ask <mo>
68 // to stretch itself.
69 NS_IMETHOD
70 Stretch(nsRenderingContext& aRenderingContext,
71 nsStretchDirection aStretchDirection,
72 nsBoundingMetrics& aContainerSize,
73 nsHTMLReflowMetrics& aDesiredStretchSize) MOZ_OVERRIDE;
75 virtual nsresult
76 ChildListChanged(int32_t aModType) MOZ_OVERRIDE
78 ProcessTextData();
79 return nsMathMLContainerFrame::ChildListChanged(aModType);
82 protected:
83 explicit nsMathMLmoFrame(nsStyleContext* aContext) : nsMathMLTokenFrame(aContext) {}
84 virtual ~nsMathMLmoFrame();
86 nsMathMLChar mMathMLChar; // Here is the MathMLChar that will deal with the operator.
87 nsOperatorFlags mFlags;
88 float mMinSize;
89 float mMaxSize;
91 bool UseMathMLChar();
93 // overload the base method so that we can setup our nsMathMLChar
94 void ProcessTextData();
96 // helper to get our 'form' and lookup in the Operator Dictionary to fetch
97 // our default data that may come from there, and to complete the setup
98 // using attributes that we may have
99 void
100 ProcessOperatorData();
102 // helper to double check thar our char should be rendered as a selected char
103 bool
104 IsFrameInSelection(nsIFrame* aFrame);
107 #endif /* nsMathMLmoFrame_h___ */