| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 | 204 |
| 205 HTMLFormControlElement* control = toHTMLFormControlElement(*i); | 205 HTMLFormControlElement* control = toHTMLFormControlElement(*i); |
| 206 | 206 |
| 207 if (control->isDisabledFormControl() || control->name().isNull()) | 207 if (control->isDisabledFormControl() || control->name().isNull()) |
| 208 continue; | 208 continue; |
| 209 | 209 |
| 210 FormDataList dataList(*encoding); | 210 FormDataList dataList(*encoding); |
| 211 if (!control->appendFormData(dataList, false)) | 211 if (!control->appendFormData(dataList, false)) |
| 212 continue; | 212 continue; |
| 213 | 213 |
| 214 const Vector<FormDataList::Item>& items = dataList.items(); | 214 const WillBeHeapVector<FormDataList::Item>& items = dataList.items(); |
| 215 | 215 |
| 216 for (Vector<FormDataList::Item>::const_iterator j(items.begin()); j != i
tems.end(); ++j) { | 216 for (WillBeHeapVector<FormDataList::Item>::const_iterator j(items.begin(
)); j != items.end(); ++j) { |
| 217 // Handle ISINDEX / <input name=isindex> specially, but only if it's | 217 // Handle ISINDEX / <input name=isindex> specially, but only if it's |
| 218 // the first entry. | 218 // the first entry. |
| 219 if (!encodedString->isEmpty() || j->data() != "isindex") { | 219 if (!encodedString->isEmpty() || j->data() != "isindex") { |
| 220 if (!encodedString->isEmpty()) | 220 if (!encodedString->isEmpty()) |
| 221 encodedString->append('&'); | 221 encodedString->append('&'); |
| 222 FormDataBuilder::encodeStringAsFormData(*encodedString, j->data(
)); | 222 FormDataBuilder::encodeStringAsFormData(*encodedString, j->data(
)); |
| 223 encodedString->append('='); | 223 encodedString->append('='); |
| 224 } | 224 } |
| 225 ++j; | 225 ++j; |
| 226 if (control == textElement) { | 226 if (control == textElement) { |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 | 287 |
| 288 String action(formElement->action()); | 288 String action(formElement->action()); |
| 289 KURL url(formElement->document().completeURL(action.isNull() ? "" : action))
; | 289 KURL url(formElement->document().completeURL(action.isNull() ? "" : action))
; |
| 290 RefPtr<FormData> formData = FormData::create(encodedString); | 290 RefPtr<FormData> formData = FormData::create(encodedString); |
| 291 url.setQuery(formData->flattenToString()); | 291 url.setQuery(formData->flattenToString()); |
| 292 m_url = url; | 292 m_url = url; |
| 293 m_encoding = String(encoding.name()); | 293 m_encoding = String(encoding.name()); |
| 294 } | 294 } |
| 295 | 295 |
| 296 } // namespace blink | 296 } // namespace blink |
| OLD | NEW |