| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 return true; | 61 return true; |
| 62 } | 62 } |
| 63 | 63 |
| 64 DEFINE_INLINE_VIRTUAL_TRACE() | 64 DEFINE_INLINE_VIRTUAL_TRACE() |
| 65 { | 65 { |
| 66 visitor->trace(m_formData); | 66 visitor->trace(m_formData); |
| 67 PairIterable<String, FormDataEntryValue>::IterationSource::trace(visitor
); | 67 PairIterable<String, FormDataEntryValue>::IterationSource::trace(visitor
); |
| 68 } | 68 } |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 const RefPtrWillBeMember<DOMFormData> m_formData; | 71 const Member<DOMFormData> m_formData; |
| 72 size_t m_current; | 72 size_t m_current; |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 } // namespace | 75 } // namespace |
| 76 | 76 |
| 77 DOMFormData::DOMFormData(const WTF::TextEncoding& encoding) | 77 DOMFormData::DOMFormData(const WTF::TextEncoding& encoding) |
| 78 : FormDataList(encoding) | 78 : FormDataList(encoding) |
| 79 { | 79 { |
| 80 } | 80 } |
| 81 | 81 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 109 result.setUSVString(entry.string()); | 109 result.setUSVString(entry.string()); |
| 110 else if (entry.isFile()) | 110 else if (entry.isFile()) |
| 111 result.setFile(entry.file()); | 111 result.setFile(entry.file()); |
| 112 else | 112 else |
| 113 ASSERT(entry.isNone()); | 113 ASSERT(entry.isNone()); |
| 114 } | 114 } |
| 115 | 115 |
| 116 Vector<FormDataEntryValue> DOMFormData::getAll(const String& name) | 116 Vector<FormDataEntryValue> DOMFormData::getAll(const String& name) |
| 117 { | 117 { |
| 118 Vector<FormDataEntryValue> results; | 118 Vector<FormDataEntryValue> results; |
| 119 WillBeHeapVector<FormDataList::Entry> entries = FormDataList::getAll(name); | 119 HeapVector<FormDataList::Entry> entries = FormDataList::getAll(name); |
| 120 for (size_t i = 0; i < entries.size(); ++i) { | 120 for (const FormDataList::Entry& entry : entries) { |
| 121 const FormDataList::Entry& entry = entries[i]; | |
| 122 ASSERT(entry.name() == name); | 121 ASSERT(entry.name() == name); |
| 123 FormDataEntryValue value; | 122 FormDataEntryValue value; |
| 124 if (entry.isString()) | 123 if (entry.isString()) |
| 125 value.setUSVString(entry.string()); | 124 value.setUSVString(entry.string()); |
| 126 else if (entry.isFile()) | 125 else if (entry.isFile()) |
| 127 value.setFile(entry.file()); | 126 value.setFile(entry.file()); |
| 128 else | 127 else |
| 129 ASSERT_NOT_REACHED(); | 128 ASSERT_NOT_REACHED(); |
| 130 results.append(value); | 129 results.append(value); |
| 131 } | 130 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 142 { | 141 { |
| 143 setBlob(name, blob, filename); | 142 setBlob(name, blob, filename); |
| 144 } | 143 } |
| 145 | 144 |
| 146 PairIterable<String, FormDataEntryValue>::IterationSource* DOMFormData::startIte
ration(ScriptState*, ExceptionState&) | 145 PairIterable<String, FormDataEntryValue>::IterationSource* DOMFormData::startIte
ration(ScriptState*, ExceptionState&) |
| 147 { | 146 { |
| 148 return new DOMFormDataIterationSource(this); | 147 return new DOMFormDataIterationSource(this); |
| 149 } | 148 } |
| 150 | 149 |
| 151 } // namespace blink | 150 } // namespace blink |
| OLD | NEW |