Bug 192902 - "Words wrap in nowrap cell when width=0 and next cell have width=100%". r+sr=bzbarsky

This commit is contained in:
Bernd 2009-06-11 13:09:34 -04:00
parent 9a4c0b4b6f
commit 1220485428
4 changed files with 34 additions and 5 deletions

View File

@ -371,10 +371,6 @@ void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
if (aData->mTextData->mWhiteSpace.GetUnit() == eCSSUnit_Null) {
// nowrap: enum
if (aAttributes->GetAttr(nsGkAtoms::nowrap)) {
// See if our width is not a integer width.
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::width);
nsCompatibility mode = aData->mPresContext->CompatibilityMode();
if (!value || value->Type() != nsAttrValue::eInteger || eCompatibility_NavQuirks != mode)
aData->mTextData->mWhiteSpace.SetIntValue(NS_STYLE_WHITESPACE_NOWRAP, eCSSUnit_Enumerated);
}
}

View File

@ -0,0 +1,16 @@
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Testcase for bug 192902</title>
</head>
<body>
<table border="1">
<tbody><tr>
<td nowrap="nowrap" width="0">Sony Ericsson T200</td>
<td width="100%">&nbsp;</td>
</tr>
</tbody></table>
</body></html>

View File

@ -0,0 +1,16 @@
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Testcase for bug 192902</title>
</head>
<body>
<table border="1">
<tbody><tr>
<td nowrap="nowrap">Sony Ericsson T200</td>
<td width="100%">&nbsp;</td>
</tr>
</tbody></table>
</body></html>

View File

@ -132,6 +132,7 @@ random == 99850-1b.html 99850-1-ref.html # bug 471629
== 180085-1.html 180085-1-ref.html
== 180085-2.html 180085-2-ref.html
== 185388-1.html 185388-1-ref.html
== 192902-1.html 192902-ref.html
!= 200774-1.html about:blank # really a crashtest
== 201215-1.html 201215-1-ref.html
== 201293-1a.html 201293-1-ref.html