Bug 1867190 - Add prefs for PHC probablities r=glandium
[gecko.git] / layout / mathml / nsMathMLmsqrtFrame.cpp
blobb9ad180179a0a68894130092bb734e68da90cc3a
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "nsMathMLmsqrtFrame.h"
9 #include "mozilla/PresShell.h"
10 #include "mozilla/gfx/2D.h"
13 // <msqrt> -- form a radical - implementation
16 using namespace mozilla;
18 nsIFrame* NS_NewMathMLmsqrtFrame(PresShell* aPresShell, ComputedStyle* aStyle) {
19 return new (aPresShell)
20 nsMathMLmsqrtFrame(aStyle, aPresShell->GetPresContext());
23 NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmsqrtFrame)
25 nsMathMLmsqrtFrame::nsMathMLmsqrtFrame(ComputedStyle* aStyle,
26 nsPresContext* aPresContext)
27 : nsMathMLmencloseFrame(aStyle, aPresContext, kClassID) {}
29 nsMathMLmsqrtFrame::~nsMathMLmsqrtFrame() = default;
31 void nsMathMLmsqrtFrame::Init(nsIContent* aContent, nsContainerFrame* aParent,
32 nsIFrame* aPrevInFlow) {
33 nsMathMLContainerFrame::Init(aContent, aParent, aPrevInFlow);
34 AllocateMathMLChar(NOTATION_RADICAL);
35 mNotationsToDraw += NOTATION_RADICAL;
38 NS_IMETHODIMP
39 nsMathMLmsqrtFrame::InheritAutomaticData(nsIFrame* aParent) {
40 nsMathMLContainerFrame::InheritAutomaticData(aParent);
42 mPresentationData.flags |= NS_MATHML_STRETCH_ALL_CHILDREN_VERTICALLY;
44 return NS_OK;
47 nsresult nsMathMLmsqrtFrame::AttributeChanged(int32_t aNameSpaceID,
48 nsAtom* aAttribute,
49 int32_t aModType) {
50 return nsMathMLContainerFrame::AttributeChanged(aNameSpaceID, aAttribute,
51 aModType);