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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGDocumentExtensions.cpp

Issue 2617783002: Migrate WTF::Vector::append() to ::push_back() [part 12 of N] (Closed)
Patch Set: rebase Created 3 years, 11 months 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) 2006 Apple Inc. All rights reserved. 2 * Copyright (C) 2006 Apple Inc. All rights reserved.
3 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
4 * Copyright (C) 2007 Rob Buis <buis@kde.org> 4 * Copyright (C) 2007 Rob Buis <buis@kde.org>
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 return; 218 return;
219 219
220 Vector<AtomicString> toBeRemoved; 220 Vector<AtomicString> toBeRemoved;
221 for (const auto& entry : m_pendingResources) { 221 for (const auto& entry : m_pendingResources) {
222 SVGPendingElements* elements = entry.value.get(); 222 SVGPendingElements* elements = entry.value.get();
223 DCHECK(elements); 223 DCHECK(elements);
224 DCHECK(!elements->isEmpty()); 224 DCHECK(!elements->isEmpty());
225 225
226 elements->remove(element); 226 elements->remove(element);
227 if (elements->isEmpty()) 227 if (elements->isEmpty())
228 toBeRemoved.append(entry.key); 228 toBeRemoved.push_back(entry.key);
229 } 229 }
230 230
231 clearHasPendingResourcesIfPossible(element); 231 clearHasPendingResourcesIfPossible(element);
232 232
233 m_pendingResources.removeAll(toBeRemoved); 233 m_pendingResources.removeAll(toBeRemoved);
234 } 234 }
235 235
236 SVGDocumentExtensions::SVGPendingElements* 236 SVGDocumentExtensions::SVGPendingElements*
237 SVGDocumentExtensions::removePendingResource(const AtomicString& id) { 237 SVGDocumentExtensions::removePendingResource(const AtomicString& id) {
238 ASSERT(m_pendingResources.contains(id)); 238 ASSERT(m_pendingResources.contains(id));
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 298
299 DEFINE_TRACE(SVGDocumentExtensions) { 299 DEFINE_TRACE(SVGDocumentExtensions) {
300 visitor->trace(m_document); 300 visitor->trace(m_document);
301 visitor->trace(m_timeContainers); 301 visitor->trace(m_timeContainers);
302 visitor->trace(m_webAnimationsPendingSVGElements); 302 visitor->trace(m_webAnimationsPendingSVGElements);
303 visitor->trace(m_relativeLengthSVGRoots); 303 visitor->trace(m_relativeLengthSVGRoots);
304 visitor->trace(m_pendingResources); 304 visitor->trace(m_pendingResources);
305 } 305 }
306 306
307 } // namespace blink 307 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698