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

Unified Diff: chrome/browser/ui/autofill/autofill_popup_controller_impl.cc

Issue 17743005: [Autofill] Ignore device scale factor when computing the Autofill popup position. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/autofill/autofill_popup_controller_impl.cc
diff --git a/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc b/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc
index 9bd8ed2e046f9176195f3798f7d598878338122d..681c2d8ce6b9c63696a108a29cbceaad00b512da 100644
--- a/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc
+++ b/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc
@@ -607,10 +607,9 @@ std::pair<int, int> AutofillPopupControllerImpl::CalculatePopupXAndWidth(
const gfx::Display& left_display,
const gfx::Display& right_display,
int popup_required_width) const {
- int leftmost_display_x = left_display.bounds().x() *
- left_display.device_scale_factor();
- int rightmost_display_x = right_display.GetSizeInPixel().width() +
- right_display.bounds().x() * right_display.device_scale_factor();
+ int leftmost_display_x = left_display.bounds().x();
+ int rightmost_display_x =
+ right_display.GetSizeInPixel().width() + right_display.bounds().x();
// Calculate the start coordinates for the popup if it is growing right or
// the end position if it is growing to the left, capped to screen space.
@@ -639,11 +638,9 @@ std::pair<int,int> AutofillPopupControllerImpl::CalculatePopupYAndHeight(
const gfx::Display& top_display,
const gfx::Display& bottom_display,
int popup_required_height) const {
- int topmost_display_y = top_display.bounds().y() *
- top_display.device_scale_factor();
- int bottommost_display_y = bottom_display.GetSizeInPixel().height() +
- (bottom_display.bounds().y() *
- bottom_display.device_scale_factor());
+ int topmost_display_y = top_display.bounds().y();
+ int bottommost_display_y =
+ bottom_display.GetSizeInPixel().height() + bottom_display.bounds().y();
// Calculate the start coordinates for the popup if it is growing down or
// the end position if it is growing up, capped to screen space.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698