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

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

Issue 588483002: GridPainter::paintChild should take RenderBox reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase to the latest Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « Source/core/paint/GridPainter.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
OLDNEW
« no previous file with comments | « Source/core/paint/GridPainter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698