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

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

Issue 2020223002: Refactor nonce support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@inline
Patch Set: Rebase. Created 4 years, 6 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 269d5048f0d04d18b9afb8ec0efc4db4bf7d675f..8346091bdad678adb8b6d0fd9e9e3d1c0159a647 100644
--- a/third_party/WebKit/Source/core/dom/StyleElement.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleElement.cpp
@@ -175,8 +175,7 @@ StyleElement::ProcessingResult StyleElement::createSheet(Element* e, const Strin
const ContentSecurityPolicy* csp = document.contentSecurityPolicy();
bool passesContentSecurityPolicyChecks = shouldBypassMainWorldCSP(e)
|| csp->allowStyleWithHash(text, ContentSecurityPolicy::InlineType::Block)
- || csp->allowStyleWithNonce(e->fastGetAttribute(HTMLNames::nonceAttr))
- || csp->allowInlineStyle(e->document().url(), m_startPosition.m_line, text);
+ || csp->allowInlineStyle(e->document().url(), e->fastGetAttribute(HTMLNames::nonceAttr), m_startPosition.m_line, text);
// Clearing the current sheet may remove the cache entry so create the new sheet first
CSSStyleSheet* newSheet = nullptr;
« no previous file with comments | « third_party/WebKit/Source/core/dom/ScriptLoader.cpp ('k') | third_party/WebKit/Source/core/fetch/FetchRequest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698