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

Unified Diff: third_party/WebKit/Source/core/dom/StyleSheetCandidate.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/StyleSheetCandidate.cpp
diff --git a/third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp b/third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp
index e2f7b233e5925814a20eec219fe4a5e04889c29f..d1a15e49a39c50c834b1014a363b69cee214cdb8 100644
--- a/third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp
@@ -88,8 +88,12 @@ bool StyleSheetCandidate::canBeActivated(const String& currentPreferrableName) c
if (!sheet || sheet->disabled() || !sheet->isCSSStyleSheet())
return false;
- if (sheet->ownerNode() && sheet->ownerNode()->isInShadowTree())
- return true;
+ if (sheet->ownerNode() && sheet->ownerNode()->isInShadowTree()) {
+ if (isCSSStyle())
+ return true;
+ if (isHTMLLink() && !isImport())
+ return !isAlternate();
+ }
const AtomicString& title = this->title();
if (!isEnabledViaScript() && !title.isEmpty() && title != currentPreferrableName)
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleEngine.cpp ('k') | third_party/WebKit/Source/core/html/HTMLLinkElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698