[Webkit-unassigned] [Bug 226986] Refactor MacOS keyboard scrolling and use KeyboardScroll struct
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jun 28 12:23:29 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=226986
Tim Horton <thorton at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #432293|review? |review+
Flags| |
--- Comment #30 from Tim Horton <thorton at apple.com> ---
Comment on attachment 432293
--> https://bugs.webkit.org/attachment.cgi?id=432293
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=432293&action=review
> Source/WebCore/page/EventHandler.cpp:4259
> + // FIXME: This logic does not account for writing-mode.
This should have a bugzilla number in parens (FIXME (123456): ...)
> Source/WebCore/page/EventHandler.cpp:4318
> + KeyboardScroll scroll;
> +
> + scroll.offset = unitVectorForScrollDirection(direction).scaled(distance);
> + scroll.granularity = granularity;
> + scroll.direction = direction;
> + scroll.maximumVelocity = scroll.offset.scaled(KeyboardScrollParameters::parameters().maximumVelocityMultiplier);
> +
> + scroll.force = scroll.maximumVelocity.scaled(KeyboardScrollParameters::parameters().springMass / KeyboardScrollParameters::parameters().timeToMaximumVelocity);
Not the end of the world, but ideally you would stash this unused code aside for patch 2 instead of including it here.
> Source/WebCore/page/KeyboardScroll.cpp:1
> +// Copyright (C) 2021 Apple Inc. All rights reserved.
This copyright header should look like the one in your .h (with a multi-line comment); not sure where this version came from.
> Source/WebKit/UIProcess/ios/WKKeyboardScrollingAnimator.mm:-299
> - WebKit::KeyboardScroll scroll;
Should be a FIXME in this general vicinity about adopting the WebCore version of this.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210628/cd1d1f8d/attachment-0001.htm>
More information about the webkit-unassigned
mailing list