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" |
11 #include "core/layout/LayoutTableRow.h" | 11 #include "core/layout/LayoutTableRow.h" |
12 #include "core/paint/BlockPainter.h" | 12 #include "core/paint/BlockPainter.h" |
13 #include "core/paint/BoxClipper.h" | 13 #include "core/paint/BoxClipper.h" |
14 #include "core/paint/LayoutObjectDrawingRecorder.h" | 14 #include "core/paint/LayoutObjectDrawingRecorder.h" |
15 #include "core/paint/ObjectPainter.h" | 15 #include "core/paint/ObjectPainter.h" |
16 #include "core/paint/PaintInfo.h" | 16 #include "core/paint/PaintInfo.h" |
17 #include "core/paint/TableCellPainter.h" | 17 #include "core/paint/TableCellPainter.h" |
18 #include "core/paint/TableRowPainter.h" | 18 #include "core/paint/TableRowPainter.h" |
| 19 #include <algorithm> |
19 | 20 |
20 namespace blink { | 21 namespace blink { |
21 | 22 |
22 void TableSectionPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& p
aintOffset) | 23 void TableSectionPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& p
aintOffset) |
23 { | 24 { |
24 ASSERT(!m_layoutTableSection.needsLayout()); | 25 ASSERT(!m_layoutTableSection.needsLayout()); |
25 // avoid crashing on bugs that cause us to paint with dirty layout | 26 // avoid crashing on bugs that cause us to paint with dirty layout |
26 if (m_layoutTableSection.needsLayout()) | 27 if (m_layoutTableSection.needsLayout()) |
27 return; | 28 return; |
28 | 29 |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 // Paint the row next, but only if it doesn't have a layer. If a row has
a layer, it will be responsible for | 201 // Paint the row next, but only if it doesn't have a layer. If a row has
a layer, it will be responsible for |
201 // painting the row background for the cell. | 202 // painting the row background for the cell. |
202 if (row->hasBackground() && !row->hasSelfPaintingLayer()) | 203 if (row->hasBackground() && !row->hasSelfPaintingLayer()) |
203 tableCellPainter.paintBackgroundsBehindCell(paintInfo, cellPoint, ro
w, DisplayItem::TableCellBackgroundFromRow); | 204 tableCellPainter.paintBackgroundsBehindCell(paintInfo, cellPoint, ro
w, DisplayItem::TableCellBackgroundFromRow); |
204 } | 205 } |
205 if ((!cell.hasSelfPaintingLayer() && !row->hasSelfPaintingLayer())) | 206 if ((!cell.hasSelfPaintingLayer() && !row->hasSelfPaintingLayer())) |
206 cell.paint(paintInfo, cellPoint); | 207 cell.paint(paintInfo, cellPoint); |
207 } | 208 } |
208 | 209 |
209 } // namespace blink | 210 } // namespace blink |
OLD | NEW |