Chromium Code Reviews| Index: Source/core/rendering/RenderTableCol.cpp |
| diff --git a/Source/core/rendering/RenderTableCol.cpp b/Source/core/rendering/RenderTableCol.cpp |
| index ea17126a73baff085f968bc15ccbfa1264e6e43f..d7d6db656f36760b881a87df1b136d81dec29ceb 100644 |
| --- a/Source/core/rendering/RenderTableCol.cpp |
| +++ b/Source/core/rendering/RenderTableCol.cpp |
| @@ -57,8 +57,25 @@ void RenderTableCol::styleDidChange(StyleDifference diff, const RenderStyle* old |
| // If border was changed, notify table. |
| if (parent()) { |
| RenderTable* table = this->table(); |
| - if (table && !table->selfNeedsLayout() && !table->normalChildNeedsLayout() && oldStyle && oldStyle->border() != style()->border()) |
| + if (table && !table->selfNeedsLayout() && !table->normalChildNeedsLayout() && oldStyle && oldStyle->border() != style()->border()) { |
| table->invalidateCollapsedBorders(); |
| + } else if (oldStyle && oldStyle->logicalWidth() != style()->logicalWidth()) { |
| + // FIXME : setPreferredLogicalWidthsDirty is done for all cells as of now. |
| + // Need to find a better way so that only the cells which are changed by |
| + // the col width should have preferred logical widths recomputed. |
|
mstensho (USE GERRIT)
2015/01/09 21:21:35
-"should".
|
| + table->recalcSectionsIfNeeded(); |
|
mstensho (USE GERRIT)
2015/01/09 21:21:35
See https://codereview.chromium.org/208263013/#msg
|
| + unsigned nEffCols = table->numEffCols(); |
| + for (RenderTableSection* section = table->topSection(); section; section = table->sectionBelow(section)) { |
| + for (unsigned j = 0; j < nEffCols; j++) { |
| + for (unsigned i = 0; i < section->numRows(); i++) { |
| + RenderTableCell* cell = section->primaryCellAt(i, j); |
| + if (!cell) |
| + continue; |
| + cell->setPreferredLogicalWidthsDirty(); |
| + } |
| + } |
| + } |
| + } |
| } |
| } |