2009-04-25 03:17:43 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04: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-25 03:17:43 +04:00
|
|
|
|
2013-11-18 18:29:47 +04:00
|
|
|
#ifndef __NS_SVGINNERSVGFRAME_H__
|
|
|
|
#define __NS_SVGINNERSVGFRAME_H__
|
|
|
|
|
2013-05-14 20:33:23 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2009-04-25 03:17:43 +04:00
|
|
|
#include "nsSVGContainerFrame.h"
|
|
|
|
#include "nsISVGSVGFrame.h"
|
|
|
|
|
2012-03-02 12:28:59 +04:00
|
|
|
class nsRenderingContext;
|
|
|
|
|
2009-04-25 03:17:43 +04: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 20:49:24 +04:00
|
|
|
NS_DECL_QUERYFRAME_TARGET(nsSVGInnerSVGFrame)
|
2009-04-25 03:17:43 +04:00
|
|
|
NS_DECL_QUERYFRAME
|
2009-09-12 20:49:24 +04:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS
|
2009-04-25 03:17:43 +04:00
|
|
|
|
|
|
|
#ifdef DEBUG
|
2013-03-20 05:47:48 +04:00
|
|
|
virtual void Init(nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
2009-04-25 03:17:43 +04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the "type" of the frame
|
|
|
|
*
|
|
|
|
* @see nsGkAtoms::svgInnerSVGFrame
|
|
|
|
*/
|
2013-05-29 23:37:49 +04:00
|
|
|
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
2009-04-25 03:17:43 +04:00
|
|
|
|
2014-01-06 03:31:14 +04:00
|
|
|
#ifdef DEBUG_FRAME_DUMP
|
2013-05-29 23:37:49 +04:00
|
|
|
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE
|
2009-04-25 03:17:43 +04:00
|
|
|
{
|
|
|
|
return MakeFrameName(NS_LITERAL_STRING("SVGInnerSVG"), aResult);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
|
2010-10-07 23:19:32 +04:00
|
|
|
nsIAtom* aAttribute,
|
2013-05-29 23:37:49 +04:00
|
|
|
int32_t aModType) MOZ_OVERRIDE;
|
2010-10-07 23:19:32 +04:00
|
|
|
|
2009-04-25 03:17:43 +04:00
|
|
|
// nsISVGChildFrame interface:
|
2013-09-11 11:27:45 +04:00
|
|
|
NS_IMETHOD PaintSVG(nsRenderingContext *aContext,
|
|
|
|
const nsIntRect *aDirtyRect,
|
|
|
|
nsIFrame* aTransformRoot = nullptr) MOZ_OVERRIDE;
|
2013-05-29 23:37:49 +04:00
|
|
|
virtual void ReflowSVG() MOZ_OVERRIDE;
|
|
|
|
virtual void NotifySVGChanged(uint32_t aFlags) MOZ_OVERRIDE;
|
|
|
|
NS_IMETHOD_(nsIFrame*) GetFrameForPoint(const nsPoint &aPoint) MOZ_OVERRIDE;
|
2009-04-25 03:17:43 +04:00
|
|
|
|
|
|
|
// nsSVGContainerFrame methods:
|
2013-09-11 11:27:45 +04:00
|
|
|
virtual gfxMatrix GetCanvasTM(uint32_t aFor,
|
|
|
|
nsIFrame* aTransformRoot = nullptr) MOZ_OVERRIDE;
|
2009-04-25 03:17:43 +04:00
|
|
|
|
2013-12-30 10:50:17 +04:00
|
|
|
virtual bool HasChildrenOnlyTransform(Matrix *aTransform) const MOZ_OVERRIDE;
|
2012-05-17 08:05:09 +04:00
|
|
|
|
2009-04-25 03:17:43 +04:00
|
|
|
// nsISVGSVGFrame interface:
|
2013-05-14 20:33:23 +04:00
|
|
|
virtual void NotifyViewportOrTransformChanged(uint32_t aFlags) MOZ_OVERRIDE;
|
2009-04-25 03:17:43 +04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
2011-09-26 01:04:32 +04:00
|
|
|
nsAutoPtr<gfxMatrix> mCanvasTM;
|
2009-04-25 03:17:43 +04:00
|
|
|
};
|
2013-11-18 18:29:47 +04:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|