Chromium Code Reviews| Index: Source/core/rendering/RenderTableCol.cpp |
| diff --git a/Source/core/rendering/RenderTableCol.cpp b/Source/core/rendering/RenderTableCol.cpp |
| index 26c5935f97f1d3bd065cfbc31b1acc90e6fc6c8a..32f48e992d2bf212682b78593715c1bed60a1195 100644 |
| --- a/Source/core/rendering/RenderTableCol.cpp |
| +++ b/Source/core/rendering/RenderTableCol.cpp |
| @@ -51,8 +51,26 @@ 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()) { |
| + unsigned nEffCols = table->numEffCols(); |
| + unsigned currentColumn = 0; |
| + for (RenderTableCol* column = table->firstColumn()->nextColumn(); column; column = column->nextColumn()) { |
|
Julien - ping for review
2014/02/14 18:18:37
The logic skips the first column, is that intentio
Gurpreet
2014/02/17 09:32:08
The firstColumn would give the colgroup instead of
|
| + if (this == column) |
| + break; |
| + currentColumn += column->span(); |
| + } |
| + unsigned currentColSpan = currentColumn + span(); |
| + for (unsigned j = currentColumn; j < currentColSpan && currentColSpan <= nEffCols; j++) { |
| + for (unsigned i = 0; i < table->firstBody()->numRows(); i++) { |
|
Julien - ping for review
2014/02/14 18:18:37
You can't limit yourself to the first table-body a
Gurpreet
2014/02/17 09:32:08
Done.
|
| + RenderTableCell* cell = table->firstBody()->primaryCellAt(i, j); |
| + if (!cell) |
| + continue; |
| + cell->setPreferredLogicalWidthsDirty(); |
| + } |
| + } |
| + } |
| } |
| } |