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

Unified Diff: third_party/WebKit/Source/core/dom/StyleEngine.cpp

Issue 2177163002: Allow <link rel=stylesheet> in a connected shadow tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: split tests Created 4 years, 4 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: 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 f739839f9b39e6d90d334df236eb63c7d8c3ba62..28ddcdaeaa990bf9b36a96ea3fbbfb8aeec09132 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);

Powered by Google App Engine
This is Rietveld 408576698