Index: Source/core/css/StyleInvalidationAnalysis.cpp |
diff --git a/Source/core/css/StyleInvalidationAnalysis.cpp b/Source/core/css/StyleInvalidationAnalysis.cpp |
index b8c2d0661024e33ab87cbfe1f36d1e1916e73dc9..e399031c53404db6e1c6c6c0a23af4ad87f46294 100644 |
--- a/Source/core/css/StyleInvalidationAnalysis.cpp |
+++ b/Source/core/css/StyleInvalidationAnalysis.cpp |
@@ -157,7 +157,7 @@ void StyleInvalidationAnalysis::analyzeStyleSheet(StyleSheetContents* styleSheet |
} |
if (styleSheetContents->hasSingleOwnerNode()) { |
Node* ownerNode = styleSheetContents->singleOwnerNode(); |
- if (ownerNode && ownerNode->hasTagName(HTMLNames::styleTag) && toHTMLStyleElement(ownerNode)->isRegisteredAsScoped()) { |
+ if (isHTMLStyleElement(ownerNode) && toHTMLStyleElement(*ownerNode).isRegisteredAsScoped()) { |
m_scopingNodes.append(determineScopingNodeForStyleScoped(toHTMLStyleElement(ownerNode), styleSheetContents)); |
return; |
} |