| Index: third_party/WebKit/Source/core/layout/LayoutTable.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutTable.cpp b/third_party/WebKit/Source/core/layout/LayoutTable.cpp
|
| index a60abf0d658c3524fd18737bcf3cf481e0eadc19..1c6297ce3429a051ecf04359246583528ec256e6 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutTable.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutTable.cpp
|
| @@ -1673,6 +1673,59 @@ const BorderValue& LayoutTable::tableEndBorderAdjoiningCell(
|
| void LayoutTable::ensureIsReadyForPaintInvalidation() {
|
| LayoutBlock::ensureIsReadyForPaintInvalidation();
|
| recalcCollapsedBordersIfNeeded();
|
| +
|
| + bool hasColBackground = false;
|
| + for (LayoutTableCol* col = firstColumn(); col; col = col->nextColumn()) {
|
| + if (col->styleRef().hasBackground()) {
|
| + hasColBackground = true;
|
| + break;
|
| + }
|
| + }
|
| +
|
| + for (LayoutObject* child = firstChild(); child;
|
| + child = child->nextSibling()) {
|
| + if (!child->isTableSection())
|
| + continue;
|
| + LayoutTableSection* section = toLayoutTableSection(child);
|
| + if (section->isPaintInvalidationContainer()) {
|
| + section->m_rareStat.addReason(ReasonLTSComposited);
|
| + if (hasColBackground) {
|
| + section->m_rareStat.addReason(
|
| + ReasonLTSCompositedWithContainerBackground);
|
| + }
|
| + } else {
|
| + section->m_rareStat.addReason(ReasonLTSNonComposited);
|
| + }
|
| + bool hasSectionBackground = section->styleRef().hasBackground();
|
| + for (LayoutTableRow* row = section->firstRow(); row; row = row->nextRow()) {
|
| + if (row->isPaintInvalidationContainer()) {
|
| + row->m_rareStat.addReason(ReasonLTRComposited);
|
| + if (hasSectionBackground || hasColBackground)
|
| + row->m_rareStat.addReason(ReasonLTRCompositedWithContainerBackground);
|
| + } else {
|
| + row->m_rareStat.addReason(ReasonLTRNonComposited);
|
| + }
|
| + bool hasRowBackground = row->styleRef().hasBackground();
|
| + for (LayoutTableCell* cell = row->firstCell(); cell;
|
| + cell = cell->nextCell()) {
|
| + if (cell->isPaintInvalidationContainer()) {
|
| + cell->m_rareStat.addReason(ReasonLTCComposited);
|
| + ColAndColGroup colAndColGroup =
|
| + colElementAtAbsoluteColumn(cell->absoluteColumnIndex());
|
| + LayoutTableCol* column = colAndColGroup.col;
|
| + LayoutTableCol* columnGroup = colAndColGroup.colgroup;
|
| + if ((column && column->styleRef().hasBackground()) ||
|
| + (columnGroup && columnGroup->styleRef().hasBackground()) ||
|
| + hasSectionBackground || hasRowBackground) {
|
| + cell->m_rareStat.addReason(
|
| + ReasonLTCCompositedWithContainerBackground);
|
| + }
|
| + } else {
|
| + cell->m_rareStat.addReason(ReasonLTCNonComposited);
|
| + }
|
| + }
|
| + }
|
| + }
|
| }
|
|
|
| PaintInvalidationReason LayoutTable::invalidatePaintIfNeeded(
|
|
|