Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5aea254b4c026383ea8087f076499506f50b0963
https://github.com/WebKit/WebKit/commit/5aea254b4c026383ea8087f076499506f50b0963
Author: Ahmad Saleem <[email protected]>
Date: 2026-08-18 (Tue, 18 Aug 2026)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/scroll-animations/view-timelines/view-timeline-sticky-subpixel-adjustment-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/scroll-animations/view-timelines/view-timeline-sticky-subpixel-adjustment.html
M Source/WebCore/animation/ViewTimeline.cpp
Log Message:
-----------
[scroll-animations] View timeline range boundaries discard subpixel sticky
adjustments
https://bugs.webkit.org/show_bug.cgi?id=321986
rdar://185162728
Reviewed by Antoine Quint.
This patch aligns WebKit with Blink / Chromium.
StickinessAdjustmentData::rangeStartAdjustment() and rangeEndAdjustment()
accumulated into `auto x = 0`, which deduces int, so each `+=` of a float
sticky adjustment was truncated toward zero. The room a sticky box has to
move within its containing block is a float, so a fractional adjustment was
either discarded entirely or lost its fraction, shifting the start and end of
the view timeline's cover range by up to a pixel. The sibling
entryDistanceAdjustment() and exitDistanceAdjustment() already used float and
were unaffected.
Spell both accumulators float, matching the siblings.
Test:
imported/w3c/web-platform-tests/scroll-animations/view-timelines/view-timeline-sticky-subpixel-adjustment.html
*
LayoutTests/imported/w3c/web-platform-tests/scroll-animations/view-timelines/view-timeline-sticky-subpixel-adjustment-expected.txt:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/scroll-animations/view-timelines/view-timeline-sticky-subpixel-adjustment.html:
Added.
* Source/WebCore/animation/ViewTimeline.cpp:
(WebCore::StickinessAdjustmentData::rangeStartAdjustment const):
(WebCore::StickinessAdjustmentData::rangeEndAdjustment const):
Canonical link: https://commits.webkit.org/319369@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications