http://bugzilla.opendarwin.org/show_bug.cgi?id=7951
REGRESSION: Safari crashes when printing a google map w/directions
Tests: none, because I believe it only happens when printing, due to the relayouts
* rendering/RenderTable.cpp:
(WebCore::RenderTable::recalcSectionsIfNeeded): Add new utility to let the cells
ensure the sections' grid data is up to date.
* rendering/RenderTable.h:
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::calcMinMaxWidth): Call above method.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@13681
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-04-04 Trey Matteson <trey@usa.net>
+
+ Reviewed by Hyatt.
+
+ http://bugzilla.opendarwin.org/show_bug.cgi?id=7951
+ REGRESSION: Safari crashes when printing a google map w/directions
+
+ Tests: none, because I believe it only happens when printing, due to the relayouts
+
+ * rendering/RenderTable.cpp:
+ (WebCore::RenderTable::recalcSectionsIfNeeded): Add new utility to let the cells
+ ensure the sections' grid data is up to date.
+ * rendering/RenderTable.h:
+ * rendering/RenderTableCell.cpp:
+ (WebCore::RenderTableCell::calcMinMaxWidth): Call above method.
+
2006-04-03 Justin Haygood <jhaygood@spsu.edu>
Reviewed by eseidel. Landed by eseidel.
return 0;
}
+void RenderTable::recalcSectionsIfNeeded()
+{
+ if (needSectionRecalc)
+ recalcSections();
+}
+
void RenderTable::recalcSections()
{
tCaption = 0;
virtual IntRect getOverflowClipRect(int tx, int ty);
+ void recalcSectionsIfNeeded();
+
private:
void recalcSections();
void RenderTableCell::calcMinMaxWidth()
{
+ // recalcMinMaxWidths works depth first. However, the child cells rely on the grids up in the
+ // sections to do their calcMinMaxWidths work. Normally the sections are set up early, as table
+ // cells are added, but relayout can cause the cells to be freed, leaving stale ptrs in the sections'
+ // grids. We must refresh those grids before the child cells try to use them.
+ table()->recalcSectionsIfNeeded();
+
RenderBlock::calcMinMaxWidth();
if (element() && style()->autoWrap()) {
// See if nowrap was set.