| 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/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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |