Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2326)

Unified Diff: android_webview/renderer/aw_render_view_ext.cc

Issue 475633002: Pass TouchMajor to HitTestResult (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use blink::WebView::hitTestResultForTap Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: android_webview/renderer/aw_render_view_ext.cc
diff --git a/android_webview/renderer/aw_render_view_ext.cc b/android_webview/renderer/aw_render_view_ext.cc
index dc4264edc3db1129fb4cd3aec4512e7b9df6de61..d9674c50341a8b504a2c54343adbece1d2a17f59 100644
--- a/android_webview/renderer/aw_render_view_ext.cc
+++ b/android_webview/renderer/aw_render_view_ext.cc
@@ -265,13 +265,17 @@ void AwRenderViewExt::FocusedNodeChanged(const blink::WebNode& node) {
Send(new AwViewHostMsg_UpdateHitTestData(routing_id(), data));
}
-void AwRenderViewExt::OnDoHitTest(int view_x, int view_y) {
+void AwRenderViewExt::OnDoHitTest(int view_x, int view_y, float touch_major) {
if (!render_view() || !render_view()->GetWebView())
return;
+ // Using half of touch major as the radius. This follows what
+ // WebInputEventUtil::CreateWebTouchPoint is doing.
+ int radius = 0.5f * touch_major;
+ const blink::WebSize touch_area(radius, radius);
jdduke (slow) 2014/10/28 23:08:04 We shouldn't be using a radius here. Radii are onl
hush (inactive) 2014/10/30 00:25:19 Instead of passing touch_major, I will pass both t
const blink::WebHitTestResult result =
- render_view()->GetWebView()->hitTestResultAt(
- blink::WebPoint(view_x, view_y));
+ render_view()->GetWebView()->hitTestResultForTap(
hush (inactive) 2014/10/28 22:57:45 I only changed here in PS4. Others are just rebase
+ blink::WebPoint(view_x, view_y), touch_area);
AwHitTestData data;
if (!result.urlElement().isNull()) {

Powered by Google App Engine
This is Rietveld 408576698