Don't let columns with no cells originating in them expand in the pass for expanding zero-width columns. b=425972 r=dholbert sr=roc a=blocking1.9+
git-svn-id: svn://10.0.0.236/trunk@249839 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
ed9344aaf7
commit
ad54a1de37
14
mozilla/layout/reftests/bugs/425972-1-ref.html
Normal file
14
mozilla/layout/reftests/bugs/425972-1-ref.html
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||||
|
<title>there should not be a red bar over the whole page</title>
|
||||||
|
</head>
|
||||||
|
<body >
|
||||||
|
<table width="100%">
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<tr><td bgcolor="#ff3333" width="100%" height="50px"></td></tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
15
mozilla/layout/reftests/bugs/425972-1.html
Normal file
15
mozilla/layout/reftests/bugs/425972-1.html
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||||
|
<title>there should be a red bar over the whole page</title>
|
||||||
|
</head>
|
||||||
|
<body >
|
||||||
|
<table width="100%">
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<tr><td bgcolor="#ff3333" width="1%" height="50px"></td></tr>
|
||||||
|
<tr><td colspan="2"></td></tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
14
mozilla/layout/reftests/bugs/425972-2-ref.html
Normal file
14
mozilla/layout/reftests/bugs/425972-2-ref.html
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||||
|
<title>there should not be a red bar over the whole page</title>
|
||||||
|
</head>
|
||||||
|
<body >
|
||||||
|
<table width="100%">
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<tr><td bgcolor="#ff3333" width="1%" height="50px"></td><td style="padding:0"> </td></tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
15
mozilla/layout/reftests/bugs/425972-2.html
Normal file
15
mozilla/layout/reftests/bugs/425972-2.html
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||||
|
<title>there should not be a red bar over the whole page</title>
|
||||||
|
</head>
|
||||||
|
<body >
|
||||||
|
<table width="100%">
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<tr><td bgcolor="#ff3333" width="1%" height="50px"></td><td style="padding:0"></td></tr>
|
||||||
|
<tr><td colspan="2"></td></tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -792,4 +792,6 @@ fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") == 424074-1-ref2.xul 424074-1-ref3.xul
|
|||||||
== 424434-1.html 424434-1-ref.html
|
== 424434-1.html 424434-1-ref.html
|
||||||
== 424631-1.html 424631-1-ref.html
|
== 424631-1.html 424631-1-ref.html
|
||||||
== 424710-1.html 424710-1-ref.html
|
== 424710-1.html 424710-1-ref.html
|
||||||
|
== 425972-1.html 425972-1-ref.html
|
||||||
|
== 425972-2.html 425972-2-ref.html
|
||||||
|
!= 425972-1.html 425972-2.html
|
||||||
|
|||||||
@ -680,9 +680,10 @@ BasicTableLayoutStrategy::DistributeWidthToColumns(nscoord aWidth,
|
|||||||
* percent width have nonzero pref width, in proportion to pref
|
* percent width have nonzero pref width, in proportion to pref
|
||||||
* width [total_flex_pref]
|
* width [total_flex_pref]
|
||||||
*
|
*
|
||||||
* b. (NOTE: this case is for BTLS_FINAL_WIDTH only) otherwise, if any
|
* b. (NOTE: this case is for BTLS_FINAL_WIDTH only) otherwise, if
|
||||||
* columns without a specified coordinate width or percent width have
|
* any columns without a specified coordinate width or percent
|
||||||
* zero pref width, equally between these [numNonSpecZeroWidthCols]
|
* width, but with cells originating in them have zero pref width,
|
||||||
|
* equally between these [numNonSpecZeroWidthCols]
|
||||||
*
|
*
|
||||||
* c. otherwise, if any columns without percent width have nonzero
|
* c. otherwise, if any columns without percent width have nonzero
|
||||||
* pref width, in proportion to pref width [total_fixed_pref]
|
* pref width, in proportion to pref width [total_fixed_pref]
|
||||||
@ -739,7 +740,8 @@ BasicTableLayoutStrategy::DistributeWidthToColumns(nscoord aWidth,
|
|||||||
total_fixed_pref = NSCoordSaturatingAdd(total_fixed_pref,
|
total_fixed_pref = NSCoordSaturatingAdd(total_fixed_pref,
|
||||||
pref_width);
|
pref_width);
|
||||||
} else if (pref_width == 0) {
|
} else if (pref_width == 0) {
|
||||||
if (aWidthType == BTLS_FINAL_WIDTH) {
|
if (aWidthType == BTLS_FINAL_WIDTH &&
|
||||||
|
mTableFrame->GetNumCellsOriginatingInCol(col)) {
|
||||||
++numNonSpecZeroWidthCols;
|
++numNonSpecZeroWidthCols;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -937,7 +939,8 @@ BasicTableLayoutStrategy::DistributeWidthToColumns(nscoord aWidth,
|
|||||||
"FLEX_FLEX_LARGE_ZERO only should be hit "
|
"FLEX_FLEX_LARGE_ZERO only should be hit "
|
||||||
"when we're setting final width.");
|
"when we're setting final width.");
|
||||||
if (pct == 0.0f &&
|
if (pct == 0.0f &&
|
||||||
!colFrame->GetHasSpecifiedCoord()) {
|
!colFrame->GetHasSpecifiedCoord() &&
|
||||||
|
mTableFrame->GetNumCellsOriginatingInCol(col)) {
|
||||||
|
|
||||||
NS_ASSERTION(col_width == 0 &&
|
NS_ASSERTION(col_width == 0 &&
|
||||||
colFrame->GetPrefCoord() == 0,
|
colFrame->GetPrefCoord() == 0,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user