diff options
author | Steve Block <steveblock@google.com> | 2010-09-23 08:10:47 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-09-23 08:10:47 -0700 |
commit | 32eb9c0c90a8800cdb31fe31b75ee08817545a23 (patch) | |
tree | 2ed90670920f8542dec78f78bdfa8e9b403300a7 /WebKit/android | |
parent | d30d50ac7e37547923913d5475c96d1213c0776a (diff) | |
parent | 60e8df73fc6d110245987632be372eabd625344f (diff) | |
download | external_webkit-32eb9c0c90a8800cdb31fe31b75ee08817545a23.zip external_webkit-32eb9c0c90a8800cdb31fe31b75ee08817545a23.tar.gz external_webkit-32eb9c0c90a8800cdb31fe31b75ee08817545a23.tar.bz2 |
Merge changes I359a952c,Idcafae15
* changes:
Fix a bug that would cause the AutoFill server to return an error.
Add more profile data to the canned profile.
Diffstat (limited to 'WebKit/android')
-rw-r--r-- | WebKit/android/WebCoreSupport/autofill/FormManagerAndroid.cpp | 5 | ||||
-rw-r--r-- | WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/WebKit/android/WebCoreSupport/autofill/FormManagerAndroid.cpp b/WebKit/android/WebCoreSupport/autofill/FormManagerAndroid.cpp index c97a2a8..8f0467b 100644 --- a/WebKit/android/WebCoreSupport/autofill/FormManagerAndroid.cpp +++ b/WebKit/android/WebCoreSupport/autofill/FormManagerAndroid.cpp @@ -217,6 +217,8 @@ bool FormManager::HTMLFormElementToFormData(HTMLFormElement& element, std::vector<bool> fields_extracted(control_elements.size(), false); for (size_t i = 0; i < control_elements.size(); ++i) { const HTMLFormControlElement* control_element = control_elements[i]; + if (!(control_element->hasTagName(inputTag) || control_element->hasTagName(selectTag))) + continue; if (requirements & REQUIRE_AUTOCOMPLETE && control_element->type() == WTF::String("text")) { @@ -305,7 +307,8 @@ void FormManager::ExtractForms(WebCore::Document* document) { size_t size = elements.size(); for (size_t i = 0; i < size; i++) { WebCore::HTMLFormControlElement* e = elements[i]; - form_elements->control_elements.push_back(e); + if (e->hasTagName(inputTag) || e->hasTagName(selectTag)) + form_elements->control_elements.push_back(e); } form_elements->form_element = form; } diff --git a/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp b/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp index 08d5e58..2046f46 100644 --- a/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp +++ b/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp @@ -59,6 +59,11 @@ WebAutoFill::WebAutoFill() mAutoFillProfile = new AutoFillProfile(); mAutoFillProfile->SetInfo(AutoFillType(NAME_FULL), string16(ASCIIToUTF16("John Smith"))); mAutoFillProfile->SetInfo(AutoFillType(EMAIL_ADDRESS), string16(ASCIIToUTF16("jsmith@gmail.com"))); + mAutoFillProfile->SetInfo(AutoFillType(ADDRESS_HOME_LINE1), string16(ASCIIToUTF16("123 Fake Street"))); + mAutoFillProfile->SetInfo(AutoFillType(ADDRESS_HOME_LINE2), string16(ASCIIToUTF16("Somewhere"))); + mAutoFillProfile->SetInfo(AutoFillType(ADDRESS_HOME_CITY), string16(ASCIIToUTF16("Faketown"))); + mAutoFillProfile->SetInfo(AutoFillType(ADDRESS_HOME_STATE), string16(ASCIIToUTF16("CA"))); + mAutoFillProfile->SetInfo(AutoFillType(ADDRESS_HOME_COUNTRY), string16(ASCIIToUTF16("Germany"))); mAutoFillProfile->SetInfo(AutoFillType(ADDRESS_HOME_ZIP), string16(ASCIIToUTF16("AB12 3DE"))); mAutoFillProfile->SetInfo(AutoFillType(PHONE_HOME_WHOLE_NUMBER), string16(ASCIIToUTF16("0123456789"))); |