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

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: update Created 4 years, 5 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 2ffe72b632cb27050fec4286cc4342278e7971e8..c5335b0e526a072c5e5e452d38a894ecaf2bd856 100644
--- a/third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp
@@ -88,8 +88,10 @@ 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() || (isHTMLLink() && !isImport() && !isAlternate()))
+ return true;
+ }
rune 2016/08/01 09:22:15 I think I would be leaning towards a behavior wher
const AtomicString& title = this->title();
if (!isEnabledViaScript() && !title.isEmpty() && title != currentPreferrableName)

Powered by Google App Engine
This is Rietveld 408576698