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

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

Issue 1717303002: Ignore title attribute for style elements in shadow trees. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use isInShadowTree Created 4 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/ShadowTreeStyleSheetCollection.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3dc0e62a4dd77e6f736a51f031f6e74255e18372..1ac86d88710a704ea6684139e02b5c9ef3f5daef 100644
--- a/third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp
@@ -93,6 +93,10 @@ bool StyleSheetCandidate::canBeActivated(const String& currentPreferrableName) c
StyleSheet* sheet = this->sheet();
if (!sheet || sheet->disabled() || !sheet->isCSSStyleSheet())
return false;
+
+ if (sheet->ownerNode() && sheet->ownerNode()->isInShadowTree())
+ return true;
+
const AtomicString& title = this->title();
if (!isEnabledViaScript() && !title.isEmpty() && title != currentPreferrableName)
return false;
« no previous file with comments | « third_party/WebKit/Source/core/dom/ShadowTreeStyleSheetCollection.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698