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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 void FormSubmission::Attributes::updateEncodingType(const String& type) | 101 void FormSubmission::Attributes::updateEncodingType(const String& type) |
102 { | 102 { |
103 m_encodingType = parseEncodingType(type); | 103 m_encodingType = parseEncodingType(type); |
104 m_isMultiPartForm = (m_encodingType == "multipart/form-data"); | 104 m_isMultiPartForm = (m_encodingType == "multipart/form-data"); |
105 } | 105 } |
106 | 106 |
107 FormSubmission::Method FormSubmission::Attributes::parseMethodType(const String&
type) | 107 FormSubmission::Method FormSubmission::Attributes::parseMethodType(const String&
type) |
108 { | 108 { |
109 if (equalIgnoringCase(type, "post")) | 109 if (equalIgnoringCase(type, "post")) |
110 return FormSubmission::PostMethod; | 110 return FormSubmission::PostMethod; |
111 if (RuntimeEnabledFeatures::dialogElementEnabled() && equalIgnoringCase(type
, "dialog")) | 111 if (equalIgnoringCase(type, "dialog")) |
112 return FormSubmission::DialogMethod; | 112 return FormSubmission::DialogMethod; |
113 return FormSubmission::GetMethod; | 113 return FormSubmission::GetMethod; |
114 } | 114 } |
115 | 115 |
116 void FormSubmission::Attributes::updateMethodType(const String& type) | 116 void FormSubmission::Attributes::updateMethodType(const String& type) |
117 { | 117 { |
118 m_method = parseMethodType(type); | 118 m_method = parseMethodType(type); |
119 } | 119 } |
120 | 120 |
121 String FormSubmission::Attributes::methodString(Method method) | 121 String FormSubmission::Attributes::methodString(Method method) |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 frameRequest.resourceRequest().setHTTPContentType(m_contentType); | 279 frameRequest.resourceRequest().setHTTPContentType(m_contentType); |
280 else | 280 else |
281 frameRequest.resourceRequest().setHTTPContentType(m_contentType + ";
boundary=" + m_boundary); | 281 frameRequest.resourceRequest().setHTTPContentType(m_contentType + ";
boundary=" + m_boundary); |
282 } | 282 } |
283 | 283 |
284 frameRequest.resourceRequest().setURL(requestURL()); | 284 frameRequest.resourceRequest().setURL(requestURL()); |
285 frameRequest.resourceRequest().addHTTPOriginIfNeeded(AtomicString(m_origin))
; | 285 frameRequest.resourceRequest().addHTTPOriginIfNeeded(AtomicString(m_origin))
; |
286 } | 286 } |
287 | 287 |
288 } | 288 } |
OLD | NEW |