layout/svg/nsSVGInnerSVGFrame.h

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

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.)

michael@0 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #ifndef __NS_SVGINNERSVGFRAME_H__
michael@0 7 #define __NS_SVGINNERSVGFRAME_H__
michael@0 8
michael@0 9 #include "mozilla/Attributes.h"
michael@0 10 #include "nsSVGContainerFrame.h"
michael@0 11 #include "nsISVGSVGFrame.h"
michael@0 12
michael@0 13 class nsRenderingContext;
michael@0 14
michael@0 15 typedef nsSVGDisplayContainerFrame nsSVGInnerSVGFrameBase;
michael@0 16
michael@0 17 class nsSVGInnerSVGFrame : public nsSVGInnerSVGFrameBase,
michael@0 18 public nsISVGSVGFrame
michael@0 19 {
michael@0 20 friend nsIFrame*
michael@0 21 NS_NewSVGInnerSVGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
michael@0 22 protected:
michael@0 23 nsSVGInnerSVGFrame(nsStyleContext* aContext) :
michael@0 24 nsSVGInnerSVGFrameBase(aContext) {}
michael@0 25
michael@0 26 public:
michael@0 27 NS_DECL_QUERYFRAME_TARGET(nsSVGInnerSVGFrame)
michael@0 28 NS_DECL_QUERYFRAME
michael@0 29 NS_DECL_FRAMEARENA_HELPERS
michael@0 30
michael@0 31 #ifdef DEBUG
michael@0 32 virtual void Init(nsIContent* aContent,
michael@0 33 nsIFrame* aParent,
michael@0 34 nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
michael@0 35 #endif
michael@0 36
michael@0 37 /**
michael@0 38 * Get the "type" of the frame
michael@0 39 *
michael@0 40 * @see nsGkAtoms::svgInnerSVGFrame
michael@0 41 */
michael@0 42 virtual nsIAtom* GetType() const MOZ_OVERRIDE;
michael@0 43
michael@0 44 #ifdef DEBUG_FRAME_DUMP
michael@0 45 virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE
michael@0 46 {
michael@0 47 return MakeFrameName(NS_LITERAL_STRING("SVGInnerSVG"), aResult);
michael@0 48 }
michael@0 49 #endif
michael@0 50
michael@0 51 virtual nsresult AttributeChanged(int32_t aNameSpaceID,
michael@0 52 nsIAtom* aAttribute,
michael@0 53 int32_t aModType) MOZ_OVERRIDE;
michael@0 54
michael@0 55 // nsISVGChildFrame interface:
michael@0 56 virtual nsresult PaintSVG(nsRenderingContext *aContext,
michael@0 57 const nsIntRect *aDirtyRect,
michael@0 58 nsIFrame* aTransformRoot = nullptr) MOZ_OVERRIDE;
michael@0 59 virtual void ReflowSVG() MOZ_OVERRIDE;
michael@0 60 virtual void NotifySVGChanged(uint32_t aFlags) MOZ_OVERRIDE;
michael@0 61 virtual nsIFrame* GetFrameForPoint(const nsPoint &aPoint) MOZ_OVERRIDE;
michael@0 62
michael@0 63 // nsSVGContainerFrame methods:
michael@0 64 virtual gfxMatrix GetCanvasTM(uint32_t aFor,
michael@0 65 nsIFrame* aTransformRoot = nullptr) MOZ_OVERRIDE;
michael@0 66
michael@0 67 virtual bool HasChildrenOnlyTransform(Matrix *aTransform) const MOZ_OVERRIDE;
michael@0 68
michael@0 69 // nsISVGSVGFrame interface:
michael@0 70 virtual void NotifyViewportOrTransformChanged(uint32_t aFlags) MOZ_OVERRIDE;
michael@0 71
michael@0 72 protected:
michael@0 73
michael@0 74 nsAutoPtr<gfxMatrix> mCanvasTM;
michael@0 75 };
michael@0 76
michael@0 77 #endif
michael@0 78

mercurial