OLD | NEW |
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 "core/paint/GridPainter.h" | 5 #include "core/paint/GridPainter.h" |
6 | 6 |
7 #include "core/layout/LayoutGrid.h" | 7 #include "core/layout/LayoutGrid.h" |
8 #include "core/paint/BlockPainter.h" | 8 #include "core/paint/BlockPainter.h" |
9 #include "core/paint/PaintInfo.h" | 9 #include "core/paint/PaintInfo.h" |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 std::stable_sort(gridItemsToBePainted.begin(), gridItemsToBePainted.end(), G
ridItemsSorter()); | 69 std::stable_sort(gridItemsToBePainted.begin(), gridItemsToBePainted.end(), G
ridItemsSorter()); |
70 | 70 |
71 LayoutBox* previous = 0; | 71 LayoutBox* previous = 0; |
72 for (const auto& gridItemAndPaintIndex : gridItemsToBePainted) { | 72 for (const auto& gridItemAndPaintIndex : gridItemsToBePainted) { |
73 // We might have duplicates because of spanning children are included in
all cells they span. | 73 // We might have duplicates because of spanning children are included in
all cells they span. |
74 // Skip them here to avoid painting items several times. | 74 // Skip them here to avoid painting items several times. |
75 LayoutBox* current = gridItemAndPaintIndex.first; | 75 LayoutBox* current = gridItemAndPaintIndex.first; |
76 if (current == previous) | 76 if (current == previous) |
77 continue; | 77 continue; |
78 | 78 |
79 BlockPainter(m_layoutGrid).paintChildAsPseudoStackingContext(*current, p
aintInfo, paintOffset); | 79 BlockPainter(m_layoutGrid).paintAllChildPhasesAtomically(*current, paint
Info, paintOffset); |
80 previous = current; | 80 previous = current; |
81 } | 81 } |
82 } | 82 } |
83 | 83 |
84 } // namespace blink | 84 } // namespace blink |
OLD | NEW |