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

Unified Diff: Source/core/layout/LayoutFlowThread.cpp

Issue 1062283002: Use C++11 range-based loop for core/layout (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix it naming Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/layout/LayoutBlockFlowLine.cpp ('k') | Source/core/layout/LayoutTableSection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutFlowThread.cpp
diff --git a/Source/core/layout/LayoutFlowThread.cpp b/Source/core/layout/LayoutFlowThread.cpp
index 4a4dfc9516ca266b29f9d50e647dd645662eefb9..cb0391c25df3b0da15cf43e23b115f752aae4e12 100644
--- a/Source/core/layout/LayoutFlowThread.cpp
+++ b/Source/core/layout/LayoutFlowThread.cpp
@@ -73,8 +73,7 @@ void LayoutFlowThread::validateRegions()
LayoutUnit previousRegionLogicalHeight = 0;
bool firstRegionVisited = false;
- for (LayoutMultiColumnSetList::iterator iter = m_multiColumnSetList.begin(); iter != m_multiColumnSetList.end(); ++iter) {
- LayoutMultiColumnSet* columnSet = *iter;
+ for (auto* columnSet : m_multiColumnSetList) {
LayoutUnit regionLogicalHeight = columnSet->pageLogicalHeight();
if (!firstRegionVisited) {
@@ -195,12 +194,10 @@ LayoutRect LayoutFlowThread::fragmentsBoundingBox(const LayoutRect& layerBoundin
ASSERT(!m_regionsInvalidated);
LayoutRect result;
- for (LayoutMultiColumnSetList::const_iterator iter = m_multiColumnSetList.begin(); iter != m_multiColumnSetList.end(); ++iter) {
- LayoutMultiColumnSet* columnSet = *iter;
+ for (auto* columnSet : m_multiColumnSetList) {
DeprecatedPaintLayerFragments fragments;
columnSet->collectLayerFragments(fragments, layerBoundingBox, LayoutRect(LayoutRect::infiniteIntRect()));
- for (size_t i = 0; i < fragments.size(); ++i) {
- const DeprecatedPaintLayerFragment& fragment = fragments.at(i);
+ for (const auto& fragment : fragments) {
LayoutRect fragmentRect(layerBoundingBox);
fragmentRect.intersect(fragment.paginationClip);
fragmentRect.moveBy(fragment.paginationOffset);
« no previous file with comments | « Source/core/layout/LayoutBlockFlowLine.cpp ('k') | Source/core/layout/LayoutTableSection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698