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

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

Issue 2359813002: Allows inline style in User-Agent shadow trees under CSP (Closed)
Patch Set: Better test Created 4 years, 3 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/Element.cpp
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
index c3a1e143cca4358eb8619f5b7f574d4ce9154ec1..781788606e331a4f798ba6c39e75913c8cd7b3e6 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -3618,7 +3618,7 @@ void Element::styleAttributeChanged(const AtomicString& newStyleString, Attribut
if (newStyleString.isNull()) {
ensureUniqueElementData().m_inlineStyle.clear();
- } else if (modificationReason == ModifiedByCloning || ContentSecurityPolicy::shouldBypassMainWorld(&document()) || document().contentSecurityPolicy()->allowInlineStyle(document().url(), String(), startLineNumber, newStyleString)) {
+ } else if (modificationReason == ModifiedByCloning || ContentSecurityPolicy::shouldBypassMainWorld(&document()) || ownerShadowHost() || document().contentSecurityPolicy()->allowInlineStyle(document().url(), String(), startLineNumber, newStyleString)) {
dtapuska 2016/09/21 17:05:52 Doesn't this allow all shadow dom trees? I think
setInlineStyleFromString(newStyleString);
}

Powered by Google App Engine
This is Rietveld 408576698