Changeset 286136 in webkit
- Timestamp:
- Nov 23, 2021 8:24:27 AM (8 months ago)
- Location:
- trunk
- Files:
-
- 18 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/TestExpectations (modified) (3 diffs)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/content-security-policy/script-src/javascript-window-open-blocked-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/content-security-policy/securitypolicyviolation/source-file-blob-scheme-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/content-security-policy/securitypolicyviolation/source-file-data-scheme-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/content-security-policy/securitypolicyviolation/style-sample-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/content-security-policy/securitypolicyviolation/style-sample-no-opt-in-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/bindings/js/JSEventListener.cpp (modified) (1 diff)
-
Source/WebCore/bindings/js/JSLazyEventListener.cpp (modified) (1 diff)
-
Source/WebCore/dom/Element.cpp (modified) (3 diffs)
-
Source/WebCore/dom/Element.h (modified) (2 diffs)
-
Source/WebCore/dom/InlineStyleSheetOwner.cpp (modified) (1 diff)
-
Source/WebCore/dom/ScriptElement.cpp (modified) (2 diffs)
-
Source/WebCore/dom/StyledElement.cpp (modified) (1 diff)
-
Source/WebCore/page/csp/ContentSecurityPolicy.cpp (modified) (8 diffs)
-
Source/WebCore/page/csp/ContentSecurityPolicy.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r286133 r286136 1 2021-11-23 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 CSP: security policy violation event is always using document as target 4 https://bugs.webkit.org/show_bug.cgi?id=233182 5 6 Reviewed by Kate Cheney. 7 8 Unskip tests that no longer time out. 9 10 * TestExpectations: 11 1 12 2021-11-23 Alan Bujtas <zalan@apple.com> 2 13 -
trunk/LayoutTests/TestExpectations
r286123 r286136 526 526 imported/w3c/web-platform-tests/content-security-policy/prefetch-src/prefetch-header-blocked-by-default.html [ Skip ] 527 527 imported/w3c/web-platform-tests/content-security-policy/reporting-api/report-to-directive-allowed-in-meta.https.sub.html [ Skip ] 528 imported/w3c/web-platform-tests/content-security-policy/securitypolicyviolation/source-file-blob-scheme.html [ Skip ]529 imported/w3c/web-platform-tests/content-security-policy/securitypolicyviolation/source-file-data-scheme.html [ Skip ]530 528 imported/w3c/web-platform-tests/cookies/domain/domain-attribute-host-with-and-without-leading-period.sub.https.html [ Skip ] 531 529 imported/w3c/web-platform-tests/cookies/domain/domain-attribute-host-with-leading-period.sub.https.html [ Skip ] … … 951 949 imported/w3c/web-platform-tests/content-security-policy/navigate-to/href-location-cross-origin-allowed.sub.html [ Skip ] 952 950 imported/w3c/web-platform-tests/content-security-policy/style-src/style-src-inline-style-nonce-blocked-error-event.html [ Skip ] 953 imported/w3c/web-platform-tests/content-security-policy/securitypolicyviolation/style-sample.html [ Skip ]954 imported/w3c/web-platform-tests/content-security-policy/securitypolicyviolation/style-sample-no-opt-in.html [ Skip ]955 951 imported/w3c/web-platform-tests/content-security-policy/securitypolicyviolation/inside-dedicated-worker.html [ Skip ] 956 952 imported/w3c/web-platform-tests/content-security-policy/securitypolicyviolation/img-src-redirect-upgrade-reporting.https.html [ Skip ] … … 981 977 imported/w3c/web-platform-tests/content-security-policy/navigate-to/unsafe-allow-redirects/blocked-end-of-chain.sub.html [ Skip ] 982 978 imported/w3c/web-platform-tests/content-security-policy/reporting-api/reporting-api-works-on-frame-src.https.sub.html [ Skip ] 983 imported/w3c/web-platform-tests/content-security-policy/script-src/javascript-window-open-blocked.html [ Skip ]984 979 imported/w3c/web-platform-tests/content-security-policy/securitypolicyviolation/script-sample-no-opt-in.html [ Skip ] 985 980 imported/w3c/web-platform-tests/content-security-policy/securitypolicyviolation/script-sample.html [ Skip ] -
trunk/LayoutTests/imported/w3c/ChangeLog
r286135 r286136 1 2021-11-23 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 CSP: security policy violation event is always using document as target 4 https://bugs.webkit.org/show_bug.cgi?id=233182 5 6 Reviewed by Kate Cheney. 7 8 Update test expectations. 9 10 * web-platform-tests/content-security-policy/script-src/javascript-window-open-blocked-expected.txt: 11 * web-platform-tests/content-security-policy/securitypolicyviolation/source-file-blob-scheme-expected.txt: 12 * web-platform-tests/content-security-policy/securitypolicyviolation/source-file-data-scheme-expected.txt: 13 * web-platform-tests/content-security-policy/securitypolicyviolation/style-sample-expected.txt: 14 * web-platform-tests/content-security-policy/securitypolicyviolation/style-sample-no-opt-in-expected.txt: 15 1 16 2021-11-23 Antti Koivisto <antti@apple.com> 2 17 -
trunk/LayoutTests/imported/w3c/web-platform-tests/content-security-policy/script-src/javascript-window-open-blocked-expected.txt
r283111 r286136 1 2 FAIL Check that a securitypolicyviolation event is fired assert_equals: expected "inline" but got ""3 1 2 PASS Check that a securitypolicyviolation event is fired 3 -
trunk/LayoutTests/imported/w3c/web-platform-tests/content-security-policy/securitypolicyviolation/source-file-blob-scheme-expected.txt
r279838 r286136 1 1 2 Harness Error (TIMEOUT), message = null 2 FAIL Violations from data:-URL scripts have a sourceFile of 'blob' assert_equals: expected 16 but got 21 3 3 4 TIMEOUT Violations from data:-URL scripts have a sourceFile of 'blob' Test timed out5 -
trunk/LayoutTests/imported/w3c/web-platform-tests/content-security-policy/securitypolicyviolation/source-file-data-scheme-expected.txt
r279838 r286136 1 1 2 Harness Error (TIMEOUT), message = null 2 FAIL Violations from data:-URL scripts have a sourceFile of 'data' assert_equals: expected 16 but got 21 3 3 4 TIMEOUT Violations from data:-URL scripts have a sourceFile of 'data' Test timed out5 -
trunk/LayoutTests/imported/w3c/web-platform-tests/content-security-policy/securitypolicyviolation/style-sample-expected.txt
r259900 r286136 1 CONSOLE MESSAGE: The source list for Content Security Policy directive 'style-src' contains an invalid source: ''report-sample''. It will be ignored.2 CONSOLE MESSAGE: Refused to apply a stylesheet because its hash, its nonce, or 'unsafe-inline' does not appear in the style-src directive of the Content Security Policy.3 CONSOLE MESSAGE: Refused to apply a stylesheet because its hash, its nonce, or 'unsafe-inline' does not appear in the style-src directive of the Content Security Policy.4 1 5 Harness Error (TIMEOUT), message = null 2 FAIL Inline style blocks should have a sample. assert_equals: expected "p { omg: yay !important; }" but got "" 3 FAIL Inline style attributes should have a sample. assert_equals: expected "omg: yay !important;" but got "" 6 4 7 TIMEOUT Inline style blocks should have a sample. Test timed out8 TIMEOUT Inline style attributes should have a sample. Test timed out9 -
trunk/LayoutTests/imported/w3c/web-platform-tests/content-security-policy/securitypolicyviolation/style-sample-no-opt-in-expected.txt
r259900 r286136 1 CONSOLE MESSAGE: Refused to apply a stylesheet because its hash, its nonce, or 'unsafe-inline' does not appear in the style-src directive of the Content Security Policy.2 CONSOLE MESSAGE: Refused to apply a stylesheet because its hash, its nonce, or 'unsafe-inline' does not appear in the style-src directive of the Content Security Policy.3 1 4 Harness Error (TIMEOUT), message = null 2 PASS Inline style blocks should not have a sample. 3 PASS Inline style attributes should not have a sample. 5 4 6 TIMEOUT Inline style blocks should not have a sample. Test timed out7 TIMEOUT Inline style attributes should not have a sample. Test timed out8 -
trunk/Source/WebCore/ChangeLog
r286135 r286136 1 2021-11-23 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 CSP: security policy violation event is always using document as target 4 https://bugs.webkit.org/show_bug.cgi?id=233182 5 6 Reviewed by Kate Cheney. 7 8 We should use the violation element instead if not null. 9 10 * bindings/js/JSEventListener.cpp: 11 (WebCore::JSEventListener::handleEvent): Pass element to allowInlineEventHandlers(). 12 * bindings/js/JSLazyEventListener.cpp: 13 (WebCore::JSLazyEventListener::initializeJSFunction const): Ditto. 14 * dom/Element.cpp: 15 (WebCore::Element::enqueueSecurityPolicyViolationEvent): Helper to queue securitypolicyviolationEvent for element. 16 * dom/Element.h: 17 * dom/InlineStyleSheetOwner.cpp: 18 (WebCore::InlineStyleSheetOwner::createSheet): Pass element to allowInlineStyle(). 19 * dom/ScriptElement.cpp: 20 (WebCore::ScriptElement::requestModuleScript): Pass element to allowInlineScript(). 21 (WebCore::ScriptElement::executeClassicScript): Ditto. 22 * dom/StyledElement.cpp: 23 (WebCore::StyledElement::styleAttributeChanged): Pass element to allowInlineStyle(). 24 * page/csp/ContentSecurityPolicy.cpp: 25 (WebCore::ContentSecurityPolicy::allowInlineEventHandlers const): Pass given element to reportViolation(). 26 (WebCore::ContentSecurityPolicy::allowInlineScript const): Ditto. 27 (WebCore::ContentSecurityPolicy::allowInlineStyle const): Ditto. 28 (WebCore::ContentSecurityPolicy::reportViolation const): Call Element::enqueueSecurityPolicyViolationEvent() if 29 element is not nullptr. 30 * page/csp/ContentSecurityPolicy.h: 31 1 32 2021-11-23 Antti Koivisto <antti@apple.com> 2 33 -
trunk/Source/WebCore/bindings/js/JSEventListener.cpp
r284067 r286136 127 127 if (!window->wrapped().isCurrentlyDisplayedInFrame()) 128 128 return; 129 if (wasCreatedFromMarkup() && !scriptExecutionContext.contentSecurityPolicy()->allowInlineEventHandlers(sourceURL().string(), sourcePosition().m_line, code())) 130 return; 129 if (wasCreatedFromMarkup()) { 130 Element* element = event.target()->isNode() && !downcast<Node>(*event.target()).isDocumentNode() && is<Element>(*event.target()) ? downcast<Element>(event.target()) : nullptr; 131 if (!scriptExecutionContext.contentSecurityPolicy()->allowInlineEventHandlers(sourceURL().string(), sourcePosition().m_line, code(), element)) 132 return; 133 } 131 134 // FIXME: Is this check needed for other contexts? 132 135 ScriptController& script = window->wrapped().frame()->script(); -
trunk/Source/WebCore/bindings/js/JSLazyEventListener.cpp
r284080 r286136 132 132 return nullptr; 133 133 134 if (!document.contentSecurityPolicy()->allowInlineEventHandlers(m_sourceURL.string(), m_sourcePosition.m_line, m_code)) 134 Element* element = m_originalNode && !m_originalNode->isDocumentNode() && is<Element>(*m_originalNode) ? downcast<Element>(m_originalNode.get()) : nullptr; 135 if (!document.contentSecurityPolicy()->allowInlineEventHandlers(m_sourceURL.string(), m_sourcePosition.m_line, m_code, element)) 135 136 return nullptr; 136 137 -
trunk/Source/WebCore/dom/Element.cpp
r286119 r286136 54 54 #include "EventDispatcher.h" 55 55 #include "EventHandler.h" 56 #include "EventLoop.h" 56 57 #include "EventNames.h" 57 58 #include "FocusController.h" … … 111 112 #include "ScrollIntoViewOptions.h" 112 113 #include "ScrollLatchingController.h" 114 #include "SecurityPolicyViolationEvent.h" 113 115 #include "SelectorQuery.h" 114 116 #include "Settings.h" … … 3199 3201 } 3200 3202 3203 void Element::enqueueSecurityPolicyViolationEvent(SecurityPolicyViolationEventInit&& eventInit) 3204 { 3205 document().eventLoop().queueTask(TaskSource::DOMManipulation, [this, protectedThis = Ref { *this }, event = SecurityPolicyViolationEvent::create(eventNames().securitypolicyviolationEvent, WTFMove(eventInit), Event::IsTrusted::Yes)] { 3206 dispatchEvent(event); 3207 }); 3208 } 3209 3201 3210 ExceptionOr<void> Element::mergeWithNextTextNode(Text& node) 3202 3211 { -
trunk/Source/WebCore/dom/Element.h
r286115 r286136 89 89 struct ScrollIntoViewOptions; 90 90 struct ScrollToOptions; 91 struct SecurityPolicyViolationEventInit; 91 92 struct ShadowRootInit; 92 93 … … 572 573 WEBCORE_EXPORT bool dispatchMouseForceWillBegin(); 573 574 575 void enqueueSecurityPolicyViolationEvent(SecurityPolicyViolationEventInit&&); 576 574 577 virtual void willRecalcStyle(Style::Change); 575 578 virtual void didRecalcStyle(Style::Change); -
trunk/Source/WebCore/dom/InlineStyleSheetOwner.cpp
r285478 r286136 170 170 const ContentSecurityPolicy& contentSecurityPolicy = *document.contentSecurityPolicy(); 171 171 bool hasKnownNonce = contentSecurityPolicy.allowStyleWithNonce(element.nonce(), element.isInUserAgentShadowTree()); 172 if (!contentSecurityPolicy.allowInlineStyle(document.url().string(), m_startTextPosition.m_line, text, CheckUnsafeHashes::No, hasKnownNonce))172 if (!contentSecurityPolicy.allowInlineStyle(document.url().string(), m_startTextPosition.m_line, text, CheckUnsafeHashes::No, element, hasKnownNonce)) 173 173 return; 174 174 -
trunk/Source/WebCore/dom/ScriptElement.cpp
r285478 r286136 378 378 const auto& contentSecurityPolicy = *m_element.document().contentSecurityPolicy(); 379 379 bool hasKnownNonce = contentSecurityPolicy.allowScriptWithNonce(nonce, m_element.isInUserAgentShadowTree()); 380 if (!contentSecurityPolicy.allowInlineScript(m_element.document().url().string(), m_startLineNumber, sourceCode.source(), hasKnownNonce))380 if (!contentSecurityPolicy.allowInlineScript(m_element.document().url().string(), m_startLineNumber, sourceCode.source(), m_element, hasKnownNonce)) 381 381 return false; 382 382 … … 402 402 403 403 bool hasKnownNonce = contentSecurityPolicy.allowScriptWithNonce(m_element.nonce(), m_element.isInUserAgentShadowTree()); 404 if (!contentSecurityPolicy.allowInlineScript(m_element.document().url().string(), m_startLineNumber, sourceCode.source(), hasKnownNonce))404 if (!contentSecurityPolicy.allowInlineScript(m_element.document().url().string(), m_startLineNumber, sourceCode.source(), m_element, hasKnownNonce)) 405 405 return; 406 406 } -
trunk/Source/WebCore/dom/StyledElement.cpp
r284857 r286136 207 207 startLineNumber = document().scriptableDocumentParser()->textPosition().m_line; 208 208 209 if (reason == ModifiedByCloning || document().contentSecurityPolicy()->allowInlineStyle(document().url().string(), startLineNumber, newStyleString.string(), CheckUnsafeHashes::Yes, isInUserAgentShadowTree()))209 if (reason == ModifiedByCloning || document().contentSecurityPolicy()->allowInlineStyle(document().url().string(), startLineNumber, newStyleString.string(), CheckUnsafeHashes::Yes, *this, isInUserAgentShadowTree())) 210 210 setInlineStyleFromString(newStyleString); 211 211 -
trunk/Source/WebCore/page/csp/ContentSecurityPolicy.cpp
r286094 r286136 417 417 } 418 418 419 bool ContentSecurityPolicy::allowInlineEventHandlers(const String& contextURL, const OrdinalNumber& contextLine, const String& source, bool overrideContentSecurityPolicy) const419 bool ContentSecurityPolicy::allowInlineEventHandlers(const String& contextURL, const OrdinalNumber& contextLine, const String& source, Element* element, bool overrideContentSecurityPolicy) const 420 420 { 421 421 if (overrideContentSecurityPolicy) … … 424 424 auto handleViolatedDirective = [&] (const ContentSecurityPolicyDirective& violatedDirective) { 425 425 String consoleMessage = consoleMessageForViolation(ContentSecurityPolicyDirectiveNames::scriptSrc, violatedDirective, URL(), "Refused to execute a script for an inline event handler", "'unsafe-inline'"); 426 reportViolation(ContentSecurityPolicyDirectiveNames::scriptSrc, violatedDirective, "inline"_s, consoleMessage, contextURL, TextPosition(contextLine, OrdinalNumber()) );426 reportViolation(ContentSecurityPolicyDirectiveNames::scriptSrc, violatedDirective, "inline"_s, consoleMessage, contextURL, TextPosition(contextLine, OrdinalNumber()), URL(), nullptr, element); 427 427 if (!didNotifyInspector && !violatedDirective.directiveList().isReportOnly()) { 428 428 reportBlockedScriptExecutionToInspector(violatedDirective.text()); … … 481 481 } 482 482 483 bool ContentSecurityPolicy::allowInlineScript(const String& contextURL, const OrdinalNumber& contextLine, StringView scriptContent, bool overrideContentSecurityPolicy) const483 bool ContentSecurityPolicy::allowInlineScript(const String& contextURL, const OrdinalNumber& contextLine, StringView scriptContent, Element& element, bool overrideContentSecurityPolicy) const 484 484 { 485 485 if (overrideContentSecurityPolicy || shouldPerformEarlyCSPCheck()) … … 488 488 auto handleViolatedDirective = [&] (const ContentSecurityPolicyDirective& violatedDirective) { 489 489 String consoleMessage = consoleMessageForViolation(ContentSecurityPolicyDirectiveNames::scriptSrc, violatedDirective, URL(), "Refused to execute a script", "its hash, its nonce, or 'unsafe-inline'"); 490 reportViolation(ContentSecurityPolicyDirectiveNames::scriptSrc, violatedDirective, "inline"_s, consoleMessage, contextURL, TextPosition(contextLine, OrdinalNumber()) );490 reportViolation(ContentSecurityPolicyDirectiveNames::scriptSrc, violatedDirective, "inline"_s, consoleMessage, contextURL, TextPosition(contextLine, OrdinalNumber()), URL(), nullptr, &element); 491 491 if (!didNotifyInspector && !violatedDirective.directiveList().isReportOnly()) { 492 492 reportBlockedScriptExecutionToInspector(violatedDirective.text()); … … 499 499 } 500 500 501 bool ContentSecurityPolicy::allowInlineStyle(const String& contextURL, const OrdinalNumber& contextLine, StringView styleContent, CheckUnsafeHashes shouldCheckUnsafeHashes, bool overrideContentSecurityPolicy) const501 bool ContentSecurityPolicy::allowInlineStyle(const String& contextURL, const OrdinalNumber& contextLine, StringView styleContent, CheckUnsafeHashes shouldCheckUnsafeHashes, Element& element, bool overrideContentSecurityPolicy) const 502 502 { 503 503 if (overrideContentSecurityPolicy) … … 508 508 auto name = shouldCheckUnsafeHashes == CheckUnsafeHashes::Yes ? ContentSecurityPolicyDirectiveNames::styleSrcAttr : ContentSecurityPolicyDirectiveNames::styleSrcElem; 509 509 String consoleMessage = consoleMessageForViolation(ContentSecurityPolicyDirectiveNames::styleSrc, violatedDirective, URL(), "Refused to apply a stylesheet", "its hash, its nonce, or 'unsafe-inline'"); 510 reportViolation(name, violatedDirective, "inline"_s, consoleMessage, contextURL, TextPosition(contextLine, OrdinalNumber()) );510 reportViolation(name, violatedDirective, "inline"_s, consoleMessage, contextURL, TextPosition(contextLine, OrdinalNumber()), URL(), nullptr, &element); 511 511 }; 512 512 … … 735 735 } 736 736 737 void ContentSecurityPolicy::reportViolation(const String& effectiveViolatedDirective, const ContentSecurityPolicyDirective& violatedDirective, const String& blockedURL, const String& consoleMessage, const String& sourceURL, const TextPosition& sourcePosition, const URL& preRedirectURL, JSC::JSGlobalObject* state ) const738 { 739 return reportViolation(effectiveViolatedDirective, violatedDirective.nameForReporting().convertToASCIILowercase(), violatedDirective.directiveList(), blockedURL, consoleMessage, sourceURL, sourcePosition, state, preRedirectURL );740 } 741 742 void ContentSecurityPolicy::reportViolation(const String& effectiveViolatedDirective, const String& violatedDirective, const ContentSecurityPolicyDirectiveList& violatedDirectiveList, const String& blockedURLString, const String& consoleMessage, const String& sourceURL, const TextPosition& sourcePosition, JSC::JSGlobalObject* state, const URL& preRedirectURL ) const737 void ContentSecurityPolicy::reportViolation(const String& effectiveViolatedDirective, const ContentSecurityPolicyDirective& violatedDirective, const String& blockedURL, const String& consoleMessage, const String& sourceURL, const TextPosition& sourcePosition, const URL& preRedirectURL, JSC::JSGlobalObject* state, Element* element) const 738 { 739 return reportViolation(effectiveViolatedDirective, violatedDirective.nameForReporting().convertToASCIILowercase(), violatedDirective.directiveList(), blockedURL, consoleMessage, sourceURL, sourcePosition, state, preRedirectURL, element); 740 } 741 742 void ContentSecurityPolicy::reportViolation(const String& effectiveViolatedDirective, const String& violatedDirective, const ContentSecurityPolicyDirectiveList& violatedDirectiveList, const String& blockedURLString, const String& consoleMessage, const String& sourceURL, const TextPosition& sourcePosition, JSC::JSGlobalObject* state, const URL& preRedirectURL, Element* element) const 743 743 { 744 744 logToConsole(consoleMessage, sourceURL, sourcePosition.m_line, sourcePosition.m_column, state); … … 805 805 if (m_client) 806 806 m_client->enqueueSecurityPolicyViolationEvent(WTFMove(violationEventInit)); 807 else 808 downcast<Document>(*m_scriptExecutionContext).enqueueSecurityPolicyViolationEvent(WTFMove(violationEventInit)); 807 else { 808 auto& document = downcast<Document>(*m_scriptExecutionContext); 809 if (element && element->document() == document) 810 element->enqueueSecurityPolicyViolationEvent(WTFMove(violationEventInit)); 811 else 812 document.enqueueSecurityPolicyViolationEvent(WTFMove(violationEventInit)); 813 } 809 814 810 815 // 2. Send violation report (if applicable). -
trunk/Source/WebCore/page/csp/ContentSecurityPolicy.h
r286094 r286136 52 52 class ContentSecurityPolicySource; 53 53 class DOMStringList; 54 class Element; 54 55 class Frame; 55 56 class JSWindowProxy; … … 96 97 97 98 bool allowJavaScriptURLs(const String& contextURL, const OrdinalNumber& contextLine, const String& code, bool overrideContentSecurityPolicy = false) const; 98 bool allowInlineEventHandlers(const String& contextURL, const OrdinalNumber& contextLine, const String& code, bool overrideContentSecurityPolicy = false) const;99 bool allowInlineScript(const String& contextURL, const OrdinalNumber& contextLine, StringView scriptContent, bool overrideContentSecurityPolicy = false) const;99 bool allowInlineEventHandlers(const String& contextURL, const OrdinalNumber& contextLine, const String& code, Element*, bool overrideContentSecurityPolicy = false) const; 100 bool allowInlineScript(const String& contextURL, const OrdinalNumber& contextLine, StringView scriptContent, Element&, bool overrideContentSecurityPolicy = false) const; 100 101 bool allowNonParserInsertedScripts(const URL&, const String&, const StringView&, ParserInserted) const; 101 bool allowInlineStyle(const String& contextURL, const OrdinalNumber& contextLine, StringView styleContent, CheckUnsafeHashes, bool overrideContentSecurityPolicy = false) const;102 bool allowInlineStyle(const String& contextURL, const OrdinalNumber& contextLine, StringView styleContent, CheckUnsafeHashes, Element&, bool overrideContentSecurityPolicy = false) const; 102 103 103 104 bool allowEval(JSC::JSGlobalObject*, LogToConsole, bool overrideContentSecurityPolicy = false) const; … … 223 224 void reportViolation(const String& effectiveViolatedDirective, const ContentSecurityPolicyDirective& violatedDirective, const String& blockedURL, const String& consoleMessage, JSC::JSGlobalObject*) const; 224 225 void reportViolation(const String& effectiveViolatedDirective, const String& violatedDirective, const ContentSecurityPolicyDirectiveList&, const String& blockedURL, const String& consoleMessage, JSC::JSGlobalObject* = nullptr) const; 225 void reportViolation(const String& effectiveViolatedDirective, const ContentSecurityPolicyDirective& violatedDirective, const String& blockedURL, const String& consoleMessage, const String& sourceURL, const TextPosition& sourcePosition, const URL& preRedirectURL = URL(), JSC::JSGlobalObject* = nullptr ) const;226 void reportViolation(const String& effectiveViolatedDirective, const String& violatedDirective, const ContentSecurityPolicyDirectiveList& violatedDirectiveList, const String& blockedURL, const String& consoleMessage, const String& sourceURL, const TextPosition& sourcePosition, JSC::JSGlobalObject*, const URL& preRedirectURL = URL() ) const;226 void reportViolation(const String& effectiveViolatedDirective, const ContentSecurityPolicyDirective& violatedDirective, const String& blockedURL, const String& consoleMessage, const String& sourceURL, const TextPosition& sourcePosition, const URL& preRedirectURL = URL(), JSC::JSGlobalObject* = nullptr, Element* = nullptr) const; 227 void reportViolation(const String& effectiveViolatedDirective, const String& violatedDirective, const ContentSecurityPolicyDirectiveList& violatedDirectiveList, const String& blockedURL, const String& consoleMessage, const String& sourceURL, const TextPosition& sourcePosition, JSC::JSGlobalObject*, const URL& preRedirectURL = URL(), Element* = nullptr) const; 227 228 void reportBlockedScriptExecutionToInspector(const String& directiveText) const; 228 229
Note: See TracChangeset
for help on using the changeset viewer.