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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 }; | 77 }; |
78 | 78 |
79 } // namespace | 79 } // namespace |
80 | 80 |
81 FormData::FormData(const WTF::TextEncoding& encoding) : m_encoding(encoding) {} | 81 FormData::FormData(const WTF::TextEncoding& encoding) : m_encoding(encoding) {} |
82 | 82 |
83 FormData::FormData(HTMLFormElement* form) : m_encoding(UTF8Encoding()) { | 83 FormData::FormData(HTMLFormElement* form) : m_encoding(UTF8Encoding()) { |
84 if (!form) | 84 if (!form) |
85 return; | 85 return; |
86 | 86 |
87 for (unsigned i = 0; i < form->associatedElements().size(); ++i) { | 87 for (unsigned i = 0; i < form->listedElements().size(); ++i) { |
88 FormAssociatedElement* element = form->associatedElements()[i]; | 88 ListedElement* element = form->listedElements()[i]; |
89 if (!toHTMLElement(element)->isDisabledFormControl()) | 89 if (!toHTMLElement(element)->isDisabledFormControl()) |
90 element->appendToFormData(*this); | 90 element->appendToFormData(*this); |
91 } | 91 } |
92 } | 92 } |
93 | 93 |
94 DEFINE_TRACE(FormData) { | 94 DEFINE_TRACE(FormData) { |
95 visitor->trace(m_entries); | 95 visitor->trace(m_entries); |
96 } | 96 } |
97 | 97 |
98 void FormData::append(const String& name, const String& value) { | 98 void FormData::append(const String& name, const String& value) { |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 return file->clone(filename()); | 338 return file->clone(filename()); |
339 } | 339 } |
340 | 340 |
341 String filename = m_filename; | 341 String filename = m_filename; |
342 if (filename.isNull()) | 342 if (filename.isNull()) |
343 filename = "blob"; | 343 filename = "blob"; |
344 return File::create(filename, currentTimeMS(), blob()->blobDataHandle()); | 344 return File::create(filename, currentTimeMS(), blob()->blobDataHandle()); |
345 } | 345 } |
346 | 346 |
347 } // namespace blink | 347 } // namespace blink |
OLD | NEW |