summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/form_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/renderer/form_manager.cc')
-rw-r--r--chrome/renderer/form_manager.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/renderer/form_manager.cc b/chrome/renderer/form_manager.cc
index 144e23d..c66cd74 100644
--- a/chrome/renderer/form_manager.cc
+++ b/chrome/renderer/form_manager.cc
@@ -394,6 +394,12 @@ bool FormManager::FillForm(const FormData& form) {
for (size_t i = 0, j = 0;
i < form_element->control_elements.size() && j < form.fields.size();
++i, ++j) {
+ // Once again, empty WebString != empty string16, so we have to explicitly
+ // check for this case.
+ if (form_element->control_elements[i].nameForAutofill().length() == 0 &&
+ form.fields[j].name().empty())
+ continue;
+
// We assume that the intersection of the fields in
// |form_element->control_elements| and |form.fields| is ordered, but it's
// possible that one or the other sets may have more fields than the other,