From 796be0f635fb656fdc1723973f3b49420b3338c5 Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Mon, 17 Dec 2012 02:21:36 +0100 Subject: [PATCH] Bug 696640 - Don't put an existing next-in-flow for the kid into 'rowGroups' - it's either already there or it's not our child. r=roc --- layout/tables/crashtests/696640-1.html | 47 +++ layout/tables/crashtests/696640-2.html | 486 +++++++++++++++++++++++ layout/tables/crashtests/crashtests.list | 2 + layout/tables/nsTableFrame.cpp | 19 +- 4 files changed, 542 insertions(+), 12 deletions(-) create mode 100644 layout/tables/crashtests/696640-1.html create mode 100644 layout/tables/crashtests/696640-2.html diff --git a/layout/tables/crashtests/696640-1.html b/layout/tables/crashtests/696640-1.html new file mode 100644 index 000000000000..c0f85ec80c40 --- /dev/null +++ b/layout/tables/crashtests/696640-1.html @@ -0,0 +1,47 @@ + + + + + crash at A4 90% generated content + repeatable tfoot + + + + + + +
+ +
+
+ + + + + + + + + + + +
+
+
+
+
+ + diff --git a/layout/tables/crashtests/696640-2.html b/layout/tables/crashtests/696640-2.html new file mode 100644 index 000000000000..52d64c7adadb --- /dev/null +++ b/layout/tables/crashtests/696640-2.html @@ -0,0 +1,486 @@ + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.
ivsvs.

Total Points

0
+
+
+ + diff --git a/layout/tables/crashtests/crashtests.list b/layout/tables/crashtests/crashtests.list index 3777fe8b59ea..75d032882452 100644 --- a/layout/tables/crashtests/crashtests.list +++ b/layout/tables/crashtests/crashtests.list @@ -120,6 +120,8 @@ load 595758-2.xhtml load 678447-1.html skip-if(Android) load 691824-1.xhtml # Bug 694248 load 695430-1.html +load 696640-1.html +load 696640-2.html load 707622-1.html load 705996-1.html load 705996-2.html diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index bbd5b0c001d0..c598f959becf 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -2938,29 +2938,24 @@ nsTableFrame::ReflowChildren(nsTableReflowState& aReflowState, break; } - // Insert the continuing frame into the sibling list. + // Insert the kid's new next-in-flow into our sibling list... mFrames.InsertFrame(nullptr, kidFrame, kidNextInFlow); - - // Fall through and update |rowGroups| with the new rowgroup, just as - // it would have been if we had called OrderRowGroups again. - // Note that rowGroups doesn't get used again after we PushChildren - // below, anyway. + // and in rowGroups after childX so that it will get pushed below. + rowGroups.InsertElementAt(childX + 1, + static_cast (kidNextInFlow)); } - // Put the nextinflow so that it will get pushed - rowGroups.InsertElementAt(childX + 1, - static_cast (kidNextInFlow)); - // We've used up all of our available space so push the remaining - // children to the next-in-flow + // children. if (allowRepeatedFooter) { PlaceRepeatedFooter(aReflowState, tfoot, footerHeight); } else if (tfoot && tfoot->IsRepeatable()) { tfoot->SetRepeatable(false); } + nsIFrame* nextSibling = kidFrame->GetNextSibling(); - if (nullptr != nextSibling) { + if (nextSibling) { PushChildren(rowGroups, childX + 1); } break;