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

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

Issue 1321613002: Refactor ObjectPainter::paintOutline to take a paintOffset (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove ObjectPainter::outlineRectForSVG Created 5 years, 3 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/TableRowPainter.cpp ('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/TableSectionPainter.h" 6 #include "core/paint/TableSectionPainter.h"
7 7
8 #include "core/layout/LayoutTable.h" 8 #include "core/layout/LayoutTable.h"
9 #include "core/layout/LayoutTableCell.h" 9 #include "core/layout/LayoutTableCell.h"
10 #include "core/layout/LayoutTableCol.h" 10 #include "core/layout/LayoutTableCol.h"
(...skipping 19 matching lines...) Expand all
30 30
31 if (!totalRows || !totalCols) 31 if (!totalRows || !totalCols)
32 return; 32 return;
33 33
34 LayoutPoint adjustedPaintOffset = paintOffset + m_layoutTableSection.locatio n(); 34 LayoutPoint adjustedPaintOffset = paintOffset + m_layoutTableSection.locatio n();
35 { 35 {
36 BoxClipper boxClipper(m_layoutTableSection, paintInfo, adjustedPaintOffs et, ForceContentsClip); 36 BoxClipper boxClipper(m_layoutTableSection, paintInfo, adjustedPaintOffs et, ForceContentsClip);
37 paintObject(paintInfo, adjustedPaintOffset); 37 paintObject(paintInfo, adjustedPaintOffset);
38 } 38 }
39 39
40 if ((paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSe lfOutline) && m_layoutTableSection.style()->visibility() == VISIBLE) { 40 if ((paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSe lfOutline) && m_layoutTableSection.style()->visibility() == VISIBLE)
41 LayoutRect visualOverflowRect(m_layoutTableSection.visualOverflowRect()) ; 41 ObjectPainter(m_layoutTableSection).paintOutline(paintInfo, m_layoutTabl eSection.visualOverflowRect(), m_layoutTableSection.size(), adjustedPaintOffset) ;
42 visualOverflowRect.moveBy(adjustedPaintOffset);
43 ObjectPainter(m_layoutTableSection).paintOutline(paintInfo, LayoutRect(a djustedPaintOffset, m_layoutTableSection.size()), visualOverflowRect);
44 }
45 } 42 }
46 43
47 static inline bool compareCellPositions(LayoutTableCell* elem1, LayoutTableCell* elem2) 44 static inline bool compareCellPositions(LayoutTableCell* elem1, LayoutTableCell* elem2)
48 { 45 {
49 return elem1->rowIndex() < elem2->rowIndex(); 46 return elem1->rowIndex() < elem2->rowIndex();
50 } 47 }
51 48
52 // This comparison is used only when we have overflowing cells as we have an uns orted array to sort. We thus need 49 // This comparison is used only when we have overflowing cells as we have an uns orted array to sort. We thus need
53 // to sort both on rows and columns to properly issue paint invalidations. 50 // to sort both on rows and columns to properly issue paint invalidations.
54 static inline bool compareCellPositionsWithOverflowingCells(LayoutTableCell* ele m1, LayoutTableCell* elem2) 51 static inline bool compareCellPositionsWithOverflowingCells(LayoutTableCell* ele m1, LayoutTableCell* elem2)
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 if (rowHasBackground && !row->hasSelfPaintingLayer()) 194 if (rowHasBackground && !row->hasSelfPaintingLayer())
198 tableCellPainter.paintBackgroundsBehindCell(paintInfo, cellP oint, row); 195 tableCellPainter.paintBackgroundsBehindCell(paintInfo, cellP oint, row);
199 } 196 }
200 } 197 }
201 } 198 }
202 if ((!cell->hasSelfPaintingLayer() && !row->hasSelfPaintingLayer())) 199 if ((!cell->hasSelfPaintingLayer() && !row->hasSelfPaintingLayer()))
203 cell->paint(paintInfo, cellPoint); 200 cell->paint(paintInfo, cellPoint);
204 } 201 }
205 202
206 } // namespace blink 203 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/TableRowPainter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698