Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1891c25bbb1c59cb0ed2b00f4adddf06bebbd0a4
      
https://github.com/WebKit/WebKit/commit/1891c25bbb1c59cb0ed2b00f4adddf06bebbd0a4
  Author: Brent Fulgham <[email protected]>
  Date:   2026-07-14 (Tue, 14 Jul 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-clamp-after-transform-shrinks-overflow-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-clamp-after-transform-shrinks-overflow.html
    M Source/WebCore/animation/KeyframeEffect.cpp

  Log Message:
  -----------
  spotify.com: Queue pane animation has weird jump when entering screen
https://bugs.webkit.org/show_bug.cgi?id=318289
<rdar://problem/171019322>

Reviewed by Dan Glastonbury and Simon Fraser.

The Spotify queue pane showed a "jump" when animating open: as it approached 
the top it
would overscroll and then snap back into position.

A transform contributes to its scroll container's scrollable overflow (see
RenderBox::applyPaintGeometryTransformToRect): a translated descendant extends 
the
container's scrollable area. An accelerated transform animation, however, runs 
on the
compositor and does not trigger layout, so while it is running the scroll 
container's
scrollable overflow is never recomputed. When such an animation settles (e.g. 
the queue
panel sliding in from a translateY toward 0), the scrollable overflow -- and 
any scroll
offset that was only reachable because of the animated transform -- is left 
stale, so
the container stays over-scrolled until some later layout happens to re-clamp 
it. That
late re-clamp is the visible "hop".

Fix this by recomputing overflow when an accelerated transform-related animation
finishes. KeyframeEffect::animationDidFinish() now calls 
setNeedsLayoutForOverflowChange()
on the target when the effect animates a transform-related property. At 
completion the
transform has settled, so the scroll container's scrollable overflow is 
recomputed and
the scroll offset is clamped back into the valid range in the same update -- no 
visible
hop.

This is intentionally scoped to animation completion rather than to every 
transform
change since forcing an overflow recomputation on all transform changes 
regresses
animations inside form controls.

* 
LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-clamp-after-transform-shrinks-overflow-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-clamp-after-transform-shrinks-overflow.html:
 Added.
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::animationDidFinish):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to