mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Distribute the width of column-spanning cells to columns with nothing in them, like we do for final table widths. (Bug 734569) r=dholbert
This commit is contained in:
parent
c68c3ea901
commit
ac347fa732
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE HTML>
|
||||
<title>Distributing widths from spanning cells to empty columns</title>
|
||||
<table cellpadding="0" cellspacing="0" width="75">
|
||||
<tr>
|
||||
<td width="25" bgcolor="yellow" > </td>
|
||||
<td width="25" bgcolor="aqua" > </td>
|
||||
<td width="25" bgcolor="aqua" > </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25" bgcolor="fuchsia"> </td>
|
||||
<td width="25" bgcolor="fuchsia"> </td>
|
||||
<td width="25" bgcolor="yellow" > </td>
|
||||
</tr>
|
||||
</table>
|
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE HTML>
|
||||
<title>Distributing widths from spanning cells to empty columns</title>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="25" bgcolor="yellow" > </td>
|
||||
<td width="50" colspan="2" bgcolor="aqua" > </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50" colspan="2" bgcolor="fuchsia"> </td>
|
||||
<td width="25" bgcolor="yellow" > </td>
|
||||
</tr>
|
||||
</table>
|
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE HTML>
|
||||
<title>Distributing widths from spanning cells to empty columns</title>
|
||||
<table cellpadding="0" cellspacing="0" width="75">
|
||||
<tr>
|
||||
<td width="25" bgcolor="yellow" > </td>
|
||||
<td width="50" colspan="2" bgcolor="aqua" > </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50" colspan="2" bgcolor="fuchsia"> </td>
|
||||
<td width="25" bgcolor="yellow" > </td>
|
||||
</tr>
|
||||
</table>
|
@ -60,3 +60,5 @@ fails == default-box-sizing-collapse-quirks.html default-box-sizing-collapse-qui
|
||||
== colgroup-vs-column-4.html colgroup-vs-column-4-ref.html
|
||||
== dynamic-fixed-layout-1.html dynamic-fixed-layout-1-ref.html
|
||||
== cell-pref-width-border-box.html cell-pref-width-border-box-ref.html
|
||||
== colspan-distribute-to-empty-1a.html colspan-distribute-to-empty-1-ref.html
|
||||
== colspan-distribute-to-empty-1b.html colspan-distribute-to-empty-1-ref.html
|
||||
|
@ -700,10 +700,10 @@ BasicTableLayoutStrategy::DistributeWidthToColumns(nscoord aWidth,
|
||||
* percent width have nonzero pref width, in proportion to pref
|
||||
* width [total_flex_pref]
|
||||
*
|
||||
* b. (NOTE: this case is for BTLS_FINAL_WIDTH only) otherwise, if
|
||||
* any columns without a specified coordinate width or percent
|
||||
* width, but with cells originating in them have zero pref width,
|
||||
* equally between these [numNonSpecZeroWidthCols]
|
||||
* b. otherwise, if any columns without a specified coordinate
|
||||
* width or percent 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
|
||||
* pref width, in proportion to pref width [total_fixed_pref]
|
||||
@ -761,8 +761,7 @@ BasicTableLayoutStrategy::DistributeWidthToColumns(nscoord aWidth,
|
||||
total_fixed_pref = NSCoordSaturatingAdd(total_fixed_pref,
|
||||
pref_width);
|
||||
} else if (pref_width == 0) {
|
||||
if (aWidthType == BTLS_FINAL_WIDTH &&
|
||||
cellMap->GetNumCellsOriginatingInCol(col) > 0) {
|
||||
if (cellMap->GetNumCellsOriginatingInCol(col) > 0) {
|
||||
++numNonSpecZeroWidthCols;
|
||||
}
|
||||
} else {
|
||||
@ -823,9 +822,6 @@ BasicTableLayoutStrategy::DistributeWidthToColumns(nscoord aWidth,
|
||||
l2t = FLEX_FLEX_LARGE;
|
||||
basis.c = total_flex_pref;
|
||||
} else if (numNonSpecZeroWidthCols > 0) {
|
||||
NS_ASSERTION(aWidthType == BTLS_FINAL_WIDTH,
|
||||
"numNonSpecZeroWidthCols should only "
|
||||
"be set when we're setting final width.");
|
||||
l2t = FLEX_FLEX_LARGE_ZERO;
|
||||
basis.c = numNonSpecZeroWidthCols;
|
||||
} else if (total_fixed_pref > 0) {
|
||||
@ -955,9 +951,6 @@ BasicTableLayoutStrategy::DistributeWidthToColumns(nscoord aWidth,
|
||||
}
|
||||
break;
|
||||
case FLEX_FLEX_LARGE_ZERO:
|
||||
NS_ASSERTION(aWidthType == BTLS_FINAL_WIDTH,
|
||||
"FLEX_FLEX_LARGE_ZERO only should be hit "
|
||||
"when we're setting final width.");
|
||||
if (pct == 0.0f &&
|
||||
!colFrame->GetHasSpecifiedCoord() &&
|
||||
cellMap->GetNumCellsOriginatingInCol(col) > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user