| Index: chrome/renderer/autofill/autofill_agent.cc
|
| diff --git a/chrome/renderer/autofill/autofill_agent.cc b/chrome/renderer/autofill/autofill_agent.cc
|
| index f293635e2f12f19b1138d00a1f81ae2c817d37e4..3259cc3e653d4a16eab37a6a187c719c584b98af 100644
|
| --- a/chrome/renderer/autofill/autofill_agent.cc
|
| +++ b/chrome/renderer/autofill/autofill_agent.cc
|
| @@ -19,6 +19,7 @@
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h"
|
| +#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
|
| #include "ui/base/keycodes/keyboard_codes.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
| @@ -124,6 +125,8 @@ bool AutofillAgent::InputElementClicked(const WebInputElement& element,
|
| }
|
|
|
| bool AutofillAgent::InputElementLostFocus() {
|
| + Send(new AutofillHostMsg_HideAutofillPopup(routing_id()));
|
| +
|
| return false;
|
| }
|
|
|
| @@ -315,9 +318,9 @@ void AutofillAgent::OnSuggestionsReturned(int query_id,
|
| separator_index = values.size();
|
| }
|
|
|
| - // Send to WebKit for display.
|
| if (!v.empty() && !autofill_query_element_.isNull() &&
|
| autofill_query_element_.isFocusable()) {
|
| + // Send to WebKit for display.
|
| web_view->applyAutofillSuggestions(
|
| autofill_query_element_, v, l, i, ids, separator_index);
|
| }
|
| @@ -414,8 +417,13 @@ void AutofillAgent::QueryAutofillSuggestions(const WebInputElement& element,
|
| WebFormControlElementToFormField(element, EXTRACT_VALUE, &field);
|
| }
|
|
|
| + // TODO(csharp): This value is currently returned as a page-relative value,
|
| + // which won't also convert easily to the correct viewport coordinates, so
|
| + // this should be changed to be a viewport-relative value.
|
| + gfx::Rect bounding_box(autofill_query_element_.absoluteBoundingBoxRect());
|
| +
|
| Send(new AutofillHostMsg_QueryFormFieldAutofill(
|
| - routing_id(), autofill_query_id_, form, field));
|
| + routing_id(), autofill_query_id_, form, field, bounding_box));
|
| }
|
|
|
| void AutofillAgent::FillAutofillFormData(const WebNode& node,
|
|
|