| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "Frame.h" | 7 #include "Frame.h" |
| 8 #include "HTMLFormElement.h" | 8 #include "HTMLFormElement.h" |
| 9 #include "HTMLInputElement.h" | 9 #include "HTMLInputElement.h" |
| 10 #include "HTMLNames.h" | 10 #include "HTMLNames.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 // For each TEXT input field, store the name and value | 62 // For each TEXT input field, store the name and value |
| 63 string16 value = StringToString16(input_element->value()); | 63 string16 value = StringToString16(input_element->value()); |
| 64 TrimWhitespace(value, TRIM_LEADING, &value); | 64 TrimWhitespace(value, TRIM_LEADING, &value); |
| 65 if (value.length() == 0) | 65 if (value.length() == 0) |
| 66 continue; | 66 continue; |
| 67 | 67 |
| 68 string16 name = StringToString16(WebKit::nameOfInputElement(input_element)); | 68 string16 name = StringToString16(WebKit::nameOfInputElement(input_element)); |
| 69 if (name.length() == 0) | 69 if (name.length() == 0) |
| 70 continue; // If we have no name, there is nothing to store. | 70 continue; // If we have no name, there is nothing to store. |
| 71 | 71 |
| 72 result->elements.push_back(FormField(form_element, name, value)); | 72 result->elements.push_back(FormField(name, value)); |
| 73 } | 73 } |
| 74 | 74 |
| 75 return result; | 75 return result; |
| 76 } | 76 } |
| 77 | 77 |
| 78 } // namespace webkit_glue | 78 } // namespace webkit_glue |
| OLD | NEW |