Line data Source code
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/. */
5 :
6 : #include "nsMathMLmsqrtFrame.h"
7 : #include "mozilla/gfx/2D.h"
8 :
9 : //
10 : // <msqrt> -- form a radical - implementation
11 : //
12 :
13 : nsIFrame*
14 0 : NS_NewMathMLmsqrtFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
15 : {
16 0 : return new (aPresShell) nsMathMLmsqrtFrame(aContext);
17 : }
18 :
19 0 : NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmsqrtFrame)
20 :
21 0 : nsMathMLmsqrtFrame::nsMathMLmsqrtFrame(nsStyleContext* aContext) :
22 0 : nsMathMLmencloseFrame(aContext, kClassID)
23 : {
24 0 : }
25 :
26 0 : nsMathMLmsqrtFrame::~nsMathMLmsqrtFrame()
27 : {
28 0 : }
29 :
30 : void
31 0 : nsMathMLmsqrtFrame::Init(nsIContent* aContent,
32 : nsContainerFrame* aParent,
33 : nsIFrame* aPrevInFlow)
34 : {
35 0 : nsMathMLContainerFrame::Init(aContent, aParent, aPrevInFlow);
36 0 : AllocateMathMLChar(NOTATION_RADICAL);
37 0 : mNotationsToDraw |= NOTATION_RADICAL;
38 0 : }
39 :
40 : NS_IMETHODIMP
41 0 : nsMathMLmsqrtFrame::InheritAutomaticData(nsIFrame* aParent)
42 : {
43 0 : nsMathMLContainerFrame::InheritAutomaticData(aParent);
44 :
45 0 : mPresentationData.flags |= NS_MATHML_STRETCH_ALL_CHILDREN_VERTICALLY;
46 :
47 0 : return NS_OK;
48 : }
49 :
50 : nsresult
51 0 : nsMathMLmsqrtFrame::AttributeChanged(int32_t aNameSpaceID,
52 : nsIAtom* aAttribute,
53 : int32_t aModType)
54 : {
55 : return nsMathMLContainerFrame::
56 0 : AttributeChanged(aNameSpaceID, aAttribute, aModType);
57 : }
|