2009-04-24 16:17:43 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2009-04-24 16:17:43 -07:00
|
|
|
|
|
|
|
#include "nsSVGContainerFrame.h"
|
|
|
|
#include "nsISVGSVGFrame.h"
|
2009-04-28 21:31:34 -07:00
|
|
|
#include "gfxMatrix.h"
|
2009-04-24 16:17:43 -07:00
|
|
|
|
2012-03-02 00:28:59 -08:00
|
|
|
class nsRenderingContext;
|
|
|
|
|
2009-04-24 16:17:43 -07:00
|
|
|
typedef nsSVGDisplayContainerFrame nsSVGInnerSVGFrameBase;
|
|
|
|
|
|
|
|
class nsSVGInnerSVGFrame : public nsSVGInnerSVGFrameBase,
|
|
|
|
public nsISVGSVGFrame
|
|
|
|
{
|
|
|
|
friend nsIFrame*
|
|
|
|
NS_NewSVGInnerSVGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
|
|
|
protected:
|
|
|
|
nsSVGInnerSVGFrame(nsStyleContext* aContext) :
|
|
|
|
nsSVGInnerSVGFrameBase(aContext) {}
|
|
|
|
|
|
|
|
public:
|
2009-09-12 09:49:24 -07:00
|
|
|
NS_DECL_QUERYFRAME_TARGET(nsSVGInnerSVGFrame)
|
2009-04-24 16:17:43 -07:00
|
|
|
NS_DECL_QUERYFRAME
|
2009-09-12 09:49:24 -07:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS
|
2009-04-24 16:17:43 -07:00
|
|
|
|
|
|
|
#ifdef DEBUG
|
2013-03-19 18:47:48 -07:00
|
|
|
virtual void Init(nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
2009-04-24 16:17:43 -07:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the "type" of the frame
|
|
|
|
*
|
|
|
|
* @see nsGkAtoms::svgInnerSVGFrame
|
|
|
|
*/
|
|
|
|
virtual nsIAtom* GetType() const;
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
NS_IMETHOD GetFrameName(nsAString& aResult) const
|
|
|
|
{
|
|
|
|
return MakeFrameName(NS_LITERAL_STRING("SVGInnerSVG"), aResult);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
|
2010-10-07 12:19:32 -07:00
|
|
|
nsIAtom* aAttribute,
|
2012-08-22 08:56:38 -07:00
|
|
|
int32_t aModType);
|
2010-10-07 12:19:32 -07:00
|
|
|
|
2009-04-24 16:17:43 -07:00
|
|
|
// nsISVGChildFrame interface:
|
2012-03-02 00:28:59 -08:00
|
|
|
NS_IMETHOD PaintSVG(nsRenderingContext *aContext, const nsIntRect *aDirtyRect);
|
2012-07-21 17:01:44 -07:00
|
|
|
virtual void ReflowSVG();
|
2012-08-22 08:56:38 -07:00
|
|
|
virtual void NotifySVGChanged(uint32_t aFlags);
|
2009-04-24 16:17:43 -07:00
|
|
|
NS_IMETHOD_(nsIFrame*) GetFrameForPoint(const nsPoint &aPoint);
|
|
|
|
|
|
|
|
// nsSVGContainerFrame methods:
|
2012-08-22 08:56:38 -07:00
|
|
|
virtual gfxMatrix GetCanvasTM(uint32_t aFor);
|
2009-04-24 16:17:43 -07:00
|
|
|
|
2012-05-16 21:05:09 -07:00
|
|
|
virtual bool HasChildrenOnlyTransform(gfxMatrix *aTransform) const;
|
|
|
|
|
2009-04-24 16:17:43 -07:00
|
|
|
// nsISVGSVGFrame interface:
|
2012-08-22 08:56:38 -07:00
|
|
|
virtual void NotifyViewportOrTransformChanged(uint32_t aFlags);
|
2009-04-24 16:17:43 -07:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
2011-09-25 14:04:32 -07:00
|
|
|
nsAutoPtr<gfxMatrix> mCanvasTM;
|
2009-04-24 16:17:43 -07:00
|
|
|
};
|