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

Issue 2569273002: Add constructors to WebInputEvents and setters so we can work at cleaning up these public structs. (Closed)

Created:
4 years ago by dtapuska
Modified:
3 years, 10 months ago
CC:
anandc+watch-blimp_chromium.org, apavlov+blink_chromium.org, asanka, bgoldman+watch-blimp_chromium.org, blink-reviews, blink-reviews-api_chromium.org, browser-components-watch_chromium.org, caseq+blink_chromium.org, cbentzel+watch_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, creis+watch_chromium.org, csharrison+watch_chromium.org, darin-cc_chromium.org, devtools-reviews_chromium.org, dglazkov+blink, dtapuska+chromiumwatch_chromium.org, dtapuska+blinkwatch_chromium.org, dtrainor+watch-blimp_chromium.org, einbinder+watch-test-runner_chromium.org, estade+watch_chromium.org, extensions-reviews_chromium.org, gcasto+watchlist_chromium.org, gcasto+watch-blimp_chromium.org, jam, jdonnelly+autofillwatch_chromium.org, jochen+watch_chromium.org, khushalsagar+watch-blimp_chromium.org, kinuko+watch, kmarshall+watch-blimp_chromium.org, kozyatinskiy+blink_chromium.org, lethalantidote+watch-blimp_chromium.org, loading-reviews+metrics_chromium.org, lushnikov+blink_chromium.org, maniscalco+watch-blimp_chromium.org, marcinjb+watch-blimp_chromium.org, mathp+autofillwatch_chromium.org, mlamouri+watch-test-runner_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, nona+watch_chromium.org, nyquist+watch-blimp_chromium.org, Navid Zolghadr, perumaal+watch-blimp_chromium.org, pfeldman, pfeldman+blink_chromium.org, piman+watch_chromium.org, rouslan+autofill_chromium.org, scf+watch-blimp_chromium.org, scheduler-bugs_chromium.org, sebsg+autofillwatch_chromium.org, shaktisahu+watch-blimp_chromium.org, shuchen+watch_chromium.org, sriramsr+watch-blimp_chromium.org, steimel+watch-blimp_chromium.org, James Su, tdresser+watch_chromium.org, vabr+watchlistautofill_chromium.org, vabr+watchlistpasswordmanager_chromium.org, yusukes+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add constructors to WebInputEvents and setters so we can work at cleaning up these public structs. Adding constructors allow us to ensure that certain fields such as the timestamp are initialized correctly without having to default initialize it with a slow API call like querying the current time. Design: https://docs.google.com/document/d/1s4Lfy22CNU1OZ5Rec6Oano_5BvIhdK6uFVsVe7FphKI/edit BUG=625684 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation TBR=wez@chromium.org, thestig@chromium.org, dcheng@chromium.org, clamy@chromium.org Committed: https://crrev.com/899ac22255a8d7856d70e41425469e977e0d9f61 Cr-Commit-Position: refs/heads/master@{#441153}

Patch Set 1 #

Patch Set 2 : Fix build #

Patch Set 3 : Fix mac #

Patch Set 4 : Fix event sender #

Patch Set 5 : Fix mouse up event sender not modifying modifiers #

Total comments: 31

Patch Set 6 : Fix nits #

Patch Set 7 : Move NoModifiers back to bottom of enum #

Patch Set 8 : Rebase #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+1527 lines, -1289 lines) Patch
M blimp/client/core/input/blimp_input_manager.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M blimp/engine/browser_tests/input_browsertest.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M blimp/engine/feature/engine_render_widget_feature_unittest.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M blimp/net/input_message_converter.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M blimp/net/input_message_unittest.cc View 1 2 3 4 5 9 chunks +32 lines, -31 lines 0 comments Download
M chrome/browser/apps/guest_view/web_view_browsertest.cc View 1 2 3 4 5 5 chunks +16 lines, -12 lines 0 comments Download
M chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/autofill/autofill_interactive_uitest.cc View 1 2 3 4 5 3 chunks +7 lines, -4 lines 0 comments Download
M chrome/browser/download/download_browsertest.cc View 2 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc View 3 chunks +12 lines, -9 lines 0 comments Download
M chrome/browser/extensions/api/web_request/web_request_apitest.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/browser/page_load_metrics/observers/core_page_load_metrics_observer_unittest.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/page_load_metrics/observers/from_gws_page_load_metrics_observer_unittest.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/page_load_metrics/user_input_tracker_unittest.cc View 7 chunks +20 lines, -17 lines 1 comment Download
M chrome/browser/password_manager/password_generation_interactive_uitest.cc View 1 2 3 4 5 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/policy/policy_browsertest.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/browser/referrer_policy_browsertest.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc View 3 chunks +8 lines, -6 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_utils_unittest.mm View 1 2 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/browser/ui/exclusive_access/fullscreen_controller_test.cc View 1 2 3 4 5 2 chunks +4 lines, -1 line 0 comments Download
M components/printing/test/print_web_view_helper_browsertest.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M components/test_runner/event_sender.h View 1 2 3 4 5 2 chunks +4 lines, -4 lines 0 comments Download
M components/test_runner/event_sender.cc View 1 2 3 4 5 32 chunks +141 lines, -148 lines 0 comments Download
M components/test_runner/text_input_controller.cc View 2 chunks +5 lines, -3 lines 0 comments Download
M content/browser/devtools/protocol/input_handler.cc View 1 2 3 4 5 6 7 6 chunks +115 lines, -74 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_guest.cc View 1 2 3 4 5 2 chunks +7 lines, -3 lines 0 comments Download
M content/browser/renderer_host/input/input_router_impl_perftest.cc View 6 chunks +10 lines, -8 lines 0 comments Download
M content/browser/renderer_host/input/input_router_impl_unittest.cc View 3 chunks +5 lines, -5 lines 0 comments Download
M content/browser/renderer_host/input/mock_input_ack_handler.h View 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/input/mock_input_ack_handler.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/input/mouse_wheel_event_queue.cc View 1 2 3 4 4 chunks +8 lines, -8 lines 0 comments Download
M content/browser/renderer_host/input/mouse_wheel_event_queue_unittest.cc View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M content/browser/renderer_host/input/render_widget_host_latency_tracker_unittest.cc View 1 2 3 4 5 6 7 5 chunks +7 lines, -6 lines 0 comments Download
M content/browser/renderer_host/input/synthetic_mouse_driver.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/input/synthetic_smooth_move_gesture.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/input/synthetic_touch_driver.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -3 lines 0 comments Download
M content/browser/renderer_host/input/touch_action_filter.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M content/browser/renderer_host/input/touch_emulator.h View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M content/browser/renderer_host/input/touch_emulator.cc View 3 chunks +26 lines, -26 lines 0 comments Download
M content/browser/renderer_host/input/touch_emulator_unittest.cc View 1 2 3 4 5 4 chunks +5 lines, -14 lines 0 comments Download
M content/browser/renderer_host/input/touch_event_queue.cc View 1 2 3 4 5 2 chunks +4 lines, -4 lines 0 comments Download
M content/browser/renderer_host/input/touch_event_queue_unittest.cc View 24 chunks +68 lines, -49 lines 0 comments Download
M content/browser/renderer_host/input/web_input_event_builders_android.cc View 4 chunks +6 lines, -15 lines 0 comments Download
M content/browser/renderer_host/input/web_input_event_util_unittest.cc View 1 chunk +4 lines, -5 lines 0 comments Download
M content/browser/renderer_host/native_web_keyboard_event_android.cc View 1 2 3 4 5 2 chunks +14 lines, -4 lines 0 comments Download
M content/browser/renderer_host/native_web_keyboard_event_aura.cc View 1 2 3 4 5 2 chunks +14 lines, -5 lines 0 comments Download
M content/browser/renderer_host/native_web_keyboard_event_mac.mm View 1 1 chunk +14 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 2 3 4 5 6 7 2 chunks +6 lines, -6 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_input_event_router.cc View 9 chunks +16 lines, -15 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_unittest.cc View 1 2 3 4 5 6 chunks +8 lines, -9 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_event_handler.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/site_per_process_browsertest.cc View 1 2 3 4 5 24 chunks +62 lines, -45 lines 0 comments Download
M content/browser/web_contents/web_contents_view_aura_browsertest.cc View 1 2 3 4 5 2 chunks +5 lines, -2 lines 0 comments Download
M content/common/input/event_with_latency_info.h View 1 2 3 4 5 2 chunks +7 lines, -1 line 0 comments Download
M content/common/input/event_with_latency_info.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/common/input/event_with_latency_info_unittest.cc View 4 chunks +19 lines, -24 lines 0 comments Download
M content/common/input/input_param_traits_unittest.cc View 1 2 3 4 5 6 7 1 chunk +16 lines, -10 lines 0 comments Download
M content/common/input/synthetic_web_input_event_builders.h View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M content/common/input/synthetic_web_input_event_builders.cc View 1 2 3 4 5 11 chunks +27 lines, -29 lines 0 comments Download
M content/common/input/web_touch_event_traits.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/public/browser/native_web_keyboard_event.h View 2 chunks +7 lines, -1 line 0 comments Download
M content/public/test/browser_test_utils.cc View 1 2 3 4 5 12 chunks +44 lines, -33 lines 0 comments Download
M content/public/test/render_view_test.cc View 6 chunks +21 lines, -15 lines 0 comments Download
M content/renderer/gpu/gpu_benchmarking_extension.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M content/renderer/input/input_event_filter.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/input/input_event_filter_unittest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/input/main_thread_event_queue_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/pepper/event_conversion.cc View 1 2 3 4 5 5 chunks +27 lines, -31 lines 0 comments Download
M content/renderer/pepper/plugin_instance_throttler_impl_unittest.cc View 3 chunks +10 lines, -9 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -5 lines 0 comments Download
M content/renderer/render_view_browsertest.cc View 1 2 3 4 5 6 7 3 chunks +5 lines, -3 lines 0 comments Download
M content/renderer/render_widget_fullscreen_pepper.cc View 1 2 3 4 5 3 chunks +15 lines, -17 lines 0 comments Download
M content/renderer/render_widget_unittest.cc View 1 2 3 4 5 2 chunks +5 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/input/KeyboardEventManager.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc View 1 2 3 4 5 6 7 1 chunk +6 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/web/LinkHighlightImplTest.cpp View 1 2 3 4 5 3 chunks +9 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.cpp View 1 2 3 4 5 6 7 5 chunks +12 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/web/tests/BrowserControlsTest.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/tests/ChromeClientImplTest.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp View 1 2 3 4 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/web/tests/ImeOnFocusTest.cpp View 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/tests/KeyboardTest.cpp View 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/web/tests/LinkSelectionTest.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/RootScrollerTest.cpp View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/tests/TouchActionTest.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/tests/VisualViewportTest.cpp View 1 2 3 4 5 6 7 3 chunks +7 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp View 1 2 3 4 5 6 7 3 chunks +13 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp View 1 2 3 4 5 32 chunks +96 lines, -67 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp View 1 2 3 4 5 3 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebViewTest.cpp View 1 2 3 4 5 6 7 23 chunks +87 lines, -71 lines 0 comments Download
M third_party/WebKit/public/platform/WebGestureEvent.h View 1 2 3 4 5 1 chunk +8 lines, -4 lines 0 comments Download
M third_party/WebKit/public/platform/WebInputEvent.h View 1 2 3 4 5 6 7 chunks +53 lines, -37 lines 0 comments Download
M third_party/WebKit/public/platform/WebMouseWheelEvent.h View 1 2 3 4 5 2 chunks +19 lines, -2 lines 0 comments Download
M ui/events/blink/blink_event_util.cc View 1 2 3 4 5 4 chunks +25 lines, -26 lines 0 comments Download
M ui/events/blink/event_with_callback.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M ui/events/blink/input_handler_proxy.cc View 1 2 3 4 5 3 chunks +4 lines, -5 lines 0 comments Download
M ui/events/blink/input_handler_proxy_unittest.cc View 1 2 3 4 5 89 chunks +131 lines, -135 lines 0 comments Download
M ui/events/blink/input_scroll_elasticity_controller_unittest.cc View 1 2 3 4 5 3 chunks +15 lines, -13 lines 0 comments Download
M ui/events/blink/web_input_event.cc View 6 chunks +60 lines, -54 lines 0 comments Download
M ui/events/blink/web_input_event_traits_unittest.cc View 1 2 3 4 5 1 chunk +12 lines, -10 lines 0 comments Download

Messages

Total messages: 61 (42 generated)
dtapuska
esprehn@ can you provide feedback on this. The goal is to move WebInputEvent* away from ...
4 years ago (2016-12-14 18:50:29 UTC) #21
esprehn
This seems reasonable to me, though I thought we used to use memset for speed ...
4 years ago (2016-12-14 19:03:50 UTC) #22
dtapuska
On 2016/12/14 19:03:50, esprehn wrote: > This seems reasonable to me, though I thought we ...
4 years ago (2016-12-14 19:05:55 UTC) #23
esprehn
On 2016/12/14 at 19:05:55, dtapuska wrote: > On 2016/12/14 19:03:50, esprehn wrote: > > This ...
4 years ago (2016-12-14 19:07:47 UTC) #24
majidvp
I definitely support the idea of cleaning up the initialization by requiring the fields in ...
4 years ago (2016-12-19 20:09:53 UTC) #29
dtapuska
https://codereview.chromium.org/2569273002/diff/80001/blimp/client/core/input/blimp_input_manager.cc File blimp/client/core/input/blimp_input_manager.cc (right): https://codereview.chromium.org/2569273002/diff/80001/blimp/client/core/input/blimp_input_manager.cc#newcode84 blimp/client/core/input/blimp_input_manager.cc:84: web_gesture.setModifiers(0); On 2016/12/19 20:09:52, majidvp wrote: > s/0/NoModifiers/ Done. ...
4 years ago (2016-12-20 19:49:21 UTC) #32
majidvp
lgtm. I should note that the patch also catches and fixes some pre-existing issues where ...
4 years ago (2016-12-21 15:49:45 UTC) #37
dtapuska
On 2016/12/21 15:49:45, majidvp wrote: > lgtm. > > I should note that the patch ...
4 years ago (2016-12-22 00:05:54 UTC) #38
esprehn
This patch is so incredibly massive it's very hard to review. Does it change behavior? ...
4 years ago (2016-12-22 02:33:13 UTC) #39
dtapuska
rbyers@chromium.org: Please review changes in event_sender.[cc|h]
3 years, 11 months ago (2017-01-03 14:58:51 UTC) #43
Rick Byers
event_sender LGTM
3 years, 11 months ago (2017-01-03 15:39:25 UTC) #44
dtapuska
wez@chromium.org: Please review changes in blimp/* clamy@chromium.org: Please review changes in content/* thestig@chromium.org: Please review ...
3 years, 11 months ago (2017-01-03 15:48:03 UTC) #46
dtapuska
On 2017/01/03 15:48:03, dtapuska wrote: > mailto:wez@chromium.org: Please review changes in > blimp/* > > ...
3 years, 11 months ago (2017-01-03 18:02:17 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2569273002/140001
3 years, 11 months ago (2017-01-03 18:03:01 UTC) #53
commit-bot: I haz the power
Committed patchset #8 (id:140001)
3 years, 11 months ago (2017-01-03 18:09:56 UTC) #56
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/899ac22255a8d7856d70e41425469e977e0d9f61 Cr-Commit-Position: refs/heads/master@{#441153}
3 years, 11 months ago (2017-01-03 18:12:28 UTC) #58
Wez
blimp/ LGTM
3 years, 11 months ago (2017-01-04 00:02:27 UTC) #59
dcheng
content/common/input/input_param_traits_unittest.cc lgtm
3 years, 11 months ago (2017-01-04 00:34:52 UTC) #60
Lei Zhang
3 years, 10 months ago (2017-02-24 08:43:23 UTC) #61
Message was sent while issue was closed.
components/printing/test/print_web_view_helper_browsertest.cc
and chrome/ lgtm

https://codereview.chromium.org/2569273002/diff/140001/chrome/browser/page_lo...
File chrome/browser/page_load_metrics/user_input_tracker_unittest.cc (right):

https://codereview.chromium.org/2569273002/diff/140001/chrome/browser/page_lo...
chrome/browser/page_load_metrics/user_input_tracker_unittest.cc:25:
FakeInputEvent(blink::WebInputEvent::Type type = blink::WebInputEvent::Char,
I'm personally biased again default arguments. You could have made this without
default arguments and added a default ctor that delegates to this one. That
would cover everything except the IgnoredEventType case.

But this is also a test, and it's not my code. So I'm meh more about it. Maybe
mention this to bmcquade and see if there's a stronger preference?

Powered by Google App Engine
This is Rietveld 408576698