Bug 188777 - Replace booleans for modifier keys in UIEventWithKeyState with OptionSet<Modifier>
Summary: Replace booleans for modifier keys in UIEventWithKeyState with OptionSet<Modi...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords: InRadar
Depends on:
Blocks: 188720
  Show dependency treegraph
 
Reported: 2018-08-20 21:45 PDT by Ryosuke Niwa
Modified: 2019-02-06 09:18 PST (History)
13 users (show)

See Also:


Attachments
WIP (39.50 KB, patch)
2018-08-20 21:45 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Cleanup (47.90 KB, patch)
2018-08-21 14:23 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
WPE build fix (47.91 KB, patch)
2018-08-21 15:27 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Patch for landing (47.91 KB, patch)
2018-08-21 19:06 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2018-08-20 21:45:20 PDT
Replace booleans for control, alt, meta, etc... keys with OptionSet of modifiers.
Comment 1 Ryosuke Niwa 2018-08-20 21:45:49 PDT
Created attachment 347610 [details]
WIP
Comment 2 EWS Watchlist 2018-08-20 21:57:48 PDT
Attachment 347610 [details] did not pass style-queue:


ERROR: Source/WebCore/dom/MouseEvent.cpp:83:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/MouseEvent.cpp:83:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/SimulatedClick.cpp:47:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:41:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:41:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:41:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebCore/dom/MouseRelatedEvent.cpp:38:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/MouseRelatedEvent.cpp:38:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/MouseRelatedEvent.cpp:43:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
Total errors found: 9 in 19 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Ryosuke Niwa 2018-08-21 14:23:26 PDT
Created attachment 347694 [details]
Cleanup
Comment 4 EWS Watchlist 2018-08-21 14:25:22 PDT
Attachment 347694 [details] did not pass style-queue:


ERROR: Source/WebCore/dom/TouchEvent.cpp:41:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:41:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/MouseEvent.cpp:83:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/MouseEvent.cpp:83:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/SimulatedClick.cpp:47:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebCore/dom/MouseRelatedEvent.cpp:38:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/MouseRelatedEvent.cpp:38:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/MouseRelatedEvent.cpp:43:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
Total errors found: 8 in 23 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Radar WebKit Bug Importer 2018-08-21 14:28:13 PDT
<rdar://problem/43577361>
Comment 6 Ryosuke Niwa 2018-08-21 15:27:44 PDT
Created attachment 347711 [details]
WPE build fix
Comment 7 Simon Fraser (smfr) 2018-08-21 15:31:11 PDT
Comment on attachment 347694 [details]
Cleanup

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

> Source/WebCore/ChangeLog:8
> +        Replaced boolean arguments and instance variables for modififer keys (ctrl, alt, shift, and meta keys) in

modififer

> Source/WebCore/platform/PlatformEvent.h:73
> +    enum class Modifier : uint8_t {

I think this should be called Modifiers (or maybe ModifierKeys?)
Comment 8 Ryosuke Niwa 2018-08-21 15:49:25 PDT
(In reply to Simon Fraser (smfr) from comment #7)
> Comment on attachment 347694 [details]
> Cleanup
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=347694&action=review
> 
> > Source/WebCore/ChangeLog:8
> > +        Replaced boolean arguments and instance variables for modififer keys (ctrl, alt, shift, and meta keys) in
> 
> modififer

Fixed.

> > Source/WebCore/platform/PlatformEvent.h:73
> > +    enum class Modifier : uint8_t {
> 
> I think this should be called Modifiers (or maybe ModifierKeys?)

I think we ordinarily use singular noun for enum class itself.
Comment 9 EWS Watchlist 2018-08-21 16:16:03 PDT
Attachment 347711 [details] did not pass style-queue:


ERROR: Source/WebCore/dom/TouchEvent.cpp:41:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:41:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/MouseEvent.cpp:83:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/MouseEvent.cpp:83:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/SimulatedClick.cpp:47:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebCore/dom/MouseRelatedEvent.cpp:38:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/MouseRelatedEvent.cpp:38:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/MouseRelatedEvent.cpp:43:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
Total errors found: 8 in 23 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 10 Ryosuke Niwa 2018-08-21 19:06:50 PDT
Created attachment 347751 [details]
Patch for landing
Comment 11 Ryosuke Niwa 2018-08-21 19:07:02 PDT
Comment on attachment 347751 [details]
Patch for landing

Wait for EWS
Comment 12 EWS Watchlist 2018-08-21 19:08:55 PDT
Attachment 347751 [details] did not pass style-queue:


ERROR: Source/WebCore/dom/TouchEvent.cpp:41:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:41:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/MouseEvent.cpp:83:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/MouseEvent.cpp:83:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/SimulatedClick.cpp:47:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebCore/dom/MouseRelatedEvent.cpp:38:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/MouseRelatedEvent.cpp:38:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/MouseRelatedEvent.cpp:43:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
Total errors found: 8 in 23 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 13 Ryosuke Niwa 2018-08-21 21:41:07 PDT
Comment on attachment 347751 [details]
Patch for landing

Clearing flags on attachment: 347751

Committed r235158: <https://trac.webkit.org/changeset/235158>
Comment 14 Ryosuke Niwa 2018-08-21 21:41:09 PDT
All reviewed patches have been landed.  Closing bug.
Comment 15 Lucas Forschler 2019-02-06 09:18:30 PST
Mass move bugs into the DOM component.