зеркало из https://github.com/mozilla/pjs.git
Checking in for trev@gtchat.de. Fixing bug 238409. Regression in attribute parsing. r=bugmail@sicking.cc, sr=jst@mozilla.org, a=asa@mozilla.org
This commit is contained in:
Родитель
01a613661c
Коммит
f65db6acde
|
@ -764,16 +764,19 @@ nsAttrValue::ParseSpecialIntValue(const nsAString& aString,
|
||||||
nsAutoString tmp(aString);
|
nsAutoString tmp(aString);
|
||||||
PRInt32 val = tmp.ToInteger(&ec);
|
PRInt32 val = tmp.ToInteger(&ec);
|
||||||
|
|
||||||
if (NS_FAILED(ec) && aCanBeProportional) {
|
if (NS_FAILED(ec)) {
|
||||||
// Even if the integer could not be parsed, it might just be "*"
|
if (aCanBeProportional) {
|
||||||
tmp.CompressWhitespace(PR_TRUE, PR_TRUE);
|
// Even if the integer could not be parsed, it might just be "*"
|
||||||
if (tmp.Length() == 1 && tmp.Last() == '*') {
|
tmp.CompressWhitespace(PR_TRUE, PR_TRUE);
|
||||||
// special case: HTML spec says a value '*' == '1*'
|
if (tmp.Length() == 1 && tmp.Last() == '*') {
|
||||||
// see http://www.w3.org/TR/html4/types.html#type-multi-length
|
// special case: HTML spec says a value '*' == '1*'
|
||||||
// bug 29061
|
// see http://www.w3.org/TR/html4/types.html#type-multi-length
|
||||||
SetIntValueAndType(1, eProportional);
|
// bug 29061
|
||||||
return PR_TRUE;
|
SetIntValueAndType(1, eProportional);
|
||||||
|
return PR_TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return PR_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
val = PR_MAX(val, 0);
|
val = PR_MAX(val, 0);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче