Chromium Code Reviews| Index: components/autofill/content/browser/content_autofill_driver.cc |
| diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/components/autofill/content/browser/content_autofill_driver.cc |
| index 65ed75ac269acdc6460028827bce3978674c84da..2b9a108e7549c62036aaf3f35bc536071f23f675 100644 |
| --- a/components/autofill/content/browser/content_autofill_driver.cc |
| +++ b/components/autofill/content/browser/content_autofill_driver.cc |
| @@ -20,8 +20,10 @@ |
| #include "content/public/browser/navigation_details.h" |
| #include "content/public/browser/render_frame_host.h" |
| #include "content/public/browser/render_view_host.h" |
| +#include "content/public/browser/render_widget_host_view.h" |
| #include "content/public/browser/site_instance.h" |
| #include "ipc/ipc_message_macros.h" |
| +#include "ui/gfx/geometry/size_f.h" |
| namespace autofill { |
| @@ -147,6 +149,19 @@ void ContentAutofillDriver::PopupHidden() { |
| RendererShouldClearPreviewedForm(); |
| } |
| +gfx::RectF ContentAutofillDriver::TransformBoundingBox( |
| + const gfx::RectF& bounding_box) { |
| + gfx::Point orig_point(bounding_box.x(), bounding_box.y()); |
| + gfx::Point transformed_point; |
| + render_frame_host_->GetView()->TransformPointToRootCoordSpace( |
| + orig_point, &transformed_point); |
|
kenrb
2016/01/20 21:38:43
There is a loss of precision here, is this a real
Ilya Sherman
2016/01/20 23:12:15
nit: Can TransformPointToRootCoordSpace just retur
Ilya Sherman
2016/01/20 23:12:15
I'm not sure -- I'd recommend checking with someon
kenrb
2016/01/22 18:33:58
Done.
kenrb
2016/01/22 18:33:58
I talked to vollick@, and he thinks it should be f
|
| + |
| + gfx::RectF new_box; |
| + new_box.SetRect(transformed_point.x(), transformed_point.y(), |
| + bounding_box.width(), bounding_box.height()); |
| + return new_box; |
| +} |
| + |
| bool ContentAutofillDriver::HandleMessage(const IPC::Message& message) { |
| bool handled = true; |
| IPC_BEGIN_MESSAGE_MAP(ContentAutofillDriver, message) |