mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fix regression in sizing of tables with scrollable rowgroups. Bug 387344,
r=bernd, sr=roc
This commit is contained in:
parent
0de7a6f973
commit
4e0e5d2463
17
layout/reftests/bugs/387344-1-ref.html
Normal file
17
layout/reftests/bugs/387344-1-ref.html
Normal file
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<table>
|
||||
<tbody style="height: 100px; overflow: scroll; font-size: 20px">
|
||||
<tr><td>Test 1</td></tr>
|
||||
<tr><td>Test 2</td></tr>
|
||||
<tr><td>Test 3</td></tr>
|
||||
<tr><td>Test 4</td></tr>
|
||||
<tr><td>Test 5</td></tr>
|
||||
<tr><td>Test 6</td></tr>
|
||||
<tr><td>Test 7</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
This text should be right up against the table.
|
||||
</body>
|
||||
</html>
|
19
layout/reftests/bugs/387344-1.html
Normal file
19
layout/reftests/bugs/387344-1.html
Normal file
@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<table>
|
||||
<tbody style="height: 100px; overflow: scroll; font-size: 20px">
|
||||
<tr><td>Test 1</td></tr>
|
||||
<tr><td>Test 2</td></tr>
|
||||
<tr><td>Test 3</td></tr>
|
||||
<tr><td>Test 4</td></tr>
|
||||
<tr><td>Test 5</td></tr>
|
||||
<tr><td>Test 6</td></tr>
|
||||
<tr><td>Test 7</td></tr>
|
||||
<tr><td>Test 8</td></tr>
|
||||
<tr><td>Test 9</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
This text should be right up against the table.
|
||||
</body>
|
||||
</html>
|
@ -276,3 +276,4 @@ random-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 379316-2.html 379316-2-ref.html # bug
|
||||
== 382600-1.html 382600-1-ref.html
|
||||
== 383551-1.html 383551-1-ref.html
|
||||
== 384576-1.html 384576-1-ref.html
|
||||
== 387344-1.html 387344-1-ref.html
|
||||
|
@ -3085,9 +3085,14 @@ nsTableFrame::CalcDesiredHeight(const nsHTMLReflowState& aReflowState, nsHTMLRef
|
||||
nsMargin borderPadding = GetChildAreaOffset(&aReflowState);
|
||||
|
||||
// get the natural height based on the last child's (row group or scroll frame) rect
|
||||
RowGroupArray rowGroups;
|
||||
OrderRowGroups(rowGroups);
|
||||
if (rowGroups.Length() == 0) {
|
||||
FrameArray rowGroups;
|
||||
PRUint32 numRowGroups;
|
||||
{
|
||||
// Scope for the dummies so we don't use them by accident
|
||||
nsTableRowGroupFrame *dummy1, *dummy2;
|
||||
numRowGroups = OrderRowGroups(rowGroups, &dummy1, &dummy2);
|
||||
}
|
||||
if (numRowGroups == 0) {
|
||||
// tables can be used as rectangular items without content
|
||||
nscoord tableSpecifiedHeight = CalcBorderBoxHeight(aReflowState);
|
||||
if ((NS_UNCONSTRAINEDSIZE != tableSpecifiedHeight) &&
|
||||
@ -3105,7 +3110,7 @@ nsTableFrame::CalcDesiredHeight(const nsHTMLReflowState& aReflowState, nsHTMLRef
|
||||
nscoord desiredHeight = borderPadding.top + borderPadding.bottom;
|
||||
if (rowCount > 0 && colCount > 0) {
|
||||
desiredHeight += cellSpacingY;
|
||||
for (PRUint32 rgX = 0; rgX < rowGroups.Length(); rgX++) {
|
||||
for (PRUint32 rgX = 0; rgX < numRowGroups; rgX++) {
|
||||
desiredHeight += rowGroups[rgX]->GetSize().height + cellSpacingY;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user