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

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

Issue 2390543002: Reflow comments in core/dom/. (Closed)
Patch Set: Reformat comments in core/dom/. Created 4 years, 2 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 void MutationObserver::cancelInspectorAsyncTasks() { 213 void MutationObserver::cancelInspectorAsyncTasks() {
214 for (auto& record : m_records) 214 for (auto& record : m_records)
215 InspectorInstrumentation::asyncTaskCanceled( 215 InspectorInstrumentation::asyncTaskCanceled(
216 m_callback->getExecutionContext(), record); 216 m_callback->getExecutionContext(), record);
217 } 217 }
218 218
219 void MutationObserver::deliver() { 219 void MutationObserver::deliver() {
220 DCHECK(!shouldBeSuspended()); 220 DCHECK(!shouldBeSuspended());
221 221
222 // Calling clearTransientRegistrations() can modify m_registrations, so it's n ecessary 222 // Calling clearTransientRegistrations() can modify m_registrations, so it's
223 // to make a copy of the transient registrations before operating on them. 223 // necessary to make a copy of the transient registrations before operating on
224 // them.
224 HeapVector<Member<MutationObserverRegistration>, 1> transientRegistrations; 225 HeapVector<Member<MutationObserverRegistration>, 1> transientRegistrations;
225 for (auto& registration : m_registrations) { 226 for (auto& registration : m_registrations) {
226 if (registration->hasTransientRegistrations()) 227 if (registration->hasTransientRegistrations())
227 transientRegistrations.append(registration); 228 transientRegistrations.append(registration);
228 } 229 }
229 for (size_t i = 0; i < transientRegistrations.size(); ++i) 230 for (size_t i = 0; i < transientRegistrations.size(); ++i)
230 transientRegistrations[i]->clearTransientRegistrations(); 231 transientRegistrations[i]->clearTransientRegistrations();
231 232
232 if (m_records.isEmpty()) 233 if (m_records.isEmpty())
233 return; 234 return;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 } 272 }
272 273
273 DEFINE_TRACE(MutationObserver) { 274 DEFINE_TRACE(MutationObserver) {
274 visitor->trace(m_callback); 275 visitor->trace(m_callback);
275 visitor->trace(m_records); 276 visitor->trace(m_records);
276 visitor->trace(m_registrations); 277 visitor->trace(m_registrations);
277 visitor->trace(m_callback); 278 visitor->trace(m_callback);
278 } 279 }
279 280
280 } // namespace blink 281 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698