| Index: third_party/WebKit/Source/core/layout/LayoutTableRow.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutTableRow.cpp b/third_party/WebKit/Source/core/layout/LayoutTableRow.cpp
|
| index 39bdbe41f383311d058cea2b39f8bacc7c4cd6db..e51a52a501388e39453a156c45bffff9e99fd5d9 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutTableRow.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutTableRow.cpp
|
| @@ -153,8 +153,17 @@ void LayoutTableRow::addChild(LayoutObject* child, LayoutObject* beforeChild)
|
| LayoutTableBoxComponent::addChild(cell, beforeChild);
|
|
|
| // Generated content can result in us having a null section so make sure to null check our parent.
|
| - if (parent())
|
| + if (parent()) {
|
| section()->addCell(cell, this);
|
| + // When borders collapse, adding a cell can affect the the width of neighboring cells.
|
| + LayoutTable* enclosingTable = table();
|
| + if (enclosingTable && enclosingTable->collapseBorders()) {
|
| + if (LayoutTableCell* previousCell = cell->previousCell())
|
| + previousCell->setNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReason::TableChanged);
|
| + if (LayoutTableCell* nextCell = cell->nextCell())
|
| + nextCell->setNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReason::TableChanged);
|
| + }
|
| + }
|
|
|
| if (beforeChild || nextRow())
|
| section()->setNeedsCellRecalc();
|
|
|