| Index: third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
|
| index 3469d4abc189a54d4964cd1e3a3e42f8a862488f..eb1a8260179b81039b035d7b71c08e89f7762374 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
|
| @@ -66,6 +66,26 @@ void LayoutTableCell::willBeRemovedFromTree()
|
| LayoutBlockFlow::willBeRemovedFromTree();
|
|
|
| section()->setNeedsCellRecalc();
|
| +
|
| + // When borders collapse, removing a cell can affect the the width of neighboring cells.
|
| + if (!parent())
|
| + return;
|
| + LayoutTable* enclosingTable = table();
|
| + DCHECK(enclosingTable);
|
| + if (!enclosingTable->collapseBorders())
|
| + return;
|
| + if (previousCell()) {
|
| + // TODO(dgrogan): Should this be setChildNeedsLayout or setNeedsLayout?
|
| + // remove-cell-with-border-box.html only passes with setNeedsLayout but other places
|
| + // use setChildNeedsLayout.
|
| + previousCell()->setNeedsLayout(LayoutInvalidationReason::TableChanged);
|
| + previousCell()->setPreferredLogicalWidthsDirty();
|
| + }
|
| + if (nextCell()) {
|
| + // TODO(dgrogan): Same as above re: setChildNeedsLayout vs setNeedsLayout.
|
| + nextCell()->setNeedsLayout(LayoutInvalidationReason::TableChanged);
|
| + nextCell()->setPreferredLogicalWidthsDirty();
|
| + }
|
| }
|
|
|
| unsigned LayoutTableCell::parseColSpanFromDOM() const
|
|
|