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

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

Issue 2421473004: CSP: Fire 'SecurityPolicyViolation' on the offending element. (Closed)
Patch Set: Test. Created 4 years, 2 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/StyleElement.cpp
diff --git a/third_party/WebKit/Source/core/dom/StyleElement.cpp b/third_party/WebKit/Source/core/dom/StyleElement.cpp
index 73944d9a531521f2fc655b693a12e827e48f8790..323e76df7d012433b542f64d2deb559894191198 100644
--- a/third_party/WebKit/Source/core/dom/StyleElement.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleElement.cpp
@@ -159,7 +159,7 @@ StyleElement::ProcessingResult StyleElement::createSheet(Element& element,
bool passesContentSecurityPolicyChecks =
shouldBypassMainWorldCSP(element) ||
csp->allowStyleWithHash(text, ContentSecurityPolicy::InlineType::Block) ||
- csp->allowInlineStyle(document.url(),
+ csp->allowInlineStyle(&element, document.url(),
element.fastGetAttribute(HTMLNames::nonceAttr),
m_startPosition.m_line, text);

Powered by Google App Engine
This is Rietveld 408576698