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

Unified Diff: android_webview/native/aw_contents.cc

Issue 475633002: Pass TouchMajor to HitTestResult (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review 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/native/aw_contents.cc
diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc
index 4bd68b78f36e9b75adc375c53483e595963252bf..fce7f054340a492cb5a8feae1ef5af651dd0ea58 100644
--- a/android_webview/native/aw_contents.cc
+++ b/android_webview/native/aw_contents.cc
@@ -64,6 +64,7 @@
#include "net/cert/x509_certificate.h"
#include "third_party/skia/include/core/SkPicture.h"
#include "ui/gfx/android/java_bitmap.h"
+#include "ui/gfx/geometry/rect_f.h"
#include "ui/gfx/image/image.h"
#include "ui/gfx/size.h"
@@ -808,10 +809,15 @@ base::android::ScopedJavaLocalRef<jbyteArray>
reinterpret_cast<const uint8*>(der_string.data()), der_string.length());
}
-void AwContents::RequestNewHitTestDataAt(JNIEnv* env, jobject obj,
- jint x, jint y) {
+void AwContents::RequestNewHitTestDataAt(JNIEnv* env,
+ jobject obj,
+ jint x,
+ jint y,
+ jfloat touch_major,
+ jfloat touch_minor) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- render_view_host_ext_->RequestNewHitTestDataAt(x, y);
+ gfx::RectF touch_area(x, y, touch_major / 2, touch_minor / 2);
jdduke (slow) 2014/10/30 19:54:58 x/y here correspond to the *center* of the rect, b
hush (inactive) 2014/11/04 01:55:57 I agree this is weird. (you mentioned this in a co
hush (inactive) 2014/11/04 02:50:47 Sorry. Scratch that. Blink does the half resize fo
+ render_view_host_ext_->RequestNewHitTestDataAt(touch_area);
}
void AwContents::UpdateLastHitTestData(JNIEnv* env, jobject obj) {

Powered by Google App Engine
This is Rietveld 408576698