| 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 6ad50b527be8be544cd6d4b5df2c72cf4636d739..62ba413c091a7d3edb9c3b10ca19ef2b730e368d 100644
|
| --- a/components/autofill/content/renderer/password_generation_agent.cc
|
| +++ b/components/autofill/content/renderer/password_generation_agent.cc
|
| @@ -18,6 +18,7 @@
|
| #include "content/public/renderer/render_frame.h"
|
| #include "content/public/renderer/render_view.h"
|
| #include "google_apis/gaia/gaia_urls.h"
|
| +#include "third_party/WebKit/public/platform/WebFloatRect.h"
|
| #include "third_party/WebKit/public/platform/WebVector.h"
|
| #include "third_party/WebKit/public/web/WebDocument.h"
|
| #include "third_party/WebKit/public/web/WebFormElement.h"
|
| @@ -411,23 +412,19 @@ bool PasswordGenerationAgent::TextDidChangeInTextField(
|
| }
|
|
|
| void PasswordGenerationAgent::ShowGenerationPopup() {
|
| - blink::WebRect bounding_box_in_window =
|
| - generation_element_.boundsInViewport();
|
| - render_frame()->GetRenderView()->convertViewportToWindow(
|
| - &bounding_box_in_window);
|
| -
|
| + blink::WebFloatRect bounding_box_in_window;
|
| + render_frame()->GetRenderView()->getElementBoundingBoxWindow(
|
| + &generation_element_, &bounding_box_in_window);
|
| Send(new AutofillHostMsg_ShowPasswordGenerationPopup(
|
| 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);
|
| + blink::WebFloatRect bounding_box_in_window;
|
| + render_frame()->GetRenderView()->getElementBoundingBoxWindow(
|
| + &generation_element_, &bounding_box_in_window);
|
| Send(new AutofillHostMsg_ShowPasswordEditingPopup(
|
| routing_id(), gfx::RectF(bounding_box_in_window),
|
| *generation_form_data_->form));
|
|
|