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/. */
9 #include "mozilla/Attributes.h"
10 #include "gfxMatrix.h"
11 #include "nsSVGContainerFrame.h"
13 typedef nsSVGDisplayContainerFrame nsSVGGFrameBase
;
15 class nsSVGGFrame
: public nsSVGGFrameBase
18 NS_NewSVGGFrame(nsIPresShell
* aPresShell
, nsStyleContext
* aContext
);
20 explicit nsSVGGFrame(nsStyleContext
* aContext
) :
21 nsSVGGFrameBase(aContext
) {}
24 NS_DECL_FRAMEARENA_HELPERS
27 virtual void Init(nsIContent
* aContent
,
28 nsContainerFrame
* aParent
,
29 nsIFrame
* aPrevInFlow
) MOZ_OVERRIDE
;
33 * Get the "type" of the frame
35 * @see nsGkAtoms::svgGFrame
37 virtual nsIAtom
* GetType() const MOZ_OVERRIDE
;
39 #ifdef DEBUG_FRAME_DUMP
40 virtual nsresult
GetFrameName(nsAString
& aResult
) const MOZ_OVERRIDE
42 return MakeFrameName(NS_LITERAL_STRING("SVGG"), aResult
);
46 // nsIFrame interface:
47 virtual nsresult
AttributeChanged(int32_t aNameSpaceID
,
49 int32_t aModType
) MOZ_OVERRIDE
;
51 // nsISVGChildFrame interface:
52 virtual void NotifySVGChanged(uint32_t aFlags
) MOZ_OVERRIDE
;
54 // nsSVGContainerFrame methods:
55 virtual gfxMatrix
GetCanvasTM(uint32_t aFor
,
56 nsIFrame
* aTransformRoot
= nullptr) MOZ_OVERRIDE
;
58 nsAutoPtr
<gfxMatrix
> mCanvasTM
;