Bug 241719 part 1 - Do not override list-style-type if the list element has invalid type value. r=dbaron

--HG--
extra : source : 473ac4a4346979ae833bd554ca91b8edaed179a2
This commit is contained in:
Xidorn Quan 2015-12-31 10:50:05 +11:00
Родитель 97c98e952d
Коммит 2e61569cb2
1 изменённых файлов: 2 добавлений и 5 удалений

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

@ -99,11 +99,8 @@ HTMLSharedListElement::MapAttributesIntoRule(const nsMappedAttributes* aAttribut
if (listStyleType->GetUnit() == eCSSUnit_Null) {
// type: enum
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::type);
if (value) {
if (value->Type() == nsAttrValue::eEnum)
listStyleType->SetIntValue(value->GetEnumValue(), eCSSUnit_Enumerated);
else
listStyleType->SetIntValue(NS_STYLE_LIST_STYLE_DECIMAL, eCSSUnit_Enumerated);
if (value && value->Type() == nsAttrValue::eEnum) {
listStyleType->SetIntValue(value->GetEnumValue(), eCSSUnit_Enumerated);
}
}
}