зеркало из https://github.com/mozilla/gecko-dev.git
bug 531200 - always set the desiredHeight, also if SplitSpanningCells does not split any cell r=dholbert
This commit is contained in:
Родитель
d4f7842058
Коммит
98a3a4998a
|
@ -0,0 +1,38 @@
|
|||
<html class="reftest-print">
|
||||
<head>
|
||||
<title>push rowspan on to next page if it can't be splitted</title>
|
||||
<style>
|
||||
img {
|
||||
width: 10px;
|
||||
height: 30px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div style="height: 110px"></div>
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==">
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="page-break-after:always">
|
||||
<td>
|
||||
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">
|
||||
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==">
|
||||
</td>
|
||||
<td rowspan="2"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,38 @@
|
|||
<html class="reftest-print">
|
||||
<head>
|
||||
<title>push rowspan on to next page if it can't be splitted</title>
|
||||
<style>
|
||||
img {
|
||||
width: 10px;
|
||||
height: 30px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div style="height: 110px"></div>
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">
|
||||
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==">
|
||||
</td>
|
||||
<td rowspan="2"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -1445,6 +1445,7 @@ random-if(d2d) == 523468-1.html 523468-1-ref.html
|
|||
== 528096-1.html 528096-1-ref.html
|
||||
== 530686-1.html 530686-1-ref.html
|
||||
== 531098-1.html 531098-1-ref.html
|
||||
== 531200-1.html 531200-1-ref.html
|
||||
== 531371-1.html 531371-1-ref.html
|
||||
== 534526-1a.html 534526-1-ref.html
|
||||
== 534526-1b.html 534526-1-ref.html
|
||||
|
|
|
@ -955,6 +955,7 @@ nsTableRowGroupFrame::SplitSpanningCells(nsPresContext& aPresContext,
|
|||
static_cast<nsTableFrame*>(aTable.GetFirstInFlow())->IsBorderCollapse();
|
||||
PRInt32 lastRowIndex = aLastRow.GetRowIndex();
|
||||
bool wasLast = false;
|
||||
bool haveRowSpan = false;
|
||||
// Iterate the rows between aFirstRow and aLastRow
|
||||
for (nsTableRowFrame* row = &aFirstRow; !wasLast; row = row->GetNextRow()) {
|
||||
wasLast = (row == &aLastRow);
|
||||
|
@ -966,6 +967,7 @@ nsTableRowGroupFrame::SplitSpanningCells(nsPresContext& aPresContext,
|
|||
// Only reflow rowspan > 1 cells which span aLastRow. Those which don't span aLastRow
|
||||
// were reflowed correctly during the unconstrained height reflow.
|
||||
if ((rowSpan > 1) && (rowIndex + rowSpan > lastRowIndex)) {
|
||||
haveRowSpan = true;
|
||||
nsReflowStatus status;
|
||||
// Ask the row to reflow the cell to the height of all the rows it spans up through aLastRow
|
||||
// aAvailHeight is the space between the row group start and the end of the page
|
||||
|
@ -1021,6 +1023,9 @@ nsTableRowGroupFrame::SplitSpanningCells(nsPresContext& aPresContext,
|
|||
}
|
||||
}
|
||||
}
|
||||
if (!haveRowSpan) {
|
||||
aDesiredHeight = aLastRow.GetRect().YMost();
|
||||
}
|
||||
}
|
||||
|
||||
// Remove the next-in-flow of the row, its cells and their cell blocks. This
|
||||
|
|
Загрузка…
Ссылка в новой задаче