Index: Source/core/rendering/svg/RenderSVGResourceMasker.cpp |
diff --git a/Source/core/rendering/svg/RenderSVGResourceMasker.cpp b/Source/core/rendering/svg/RenderSVGResourceMasker.cpp |
index 85a57755ae884afe1fbdf7787c6c12e5ec2209be..2c921e0806f2c51a1c6f7610ffd47717ab894aab 100644 |
--- a/Source/core/rendering/svg/RenderSVGResourceMasker.cpp |
+++ b/Source/core/rendering/svg/RenderSVGResourceMasker.cpp |
@@ -137,9 +137,9 @@ PassRefPtr<DisplayList> RenderSVGResourceMasker::asDisplayList(GraphicsContext* |
// with local clips/mask, which may yield incorrect results when mixing objectBoundingBox and |
// userSpaceOnUse units (http://crbug.com/294900). |
context->beginRecording(strokeBoundingBox()); |
- for (Node* childNode = element()->firstChild(); childNode; childNode = childNode->nextSibling()) { |
- RenderObject* renderer = childNode->renderer(); |
- if (!childNode->isSVGElement() || !renderer) |
+ for (Element* childElement = ElementTraversal::firstWithin(*element()); childElement; childElement = ElementTraversal::nextSibling(*childElement)) { |
+ RenderObject* renderer = childElement->renderer(); |
+ if (!childElement->isSVGElement() || !renderer) |
continue; |
RenderStyle* style = renderer->style(); |
if (!style || style->display() == NONE || style->visibility() != VISIBLE) |
@@ -153,9 +153,9 @@ PassRefPtr<DisplayList> RenderSVGResourceMasker::asDisplayList(GraphicsContext* |
void RenderSVGResourceMasker::calculateMaskContentRepaintRect() |
{ |
- for (Node* childNode = element()->firstChild(); childNode; childNode = childNode->nextSibling()) { |
- RenderObject* renderer = childNode->renderer(); |
- if (!childNode->isSVGElement() || !renderer) |
+ for (Element* childElement = ElementTraversal::firstWithin(*element()); childElement; childElement = ElementTraversal::nextSibling(*childElement)) { |
+ RenderObject* renderer = childElement->renderer(); |
+ if (!childElement->isSVGElement() || !renderer) |
continue; |
RenderStyle* style = renderer->style(); |
if (!style || style->display() == NONE || style->visibility() != VISIBLE) |