| Index: Source/core/paint/GridPainter.cpp
|
| diff --git a/Source/core/paint/GridPainter.cpp b/Source/core/paint/GridPainter.cpp
|
| index 0c0f880a171e4d9d90be89bd1142d0e141ed45c1..d9077dcc1825eff7b4420441ad4bc766867902ea 100644
|
| --- a/Source/core/paint/GridPainter.cpp
|
| +++ b/Source/core/paint/GridPainter.cpp
|
| @@ -57,9 +57,9 @@ void GridPainter::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& p
|
| }
|
| }
|
|
|
| - for (Vector<RenderBox*>::const_iterator it = m_renderGrid.itemsOverflowingGridArea().begin(); it != m_renderGrid.itemsOverflowingGridArea().end(); ++it) {
|
| - if ((*it)->frameRect().intersects(localPaintInvalidationRect))
|
| - gridItemsToBePainted.append(std::make_pair(*it, m_renderGrid.paintIndexForGridItem(*it)));
|
| + for (const auto& it : m_renderGrid.itemsOverflowingGridArea()) {
|
| + if (it->frameRect().intersects(localPaintInvalidationRect))
|
| + gridItemsToBePainted.append(std::make_pair(it, m_renderGrid.paintIndexForGridItem(it)));
|
| }
|
|
|
| // Sort grid items following order-modified document order.
|
| @@ -67,10 +67,10 @@ void GridPainter::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& p
|
| std::stable_sort(gridItemsToBePainted.begin(), gridItemsToBePainted.end(), GridItemsSorter());
|
|
|
| RenderBox* previous = 0;
|
| - for (Vector<std::pair<RenderBox*, size_t> >::const_iterator it = gridItemsToBePainted.begin(); it != gridItemsToBePainted.end(); ++it) {
|
| + for (const auto& it : gridItemsToBePainted) {
|
| // We might have duplicates because of spanning children are included in all cells they span.
|
| // Skip them here to avoid painting items several times.
|
| - RenderBox* current = it->first;
|
| + RenderBox* current = it.first;
|
| if (current == previous)
|
| continue;
|
|
|
|
|