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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwContents.java

Issue 2842653004: Add back Rect parcelable to onSmartClipDataExtracted. (Closed)
Patch Set: Avoid coordinate conversion Created 3 years, 8 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/java/src/org/chromium/android_webview/AwContents.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index 9ebbb5b57ef8576cac1111b73192d98c93ad29ca..a9221516c07a09811af18e76997a6bf210a42248 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -3014,7 +3014,7 @@ public class AwContents implements SmartClipProvider {
public void extractSmartClipData(int x, int y, int width, int height) {
float dpi = mContentViewCore.getRenderCoordinates().getDeviceScaleFactor();
if (!isDestroyedOrNoOperation(WARN)) {
- mWebContents.requestSmartClipExtract(
+ mWebContents.requestSmartClipExtract(new Rect(x, y, x + width, y + height),
David Trainor- moved to gerrit 2017/04/26 20:58:17 It looks like rect isn't scaled by dpi but the oth
(int) (x / dpi), (int) (y / dpi), (int) (width / dpi), (int) (height / dpi));
}
}

Powered by Google App Engine
This is Rietveld 408576698