Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutTableSection.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp |
| index fc6328921f0d096245b5cf5b09d47034ea2e6f98..a1792bda352ceb5116c12be7d7110b7181a3e832 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp |
| @@ -125,6 +125,11 @@ void LayoutTableSection::styleDidChange(StyleDifference diff, const ComputedStyl |
| LayoutTable* table = this->table(); |
| if (table && !table->selfNeedsLayout() && !table->normalChildNeedsLayout() && oldStyle && oldStyle->border() != style()->border()) |
| table->invalidateCollapsedBorders(); |
| + |
| + if (table && oldStyle && diff.needsFullLayout() && needsLayout() && table->collapseBorders() && borderWidthChanged(oldStyle, style())) { |
| + // TODO(dgrogan): Do we need to call cell->setChildNeedsLayout() like LayoutTableRow::styleDidChange does? |
|
dgrogan
2016/05/27 00:23:53
I'll dig into this tomorrow if you don't know off
mstensho (USE GERRIT)
2016/05/27 08:36:33
My guess: yes, you need to do that. I'm not aware
|
| + markAllCellWidthsDirty(); |
| + } |
| } |
| void LayoutTableSection::willBeRemovedFromTree() |
| @@ -1205,6 +1210,17 @@ bool LayoutTableSection::recalcChildOverflowAfterStyleChange() |
| return childrenOverflowChanged; |
| } |
| +void LayoutTableSection::markAllCellWidthsDirty() |
| +{ |
| + for (unsigned i = 0; i < numRows(); i++) { |
| + LayoutTableRow* row = rowLayoutObjectAt(i); |
| + if (!row) |
| + continue; |
| + for (LayoutTableCell* cell = row->firstCell(); cell; cell = cell->nextCell()) |
| + cell->setPreferredLogicalWidthsDirty(); |
| + } |
| +} |
| + |
| int LayoutTableSection::calcBlockDirectionOuterBorder(BlockBorderSide side) const |
| { |
| unsigned totalCols = table()->numEffectiveColumns(); |