no bug - Import translations from android-l10n r=release a=l10n CLOSED TREE
[gecko.git] / layout / mathml / nsMathMLmspaceFrame.h
blobd0692d2dfede263c230087b4ecac5cf0bf7a05fe
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/. */
7 #ifndef nsMathMLmspaceFrame_h___
8 #define nsMathMLmspaceFrame_h___
10 #include "mozilla/Attributes.h"
11 #include "nsMathMLContainerFrame.h"
13 namespace mozilla {
14 class PresShell;
15 } // namespace mozilla
18 // <mspace> -- space
21 class nsMathMLmspaceFrame final : public nsMathMLContainerFrame {
22 public:
23 NS_DECL_FRAMEARENA_HELPERS(nsMathMLmspaceFrame)
25 friend nsIFrame* NS_NewMathMLmspaceFrame(mozilla::PresShell* aPresShell,
26 ComputedStyle* aStyle);
28 NS_IMETHOD
29 TransmitAutomaticData() override {
30 // The REC defines the following elements to be space-like:
31 // * an mtext, mspace, maligngroup, or malignmark element;
32 mPresentationData.flags |= NS_MATHML_SPACE_LIKE;
33 return NS_OK;
36 virtual void Reflow(nsPresContext* aPresContext, ReflowOutput& aDesiredSize,
37 const ReflowInput& aReflowInput,
38 nsReflowStatus& aStatus) override;
40 protected:
41 explicit nsMathMLmspaceFrame(ComputedStyle* aStyle,
42 nsPresContext* aPresContext)
43 : nsMathMLContainerFrame(aStyle, aPresContext, kClassID),
44 mWidth(0),
45 mHeight(0),
46 mDepth(0) {}
47 virtual ~nsMathMLmspaceFrame();
49 virtual nsresult MeasureForWidth(DrawTarget* aDrawTarget,
50 ReflowOutput& aDesiredSize) override;
52 private:
53 nscoord mWidth;
54 nscoord mHeight;
55 nscoord mDepth;
57 // helper method to initialize our member data
58 void ProcessAttributes(nsPresContext* aPresContext);
61 #endif /* nsMathMLmspaceFrame_h___ */