Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(667)

Side by Side Diff: third_party/WebKit/Source/core/dom/DatasetDOMStringMap.cpp

Issue 2574773002: Migrate WTF::Vector::append() to ::push_back() [part 4 of N] (Closed)
Patch Set: rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 } 146 }
147 } 147 }
148 148
149 return builder.toAtomicString(); 149 return builder.toAtomicString();
150 } 150 }
151 151
152 void DatasetDOMStringMap::getNames(Vector<String>& names) { 152 void DatasetDOMStringMap::getNames(Vector<String>& names) {
153 AttributeCollection attributes = m_element->attributes(); 153 AttributeCollection attributes = m_element->attributes();
154 for (const Attribute& attr : attributes) { 154 for (const Attribute& attr : attributes) {
155 if (isValidAttributeName(attr.localName())) 155 if (isValidAttributeName(attr.localName()))
156 names.append(convertAttributeNameToPropertyName(attr.localName())); 156 names.push_back(convertAttributeNameToPropertyName(attr.localName()));
157 } 157 }
158 } 158 }
159 159
160 String DatasetDOMStringMap::item(const String& name) { 160 String DatasetDOMStringMap::item(const String& name) {
161 AttributeCollection attributes = m_element->attributes(); 161 AttributeCollection attributes = m_element->attributes();
162 for (const Attribute& attr : attributes) { 162 for (const Attribute& attr : attributes) {
163 if (propertyNameMatchesAttributeName(name, attr.localName())) 163 if (propertyNameMatchesAttributeName(name, attr.localName()))
164 return attr.value(); 164 return attr.value();
165 } 165 }
166 166
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 } 199 }
200 return false; 200 return false;
201 } 201 }
202 202
203 DEFINE_TRACE(DatasetDOMStringMap) { 203 DEFINE_TRACE(DatasetDOMStringMap) {
204 visitor->trace(m_element); 204 visitor->trace(m_element);
205 DOMStringMap::trace(visitor); 205 DOMStringMap::trace(visitor);
206 } 206 }
207 207
208 } // namespace blink 208 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DOMTokenList.cpp ('k') | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698