Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: eaf67dd0d5354c37f1ddc45ccffeb82a25e34b38
      
https://github.com/WebKit/WebKit/commit/eaf67dd0d5354c37f1ddc45ccffeb82a25e34b38
  Author: Yoav Weiss <[email protected]>
  Date:   2025-12-11 (Thu, 11 Dec 2025)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/referrer-policy.https_4-last-expected.txt
    M Source/WebCore/dom/SpeculationRulesMatcher.cpp
    M Source/WebCore/loader/cache/CachedResourceLoader.cpp

  Log Message:
  -----------
  SpeculationRules - Anchor's referrerPolicy attribute to take precedence over 
the document's policy
https://bugs.webkit.org/show_bug.cgi?id=303979

Reviewed by Alex Christensen.

This PR fixes the issue by ensuring that the prefetch request gets the anchor's 
referrerPolicy value,
and ensuring that prefetched requests don't get overridden by the document's 
policy.

No new tests, but existing tests progress.

* 
LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/referrer-policy.https_4-last-expected.txt:
 Progression.
* Source/WebCore/dom/SpeculationRulesMatcher.cpp:
(WebCore::SpeculationRulesMatcher::hasMatchingRule): Set the Anchor's 
referrerPolicy on the request.
* Source/WebCore/loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::updateHTTPRequestHeaders): Avoid overriding the 
prefetched request's referrerPolicy.

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



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

Reply via email to