Index: Source/core/dom/Node.cpp |
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp |
index 9164f891963939eb80c5b5ddbcd7c15e89b8656a..70ef7b6501e855d91e9e7893204154ad5d751263 100644 |
--- a/Source/core/dom/Node.cpp |
+++ b/Source/core/dom/Node.cpp |
@@ -2440,8 +2440,8 @@ void Node::unregisterScopedHTMLStyleChild() |
size_t Node::numberOfScopedHTMLStyleChildren() const |
{ |
size_t count = 0; |
- for (Element* child = ElementTraversal::firstWithin(*this); child; child = ElementTraversal::nextSibling(*child)) { |
- if (child->hasTagName(HTMLNames::styleTag) && toHTMLStyleElement(child)->isRegisteredAsScoped()) |
+ for (HTMLStyleElement* style = Traversal<HTMLStyleElement>::firstChild(*this); style; style = Traversal<HTMLStyleElement>::nextSibling(*style)) { |
+ if (style->isRegisteredAsScoped()) |
++count; |
} |