/src/mozilla-central/layout/mathml/nsMathMLmspaceFrame.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 | | /* vim: set ts=8 sts=2 et sw=2 tw=80: */ |
3 | | /* This Source Code Form is subject to the terms of the Mozilla Public |
4 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
5 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
6 | | |
7 | | #ifndef nsMathMLmspaceFrame_h___ |
8 | | #define nsMathMLmspaceFrame_h___ |
9 | | |
10 | | #include "mozilla/Attributes.h" |
11 | | #include "nsMathMLContainerFrame.h" |
12 | | |
13 | | // |
14 | | // <mspace> -- space |
15 | | // |
16 | | |
17 | | class nsMathMLmspaceFrame final : public nsMathMLContainerFrame |
18 | | { |
19 | | public: |
20 | | NS_DECL_FRAMEARENA_HELPERS(nsMathMLmspaceFrame) |
21 | | |
22 | | friend nsIFrame* NS_NewMathMLmspaceFrame(nsIPresShell* aPresShell, ComputedStyle* aStyle); |
23 | | |
24 | | NS_IMETHOD |
25 | 0 | TransmitAutomaticData() override { |
26 | 0 | // The REC defines the following elements to be space-like: |
27 | 0 | // * an mtext, mspace, maligngroup, or malignmark element; |
28 | 0 | mPresentationData.flags |= NS_MATHML_SPACE_LIKE; |
29 | 0 | return NS_OK; |
30 | 0 | } |
31 | | |
32 | | virtual void |
33 | | Reflow(nsPresContext* aPresContext, |
34 | | ReflowOutput& aDesiredSize, |
35 | | const ReflowInput& aReflowInput, |
36 | | nsReflowStatus& aStatus) override; |
37 | | |
38 | | protected: |
39 | | explicit nsMathMLmspaceFrame(ComputedStyle* aStyle) : |
40 | 0 | nsMathMLContainerFrame(aStyle, kClassID), mWidth(0), mHeight(0), mDepth(0) {} |
41 | | virtual ~nsMathMLmspaceFrame(); |
42 | | |
43 | | virtual nsresult |
44 | | MeasureForWidth(DrawTarget* aDrawTarget, |
45 | | ReflowOutput& aDesiredSize) override; |
46 | | |
47 | | private: |
48 | | nscoord mWidth; |
49 | | nscoord mHeight; |
50 | | nscoord mDepth; |
51 | | |
52 | | // helper method to initialize our member data |
53 | | void |
54 | | ProcessAttributes(nsPresContext* aPresContext); |
55 | | }; |
56 | | |
57 | | #endif /* nsMathMLmspaceFrame_h___ */ |