| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 bool isMultiPartForm = false; | 200 bool isMultiPartForm = false; |
| 201 AtomicString encodingType = copiedAttributes.encodingType(); | 201 AtomicString encodingType = copiedAttributes.encodingType(); |
| 202 | 202 |
| 203 if (copiedAttributes.method() == PostMethod) { | 203 if (copiedAttributes.method() == PostMethod) { |
| 204 isMultiPartForm = copiedAttributes.isMultiPartForm(); | 204 isMultiPartForm = copiedAttributes.isMultiPartForm(); |
| 205 if (isMultiPartForm && isMailtoForm) { | 205 if (isMultiPartForm && isMailtoForm) { |
| 206 encodingType = AtomicString("application/x-www-form-urlencoded", Ato
micString::ConstructFromLiteral); | 206 encodingType = AtomicString("application/x-www-form-urlencoded", Ato
micString::ConstructFromLiteral); |
| 207 isMultiPartForm = false; | 207 isMultiPartForm = false; |
| 208 } | 208 } |
| 209 } | 209 } |
| 210 WTF::TextEncoding dataEncoding = isMailtoForm ? UTF8Encoding() : FormDataEnc
oder::encodingFromAcceptCharset(copiedAttributes.acceptCharset(), document.chara
cterSet(), document.defaultCharset()); | 210 WTF::TextEncoding dataEncoding = isMailtoForm ? UTF8Encoding() : FormDataEnc
oder::encodingFromAcceptCharset(copiedAttributes.acceptCharset(), document.encod
ing()); |
| 211 FormData* domFormData = FormData::create(dataEncoding.encodingForFormSubmiss
ion()); | 211 FormData* domFormData = FormData::create(dataEncoding.encodingForFormSubmiss
ion()); |
| 212 | 212 |
| 213 bool containsPasswordData = false; | 213 bool containsPasswordData = false; |
| 214 for (unsigned i = 0; i < form->associatedElements().size(); ++i) { | 214 for (unsigned i = 0; i < form->associatedElements().size(); ++i) { |
| 215 FormAssociatedElement* control = form->associatedElements()[i]; | 215 FormAssociatedElement* control = form->associatedElements()[i]; |
| 216 ASSERT(control); | 216 ASSERT(control); |
| 217 HTMLElement& element = toHTMLElement(*control); | 217 HTMLElement& element = toHTMLElement(*control); |
| 218 if (!element.isDisabledFormControl()) | 218 if (!element.isDisabledFormControl()) |
| 219 control->appendToFormData(*domFormData); | 219 control->appendToFormData(*domFormData); |
| 220 if (isHTMLInputElement(element)) { | 220 if (isHTMLInputElement(element)) { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 if (m_boundary.isEmpty()) | 274 if (m_boundary.isEmpty()) |
| 275 frameRequest.resourceRequest().setHTTPContentType(m_contentType); | 275 frameRequest.resourceRequest().setHTTPContentType(m_contentType); |
| 276 else | 276 else |
| 277 frameRequest.resourceRequest().setHTTPContentType(m_contentType + ";
boundary=" + m_boundary); | 277 frameRequest.resourceRequest().setHTTPContentType(m_contentType + ";
boundary=" + m_boundary); |
| 278 } | 278 } |
| 279 | 279 |
| 280 frameRequest.resourceRequest().setURL(requestURL()); | 280 frameRequest.resourceRequest().setURL(requestURL()); |
| 281 } | 281 } |
| 282 | 282 |
| 283 } // namespace blink | 283 } // namespace blink |
| OLD | NEW |