mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 192902 - "Words wrap in nowrap cell when width=0 and next cell have width=100%". r+sr=bzbarsky
This commit is contained in:
parent
9a4c0b4b6f
commit
1220485428
@ -371,11 +371,7 @@ 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);
|
||||
aData->mTextData->mWhiteSpace.SetIntValue(NS_STYLE_WHITESPACE_NOWRAP, eCSSUnit_Enumerated);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
16
layout/reftests/bugs/192902-1.html
Normal file
16
layout/reftests/bugs/192902-1.html
Normal 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%"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
|
||||
|
||||
</body></html>
|
16
layout/reftests/bugs/192902-ref.html
Normal file
16
layout/reftests/bugs/192902-ref.html
Normal 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%"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
|
||||
|
||||
</body></html>
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user