зеркало из https://github.com/mozilla/gecko-dev.git
not part of default build. Make schema decimal validate work correctly
This commit is contained in:
Родитель
3dd5f22d97
Коммит
dcbb265390
|
@ -2568,9 +2568,12 @@ PRBool nsSchemaValidator::IsValidSchemaDecimal(const nsAString & aNodeValue,
|
|||
|
||||
long temp;
|
||||
isValid = nsSchemaValidatorUtils::IsValidSchemaInteger(aWholePart, &temp);
|
||||
|
||||
if (isValid) {
|
||||
if ((aFractionPart.First() == '-') || (aFractionPart.First() == '+'))
|
||||
|
||||
if (isValid && (findString != kNotFound)) {
|
||||
// XX: assuming "2." is not valid
|
||||
if (aFractionPart.IsEmpty())
|
||||
isValid = PR_FALSE;
|
||||
else if ((aFractionPart.First() == '-') || (aFractionPart.First() == '+'))
|
||||
isValid = PR_FALSE;
|
||||
else
|
||||
isValid = nsSchemaValidatorUtils::IsValidSchemaInteger(aFractionPart, &temp);
|
||||
|
|
Загрузка…
Ссылка в новой задаче