Index: Source/core/rendering/svg/ReferenceFilterBuilder.cpp |
diff --git a/Source/core/rendering/svg/ReferenceFilterBuilder.cpp b/Source/core/rendering/svg/ReferenceFilterBuilder.cpp |
index 784d43978233b8b09da544ee642feb652251b9e9..f135c1a3aa49ae5728251445bf98a5f2809315f7 100644 |
--- a/Source/core/rendering/svg/ReferenceFilterBuilder.cpp |
+++ b/Source/core/rendering/svg/ReferenceFilterBuilder.cpp |
@@ -134,10 +134,10 @@ PassRefPtr<FilterEffect> ReferenceFilterBuilder::build(Filter* parentFilter, Ren |
return nullptr; |
} |
- if (!filter->isSVGElement() || !filter->hasTagName(SVGNames::filterTag)) |
+ if (!isSVGFilterElement(*filter)) |
return nullptr; |
- SVGFilterElement* filterElement = toSVGFilterElement(toSVGElement(filter)); |
+ SVGFilterElement& filterElement = toSVGFilterElement(*filter); |
// FIXME: Figure out what to do with SourceAlpha. Right now, we're |
// using the alpha of the original input layer, which is obviously |
@@ -147,9 +147,9 @@ PassRefPtr<FilterEffect> ReferenceFilterBuilder::build(Filter* parentFilter, Ren |
RefPtr<SVGFilterBuilder> builder = SVGFilterBuilder::create(previousEffect, SourceAlpha::create(parentFilter)); |
ColorSpace filterColorSpace = ColorSpaceDeviceRGB; |
- bool useFilterColorSpace = getSVGElementColorSpace(filterElement, filterColorSpace); |
+ bool useFilterColorSpace = getSVGElementColorSpace(&filterElement, filterColorSpace); |
- for (SVGElement* element = Traversal<SVGElement>::firstChild(*filterElement); element; element = Traversal<SVGElement>::nextSibling(*element)) { |
+ for (SVGElement* element = Traversal<SVGElement>::firstChild(filterElement); element; element = Traversal<SVGElement>::nextSibling(*element)) { |
if (!element->isFilterEffect()) |
continue; |
@@ -160,7 +160,7 @@ PassRefPtr<FilterEffect> ReferenceFilterBuilder::build(Filter* parentFilter, Ren |
continue; |
effectElement->setStandardAttributes(effect.get()); |
- effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilterPrimitiveStandardAttributes>(effectElement, filterElement->primitiveUnits()->currentValue()->enumValue(), parentFilter->sourceImageRect())); |
+ effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilterPrimitiveStandardAttributes>(effectElement, filterElement.primitiveUnits()->currentValue()->enumValue(), parentFilter->sourceImageRect())); |
ColorSpace colorSpace = filterColorSpace; |
if (useFilterColorSpace || getSVGElementColorSpace(effectElement, colorSpace)) |
effect->setOperatingColorSpace(colorSpace); |