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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 const FormAssociatedElement::List& elements = form->associatedElements(); | 203 const FormAssociatedElement::List& elements = form->associatedElements(); |
204 for (FormAssociatedElement::List::const_iterator i(elements.begin()); i != e
lements.end(); ++i) { | 204 for (FormAssociatedElement::List::const_iterator i(elements.begin()); i != e
lements.end(); ++i) { |
205 if (!(*i)->isFormControlElement()) | 205 if (!(*i)->isFormControlElement()) |
206 continue; | 206 continue; |
207 | 207 |
208 HTMLFormControlElement* control = toHTMLFormControlElement(*i); | 208 HTMLFormControlElement* control = toHTMLFormControlElement(*i); |
209 | 209 |
210 if (control->isDisabledFormControl() || control->name().isNull()) | 210 if (control->isDisabledFormControl() || control->name().isNull()) |
211 continue; | 211 continue; |
212 | 212 |
213 RefPtrWillBeRawPtr<FormDataList> dataList = FormDataList::create(*encodi
ng); | 213 FormDataList* dataList = FormDataList::create(*encoding); |
214 if (!control->appendFormData(*dataList, false)) | 214 if (!control->appendFormData(*dataList, false)) |
215 continue; | 215 continue; |
216 | 216 |
217 const FormDataList::FormDataListItems& items = dataList->items(); | 217 const FormDataList::FormDataListItems& items = dataList->items(); |
218 for (FormDataList::FormDataListItems::const_iterator j(items.begin()); j
!= items.end(); ++j) { | 218 for (FormDataList::FormDataListItems::const_iterator j(items.begin()); j
!= items.end(); ++j) { |
219 if (!encodedString->isEmpty()) | 219 if (!encodedString->isEmpty()) |
220 encodedString->append('&'); | 220 encodedString->append('&'); |
221 FormDataBuilder::encodeStringAsFormData(*encodedString, j->data()); | 221 FormDataBuilder::encodeStringAsFormData(*encodedString, j->data()); |
222 encodedString->append('='); | 222 encodedString->append('='); |
223 ++j; | 223 ++j; |
(...skipping 59 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 |