[webkit-reviews] review granted: [Bug 228009] Add key-driven smooth scrolling to macOS : [Attachment 434144] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jul 26 13:48:25 PDT 2021
Simon Fraser (smfr) <simon.fraser at apple.com> has granted Dana Estra
<destra at apple.com>'s request for review:
Bug 228009: Add key-driven smooth scrolling to macOS
https://bugs.webkit.org/show_bug.cgi?id=228009
Attachment 434144: Patch
https://bugs.webkit.org/attachment.cgi?id=434144&action=review
--- Comment #13 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 434144
--> https://bugs.webkit.org/attachment.cgi?id=434144
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=434144&action=review
> Source/WebCore/page/EventHandler.cpp:3809
> + if (event.type() == eventNames().keyupEvent) {
> + FrameView* view = m_frame.view();
> + return
view->scrollAnimator().keyboardScrollingAnimator()->handleKeyUpEventWhileScroll
ing();
> + }
It's a bit weird that the call to beginKeyboardScrollGesture() is hidden down
in handleKeyboardScrolling but handleKeyUpEventWhileScrolling() is handled
here. Would be nice to make them more symmetrical.
> Source/WebCore/platform/KeyboardScrollingAnimator.cpp:98
> +
Remove this blank line.
> Source/WebCore/platform/KeyboardScrollingAnimator.cpp:104
> +
Same
> Source/WebCore/platform/KeyboardScrollingAnimator.cpp:121
> + auto springForce = - displacement.scaled(params.springStiffness) -
m_velocity.scaled(params.springDamping);
No space after the leading '-'
> Source/WebCore/platform/KeyboardScrollingAnimator.cpp:158
> + RELEASE_ASSERT_NOT_REACHED();
No need for this to be a RELEASE assert. Just return 0.
> Source/WebCore/platform/KeyboardScrollingAnimator.cpp:196
> + RELEASE_ASSERT_NOT_REACHED();
don't release assert.
> Source/WebCore/platform/KeyboardScrollingAnimator.cpp:212
> + RELEASE_ASSERT_NOT_REACHED();
don't release assert.
More information about the webkit-reviews
mailing list