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

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: 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..12890f0f88db81058544eacca3abb0ede692adfd 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()->treeScope().rootNode().isShadowRoot())
dglazkov 2016/02/22 16:44:45 would ownerNode()->isInShadowTree() not work?
rune 2016/02/22 17:38:16 Done.
+ 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