Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 30c8ba1f3d2f20edcd95f006ce913625d6033816
      
https://github.com/WebKit/WebKit/commit/30c8ba1f3d2f20edcd95f006ce913625d6033816
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-09-18 (Fri, 18 Sep 2026)

  Changed paths:
    M Source/WebCore/page/scrolling/mac/ScrollerMac.mm
    M Source/WebCore/platform/mac/ScrollbarsControllerMac.mm

  Log Message:
  -----------
  Re-triggered overlay scrollbar expansion animation starts from the wrong 
progress value
https://bugs.webkit.org/show_bug.cgi?id=324523
rdar://183216907

Reviewed by Simon Fraser.

When an overlay scrollbar's expansion transition is re-triggered while an
animation is already in flight, the 
-scrollerImp:animateExpansionTransitionWithDuration:
delegate method took its else-branch and seeded the animation's start value from
[scrollerImp uiStateTransitionProgress] instead of expansionTransitionProgress.
This is a copy/paste error carried over from the sibling
-animateUIStateTransition: method, present since expansion-transition support 
was
first added in 2012.

uiStateTransitionProgress and expansionTransitionProgress track unrelated
transitions, so on the expansion path the wrong getter did not reflect the
current expansion progress. As a result the re-triggered animation started from
an incorrect value and snapped instead of continuing smoothly from where it was.
The init branch and the final end value were already correct, which is why the
final state looked right and the bug went unnoticed.

Fix both copies of the delegate to read expansionTransitionProgress in the
re-trigger branch, matching their own init branches:
- ScrollbarsControllerMac.mm (main-thread NSScrollerImpDelegate)
- ScrollerMac.mm (scrolling-tree side scroller)

No new tests; this is a file-local delegate path with no existing coverage,
verified by symmetry with the init branch.

* Source/WebCore/page/scrolling/mac/ScrollerMac.mm:
(-[WebScrollerImpDelegateMac 
scrollerImp:animateExpansionTransitionWithDuration:]):
* Source/WebCore/platform/mac/ScrollbarsControllerMac.mm:
(-[WebScrollerImpDelegate scrollerImp:animateExpansionTransitionWithDuration:]):

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



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

Reply via email to