Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f92d19110cc338ec402b1335935f59acaf2f005d
https://github.com/WebKit/WebKit/commit/f92d19110cc338ec402b1335935f59acaf2f005d
Author: Ahmad Saleem <[email protected]>
Date: 2026-04-22 (Wed, 22 Apr 2026)
Changed paths:
M LayoutTests/TestExpectations
M
LayoutTests/imported/w3c/web-platform-tests/html/syntax/speculative-parsing/generated/document-write/link-rel-stylesheet-disabled.tentative.sub-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/html/syntax/speculative-parsing/generated/document-write/link-rel-stylesheet-disabled.tentative.sub.html
M
LayoutTests/imported/w3c/web-platform-tests/html/syntax/speculative-parsing/generated/page-load/link-rel-stylesheet-disabled.tentative-expected.txt
M Source/WebCore/html/parser/HTMLPreloadScanner.cpp
Log Message:
-----------
HTMLPreloadScanner should not preload stylesheets with the disabled attribute
https://bugs.webkit.org/show_bug.cgi?id=310767
rdar://173378582
Reviewed by Chris Dumez.
This patch aligns WebKit with Gecko / Firefox.
The speculative preload scanner was issuing preload requests for
<link rel="stylesheet" disabled> elements. Per the speculative HTML
parsing spec [1], user agents "must not speculatively fetch resources
that would not be fetched with the normal HTML parser." Since a link
element with the disabled attribute does not trigger a resource fetch
when processed normally, the speculative parser should skip it as well.
Teach the preload scanner to recognize the disabled attribute on link
elements and skip preloading when it is present.
[1] https://html.spec.whatwg.org/multipage/parsing.html#speculative-html-parsing
* LayoutTests/TestExpectations: Unskip test
*
LayoutTests/imported/w3c/web-platform-tests/html/syntax/speculative-parsing/generated/document-write/link-rel-stylesheet-disabled.tentative.sub-expected.txt:
Progression
*
LayoutTests/imported/w3c/web-platform-tests/html/syntax/speculative-parsing/generated/document-write/link-rel-stylesheet-disabled.tentative.sub.html:
Updated to not dump <plaintext>
*
LayoutTests/imported/w3c/web-platform-tests/html/syntax/speculative-parsing/generated/page-load/link-rel-stylesheet-disabled.tentative-expected.txt:
Ditto
* Source/WebCore/html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
(WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload):
Canonical link: https://commits.webkit.org/311776@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications