Commit 05657d95 authored by Andrea Iacovitti's avatar Andrea Iacovitti

Negative values are not allowed for background-size.

parent 781c6b18
......@@ -1823,7 +1823,7 @@ CSSValueImpl* CSSParser::parseBackgroundSize()
if (value->id == CSS_VAL_AUTO)
parsedValue1 = new CSSPrimitiveValueImpl(0, CSSPrimitiveValue::CSS_UNKNOWN);
else {
if (!validUnit(value, FLength|FPercent, strict))
if (!validUnit(value, FLength|FPercent|FNonNeg, strict))
return 0;
parsedValue1 = new CSSPrimitiveValueImpl(value->fValue, (CSSPrimitiveValue::UnitTypes)value->unit);
}
......@@ -1833,7 +1833,7 @@ CSSValueImpl* CSSParser::parseBackgroundSize()
if (value->id == CSS_VAL_AUTO)
parsedValue2 = new CSSPrimitiveValueImpl(0, CSSPrimitiveValue::CSS_UNKNOWN);
else {
if (!validUnit(value, FLength|FPercent, strict)) {
if (!validUnit(value, FLength|FPercent|FNonNeg, strict)) {
delete parsedValue1;
return 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment