Avoid sending unnecessary input target queries to OOPIFs |
|||
Issue descriptionRenderWidgetTargeter::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.
,
Jun 2 2018
Issue 848850 has been merged into this issue.
,
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
,
Nov 26
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 |
|||
Comment 1 by sadrul@chromium.org
, Jun 2 2018