New issue
Advanced search Search tips

Issue 902446 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Bug

Blocking:
issue 897520
issue 911802



Sign in to add a comment

Make synthetic gesture "done" callback wait until visual state is updated

Project Member Reported by bokan@chromium.org, Nov 6

Issue description

Synthetic gestures today have a callback that completes when the gesture is finished dispatching. This leads to much flakiness since following events may start operating with the assumption all the effects of the gesture are completed. However, the gesture may not be fully propagated through the main and compositor threads, the pending and active trees. See the design doc for details: https://docs.google.com/document/d/18r8Ek8SCmJLdRf9WlvlOjonFRTTqWq2RomUhhXbkJZQ/edit#
 
Blocking: 897520
Cc: bokan@chromium.org
 Issue 907941  has been merged into this issue.
Blocking: 911802
Project Member

Comment 4 by bugdroid1@chromium.org, Jan 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/91d6c20eccf8a67a4dd29f0102f526193db6b06a

commit 91d6c20eccf8a67a4dd29f0102f526193db6b06a
Author: David Bokan <bokan@chromium.org>
Date: Wed Jan 09 22:12:55 2019

Synthetic gestures wait on renderer ACK.

Currently, synthetic gestures invoke the "completed callback" as soon as
the final gesture has been dispatched. This causes issues in client
code, typically tests, that want to wait until the effects of a gesture
are complete before sending further input or checking page state.

This CL is the first step in a series of CLs to make this completion
callback reliable. We add a new API in the renderer that resolves the
completion callback once the input has been fully processed by the
renderer. For now, this method just ACKs immediately but its
implementation will be further fleshed out in a followup CL.

Bug: 902446
Change-Id: I96f2f4b8fce5234ede83c3ec49abce840d1b6eda
Reviewed-on: https://chromium-review.googlesource.com/c/1390327
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: David Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#621320}
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/input_router.h
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/input_router_impl.cc
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/input_router_impl.h
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/synthetic_gesture.cc
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/synthetic_gesture.h
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/synthetic_gesture_controller.cc
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/synthetic_gesture_controller.h
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/synthetic_gesture_target.h
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/synthetic_gesture_target_base.cc
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/synthetic_gesture_target_base.h
[add] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/synthetic_input_browsertest.cc
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/synthetic_pinch_gesture.cc
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/synthetic_pinch_gesture.h
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/synthetic_pointer_action.cc
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/synthetic_pointer_action.h
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/synthetic_pointer_action_unittest.cc
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/synthetic_smooth_drag_gesture.cc
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/synthetic_smooth_drag_gesture.h
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.cc
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.h
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/synthetic_tap_gesture.cc
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/synthetic_tap_gesture.h
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/synthetic_touchpad_pinch_gesture.cc
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/synthetic_touchpad_pinch_gesture.h
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/synthetic_touchscreen_pinch_gesture.cc
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/synthetic_touchscreen_pinch_gesture.h
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/input/touch_action_browsertest.cc
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/render_widget_host_impl.cc
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/render_widget_host_impl.h
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/browser/renderer_host/render_widget_host_unittest.cc
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/common/input/input_handler.mojom
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/renderer/input/widget_input_handler_impl.cc
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/renderer/input/widget_input_handler_impl.h
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/renderer/render_widget_unittest.cc
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/test/BUILD.gn
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/test/mock_widget_input_handler.cc
[modify] https://crrev.com/91d6c20eccf8a67a4dd29f0102f526193db6b06a/content/test/mock_widget_input_handler.h

Project Member

Comment 5 by bugdroid1@chromium.org, Jan 10

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d3d4d7c7480b4424a8d009194dd14405654843a4

commit d3d4d7c7480b4424a8d009194dd14405654843a4
Author: Roman Sorokin <rsorokin@chromium.org>
Date: Thu Jan 10 14:03:42 2019

Revert "Synthetic gestures wait on renderer ACK."

This reverts commit 91d6c20eccf8a67a4dd29f0102f526193db6b06a.

Reason for revert: external/wpt/pointerevents/pointerevent_lostpointercapture_for_disconnected_node.html is flaky (see  https://crbug.com/920581 )

Original change's description:
> Synthetic gestures wait on renderer ACK.
> 
> Currently, synthetic gestures invoke the "completed callback" as soon as
> the final gesture has been dispatched. This causes issues in client
> code, typically tests, that want to wait until the effects of a gesture
> are complete before sending further input or checking page state.
> 
> This CL is the first step in a series of CLs to make this completion
> callback reliable. We add a new API in the renderer that resolves the
> completion callback once the input has been fully processed by the
> renderer. For now, this method just ACKs immediately but its
> implementation will be further fleshed out in a followup CL.
> 
> Bug: 902446
> Change-Id: I96f2f4b8fce5234ede83c3ec49abce840d1b6eda
> Reviewed-on: https://chromium-review.googlesource.com/c/1390327
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Reviewed-by: Robert Sesek <rsesek@chromium.org>
> Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
> Commit-Queue: David Bokan <bokan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#621320}

TBR=avi@chromium.org,bokan@chromium.org,dtapuska@chromium.org,rsesek@chromium.org

Change-Id: I0fda381b12cdbff8c27f6602967bb8a233272676
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 902446
Reviewed-on: https://chromium-review.googlesource.com/c/1405008
Reviewed-by: Roman Sorokin <rsorokin@chromium.org>
Commit-Queue: Roman Sorokin <rsorokin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#621570}
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/input/input_router.h
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/input/input_router_impl.cc
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/input/input_router_impl.h
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/input/synthetic_gesture.cc
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/input/synthetic_gesture.h
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/input/synthetic_gesture_controller.cc
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/input/synthetic_gesture_controller.h
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/input/synthetic_gesture_target.h
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/input/synthetic_gesture_target_base.cc
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/input/synthetic_gesture_target_base.h
[delete] https://crrev.com/bd045838187c8a35dd28c16fb13a9f63a6faae66/content/browser/renderer_host/input/synthetic_input_browsertest.cc
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/input/synthetic_pinch_gesture.cc
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/input/synthetic_pinch_gesture.h
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/input/synthetic_pointer_action.cc
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/input/synthetic_pointer_action.h
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/input/synthetic_pointer_action_unittest.cc
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/input/synthetic_smooth_drag_gesture.cc
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/input/synthetic_smooth_drag_gesture.h
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.cc
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.h
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/input/synthetic_tap_gesture.cc
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/input/synthetic_tap_gesture.h
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/input/synthetic_touchpad_pinch_gesture.cc
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/input/synthetic_touchpad_pinch_gesture.h
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/input/synthetic_touchscreen_pinch_gesture.cc
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/input/synthetic_touchscreen_pinch_gesture.h
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/input/touch_action_browsertest.cc
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/render_widget_host_impl.cc
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/render_widget_host_impl.h
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/browser/renderer_host/render_widget_host_unittest.cc
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/common/input/input_handler.mojom
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/renderer/input/widget_input_handler_impl.cc
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/renderer/input/widget_input_handler_impl.h
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/renderer/render_widget_unittest.cc
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/test/BUILD.gn
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/test/mock_widget_input_handler.cc
[modify] https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4/content/test/mock_widget_input_handler.h

Project Member

Comment 6 by bugdroid1@chromium.org, Jan 20 (2 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/067c12ee95a594db2c65b24c21f26231c4356ef4

commit 067c12ee95a594db2c65b24c21f26231c4356ef4
Author: David Bokan <bokan@chromium.org>
Date: Sun Jan 20 23:05:39 2019

[Reland] Synthetic gestures wait on renderer ACK.

Currently, synthetic gestures invoke the "completed callback" as soon as
the final gesture has been dispatched. This causes issues in client
code, typically tests, that want to wait until the effects of a gesture
are complete before sending further input or checking page state.

This CL is the first step in a series of CLs to make this completion
callback reliable. We add a new API in the renderer that resolves the
completion callback once the input has been fully processed by the
renderer. For now, this method just ACKs immediately but its
implementation will be further fleshed out in a followup CL.

Reland Node:
This was reverted in
https://crrev.com/d3d4d7c7480b4424a8d009194dd14405654843a4 due to
causing failures on the LeakDetector bot. The leaks were a result of
tests finishing before the synthetic gesture had completed. I've
modified these tests (in wpt/pointerevents) to wait until the guesture
is completed before finishing the test.

TBR=dtapuska@chromium.org,rsesek@chromium.org,avi@chromium.org

Bug: 902446
Change-Id: I6a6a517a719616b2536538686fa4d7b980f0b485
Reviewed-on: https://chromium-review.googlesource.com/c/1424219
Reviewed-by: David Bokan <bokan@chromium.org>
Commit-Queue: David Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#624496}
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/input_router.h
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/input_router_impl.cc
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/input_router_impl.h
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/synthetic_gesture.cc
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/synthetic_gesture.h
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/synthetic_gesture_controller.cc
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/synthetic_gesture_controller.h
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/synthetic_gesture_target.h
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/synthetic_gesture_target_base.cc
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/synthetic_gesture_target_base.h
[add] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/synthetic_input_browsertest.cc
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/synthetic_pinch_gesture.cc
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/synthetic_pinch_gesture.h
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/synthetic_pointer_action.cc
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/synthetic_pointer_action.h
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/synthetic_pointer_action_unittest.cc
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/synthetic_smooth_drag_gesture.cc
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/synthetic_smooth_drag_gesture.h
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.cc
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.h
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/synthetic_tap_gesture.cc
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/synthetic_tap_gesture.h
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/synthetic_touchpad_pinch_gesture.cc
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/synthetic_touchpad_pinch_gesture.h
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/synthetic_touchscreen_pinch_gesture.cc
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/synthetic_touchscreen_pinch_gesture.h
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/input/touch_action_browsertest.cc
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/render_widget_host_impl.cc
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/render_widget_host_impl.h
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/browser/renderer_host/render_widget_host_unittest.cc
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/common/input/input_handler.mojom
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/renderer/input/widget_input_handler_impl.cc
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/renderer/input/widget_input_handler_impl.h
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/renderer/render_widget_unittest.cc
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/test/BUILD.gn
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/test/mock_widget_input_handler.cc
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/content/test/mock_widget_input_handler.h
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/third_party/blink/web_tests/external/wpt/pointerevents/pointerevent_lostpointercapture_for_disconnected_node.html
[modify] https://crrev.com/067c12ee95a594db2c65b24c21f26231c4356ef4/third_party/blink/web_tests/external/wpt/pointerevents/pointerevent_setpointercapture_relatedtarget.html

Sign in to add a comment