layout/mathml/nsMathMLmrowFrame.h

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     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