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/paint/ObjectPainter.h" |
8 #include "core/paint/TableRowPainter.h" | 9 #include "core/paint/TableRowPainter.h" |
9 #include "core/rendering/GraphicsContextAnnotator.h" | 10 #include "core/rendering/GraphicsContextAnnotator.h" |
10 #include "core/rendering/PaintInfo.h" | 11 #include "core/rendering/PaintInfo.h" |
11 #include "core/rendering/RenderBoxClipper.h" | 12 #include "core/rendering/RenderBoxClipper.h" |
12 #include "core/rendering/RenderTable.h" | 13 #include "core/rendering/RenderTable.h" |
13 #include "core/rendering/RenderTableCell.h" | 14 #include "core/rendering/RenderTableCell.h" |
14 #include "core/rendering/RenderTableCol.h" | 15 #include "core/rendering/RenderTableCol.h" |
15 #include "core/rendering/RenderTableRow.h" | 16 #include "core/rendering/RenderTableRow.h" |
16 | 17 |
17 namespace blink { | 18 namespace blink { |
(...skipping 14 matching lines...) Expand all Loading... |
32 return; | 33 return; |
33 | 34 |
34 LayoutPoint adjustedPaintOffset = paintOffset + m_renderTableSection.locatio
n(); | 35 LayoutPoint adjustedPaintOffset = paintOffset + m_renderTableSection.locatio
n(); |
35 | 36 |
36 { | 37 { |
37 RenderBoxClipper boxClipper(m_renderTableSection, paintInfo, adjustedPai
ntOffset, ForceContentsClip); | 38 RenderBoxClipper boxClipper(m_renderTableSection, paintInfo, adjustedPai
ntOffset, ForceContentsClip); |
38 paintObject(paintInfo, adjustedPaintOffset); | 39 paintObject(paintInfo, adjustedPaintOffset); |
39 } | 40 } |
40 | 41 |
41 if ((paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSe
lfOutline) && m_renderTableSection.style()->visibility() == VISIBLE) | 42 if ((paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSe
lfOutline) && m_renderTableSection.style()->visibility() == VISIBLE) |
42 m_renderTableSection.paintOutline(paintInfo, LayoutRect(adjustedPaintOff
set, m_renderTableSection.size())); | 43 ObjectPainter(m_renderTableSection).paintOutline(paintInfo, LayoutRect(a
djustedPaintOffset, m_renderTableSection.size())); |
43 } | 44 } |
44 | 45 |
45 static inline bool compareCellPositions(RenderTableCell* elem1, RenderTableCell*
elem2) | 46 static inline bool compareCellPositions(RenderTableCell* elem1, RenderTableCell*
elem2) |
46 { | 47 { |
47 return elem1->rowIndex() < elem2->rowIndex(); | 48 return elem1->rowIndex() < elem2->rowIndex(); |
48 } | 49 } |
49 | 50 |
50 // This comparison is used only when we have overflowing cells as we have an uns
orted array to sort. We thus need | 51 // This comparison is used only when we have overflowing cells as we have an uns
orted array to sort. We thus need |
51 // to sort both on rows and columns to properly issue paint invalidations. | 52 // to sort both on rows and columns to properly issue paint invalidations. |
52 static inline bool compareCellPositionsWithOverflowingCells(RenderTableCell* ele
m1, RenderTableCell* elem2) | 53 static inline bool compareCellPositionsWithOverflowingCells(RenderTableCell* ele
m1, RenderTableCell* elem2) |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 // Paint the row next, but only if it doesn't have a layer. If a row has
a layer, it will be responsible for | 182 // Paint the row next, but only if it doesn't have a layer. If a row has
a layer, it will be responsible for |
182 // painting the row background for the cell. | 183 // painting the row background for the cell. |
183 if (!row->hasSelfPaintingLayer()) | 184 if (!row->hasSelfPaintingLayer()) |
184 cell->paintBackgroundsBehindCell(paintInfo, cellPoint, row); | 185 cell->paintBackgroundsBehindCell(paintInfo, cellPoint, row); |
185 } | 186 } |
186 if ((!cell->hasSelfPaintingLayer() && !row->hasSelfPaintingLayer())) | 187 if ((!cell->hasSelfPaintingLayer() && !row->hasSelfPaintingLayer())) |
187 cell->paint(paintInfo, cellPoint); | 188 cell->paint(paintInfo, cellPoint); |
188 } | 189 } |
189 | 190 |
190 } // namespace blink | 191 } // namespace blink |
OLD | NEW |