diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-01 00:45:29 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-01 00:45:29 +0000 |
commit | c86ff370355b6cfe833a743e1d176de160e40c8a (patch) | |
tree | f0600bcc4573f53b7a3c0d59c1058a17e1eeed0c | |
parent | 93f21e4ceb7b2bda9d50657cce47f2e640e567b5 (diff) | |
download | chromium_src-c86ff370355b6cfe833a743e1d176de160e40c8a.zip chromium_src-c86ff370355b6cfe833a743e1d176de160e40c8a.tar.gz chromium_src-c86ff370355b6cfe833a743e1d176de160e40c8a.tar.bz2 |
AutoFill: Store the form method on the FormData object. This is another step in consolidating FormData and FormFieldValues.
BUG=33032
TEST=none
Review URL: http://codereview.chromium.org/1558012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43298 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/common/render_messages.h | 2 | ||||
-rw-r--r-- | chrome/renderer/form_manager.cc | 1 | ||||
-rw-r--r-- | webkit/glue/form_data.h | 2 |
3 files changed, 5 insertions, 0 deletions
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index b1320f5..533d6fe 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -1595,6 +1595,7 @@ struct ParamTraits<webkit_glue::FormData> { typedef webkit_glue::FormData param_type; static void Write(Message* m, const param_type& p) { WriteParam(m, p.name); + WriteParam(m, p.method); WriteParam(m, p.origin); WriteParam(m, p.action); WriteParam(m, p.fields); @@ -1602,6 +1603,7 @@ struct ParamTraits<webkit_glue::FormData> { static bool Read(const Message* m, void** iter, param_type* p) { return ReadParam(m, iter, &p->name) && + ReadParam(m, iter, &p->method) && ReadParam(m, iter, &p->origin) && ReadParam(m, iter, &p->action) && ReadParam(m, iter, &p->fields); diff --git a/chrome/renderer/form_manager.cc b/chrome/renderer/form_manager.cc index 5413963..8bfe9d8 100644 --- a/chrome/renderer/form_manager.cc +++ b/chrome/renderer/form_manager.cc @@ -186,6 +186,7 @@ void FormManager::FormElementToFormData(WebFrame* frame, RequirementsMask requirements, FormData* form) { form->name = form_element->form_element.name(); + form->method = form_element->form_element.method(); form->origin = frame->url(); form->action = frame->completeURL(form_element->form_element.action()); diff --git a/webkit/glue/form_data.h b/webkit/glue/form_data.h index 5309a2e..9d9061d 100644 --- a/webkit/glue/form_data.h +++ b/webkit/glue/form_data.h @@ -16,6 +16,8 @@ namespace webkit_glue { struct FormData { // The name of the form. string16 name; + // GET or POST. + string16 method; // The URL (minus query parameters) containing the form GURL origin; // The action target of the form |