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

Issue 247433003: Mark touchcancel events as uncancelable (Closed)

Created:
6 years, 8 months ago by Rick Byers
Modified:
6 years, 8 months ago
CC:
chromium-reviews, darin-cc_chromium.org, nasko+codewatch_chromium.org, jam, jochen+watch_chromium.org, creis+watch_chromium.org
Visibility:
Public.

Description

Mark touchcancel events as uncancelable The touch events spec says that all touch events are cancelable except for touchcancel, and this is exposed to JS via the cancelable property. Previously we were marking all touch events as cancelable, but as of https://src.chromium.org/viewvc/blink?revision=172329&view=revision the decision is up to the browser (since only it can decide if it will wait for an ACK). This change ensures all touchcancel events are marked as uncancelable, and all other touch events remain cancelable. There are a lot of different places that create WebTouchEvents, and we don't want some central location (like the InputRouter) to be modifying these events. So I've added a WebTouchEventTraits::ResetType function to reset properties of a WebTouchEvent, applying appropriate default policy like cancelable state. Then we can DCHECK at the central location that an a event is cancelable if and only if we intend to wait for it's ACK. I've updated a handful of unit tests to verify that the cancelable bit is set correctly in various scenarios. This also extends EventSender to allow the cancelable bit to be set so that we can add a blink LayoutTest, and removes an unused SyntheticWebTouchEventBuilder. BUG=365681 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=265991

Patch Set 1 #

Total comments: 2

Patch Set 2 : jdduke CR fix #

Patch Set 3 : Clean up and add tests #

Total comments: 16

Patch Set 4 : jdduke cr #

Total comments: 1

Patch Set 5 : avi CR feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+232 lines, -139 lines) Patch
M content/browser/frame_host/render_widget_host_view_guest.cc View 1 2 3 4 2 chunks +7 lines, -2 lines 0 comments Download
M content/browser/renderer_host/input/input_router_impl.cc View 1 2 3 2 chunks +11 lines, -2 lines 0 comments Download
M content/browser/renderer_host/input/motion_event_web.cc View 1 2 3 4 3 chunks +12 lines, -18 lines 0 comments Download
M content/browser/renderer_host/input/touch_emulator.cc View 1 2 3 4 chunks +23 lines, -23 lines 0 comments Download
M content/browser/renderer_host/input/touch_emulator_unittest.cc View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/input/touch_event_queue.cc View 1 2 3 4 2 chunks +6 lines, -4 lines 0 comments Download
M content/browser/renderer_host/input/touch_event_queue_unittest.cc View 1 2 5 chunks +7 lines, -0 lines 0 comments Download
M content/browser/renderer_host/input/web_input_event_util.cc View 1 2 3 2 chunks +5 lines, -5 lines 0 comments Download
D content/browser/renderer_host/input/web_touch_event_traits.h View 1 2 1 chunk +0 lines, -22 lines 0 comments Download
D content/browser/renderer_host/input/web_touch_event_traits.cc View 1 2 1 chunk +0 lines, -36 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura_unittest.cc View 1 2 3 6 chunks +6 lines, -0 lines 0 comments Download
M content/browser/renderer_host/ui_events_helper.cc View 1 2 3 2 chunks +4 lines, -2 lines 0 comments Download
M content/common/input/synthetic_web_input_event_builders.h View 1 2 1 chunk +0 lines, -5 lines 0 comments Download
M content/common/input/synthetic_web_input_event_builders.cc View 1 2 3 3 chunks +9 lines, -12 lines 0 comments Download
A content/common/input/web_touch_event_traits.h View 1 2 3 1 chunk +41 lines, -0 lines 0 comments Download
A content/common/input/web_touch_event_traits.cc View 1 2 3 1 chunk +70 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M content/content_common.gypi View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/pepper/event_conversion.cc View 1 2 3 2 chunks +8 lines, -6 lines 0 comments Download
M content/shell/renderer/test_runner/event_sender.h View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M content/shell/renderer/test_runner/event_sender.cc View 1 2 7 chunks +17 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
jdduke (slow)
Not sure how I feel about forcing all touch event producers to be aware of ...
6 years, 8 months ago (2014-04-22 18:38:55 UTC) #1
Rick Byers
On 2014/04/22 18:38:55, jdduke wrote: > Not sure how I feel about forcing all touch ...
6 years, 8 months ago (2014-04-22 18:56:37 UTC) #2
Rick Byers
https://codereview.chromium.org/247433003/diff/1/content/common/input/synthetic_web_input_event_builders.cc File content/common/input/synthetic_web_input_event_builders.cc (right): https://codereview.chromium.org/247433003/diff/1/content/common/input/synthetic_web_input_event_builders.cc#newcode159 content/common/input/synthetic_web_input_event_builders.cc:159: type = WebInputEvent::Undefined; On 2014/04/22 18:38:55, jdduke wrote: > ...
6 years, 8 months ago (2014-04-22 19:00:58 UTC) #3
jdduke (slow)
On 2014/04/22 19:00:58, Rick Byers wrote: > https://codereview.chromium.org/247433003/diff/1/content/common/input/synthetic_web_input_event_builders.cc > File content/common/input/synthetic_web_input_event_builders.cc (right): > > https://codereview.chromium.org/247433003/diff/1/content/common/input/synthetic_web_input_event_builders.cc#newcode159 ...
6 years, 8 months ago (2014-04-22 19:11:24 UTC) #4
Rick Byers
Jared, please take a look - this is ready for full review now.
6 years, 8 months ago (2014-04-23 21:19:59 UTC) #5
Rick Byers
On 2014/04/22 19:11:24, jdduke wrote: > On 2014/04/22 19:00:58, Rick Byers wrote: > > > ...
6 years, 8 months ago (2014-04-23 21:21:26 UTC) #6
jdduke (slow)
https://codereview.chromium.org/247433003/diff/40001/content/browser/frame_host/render_widget_host_view_guest.cc File content/browser/frame_host/render_widget_host_view_guest.cc (right): https://codereview.chromium.org/247433003/diff/40001/content/browser/frame_host/render_widget_host_view_guest.cc#newcode541 content/browser/frame_host/render_widget_host_view_guest.cc:541: host_->ForwardTouchEventWithLatencyInfo(cancel_event, *event->latency()); Hmm, yeah, at the least this should ...
6 years, 8 months ago (2014-04-23 21:55:47 UTC) #7
Rick Byers
https://codereview.chromium.org/247433003/diff/40001/content/browser/frame_host/render_widget_host_view_guest.cc File content/browser/frame_host/render_widget_host_view_guest.cc (right): https://codereview.chromium.org/247433003/diff/40001/content/browser/frame_host/render_widget_host_view_guest.cc#newcode541 content/browser/frame_host/render_widget_host_view_guest.cc:541: host_->ForwardTouchEventWithLatencyInfo(cancel_event, *event->latency()); On 2014/04/23 21:55:47, jdduke wrote: > Hmm, ...
6 years, 8 months ago (2014-04-23 23:15:34 UTC) #8
Rick Byers
6 years, 8 months ago (2014-04-23 23:17:10 UTC) #9
jdduke (slow)
Nice, thanks! content/browser/renderer_host/input and content/common/input lgtm. https://codereview.chromium.org/247433003/diff/40001/content/browser/frame_host/render_widget_host_view_guest.cc File content/browser/frame_host/render_widget_host_view_guest.cc (right): https://codereview.chromium.org/247433003/diff/40001/content/browser/frame_host/render_widget_host_view_guest.cc#newcode541 content/browser/frame_host/render_widget_host_view_guest.cc:541: host_->ForwardTouchEventWithLatencyInfo(cancel_event, *event->latency()); On ...
6 years, 8 months ago (2014-04-23 23:29:48 UTC) #10
jdduke (slow)
Also, one last nit, could you format the issue description to 80 character columns?
6 years, 8 months ago (2014-04-23 23:30:34 UTC) #11
Rick Byers
On 2014/04/23 23:29:48, jdduke wrote: > Nice, thanks! content/browser/renderer_host/input and content/common/input lgtm. > > https://codereview.chromium.org/247433003/diff/40001/content/browser/frame_host/render_widget_host_view_guest.cc ...
6 years, 8 months ago (2014-04-23 23:42:13 UTC) #12
Rick Byers
+avi for OWNERS of: content/browser/frame_host/ content/browser/renderer_host/render_widget_host_view_aura_unittest.cc content/browser/renderer_host/ui_events_helper.cc content/renderer/ content/shell/
6 years, 8 months ago (2014-04-23 23:49:34 UTC) #13
jdduke (slow)
On 2014/04/23 23:42:13, Rick Byers wrote: > Done. But this has always confused me - ...
6 years, 8 months ago (2014-04-23 23:53:00 UTC) #14
Rick Byers
On 2014/04/23 23:53:00, jdduke wrote: > On 2014/04/23 23:42:13, Rick Byers wrote: > > Done. ...
6 years, 8 months ago (2014-04-24 00:03:59 UTC) #15
Avi (use Gerrit)
LGTM with whiny nit. https://codereview.chromium.org/247433003/diff/60001/content/browser/frame_host/render_widget_host_view_guest.cc File content/browser/frame_host/render_widget_host_view_guest.cc (right): https://codereview.chromium.org/247433003/diff/60001/content/browser/frame_host/render_widget_host_view_guest.cc#newcode535 content/browser/frame_host/render_widget_host_view_guest.cc:535: // FIXME: This event has ...
6 years, 8 months ago (2014-04-24 02:26:56 UTC) #16
Rick Byers
On 2014/04/24 02:26:56, Avi wrote: > LGTM with whiny nit. > > https://codereview.chromium.org/247433003/diff/60001/content/browser/frame_host/render_widget_host_view_guest.cc > File ...
6 years, 8 months ago (2014-04-24 03:20:33 UTC) #17
Rick Byers
The CQ bit was checked by rbyers@chromium.org
6 years, 8 months ago (2014-04-24 03:20:40 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rbyers@chromium.org/247433003/80001
6 years, 8 months ago (2014-04-24 03:23:12 UTC) #19
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-24 05:18:35 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel
6 years, 8 months ago (2014-04-24 05:18:35 UTC) #21
Rick Byers
The CQ bit was checked by rbyers@chromium.org
6 years, 8 months ago (2014-04-24 14:17:21 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rbyers@chromium.org/247433003/80001
6 years, 8 months ago (2014-04-24 14:18:48 UTC) #23
commit-bot: I haz the power
6 years, 8 months ago (2014-04-24 21:05:45 UTC) #24
Message was sent while issue was closed.
Change committed as 265991

Powered by Google App Engine
This is Rietveld 408576698