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

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: Adds the check for user agent. 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..6de238b6a448a0ca2a98f6f224a74fd5acaafe1e 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() && ownerShadowHost()->userAgentShadowRoot()) || document().contentSecurityPolicy()->allowInlineStyle(document().url(), String(), startLineNumber, newStyleString)) {
tkent 2016/09/21 22:52:07 It doesn't work as expected if the element is in n
setInlineStyleFromString(newStyleString);
}

Powered by Google App Engine
This is Rietveld 408576698