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

Issue 23856016: Send touch cancel to renderer when scrolling starts (Closed)

Created:
7 years, 3 months ago by Yufeng Shen (Slow to review)
Modified:
7 years, 2 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Send touch cancel to renderer when scrolling starts We decide that Desktop Chrome should follow the Chrome on Android mode for touch behaviour during scrolling: send touch cancel to renderer when scrolling starts and then stop sending touch events to renderer. This CL implements the above model. When GestureScrollBegin is received, we inject a synthesized touch cancel event into the touch event queue and stop sending all the following touch events to renderer. When the touch cancel event is acked, we drop it before sending it to view so it won't interrupt normal gesture flow. BUG=240735 TEST=Enable the flag #enable-no-touch-to-renderer-while-scrolling in chrome://flags 1. go to www.rbyers.net/eventTest.html scroll the page, one should first see touch move events, then touch cancel events. 2. go to www.rbyers.net/janky-touch-scroll.html scroll the page and one should see smooth scrolling once the scrolling starts. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=226638

Patch Set 1 #

Total comments: 7

Patch Set 2 : Fix the issue that TouchCancel may never be sent #

Total comments: 18

Patch Set 3 : always insert the touch cancel at the beginning of TEQ #

Total comments: 8

Patch Set 4 : more test coverage #

Patch Set 5 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+138 lines, -62 lines) Patch
M content/browser/renderer_host/input/immediate_input_router.cc View 1 1 chunk +2 lines, -11 lines 0 comments Download
M content/browser/renderer_host/input/immediate_input_router_unittest.cc View 1 2 3 4 4 chunks +53 lines, -20 lines 0 comments Download
M content/browser/renderer_host/input/touch_event_queue.h View 1 2 3 4 3 chunks +16 lines, -11 lines 0 comments Download
M content/browser/renderer_host/input/touch_event_queue.cc View 1 2 3 8 chunks +58 lines, -9 lines 0 comments Download
M content/browser/renderer_host/input/touch_event_queue_unittest.cc View 1 2 3 4 3 chunks +9 lines, -11 lines 0 comments Download

Messages

Total messages: 29 (0 generated)
Yufeng Shen (Slow to review)
This is to unify Desktop & Android chrome touch behavior during scrolling. PTAL.
7 years, 3 months ago (2013-09-20 00:16:42 UTC) #1
jdduke (slow)
On 2013/09/20 00:16:42, Yufeng Shen wrote: > This is to unify Desktop & Android chrome ...
7 years, 3 months ago (2013-09-20 16:44:05 UTC) #2
Yufeng Shen (Slow to review)
On 2013/09/20 16:44:05, jdduke wrote: > On 2013/09/20 00:16:42, Yufeng Shen wrote: > > This ...
7 years, 3 months ago (2013-09-20 17:07:20 UTC) #3
jdduke (slow)
On 2013/09/20 17:07:20, Yufeng Shen wrote: > On 2013/09/20 16:44:05, jdduke wrote: > > On ...
7 years, 3 months ago (2013-09-20 17:17:38 UTC) #4
sadrul
https://codereview.chromium.org/23856016/diff/1/content/browser/renderer_host/input/immediate_input_router_unittest.cc File content/browser/renderer_host/input/immediate_input_router_unittest.cc (right): https://codereview.chromium.org/23856016/diff/1/content/browser/renderer_host/input/immediate_input_router_unittest.cc#newcode1800 content/browser/renderer_host/input/immediate_input_router_unittest.cc:1800: INPUT_EVENT_ACK_STATE_NOT_CONSUMED); The line in 1795 checks that only the ...
7 years, 3 months ago (2013-09-23 16:17:33 UTC) #5
jdduke (slow)
https://codereview.chromium.org/23856016/diff/1/content/browser/renderer_host/input/touch_event_queue.cc File content/browser/renderer_host/input/touch_event_queue.cc (right): https://codereview.chromium.org/23856016/diff/1/content/browser/renderer_host/input/touch_event_queue.cc#newcode188 content/browser/renderer_host/input/touch_event_queue.cc:188: touch_queue_.push_front(synthesized_cancel_event_); Inserting the cancel at the front... The only ...
7 years, 3 months ago (2013-09-23 16:34:34 UTC) #6
Yufeng Shen (Slow to review)
https://codereview.chromium.org/23856016/diff/1/content/browser/renderer_host/input/touch_event_queue.cc File content/browser/renderer_host/input/touch_event_queue.cc (right): https://codereview.chromium.org/23856016/diff/1/content/browser/renderer_host/input/touch_event_queue.cc#newcode188 content/browser/renderer_host/input/touch_event_queue.cc:188: touch_queue_.push_front(synthesized_cancel_event_); On 2013/09/23 16:34:34, jdduke wrote: > Inserting the ...
7 years, 3 months ago (2013-09-23 20:49:34 UTC) #7
jdduke (slow)
> How about : > 1) if the touch_queue_ is empty, we enqueue the cancel ...
7 years, 3 months ago (2013-09-23 20:56:59 UTC) #8
Yufeng Shen (Slow to review)
Update: 1. Only fake a touch cancel if the GestureScrollBegin is from dispatching a touch ...
7 years, 2 months ago (2013-09-26 01:52:31 UTC) #9
sadrul
https://codereview.chromium.org/23856016/diff/14001/content/browser/renderer_host/input/immediate_input_router_unittest.cc File content/browser/renderer_host/input/immediate_input_router_unittest.cc (right): https://codereview.chromium.org/23856016/diff/14001/content/browser/renderer_host/input/immediate_input_router_unittest.cc#newcode1907 content/browser/renderer_host/input/immediate_input_router_unittest.cc:1907: process_->sink().ClearMessages(); Can you check that the cancel event didn't ...
7 years, 2 months ago (2013-09-27 15:13:51 UTC) #10
jdduke (slow)
https://codereview.chromium.org/23856016/diff/14001/content/browser/renderer_host/input/touch_event_queue.cc File content/browser/renderer_host/input/touch_event_queue.cc (right): https://codereview.chromium.org/23856016/diff/14001/content/browser/renderer_host/input/touch_event_queue.cc#newcode178 content/browser/renderer_host/input/touch_event_queue.cc:178: if (touch_queue_.front()->has_been_sent_to_renderer()) You can remove this flag (or make ...
7 years, 2 months ago (2013-09-30 19:21:51 UTC) #11
sadrul
https://codereview.chromium.org/23856016/diff/14001/content/browser/renderer_host/input/touch_event_queue.cc File content/browser/renderer_host/input/touch_event_queue.cc (right): https://codereview.chromium.org/23856016/diff/14001/content/browser/renderer_host/input/touch_event_queue.cc#newcode227 content/browser/renderer_host/input/touch_event_queue.cc:227: TryForwardNextEventToRenderer(); On 2013/09/30 19:21:51, jdduke wrote: > I believe ...
7 years, 2 months ago (2013-09-30 20:33:24 UTC) #12
Yufeng Shen (Slow to review)
https://codereview.chromium.org/23856016/diff/14001/content/browser/renderer_host/input/immediate_input_router_unittest.cc File content/browser/renderer_host/input/immediate_input_router_unittest.cc (right): https://codereview.chromium.org/23856016/diff/14001/content/browser/renderer_host/input/immediate_input_router_unittest.cc#newcode1907 content/browser/renderer_host/input/immediate_input_router_unittest.cc:1907: process_->sink().ClearMessages(); On 2013/09/27 15:13:51, sadrul wrote: > Can you ...
7 years, 2 months ago (2013-09-30 20:43:14 UTC) #13
Yufeng Shen (Slow to review)
On 2013/09/30 20:33:24, sadrul wrote: > https://codereview.chromium.org/23856016/diff/14001/content/browser/renderer_host/input/touch_event_queue.cc > File content/browser/renderer_host/input/touch_event_queue.cc (right): > > https://codereview.chromium.org/23856016/diff/14001/content/browser/renderer_host/input/touch_event_queue.cc#newcode227 > ...
7 years, 2 months ago (2013-09-30 20:49:00 UTC) #14
sadrul
LGTM https://codereview.chromium.org/23856016/diff/14001/content/browser/renderer_host/input/touch_event_queue.cc File content/browser/renderer_host/input/touch_event_queue.cc (right): https://codereview.chromium.org/23856016/diff/14001/content/browser/renderer_host/input/touch_event_queue.cc#newcode227 content/browser/renderer_host/input/touch_event_queue.cc:227: TryForwardNextEventToRenderer(); On 2013/09/30 20:43:14, Yufeng Shen wrote: > ...
7 years, 2 months ago (2013-10-01 11:32:44 UTC) #15
jdduke (slow)
https://codereview.chromium.org/23856016/diff/23001/content/browser/renderer_host/input/touch_event_queue.cc File content/browser/renderer_host/input/touch_event_queue.cc (right): https://codereview.chromium.org/23856016/diff/23001/content/browser/renderer_host/input/touch_event_queue.cc#newcode165 content/browser/renderer_host/input/touch_event_queue.cc:165: // If there are queued touch events, then try ...
7 years, 2 months ago (2013-10-01 13:21:01 UTC) #16
jdduke (slow)
https://codereview.chromium.org/23856016/diff/23001/content/browser/renderer_host/input/immediate_input_router_unittest.cc File content/browser/renderer_host/input/immediate_input_router_unittest.cc (right): https://codereview.chromium.org/23856016/diff/23001/content/browser/renderer_host/input/immediate_input_router_unittest.cc#newcode1880 content/browser/renderer_host/input/immediate_input_router_unittest.cc:1880: Would it be worthwhile to add another (non-coalesced) TouchMove ...
7 years, 2 months ago (2013-10-01 16:27:41 UTC) #17
Yufeng Shen (Slow to review)
Jared, Do you want to send me the android side patch so I can land ...
7 years, 2 months ago (2013-10-01 20:38:48 UTC) #18
Yufeng Shen (Slow to review)
Jared, Do you want to send me the android side patch so I can land ...
7 years, 2 months ago (2013-10-01 20:38:48 UTC) #19
jdduke (slow)
On 2013/10/01 20:38:48, Yufeng Shen wrote: > Jared, > > Do you want to send ...
7 years, 2 months ago (2013-10-01 20:55:03 UTC) #20
Yufeng Shen (Slow to review)
On 2013/10/01 20:55:03, jdduke wrote: > On 2013/10/01 20:38:48, Yufeng Shen wrote: > > Jared, ...
7 years, 2 months ago (2013-10-01 21:30:19 UTC) #21
jdduke (slow)
On 2013/10/01 21:30:19, Yufeng Shen wrote: > Rick, > > Do you want to launch ...
7 years, 2 months ago (2013-10-01 21:39:10 UTC) #22
aelias_OOO_until_Jul13
This doesn't seem like a good candidate for a flag. I think we should just ...
7 years, 2 months ago (2013-10-01 21:54:04 UTC) #23
jdduke (slow)
On 2013/10/01 21:54:04, aelias wrote: > This doesn't seem like a good candidate for a ...
7 years, 2 months ago (2013-10-01 22:03:02 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miletus@chromium.org/23856016/42001
7 years, 2 months ago (2013-10-02 17:17:24 UTC) #25
Yufeng Shen (Slow to review)
On 2013/10/01 22:03:02, jdduke wrote: > On 2013/10/01 21:54:04, aelias wrote: > > This doesn't ...
7 years, 2 months ago (2013-10-02 17:18:48 UTC) #26
aelias_OOO_until_Jul13
On 2013/10/02 17:18:48, Yufeng Shen wrote: > Cool, I will push this first. And then ...
7 years, 2 months ago (2013-10-02 19:05:34 UTC) #27
Rick Byers
On 2013/10/02 19:05:34, aelias wrote: > On 2013/10/02 17:18:48, Yufeng Shen wrote: > > Cool, ...
7 years, 2 months ago (2013-10-02 19:11:30 UTC) #28
commit-bot: I haz the power
7 years, 2 months ago (2013-10-03 00:58:22 UTC) #29
Message was sent while issue was closed.
Change committed as 226638

Powered by Google App Engine
This is Rietveld 408576698