diff options
author | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-14 19:21:18 +0000 |
---|---|---|
committer | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-14 19:21:18 +0000 |
commit | ee0e2d945e34a794f5268137f71fc9e7d1cdc82b (patch) | |
tree | ceac50e53dc7d55b85e9ca2d0ab359fa9a236deb /webkit/glue/form_field.h | |
parent | 1b2b9e175adf3b51215ca88f75ea66605f74ef33 (diff) | |
download | chromium_src-ee0e2d945e34a794f5268137f71fc9e7d1cdc82b.zip chromium_src-ee0e2d945e34a794f5268137f71fc9e7d1cdc82b.tar.gz chromium_src-ee0e2d945e34a794f5268137f71fc9e7d1cdc82b.tar.bz2 |
Form AutoFill Phone number should be displayed as xxx-xxx-xxxx
Modifies the AutoFill label inferencing logic to skip over <img> tags when deriving labels. It is common to use
small images as spacers between elements. Also, extends the phone number heuristics to recognize numbers that are
split into three fields of the form [xxx]-[yyy]-[zzzz] where xxx is the area code, yyy is the phone number prefix and zzz
is the phone number suffix.
Note: This change has a dependency on WebKit change: https://bugs.webkit.org/show_bug.cgi?id=38825.
Will need to wait for that to land before committing this change.
BUG=38218
TEST=FormManagerTest.LabelsInferredWithImageTags:FormStructureTest.ThreePartPhoneNumber:PhoneFieldTest.ThreePartPhoneNumber
Review URL: http://codereview.chromium.org/1979008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47297 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/form_field.h')
-rw-r--r-- | webkit/glue/form_field.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/webkit/glue/form_field.h b/webkit/glue/form_field.h index 3ea7de9..b0e9dec 100644 --- a/webkit/glue/form_field.h +++ b/webkit/glue/form_field.h @@ -18,12 +18,14 @@ class FormField { FormField(const string16& label, const string16& name, const string16& value, - const string16& form_control_type); + const string16& form_control_type, + int size); const string16& label() const { return label_; } const string16& name() const { return name_; } const string16& value() const { return value_; } const string16& form_control_type() const { return form_control_type_; } + int size() const { return size_; } void set_label(const string16& label) { label_ = label; } void set_name(const string16& name) { name_ = name; } @@ -31,6 +33,7 @@ class FormField { void set_form_control_type(const string16& form_control_type) { form_control_type_ = form_control_type; } + void set_size(int size) { size_ = size; } bool operator==(const FormField& field) const; bool operator!=(const FormField& field) const; @@ -40,6 +43,7 @@ class FormField { string16 name_; string16 value_; string16 form_control_type_; + int size_; }; // So we can compare FormFields with EXPECT_EQ(). |