Const-ify static s_resourceType members in RenderSVGResouce* classes

This is a merge of http://trac.webkit.org/changeset/175117 by zandobersek@gmail.com

BUG=425730

Review URL: https://codereview.chromium.org/694283002

git-svn-id: svn://svn.chromium.org/blink/trunk@184819 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent cc9ce96f
......@@ -41,8 +41,6 @@
namespace blink {
const RenderSVGResourceType RenderSVGResourceClipper::s_resourceType = ClipperResourceType;
RenderSVGResourceClipper::RenderSVGResourceClipper(SVGClipPathElement* node)
: RenderSVGResourceContainer(node)
, m_inClipExpansion(false)
......
......@@ -56,13 +56,13 @@ public:
FloatRect resourceBoundingBox(const RenderObject*);
static const RenderSVGResourceType s_resourceType = ClipperResourceType;
virtual RenderSVGResourceType resourceType() const override { return s_resourceType; }
bool hitTestClipContent(const FloatRect&, const FloatPoint&);
SVGUnitTypes::SVGUnitType clipPathUnits() const { return toSVGClipPathElement(element())->clipPathUnits()->currentValue()->enumValue(); }
static const RenderSVGResourceType s_resourceType;
private:
bool tryPathOnlyClipping(GraphicsContext*, const AffineTransform&, const FloatRect&);
void drawClipMaskContent(GraphicsContext*, const FloatRect& targetBoundingBox);
......
......@@ -33,8 +33,6 @@
namespace blink {
const RenderSVGResourceType RenderSVGResourceFilter::s_resourceType = FilterResourceType;
RenderSVGResourceFilter::RenderSVGResourceFilter(SVGFilterElement* node)
: RenderSVGResourceContainer(node)
{
......
......@@ -76,8 +76,8 @@ public:
void primitiveAttributeChanged(RenderObject*, const QualifiedName&);
static const RenderSVGResourceType s_resourceType = FilterResourceType;
virtual RenderSVGResourceType resourceType() const override { return s_resourceType; }
static const RenderSVGResourceType s_resourceType;
FloatRect drawingRegion(RenderObject*) const;
private:
......
......@@ -26,8 +26,6 @@
namespace blink {
const RenderSVGResourceType RenderSVGResourceLinearGradient::s_resourceType = LinearGradientResourceType;
RenderSVGResourceLinearGradient::RenderSVGResourceLinearGradient(SVGLinearGradientElement* node)
: RenderSVGResourceGradient(node)
{
......
......@@ -35,8 +35,8 @@ public:
virtual const char* renderName() const override { return "RenderSVGResourceLinearGradient"; }
static const RenderSVGResourceType s_resourceType = LinearGradientResourceType;
virtual RenderSVGResourceType resourceType() const override { return s_resourceType; }
static const RenderSVGResourceType s_resourceType;
virtual SVGUnitTypes::SVGUnitType gradientUnits() const override { return m_attributes.gradientUnits(); }
virtual void calculateGradientTransform(AffineTransform& transform) override { transform = m_attributes.gradientTransform(); }
......
......@@ -28,8 +28,6 @@
namespace blink {
const RenderSVGResourceType RenderSVGResourceMarker::s_resourceType = MarkerResourceType;
RenderSVGResourceMarker::RenderSVGResourceMarker(SVGMarkerElement* node)
: RenderSVGResourceContainer(node)
{
......
......@@ -56,8 +56,8 @@ public:
const FloatRect& viewport() const { return m_viewport; }
static const RenderSVGResourceType s_resourceType = MarkerResourceType;
virtual RenderSVGResourceType resourceType() const override { return s_resourceType; }
static const RenderSVGResourceType s_resourceType;
private:
// Generates a transformation matrix usable to render marker content. Handles scaling the marker content
......
......@@ -29,8 +29,6 @@
namespace blink {
const RenderSVGResourceType RenderSVGResourceMasker::s_resourceType = MaskerResourceType;
RenderSVGResourceMasker::RenderSVGResourceMasker(SVGMaskElement* node)
: RenderSVGResourceContainer(node)
{
......
......@@ -53,8 +53,8 @@ public:
SVGUnitTypes::SVGUnitType maskUnits() const { return toSVGMaskElement(element())->maskUnits()->currentValue()->enumValue(); }
SVGUnitTypes::SVGUnitType maskContentUnits() const { return toSVGMaskElement(element())->maskContentUnits()->currentValue()->enumValue(); }
static const RenderSVGResourceType s_resourceType = MaskerResourceType;
virtual RenderSVGResourceType resourceType() const override { return s_resourceType; }
static const RenderSVGResourceType s_resourceType;
private:
void calculateMaskContentPaintInvalidationRect();
......
......@@ -38,8 +38,6 @@ public:
AffineTransform transform;
};
const RenderSVGResourceType RenderSVGResourcePattern::s_resourceType = PatternResourceType;
RenderSVGResourcePattern::RenderSVGResourcePattern(SVGPatternElement* node)
: RenderSVGResourcePaintServer(node)
, m_shouldCollectPatternAttributes(true)
......
......@@ -48,8 +48,8 @@ public:
virtual SVGPaintServer preparePaintServer(const RenderObject&) override;
static const RenderSVGResourceType s_resourceType = PatternResourceType;
virtual RenderSVGResourceType resourceType() const override { return s_resourceType; }
static const RenderSVGResourceType s_resourceType;
private:
PassOwnPtr<PatternData> buildPatternData(const RenderObject&);
......
......@@ -27,8 +27,6 @@
namespace blink {
const RenderSVGResourceType RenderSVGResourceRadialGradient::s_resourceType = RadialGradientResourceType;
RenderSVGResourceRadialGradient::RenderSVGResourceRadialGradient(SVGRadialGradientElement* node)
: RenderSVGResourceGradient(node)
{
......
......@@ -35,8 +35,8 @@ public:
virtual const char* renderName() const override { return "RenderSVGResourceRadialGradient"; }
static const RenderSVGResourceType s_resourceType = RadialGradientResourceType;
virtual RenderSVGResourceType resourceType() const override { return s_resourceType; }
static const RenderSVGResourceType s_resourceType;
virtual SVGUnitTypes::SVGUnitType gradientUnits() const override { return m_attributes.gradientUnits(); }
virtual void calculateGradientTransform(AffineTransform& transform) override { transform = m_attributes.gradientTransform(); }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment