| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 { | 136 { |
| 137 m_method = other.m_method; | 137 m_method = other.m_method; |
| 138 m_isMultiPartForm = other.m_isMultiPartForm; | 138 m_isMultiPartForm = other.m_isMultiPartForm; |
| 139 | 139 |
| 140 m_action = other.m_action; | 140 m_action = other.m_action; |
| 141 m_target = other.m_target; | 141 m_target = other.m_target; |
| 142 m_encodingType = other.m_encodingType; | 142 m_encodingType = other.m_encodingType; |
| 143 m_acceptCharset = other.m_acceptCharset; | 143 m_acceptCharset = other.m_acceptCharset; |
| 144 } | 144 } |
| 145 | 145 |
| 146 inline FormSubmission::FormSubmission(Method method, const KURL& action, const A
tomicString& target, const AtomicString& contentType, PassRefPtr<FormState> stat
e, PassRefPtr<FormData> data, const String& boundary, PassRefPtr<Event> event) | 146 inline FormSubmission::FormSubmission(Method method, const KURL& action, const A
tomicString& target, const AtomicString& contentType, PassRefPtr<FormState> stat
e, PassRefPtr<FormData> data, const String& boundary, PassRefPtrWillBeRawPtr<Eve
nt> event) |
| 147 : m_method(method) | 147 : m_method(method) |
| 148 , m_action(action) | 148 , m_action(action) |
| 149 , m_target(target) | 149 , m_target(target) |
| 150 , m_contentType(contentType) | 150 , m_contentType(contentType) |
| 151 , m_formState(state) | 151 , m_formState(state) |
| 152 , m_formData(data) | 152 , m_formData(data) |
| 153 , m_boundary(boundary) | 153 , m_boundary(boundary) |
| 154 , m_event(event) | 154 , m_event(event) |
| 155 { | 155 { |
| 156 } | 156 } |
| 157 | 157 |
| 158 inline FormSubmission::FormSubmission(const String& result) | 158 inline FormSubmission::FormSubmission(const String& result) |
| 159 : m_method(DialogMethod) | 159 : m_method(DialogMethod) |
| 160 , m_result(result) | 160 , m_result(result) |
| 161 { | 161 { |
| 162 } | 162 } |
| 163 | 163 |
| 164 PassRefPtr<FormSubmission> FormSubmission::create(HTMLFormElement* form, const A
ttributes& attributes, PassRefPtr<Event> event, FormSubmissionTrigger trigger) | 164 PassRefPtr<FormSubmission> FormSubmission::create(HTMLFormElement* form, const A
ttributes& attributes, PassRefPtrWillBeRawPtr<Event> event, FormSubmissionTrigge
r trigger) |
| 165 { | 165 { |
| 166 ASSERT(form); | 166 ASSERT(form); |
| 167 | 167 |
| 168 HTMLFormControlElement* submitButton = 0; | 168 HTMLFormControlElement* submitButton = 0; |
| 169 if (event && event->target()) { | 169 if (event && event->target()) { |
| 170 for (Node* node = event->target()->toNode(); node; node = node->parentOr
ShadowHostNode()) { | 170 for (Node* node = event->target()->toNode(); node; node = node->parentOr
ShadowHostNode()) { |
| 171 if (node->isElementNode() && toElement(node)->isFormControlElement()
) { | 171 if (node->isElementNode() && toElement(node)->isFormControlElement()
) { |
| 172 submitButton = toHTMLFormControlElement(node); | 172 submitButton = toHTMLFormControlElement(node); |
| 173 break; | 173 break; |
| 174 } | 174 } |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 frameRequest.resourceRequest().setHTTPContentType(m_contentType); | 274 frameRequest.resourceRequest().setHTTPContentType(m_contentType); |
| 275 else | 275 else |
| 276 frameRequest.resourceRequest().setHTTPContentType(m_contentType + ";
boundary=" + m_boundary); | 276 frameRequest.resourceRequest().setHTTPContentType(m_contentType + ";
boundary=" + m_boundary); |
| 277 } | 277 } |
| 278 | 278 |
| 279 frameRequest.resourceRequest().setURL(requestURL()); | 279 frameRequest.resourceRequest().setURL(requestURL()); |
| 280 FrameLoader::addHTTPOriginIfNeeded(frameRequest.resourceRequest(), AtomicStr
ing(m_origin)); | 280 FrameLoader::addHTTPOriginIfNeeded(frameRequest.resourceRequest(), AtomicStr
ing(m_origin)); |
| 281 } | 281 } |
| 282 | 282 |
| 283 } | 283 } |
| OLD | NEW |