Bug 232641

Summary: Make scroll granularity an enum class
Product: WebKit Reporter: Nikos Mouchtaris <nmouchtaris>
Component: New BugsAssignee: Nikos Mouchtaris <nmouchtaris>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, changseok, cmarcelo, esprehn+autocc, ews-watchlist, glenn, heycam, kangil.han, kondapallykalyan, mifenton, pdr, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
ews-feeder: commit-queue-
Patch
none
Patch
heycam: review+, ews-feeder: commit-queue-
Patch none

Description Nikos Mouchtaris 2021-11-02 14:44:05 PDT
Make scroll granularity an enum class
Comment 1 Nikos Mouchtaris 2021-11-02 14:45:52 PDT
Created attachment 443137 [details]
Patch
Comment 2 Nikos Mouchtaris 2021-11-04 14:32:14 PDT
Created attachment 443340 [details]
Patch
Comment 3 Nikos Mouchtaris 2021-11-04 17:22:06 PDT
Created attachment 443360 [details]
Patch
Comment 4 Nikos Mouchtaris 2021-11-08 10:52:21 PST
Created attachment 443573 [details]
Patch
Comment 5 Nikos Mouchtaris 2021-11-08 12:33:23 PST
Created attachment 443589 [details]
Patch
Comment 6 Cameron McCormack (:heycam) 2021-11-08 19:52:41 PST
Comment on attachment 443589 [details]
Patch

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

> Source/WebKit/UIProcess/WebPageProxy.cpp:3272
> +    send(Messages::WebPage::ScrollBy(direction, static_cast<uint32_t>(granularity)));

Can you make the IPC message take the enum directly? You should be able to change WebPage.messages.in to use `enum:uint8_t WebCore::ScrollGranularity` or so.
Comment 7 Cameron McCormack (:heycam) 2021-11-08 19:56:51 PST
(In reply to Cameron McCormack (:heycam) from comment #6)
> Can you make the IPC message take the enum directly? You should be able to
> change WebPage.messages.in to use `enum:uint8_t WebCore::ScrollGranularity`
> or so.

And that might need doing some EnumTraits stuff to get that to work.

The rest of the patch looked fine, but I'll wait to see another version.
Comment 8 Radar WebKit Bug Importer 2021-11-09 13:45:23 PST
<rdar://problem/85219827>
Comment 9 Cameron McCormack (:heycam) 2021-11-09 17:38:51 PST
*** Bug 232575 has been marked as a duplicate of this bug. ***
Comment 10 Nikos Mouchtaris 2021-11-10 16:03:27 PST
Created attachment 443875 [details]
Patch
Comment 11 Nikos Mouchtaris 2021-11-10 17:22:59 PST
Created attachment 443879 [details]
Patch
Comment 12 Nikos Mouchtaris 2021-11-10 17:38:51 PST
Created attachment 443884 [details]
Patch
Comment 13 Cameron McCormack (:heycam) 2021-11-10 17:49:15 PST
Comment on attachment 443884 [details]
Patch

Looks good, thanks!
Comment 14 Nikos Mouchtaris 2021-11-10 23:00:34 PST
Created attachment 443913 [details]
Patch
Comment 15 EWS 2021-11-11 10:31:39 PST
Committed r285640 (244141@main): <https://commits.webkit.org/244141@main>

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