Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 35b0d66fd1b1db6a05ae3e5d6a0abd06db3fa673
      
https://github.com/WebKit/WebKit/commit/35b0d66fd1b1db6a05ae3e5d6a0abd06db3fa673
  Author: Wenson Hsieh <[email protected]>
  Date:   2025-09-24 (Wed, 24 Sep 2025)

  Changed paths:
    R 
LayoutTests/fast/page-color-sampling/color-sampling-ignores-subscrollers-expected.txt
    R 
LayoutTests/fast/page-color-sampling/color-sampling-ignores-subscrollers.html
    M LayoutTests/fast/page-color-sampling/color-sampling-ignores-text.html
    M 
LayoutTests/fast/page-color-sampling/color-sampling-stability-for-same-element-expected.txt
    M 
LayoutTests/fast/page-color-sampling/color-sampling-stability-for-same-element.html
    A 
LayoutTests/fast/page-color-sampling/color-sampling-with-subscroller-expected.txt
    A LayoutTests/fast/page-color-sampling/color-sampling-with-subscroller.html
    M Source/WebCore/page/LocalFrameView.cpp

  Log Message:
  -----------
  [Liquid Glass] [iOS] Scrollable modal popups on www.apple.com/environment are 
missing bottom color extensions
https://bugs.webkit.org/show_bug.cgi?id=299444
rdar://161252731

Reviewed by Lily Spiniolas.

Make some more minor adjustments to the color sampling heuristic, which allow 
color extensions to
show up below overflow scrollable modal popups on www.apple.com/environment. 
This removes a check
that prevented us from sampling scrollable fixed/sticky containers for the 
purposes of color
extension, for two reasons:

-   The content along the bottom edge of the scrollable container could change 
when scrolling,
    causing the sampled color to change.

-   It avoided frequent color sampling when scrolling through Instagram feeds, 
which (alone) was
    leading to ~70% more power use on that website, just while watching content.

However, after that change was landed in 293340@main, a few key differences to 
the heuristic were
made, which should allow us to effectively undo that change without causing a 
huge spike in power
use on Instagram:

1.  Color sampling results are now cached per container, so as long as we 
hit-test to the same
    element, we'll avoid color sampling and instead keep the last color stable.

2.  Painting for the purposes of color sampling skips any 
non-viewport-constrained content, replaced
    renderers, and text, leading to a much cheaper cost.

As such, we end up running the color sampling algorithm just 1 additional time 
on Instagram after
this change (after the fixed element is inserted into the document and 
painted), and don't run it
again until the user navigates.

Test: fast/page-color-sampling/color-sampling-with-subscroller.html

* 
LayoutTests/fast/page-color-sampling/color-sampling-ignores-subscrollers-expected.txt:
 Removed.
* LayoutTests/fast/page-color-sampling/color-sampling-ignores-text.html:

Drive-by fix: stabilize this flaky test.

* 
LayoutTests/fast/page-color-sampling/color-sampling-stability-for-same-element-expected.txt:
* 
LayoutTests/fast/page-color-sampling/color-sampling-stability-for-same-element.html:

Rebaseline this test, by making it verify that the top sampled color remains 
unchanged when
scrolling down and then back up (rather than checking that it's a specific 
color).

* 
LayoutTests/fast/page-color-sampling/color-sampling-with-subscroller-expected.txt:
 Added.
* LayoutTests/fast/page-color-sampling/color-sampling-with-subscroller.html: 
Renamed from 
LayoutTests/fast/page-color-sampling/color-sampling-ignores-subscrollers.html.

Rename this test to `color-sampling-with-subscroller.html`, and instead have it 
verify that there
are sampled colors on all sides.

* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::fixedContainerEdges const):

See above.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to