Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopup.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopup.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopup.java |
| index 7fed2994b132c2275c269920b677ab6e7c855108..efc9bb7774d647d591ce0bbc2934dbfdbb2e69b9 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopup.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopup.java |
| @@ -24,6 +24,7 @@ import java.util.ArrayList; |
| import org.chromium.chrome.R; |
| import org.chromium.content.browser.ContainerViewDelegate; |
| +import org.chromium.ui.gfx.DeviceDisplayInfo; |
| import org.chromium.ui.gfx.NativeWindow; |
| /** |
| @@ -150,7 +151,9 @@ public class AutofillPopup extends ListPopupWindow implements AdapterView.OnItem |
| * @param height The height of the anchor view. |
| */ |
| public void setAnchorRect(float x, float y, float width, float height) { |
| - mAnchorRect = new Rect((int) x, (int) y, (int) (x + width), (int) (y + height)); |
| + Double scale = DeviceDisplayInfo.create(mNativeWindow.getContext()).getDIPScale(); |
| + mAnchorRect = new Rect((int) Math.round(x * scale), (int) Math.round(y * scale), |
|
Ilya Sherman
2013/02/04 23:23:28
nit: Do you still need the type casts to int now t
aurimas (slooooooooow)
2013/02/04 23:56:27
It was returning a long since the input was Double
|
| + (int) Math.round((x + width) * scale), (int) Math.round((y + height) * scale)); |
| } |
| /** |