Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: webkit/glue/form_field_values.cc

Issue 355003: Implement FormStructure and an initial method, EncodeUploadRequest. This als... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/form_field_values.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/form_field_values.cc
===================================================================
--- webkit/glue/form_field_values.cc (revision 30762)
+++ webkit/glue/form_field_values.cc (working copy)
@@ -42,6 +42,7 @@
FormFieldValues* result = new FormFieldValues();
result->form_name = StringToString16(form->name());
+ result->method = StringToString16(form->method());
result->source_url = KURLToGURL(document->url());
result->target_url = KURLToGURL(document->completeURL(form->action()));
result->ExtractFormFieldValues(webform);
@@ -74,14 +75,18 @@
// For each TEXT input field, store the name and value
string16 value = StringToString16(input_element->value());
TrimWhitespace(value, TRIM_LEADING, &value);
- if (value.length() == 0)
+ if (value.empty())
continue;
string16 name = StringToString16(WebKit::nameOfInputElement(input_element));
- if (name.length() == 0)
+ if (name.empty())
continue; // If we have no name, there is nothing to store.
- elements.push_back(FormField(name, value));
+ string16 type = StringToString16(input_element->formControlType());
+ if (type.empty())
+ continue;
+
+ elements.push_back(FormField(name, type, value));
}
}
« no previous file with comments | « webkit/glue/form_field_values.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698