| 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 if (!encodedString->isEmpty()) | 217 if (!encodedString->isEmpty()) |
| 218 encodedString->append('&'); | 218 encodedString->append('&'); |
| 219 FormDataBuilder::encodeStringAsFormData(*encodedString, j->data()); | 219 FormDataBuilder::encodeStringAsFormData(*encodedString, j->data()); |
| 220 encodedString->append('='); | 220 encodedString->append('='); |
| 221 ++j; | 221 ++j; |
| 222 if (control == textElement) { | 222 if (control == textElement) { |
| 223 encodedString->append("{searchTerms}", 13); | 223 encodedString->append("{searchTerms}", 13); |
| 224 isElementFound = true; | 224 isElementFound = true; |
| 225 } else | 225 } else |
| 226 FormDataBuilder::encodeStringAsFormData(*encodedString, j->data(
)); | 226 FormDataBuilder::encodeStringAsFormData(*encodedString, j->data(
)); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 | 283 |
| 284 String action(formElement->action()); | 284 String action(formElement->action()); |
| 285 KURL url(formElement->document().completeURL(action.isNull() ? "" : action))
; | 285 KURL url(formElement->document().completeURL(action.isNull() ? "" : action))
; |
| 286 RefPtr<FormData> formData = FormData::create(encodedString); | 286 RefPtr<FormData> formData = FormData::create(encodedString); |
| 287 url.setQuery(formData->flattenToString()); | 287 url.setQuery(formData->flattenToString()); |
| 288 m_url = url; | 288 m_url = url; |
| 289 m_encoding = String(encoding.name()); | 289 m_encoding = String(encoding.name()); |
| 290 } | 290 } |
| 291 | 291 |
| 292 } // namespace blink | 292 } // namespace blink |
| OLD | NEW |