summaryrefslogtreecommitdiffstats
path: root/tests/DumpRenderTree2
diff options
context:
space:
mode:
authorHuahui Wu <hwu@google.com>2011-01-21 10:37:09 -0800
committerHuahui Wu <hwu@google.com>2011-01-21 10:37:09 -0800
commita586b7baaf71eef621a826675346b95947fd1df0 (patch)
treea7a9937fbf9b41be73f0edd41e46f74d1ea76b3c /tests/DumpRenderTree2
parentbc7c148285ee39f2eafbfbe98d8fbbbe4bcc53bd (diff)
downloadframeworks_base-a586b7baaf71eef621a826675346b95947fd1df0.zip
frameworks_base-a586b7baaf71eef621a826675346b95947fd1df0.tar.gz
frameworks_base-a586b7baaf71eef621a826675346b95947fd1df0.tar.bz2
b/3369602 Using Math.round() to convert float coordinates to integers.
Change-Id: If4da01046c909667ce57a849569ae6b1acefb939
Diffstat (limited to 'tests/DumpRenderTree2')
-rw-r--r--tests/DumpRenderTree2/src/com/android/dumprendertree2/EventSenderImpl.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/DumpRenderTree2/src/com/android/dumprendertree2/EventSenderImpl.java b/tests/DumpRenderTree2/src/com/android/dumprendertree2/EventSenderImpl.java
index d425734..af22039 100644
--- a/tests/DumpRenderTree2/src/com/android/dumprendertree2/EventSenderImpl.java
+++ b/tests/DumpRenderTree2/src/com/android/dumprendertree2/EventSenderImpl.java
@@ -73,8 +73,8 @@ public class EventSenderImpl {
}
private Point createViewPointFromContentCoordinates(int x, int y) {
- return new Point((int)(x * mWebView.getScale()) - mWebView.getScrollX(),
- (int)(y * mWebView.getScale()) - mWebView.getScrollY());
+ return new Point(Math.round(x * mWebView.getScale()) - mWebView.getScrollX(),
+ Math.round(y * mWebView.getScale()) - mWebView.getScrollY());
}
public static class TouchPoint {