|
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 NSSVGGFRAME_H |
|
7 #define NSSVGGFRAME_H |
|
8 |
|
9 #include "mozilla/Attributes.h" |
|
10 #include "gfxMatrix.h" |
|
11 #include "nsSVGContainerFrame.h" |
|
12 |
|
13 typedef nsSVGDisplayContainerFrame nsSVGGFrameBase; |
|
14 |
|
15 class nsSVGGFrame : public nsSVGGFrameBase |
|
16 { |
|
17 friend nsIFrame* |
|
18 NS_NewSVGGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); |
|
19 protected: |
|
20 nsSVGGFrame(nsStyleContext* aContext) : |
|
21 nsSVGGFrameBase(aContext) {} |
|
22 |
|
23 public: |
|
24 NS_DECL_FRAMEARENA_HELPERS |
|
25 |
|
26 #ifdef DEBUG |
|
27 virtual void Init(nsIContent* aContent, |
|
28 nsIFrame* aParent, |
|
29 nsIFrame* aPrevInFlow) MOZ_OVERRIDE; |
|
30 #endif |
|
31 |
|
32 /** |
|
33 * Get the "type" of the frame |
|
34 * |
|
35 * @see nsGkAtoms::svgGFrame |
|
36 */ |
|
37 virtual nsIAtom* GetType() const MOZ_OVERRIDE; |
|
38 |
|
39 #ifdef DEBUG_FRAME_DUMP |
|
40 virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE |
|
41 { |
|
42 return MakeFrameName(NS_LITERAL_STRING("SVGG"), aResult); |
|
43 } |
|
44 #endif |
|
45 |
|
46 // nsIFrame interface: |
|
47 virtual nsresult AttributeChanged(int32_t aNameSpaceID, |
|
48 nsIAtom* aAttribute, |
|
49 int32_t aModType) MOZ_OVERRIDE; |
|
50 |
|
51 // nsISVGChildFrame interface: |
|
52 virtual void NotifySVGChanged(uint32_t aFlags) MOZ_OVERRIDE; |
|
53 |
|
54 // nsSVGContainerFrame methods: |
|
55 virtual gfxMatrix GetCanvasTM(uint32_t aFor, |
|
56 nsIFrame* aTransformRoot = nullptr) MOZ_OVERRIDE; |
|
57 |
|
58 nsAutoPtr<gfxMatrix> mCanvasTM; |
|
59 }; |
|
60 |
|
61 #endif |