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

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

Issue 2725063003: Migrate WTF::LinkedHashSet/ListHashSet/HashTable::remove() to ::erase() (Closed)
Patch Set: rebase Created 3 years, 9 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 Google Inc. All Rights Reserved. 2 * Copyright (C) 2011 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 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 void ScriptedAnimationController::dispatchEvents( 91 void ScriptedAnimationController::dispatchEvents(
92 const AtomicString& eventInterfaceFilter) { 92 const AtomicString& eventInterfaceFilter) {
93 HeapVector<Member<Event>> events; 93 HeapVector<Member<Event>> events;
94 if (eventInterfaceFilter.isEmpty()) { 94 if (eventInterfaceFilter.isEmpty()) {
95 events.swap(m_eventQueue); 95 events.swap(m_eventQueue);
96 m_perFrameEvents.clear(); 96 m_perFrameEvents.clear();
97 } else { 97 } else {
98 HeapVector<Member<Event>> remaining; 98 HeapVector<Member<Event>> remaining;
99 for (auto& event : m_eventQueue) { 99 for (auto& event : m_eventQueue) {
100 if (event && event->interfaceName() == eventInterfaceFilter) { 100 if (event && event->interfaceName() == eventInterfaceFilter) {
101 m_perFrameEvents.remove(eventTargetKey(event.get())); 101 m_perFrameEvents.erase(eventTargetKey(event.get()));
102 events.push_back(event.release()); 102 events.push_back(event.release());
103 } else { 103 } else {
104 remaining.push_back(event.release()); 104 remaining.push_back(event.release());
105 } 105 }
106 } 106 }
107 remaining.swap(m_eventQueue); 107 remaining.swap(m_eventQueue);
108 } 108 }
109 109
110 for (const auto& event : events) { 110 for (const auto& event : events) {
111 EventTarget* eventTarget = event->target(); 111 EventTarget* eventTarget = event->target();
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 return; 199 return;
200 200
201 if (!m_document) 201 if (!m_document)
202 return; 202 return;
203 203
204 if (FrameView* frameView = m_document->view()) 204 if (FrameView* frameView = m_document->view())
205 frameView->scheduleAnimation(); 205 frameView->scheduleAnimation();
206 } 206 }
207 207
208 } // namespace blink 208 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698