Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
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/. */
6 #ifndef __NS_SVGINNERSVGFRAME_H__
7 #define __NS_SVGINNERSVGFRAME_H__
9 #include "mozilla/Attributes.h"
10 #include "nsSVGContainerFrame.h"
11 #include "nsISVGSVGFrame.h"
13 class nsRenderingContext;
15 typedef nsSVGDisplayContainerFrame nsSVGInnerSVGFrameBase;
17 class nsSVGInnerSVGFrame : public nsSVGInnerSVGFrameBase,
18 public nsISVGSVGFrame
19 {
20 friend nsIFrame*
21 NS_NewSVGInnerSVGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
22 protected:
23 nsSVGInnerSVGFrame(nsStyleContext* aContext) :
24 nsSVGInnerSVGFrameBase(aContext) {}
26 public:
27 NS_DECL_QUERYFRAME_TARGET(nsSVGInnerSVGFrame)
28 NS_DECL_QUERYFRAME
29 NS_DECL_FRAMEARENA_HELPERS
31 #ifdef DEBUG
32 virtual void Init(nsIContent* aContent,
33 nsIFrame* aParent,
34 nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
35 #endif
37 /**
38 * Get the "type" of the frame
39 *
40 * @see nsGkAtoms::svgInnerSVGFrame
41 */
42 virtual nsIAtom* GetType() const MOZ_OVERRIDE;
44 #ifdef DEBUG_FRAME_DUMP
45 virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE
46 {
47 return MakeFrameName(NS_LITERAL_STRING("SVGInnerSVG"), aResult);
48 }
49 #endif
51 virtual nsresult AttributeChanged(int32_t aNameSpaceID,
52 nsIAtom* aAttribute,
53 int32_t aModType) MOZ_OVERRIDE;
55 // nsISVGChildFrame interface:
56 virtual nsresult PaintSVG(nsRenderingContext *aContext,
57 const nsIntRect *aDirtyRect,
58 nsIFrame* aTransformRoot = nullptr) MOZ_OVERRIDE;
59 virtual void ReflowSVG() MOZ_OVERRIDE;
60 virtual void NotifySVGChanged(uint32_t aFlags) MOZ_OVERRIDE;
61 virtual nsIFrame* GetFrameForPoint(const nsPoint &aPoint) MOZ_OVERRIDE;
63 // nsSVGContainerFrame methods:
64 virtual gfxMatrix GetCanvasTM(uint32_t aFor,
65 nsIFrame* aTransformRoot = nullptr) MOZ_OVERRIDE;
67 virtual bool HasChildrenOnlyTransform(Matrix *aTransform) const MOZ_OVERRIDE;
69 // nsISVGSVGFrame interface:
70 virtual void NotifyViewportOrTransformChanged(uint32_t aFlags) MOZ_OVERRIDE;
72 protected:
74 nsAutoPtr<gfxMatrix> mCanvasTM;
75 };
77 #endif