List result = checkInheritAll(ALL, values, origin, important, inheritAllowed);
if (result != null) {
return result;
}
PropertyDeclaration listStyleType = null;
PropertyDeclaration listStylePosition = null;
PropertyDeclaration listStyleImage = null;
for (Iterator i = values.iterator(); i.hasNext(); ) {
PropertyValue value = (PropertyValue)i.next();
checkInheritAllowed(value, false);
short type = value.getPrimitiveType();
if (type == CSSPrimitiveValue.CSS_IDENT) {
IdentValue ident = checkIdent(CSSName.LIST_STYLE_SHORTHAND, value);
if (ident == IdentValue.NONE) {
if (listStyleType == null) {
listStyleType = new PropertyDeclaration(
CSSName.LIST_STYLE_TYPE, value, important, origin);
}
if (listStyleImage == null) {
listStyleImage = new PropertyDeclaration(
CSSName.LIST_STYLE_IMAGE, value, important, origin);
}
} else if (PrimitivePropertyBuilders.LIST_STYLE_POSITIONS.get(ident.FS_ID)) {
if (listStylePosition != null) {
throw new CSSParseException("A list-style-position value cannot be set twice", -1);
}
listStylePosition = new PropertyDeclaration(
CSSName.LIST_STYLE_POSITION, value, important, origin);
} else if (PrimitivePropertyBuilders.LIST_STYLE_TYPES.get(ident.FS_ID)) {
if (listStyleType != null) {
throw new CSSParseException("A list-style-type value cannot be set twice", -1);
}
listStyleType = new PropertyDeclaration(
CSSName.LIST_STYLE_TYPE, value, important, origin);
}
} else if (type == CSSPrimitiveValue.CSS_URI) {
if (listStyleImage != null) {
throw new CSSParseException("A list-style-image value cannot be set twice", -1);
}
listStyleImage = new PropertyDeclaration(
CSSName.LIST_STYLE_IMAGE, value, important, origin);
}
}
result = new ArrayList(3);