diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-10 22:00:17 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-10 22:00:17 +0000 |
commit | 2ad69c89162c0bb2cb9560d1d70ddbd928a37dc3 (patch) | |
tree | ca2d4dca5b51086d8d10083c223cdbb7432c1362 /chrome/renderer/form_manager.h | |
parent | 436e86cec0586bc8ac632ebd86eed0519d47535c (diff) | |
download | chromium_src-2ad69c89162c0bb2cb9560d1d70ddbd928a37dc3.zip chromium_src-2ad69c89162c0bb2cb9560d1d70ddbd928a37dc3.tar.gz chromium_src-2ad69c89162c0bb2cb9560d1d70ddbd928a37dc3.tar.bz2 |
AutoFill: Fix a bug that caused AutoFill to not fill the field the user is
typing in. This change also conveniently removes filling the default profile,
since this feature has been removed from AutoFill.
BUG=46219
TEST=FormManagerTest.FillFormNonEmptyField
Review URL: http://codereview.chromium.org/2766005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49454 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/form_manager.h')
-rw-r--r-- | chrome/renderer/form_manager.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/chrome/renderer/form_manager.h b/chrome/renderer/form_manager.h index ad4dee7..4d6aa5c 100644 --- a/chrome/renderer/form_manager.h +++ b/chrome/renderer/form_manager.h @@ -87,10 +87,11 @@ class FormManager { // Fills the form represented by |form|. |form| should have the name set to // the name of the form to fill out, and the number of elements and values - // must match the number of stored elements in the form. + // must match the number of stored elements in the form. |node| is the form + // control element that initiated the auto-fill process. // TODO(jhawkins): Is matching on name alone good enough? It's possible to // store multiple forms with the same names from different frames. - bool FillForm(const webkit_glue::FormData& form); + bool FillForm(const webkit_glue::FormData& form, const WebKit::WebNode& node); // Previews the form represented by |form|. Same conditions as FillForm. bool PreviewForm(const webkit_glue::FormData& form); @@ -99,9 +100,6 @@ class FormManager { // in |form| that have been previewed. void ClearPreviewedForm(const webkit_glue::FormData& form); - // Fills all of the forms in the cache with form data from |forms|. - void FillForms(const std::vector<webkit_glue::FormData>& forms); - // Resets the stored set of forms. void Reset(); @@ -144,9 +142,11 @@ class FormManager { // For each field in |data| that matches the corresponding field in |form| // and meets the |requirements|, |callback| is called with the actual - // WebFormControlElement and the FormField data from |form|. This method owns - // |callback|. + // WebFormControlElement and the FormField data from |form|. The field that + // matches |node| is not required to be empty if |requirements| includes + // REQUIRE_EMPTY. This method owns |callback|. void ForEachMatchingFormField(FormElement* form, + const WebKit::WebNode& node, RequirementsMask requirements, const webkit_glue::FormData& data, Callback* callback); |