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

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

Issue 1224933002: Combine outline and focus ring code paths (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix empty focus ring on Mac 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 | Annotate | Revision Log
« 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 20 matching lines...) Expand all
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 ObjectPainter(m_layoutTableSection).paintOutline(paintInfo, m_layoutTabl eSection.visualOverflowRect(), m_layoutTableSection.size(), adjustedPaintOffset) ; 41 ObjectPainter(m_layoutTableSection).paintOutline(paintInfo, adjustedPain tOffset);
42 } 42 }
43 43
44 static inline bool compareCellPositions(LayoutTableCell* elem1, LayoutTableCell* elem2) 44 static inline bool compareCellPositions(LayoutTableCell* elem1, LayoutTableCell* elem2)
45 { 45 {
46 return elem1->rowIndex() < elem2->rowIndex(); 46 return elem1->rowIndex() < elem2->rowIndex();
47 } 47 }
48 48
49 // 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
50 // 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.
51 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
194 if (rowHasBackground && !row->hasSelfPaintingLayer()) 194 if (rowHasBackground && !row->hasSelfPaintingLayer())
195 tableCellPainter.paintBackgroundsBehindCell(paintInfo, cellP oint, row); 195 tableCellPainter.paintBackgroundsBehindCell(paintInfo, cellP oint, row);
196 } 196 }
197 } 197 }
198 } 198 }
199 if ((!cell->hasSelfPaintingLayer() && !row->hasSelfPaintingLayer())) 199 if ((!cell->hasSelfPaintingLayer() && !row->hasSelfPaintingLayer()))
200 cell->paint(paintInfo, cellPoint); 200 cell->paint(paintInfo, cellPoint);
201 } 201 }
202 202
203 } // 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