Index: Source/core/rendering/svg/RenderSVGResourceFilter.cpp |
diff --git a/Source/core/rendering/svg/RenderSVGResourceFilter.cpp b/Source/core/rendering/svg/RenderSVGResourceFilter.cpp |
index 08bb8961d74919299d3be89b3fa2195afe2d950a..5833f04ba47ec50d80cb8e57fb011e0bf6cebecd 100644 |
--- a/Source/core/rendering/svg/RenderSVGResourceFilter.cpp |
+++ b/Source/core/rendering/svg/RenderSVGResourceFilter.cpp |
@@ -83,11 +83,11 @@ PassRefPtr<SVGFilterBuilder> RenderSVGResourceFilter::buildPrimitives(SVGFilter* |
// Add effects to the builder |
RefPtr<SVGFilterBuilder> builder = SVGFilterBuilder::create(SourceGraphic::create(filter), SourceAlpha::create(filter)); |
- for (Node* node = filterElement->firstChild(); node; node = node->nextSibling()) { |
- if (!node->isSVGElement()) |
+ for (Element* child = ElementTraversal::firstWithin(*filterElement); child; child = ElementTraversal::nextSibling(*child)) { |
+ if (!child->isSVGElement()) |
continue; |
- SVGElement* element = toSVGElement(node); |
+ SVGElement* element = toSVGElement(child); |
if (!element->isFilterEffect() || !element->renderer()) |
continue; |