-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repeated calls to scrollIntoView({ block: 'center' }) can cause jiggling (affects Spotify lyrics) #19794
Conversation
EWS run on previous version of this PR (hash 0b86c3f) |
0b86c3f
to
39f0b22
Compare
EWS run on previous version of this PR (hash 39f0b22) |
39f0b22
to
f322b4a
Compare
EWS run on previous version of this PR (hash f322b4a) |
f322b4a
to
5523685
Compare
EWS run on previous version of this PR (hash 5523685) |
f322b4a
to
31cc753
Compare
EWS run on current version of this PR (hash 31cc753) |
β¦ing (affects Spotify lyrics) https://bugs.webkit.org/show_bug.cgi?id=263995 rdar://117755250 Reviewed by Tim Horton. Computation of the destination scroll position for `scrollIntoView({ block: 'center' })` involves a divide by 2, which gives a fractional result for some scroller sizes. This causes the computed scroll position to alternate between two values 1px apart when called repeatedly, since our scroll positions are integral. Fix by ceiling the target y value in the `ScrollAlignment::Behavior::AlignCenter` case in `ScrollableArea::getRectToExposeForScrollIntoView()`. * LayoutTests/TestExpectations: * LayoutTests/fast/scrolling/scroll-into-view-block-center-expected.txt: Added. * LayoutTests/fast/scrolling/scroll-into-view-block-center.html: Added. * Source/WebCore/platform/ScrollableArea.cpp: (WebCore::ScrollableArea::getRectToExposeForScrollIntoView const): * Source/WebCore/rendering/RenderLayerScrollableArea.cpp: Canonical link: https://commits.webkit.org/270160@main
31cc753
to
7688e6c
Compare
Committed 270160@main (7688e6c): https://commits.webkit.org/270160@main Reviewed commits have been landed. Closing PR #19794 and removing active labels. |
7688e6c
31cc753
π§ͺ wpe-wk2