Get rid of Pull based hit testing for Android WebView.

Android WebView always requested hit testing for ACTION_DOWN but this
is incompatible with OOPIF. The hit test would always be sent to the
main frame but it needs to be routed to the appropriate LocalRoot.

This mitigates the bug by moving to a push based approach where the
renderer will push the last hit test result from an ACTION_DOWN
event (which corresponds to a TouchStart).

BUG=1338006

Change-Id: I9012672cccc945822cb6bd35ff3ba78aac91a965
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3715455
Commit-Queue: Dave Tapuska <[email protected]>
Reviewed-by: Robert Flack <[email protected]>
Reviewed-by: Bo Liu <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1018302}
diff --git a/android_webview/renderer/aw_render_frame_ext.h b/android_webview/renderer/aw_render_frame_ext.h
index e56de5cc..522c271b 100644
--- a/android_webview/renderer/aw_render_frame_ext.h
+++ b/android_webview/renderer/aw_render_frame_ext.h
@@ -19,6 +19,7 @@
 
 namespace blink {
 class WebFrameWidget;
+class WebHitTestResult;
 class WebView;
 }
 
@@ -47,6 +48,7 @@
   void DidCommitProvisionalLoad(ui::PageTransition transition) override;
 
   void FocusedElementChanged(const blink::WebElement& element) override;
+  void DidCreateDocumentElement() override;
   void OnDestruct() override;
 
   // mojom::LocalMainFrame overrides:
@@ -63,6 +65,8 @@
   void BindLocalMainFrame(
       mojo::PendingAssociatedReceiver<mojom::LocalMainFrame> pending_receiver);
 
+  void HandleHitTestResult(const blink::WebHitTestResult& result);
+
   const mojo::AssociatedRemote<mojom::FrameHost>& GetFrameHost();
 
   blink::WebView* GetWebView();