Bug 1890689 apply drift correction to input rate instead of output rate r=pehrsons
[gecko.git] / layout / mathml / nsMathMLTokenFrame.h
blobe369e7876de63cc959ad72a1a400ab8d77ce2aae
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 nsMathMLTokenFrame_h___
8 #define nsMathMLTokenFrame_h___
10 #include "mozilla/Attributes.h"
11 #include "nsMathMLContainerFrame.h"
13 namespace mozilla {
14 class PresShell;
15 } // namespace mozilla
18 // Base class to handle token elements
21 class nsMathMLTokenFrame : public nsMathMLContainerFrame {
22 public:
23 NS_DECL_FRAMEARENA_HELPERS(nsMathMLTokenFrame)
25 friend nsIFrame* NS_NewMathMLTokenFrame(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 if (mContent->IsMathMLElement(nsGkAtoms::mtext_)) {
33 mPresentationData.flags |= NS_MATHML_SPACE_LIKE;
35 return NS_OK;
38 NS_IMETHOD
39 InheritAutomaticData(nsIFrame* aParent) override;
41 virtual eMathMLFrameType GetMathMLFrameType() override;
43 void SetInitialChildList(ChildListID aListID,
44 nsFrameList&& aChildList) override;
46 void AppendFrames(ChildListID aListID, nsFrameList&& aChildList) override;
48 void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame,
49 const nsLineList::iterator* aPrevFrameLine,
50 nsFrameList&& aChildList) override;
52 virtual void Reflow(nsPresContext* aPresContext, ReflowOutput& aDesiredSize,
53 const ReflowInput& aReflowInput,
54 nsReflowStatus& aStatus) override;
56 virtual nsresult Place(DrawTarget* aDrawTarget, bool aPlaceOrigin,
57 ReflowOutput& aDesiredSize) override;
59 protected:
60 explicit nsMathMLTokenFrame(ComputedStyle* aStyle,
61 nsPresContext* aPresContext,
62 ClassID aID = kClassID)
63 : nsMathMLContainerFrame(aStyle, aPresContext, aID) {}
64 virtual ~nsMathMLTokenFrame();
66 void MarkTextFramesAsTokenMathML();
69 #endif /* nsMathMLTokentFrame_h___ */