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

Unified Diff: components/autofill/content/renderer/password_generation_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_generation_agent.cc
diff --git a/components/autofill/content/renderer/password_generation_agent.cc b/components/autofill/content/renderer/password_generation_agent.cc
index 4d1c8cc41eafca86a055ebf008fce5df223a2e90..6ad50b527be8be544cd6d4b5df2c72cf4636d739 100644
--- a/components/autofill/content/renderer/password_generation_agent.cc
+++ b/components/autofill/content/renderer/password_generation_agent.cc
@@ -411,18 +411,26 @@ bool PasswordGenerationAgent::TextDidChangeInTextField(
}
void PasswordGenerationAgent::ShowGenerationPopup() {
+ blink::WebRect bounding_box_in_window =
+ generation_element_.boundsInViewport();
+ render_frame()->GetRenderView()->convertViewportToWindow(
+ &bounding_box_in_window);
+
Send(new AutofillHostMsg_ShowPasswordGenerationPopup(
- routing_id(), gfx::RectF(generation_element_.boundsInViewport()),
+ routing_id(), gfx::RectF(bounding_box_in_window),
generation_element_.maxLength(), *generation_form_data_->form));
generation_popup_shown_ = true;
}
void PasswordGenerationAgent::ShowEditingPopup() {
+ blink::WebRect bounding_box_in_window =
+ generation_element_.boundsInViewport();
+ render_frame()->GetRenderView()->convertViewportToWindow(
+ &bounding_box_in_window);
Send(new AutofillHostMsg_ShowPasswordEditingPopup(
- routing_id(), gfx::RectF(generation_element_.boundsInViewport()),
+ routing_id(), gfx::RectF(bounding_box_in_window),
*generation_form_data_->form));
-
editing_popup_shown_ = true;
}
« no previous file with comments | « components/autofill/content/renderer/password_autofill_agent.cc ('k') | content/public/renderer/render_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698