diff options
author | Huahui Wu <hwu@google.com> | 2011-01-21 10:37:09 -0800 |
---|---|---|
committer | Huahui Wu <hwu@google.com> | 2011-01-21 10:37:09 -0800 |
commit | a586b7baaf71eef621a826675346b95947fd1df0 (patch) | |
tree | a7a9937fbf9b41be73f0edd41e46f74d1ea76b3c /tests/DumpRenderTree | |
parent | bc7c148285ee39f2eafbfbe98d8fbbbe4bcc53bd (diff) | |
download | frameworks_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/DumpRenderTree')
-rw-r--r-- | tests/DumpRenderTree/src/com/android/dumprendertree/WebViewEventSender.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/WebViewEventSender.java b/tests/DumpRenderTree/src/com/android/dumprendertree/WebViewEventSender.java index 383d782..17345ae 100644 --- a/tests/DumpRenderTree/src/com/android/dumprendertree/WebViewEventSender.java +++ b/tests/DumpRenderTree/src/com/android/dumprendertree/WebViewEventSender.java @@ -357,11 +357,11 @@ public class WebViewEventSender implements EventSender { } private int contentsToWindowX(int x) { - return (int) (x * mWebView.getScale()) - mWebView.getScrollX(); + return Math.round(x * mWebView.getScale()) - mWebView.getScrollX(); } private int contentsToWindowY(int y) { - return (int) (y * mWebView.getScale()) - mWebView.getScrollY(); + return Math.round(y * mWebView.getScale()) - mWebView.getScrollY(); } private WebView mWebView = null; |