Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 915bfc026f21b43a2290cb38d640c1ac1a7ea191
https://github.com/WebKit/WebKit/commit/915bfc026f21b43a2290cb38d640c1ac1a7ea191
Author: Antoine Quint <[email protected]>
Date: 2026-02-16 (Mon, 16 Feb 2026)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/scroll-animations/view-timelines/contain-alignment-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/scroll-animations/view-timelines/contain-alignment.html
M Source/WebCore/animation/ViewTimeline.cpp
M Source/WebCore/animation/ViewTimeline.h
M Source/WebCore/animation/WebAnimation.cpp
Log Message:
-----------
[scroll-animations] WPT test `view-timelines/contain-alignment.html` fails
https://bugs.webkit.org/show_bug.cgi?id=307788
rdar://170309501
Reviewed by Anne van Kesteren.
This test uses a flex layout to locate three items at the boundaries and in the
middle of of a "contain" region.
The computed locations of the items vary depending on the browsers and in our
case it would yield a time just
under 0% for one of the extremities that caused an unresolved progress instead
of a `0` value.
We address this by adding a way to round the current time of animations
associated with a view timeline by querying
the view timeline for an epsilon value computed as 0.1pt compared to the extent
of the subject size. We do this
rounding for values just below 0% and just above 100%.
We also fix an egregious error in the test where it missed a comma in the
`rgb()` color provided in the `to` keyframe
which caused WebKit to not blend the color as expected and fail assertions.
*
LayoutTests/imported/w3c/web-platform-tests/scroll-animations/view-timelines/contain-alignment-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/scroll-animations/view-timelines/contain-alignment.html:
* Source/WebCore/animation/ViewTimeline.cpp:
(WebCore::ViewTimeline::epsilon const):
* Source/WebCore/animation/ViewTimeline.h:
* Source/WebCore/animation/WebAnimation.cpp:
(WebCore::WebAnimation::currentTime const):
Canonical link: https://commits.webkit.org/307693@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications