Index: Source/core/rendering/svg/ReferenceFilterBuilder.cpp |
diff --git a/Source/core/rendering/svg/ReferenceFilterBuilder.cpp b/Source/core/rendering/svg/ReferenceFilterBuilder.cpp |
index 4dca2dd72e0bdd427b8343112571fc418b99f3d0..e00f79d8772e6dc10e190bc413184dd9d89e9f7e 100644 |
--- a/Source/core/rendering/svg/ReferenceFilterBuilder.cpp |
+++ b/Source/core/rendering/svg/ReferenceFilterBuilder.cpp |
@@ -149,11 +149,11 @@ PassRefPtr<FilterEffect> ReferenceFilterBuilder::build(Filter* parentFilter, Ren |
ColorSpace filterColorSpace = ColorSpaceDeviceRGB; |
bool useFilterColorSpace = getSVGElementColorSpace(filterElement, filterColorSpace); |
- 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()) |
continue; |