summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authorisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-10 05:38:45 +0000
committerisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-10 05:38:45 +0000
commit1b5f69a1bc11fe1670f994c80a2ae32247c8e549 (patch)
tree3939ba8519f83b4cabd6cef81bad92f309ce9078 /webkit/glue
parentd8cef10c18dd5378ada0acc799c754ae39c06bd0 (diff)
downloadchromium_src-1b5f69a1bc11fe1670f994c80a2ae32247c8e549.zip
chromium_src-1b5f69a1bc11fe1670f994c80a2ae32247c8e549.tar.gz
chromium_src-1b5f69a1bc11fe1670f994c80a2ae32247c8e549.tar.bz2
Add preliminary Autofill support for the 'autocompletetype' attribute.
BUG=92121 TEST=unit_tests --gtest_filter=FormStructureTest.*Autocompletetype*; browser_tests --gtest_filter=FormManagerTest.WebFormControlElementToFormFieldAutocompletetype Review URL: http://codereview.chromium.org/7602006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96131 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/form_field.cc3
-rw-r--r--webkit/glue/form_field.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/webkit/glue/form_field.cc b/webkit/glue/form_field.cc
index 798c5b2..6c8faff 100644
--- a/webkit/glue/form_field.cc
+++ b/webkit/glue/form_field.cc
@@ -33,6 +33,7 @@ bool FormField::operator==(const FormField& field) const {
return (label == field.label &&
name == field.name &&
form_control_type == field.form_control_type &&
+ autocomplete_type == field.autocomplete_type &&
max_length == field.max_length);
}
@@ -50,6 +51,8 @@ std::ostream& operator<<(std::ostream& os, const FormField& field) {
<< " "
<< UTF16ToUTF8(field.form_control_type)
<< " "
+ << UTF16ToUTF8(field.autocomplete_type)
+ << " "
<< field.max_length
<< " "
<< (field.is_autofilled ? "true" : "false");
diff --git a/webkit/glue/form_field.h b/webkit/glue/form_field.h
index 622dabf..bde8a53 100644
--- a/webkit/glue/form_field.h
+++ b/webkit/glue/form_field.h
@@ -28,6 +28,7 @@ struct FormField {
string16 name;
string16 value;
string16 form_control_type;
+ string16 autocomplete_type;
int max_length;
bool is_autofilled;
@@ -50,6 +51,7 @@ std::ostream& operator<<(std::ostream& os, const FormField& field);
EXPECT_EQ(expected.name, actual.name); \
EXPECT_EQ(expected.value, actual.value); \
EXPECT_EQ(expected.form_control_type, actual.form_control_type); \
+ EXPECT_EQ(expected.autocomplete_type, actual.autocomplete_type); \
EXPECT_EQ(expected.max_length, actual.max_length); \
EXPECT_EQ(expected.is_autofilled, actual.is_autofilled); \
} while (0)