for (Iterator i = values.iterator(); i.hasNext(); ) {
PropertyValue value = (PropertyValue)i.next();
Token operator = value.getOperator();
if (operator != null && operator != Token.TK_COMMA) {
throw new CSSParseException("Invalid font-family definition", -1);
}
if (operator != null) {
if (consecutiveIdents.size() > 0) {
normalized.add(concat(consecutiveIdents, ' '));
consecutiveIdents.clear();
}
}
checkInheritAllowed(value, false);
short type = value.getPrimitiveType();
if (type == CSSPrimitiveValue.CSS_STRING) {
if (consecutiveIdents.size() > 0) {
normalized.add(concat(consecutiveIdents, ' '));
consecutiveIdents.clear();
}
normalized.add(value.getStringValue());
} else if (type == CSSPrimitiveValue.CSS_IDENT) {
consecutiveIdents.add(value.getStringValue());
} else {
throw new CSSParseException("Invalid font-family definition", -1);
}
}
if (consecutiveIdents.size() > 0) {
normalized.add(concat(consecutiveIdents, ' '));
}