2007-03-22 10:30:00 -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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef NSSVGGFRAME_H
|
|
|
|
#define NSSVGGFRAME_H
|
|
|
|
|
2013-05-29 12:37:49 -07:00
|
|
|
#include "mozilla/Attributes.h"
|
2009-04-28 21:31:34 -07:00
|
|
|
#include "gfxMatrix.h"
|
2012-03-20 05:15:55 -07:00
|
|
|
#include "nsSVGContainerFrame.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
typedef nsSVGDisplayContainerFrame nsSVGGFrameBase;
|
|
|
|
|
|
|
|
class nsSVGGFrame : public nsSVGGFrameBase
|
|
|
|
{
|
2007-07-25 02:16:02 -07:00
|
|
|
friend nsIFrame*
|
2009-01-19 10:31:34 -08:00
|
|
|
NS_NewSVGGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2007-07-25 02:16:02 -07:00
|
|
|
protected:
|
2007-03-22 10:30:00 -07:00
|
|
|
nsSVGGFrame(nsStyleContext* aContext) :
|
2008-10-17 12:41:35 -07:00
|
|
|
nsSVGGFrameBase(aContext) {}
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2007-07-25 02:16:02 -07:00
|
|
|
public:
|
2009-09-12 09:49:24 -07:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS
|
|
|
|
|
2009-01-19 10:31:34 -08:00
|
|
|
#ifdef DEBUG
|
2013-03-19 18:47:48 -07:00
|
|
|
virtual void Init(nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
2009-01-19 10:31:34 -08:00
|
|
|
#endif
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
/**
|
|
|
|
* Get the "type" of the frame
|
|
|
|
*
|
|
|
|
* @see nsGkAtoms::svgGFrame
|
|
|
|
*/
|
2013-05-29 12:37:49 -07:00
|
|
|
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2014-01-05 15:31:14 -08:00
|
|
|
#ifdef DEBUG_FRAME_DUMP
|
2014-02-17 23:47:48 -08:00
|
|
|
virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
return MakeFrameName(NS_LITERAL_STRING("SVGG"), aResult);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// nsIFrame interface:
|
2014-02-17 23:47:48 -08:00
|
|
|
virtual nsresult AttributeChanged(int32_t aNameSpaceID,
|
2007-03-22 10:30:00 -07:00
|
|
|
nsIAtom* aAttribute,
|
2013-05-29 12:37:49 -07:00
|
|
|
int32_t aModType) MOZ_OVERRIDE;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
// nsISVGChildFrame interface:
|
2013-05-29 12:37:49 -07:00
|
|
|
virtual void NotifySVGChanged(uint32_t aFlags) MOZ_OVERRIDE;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
// nsSVGContainerFrame methods:
|
2013-09-11 00:27:45 -07:00
|
|
|
virtual gfxMatrix GetCanvasTM(uint32_t aFor,
|
|
|
|
nsIFrame* aTransformRoot = nullptr) MOZ_OVERRIDE;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2011-09-25 14:04:32 -07:00
|
|
|
nsAutoPtr<gfxMatrix> mCanvasTM;
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|