Thu, 15 Jan 2015 21:03:48 +0100
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 nsMathMLmsqrtFrame_h___
7 #define nsMathMLmsqrtFrame_h___
9 #include "mozilla/Attributes.h"
10 #include "nsMathMLmencloseFrame.h"
12 //
13 // <msqrt> -- form a radical
14 //
16 /*
17 The MathML REC describes:
19 The <msqrt> element is used to display square roots.
20 The syntax for <msqrt> is:
21 <msqrt> base </msqrt>
23 Attributes of <msqrt> and <mroot>:
25 None (except the attributes allowed for all MathML elements, listed in Section
26 2.3.4).
28 The <mroot> element increments scriptlevel by 2, and sets displaystyle to
29 "false", within index, but leaves both attributes unchanged within base. The
30 <msqrt> element leaves both attributes unchanged within all its arguments.
31 These attributes are inherited by every element from its rendering environment,
32 but can be set explicitly only on <mstyle>. (See Section 3.3.4.)
33 */
35 class nsMathMLmsqrtFrame : public nsMathMLmencloseFrame {
36 public:
37 NS_DECL_FRAMEARENA_HELPERS
39 friend nsIFrame* NS_NewMathMLmsqrtFrame(nsIPresShell* aPresShell,
40 nsStyleContext* aContext);
42 virtual void
43 Init(nsIContent* aContent,
44 nsIFrame* aParent,
45 nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
47 NS_IMETHOD
48 InheritAutomaticData(nsIFrame* aParent) MOZ_OVERRIDE;
50 virtual nsresult
51 AttributeChanged(int32_t aNameSpaceID,
52 nsIAtom* aAttribute,
53 int32_t aModType) MOZ_OVERRIDE;
55 virtual bool
56 IsMrowLike() MOZ_OVERRIDE
57 {
58 return mFrames.FirstChild() != mFrames.LastChild() ||
59 !mFrames.FirstChild();
60 }
62 protected:
63 nsMathMLmsqrtFrame(nsStyleContext* aContext);
64 virtual ~nsMathMLmsqrtFrame();
65 };
67 #endif /* nsMathMLmsqrtFrame_h___ */