diff options
Diffstat (limited to 'Source/WebCore/rendering/RenderTableSection.cpp')
-rw-r--r-- | Source/WebCore/rendering/RenderTableSection.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Source/WebCore/rendering/RenderTableSection.cpp b/Source/WebCore/rendering/RenderTableSection.cpp index d34070cc6..2644a8438 100644 --- a/Source/WebCore/rendering/RenderTableSection.cpp +++ b/Source/WebCore/rendering/RenderTableSection.cpp @@ -114,16 +114,13 @@ void RenderTableSection::styleDidChange(StyleDifference diff, const RenderStyle* table->invalidateCollapsedBorders(); } -void RenderTableSection::willBeDestroyed() +void RenderTableSection::willBeRemovedFromTree() { - RenderTable* recalcTable = table(); - - RenderBox::willBeDestroyed(); - - // recalc cell info because RenderTable has unguarded pointers - // stored that point to this RenderTableSection. - if (recalcTable) - recalcTable->setNeedsSectionRecalc(); + RenderBox::willBeRemovedFromTree(); + + // Preventively invalidate our cells as we may be re-inserted into + // a new table which would require us to rebuild our structure. + setNeedsCellRecalc(); } void RenderTableSection::addChild(RenderObject* child, RenderObject* beforeChild) |