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

Side by Side Diff: third_party/WebKit/Source/core/paint/GridPainter.cpp

Issue 1528323002: Include <algorithm> if you use functions from <algorithm>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split ui parts into a separate review Created 5 years 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/paint/GridPainter.h" 6 #include "core/paint/GridPainter.h"
7 7
8 #include "core/layout/LayoutGrid.h" 8 #include "core/layout/LayoutGrid.h"
9 #include "core/paint/BlockPainter.h" 9 #include "core/paint/BlockPainter.h"
10 #include "core/paint/PaintInfo.h" 10 #include "core/paint/PaintInfo.h"
11 #include <algorithm>
11 12
12 namespace blink { 13 namespace blink {
13 14
14 static GridSpan dirtiedGridAreas(const Vector<LayoutUnit>& coordinates, LayoutUn it start, LayoutUnit end) 15 static GridSpan dirtiedGridAreas(const Vector<LayoutUnit>& coordinates, LayoutUn it start, LayoutUnit end)
15 { 16 {
16 // This function does a binary search over the coordinates. 17 // This function does a binary search over the coordinates.
17 // This doesn't work with grid items overflowing their grid areas, but that is managed with m_gridItemsOverflowingGridArea. 18 // This doesn't work with grid items overflowing their grid areas, but that is managed with m_gridItemsOverflowingGridArea.
18 19
19 size_t startGridAreaIndex = std::upper_bound(coordinates.begin(), coordinate s.end() - 1, start) - coordinates.begin(); 20 size_t startGridAreaIndex = std::upper_bound(coordinates.begin(), coordinate s.end() - 1, start) - coordinates.begin();
20 if (startGridAreaIndex > 0) 21 if (startGridAreaIndex > 0)
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 LayoutBox* current = gridItemAndPaintIndex.first; 76 LayoutBox* current = gridItemAndPaintIndex.first;
76 if (current == previous) 77 if (current == previous)
77 continue; 78 continue;
78 79
79 BlockPainter(m_layoutGrid).paintChildAsInlineBlock(*current, paintInfo, paintOffset); 80 BlockPainter(m_layoutGrid).paintChildAsInlineBlock(*current, paintInfo, paintOffset);
80 previous = current; 81 previous = current;
81 } 82 }
82 } 83 }
83 84
84 } // namespace blink 85 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698