Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(840)

Unified Diff: Source/core/dom/TreeScopeStyleSheetCollection.cpp

Issue 192293002: Use new is*Element() helper functions in DOM code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add is*Element(PassRefPtr) helper Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/TreeScopeStyleSheetCollection.cpp
diff --git a/Source/core/dom/TreeScopeStyleSheetCollection.cpp b/Source/core/dom/TreeScopeStyleSheetCollection.cpp
index 0f66be41ea3c24c0e41a30495d6fb1445e1ddd86..5932452135da28ae46d7ef45e862cbab27c96b12 100644
--- a/Source/core/dom/TreeScopeStyleSheetCollection.cpp
+++ b/Source/core/dom/TreeScopeStyleSheetCollection.cpp
@@ -59,10 +59,10 @@ void TreeScopeStyleSheetCollection::addStyleSheetCandidateNode(Node* node, bool
else
m_styleSheetCandidateNodes.add(node);
- if (!node->hasTagName(HTMLNames::styleTag))
+ if (!isHTMLStyleElement(*node))
return;
- ContainerNode* scopingNode = toHTMLStyleElement(node)->scopingNode();
+ ContainerNode* scopingNode = toHTMLStyleElement(*node).scopingNode();
if (!isTreeScopeRoot(scopingNode))
m_scopingNodesForStyleScoped.add(scopingNode);
}

Powered by Google App Engine
This is Rietveld 408576698