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

Side by Side Diff: third_party/WebKit/Source/core/dom/shadow/SlotAssignment.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
« no previous file with comments | « third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/dom/shadow/SlotAssignment.h" 5 #include "core/dom/shadow/SlotAssignment.h"
6 6
7 #include "core/HTMLNames.h" 7 #include "core/HTMLNames.h"
8 #include "core/dom/ElementTraversal.h" 8 #include "core/dom/ElementTraversal.h"
9 #include "core/dom/Node.h" 9 #include "core/dom/Node.h"
10 #include "core/dom/NodeTraversal.h" 10 #include "core/dom/NodeTraversal.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 return m_slotMap->getSlotByName(slotName, m_owner.get()); 163 return m_slotMap->getSlotByName(slotName, m_owner.get());
164 } 164 }
165 165
166 void SlotAssignment::collectSlots() { 166 void SlotAssignment::collectSlots() {
167 DCHECK(m_needsCollectSlots); 167 DCHECK(m_needsCollectSlots);
168 m_slots.clear(); 168 m_slots.clear();
169 169
170 m_slots.reserveCapacity(m_slotCount); 170 m_slots.reserveCapacity(m_slotCount);
171 for (HTMLSlotElement& slot : 171 for (HTMLSlotElement& slot :
172 Traversal<HTMLSlotElement>::descendantsOf(*m_owner)) { 172 Traversal<HTMLSlotElement>::descendantsOf(*m_owner)) {
173 m_slots.append(&slot); 173 m_slots.push_back(&slot);
174 } 174 }
175 m_needsCollectSlots = false; 175 m_needsCollectSlots = false;
176 DCHECK_EQ(m_slots.size(), m_slotCount); 176 DCHECK_EQ(m_slots.size(), m_slotCount);
177 } 177 }
178 178
179 DEFINE_TRACE(SlotAssignment) { 179 DEFINE_TRACE(SlotAssignment) {
180 visitor->trace(m_slots); 180 visitor->trace(m_slots);
181 visitor->trace(m_slotMap); 181 visitor->trace(m_slotMap);
182 visitor->trace(m_owner); 182 visitor->trace(m_owner);
183 } 183 }
184 184
185 } // namespace blink 185 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698