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"
13 // <msqrt> -- form a radical
17 The MathML REC describes:
19 The <msqrt> element is used to display square roots.
20 The syntax for <msqrt> is:
23 Attributes of <msqrt> and <mroot>:
25 None (except the attributes allowed for all MathML elements, listed in Section
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.)
35 class nsMathMLmsqrtFrame
: public nsMathMLmencloseFrame
{
37 NS_DECL_FRAMEARENA_HELPERS
39 friend nsIFrame
* NS_NewMathMLmsqrtFrame(nsIPresShell
* aPresShell
,
40 nsStyleContext
* aContext
);
43 Init(nsIContent
* aContent
,
44 nsContainerFrame
* aParent
,
45 nsIFrame
* aPrevInFlow
) override
;
48 InheritAutomaticData(nsIFrame
* aParent
) override
;
51 AttributeChanged(int32_t aNameSpaceID
,
53 int32_t aModType
) override
;
58 return mFrames
.FirstChild() != mFrames
.LastChild() ||
59 !mFrames
.FirstChild();
63 explicit nsMathMLmsqrtFrame(nsStyleContext
* aContext
);
64 virtual ~nsMathMLmsqrtFrame();
67 #endif /* nsMathMLmsqrtFrame_h___ */