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

Issue 404203003: Distinguish between keystroke and character events. (Closed)

Created:
6 years, 5 months ago by kpschoedel
Modified:
6 years, 5 months ago
CC:
chromium-reviews, sadrul, nkostylev+watch_chromium.org, viettrungluu+watch_chromium.org, nasko+codewatch_chromium.org, yzshen+watch_chromium.org, yukishiino+watch_chromium.org, davemoore+watch_chromium.org, ben+aura_chromium.org, Ilya Sherman, yusukes+watch_chromium.org, extensions-reviews_chromium.org, tdanderson+views_chromium.org, benquan, stevenjb+watch_chromium.org, jam, ben+mojo_chromium.org, abarth-chromium, nona+watch_chromium.org, darin-cc_chromium.org, chromium-apps-reviews_chromium.org, ozone-reviews_chromium.org, rjkroege, creis+watch_chromium.org, tdresser+watch_chromium.org, qsr+mojo_chromium.org, penghuang+watch_chromium.org, oshima+watch_chromium.org, kalyank, ben+views_chromium.org, rouslan+autofillwatch_chromium.org, chrome-apps-syd-reviews_chromium.org, tfarina, Aaron Boodman, Dane Wallinga, dyu1, estade+watch_chromium.org, darin (slow to review), James Su, ben+ash_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Distinguish between keystroke and character events. As described in its class comment, a ui::KeyEvent can be either of two distinct kinds. When constructing a ui::KeyEvent from a native event, the distinction is made by a new IsCharFromNative() call, in the same way that other ui::Event properties are determined, instead of having the caller inspect the native event itself. Removing the redundant |is_char| parameter from constructors also prevent accidental synthetic `mixed' events that consuming code does not handle. Incidentally, while KeyEvent constructor calls are being touched, use EF_NONE instead of 0 to make that argument's purpose clear. BUG=380349 TEST=unit_tests,ash_unittests,events_unittests,ui_unittests,interactive_ui_tests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=285605

Patch Set 1 : Distinguish between keystroke and character events. #

Patch Set 2 : rebase #

Patch Set 3 : rebase #

Patch Set 4 : ozone fix #

Patch Set 5 : IsCharFromNative() for Mac build #

Unified diffs Side-by-side diffs Delta from patch set Stats (+373 lines, -275 lines) Patch
M ash/accelerators/accelerator_controller_unittest.cc View 1 chunk +6 lines, -6 lines 0 comments Download
M ash/accelerators/accelerator_filter_unittest.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M ash/accelerators/key_hold_detector.cc View 1 chunk +1 line, -1 line 0 comments Download
M ash/accelerators/magnifier_key_scroller_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M ash/keyboard_overlay/keyboard_overlay_view_unittest.cc View 1 chunk +1 line, -2 lines 0 comments Download
M ash/shelf/shelf.cc View 1 chunk +1 line, -2 lines 0 comments Download
M ash/shelf/shelf_tooltip_manager_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M ash/sticky_keys/sticky_keys_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M ash/wm/window_manager_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/events/event_rewriter.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/events/event_rewriter_unittest.cc View 10 chunks +10 lines, -10 lines 0 comments Download
M chrome/browser/chromeos/events/keyboard_driven_event_rewriter_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/input_method/input_method_engine.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/input_method/input_method_engine_browsertests.cc View 8 chunks +8 lines, -14 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/views/autofill/autofill_dialog_views_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/extensions/media_galleries_dialog_views_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/web_input_event_aura_unittest.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M content/browser/web_contents/aura/window_slider_unittest.cc View 1 chunk +1 line, -4 lines 0 comments Download
M content/renderer/render_view_browsertest.cc View 1 2 3 6 chunks +18 lines, -16 lines 0 comments Download
M mojo/examples/window_manager/window_manager.cc View 1 2 1 chunk +14 lines, -6 lines 0 comments Download
M mojo/services/public/cpp/input_events/lib/input_events_type_converters.cc View 1 2 1 chunk +15 lines, -8 lines 0 comments Download
M ui/app_list/views/apps_grid_view_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/app_list/views/search_box_view_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/app_list/views/search_result_list_view_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/app_list/views/test/apps_grid_view_test_api.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/aura/remote_window_tree_host_win.cc View 1 chunk +6 lines, -2 lines 0 comments Download
M ui/aura/window_event_dispatcher_unittest.cc View 2 chunks +5 lines, -5 lines 0 comments Download
M ui/aura/window_tree_host_x11.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M ui/base/ime/input_method_auralinux.cc View 1 chunk +1 line, -2 lines 0 comments Download
M ui/base/ime/input_method_chromeos.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M ui/base/ime/input_method_chromeos_unittest.cc View 6 chunks +7 lines, -7 lines 0 comments Download
M ui/base/ime/input_method_win.cc View 1 chunk +1 line, -2 lines 0 comments Download
M ui/base/ime/remote_input_method_win_unittest.cc View 4 chunks +4 lines, -5 lines 0 comments Download
M ui/chromeos/touch_exploration_controller.cc View 1 2 1 chunk +6 lines, -6 lines 0 comments Download
M ui/chromeos/touch_exploration_controller_unittest.cc View 1 2 1 chunk +6 lines, -6 lines 0 comments Download
M ui/events/cocoa/events_mac.mm View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M ui/events/event.h View 5 chunks +49 lines, -13 lines 0 comments Download
M ui/events/event.cc View 3 chunks +15 lines, -9 lines 0 comments Download
M ui/events/event_processor_unittest.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M ui/events/event_unittest.cc View 10 chunks +45 lines, -48 lines 0 comments Download
M ui/events/event_utils.h View 1 chunk +4 lines, -0 lines 0 comments Download
M ui/events/event_utils.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/events/events_stub.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M ui/events/ozone/evdev/key_event_converter_evdev.cc View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M ui/events/ozone/events_ozone.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M ui/events/test/event_generator.cc View 3 chunks +6 lines, -6 lines 0 comments Download
M ui/events/test/events_test_utils.h View 1 chunk +17 lines, -0 lines 0 comments Download
M ui/events/test/events_test_utils.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M ui/events/win/events_win.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M ui/events/x/events_x.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M ui/events/x/events_x_unittest.cc View 5 chunks +13 lines, -4 lines 0 comments Download
M ui/keyboard/keyboard_util.cc View 3 chunks +6 lines, -6 lines 0 comments Download
M ui/platform_window/win/win_window.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M ui/platform_window/x11/x11_window.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M ui/views/controls/combobox/combobox_unittest.cc View 2 chunks +5 lines, -5 lines 0 comments Download
M ui/views/controls/menu/menu_controller_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/table/table_view_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/textfield/textfield_unittest.cc View 1 2 chunks +2 lines, -3 lines 0 comments Download
M ui/views/focus/focus_manager_unittest.cc View 1 chunk +4 lines, -8 lines 0 comments Download
M ui/views/ime/mock_input_method.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/views/view_targeter_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc View 1 2 chunks +6 lines, -2 lines 0 comments Download
M ui/views/widget/root_view_unittest.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M ui/views/widget/widget_unittest.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M ui/views/win/hwnd_message_handler.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/window/dialog_delegate_unittest.cc View 2 chunks +5 lines, -3 lines 0 comments Download
M ui/wm/core/compound_event_filter_unittest.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M ui/wm/core/input_method_event_filter_unittest.cc View 1 chunk +1 line, -2 lines 0 comments Download
M ui/wm/core/nested_accelerator_dispatcher_linux.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/wm/core/nested_accelerator_dispatcher_win.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/wm/core/user_activity_detector_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
kpschoedel
6 years, 5 months ago (2014-07-22 23:06:48 UTC) #1
sadrul
+ben@ since I am not that familiar with events on Windows. (the main change in ...
6 years, 5 months ago (2014-07-23 02:03:55 UTC) #2
Ben Goodger (Google)
Looks like a good improvement. lgtm
6 years, 5 months ago (2014-07-23 16:14:23 UTC) #3
sadrul
lgtm++ (make sure you run through the ecs_ozone trybot)
6 years, 5 months ago (2014-07-23 16:57:49 UTC) #4
kpschoedel
The CQ bit was checked by kpschoedel@chromium.org
6 years, 5 months ago (2014-07-24 16:33:56 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kpschoedel@chromium.org/404203003/310001
6 years, 5 months ago (2014-07-24 16:35:36 UTC) #6
kpschoedel
The CQ bit was checked by kpschoedel@chromium.org
6 years, 5 months ago (2014-07-25 14:25:44 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kpschoedel@chromium.org/404203003/330001
6 years, 5 months ago (2014-07-25 14:26:32 UTC) #8
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_gpu_triggered_tests on tryserver.chromium.gpu ...
6 years, 5 months ago (2014-07-25 16:13:35 UTC) #9
commit-bot: I haz the power
6 years, 5 months ago (2014-07-25 17:10:34 UTC) #10
Message was sent while issue was closed.
Change committed as 285605

Powered by Google App Engine
This is Rietveld 408576698