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

Unified Diff: chrome/renderer/autofill/password_autofill_manager.cc

Issue 12188020: Adding the page and DPI scale adjustment for Autofill Popups. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed Ted's nits Created 7 years, 10 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 | « chrome/renderer/autofill/password_autofill_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/autofill/password_autofill_manager.cc
diff --git a/chrome/renderer/autofill/password_autofill_manager.cc b/chrome/renderer/autofill/password_autofill_manager.cc
index 46d17ceb5881e90b7f3fe4d4f979bc30642de2fb..a25f085d34e3a02bf4112c6e77ae71c9cd1b838f 100644
--- a/chrome/renderer/autofill/password_autofill_manager.cc
+++ b/chrome/renderer/autofill/password_autofill_manager.cc
@@ -208,6 +208,7 @@ PasswordAutofillManager::PasswordAutofillManager(
content::RenderView* render_view)
: content::RenderViewObserver(render_view),
disable_popup_(false),
+ web_view_(render_view->GetWebView()),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) {
}
@@ -511,9 +512,15 @@ bool PasswordAutofillManager::ShowSuggestionPopup(
WebKit::WebInputElement selected_element = user_input;
gfx::Rect bounding_box(selected_element.boundsInViewportSpace());
+
+ float scale = web_view_->pageScaleFactor();
+ gfx::RectF bounding_box_scaled(bounding_box.x() * scale,
+ bounding_box.y() * scale,
+ bounding_box.width() * scale,
+ bounding_box.height() * scale);
Send(new AutofillHostMsg_ShowPasswordSuggestions(routing_id(),
field,
- bounding_box,
+ bounding_box_scaled,
suggestions));
return !suggestions.empty();
}
« no previous file with comments | « chrome/renderer/autofill/password_autofill_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698