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

Unified Diff: Source/core/dom/MutationObserverInterestGroup.cpp

Issue 796913002: Use C++11 range-based loop for core/clipboard, core/dom and core/testing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/MutationObserver.cpp ('k') | Source/core/dom/MutationObserverRegistration.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/MutationObserverInterestGroup.cpp
diff --git a/Source/core/dom/MutationObserverInterestGroup.cpp b/Source/core/dom/MutationObserverInterestGroup.cpp
index ff525e5a861b55904418651dce5e910ee7e6d46f..6d250fc7c4f590fe88dcb18af1f93bef144cf138 100644
--- a/Source/core/dom/MutationObserverInterestGroup.cpp
+++ b/Source/core/dom/MutationObserverInterestGroup.cpp
@@ -56,8 +56,8 @@ MutationObserverInterestGroup::MutationObserverInterestGroup(WillBeHeapHashMap<R
bool MutationObserverInterestGroup::isOldValueRequested()
{
- for (WillBeHeapHashMap<RawPtrWillBeMember<MutationObserver>, MutationRecordDeliveryOptions>::iterator iter = m_observers.begin(); iter != m_observers.end(); ++iter) {
- if (hasOldValue(iter->value))
+ for (auto& observer : m_observers) {
+ if (hasOldValue(observer.value))
return true;
}
return false;
@@ -67,9 +67,9 @@ void MutationObserverInterestGroup::enqueueMutationRecord(PassRefPtrWillBeRawPtr
{
RefPtrWillBeRawPtr<MutationRecord> mutation = prpMutation;
RefPtrWillBeRawPtr<MutationRecord> mutationWithNullOldValue = nullptr;
- for (WillBeHeapHashMap<RawPtrWillBeMember<MutationObserver>, MutationRecordDeliveryOptions>::iterator iter = m_observers.begin(); iter != m_observers.end(); ++iter) {
- MutationObserver* observer = iter->key;
- if (hasOldValue(iter->value)) {
+ for (auto& iter : m_observers) {
+ MutationObserver* observer = iter.key;
+ if (hasOldValue(iter.value)) {
observer->enqueueMutationRecord(mutation);
continue;
}
« no previous file with comments | « Source/core/dom/MutationObserver.cpp ('k') | Source/core/dom/MutationObserverRegistration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698