author Wes Kocher <>
Wed, 26 Jul 2017 15:30:17 -0700
changeset 422306 ab2472a1042bb5fbd0140ada5a972411b3f32494
parent 418830 6a629adbb62a299d7208373d1c6f375149d2afdb
child 438301 67a8e12324569dd730347187e2ffccae486c758b
permissions -rw-r--r--
Backed out changeset adb09e2d7a30 (bug 1359912) for breaking linux noopt debug builds a=backout MozReview-Commit-ID: E1treEAWecM

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at */

#ifndef nsMathMLmsqrtFrame_h___
#define nsMathMLmsqrtFrame_h___

#include "mozilla/Attributes.h"
#include "nsMathMLmencloseFrame.h"

// <msqrt> -- form a radical

The MathML REC describes:

The <msqrt> element is used to display square roots.
The syntax for <msqrt> is:
  <msqrt> base </msqrt>

Attributes of <msqrt> and <mroot>:

None (except the attributes allowed for all MathML elements, listed in Section

The <mroot> element increments scriptlevel by 2, and sets displaystyle to
"false", within index, but leaves both attributes unchanged within base. The
<msqrt> element leaves both attributes unchanged within all its arguments.
These attributes are inherited by every element from its rendering environment,
but can be set explicitly only on <mstyle>. (See Section 3.3.4.)

class nsMathMLmsqrtFrame : public nsMathMLmencloseFrame {

  friend nsIFrame* NS_NewMathMLmsqrtFrame(nsIPresShell*   aPresShell,
                                          nsStyleContext* aContext);

  virtual void
  Init(nsIContent*       aContent,
       nsContainerFrame* aParent,
       nsIFrame*         aPrevInFlow) override;

  InheritAutomaticData(nsIFrame* aParent) override;

  virtual nsresult
  AttributeChanged(int32_t         aNameSpaceID,
                   nsIAtom*        aAttribute,
                   int32_t         aModType) override;

  virtual bool
  IsMrowLike() override
    return mFrames.FirstChild() != mFrames.LastChild() ||

  explicit nsMathMLmsqrtFrame(nsStyleContext* aContext);
  virtual ~nsMathMLmsqrtFrame();

#endif /* nsMathMLmsqrtFrame_h___ */