layout/mathml/nsMathMLmphantomFrame.h

branch
TOR_BUG_3246
changeset 6
8bccb770b82d
equal deleted inserted replaced
-1:000000000000 0:7494803b6de6
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 #ifndef nsMathMLmphantomFrame_h___
7 #define nsMathMLmphantomFrame_h___
8
9 #include "mozilla/Attributes.h"
10 #include "nsMathMLContainerFrame.h"
11
12 //
13 // <mphantom> -- make content invisible but preserve its size
14 //
15
16 class nsMathMLmphantomFrame : public nsMathMLContainerFrame {
17 public:
18 NS_DECL_FRAMEARENA_HELPERS
19
20 friend nsIFrame* NS_NewMathMLmphantomFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
21
22 NS_IMETHOD
23 InheritAutomaticData(nsIFrame* aParent) MOZ_OVERRIDE;
24
25 NS_IMETHOD
26 TransmitAutomaticData() MOZ_OVERRIDE {
27 return TransmitAutomaticDataForMrowLikeElement();
28 }
29
30 virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
31 const nsRect& aDirtyRect,
32 const nsDisplayListSet& aLists) MOZ_OVERRIDE {}
33
34 bool
35 IsMrowLike() MOZ_OVERRIDE {
36 return mFrames.FirstChild() != mFrames.LastChild() ||
37 !mFrames.FirstChild();
38 }
39
40 protected:
41 nsMathMLmphantomFrame(nsStyleContext* aContext)
42 : nsMathMLContainerFrame(aContext) {}
43 virtual ~nsMathMLmphantomFrame();
44 };
45
46 #endif /* nsMathMLmphantomFrame_h___ */

mercurial