[webkit-changes] [WebKit/WebKit] 9e31d4: <link> elements with media queries that do not aff...

Antti Koivisto noreply at github.com
Tue Feb 7 09:34:13 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9e31d4e46121e45d2b95bef93b8515877deb57b5
      https://github.com/WebKit/WebKit/commit/9e31d4e46121e45d2b95bef93b8515877deb57b5
  Author: Antti Koivisto <antti at apple.com>
  Date:   2023-02-07 (Tue, 07 Feb 2023)

  Changed paths:
    A LayoutTests/http/tests/css/link-with-non-matching-media-slow-load-expected.html
    A LayoutTests/http/tests/css/link-with-non-matching-media-slow-load.html
    M Source/WebCore/page/FrameView.cpp
    M Source/WebCore/testing/Internals.cpp
    M Source/WebCore/testing/Internals.h
    M Source/WebCore/testing/Internals.idl

  Log Message:
  -----------
  <link> elements with media queries that do not affect the current page can be delayed
https://bugs.webkit.org/show_bug.cgi?id=39455
rdar://102178226

Reviewed by Alan Baradlay.

We correctly deprioritize stylesheets with non-matching media attribute and don't make them
rendering blocking. However they may still delay the visually non-empty milestone. This delay
only comes into play if there is not enough visual content to trigger the milestone otherwise.
This may end up delaying rendering until the non-matching stylesheets are fully loaded on simple
pages.

* LayoutTests/http/tests/css/link-with-non-matching-media-slow-load-expected.html: Added.
* LayoutTests/http/tests/css/link-with-non-matching-media-slow-load.html: Added.
* Source/WebCore/page/FrameView.cpp:
(WebCore::FrameView::checkAndDispatchDidReachVisuallyNonEmptyState):

Ignore "very low" priority resources when determining if everything important is loaded.

* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::isVisuallyNonEmpty const):
* Source/WebCore/testing/Internals.h:
* Source/WebCore/testing/Internals.idl:

Testing support.

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




More information about the webkit-changes mailing list