mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 527464. Go back to ignoring nowrape in quirks mode if a nonzero width is set in the width attribute. r=bzbarsky
This commit is contained in:
parent
de6af72a50
commit
d554f9f2b3
@ -371,7 +371,15 @@ void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
if (aData->mTextData->mWhiteSpace.GetUnit() == eCSSUnit_Null) {
|
||||
// nowrap: enum
|
||||
if (aAttributes->GetAttr(nsGkAtoms::nowrap)) {
|
||||
aData->mTextData->mWhiteSpace.SetIntValue(NS_STYLE_WHITESPACE_NOWRAP, eCSSUnit_Enumerated);
|
||||
// See if our width is not a nonzero integer width.
|
||||
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::width);
|
||||
nsCompatibility mode = aData->mPresContext->CompatibilityMode();
|
||||
if (!value || value->Type() != nsAttrValue::eInteger ||
|
||||
value->GetIntegerValue() == 0 ||
|
||||
eCompatibility_NavQuirks != mode) {
|
||||
aData->mTextData->mWhiteSpace.SetIntValue(NS_STYLE_WHITESPACE_NOWRAP, eCSSUnit_Enumerated);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
1
layout/reftests/bugs/527464-1.html
Normal file
1
layout/reftests/bugs/527464-1.html
Normal file
@ -0,0 +1 @@
|
||||
<table><tr><td width="1" nowrap>x x</td></td></tr></table>
|
1
layout/reftests/bugs/527464-ref.html
Normal file
1
layout/reftests/bugs/527464-ref.html
Normal file
@ -0,0 +1 @@
|
||||
<table><tr><td width="1">x x</td></td></tr></table>
|
@ -1339,3 +1339,4 @@ fails-if(MOZ_WIDGET_TOOLKIT!="cocoa") == 488692-1.html 488692-1-ref.html # needs
|
||||
== 523096-1.html 523096-1-ref.html
|
||||
== 523468-1.html 523468-1-ref.html
|
||||
== 524175-1.html 524175-1-ref.html
|
||||
== 527464-1.html 527464-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user