| Index: Source/core/dom/StyleElement.cpp
|
| diff --git a/Source/core/dom/StyleElement.cpp b/Source/core/dom/StyleElement.cpp
|
| index cc7378d4983ffc4801bf41a850252f663b3b18fc..e875a9f159258b3e46f8745e3340bda4ce14c4ca 100644
|
| --- a/Source/core/dom/StyleElement.cpp
|
| +++ b/Source/core/dom/StyleElement.cpp
|
| @@ -153,6 +153,10 @@ void StyleElement::createSheet(Element* e, const String& text)
|
| // CSP just as an inline script would.
|
| LocalFrame* frame = document.frame();
|
| bool shouldBypassMainWorldCSP = frame && frame->script().shouldBypassMainWorldCSP();
|
| + if (!shouldBypassMainWorldCSP && !m_whitelistedSource.isNull()) {
|
| + RELEASE_ASSERT(m_whitelistedSource == text);
|
| + shouldBypassMainWorldCSP = true;
|
| + }
|
|
|
| const ContentSecurityPolicy* csp = document.contentSecurityPolicy();
|
| bool passesContentSecurityPolicyChecks = shouldBypassMainWorldCSP
|
|
|