Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Issue 1559163002: Clean up event flags a bit: (Closed)

Created:
4 years, 11 months ago by Peter Kasting
Modified:
4 years, 11 months ago
Reviewers:
reveman, Shu Chen, sadrul, sky
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, davemoore+watch_chromium.org, jam, kalyank, nona+watch_chromium.org, oshima+watch_chromium.org, ozone-reviews_chromium.org, qsr+mojo_chromium.org, rjkroege, sadrul, shuchen+watch_chromium.org, James Su, tdresser+watch_chromium.org, tfarina, viettrungluu+watch_chromium.org, yusukes+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Clean up event flags a bit: * Reorder to group related items together. Add group comments. * Rename {NUM,CAPS,SCROLL}_LOCK_DOWN to ..._ON, in hopes of avoiding confusion as to whether the event is about one of these keys actually being pressed down versus just conveying the current state of the various locks. * Rename EF_EXTENDED to EF_IS_EXTENDED_KEY in hopes of greater clarity. Move it to the KeyEvent-specific enum since it's non-sensical for non-KeyEvents. * Expose MouseEvent::button_flags() since a couple callers outside the class wanted it. * Move Event::IsRepeat() to KeyEvent (to match the enum placement) and rename it unix_hacker()-style. (There are a ton of other functions in event.h that should be named that way, but there's only so much drudgery I can stand.) * Add some missing bits: missing static_asserts in the Mojo code that didn't check all enum values were equal, a missing SCROLL_LOCK_ON check in the exo code that would have no functional effect but looked unduly suspicious. * Attempt to reorder code to either check/use these enum values in the same order they're declared, or, in cases like code mapping GTK enum values to these values, in the order of the GTK enum values (and similar). BUG=none TEST=none Committed: https://crrev.com/cc7f6acc589a1be4c65a9562f77596278f62d561 Cr-Commit-Position: refs/heads/master@{#368456}

Patch Set 1 #

Patch Set 2 : Compile fix #

Total comments: 1

Patch Set 3 : Compile fix #

Total comments: 2

Patch Set 4 : Review comment #

Total comments: 3

Patch Set 5 : Review comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+255 lines, -258 lines) Patch
M ash/accelerators/accelerator_filter_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ash/autoclick/autoclick_controller.cc View 1 chunk +3 lines, -6 lines 0 comments Download
M ash/content/keyboard_overlay/keyboard_overlay_view_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/events/event_rewriter.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/events/event_rewriter_unittest.cc View 1 2 3 4 6 chunks +25 lines, -29 lines 0 comments Download
M chrome/browser/chromeos/input_method/input_method_engine.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/input_method/input_method_engine_browsertests.cc View 1 2 3 4 2 chunks +4 lines, -8 lines 0 comments Download
M chrome/browser/ui/libgtk2ui/gtk2_util.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/exo/keyboard.cc View 1 2 3 4 1 chunk +6 lines, -4 lines 0 comments Download
M components/exo/pointer.cc View 1 chunk +2 lines, -6 lines 0 comments Download
M components/exo/wayland/server.cc View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M components/mus/public/cpp/lib/event_matcher.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M components/mus/public/interfaces/input_event_constants.mojom View 1 chunk +15 lines, -16 lines 0 comments Download
M components/mus/ws/event_dispatcher_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/input/web_input_event_util.cc View 1 chunk +6 lines, -7 lines 0 comments Download
M mojo/converters/blink/blink_input_events_type_converters.cc View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M mojo/converters/input_events/input_events_type_converters.cc View 3 chunks +26 lines, -16 lines 0 comments Download
M ui/aura/remote_window_tree_host_win.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/aura/remote_window_tree_host_win.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/aura/window_event_dispatcher.cc View 2 chunks +3 lines, -9 lines 0 comments Download
M ui/base/accelerators/accelerator.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M ui/base/ime/chromeos/character_composer.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M ui/base/ime/chromeos/character_composer_unittest.cc View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M ui/base/ime/input_method_chromeos.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M ui/content_accelerators/accelerator_util.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ui/events/android/motion_event_android.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/events/blink/blink_event_util.cc View 1 chunk +7 lines, -8 lines 0 comments Download
M ui/events/cocoa/cocoa_event_utils.mm View 1 chunk +1 line, -1 line 0 comments Download
M ui/events/cocoa/events_mac_unittest.mm View 1 chunk +1 line, -2 lines 0 comments Download
M ui/events/event.h View 1 2 3 4 5 chunks +14 lines, -13 lines 0 comments Download
M ui/events/event.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/events/event_constants.h View 1 chunk +32 lines, -23 lines 0 comments Download
M ui/events/event_unittest.cc View 1 2 3 4 3 chunks +24 lines, -24 lines 0 comments Download
M ui/events/gesture_detection/gesture_provider_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M ui/events/gestures/motion_event_aura_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/events/keycodes/keyboard_code_conversion.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M ui/events/ozone/evdev/event_modifiers_evdev.h View 1 chunk +4 lines, -4 lines 0 comments Download
M ui/events/ozone/evdev/event_modifiers_evdev.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M ui/events/ozone/evdev/keyboard_evdev.cc View 1 2 3 4 4 chunks +6 lines, -6 lines 0 comments Download
M ui/events/ozone/layout/layout_util.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc View 1 2 3 4 1 chunk +4 lines, -4 lines 0 comments Download
M ui/events/test/events_test_utils_x11.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M ui/events/win/events_win.cc View 2 chunks +8 lines, -8 lines 0 comments Download
M ui/events/x/events_x.cc View 2 chunks +10 lines, -9 lines 0 comments Download
M ui/views/controls/textfield/textfield_unittest.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M ui/views/test/event_generator_delegate_mac.mm View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 22 (7 generated)
Peter Kasting
https://codereview.chromium.org/1559163002/diff/20001/chrome/browser/chromeos/events/event_rewriter_unittest.cc File chrome/browser/chromeos/events/event_rewriter_unittest.cc (right): https://codereview.chromium.org/1559163002/diff/20001/chrome/browser/chromeos/events/event_rewriter_unittest.cc#newcode961 chrome/browser/chromeos/events/event_rewriter_unittest.cc:961: EXPECT_EQ(GetExpectedResultAsString( Note: The formatting changes in this file and ...
4 years, 11 months ago (2016-01-05 03:29:24 UTC) #3
sadrul
lgtm https://codereview.chromium.org/1559163002/diff/40001/ui/content_accelerators/accelerator_util.cc File ui/content_accelerators/accelerator_util.cc (right): https://codereview.chromium.org/1559163002/diff/40001/ui/content_accelerators/accelerator_util.cc#newcode42 ui/content_accelerators/accelerator_util.cc:42: if (event.os_event && event.os_event->IsKeyEvent() && It shouldn't be ...
4 years, 11 months ago (2016-01-06 17:42:12 UTC) #4
Peter Kasting
Adding OWNERS: sky: ash/, components/mus/, mojo/ shuchen: chrome/browser/chromeos/input_method/ reveman: components/exo/ https://codereview.chromium.org/1559163002/diff/40001/ui/content_accelerators/accelerator_util.cc File ui/content_accelerators/accelerator_util.cc (right): https://codereview.chromium.org/1559163002/diff/40001/ui/content_accelerators/accelerator_util.cc#newcode42 ...
4 years, 11 months ago (2016-01-06 20:25:15 UTC) #6
Shu Chen
lgtm for chrome/browser/chromeos/input_method/...
4 years, 11 months ago (2016-01-06 20:38:49 UTC) #7
sky
LGTM
4 years, 11 months ago (2016-01-06 21:56:37 UTC) #8
reveman
lgtm with nit https://codereview.chromium.org/1559163002/diff/60001/components/exo/keyboard.cc File components/exo/keyboard.cc (right): https://codereview.chromium.org/1559163002/diff/60001/components/exo/keyboard.cc#newcode42 components/exo/keyboard.cc:42: ui::EF_NUM_LOCK_ON | ui::EF_CAPS_LOCK_ON | ui::EF_SCROLL_LOCK_ON; nit: ...
4 years, 11 months ago (2016-01-07 12:02:59 UTC) #9
Peter Kasting
https://codereview.chromium.org/1559163002/diff/60001/components/exo/keyboard.cc File components/exo/keyboard.cc (right): https://codereview.chromium.org/1559163002/diff/60001/components/exo/keyboard.cc#newcode42 components/exo/keyboard.cc:42: ui::EF_NUM_LOCK_ON | ui::EF_CAPS_LOCK_ON | ui::EF_SCROLL_LOCK_ON; On 2016/01/07 12:02:59, reveman ...
4 years, 11 months ago (2016-01-07 12:15:24 UTC) #10
reveman
https://codereview.chromium.org/1559163002/diff/60001/components/exo/keyboard.cc File components/exo/keyboard.cc (right): https://codereview.chromium.org/1559163002/diff/60001/components/exo/keyboard.cc#newcode42 components/exo/keyboard.cc:42: ui::EF_NUM_LOCK_ON | ui::EF_CAPS_LOCK_ON | ui::EF_SCROLL_LOCK_ON; On 2016/01/07 at 12:15:24, ...
4 years, 11 months ago (2016-01-07 12:32:37 UTC) #11
Peter Kasting
On 2016/01/07 12:32:37, reveman wrote: > On 2016/01/07 at 12:15:24, Peter Kasting wrote: > > ...
4 years, 11 months ago (2016-01-07 13:15:54 UTC) #12
reveman
On 2016/01/07 at 13:15:54, pkasting wrote: > On 2016/01/07 12:32:37, reveman wrote: > > On ...
4 years, 11 months ago (2016-01-08 12:01:53 UTC) #13
Peter Kasting
On 2016/01/08 12:01:53, reveman wrote: > On 2016/01/07 at 13:15:54, pkasting wrote: > > On ...
4 years, 11 months ago (2016-01-08 21:26:07 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1559163002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1559163002/80001
4 years, 11 months ago (2016-01-08 21:26:59 UTC) #17
reveman
lgtm
4 years, 11 months ago (2016-01-08 21:31:13 UTC) #18
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 11 months ago (2016-01-08 23:38:57 UTC) #20
commit-bot: I haz the power
4 years, 11 months ago (2016-01-08 23:40:30 UTC) #22
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/cc7f6acc589a1be4c65a9562f77596278f62d561
Cr-Commit-Position: refs/heads/master@{#368456}

Powered by Google App Engine
This is Rietveld 408576698