Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 59c1484d0d9e3130ce0decbb5b56747a029a0dcd
      
https://github.com/WebKit/WebKit/commit/59c1484d0d9e3130ce0decbb5b56747a029a0dcd
  Author: Yoav Weiss <[email protected]>
  Date:   2026-01-15 (Thu, 15 Jan 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/integrity-policy/preload-script-with-integrity.https-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/integrity-policy/preload-script-with-integrity.https.html
    A 
LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/integrity-policy/resources/page-with-integrity-script.html
    M Source/WebCore/html/parser/HTMLPreloadScanner.cpp
    M Source/WebCore/html/parser/HTMLResourcePreloader.cpp
    M Source/WebCore/html/parser/HTMLResourcePreloader.h

  Log Message:
  -----------
  Ensure that the preload scanner includes integrity metadata in requests.
https://bugs.webkit.org/show_bug.cgi?id=305461

Reviewed by Ryosuke Niwa.

The reported bug exposed that the preload scanner doesn't currently set the 
correct integrity metadata, resulting in sent reports.
This PR fixes that by setting the right metadata and adding a test for that.

Test: 
imported/w3c/web-platform-tests/subresource-integrity/integrity-policy/preload-script-with-integrity.https.html

* 
LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/integrity-policy/preload-script-with-integrity.https-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/integrity-policy/preload-script-with-integrity.https.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/integrity-policy/resources/page-with-integrity-script.html:
 Added.
* Source/WebCore/html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest): Set 
integrity on request.
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): Set 
integrity on request.
* Source/WebCore/html/parser/HTMLResourcePreloader.cpp:
(WebCore::PreloadRequest::resourceRequest): Set integrity on request.
* Source/WebCore/html/parser/HTMLResourcePreloader.h:
(WebCore::PreloadRequest::setIntegrity): Set integrity on request.

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



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

Reply via email to