[webkit-changes] [WebKit/WebKit] c28bce: Implement the `require-trusted-types-for` pre-navi...

Luke Warlow noreply at github.com
Tue Mar 5 05:10:19 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c28bce0ecd22a5a41b3b0f9c8958be13880e5f64
      https://github.com/WebKit/WebKit/commit/c28bce0ecd22a5a41b3b0f9c8958be13880e5f64
  Author: Luke Warlow <lwarlow at igalia.com>
  Date:   2024-03-05 (Tue, 05 Mar 2024)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/trusted-types/support/navigation-report-only-support.html
    M LayoutTests/imported/w3c/web-platform-tests/trusted-types/support/navigation-support.html
    M LayoutTests/imported/w3c/web-platform-tests/trusted-types/trusted-types-navigation-expected.txt
    M Source/WebCore/bindings/js/ScriptController.cpp
    M Source/WebCore/dom/TrustedType.cpp
    M Source/WebCore/dom/TrustedType.h

  Log Message:
  -----------
  Implement the `require-trusted-types-for` pre-navigation check
https://bugs.webkit.org/show_bug.cgi?id=267695

Reviewed by Youenn Fablet.

When the 'require-trusted-types-for' CSP directive is present javascript URLs are now passed through a default policy
or rejected if one doesn't exist.

Spec: https://w3c.github.io/trusted-types/dist/spec/#require-trusted-types-for-pre-navigation-check

* LayoutTests/imported/w3c/web-platform-tests/trusted-types/support/navigation-report-only-support.html:
* LayoutTests/imported/w3c/web-platform-tests/trusted-types/support/navigation-support.html:
* LayoutTests/imported/w3c/web-platform-tests/trusted-types/trusted-types-navigation-expected.txt:
* Source/WebCore/bindings/js/ScriptController.cpp:
(WebCore::ScriptController::executeJavaScriptURL):
* Source/WebCore/dom/TrustedType.cpp:
(WebCore::requireTrustedTypesForPreNavigationCheckPasses):
* Source/WebCore/dom/TrustedType.h:

Canonical link: https://commits.webkit.org/275687@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list