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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 isMailtoForm ? UTF8Encoding() | 221 isMailtoForm ? UTF8Encoding() |
222 : FormDataEncoder::encodingFromAcceptCharset( | 222 : FormDataEncoder::encodingFromAcceptCharset( |
223 copiedAttributes.acceptCharset(), document.encoding()); | 223 copiedAttributes.acceptCharset(), document.encoding()); |
224 FormData* domFormData = | 224 FormData* domFormData = |
225 FormData::create(dataEncoding.encodingForFormSubmission()); | 225 FormData::create(dataEncoding.encodingForFormSubmission()); |
226 | 226 |
227 if (submitButton) | 227 if (submitButton) |
228 submitButton->setActivatedSubmit(true); | 228 submitButton->setActivatedSubmit(true); |
229 bool containsPasswordData = false; | 229 bool containsPasswordData = false; |
230 for (unsigned i = 0; i < form->associatedElements().size(); ++i) { | 230 for (unsigned i = 0; i < form->associatedElements().size(); ++i) { |
231 FormAssociatedElement* control = form->associatedElements()[i]; | 231 ListedElement* control = form->associatedElements()[i]; |
232 DCHECK(control); | 232 DCHECK(control); |
233 HTMLElement& element = toHTMLElement(*control); | 233 HTMLElement& element = toHTMLElement(*control); |
234 if (!element.isDisabledFormControl()) | 234 if (!element.isDisabledFormControl()) |
235 control->appendToFormData(*domFormData); | 235 control->appendToFormData(*domFormData); |
236 if (isHTMLInputElement(element)) { | 236 if (isHTMLInputElement(element)) { |
237 HTMLInputElement& input = toHTMLInputElement(element); | 237 HTMLInputElement& input = toHTMLInputElement(element); |
238 if (input.type() == InputTypeNames::password && !input.value().isEmpty()) | 238 if (input.type() == InputTypeNames::password && !input.value().isEmpty()) |
239 containsPasswordData = true; | 239 containsPasswordData = true; |
240 } | 240 } |
241 } | 241 } |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 | 306 |
307 frameRequest.resourceRequest().setURL(requestURL()); | 307 frameRequest.resourceRequest().setURL(requestURL()); |
308 | 308 |
309 frameRequest.setTriggeringEvent(m_event); | 309 frameRequest.setTriggeringEvent(m_event); |
310 frameRequest.setForm(m_form); | 310 frameRequest.setForm(m_form); |
311 | 311 |
312 return frameRequest; | 312 return frameRequest; |
313 } | 313 } |
314 | 314 |
315 } // namespace blink | 315 } // namespace blink |
OLD | NEW |