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

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

Issue 1516723003: [Element / Autofill] Add boundsInViewportFloat() to fix <input> popup misalignment. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refator to use boundsInViewportFloat() eventually, but keep boundsInViewportInt(). 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/autofill_agent.cc
diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components/autofill/content/renderer/autofill_agent.cc
index afb827491c179d159509109a956cf84a140bbeee..47bbb2bb092bd696bcaf82aaa8dbc3f7c956cef1 100644
--- a/components/autofill/content/renderer/autofill_agent.cc
+++ b/components/autofill/content/renderer/autofill_agent.cc
@@ -36,7 +36,7 @@
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_view.h"
#include "net/cert/cert_status_flags.h"
-#include "third_party/WebKit/public/platform/WebRect.h"
+#include "third_party/WebKit/public/platform/WebFloatRect.h"
#include "third_party/WebKit/public/platform/WebURLRequest.h"
#include "third_party/WebKit/public/web/WebConsoleMessage.h"
#include "third_party/WebKit/public/web/WebDataSource.h"
@@ -735,10 +735,9 @@ void AutofillAgent::QueryAutofillSuggestions(
data_list_values,
data_list_labels));
- blink::WebRect bounding_box_in_window = element_.boundsInViewport();
- render_frame()->GetRenderView()->convertViewportToWindow(
+ blink::WebFloatRect bounding_box_in_window;
+ render_frame()->GetRenderView()->getElementBoundingBoxWindow(&element_,
&bounding_box_in_window);
-
Send(new AutofillHostMsg_QueryFormFieldAutofill(
routing_id(), autofill_query_id_, form, field,
gfx::RectF(bounding_box_in_window)));
« no previous file with comments | « chrome/browser/ui/autofill/popup_controller_common.cc ('k') | components/autofill/content/renderer/password_autofill_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698