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

Unified Diff: components/autofill/content/browser/content_autofill_driver.cc

Issue 1526263003: Position autofill popup widgets correctly under --site-per-process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed incorrect cast Created 4 years, 11 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
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..23e11ebc46b87a66f9723d6fab6e19fd14ebae6d 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::TransformBoundingBoxToViewportCoordinates(
+ const gfx::RectF& bounding_box) {
+ gfx::Point orig_point(bounding_box.x(), bounding_box.y());
+ gfx::Point transformed_point;
+ transformed_point =
+ render_frame_host_->GetView()->TransformPointToRootCoordSpace(orig_point);
+
+ 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)
« no previous file with comments | « components/autofill/content/browser/content_autofill_driver.h ('k') | components/autofill/core/browser/autofill_driver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698