bug 675490 - push nonplaced tfoots and mark them as nonrepeating r=bz

This commit is contained in:
Bernd 2011-08-13 18:37:43 +02:00
Родитель d20e85e464
Коммит 7aa1042321
4 изменённых файлов: 69 добавлений и 4 удалений

Просмотреть файл

@ -44,6 +44,7 @@ fails == float-continuations-000.html float-continuations-000.ref.html
== row-page-break-after-always-2.html table-page-break-before-auto-2-ref.html
== rowgroup-thead-page-break-after-always-1.html table-page-break-before-auto-3-ref.html
== rowgroup-tfoot-page-break-after-always-1.html table-page-break-before-auto-3-ref.html
== table-tfoot-thead-1.html table-tfoot-thead-1-ref.html
== table-caption-splitrowgroup-1.html table-caption-splitrowgroup-1-ref.html
== table-caption-splitaftercaption-1.html table-caption-splitaftercaption-1-ref.html
== table-caption-splitaftercaption-2.html table-caption-splitaftercaption-2-ref.html

Просмотреть файл

@ -0,0 +1,27 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en-US" class="reftest-print">
<head>
<style type="text/css">
div.filler {height:5px; width: 50px; border:thin solid blue;}
div.spacer { height: 0px; width: 0px; padding: 5px;border:thin solid green;}
tfoot div.spacer {border-color:orange;
height: 10px}
tbody div.spacer{border-width: 4px}
thead div.spacer{height: 140px}
</style>
</head>
<body>
<div class="filler"></div>
<table cellspacing="1" cellpadding="0">
<thead><tr><td><div class="spacer"></div></td></tr></thead>
<tbody><tr><td><div class="spacer"></div></td></tr></tbody>
</table>
<table cellspacing="1" cellpadding="0">
<tbody> <tr><td><div class="spacer"></div></td></tr></tbody>
<tfoot><tr><td><div class="spacer"></div></td></tr></tfoot>
</table>
</body>
</html>

Просмотреть файл

@ -0,0 +1,25 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en-US" class="reftest-print">
<head>
<style type="text/css">
div.filler {height:5px; width: 50px; border:thin solid blue;}
div.spacer { height: 0px; width: 0px; padding: 5px;border:thin solid green;}
tfoot div.spacer {border-color:orange;
height: 10px}
tbody div.spacer{border-width: 4px}
thead div.spacer{height: 140px}
</style>
</head>
<body>
<div class="filler"></div>
<table cellspacing="1" cellpadding="0">
<tfoot><tr><td><div class="spacer"></div></td></tr></tfoot>
<tbody>
<tr><td><div class="spacer"></div></td></tr>
<tr><td><div class="spacer"></div></td></tr>
</tbody>
<thead><tr><td><div class="spacer"></div></td></tr></thead>
</table>
</body>
</html>

Просмотреть файл

@ -2734,10 +2734,13 @@ nsTableFrame::ReflowChildren(nsTableReflowState& aReflowState,
(isPaginated || (kidFrame->GetStateBits() &
NS_FRAME_CONTAINS_RELATIVE_HEIGHT)))) {
if (pageBreak) {
PushChildren(rowGroups, childX);
if (allowRepeatedFooter) {
PlaceRepeatedFooter(aReflowState, tfoot, footerHeight);
}
else if (tfoot && tfoot->IsRepeatable()) {
tfoot->SetRepeatable(PR_FALSE);
}
PushChildren(rowGroups, childX);
aStatus = NS_FRAME_NOT_COMPLETE;
break;
}
@ -2816,6 +2819,9 @@ nsTableFrame::ReflowChildren(nsTableReflowState& aReflowState,
if (allowRepeatedFooter) {
PlaceRepeatedFooter(aReflowState, tfoot, footerHeight);
}
else if (tfoot && tfoot->IsRepeatable()) {
tfoot->SetRepeatable(PR_FALSE);
}
aStatus = NS_FRAME_NOT_COMPLETE;
PushChildren(rowGroups, childX + 1);
aLastChildReflowed = kidFrame;
@ -2828,6 +2834,9 @@ nsTableFrame::ReflowChildren(nsTableReflowState& aReflowState,
if (allowRepeatedFooter) {
PlaceRepeatedFooter(aReflowState, tfoot, footerHeight);
}
else if (tfoot && tfoot->IsRepeatable()) {
tfoot->SetRepeatable(PR_FALSE);
}
aStatus = NS_FRAME_NOT_COMPLETE;
PushChildren(rowGroups, childX);
aLastChildReflowed = prevKidFrame;
@ -2892,13 +2901,16 @@ nsTableFrame::ReflowChildren(nsTableReflowState& aReflowState,
// We've used up all of our available space so push the remaining
// children to the next-in-flow
if (allowRepeatedFooter) {
PlaceRepeatedFooter(aReflowState, tfoot, footerHeight);
}
else if (tfoot && tfoot->IsRepeatable()) {
tfoot->SetRepeatable(PR_FALSE);
}
nsIFrame* nextSibling = kidFrame->GetNextSibling();
if (nsnull != nextSibling) {
PushChildren(rowGroups, childX + 1);
}
if (allowRepeatedFooter) {
PlaceRepeatedFooter(aReflowState, tfoot, footerHeight);
}
break;
}
}