| 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 "core/paint/TableRowPainter.h" | 5 #include "core/paint/TableRowPainter.h" |
| 6 | 6 |
| 7 #include "core/layout/LayoutTableCell.h" | 7 #include "core/layout/LayoutTableCell.h" |
| 8 #include "core/layout/LayoutTableRow.h" | 8 #include "core/layout/LayoutTableRow.h" |
| 9 #include "core/paint/BoxPainter.h" | 9 #include "core/paint/BoxPainter.h" |
| 10 #include "core/paint/LayoutObjectDrawingRecorder.h" | 10 #include "core/paint/LayoutObjectDrawingRecorder.h" |
| 11 #include "core/paint/ObjectPainter.h" | 11 #include "core/paint/ObjectPainter.h" |
| 12 #include "core/paint/PaintInfo.h" | 12 #include "core/paint/PaintInfo.h" |
| 13 #include "core/paint/TableCellPainter.h" | 13 #include "core/paint/TableCellPainter.h" |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 | 16 |
| 17 void TableRowPainter::paint(const PaintInfo& paintInfo, | 17 void TableRowPainter::paint(const PaintInfo& paintInfo, |
| 18 const LayoutPoint& paintOffset) { | 18 const LayoutPoint& paintOffset) { |
| 19 DCHECK(m_layoutTableRow.hasSelfPaintingLayer()); | 19 DCHECK(m_layoutTableRow.hasSelfPaintingLayer()); |
| 20 | 20 |
| 21 // TODO(crbug.com/577282): This painting order is inconsistent with other outl
ines. | 21 // TODO(crbug.com/577282): This painting order is inconsistent with other |
| 22 // outlines. |
| 22 if (shouldPaintSelfOutline(paintInfo.phase)) | 23 if (shouldPaintSelfOutline(paintInfo.phase)) |
| 23 paintOutline(paintInfo, paintOffset); | 24 paintOutline(paintInfo, paintOffset); |
| 24 if (paintInfo.phase == PaintPhaseSelfOutlineOnly) | 25 if (paintInfo.phase == PaintPhaseSelfOutlineOnly) |
| 25 return; | 26 return; |
| 26 | 27 |
| 27 PaintInfo paintInfoForCells = paintInfo.forDescendants(); | 28 PaintInfo paintInfoForCells = paintInfo.forDescendants(); |
| 28 if (shouldPaintSelfBlockBackground(paintInfo.phase)) { | 29 if (shouldPaintSelfBlockBackground(paintInfo.phase)) { |
| 29 paintBoxShadow(paintInfo, paintOffset, Normal); | 30 paintBoxShadow(paintInfo, paintOffset, Normal); |
| 30 if (m_layoutTableRow.styleRef().hasBackground()) { | 31 if (m_layoutTableRow.styleRef().hasBackground()) { |
| 31 // Paint row background of behind the cells. | 32 // Paint row background of behind the cells. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 !m_layoutTableRow.hasSelfPaintingLayer()); | 89 !m_layoutTableRow.hasSelfPaintingLayer()); |
| 89 LayoutPoint cellPoint = | 90 LayoutPoint cellPoint = |
| 90 m_layoutTableRow.section()->flipForWritingModeForChild(&cell, | 91 m_layoutTableRow.section()->flipForWritingModeForChild(&cell, |
| 91 paintOffset); | 92 paintOffset); |
| 92 TableCellPainter(cell).paintContainerBackgroundBehindCell( | 93 TableCellPainter(cell).paintContainerBackgroundBehindCell( |
| 93 paintInfo, cellPoint, m_layoutTableRow, | 94 paintInfo, cellPoint, m_layoutTableRow, |
| 94 DisplayItem::kTableCellBackgroundFromRow); | 95 DisplayItem::kTableCellBackgroundFromRow); |
| 95 } | 96 } |
| 96 | 97 |
| 97 } // namespace blink | 98 } // namespace blink |
| OLD | NEW |