Page Up/Down scrolling feels too slow#8318
Merged
webkit-early-warning-system merged 1 commit intoWebKit:mainfrom Jan 7, 2023
Merged
Page Up/Down scrolling feels too slow#8318webkit-early-warning-system merged 1 commit intoWebKit:mainfrom
webkit-early-warning-system merged 1 commit intoWebKit:mainfrom
Conversation
Collaborator
|
EWS run on previous version of this PR (hash a9a05f9) Details
|
hortont424
approved these changes
Jan 6, 2023
hortont424
requested changes
Jan 6, 2023
Contributor
hortont424
left a comment
There was a problem hiding this comment.
Is this changing the constants for iOS too? Are you sure we want to do that?
a9a05f9 to
608aa98
Compare
Collaborator
|
EWS run on previous version of this PR (hash 608aa98) Details
|
608aa98 to
1b16bb4
Compare
Collaborator
|
EWS run on previous version of this PR (hash 1b16bb4) Details |
1b16bb4 to
fc6ea63
Compare
Collaborator
|
EWS run on current version of this PR (hash fc6ea63) Details
|
hortont424
approved these changes
Jan 7, 2023
https://bugs.webkit.org/show_bug.cgi?id=250224 rdar://101651891 Reviewed by Tim Horton. Adjusts the keyboard scrolling parameters so that it feels faster. * Source/WebCore/platform/KeyboardScroll.h: Canonical link: https://commits.webkit.org/258598@main
fc6ea63 to
f7ad74a
Compare
Collaborator
|
Committed 258598@main (f7ad74a): https://commits.webkit.org/258598@main Reviewed commits have been landed. Closing PR #8318 and removing active labels. |
webkit-early-warning-system
pushed a commit
to rr-codes/WebKit
that referenced
this pull request
Jan 20, 2023
https://bugs.webkit.org/show_bug.cgi?id=250598 rdar://104152802 Reviewed by Simon Fraser. Before event handler driven smooth keyboard scrolling, pressing and holding the spacebar or page up/down keys would do the following sequence of actions: 1. Scroll down the page by a "screenful". 2. On Cocoa platforms, the scrolling mechanism would wait until the `keyRepeatInterval` has passed. 3. After the interval has passed, it would continue consistently page scrolling until the key is released. With the introduction of event handler driven smooth keyboard scrolling, step two was omitted. However, because smooth scrolling was slower than previously, the behavior was effectively unchanged, as the slowness of the scrolling compensated for what would have been the key repeat interval. After WebKit#8318, smooth scrolling was adjusted which caused its velocity to increase. As a result, the lack of a delay was now noticable, and page scrolling would scroll more than a "screenful" unless preisely one key event was sent. This PR adjusts smooth scrolling such that the smooth keyboard scroll animation only starts after the `keyRepeatInterval`, with the first part of the entire scroll behaving the same as it did prior to smooth keyboard scrolling. Note that this will apply to only spacebar and page up / down scrolling, and not arrow key scrolling. * Source/WebCore/editing/EditorCommand.cpp: (WebCore::executeScrollPageBackward): (WebCore::executeScrollPageForward): * Source/WebCore/page/EventHandler.cpp: (WebCore::EventHandler::defaultKeyboardEventHandler): (WebCore::EventHandler::defaultKeyboardScrollEventHandler): (WebCore::EventHandler::defaultPageUpDownEventHandler): (WebCore::EventHandler::defaultSpaceEventHandler): (WebCore::EventHandler::beginKeyboardScrollGesture): (WebCore::EventHandler::startKeyboardScrollAnimationOnDocument): (WebCore::EventHandler::startKeyboardScrollAnimationOnRenderBoxLayer): (WebCore::EventHandler::startKeyboardScrollAnimationOnRenderBoxAndItsAncestors): (WebCore::EventHandler::startKeyboardScrollAnimationOnEnclosingScrollableContainer): (WebCore::EventHandler::keyboardScrollRecursively): (WebCore::EventHandler::keyboardScroll): * Source/WebCore/page/EventHandler.h: * Source/WebCore/platform/KeyboardScrollingAnimator.cpp: (WebCore::KeyboardScrollingAnimator::beginKeyboardScrollGesture): * Source/WebCore/platform/KeyboardScrollingAnimator.h: Canonical link: https://commits.webkit.org/259146@main
alancoon
pushed a commit
that referenced
this pull request
Jan 23, 2023
Page scrolls more than one screenful when pressing Space or Fn+Down
https://bugs.webkit.org/show_bug.cgi?id=250598
rdar://104152802
Reviewed by Simon Fraser.
Before event handler driven smooth keyboard scrolling, pressing and holding the
spacebar or page up/down keys would do the following sequence of actions:
1. Scroll down the page by a "screenful".
2. On Cocoa platforms, the scrolling mechanism would wait until the `keyRepeatInterval`
has passed.
3. After the interval has passed, it would continue consistently page scrolling until
the key is released.
With the introduction of event handler driven smooth keyboard scrolling, step two
was omitted. However, because smooth scrolling was slower than previously, the behavior
was effectively unchanged, as the slowness of the scrolling compensated for what would
have been the key repeat interval.
After #8318, smooth scrolling was adjusted which
caused its velocity to increase. As a result, the lack of a delay was now noticable,
and page scrolling would scroll more than a "screenful" unless preisely one key event was sent.
This PR adjusts smooth scrolling such that the smooth keyboard scroll animation only
starts after the `keyRepeatInterval`, with the first part of the entire scroll behaving the
same as it did prior to smooth keyboard scrolling.
Note that this will apply to only spacebar and page up / down scrolling, and not arrow key
scrolling.
* Source/WebCore/editing/EditorCommand.cpp:
(WebCore::executeScrollPageBackward):
(WebCore::executeScrollPageForward):
* Source/WebCore/page/EventHandler.cpp:
(WebCore::EventHandler::defaultKeyboardEventHandler):
(WebCore::EventHandler::defaultKeyboardScrollEventHandler):
(WebCore::EventHandler::defaultPageUpDownEventHandler):
(WebCore::EventHandler::defaultSpaceEventHandler):
(WebCore::EventHandler::beginKeyboardScrollGesture):
(WebCore::EventHandler::startKeyboardScrollAnimationOnDocument):
(WebCore::EventHandler::startKeyboardScrollAnimationOnRenderBoxLayer):
(WebCore::EventHandler::startKeyboardScrollAnimationOnRenderBoxAndItsAncestors):
(WebCore::EventHandler::startKeyboardScrollAnimationOnEnclosingScrollableContainer):
(WebCore::EventHandler::keyboardScrollRecursively):
(WebCore::EventHandler::keyboardScroll):
* Source/WebCore/page/EventHandler.h:
* Source/WebCore/platform/KeyboardScrollingAnimator.cpp:
(WebCore::KeyboardScrollingAnimator::beginKeyboardScrollGesture):
* Source/WebCore/platform/KeyboardScrollingAnimator.h:
Canonical link: https://commits.webkit.org/259146@main
Canonical link: https://commits.webkit.org/[email protected]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
f7ad74a
fc6ea63
🛠 🧪 win🛠 gtk🛠 wincairo🧪 ios-wk2🧪 api-mac🧪 gtk-wk2🧪 api-ios🧪 api-gtk🧪 mac-AS-debug-wk2