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 "config.h" | 5 #include "config.h" |
6 #include "core/paint/GridPainter.h" | 6 #include "core/paint/GridPainter.h" |
7 | 7 |
8 #include "core/rendering/PaintInfo.h" | 8 #include "core/rendering/PaintInfo.h" |
9 #include "core/rendering/RenderGrid.h" | 9 #include "core/rendering/RenderGrid.h" |
10 | 10 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 std::stable_sort(gridItemsToBePainted.begin(), gridItemsToBePainted.end(), G
ridItemsSorter()); | 67 std::stable_sort(gridItemsToBePainted.begin(), gridItemsToBePainted.end(), G
ridItemsSorter()); |
68 | 68 |
69 RenderBox* previous = 0; | 69 RenderBox* previous = 0; |
70 for (Vector<std::pair<RenderBox*, size_t> >::const_iterator it = gridItemsTo
BePainted.begin(); it != gridItemsToBePainted.end(); ++it) { | 70 for (Vector<std::pair<RenderBox*, size_t> >::const_iterator it = gridItemsTo
BePainted.begin(); it != gridItemsToBePainted.end(); ++it) { |
71 // We might have duplicates because of spanning children are included in
all cells they span. | 71 // We might have duplicates because of spanning children are included in
all cells they span. |
72 // Skip them here to avoid painting items several times. | 72 // Skip them here to avoid painting items several times. |
73 RenderBox* current = it->first; | 73 RenderBox* current = it->first; |
74 if (current == previous) | 74 if (current == previous) |
75 continue; | 75 continue; |
76 | 76 |
77 paintChild(current, paintInfo, paintOffset); | 77 paintChild(*current, paintInfo, paintOffset); |
78 previous = current; | 78 previous = current; |
79 } | 79 } |
80 } | 80 } |
81 | 81 |
82 void GridPainter::paintChild(RenderBox* child, PaintInfo& paintInfo, const Layou
tPoint& paintOffset) | 82 void GridPainter::paintChild(RenderBox& child, PaintInfo& paintInfo, const Layou
tPoint& paintOffset) |
83 { | 83 { |
84 LayoutPoint childPoint = m_renderGrid.flipForWritingModeForChild(child, pain
tOffset); | 84 LayoutPoint childPoint = m_renderGrid.flipForWritingModeForChild(&child, pai
ntOffset); |
85 if (!child->hasSelfPaintingLayer() && !child->isFloating()) | 85 if (!child.hasSelfPaintingLayer() && !child.isFloating()) |
86 child->paint(paintInfo, childPoint); | 86 child.paint(paintInfo, childPoint); |
87 } | 87 } |
88 | 88 |
89 } // namespace blink | 89 } // namespace blink |
OLD | NEW |