Coordinate cursor updates from multiple renderers on a single page

Desktop / Chromium - Ken Buchanan [chromium.org] - 13 July 2017 19:29 EDT

Currently each RenderWidget sends cursor update messages independently based on its last seen mouse position, with no awareness of other RenderWidgets overriding the mouse cursor. This causes problem due to race conditions where RenderWidgets in multiple renderer processes are changing the cursor graphic as the user moves the mouse, and also creates inconsistency because a RenderWidget does not know that a different RenderWidget has modified the cursor.

This CL adds a CursorManager class to content, which tracks the last cursor update received by each RenderWidgetHostView, and signals the root RWHV to show the correct cursor for the view that the mouse is currently over.

Bug: 614540, 545237 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation Change-Id: Id7355b69f13f9e13a5113b5f63228ddf067352ed Reviewed-on: https://chromium-review.googlesource.com/558271 Commit-Queue: Ken Buchanan

520f29c Coordinate cursor updates from multiple renderers on a single page
content/browser/BUILD.gn | 2 +
.../frame_host/cross_process_frame_connector.cc | 11 +-
content/browser/renderer_host/cursor_manager.cc | 53 ++++++
content/browser/renderer_host/cursor_manager.h | 59 ++++++
.../renderer_host/cursor_manager_unittest.cc | 212 +++++++++++++++++++++
.../render_widget_host_input_event_router.cc | 9 +-
.../renderer_host/render_widget_host_view_aura.cc | 13 ++
.../renderer_host/render_widget_host_view_aura.h | 5 +
.../renderer_host/render_widget_host_view_base.cc | 8 +
.../renderer_host/render_widget_host_view_base.h | 12 +-
.../renderer_host/render_widget_host_view_mac.h | 5 +
.../renderer_host/render_widget_host_view_mac.mm | 11 ++
content/browser/site_per_process_browsertest.cc | 52 ++++-
content/test/BUILD.gn | 1 +
14 files changed, 442 insertions(+), 11 deletions(-)

Upstream: git.chromium.org


  • Share