New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 847604 link

Starred by 3 users

Issue metadata

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



Sign in to add a comment

Avoid sending unnecessary input target queries to OOPIFs

Project Member Reported by kenrb@chromium.org, May 29 2018

Issue description


RenderWidgetTargeter::QueryClient recursively sends queries to RenderWidgets until one identifies itself as the target for a given input event. Often, the final target will be an OOPIF with no embedded OOPIFs, in which case the query sent to it would be redundant because there is only one possible response.

A renderer round-trip for asynchronous hit testing could be eliminated in these cases.

A simple way would be to identify when the current target has no embedded OOPIFs and skip the renderer query in that case. 

A slightly more complicated but potentially more effective way would be to use Quad-based hit testing on the current target's Surface to determine if there is a chance that the input event could need to be forwarded again.
 
Cc: sunxd@chromium.org

Comment 2 by kenrb@chromium.org, Jun 2 2018

Cc: flackr@chromium.org rjkroege@chromium.org kenrb@chromium.org
 Issue 848850  has been merged into this issue.
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 26

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

commit 4afcdb2fa5183d2d55c9f6438cb7ac6b7dce3105
Author: Ken Buchanan <kenrb@chromium.org>
Date: Mon Nov 26 19:34:17 2018

Reduce unnecessary InputTargetClient queries

This CL changes browser process asynchronous hit testing so that if
the InputTargetClient returns a FrameSinkId for a RenderWidgetHostView
that has no children, it stops doing any further asynchronous queries
and accepts that as the current target.

It does not take into account whether the point being hit test is over
any of the descendant views, should any exist.

Test: SitePerProcessHitTestBrowserTest.*
Bug: 847604
Change-Id: Ic70a26c19a7e06cef86d2b5b0b91227589e14755
Reviewed-on: https://chromium-review.googlesource.com/c/1342771
Reviewed-by: Ria Jiang <riajiang@chromium.org>
Commit-Queue: Ken Buchanan <kenrb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610914}
[modify] https://crrev.com/4afcdb2fa5183d2d55c9f6438cb7ac6b7dce3105/content/browser/renderer_host/render_widget_host_impl.cc
[modify] https://crrev.com/4afcdb2fa5183d2d55c9f6438cb7ac6b7dce3105/content/browser/renderer_host/render_widget_host_impl.h
[modify] https://crrev.com/4afcdb2fa5183d2d55c9f6438cb7ac6b7dce3105/content/browser/renderer_host/render_widget_host_input_event_router.cc
[modify] https://crrev.com/4afcdb2fa5183d2d55c9f6438cb7ac6b7dce3105/content/browser/renderer_host/render_widget_host_input_event_router.h
[modify] https://crrev.com/4afcdb2fa5183d2d55c9f6438cb7ac6b7dce3105/content/browser/renderer_host/render_widget_targeter.cc
[modify] https://crrev.com/4afcdb2fa5183d2d55c9f6438cb7ac6b7dce3105/content/browser/renderer_host/render_widget_targeter.h
[modify] https://crrev.com/4afcdb2fa5183d2d55c9f6438cb7ac6b7dce3105/content/browser/site_per_process_hit_test_browsertest.cc
[modify] https://crrev.com/4afcdb2fa5183d2d55c9f6438cb7ac6b7dce3105/content/test/data/frame_tree/busy_frame.html

Labels: -Pri-1 Pri-2
Status: Assigned (was: Started)
I didn't end up being able to test whether the point was over any embedded HitTestRegions beyond the ones to which we have already sent asynchronous hit test requests, because that not currently supported by the Viz interface. It is feasible for surface-based hit testing but I didn't add that optimization for that because it is going to be removed soon.

I'd like to leave this bug open for further improvements along those lines. Right now when Viz hit testing is enabled this eliminates any queries that would be sent to a leaf-node RenderWidgetHostView, but there are possibilities for doing a bit better.

Sign in to add a comment