Index: Source/core/rendering/RenderTableCol.cpp |
diff --git a/Source/core/rendering/RenderTableCol.cpp b/Source/core/rendering/RenderTableCol.cpp |
index ea17126a73baff085f968bc15ccbfa1264e6e43f..1d40091a59593c8211d21e9d69699c7d652e2c64 100644 |
--- a/Source/core/rendering/RenderTableCol.cpp |
+++ b/Source/core/rendering/RenderTableCol.cpp |
@@ -57,8 +57,24 @@ 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. |
+ for (RenderObject* child = table->children()->firstChild(); child; child = child->nextSibling()) { |
+ if (child->isRenderTableCol()) |
mstensho (USE GERRIT)
2015/01/12 14:00:09
Please change to "if (!child->isRenderTableSection
Gurpreet
2015/01/12 14:14:14
But the check if(!child->isRenderTableSection()) w
mstensho (USE GERRIT)
2015/01/12 16:07:51
You're right, of course. The code works correctly
|
+ continue; |
+ if (child->isTableSection()) { |
mstensho (USE GERRIT)
2015/01/12 14:00:09
So no need for this check if you do as I suggested
|
+ RenderTableSection* section = toRenderTableSection(child); |
+ for (RenderTableRow* row = section->firstRow(); row; row = row->nextRow()) { |
+ for (RenderTableCell* cell = row->firstCell(); cell; cell = cell->nextCell()) |
+ cell->setPreferredLogicalWidthsDirty(); |
+ } |
+ } |
+ } |
+ } |
} |
} |