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

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

Created:
3 years, 10 months ago by Sami
Modified:
3 years, 10 months ago
Reviewers:
dtapuska
CC:
chromium-reviews
Target Ref:
refs/pending/branch-heads/2987
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 TBR=dtapuska@chromium.org Review-Url: https://codereview.chromium.org/2661443003 Cr-Commit-Position: refs/heads/master@{#446921} (cherry picked from commit cff6288fd965f274205ca6ab9cded462ba204dc9) Review-Url: https://codereview.chromium.org/2663283002 . Cr-Original-Commit-Position: refs/branch-heads/2987@{#230} Cr-Original-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943} Committed: https://chromium.googlesource.com/chromium/src/+/6db2c563baa4b5d4dbd4bbb052db0003ea5a0f1e Review-Url: https://codereview.chromium.org/2663283002 . Cr-Commit-Position: refs/branch-heads/2987@{#240} Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943} Committed: https://chromium.googlesource.com/chromium/src/+/8f081a48d91e12cc9c245fb32c65c95331552677

Patch Set 1 #

Patch Set 2 : Build fix #

Patch Set 3 : Rebased #

Patch Set 4 : Fix test build failure #

Unified diffs Side-by-side diffs Delta from patch set Stats (+159 lines, -46 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 +5 lines, -2 lines 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/mus/compositor_mus_connection_unittest.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/mus/render_widget_mus_connection.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/mus/render_widget_mus_connection.cc View 1 1 chunk +1 line, -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 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: 9 (5 generated)
Sami
Committed patchset #3 (id:40001) manually as 6db2c563baa4b5d4dbd4bbb052db0003ea5a0f1e (presubmit successful).
3 years, 10 months ago (2017-01-31 20:16:02 UTC) #4
Sami
3 years, 10 months ago (2017-01-31 20:16:20 UTC) #5
Sami
A revert of this CL (patchset #3 id:40001) has been created in https://codereview.chromium.org/2662173005/ by skyostil@chromium.org. ...
3 years, 10 months ago (2017-01-31 21:10:20 UTC) #6
Sami
3 years, 10 months ago (2017-02-01 07:08:01 UTC) #9
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as
8f081a48d91e12cc9c245fb32c65c95331552677 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698