[Webkit-unassigned] [Bug 228302] macOS key-driven smooth scrolling does not stop when focus changes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 5 14:07:38 PDT 2021


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

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

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

> Source/WebCore/ChangeLog:8
> +        No tests yet.

This seems like a grand time to rectify this, this one should be eminently testable (long page, send keydown, change focus, make sure the scroll stops... eventually (it won't be immediately, this will be a tricky part))

> Source/WebCore/page/Page.cpp:2356
> +        reportUnfocusedToScrollableAreas();

Something is weird about the name, but I can't quite place it. I think it's because we usually say didX or xChanged (didLoseFocus?). I'm not sure the "to scrollable areas" part belongs in the Page method name; you could imagine using it for other things on focus loss.

(though I do see some precedent for this style too, in e.g. `notifyPageThatContentAreaWillPaint`).

Maybe someone else has opinions :)

> Source/WebCore/platform/ScrollController.cpp:234
> +        m_client.keyboardScrollingAnimator()->handleKeyUpEvent();

Probably would be ideal if this called a function something like `stopScrollingWithAnimation`, and make `handleKeyUpEvent`'s implementation also call that. Not great to call something named `keyUp` not in response to a `keyUp` event, that's just confusing.

-- 
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/20210805/c86658a9/attachment-0001.htm>


More information about the webkit-unassigned mailing list