| 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 bool isMultiPartForm = false; | 196 bool isMultiPartForm = false; |
| 197 String encodingType = copiedAttributes.encodingType(); | 197 String encodingType = copiedAttributes.encodingType(); |
| 198 | 198 |
| 199 if (copiedAttributes.method() == PostMethod) { | 199 if (copiedAttributes.method() == PostMethod) { |
| 200 isMultiPartForm = copiedAttributes.isMultiPartForm(); | 200 isMultiPartForm = copiedAttributes.isMultiPartForm(); |
| 201 if (isMultiPartForm && isMailtoForm) { | 201 if (isMultiPartForm && isMailtoForm) { |
| 202 encodingType = "application/x-www-form-urlencoded"; | 202 encodingType = "application/x-www-form-urlencoded"; |
| 203 isMultiPartForm = false; | 203 isMultiPartForm = false; |
| 204 } | 204 } |
| 205 } | 205 } |
| 206 WTF::TextEncoding dataEncoding = isMailtoForm ? UTF8Encoding() : FormDataBui
lder::encodingFromAcceptCharset(copiedAttributes.acceptCharset(), document.input
Encoding()); | 206 WTF::TextEncoding dataEncoding = isMailtoForm ? UTF8Encoding() : FormDataBui
lder::encodingFromAcceptCharset(copiedAttributes.acceptCharset(), document.input
Encoding(), document.defaultCharset()); |
| 207 RefPtr<DOMFormData> domFormData = DOMFormData::create(dataEncoding.encodingF
orFormSubmission()); | 207 RefPtr<DOMFormData> domFormData = DOMFormData::create(dataEncoding.encodingF
orFormSubmission()); |
| 208 Vector<pair<String, String> > formValues; | 208 Vector<pair<String, String> > formValues; |
| 209 | 209 |
| 210 bool containsPasswordData = false; | 210 bool containsPasswordData = false; |
| 211 for (unsigned i = 0; i < form->associatedElements().size(); ++i) { | 211 for (unsigned i = 0; i < form->associatedElements().size(); ++i) { |
| 212 FormAssociatedElement* control = form->associatedElements()[i]; | 212 FormAssociatedElement* control = form->associatedElements()[i]; |
| 213 HTMLElement* element = toHTMLElement(control); | 213 HTMLElement* element = toHTMLElement(control); |
| 214 if (!element->isDisabledFormControl()) | 214 if (!element->isDisabledFormControl()) |
| 215 control->appendFormData(*domFormData, isMultiPartForm); | 215 control->appendFormData(*domFormData, isMultiPartForm); |
| 216 if (element->hasTagName(inputTag)) { | 216 if (element->hasTagName(inputTag)) { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 frameRequest.resourceRequest().setHTTPContentType(m_contentType); | 271 frameRequest.resourceRequest().setHTTPContentType(m_contentType); |
| 272 else | 272 else |
| 273 frameRequest.resourceRequest().setHTTPContentType(m_contentType + ";
boundary=" + m_boundary); | 273 frameRequest.resourceRequest().setHTTPContentType(m_contentType + ";
boundary=" + m_boundary); |
| 274 } | 274 } |
| 275 | 275 |
| 276 frameRequest.resourceRequest().setURL(requestURL()); | 276 frameRequest.resourceRequest().setURL(requestURL()); |
| 277 FrameLoader::addHTTPOriginIfNeeded(frameRequest.resourceRequest(), m_origin)
; | 277 FrameLoader::addHTTPOriginIfNeeded(frameRequest.resourceRequest(), m_origin)
; |
| 278 } | 278 } |
| 279 | 279 |
| 280 } | 280 } |
| OLD | NEW |