Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #ifndef nsMathMLmspaceFrame_h___ |
michael@0 | 7 | #define nsMathMLmspaceFrame_h___ |
michael@0 | 8 | |
michael@0 | 9 | #include "mozilla/Attributes.h" |
michael@0 | 10 | #include "nsMathMLContainerFrame.h" |
michael@0 | 11 | |
michael@0 | 12 | // |
michael@0 | 13 | // <mspace> -- space |
michael@0 | 14 | // |
michael@0 | 15 | |
michael@0 | 16 | class nsMathMLmspaceFrame : public nsMathMLContainerFrame { |
michael@0 | 17 | public: |
michael@0 | 18 | NS_DECL_FRAMEARENA_HELPERS |
michael@0 | 19 | |
michael@0 | 20 | friend nsIFrame* NS_NewMathMLmspaceFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); |
michael@0 | 21 | |
michael@0 | 22 | NS_IMETHOD |
michael@0 | 23 | TransmitAutomaticData() MOZ_OVERRIDE { |
michael@0 | 24 | // The REC defines the following elements to be space-like: |
michael@0 | 25 | // * an mtext, mspace, maligngroup, or malignmark element; |
michael@0 | 26 | mPresentationData.flags |= NS_MATHML_SPACE_LIKE; |
michael@0 | 27 | return NS_OK; |
michael@0 | 28 | } |
michael@0 | 29 | |
michael@0 | 30 | virtual bool IsLeaf() const MOZ_OVERRIDE; |
michael@0 | 31 | |
michael@0 | 32 | virtual nsresult |
michael@0 | 33 | Reflow(nsPresContext* aPresContext, |
michael@0 | 34 | nsHTMLReflowMetrics& aDesiredSize, |
michael@0 | 35 | const nsHTMLReflowState& aReflowState, |
michael@0 | 36 | nsReflowStatus& aStatus) MOZ_OVERRIDE; |
michael@0 | 37 | |
michael@0 | 38 | protected: |
michael@0 | 39 | nsMathMLmspaceFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {} |
michael@0 | 40 | virtual ~nsMathMLmspaceFrame(); |
michael@0 | 41 | |
michael@0 | 42 | virtual nsresult |
michael@0 | 43 | MeasureForWidth(nsRenderingContext& aRenderingContext, |
michael@0 | 44 | nsHTMLReflowMetrics& aDesiredSize) MOZ_OVERRIDE; |
michael@0 | 45 | |
michael@0 | 46 | private: |
michael@0 | 47 | nscoord mWidth; |
michael@0 | 48 | nscoord mHeight; |
michael@0 | 49 | nscoord mDepth; |
michael@0 | 50 | |
michael@0 | 51 | // helper method to initialize our member data |
michael@0 | 52 | void |
michael@0 | 53 | ProcessAttributes(nsPresContext* aPresContext); |
michael@0 | 54 | }; |
michael@0 | 55 | |
michael@0 | 56 | #endif /* nsMathMLmspaceFrame_h___ */ |