| 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 44373b79816e41bf3cd2ce0928b86c0e837f4eb0..6f0b62e686cc00807ab2b155b451a7adfd20c415 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutTable.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutTable.cpp
|
| @@ -752,7 +752,7 @@
|
| }
|
|
|
| void LayoutTable::invalidateCollapsedBorders() {
|
| - m_collapsedBordersInfo = nullptr;
|
| + m_collapsedBorders.clear();
|
| if (!collapseBorders())
|
| return;
|
|
|
| @@ -765,15 +765,10 @@
|
| // cache of its containing section, and invalidates itself if any border
|
| // changes. This method doesn't affect layout.
|
| void LayoutTable::recalcCollapsedBordersIfNeeded() {
|
| - if (m_collapsedBordersValid)
|
| + if (m_collapsedBordersValid || !collapseBorders())
|
| return;
|
| m_collapsedBordersValid = true;
|
| - m_collapsedBordersInfo = nullptr;
|
| - if (!collapseBorders())
|
| - return;
|
| -
|
| - LayoutRect boundsOfChangedCells;
|
| - Vector<CollapsedBorderValue> values;
|
| + m_collapsedBorders.clear();
|
| for (LayoutObject* section = firstChild(); section;
|
| section = section->nextSibling()) {
|
| if (!section->isTableSection())
|
| @@ -782,23 +777,12 @@
|
| row = row->nextRow()) {
|
| for (LayoutTableCell* cell = row->firstCell(); cell;
|
| cell = cell->nextCell()) {
|
| - DCHECK(cell->table() == this);
|
| - if (cell->collectBorderValues(values) &&
|
| - !shouldDoFullPaintInvalidation()) {
|
| - LayoutRect cellRect = cell->localVisualRect();
|
| - cell->mapToVisualRectInAncestorSpace(this, cellRect);
|
| - boundsOfChangedCells.unite(cellRect);
|
| - }
|
| + ASSERT(cell->table() == this);
|
| + cell->collectBorderValues(m_collapsedBorders);
|
| }
|
| }
|
| }
|
| - if (!values.isEmpty()) {
|
| - LayoutTableCell::sortBorderValues(values);
|
| - m_collapsedBordersInfo =
|
| - wrapUnique(new CollapsedBordersInfo(std::move(values)));
|
| - }
|
| -
|
| - invalidatePaintRectangle(boundsOfChangedCells);
|
| + LayoutTableCell::sortBorderValues(m_collapsedBorders);
|
| }
|
|
|
| void LayoutTable::addOverflowFromChildren() {
|
| @@ -1678,10 +1662,10 @@
|
|
|
| PaintInvalidationReason LayoutTable::invalidatePaintIfNeeded(
|
| const PaintInvalidationState& paintInvalidationState) {
|
| - if (hasCollapsedBorders()) {
|
| + if (collapseBorders() && !m_collapsedBorders.isEmpty())
|
| paintInvalidationState.paintingLayer()
|
| .setNeedsPaintPhaseDescendantBlockBackgrounds();
|
| - }
|
| +
|
| return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState);
|
| }
|
|
|
|
|