Make ParsePositiveVariant restrict integers too, which affects existing call for -moz-column-count. (Bug 156716) r=bzbarsky sr=roc

This commit is contained in:
L. David Baron 2008-07-26 09:14:48 -07:00
Родитель 593912e502
Коммит 0169af2ccf
2 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -3926,7 +3926,12 @@ PRBool CSSParserImpl::ParsePositiveVariant(nsresult& aErrorCode,
UngetToken();
return PR_FALSE;
}
}
} else if (aValue.GetUnit() == eCSSUnit_Integer) {
if (aValue.GetIntValue() < 0) {
UngetToken();
return PR_FALSE;
}
}
return PR_TRUE;
}
return PR_FALSE;

Просмотреть файл

@ -341,7 +341,7 @@ var gCSSProperties = {
initial_values: [ "auto" ],
other_values: [ "1", "0", "17" ],
invalid_values: [
// "-1", unclear: see http://lists.w3.org/Archives/Public/www-style/2007Apr/0030
"-1", //unclear: see http://lists.w3.org/Archives/Public/www-style/2007Apr/0030
"3px"
]
},