diff options
author | Iain Merrick <husky@google.com> | 2010-10-13 15:08:26 +0100 |
---|---|---|
committer | Iain Merrick <husky@google.com> | 2010-10-19 14:47:18 +0100 |
commit | 6592639f64d398a3c279c98cd4a15741ebe17b9a (patch) | |
tree | 04b1337c616600046a81eca4c550d2b6dd309b18 /WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp | |
parent | 88c013526c4a3dadc408824197843bf978155df3 (diff) | |
download | external_webkit-6592639f64d398a3c279c98cd4a15741ebe17b9a.zip external_webkit-6592639f64d398a3c279c98cd4a15741ebe17b9a.tar.gz external_webkit-6592639f64d398a3c279c98cd4a15741ebe17b9a.tar.bz2 |
Fixing WebKit APIs affected by Chromium 7.0.540.0 merge
WebUrlLoaderClient, WebRequest: changing std::wstring to string16
http://src.chromium.org/viewvc/chrome?view=rev&revision=54101
HostResolver parameters changed, fixing WebRequestContext.cpp
http://src.chromium.org/viewvc/chrome?view=rev&revision=57189
Icon parameter added to AutoFillHost, fixing AutoFillHostAndroid.
http://src.chromium.org/viewvc/chrome?view=rev&revision=54052
Change-Id: If6a17af7da3b80d039205883019e4a73eb35f562
Diffstat (limited to 'WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp')
-rw-r--r-- | WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp b/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp index 4774778..157a58a 100644 --- a/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp +++ b/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp @@ -66,7 +66,7 @@ WebAutoFill::WebAutoFill() WebAutoFill::~WebAutoFill() { mQueryMap.clear(); - mSuggestionMap.clear(); + mUniqueIdMap.clear(); } void WebAutoFill::searchDocument(WebCore::Document* document) @@ -84,7 +84,7 @@ void WebAutoFill::searchDocument(WebCore::Document* document) return; mQueryMap.clear(); - mSuggestionMap.clear(); + mUniqueIdMap.clear(); mQueryId = 1; mAutoFillManager->Reset(); mFormManager->Reset(); @@ -128,13 +128,9 @@ void WebAutoFill::querySuccessful(int queryId, const string16& value, const stri if (!enabled()) return; - // Store the results for the query and inform java that autofill suggestions for this form are available. + // 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. - AutoFillSuggestion suggestion; - suggestion.value = value; - suggestion.label = label; - suggestion.uniqueId = uniqueId; - mSuggestionMap[queryId] = AutoFillSuggestion(); + mUniqueIdMap[queryId] = uniqueId; ASSERT(mWebViewCore); mWebViewCore->setWebTextViewAutoFillable(queryId); @@ -146,11 +142,10 @@ void WebAutoFill::fillFormFields(int queryId) return; webkit_glue::FormData* form = mQueryMap[queryId]; - AutoFillQuerySuggestionMap::iterator iter = mSuggestionMap.find(queryId); + AutoFillQueryToUniqueIdMap::iterator iter = mUniqueIdMap.find(queryId); ASSERT(iter != mSuggestionMap.end()); - AutoFillSuggestion* suggestion = &iter->second; - mAutoFillManager->FillAutoFillFormData(queryId, *form, suggestion->value, suggestion->label, suggestion->uniqueId); - mSuggestionMap.erase(iter); + mAutoFillManager->FillAutoFillFormData(queryId, *form, iter->second); + mUniqueIdMap.erase(iter); } void WebAutoFill::fillFormInPage(int queryId, const webkit_glue::FormData& form) |