Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Unified Diff: Source/WebCore/rendering/RenderBox.cpp

Issue 10809080: Merge 123062 - Crash in RenderTableSection::addCell. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/WebCore/rendering/RenderBox.cpp
===================================================================
--- Source/WebCore/rendering/RenderBox.cpp (revision 123512)
+++ Source/WebCore/rendering/RenderBox.cpp (working copy)
@@ -3951,9 +3951,11 @@
{
// FIXME: The table code should handle that automatically. If not,
// we should fix it and remove the table part checks.
- if (box->isTable())
- toRenderTable(box)->setNeedsSectionRecalc();
- else if (box->isTableSection())
+ if (box->isTable()) {
+ // Because we may have added some sections with already computed column structures, we need to
+ // sync the table structure with them now. This avoids crashes when adding new cells to the table.
+ toRenderTable(box)->forceSectionsRecalc();
+ } else if (box->isTableSection())
toRenderTableSection(box)->setNeedsCellRecalc();
box->setNeedsLayoutAndPrefWidthsRecalc();
« no previous file with comments | « LayoutTests/fast/table/split-table-no-section-update-crash-expected.txt ('k') | Source/WebCore/rendering/RenderTable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698