Commit 6ac87911 authored by Andrea Iacovitti's avatar Andrea Iacovitti

Background-size parsing fix: If only one value is given the second is assumed to be ‘auto’.

parent 9f372807
......@@ -1826,7 +1826,7 @@ CSSValueImpl* CSSParser::parseBackgroundSize()
parsedValue1 = new CSSPrimitiveValueImpl(value->fValue, (CSSPrimitiveValue::UnitTypes)value->unit);
}
CSSPrimitiveValueImpl* parsedValue2 = parsedValue1;
CSSPrimitiveValueImpl* parsedValue2;
if ((value = valueList->next())) {
if (value->id == CSS_VAL_AUTO)
parsedValue2 = new CSSPrimitiveValueImpl(0, CSSPrimitiveValue::CSS_UNKNOWN);
......@@ -1837,6 +1837,8 @@ CSSValueImpl* CSSParser::parseBackgroundSize()
}
parsedValue2 = new CSSPrimitiveValueImpl(value->fValue, (CSSPrimitiveValue::UnitTypes)value->unit);
}
} else {
parsedValue2 = new CSSPrimitiveValueImpl(0, CSSPrimitiveValue::CSS_UNKNOWN);
}
PairImpl* pair = new PairImpl(parsedValue1, parsedValue2);
......
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