/src/mozilla-central/layout/mathml/nsMathMLmrowFrame.h
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 | | #ifndef nsMathMLmrowFrame_h___ |
8 | | #define nsMathMLmrowFrame_h___ |
9 | | |
10 | | #include "mozilla/Attributes.h" |
11 | | #include "nsMathMLContainerFrame.h" |
12 | | |
13 | | // |
14 | | // <mrow> -- horizontally group any number of subexpressions |
15 | | // <mphantom> -- make content invisible but preserve its size |
16 | | // <mstyle> -- make style changes that affect the rendering of its contents |
17 | | // |
18 | | |
19 | | class nsMathMLmrowFrame final : public nsMathMLContainerFrame |
20 | | { |
21 | | public: |
22 | | NS_DECL_FRAMEARENA_HELPERS(nsMathMLmrowFrame) |
23 | | |
24 | | friend nsIFrame* NS_NewMathMLmrowFrame(nsIPresShell* aPresShell, ComputedStyle* aStyle); |
25 | | |
26 | | virtual nsresult |
27 | | AttributeChanged(int32_t aNameSpaceID, |
28 | | nsAtom* aAttribute, |
29 | | int32_t aModType) override; |
30 | | |
31 | | NS_IMETHOD |
32 | | InheritAutomaticData(nsIFrame* aParent) override; |
33 | | |
34 | | NS_IMETHOD |
35 | 0 | TransmitAutomaticData() override { |
36 | 0 | return TransmitAutomaticDataForMrowLikeElement(); |
37 | 0 | } |
38 | | |
39 | | virtual eMathMLFrameType |
40 | | GetMathMLFrameType() override; |
41 | | |
42 | | bool |
43 | 0 | IsMrowLike() override { |
44 | 0 | // <mrow> elements with a single child are treated identically to the case |
45 | 0 | // where the child wasn't within an mrow, so we pretend the mrow isn't an |
46 | 0 | // mrow in that situation. |
47 | 0 | return mFrames.FirstChild() != mFrames.LastChild() || |
48 | 0 | !mFrames.FirstChild(); |
49 | 0 | } |
50 | | |
51 | | protected: |
52 | | explicit nsMathMLmrowFrame(ComputedStyle* aStyle) |
53 | 0 | : nsMathMLContainerFrame(aStyle, kClassID) {} |
54 | | virtual ~nsMathMLmrowFrame(); |
55 | | }; |
56 | | |
57 | | #endif /* nsMathMLmrowFrame_h___ */ |