layout/mathml/nsMathMLmrowFrame.h

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rw-r--r--

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

     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 nsMathMLmrowFrame_h___
     7 #define nsMathMLmrowFrame_h___
     9 #include "mozilla/Attributes.h"
    10 #include "nsMathMLContainerFrame.h"
    12 //
    13 // <mrow> -- horizontally group any number of subexpressions 
    14 //
    16 class nsMathMLmrowFrame : public nsMathMLContainerFrame {
    17 public:
    18   NS_DECL_FRAMEARENA_HELPERS
    20   friend nsIFrame* NS_NewMathMLmrowFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
    22   virtual nsresult
    23   AttributeChanged(int32_t  aNameSpaceID,
    24                    nsIAtom* aAttribute,
    25                    int32_t  aModType) MOZ_OVERRIDE;
    27   NS_IMETHOD
    28   InheritAutomaticData(nsIFrame* aParent) MOZ_OVERRIDE;
    30   NS_IMETHOD
    31   TransmitAutomaticData() MOZ_OVERRIDE {
    32     return TransmitAutomaticDataForMrowLikeElement();
    33   }
    35   virtual eMathMLFrameType
    36   GetMathMLFrameType() MOZ_OVERRIDE; 
    38   bool
    39   IsMrowLike() MOZ_OVERRIDE {
    40     // <mrow> elements with a single child are treated identically to the case
    41     // where the child wasn't within an mrow, so we pretend the mrow isn't an
    42     // mrow in that situation.
    43     return mFrames.FirstChild() != mFrames.LastChild() ||
    44            !mFrames.FirstChild();
    45   }
    47 protected:
    48   nsMathMLmrowFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
    49   virtual ~nsMathMLmrowFrame();
    50 };
    52 #endif /* nsMathMLmrowFrame_h___ */

mercurial