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/TableSectionPainter.h" | 5 #include "core/paint/TableSectionPainter.h" |
6 | 6 |
7 #include "core/layout/LayoutTable.h" | 7 #include "core/layout/LayoutTable.h" |
8 #include "core/layout/LayoutTableCell.h" | 8 #include "core/layout/LayoutTableCell.h" |
9 #include "core/layout/LayoutTableCol.h" | 9 #include "core/layout/LayoutTableCol.h" |
10 #include "core/layout/LayoutTableRow.h" | 10 #include "core/layout/LayoutTableRow.h" |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
188 LayoutTable::ColAndColGroup colAndColGroup = m_layoutTableSection.table( )->colElement(cell.col()); | 188 LayoutTable::ColAndColGroup colAndColGroup = m_layoutTableSection.table( )->colElement(cell.col()); |
189 LayoutTableCol* column = colAndColGroup.col; | 189 LayoutTableCol* column = colAndColGroup.col; |
190 LayoutTableCol* columnGroup = colAndColGroup.colgroup; | 190 LayoutTableCol* columnGroup = colAndColGroup.colgroup; |
191 TableCellPainter tableCellPainter(cell); | 191 TableCellPainter tableCellPainter(cell); |
192 | 192 |
193 // Column groups and columns first. | 193 // Column groups and columns first. |
194 // FIXME: Columns and column groups do not currently support opacity, an d they are being painted "too late" in | 194 // FIXME: Columns and column groups do not currently support opacity, an d they are being painted "too late" in |
195 // the stack, since we have already opened a transparency layer (potenti ally) for the table row group. | 195 // the stack, since we have already opened a transparency layer (potenti ally) for the table row group. |
196 // Note that we deliberately ignore whether or not the cell has a layer, since these backgrounds paint "behind" the | 196 // Note that we deliberately ignore whether or not the cell has a layer, since these backgrounds paint "behind" the |
197 // cell. | 197 // cell. |
198 if (columnGroup && columnGroup->hasBackground()) | 198 if (columnGroup && (columnGroup->hasBackground() || columnGroup->styleRe f().hasBackdropFilter())) |
199 tableCellPainter.paintBackgroundsBehindCell(paintInfoForCells, cellP oint, columnGroup, DisplayItem::TableCellBackgroundFromColumnGroup); | 199 tableCellPainter.paintBackgroundsBehindCell(paintInfoForCells, cellP oint, columnGroup, DisplayItem::TableCellBackgroundFromColumnGroup); |
200 if (column && column->hasBackground()) | 200 if (column && (column->hasBackground() || column->styleRef().hasBackdrop Filter())) |
201 tableCellPainter.paintBackgroundsBehindCell(paintInfoForCells, cellP oint, column, DisplayItem::TableCellBackgroundFromColumn); | 201 tableCellPainter.paintBackgroundsBehindCell(paintInfoForCells, cellP oint, column, DisplayItem::TableCellBackgroundFromColumn); |
202 | 202 |
203 // Paint the row group next. | 203 // Paint the row group next. |
204 if (m_layoutTableSection.hasBackground()) | 204 if (m_layoutTableSection.hasBackground() || m_layoutTableSection.styleRe f().hasBackdropFilter()) |
205 tableCellPainter.paintBackgroundsBehindCell(paintInfoForCells, cellP oint, &m_layoutTableSection, DisplayItem::TableCellBackgroundFromSection); | 205 tableCellPainter.paintBackgroundsBehindCell(paintInfoForCells, cellP oint, &m_layoutTableSection, DisplayItem::TableCellBackgroundFromSection); |
206 } | 206 } |
207 | 207 |
208 if (shouldPaintDescendantBlockBackgrounds(originalPaintPhase)) { | 208 if (shouldPaintDescendantBlockBackgrounds(originalPaintPhase)) { |
209 // Paint the row next, but only if it doesn't have a layer. If a row has a layer, it will be responsible for | 209 // Paint the row next, but only if it doesn't have a layer. If a row has a layer, it will be responsible for |
210 // painting the row background for the cell. | 210 // painting the row background for the cell. |
211 if (row->hasBackground() && !row->hasSelfPaintingLayer()) | 211 if ((row->hasBackground() || row->styleRef().hasBackdropFilter()) && !ro w->hasSelfPaintingLayer()) |
pdr.
2016/02/03 04:20:28
Can you add a test for this that fails without the
| |
212 TableCellPainter(cell).paintBackgroundsBehindCell(paintInfoForCells, cellPoint, row, DisplayItem::TableCellBackgroundFromRow); | 212 TableCellPainter(cell).paintBackgroundsBehindCell(paintInfoForCells, cellPoint, row, DisplayItem::TableCellBackgroundFromRow); |
213 } | 213 } |
214 | 214 |
215 if (originalPaintPhase != PaintPhaseSelfBlockBackgroundOnly && !cell.hasSelf PaintingLayer() && !row->hasSelfPaintingLayer()) | 215 if (originalPaintPhase != PaintPhaseSelfBlockBackgroundOnly && !cell.hasSelf PaintingLayer() && !row->hasSelfPaintingLayer()) |
216 cell.paint(paintInfoForCells, cellPoint); | 216 cell.paint(paintInfoForCells, cellPoint); |
217 } | 217 } |
218 | 218 |
219 } // namespace blink | 219 } // namespace blink |
OLD | NEW |