Bug 228155 - macOS key-driven smooth scrolling does not work for spacebar
Summary: macOS key-driven smooth scrolling does not work for spacebar
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 228009
Blocks:
  Show dependency treegraph
 
Reported: 2021-07-21 12:26 PDT by Dana Estra
Modified: 2021-07-30 18:07 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.50 KB, patch)
2021-07-26 12:24 PDT, Dana Estra
no flags Details | Formatted Diff | Diff
Patch (1.51 KB, patch)
2021-07-26 12:40 PDT, Dana Estra
no flags Details | Formatted Diff | Diff
Patch (1.51 KB, patch)
2021-07-28 13:21 PDT, Dana Estra
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dana Estra 2021-07-21 12:26:41 PDT
spacebar and spacebar+shift do not case any movement
Comment 1 Radar WebKit Bug Importer 2021-07-21 12:37:40 PDT
<rdar://problem/80911775>
Comment 2 Dana Estra 2021-07-26 12:24:39 PDT
Created attachment 434224 [details]
Patch
Comment 3 Dana Estra 2021-07-26 12:40:29 PDT
Created attachment 434226 [details]
Patch
Comment 4 Tim Horton 2021-07-26 13:05:18 PDT
Comment on attachment 434226 [details]
Patch

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

> Source/WebCore/platform/KeyboardScrollingAnimator.cpp:237
> -    if (event.type() != eventNames().keydownEvent)
> +    if (!(event.type() == eventNames().keydownEvent || event.type() == eventNames().keypressEvent))

Hmm, I'm not sure this is right. Are you not getting `keydown` for the spacebar? If not, you probably want to figure out who is eating it.
Comment 5 Tim Horton 2021-07-28 12:17:44 PDT
Comment on attachment 434226 [details]
Patch

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

>> Source/WebCore/platform/KeyboardScrollingAnimator.cpp:237
>> +    if (!(event.type() == eventNames().keydownEvent || event.type() == eventNames().keypressEvent))
> 
> Hmm, I'm not sure this is right. Are you not getting `keydown` for the spacebar? If not, you probably want to figure out who is eating it.

I guess it's OK (a bit weird, but existing weirdness); EventHandler::defaultSpaceEventHandler itself asserts it's only called with keypress, and the other callers of this call it explicitly only for keydown, so we won't get duplicates.
Comment 6 Tim Horton 2021-07-28 13:09:39 PDT
Can't cq+ this till the other patch lands :)
Comment 7 Dana Estra 2021-07-28 13:21:48 PDT
Created attachment 434453 [details]
Patch
Comment 8 EWS 2021-07-30 16:04:14 PDT
Committed r280501 (240133@main): <https://commits.webkit.org/240133@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 434453 [details].