layout/mathml/nsMathMLTokenFrame.h

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     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 nsMathMLTokenFrame_h___
     7 #define nsMathMLTokenFrame_h___
     9 #include "mozilla/Attributes.h"
    10 #include "nsMathMLContainerFrame.h"
    12 //
    13 // Base class to handle token elements
    14 //
    16 class nsMathMLTokenFrame : public nsMathMLContainerFrame {
    17 public:
    18   NS_DECL_FRAMEARENA_HELPERS
    20   friend nsIFrame* NS_NewMathMLTokenFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
    22   NS_IMETHOD
    23   TransmitAutomaticData() MOZ_OVERRIDE {
    24     // The REC defines the following elements to be space-like:
    25     // * an mtext, mspace, maligngroup, or malignmark element;
    26     if (mContent->Tag() == nsGkAtoms::mtext_) {
    27       mPresentationData.flags |= NS_MATHML_SPACE_LIKE;
    28     }
    29     return NS_OK;
    30   }
    32   NS_IMETHOD
    33   InheritAutomaticData(nsIFrame* aParent) MOZ_OVERRIDE;
    35   virtual eMathMLFrameType GetMathMLFrameType() MOZ_OVERRIDE;
    37   virtual nsresult
    38   SetInitialChildList(ChildListID     aListID,
    39                       nsFrameList&    aChildList) MOZ_OVERRIDE;
    41   virtual nsresult
    42   AppendFrames(ChildListID            aListID,
    43                nsFrameList&           aChildList) MOZ_OVERRIDE;
    45   virtual nsresult
    46   InsertFrames(ChildListID            aListID,
    47                nsIFrame*              aPrevFrame,
    48                nsFrameList&           aChildList) MOZ_OVERRIDE;
    50   virtual nsresult
    51   Reflow(nsPresContext*          aPresContext,
    52          nsHTMLReflowMetrics&     aDesiredSize,
    53          const nsHTMLReflowState& aReflowState,
    54          nsReflowStatus&          aStatus) MOZ_OVERRIDE;
    56   virtual nsresult
    57   Place(nsRenderingContext& aRenderingContext,
    58         bool                 aPlaceOrigin,
    59         nsHTMLReflowMetrics& aDesiredSize) MOZ_OVERRIDE;
    61 protected:
    62   nsMathMLTokenFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
    63   virtual ~nsMathMLTokenFrame();
    65   void MarkTextFramesAsTokenMathML();
    66 };
    68 #endif /* nsMathMLTokentFrame_h___ */

mercurial