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

Issue 2661443003: scheduler: Detect single event gestures correctly (Closed)

Created:
3 years, 10 months ago by Sami
Modified:
3 years, 10 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, nasko+codewatch_chromium.org, jam, dtapuska+chromiumwatch_chromium.org, dglazkov+blink, darin-cc_chromium.org, blink-reviews, kinuko+watch, scheduler-bugs_chromium.org, blink-reviews-api_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

scheduler: Detect single event gestures correctly When a single event gesture such as a press (i.e., a single touchstart event) is observed, the scheduler would previously wait for two subsequent touchmove events before deciding the gesture was established and stop blocking tasks unrelated to input handling. The problem was that with single event gestures, these additional events are never sent, so the scheduler would remain in 'touchstart' mode for 100ms, possibly causing important tasks to get delayed. This patch fixes the issue by telling the scheduler how the touchstart event was handled. If the event handler calls preventDefault() on the event, the scheduler can immediately conclude that the gesture is handled by the main thread without waiting for any further events. If preventDefault() is not called, we maintain the previous behavior. BUG=639300 Review-Url: https://codereview.chromium.org/2661443003 Cr-Commit-Position: refs/heads/master@{#446921} Committed: https://chromium.googlesource.com/chromium/src/+/cff6288fd965f274205ca6ab9cded462ba204dc9

Patch Set 1 #

Total comments: 4

Patch Set 2 : Review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+154 lines, -45 lines) Patch
M content/renderer/input/input_event_filter.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/input/input_event_filter.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M content/renderer/input/input_handler_manager.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/input/input_handler_manager.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/input/input_handler_manager_client.h View 2 chunks +2 lines, -0 lines 0 comments Download
M content/renderer/input/main_thread_event_queue.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/input/main_thread_event_queue.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/input/main_thread_event_queue_unittest.cc View 2 chunks +3 lines, -1 line 0 comments Download
M content/renderer/input/render_widget_input_handler.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M content/renderer/input/render_widget_input_handler_delegate.h View 2 chunks +2 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M content/renderer/render_widget.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_widget.cc View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.h View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc View 2 chunks +13 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc View 1 19 chunks +102 lines, -27 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/test/fake_renderer_scheduler.cc View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/public/platform/scheduler/renderer/renderer_scheduler.h View 2 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/public/platform/scheduler/test/fake_renderer_scheduler.h View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/public/platform/scheduler/test/mock_renderer_scheduler.h View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 22 (11 generated)
Sami
Adding dtapuska@ for content/renderer/input/ and alexclarke@ for third_party/WebKit/Source/platform/scheduler/ -- PTAL.
3 years, 10 months ago (2017-01-27 12:50:23 UTC) #5
alex clarke (OOO till 29th)
lgtm https://codereview.chromium.org/2661443003/diff/1/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc File third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc (right): https://codereview.chromium.org/2661443003/diff/1/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc#newcode996 third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc:996: EXPECT_THAT(run_order, Maybe add a comment explaining the significance ...
3 years, 10 months ago (2017-01-27 13:25:44 UTC) #6
dtapuska
On 2017/01/27 13:25:44, alex clarke wrote: > lgtm > > https://codereview.chromium.org/2661443003/diff/1/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc > File > third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc ...
3 years, 10 months ago (2017-01-27 14:27:33 UTC) #9
Sami
> What about the touch-action response? Are you correctly dealing with that? I'm not sure ...
3 years, 10 months ago (2017-01-27 14:50:54 UTC) #10
dtapuska
On 2017/01/27 14:50:54, Sami wrote: > > What about the touch-action response? Are you correctly ...
3 years, 10 months ago (2017-01-27 15:03:31 UTC) #11
Sami
On 2017/01/27 15:03:31, dtapuska wrote: > The default gesture can get prevented with a touch-action: ...
3 years, 10 months ago (2017-01-27 16:15:58 UTC) #12
dtapuska
On 2017/01/27 16:15:58, Sami wrote: > On 2017/01/27 15:03:31, dtapuska wrote: > > The default ...
3 years, 10 months ago (2017-01-27 16:16:53 UTC) #13
Sami
Thanks! kinuko@, could you check content/renderer please?
3 years, 10 months ago (2017-01-27 18:39:20 UTC) #15
kinuko
lgtm
3 years, 10 months ago (2017-01-28 02:24:17 UTC) #16
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/2661443003/20001
3 years, 10 months ago (2017-01-28 11:37:53 UTC) #19
commit-bot: I haz the power
3 years, 10 months ago (2017-01-28 13:18:47 UTC) #22
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/cff6288fd965f274205ca6ab9cde...

Powered by Google App Engine
This is Rietveld 408576698