Index: Source/core/rendering/RenderTableCol.cpp |
diff --git a/Source/core/rendering/RenderTableCol.cpp b/Source/core/rendering/RenderTableCol.cpp |
index 26c5935f97f1d3bd065cfbc31b1acc90e6fc6c8a..00b1e8c4e1978b8658d7bca2e1ec72ff357b1059 100644 |
--- a/Source/core/rendering/RenderTableCol.cpp |
+++ b/Source/core/rendering/RenderTableCol.cpp |
@@ -51,8 +51,28 @@ 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()) { |
+ if (this == column) |
+ break; |
+ currentColumn += column->span(); |
+ } |
Julien - ping for review
2014/03/06 00:54:47
This span computation code actually doesn't work,
|
+ for (RenderTableSection* section = table->topSection(); section; section = table->sectionBelow(section)) { |
+ unsigned currentColSpan = currentColumn + span(); |
+ for (unsigned j = currentColumn; j < currentColSpan && currentColSpan <= nEffCols; j++) { |
+ for (unsigned i = 0; i < section->numRows(); i++) { |
+ RenderTableCell* cell = section->primaryCellAt(i, j); |
+ if (!cell) |
+ continue; |
+ cell->setPreferredLogicalWidthsDirty(); |
+ } |
+ } |
+ } |
+ } |
} |
} |