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