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

Unified Diff: components/autofill/content/renderer/password_autofill_agent.cc

Issue 1455143004: Use the window coordinate for the autofill bounds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo Created 5 years 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
Index: components/autofill/content/renderer/password_autofill_agent.cc
diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc
index a80fef165202761f5609d199ea21e8e51c44d397..4fe2a14332d4122b6568bd6a15d1cb4fc636f277 100644
--- a/components/autofill/content/renderer/password_autofill_agent.cc
+++ b/components/autofill/content/renderer/password_autofill_agent.cc
@@ -1438,9 +1438,13 @@ bool PasswordAutofillAgent::ShowSuggestionPopup(
username.isNull() ? base::string16()
: static_cast<base::string16>(user_input.value()));
+ blink::WebRect bounding_box_in_window = selected_element.boundsInViewport();
+ render_frame()->GetRenderView()->convertViewportToWindow(
+ &bounding_box_in_window);
+
Send(new AutofillHostMsg_ShowPasswordSuggestions(
routing_id(), key_it->second, field.text_direction, username_string,
- options, gfx::RectF(selected_element.boundsInViewport())));
+ options, gfx::RectF(bounding_box_in_window)));
username_query_prefix_ = username_string;
return CanShowSuggestion(fill_data, username_string, show_all);
}

Powered by Google App Engine
This is Rietveld 408576698