[webkit-changes] [WebKit/WebKit] 3775c2: link elements should be able to fire more than one...
Ryosuke Niwa
noreply at github.com
Thu Sep 8 21:50:04 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3775c2edb2307598e53c311c623d3c2d7583066c
https://github.com/WebKit/WebKit/commit/3775c2edb2307598e53c311c623d3c2d7583066c
Author: Ryosuke Niwa <rniwa at webkit.org>
Date: 2022-09-08 (Thu, 08 Sep 2022)
Changed paths:
M LayoutTests/TestExpectations
A LayoutTests/fast/dom/HTMLLinkElement/link-preload-load-once-expected.txt
A LayoutTests/fast/dom/HTMLLinkElement/link-preload-load-once.html
A LayoutTests/fast/dom/HTMLLinkElement/link-stylesheet-load-once-expected.txt
A LayoutTests/fast/dom/HTMLLinkElement/link-stylesheet-load-once.html
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/link-multiple-error-events-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/link-multiple-load-events-expected.txt
A LayoutTests/platform/mac-wk1/fast/dom/HTMLLinkElement/link-preload-load-once-expected.txt
A LayoutTests/platform/win/fast/dom/HTMLLinkElement/link-preload-load-once-expected.txt
M Source/WebCore/html/HTMLLinkElement.cpp
M Source/WebCore/html/HTMLLinkElement.h
M Source/WebCore/html/LinkRelAttribute.h
Log Message:
-----------
link elements should be able to fire more than one load / error event
https://bugs.webkit.org/show_bug.cgi?id=232309
Reviewed by Darin Adler.
Based on a patch written by Chris Dumez.
This patch makes link element emit more than one load event each time resource is loaded,
and fixes the bug that setting rel content attribute to the same value resulted in the resource to be reloaded.
New behavior matches that of Chrome and Firefox.
* LayoutTests/TestExpectations: Unskip now passing tests.
* LayoutTests/fast/dom/HTMLLinkElement/link-preload-load-once-expected.txt: Added.
* LayoutTests/fast/dom/HTMLLinkElement/link-preload-load-once.html: Added.
* LayoutTests/fast/dom/HTMLLinkElement/link-stylesheet-load-once-expected.txt: Added.
* LayoutTests/fast/dom/HTMLLinkElement/link-stylesheet-load-once.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/link-multiple-error-events-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/link-multiple-load-events-expected.txt:
* LayoutTests/platform/mac-wk1/fast/dom/HTMLLinkElement/link-preload-load-once-expected.txt:
* LayoutTests/platform/win/fast/dom/HTMLLinkElement/link-preload-load-once-expected.txt:
* Source/WebCore/html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::HTMLLinkElement):
(WebCore::HTMLLinkElement::parseAttribute):
(WebCore::HTMLLinkElement::process):
(WebCore::HTMLLinkElement::didFinishInsertingNode): We need to resolve URL again once this element is connected.
(WebCore::HTMLLinkElement::notifyLoadedSheetAndAllCriticalSubresources):
* Source/WebCore/html/HTMLLinkElement.h:
* Source/WebCore/html/LinkRelAttribute.h:
(WebCore::operator==): Added.
(WebCore::operator!=): Added.
Canonical link: https://commits.webkit.org/254290@main
More information about the webkit-changes
mailing list