if (values.size() == 1) {
PropertyValue value = (PropertyValue)values.get(0);
if (value.getCssValueType() == CSSValue.CSS_INHERIT) {
return Collections.EMPTY_LIST;
} else if (value.getPrimitiveType() == CSSPrimitiveValue.CSS_IDENT) {
IdentValue ident = checkIdent(CSSName.CONTENT, value);
if (ident == IdentValue.NONE || ident == IdentValue.NORMAL) {
return Collections.singletonList(
new PropertyDeclaration(CSSName.CONTENT, value, important, origin));
}
}
}
List resultValues = new ArrayList();
for (Iterator i = values.iterator(); i.hasNext(); ) {
PropertyValue value = (PropertyValue)i.next();
if (value.getOperator() != null) {
throw new CSSParseException(
"Found unexpected operator, " + value.getOperator().getExternalName(), -1);
}
short type = value.getPrimitiveType();
if (type == CSSPrimitiveValue.CSS_URI) {
continue;
} else if (type == CSSPrimitiveValue.CSS_STRING) {
resultValues.add(value);
} else if (value.getPropertyValueType() == PropertyValue.VALUE_TYPE_FUNCTION) {
if (! isFunctionAllowed(value.getFunction())) {
throw new CSSParseException(
"Function " + value.getFunction().getName() + " is not allowed here", -1);
}
resultValues.add(value);
} else if (type == CSSPrimitiveValue.CSS_IDENT) {
IdentValue ident = checkIdent(CSSName.CONTENT, value);
if (ident == IdentValue.OPEN_QUOTE || ident == IdentValue.CLOSE_QUOTE ||
ident == IdentValue.NO_CLOSE_QUOTE || ident == IdentValue.NO_OPEN_QUOTE) {
resultValues.add(value);
} else {
throw new CSSParseException(