[Minor fix] Invalid TYPE attribute makes UL look like OL

This commit is contained in:
janekptacijarabaci
2017-03-31 18:40:55 +02:00
committed by roytam1
parent 6266f6e4ba
commit 356552a1ff
4 changed files with 25 additions and 5 deletions
+2 -5
View File
@@ -98,11 +98,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);
}
}
}
+10
View File
@@ -5513,6 +5513,16 @@
"ref_url": "/html/rendering/non-replaced-elements/flow-content-0/figure-ref.html",
"url": "/html/rendering/non-replaced-elements/flow-content-0/figure.html"
},
{
"ref_type": "==",
"ref_url": "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-ref.html",
"url": "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-invalid.html"
},
{
"ref_type": "==",
"ref_url": "/html/rendering/non-replaced-elements/lists/ul-type-unsupported-ref.html",
"url": "/html/rendering/non-replaced-elements/lists/ul-type-unsupported-invalid.html"
},
{
"ref_type": "==",
"ref_url": "/html/rendering/non-replaced-elements/tables/table-border-1-ref.html",
@@ -0,0 +1,6 @@
<!doctype html>
<meta charset=utf-8>
<title>ol@type: unsupported type: invalid</title>
<link rel=match href=ol-type-unsupported-ref.html>
<ol type=disk><li>1<li>2</ol>
<ol type=DISK><li>1<li>2</ol>
@@ -0,0 +1,7 @@
<!doctype html>
<meta charset=utf-8>
<title>ul@type: unsupported type: invalid</title>
<link rel=match href=ul-type-unsupported-ref.html>
<ul type=disk><li>first item</li><li>second item</li></ul>
<ul type=DISK><li>first item</li><li>second item</li></ul>
<ul type=x><li>first item</li><li>second item</li></ul>