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

Unified Diff: Source/core/css/MediaQueryMatcher.cpp

Issue 645743003: Use C++11 range-based loop for core/css (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: better variable names Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/MediaQueryList.cpp ('k') | Source/core/css/RemoteFontFaceSource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/MediaQueryMatcher.cpp
diff --git a/Source/core/css/MediaQueryMatcher.cpp b/Source/core/css/MediaQueryMatcher.cpp
index 8f015de5f5119ce227cfb1e2812a895890e07baf..3d45bb93e797879691babf8489d37a7f87c6fa7f 100644
--- a/Source/core/css/MediaQueryMatcher.cpp
+++ b/Source/core/css/MediaQueryMatcher.cpp
@@ -122,10 +122,10 @@ void MediaQueryMatcher::mediaFeaturesChanged()
return;
WillBeHeapVector<RefPtrWillBeMember<MediaQueryListListener> > listenersToNotify;
- for (MediaQueryListSet::iterator it = m_mediaLists.begin(); it != m_mediaLists.end(); ++it) {
- if ((*it)->mediaFeaturesChanged(&listenersToNotify)) {
- RefPtrWillBeRawPtr<Event> event(MediaQueryListEvent::create(*it));
- event->setTarget(*it);
+ for (const auto& list : m_mediaLists) {
+ if (list->mediaFeaturesChanged(&listenersToNotify)) {
+ RefPtrWillBeRawPtr<Event> event(MediaQueryListEvent::create(list));
+ event->setTarget(list);
m_document->enqueueUniqueAnimationFrameEvent(event);
}
}
@@ -138,8 +138,8 @@ void MediaQueryMatcher::viewportChanged()
return;
WillBeHeapVector<RefPtrWillBeMember<MediaQueryListListener> > listenersToNotify;
- for (ViewportListenerSet::iterator it = m_viewportListeners.begin(); it != m_viewportListeners.end(); ++it)
- listenersToNotify.append(*it);
+ for (const auto& listener : m_viewportListeners)
+ listenersToNotify.append(listener);
m_document->enqueueMediaQueryChangeListeners(listenersToNotify);
}
« no previous file with comments | « Source/core/css/MediaQueryList.cpp ('k') | Source/core/css/RemoteFontFaceSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698