Bug 228155

Summary: macOS key-driven smooth scrolling does not work for spacebar
Product: WebKit Reporter: Dana Estra <dana.estra>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: akeerthi, bdakin, simon.fraser, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 228009    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch ews-feeder: commit-queue-

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].