Index: third_party/WebKit/Source/core/dom/StyleEngine.cpp |
diff --git a/third_party/WebKit/Source/core/dom/StyleEngine.cpp b/third_party/WebKit/Source/core/dom/StyleEngine.cpp |
index f601b79e16e7396e7a76ba240211c21fa8863a9b..fdc4487850acbeeffa9fa270373aa76ecaff96d1 100644 |
--- a/third_party/WebKit/Source/core/dom/StyleEngine.cpp |
+++ b/third_party/WebKit/Source/core/dom/StyleEngine.cpp |
@@ -191,8 +191,8 @@ void StyleEngine::addStyleSheetCandidateNode(Node* node) |
if (!node->isConnected() || document().isDetached()) |
return; |
- TreeScope& treeScope = isStyleElement(*node) ? node->treeScope() : *m_document; |
DCHECK(!isXSLStyleSheet(*node)); |
+ TreeScope& treeScope = node->treeScope(); |
TreeScopeStyleSheetCollection* collection = ensureStyleSheetCollectionFor(treeScope); |
DCHECK(collection); |
collection->addStyleSheetCandidateNode(node); |