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

Side by Side Diff: third_party/WebKit/Source/core/html/track/TextTrackList.cpp

Issue 2776203002: Migrate WTF::Vector::remove() to ::erase() (Closed)
Patch Set: rebase, repatch VectorTest Created 3 years, 8 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) 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 202
203 size_t index = tracks->find(track); 203 size_t index = tracks->find(track);
204 if (index == kNotFound) 204 if (index == kNotFound)
205 return; 205 return;
206 206
207 invalidateTrackIndexesAfterTrack(track); 207 invalidateTrackIndexesAfterTrack(track);
208 208
209 DCHECK_EQ(track->trackList(), this); 209 DCHECK_EQ(track->trackList(), this);
210 track->setTrackList(0); 210 track->setTrackList(0);
211 211
212 tracks->remove(index); 212 tracks->erase(index);
213 213
214 scheduleRemoveTrackEvent(track); 214 scheduleRemoveTrackEvent(track);
215 } 215 }
216 216
217 void TextTrackList::removeAllInbandTracks() { 217 void TextTrackList::removeAllInbandTracks() {
218 for (const auto& track : m_inbandTracks) { 218 for (const auto& track : m_inbandTracks) {
219 track->setTrackList(0); 219 track->setTrackList(0);
220 } 220 }
221 m_inbandTracks.clear(); 221 m_inbandTracks.clear();
222 } 222 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 for (auto track : m_addTrackTracks) 309 for (auto track : m_addTrackTracks)
310 visitor->traceWrappers(track); 310 visitor->traceWrappers(track);
311 for (auto track : m_elementTracks) 311 for (auto track : m_elementTracks)
312 visitor->traceWrappers(track); 312 visitor->traceWrappers(track);
313 for (auto track : m_inbandTracks) 313 for (auto track : m_inbandTracks)
314 visitor->traceWrappers(track); 314 visitor->traceWrappers(track);
315 EventTargetWithInlineData::traceWrappers(visitor); 315 EventTargetWithInlineData::traceWrappers(visitor);
316 } 316 }
317 317
318 } // namespace blink 318 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698