From e186320c213f795c797868d42d4289bd0f1f86c4 Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Fri, 26 Nov 2010 11:40:11 +0000 Subject: [PATCH] Merge Chromium at r66597: AutoFill: no more queryId See http://src.chromium.org/viewvc/chrome?view=rev&revision=66237 Change-Id: Ie2bf417bf20686ca782f6c0e4d2527e666c88ad4 --- WebKit/android/WebCoreSupport/autofill/AutoFillHostAndroid.cpp | 4 ++-- WebKit/android/WebCoreSupport/autofill/AutoFillHostAndroid.h | 2 +- WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp | 8 ++++---- WebKit/android/WebCoreSupport/autofill/WebAutoFill.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/WebKit/android/WebCoreSupport/autofill/AutoFillHostAndroid.cpp b/WebKit/android/WebCoreSupport/autofill/AutoFillHostAndroid.cpp index 62963f209..5bc4c921b 100644 --- a/WebKit/android/WebCoreSupport/autofill/AutoFillHostAndroid.cpp +++ b/WebKit/android/WebCoreSupport/autofill/AutoFillHostAndroid.cpp @@ -35,11 +35,11 @@ AutoFillHostAndroid::AutoFillHostAndroid(WebAutoFill* autoFill) { } -void AutoFillHostAndroid::AutoFillSuggestionsReturned(int queryId, const std::vector& names, const std::vector& labels, const std::vector& icons, const std::vector& uniqueIds) +void AutoFillHostAndroid::AutoFillSuggestionsReturned(const std::vector& names, const std::vector& labels, const std::vector& icons, const std::vector& uniqueIds) { // TODO: what do we do with icons? if (mAutoFill) - mAutoFill->querySuccessful(queryId, names[0], labels[0], uniqueIds[0]); + mAutoFill->querySuccessful(names[0], labels[0], uniqueIds[0]); } void AutoFillHostAndroid::AutoFillFormDataFilled(int queryId, const webkit_glue::FormData& form) diff --git a/WebKit/android/WebCoreSupport/autofill/AutoFillHostAndroid.h b/WebKit/android/WebCoreSupport/autofill/AutoFillHostAndroid.h index c863e6222..9677b46f2 100644 --- a/WebKit/android/WebCoreSupport/autofill/AutoFillHostAndroid.h +++ b/WebKit/android/WebCoreSupport/autofill/AutoFillHostAndroid.h @@ -43,7 +43,7 @@ public: AutoFillHostAndroid(WebAutoFill* autoFill); virtual ~AutoFillHostAndroid() { } - virtual void AutoFillSuggestionsReturned(int queryId, const std::vector& names, const std::vector& labels, const std::vector& icons, const std::vector& uniqueIds); + virtual void AutoFillSuggestionsReturned(const std::vector& names, const std::vector& labels, const std::vector& icons, const std::vector& uniqueIds); virtual void AutoFillFormDataFilled(int queryId, const webkit_glue::FormData&); private: diff --git a/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp b/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp index 2d92b4b7e..4fa0e542d 100644 --- a/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp +++ b/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp @@ -122,7 +122,7 @@ void WebAutoFill::formFieldFocused(WebCore::HTMLFormControlElement* formFieldEle mFormManager->FindFormWithFormControlElement(formFieldElement, FormManager::REQUIRE_AUTOCOMPLETE, form); mQueryMap[mQueryId] = form; - bool suggestions = mAutoFillManager->GetAutoFillSuggestions(mQueryId, false, formField); + bool suggestions = mAutoFillManager->GetAutoFillSuggestions(false, formField); mQueryId++; if (!suggestions) { ASSERT(mWebViewCore); @@ -132,17 +132,17 @@ void WebAutoFill::formFieldFocused(WebCore::HTMLFormControlElement* formFieldEle } } -void WebAutoFill::querySuccessful(int queryId, const string16& value, const string16& label, int uniqueId) +void WebAutoFill::querySuccessful(const string16& value, const string16& label, int uniqueId) { if (!enabled()) return; // Store the unique ID for the query and inform java that autofill suggestions for this form are available. // Pass java the queryId so that it can pass it back if the user decides to use autofill. - mUniqueIdMap[queryId] = uniqueId; + mUniqueIdMap[mQueryId] = uniqueId; ASSERT(mWebViewCore); - mWebViewCore->setWebTextViewAutoFillable(queryId, mAutoFillProfile->Label()); + mWebViewCore->setWebTextViewAutoFillable(mQueryId, mAutoFillProfile->Label()); } void WebAutoFill::fillFormFields(int queryId) diff --git a/WebKit/android/WebCoreSupport/autofill/WebAutoFill.h b/WebKit/android/WebCoreSupport/autofill/WebAutoFill.h index 422129f3c..4025b5ad6 100644 --- a/WebKit/android/WebCoreSupport/autofill/WebAutoFill.h +++ b/WebKit/android/WebCoreSupport/autofill/WebAutoFill.h @@ -58,7 +58,7 @@ public: void searchDocument(WebCore::Frame*); void formFieldFocused(WebCore::HTMLFormControlElement*); void fillFormFields(int queryId); - void querySuccessful(int queryId, const string16& value, const string16& label, int uniqueId); + void querySuccessful(const string16& value, const string16& label, int uniqueId); void fillFormInPage(int queryId, const webkit_glue::FormData& form); void setWebViewCore(WebViewCore* webViewCore) { mWebViewCore = webViewCore; } bool enabled() const; -- 2.11.0