Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 568012af0888ada190de7cf46dfac45cce2e6509
https://github.com/WebKit/WebKit/commit/568012af0888ada190de7cf46dfac45cce2e6509
Author: Yoav Weiss <[email protected]>
Date: 2025-12-15 (Mon, 15 Dec 2025)
Changed paths:
A
LayoutTests/http/wpt/prefetch/speculation-rules-eagerness-fallback.https-expected.txt
A
LayoutTests/http/wpt/prefetch/speculation-rules-eagerness-fallback.https.html
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/SpeculationRulesMatcher.cpp
M Source/WebCore/dom/SpeculationRulesMatcher.h
M Source/WebCore/html/HTMLAnchorElement.cpp
M Source/WebCore/html/HTMLAnchorElement.h
Log Message:
-----------
Speculation Rules - ensure eagerness properly falls back to "conservative"
https://bugs.webkit.org/show_bug.cgi?id=304177
Reviewed by Alex Christensen.
Our current implementation doesn't handle graceful fallbacks of eagerness
values we don't yet support.
This PR changes that by piping the eagerness values to the relevant logic, and
then considering everything that's not "immediate" to be "conservative".
Test: http/wpt/prefetch/speculation-rules-eagerness-fallback.https.html
*
LayoutTests/http/wpt/prefetch/speculation-rules-eagerness-fallback.https-expected.txt:
Added.
*
LayoutTests/http/wpt/prefetch/speculation-rules-eagerness-fallback.https.html:
Added.
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::processSpeculationRules): Pipe the eagerness value.
* Source/WebCore/dom/SpeculationRulesMatcher.cpp:
(WebCore::SpeculationRulesMatcher::hasMatchingRule): Pipe the eagerness value.
* Source/WebCore/dom/SpeculationRulesMatcher.h:
* Source/WebCore/html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::setShouldBePrefetched): Implement the fallback.
(WebCore::HTMLAnchorElement::checkForSpeculationRules): Pipe the eagerness
value.
* Source/WebCore/html/HTMLAnchorElement.h:
Canonical link: https://commits.webkit.org/304466@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications