Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d7a1e8219fecc4cdd17d2d530357402a6b6480a2
https://github.com/WebKit/WebKit/commit/d7a1e8219fecc4cdd17d2d530357402a6b6480a2
Author: Wenson Hsieh <[email protected]>
Date: 2025-05-19 (Mon, 19 May 2025)
Changed paths:
A
LayoutTests/fast/page-color-sampling/color-sampling-fixed-popup-expected.txt
A LayoutTests/fast/page-color-sampling/color-sampling-fixed-popup.html
M
LayoutTests/fast/page-color-sampling/color-sampling-ignores-non-fixed-content-expected.txt
M
LayoutTests/fast/page-color-sampling/color-sampling-ignores-non-fixed-content.html
M
LayoutTests/fast/page-color-sampling/color-sampling-in-position-sticky-expected.txt
M
LayoutTests/fast/page-color-sampling/color-sampling-in-position-sticky.html
M Source/WebCore/page/LocalFrameView.cpp
M Source/WebCore/page/LocalFrameView.h
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/Page.h
Log Message:
-----------
[Page color sampling] Extended top color should remain stable while scrolling
https://bugs.webkit.org/show_bug.cgi?id=293209
rdar://151422381
Reviewed by Abrar Rahman Protyasha.
Fine-tune the page color sampling/fixed color extension heuristic again, to
maintain stability for
sampled viewport-constrained containers, even if those containers are no longer
present along the
edges of the viewport.
* LayoutTests/fast/page-color-sampling/color-sampling-fixed-popup-expected.txt:
Added.
* LayoutTests/fast/page-color-sampling/color-sampling-fixed-popup.html: Added.
Add a layout test to verify that the sampled colors reset after removing an
element that covers the
entire viewport.
*
LayoutTests/fast/page-color-sampling/color-sampling-ignores-non-fixed-content-expected.txt:
*
LayoutTests/fast/page-color-sampling/color-sampling-ignores-non-fixed-content.html:
*
LayoutTests/fast/page-color-sampling/color-sampling-in-position-sticky-expected.txt:
* LayoutTests/fast/page-color-sampling/color-sampling-in-position-sticky.html:
Rebaseline a couple of existing tests to reflect the fact that the sampled
fixed color now lingers
around, even if the sampled element no longer intersects with the edge of the
viewport.
* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::fixedContainerEdges const):
* Source/WebCore/page/LocalFrameView.h:
* Source/WebCore/page/Page.cpp:
(WebCore::m_fixedContainerEdgesAndElements):
Turn this into a pair of fixed container edges (i.e. color sampling results per
edge) and `WeakPtr`
to an Element, per edge. See `fixedContainerEdges` below.
(WebCore::Page::didCommitLoad):
(WebCore::Page::updateFixedContainerEdges):
(WebCore::Page::lastTopFixedContainerColor const):
* Source/WebCore/page/Page.h:
(WebCore::Page::fixedContainerEdges const):
In the case where color sampling finds no fixed edge but the previous color
sampling result found a
fixed edge, carry over the previous result as long as the viewport-constrained
container element
hit-tested by the previous result is still in the DOM and rendered.
Canonical link: https://commits.webkit.org/295099@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