- From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 09 Mar 2009 21:12:02 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/properties/css1 In directory hutz:/tmp/cvs-serv25325 Modified Files: CssColorCSS1.java Log Message: using CssTypes Index: CssColorCSS1.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css1/CssColorCSS1.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- CssColorCSS1.java 14 Sep 2005 15:14:31 -0000 1.4 +++ CssColorCSS1.java 9 Mar 2009 21:12:00 -0000 1.5 @@ -11,6 +11,7 @@ import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; import org.w3c.css.values.CssIdent; +import org.w3c.css.values.CssTypes; import org.w3c.css.values.CssValue; /** @@ -56,16 +57,18 @@ throw new InvalidParamException("unrecognize", ac); } - if (val instanceof org.w3c.css.values.CssColor) { + switch (val.getType()) { + case CssTypes.CSS_COLOR: color = val; - expression.next(); - } else if (val instanceof CssIdent) { + break; + case CssTypes.CSS_IDENT: color = new org.w3c.css.values.CssColorCSS1(ac, (String) val.get()); - expression.next(); - } else { + break; + default: throw new InvalidParamException("value", expression.getValue(), getPropertyName(), ac); } + expression.next(); } public CssColorCSS1(ApplContext ac, CssExpression expression)
Received on Monday, 9 March 2009 21:12:18 UTC