2010-07-01 09:40:19 -07:00
|
|
|
|
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 __NS_SVGGEOMETRYFRAME_H__
|
|
|
|
#define __NS_SVGGEOMETRYFRAME_H__
|
|
|
|
|
2009-04-28 21:31:34 -07:00
|
|
|
#include "gfxMatrix.h"
|
2012-03-20 05:15:55 -07:00
|
|
|
#include "gfxTypes.h"
|
|
|
|
#include "nsFrame.h"
|
|
|
|
#include "nsIFrame.h"
|
|
|
|
#include "nsQueryFrame.h"
|
|
|
|
#include "nsRect.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
class gfxContext;
|
2012-03-20 05:15:55 -07:00
|
|
|
class nsIContent;
|
|
|
|
class nsStyleContext;
|
|
|
|
class nsSVGPaintServerFrame;
|
|
|
|
|
|
|
|
struct nsStyleSVGPaint;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
typedef nsFrame nsSVGGeometryFrameBase;
|
|
|
|
|
|
|
|
/* nsSVGGeometryFrame is a base class for SVG objects that directly
|
|
|
|
* have geometry (circle, ellipse, line, polyline, polygon, path, and
|
|
|
|
* glyph frames). It knows how to convert the style information into
|
|
|
|
* cairo context information and stores the fill/stroke paint
|
|
|
|
* servers. */
|
|
|
|
|
2008-09-30 17:51:05 -07:00
|
|
|
class nsSVGGeometryFrame : public nsSVGGeometryFrameBase
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
2007-07-17 01:40:28 -07:00
|
|
|
protected:
|
2009-09-12 09:49:24 -07:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS
|
|
|
|
|
2012-05-16 21:05:09 -07:00
|
|
|
nsSVGGeometryFrame(nsStyleContext *aContext)
|
|
|
|
: nsSVGGeometryFrameBase(aContext)
|
|
|
|
{
|
|
|
|
AddStateBits(NS_FRAME_SVG_LAYOUT);
|
|
|
|
}
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2007-07-17 01:40:28 -07:00
|
|
|
public:
|
2007-03-22 10:30:00 -07:00
|
|
|
// nsIFrame interface:
|
2013-03-19 18:47:48 -07:00
|
|
|
virtual void Init(nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
virtual bool IsFrameOfType(uint32_t aFlags) const
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
2010-07-01 09:40:19 -07:00
|
|
|
return nsSVGGeometryFrameBase::IsFrameOfType(aFlags & ~(nsIFrame::eSVG | nsIFrame::eSVGGeometry));
|
2007-03-22 10:30:00 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
// nsSVGGeometryFrame methods:
|
2012-08-22 08:56:38 -07:00
|
|
|
virtual gfxMatrix GetCanvasTM(uint32_t aFor) = 0;
|
|
|
|
uint16_t GetClipRule();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
protected:
|
2011-07-08 06:20:14 -07:00
|
|
|
/**
|
|
|
|
* This function returns a set of bit flags indicating which parts of the
|
|
|
|
* element (fill, stroke, bounds) should intercept pointer events. It takes
|
|
|
|
* into account the type of element and the value of the 'pointer-events'
|
|
|
|
* property on the element.
|
|
|
|
*/
|
2012-08-22 08:56:38 -07:00
|
|
|
virtual uint16_t GetHitTestFlags();
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __NS_SVGGEOMETRYFRAME_H__
|