Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fc8c073ca9650f6b1e4c52e9f75667b6bb539228
      
https://github.com/WebKit/WebKit/commit/fc8c073ca9650f6b1e4c52e9f75667b6bb539228
  Author: Wenson Hsieh <[email protected]>
  Date:   2025-07-24 (Thu, 24 Jul 2025)

  Changed paths:
    A 
LayoutTests/fast/page-color-sampling/color-sampling-header-visibility-expected.txt
    A LayoutTests/fast/page-color-sampling/color-sampling-header-visibility.html
    M Source/WebCore/page/Page.cpp

  Log Message:
  -----------
  [Liquid Glass] wsj.com: top fixed element color extension disappears after 
scrolling back down
https://bugs.webkit.org/show_bug.cgi?id=296454
rdar://156610120

Reviewed by Abrar Rahman Protyasha.

In the very first iteration of the fixed element color sampling heuristic, 
fixed color extensions
would disappear once the sampled color along that edge was no longer the same 
(e.g., if the fixed
element was hidden). This caused fixed color extension views to appear and 
disappear too frequently
on many websites, especially with sticky headers and footer elements.

To mitigate this, we added a hysteresis to maintain the last sampled color, if 
the last sampled
element's renderer still exists in the render tree. However, this resulted in 
the opposite problem,
where fixed color extensions would often linger around forever after dismissing 
a popup, or if a
toast temporarily appeared and then disappeared via `visibility: hidden;`.

To mitigate that, we then adjusted the heuristic once again to require the last 
sampled element to
be visible. However, on wsj.com, after scrolling down, up, and down again, WSJ 
applies visibility:
hidden to the header, which causes the corresponding color extension to 
disappear.

To mitigate this, we devise an even narrower carve-out for `header` and 
`footer` elements fixed near
the top or bottom edges of the viewport (respectively), such that we allow 
their corresponding color
extensions to stay around.

* 
LayoutTests/fast/page-color-sampling/color-sampling-header-visibility-expected.txt:
 Added.
* LayoutTests/fast/page-color-sampling/color-sampling-header-visibility.html: 
Added.
* Source/WebCore/page/Page.cpp:
(WebCore::Page::updateFixedContainerEdges):

Canonical link: https://commits.webkit.org/297849@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