[Webkit-unassigned] [Bug 226986] Renavigate MacOS keyboard scrolling and use KeyboardScroll struct

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 14 13:43:50 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=226986

--- Comment #2 from Tim Horton <thorton at apple.com> ---
Comment on attachment 431359
  --> https://bugs.webkit.org/attachment.cgi?id=431359
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=431359&action=review

> Source/WebCore/page/EventHandler.cpp:4302
> +    else if (event.keyIdentifier() == "PageDown")
> +        key = Key::PageDown;
> +    else if (event.keyIdentifier() == "PageUp")
> +        key = Key::PageUp;

PageDown is not going to get to defaultArrowEventHandler, likely this all needs to be factored out and called from multiple places (some kind of "maybe handle keyboard scroll" function)

> Source/WebCore/page/EventHandler.cpp:4344
> +    WebCore::KeyboardScroll scroll;
> +
> +    scroll.offset = unitVector(direction).scaled(scrollDistance);
> +    scroll.increment = increment;
> +    scroll.direction = direction;
> +    scroll.maximumVelocity = scroll.offset.scaled(this->parameters().maximumVelocityMultiplier);
> +
> +    scroll.force = scroll.maximumVelocity.scaled(this->parameters().springMass / this->parameters().timeToMaximumVelocity);

Maybe we can add KeyboardScroll in a second patch? First patch computes the bits but calls scrollRecursively directly, second patch introduces KeyboardScroll for the arguments.

-- 
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/20210614/f0ef1ecf/attachment.htm>


More information about the webkit-unassigned mailing list