W3C home > Mailing lists > Public > www-validator-cvs@w3.org > August 2012

2002/css-validator/org/w3c/css/properties/css21 CssFontFamily.java,1.3,1.4

From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
Date: Thu, 30 Aug 2012 09:10:59 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1T70mB-0006AX-BE@lionel-hutz.w3.org>
Update of /sources/public/2002/css-validator/org/w3c/css/properties/css21
In directory hutz:/tmp/cvs-serv23620/css21

Modified Files:
	CssFontFamily.java 
Log Message:
font family parsing was eating one extra ident

Index: CssFontFamily.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css21/CssFontFamily.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssFontFamily.java	28 Aug 2012 19:44:04 -0000	1.3
+++ CssFontFamily.java	30 Aug 2012 09:10:57 -0000	1.4
@@ -9,6 +9,7 @@
 import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssIdent;
+import org.w3c.css.values.CssLayerList;
 import org.w3c.css.values.CssTypes;
 import org.w3c.css.values.CssValue;
 
@@ -134,8 +135,8 @@
 					ArrayList<CssIdent> idval = new ArrayList<CssIdent>();
 					idval.add((CssIdent) val);
 					// we add idents if separated by spaces...
-					expression.next();
 					while (op == SPACE && !expression.end()) {
+						expression.next();
 						op = expression.getOperator();
 						val = expression.getValue();
 						if (val.getType() == CssTypes.CSS_IDENT) {
@@ -144,7 +145,6 @@
 							throw new InvalidParamException("value", val,
 									getPropertyName(), ac);
 						}
-						expression.next();
 					}
 					checkExpression(ac, values, idval, check);
 					break;
@@ -159,7 +159,7 @@
 			}
 		}
 		checkValues(ac, values);
-		value = (values.size() > 1) ? values : values.get(0);
+		value = (values.size() > 1) ? new CssLayerList(values) : values.get(0);
 	}
 
 	public CssFontFamily(ApplContext ac, CssExpression expression)
Received on Thursday, 30 August 2012 09:11:05 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:51 UTC