Index: Source/core/dom/Node.cpp |
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp |
index 1671ca9b37c28770438f50fe740663bdc7048343..0623975c6ac9cafdefc013ea77129692341cf520 100644 |
--- a/Source/core/dom/Node.cpp |
+++ b/Source/core/dom/Node.cpp |
@@ -2471,9 +2471,9 @@ void Node::unregisterScopedHTMLStyleChild() |
size_t Node::numberOfScopedHTMLStyleChildren() const |
{ |
size_t count = 0; |
- for (Node* child = firstChild(); child; child = child->nextSibling()) { |
+ for (Element* child = ElementTraversal::firstWithin(*this); child; child = ElementTraversal::nextSibling(*child)) { |
if (child->hasTagName(HTMLNames::styleTag) && toHTMLStyleElement(child)->isRegisteredAsScoped()) |
- count++; |
+ ++count; |
} |
return count; |