Skip to content
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

Scrolling with page granularity using keyboard smooth scrolling doesn't account for fixed content #4766

Merged
merged 1 commit into from Sep 28, 2022

Conversation

rr-codes
Copy link
Contributor

@rr-codes rr-codes commented Sep 27, 2022

fdd3720

Scrolling with page granularity using keyboard smooth scrolling doesn't account for fixed content
https://bugs.webkit.org/show_bug.cgi?id=245746
rdar://100469555

Reviewed by Tim Horton.

When keyboard smooth scrolling is enabled, `KeyboardScrollingAnimator::scrollDistance`
is used, which is analagous to `ScrollableArea::scroll`. However, while the
latter accounts for page's having fixed content when scrolling with page
granularity, the former never does.

This PR fixes this by including the same logic that `ScrollableArea::scroll` has
to adjust the scroll step into `KeyboardScrollingAnimator::scrollDistance`.

* LayoutTests/scrollbars/scrolling-backward-by-page-accounting-bottom-fixed-elements-on-keyboard-spacebar.html:
* Source/WebCore/platform/KeyboardScrollingAnimator.cpp:
(WebCore::KeyboardScrollingAnimator::scrollDistance const):
* Source/WebCore/platform/ScrollableArea.h:

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

6c28a27

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  πŸ§ͺ win
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim   πŸ›  mac-debug βœ… πŸ›  gtk βœ… πŸ›  wincairo
βœ… πŸ§ͺ webkitperl   πŸ§ͺ ios-wk2 βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ api-mac βœ… πŸ§ͺ api-gtk
βœ… πŸ›  tv βœ… πŸ§ͺ mac-wk1
βœ… πŸ›  tv-sim βœ… πŸ§ͺ mac-wk2
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch βœ… πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  watch-sim βœ… πŸ§ͺ mac-wk2-stress

@rr-codes rr-codes self-assigned this Sep 27, 2022
@rr-codes rr-codes added Scrolling Bugs related to main thread and off-main thread scrolling WebKit Nightly Build labels Sep 27, 2022
@rr-codes rr-codes added the merge-queue Applied to send a pull request to merge-queue label Sep 28, 2022
…'t account for fixed content

https://bugs.webkit.org/show_bug.cgi?id=245746
rdar://100469555

Reviewed by Tim Horton.

When keyboard smooth scrolling is enabled, `KeyboardScrollingAnimator::scrollDistance`
is used, which is analagous to `ScrollableArea::scroll`. However, while the
latter accounts for page's having fixed content when scrolling with page
granularity, the former never does.

This PR fixes this by including the same logic that `ScrollableArea::scroll` has
to adjust the scroll step into `KeyboardScrollingAnimator::scrollDistance`.

* LayoutTests/scrollbars/scrolling-backward-by-page-accounting-bottom-fixed-elements-on-keyboard-spacebar.html:
* Source/WebCore/platform/KeyboardScrollingAnimator.cpp:
(WebCore::KeyboardScrollingAnimator::scrollDistance const):
* Source/WebCore/platform/ScrollableArea.h:

Canonical link: https://commits.webkit.org/254963@main
@webkit-commit-queue
Copy link
Collaborator

Committed 254963@main (fdd3720): https://commits.webkit.org/254963@main

Reviewed commits have been landed. Closing PR #4766 and removing active labels.

@webkit-early-warning-system webkit-early-warning-system merged commit fdd3720 into WebKit:main Sep 28, 2022
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scrolling Bugs related to main thread and off-main thread scrolling
Projects
None yet
4 participants