Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 11f4ab9a5edd429ea3a381152a14ff35fda5c283
https://github.com/WebKit/WebKit/commit/11f4ab9a5edd429ea3a381152a14ff35fda5c283
Author: Yoav Weiss <[email protected]>
Date: 2025-11-05 (Wed, 05 Nov 2025)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/speculation-rules/inline-speculation-rules-errors-expected.txt
M Source/WebCore/dom/ScriptElement.cpp
M Source/WebCore/loader/SpeculationRules.cpp
Log Message:
-----------
Speculation Rules - fire error events when rules are invalid
https://bugs.webkit.org/show_bug.cgi?id=300622
Reviewed by Alex Christensen.
When invalid speculation rules are encountered, this PR triggers an error event
on the speculation rules script element, as well as a global one.
This aligns the implementation with the spec, and gets the relevant test to
pass.
No new tests, but an existing test expectation is fixed.
*
LayoutTests/imported/w3c/web-platform-tests/speculation-rules/inline-speculation-rules-errors-expected.txt:
Progression.
* Source/WebCore/dom/ScriptElement.cpp:
(WebCore::reportSpeculationRulesError):
https://html.spec.whatwg.org/multipage/webappapis.html#report-an-exception
(WebCore::ScriptElement::registerSpeculationRules): Report errors if
registration failed.
* Source/WebCore/loader/SpeculationRules.cpp:
(WebCore::SpeculationRules::parseSpeculationRules):
Canonical link: https://commits.webkit.org/302629@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications