[webkit-changes] [WebKit/WebKit] d84fa2: link at rel=stylesheet: Don’t load if HTTP status isn...
sideshowbarker
noreply at github.com
Tue Oct 3 08:19:13 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d84fa2dfd249fe54b862bbf673c466263c0c5fc8
https://github.com/WebKit/WebKit/commit/d84fa2dfd249fe54b862bbf673c466263c0c5fc8
Author: Michael[tm] Smith <mike at w3.org>
Date: 2023-10-03 (Tue, 03 Oct 2023)
Changed paths:
A LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/resources/302-no-Location-header-text-css.asis
A LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/stylesheet-non-OK-status-expected.txt
A LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/stylesheet-non-OK-status.html
M Source/WebCore/css/StyleSheetContents.cpp
M Source/WebCore/loader/cache/CachedCSSStyleSheet.cpp
M Source/WebCore/loader/cache/CachedCSSStyleSheet.h
Log Message:
-----------
link at rel=stylesheet: Don’t load if HTTP status isn’t an OK status
https://bugs.webkit.org/show_bug.cgi?id=262030
Reviewed by Chris Dumez.
When the HTTP response status code for a <link rel=stylesheet> resource
is a non-OK status (not in the range 200–299), this change ensures
WebKit fully conforms to the requirement in the HTML standard at
https://html.spec.whatwg.org/#fetching-and-processing-a-resource-from-a-link-element:processresponseconsumebody
that no “load” event is fired at the element.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/resources/302-no-Location-header-text-css.asis: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/stylesheet-non-OK-status-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/stylesheet-non-OK-status.html: Added.
* Source/WebCore/css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::parseAuthorStyleSheet):
* Source/WebCore/loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::sheetText const):
(WebCore::CachedCSSStyleSheet::canUseSheet const):
* Source/WebCore/loader/cache/CachedCSSStyleSheet.h:
Canonical link: https://commits.webkit.org/268779@main
More information about the webkit-changes
mailing list