[webkit-changes] [WebKit/WebKit] 1f7174: Add basic support for link rel=modulepreload behin...

Ryosuke Niwa noreply at github.com
Tue Feb 21 23:28:49 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1f7174a76b69e28f9c81237496c2f0ff1338b14d
      https://github.com/WebKit/WebKit/commit/1f7174a76b69e28f9c81237496c2f0ff1338b14d
  Author: Ryosuke Niwa <rniwa at webkit.org>
  Date:   2023-02-21 (Tue, 21 Feb 2023)

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/imported/w3c/web-platform-tests/html/semantics/rellist-feature-detection-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/preload/avoid-delaying-onload-link-modulepreload-exec-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/preload/avoid-delaying-onload-link-modulepreload-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/preload/link-header-modulepreload-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/preload/modulepreload-expected.txt
    A LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/preload/modulepreload-expected.txt
    A LayoutTests/platform/wk2/imported/w3c/web-platform-tests/html/semantics/rellist-feature-detection-expected.txt
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WebCore/html/LinkRelAttribute.cpp
    M Source/WebCore/html/LinkRelAttribute.h
    M Source/WebCore/loader/LinkLoader.cpp

  Log Message:
  -----------
  Add basic support for link rel=modulepreload behind a runtime flag
https://bugs.webkit.org/show_bug.cgi?id=252639

Reviewed by Chris Dumez and Yusuke Suzuki.

Added the rudimentary implementation for link rel=modulepreload. Also, unskipped and rebaselined relevant tests.

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/rellist-feature-detection-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/preload/avoid-delaying-onload-link-modulepreload-exec-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/preload/avoid-delaying-onload-link-modulepreload-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/preload/link-header-modulepreload-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/preload/modulepreload-expected.txt:
* LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/preload/modulepreload-expected.txt: Added.
* LayoutTests/platform/wk2/imported/w3c/web-platform-tests/html/semantics/rellist-feature-detection-expected.txt: Copied
 from LayoutTests/imported/w3c/web-platform-tests/html/semantics/rellist-feature-detection-expected.txt.
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: Added a runtime flag.
* Source/WebCore/html/LinkRelAttribute.cpp:
(WebCore::LinkRelAttribute::LinkRelAttribute):
(WebCore::LinkRelAttribute::isSupported):
* Source/WebCore/html/LinkRelAttribute.h:
(WebCore::operator==):
* Source/WebCore/loader/LinkLoader.cpp:
(WebCore::LinkLoader::preloadIfNeeded): Added the main logic for detecting & initiating modulepreload.

Canonical link: https://commits.webkit.org/260659@main




More information about the webkit-changes mailing list