- From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 30 Aug 2012 17:03:36 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/properties/css3 In directory hutz:/tmp/cvs-serv21160/css3 Modified Files: CssTextShadow.java Log Message: color can be last... or first Index: CssTextShadow.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssTextShadow.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- CssTextShadow.java 29 Aug 2012 10:09:51 -0000 1.1 +++ CssTextShadow.java 30 Aug 2012 17:03:34 -0000 1.2 @@ -120,13 +120,9 @@ while (!exp.end()) { val = exp.getValue(); // color is last, so if we reach this, we are in error - if (color != null) { - throw new InvalidParamException("value", - val, getPropertyName(), ac); - } if (val.getType() == CssTypes.CSS_NUMBER) { // case of 0, a number and a length - val = ((CssNumber)val).getLength(); + val = ((CssNumber) val).getLength(); } if (val.getType() == CssTypes.CSS_LENGTH) { values.add(val); @@ -134,6 +130,13 @@ } else { CssColor c = new CssColor(ac, exp, false); color = c.getColor(); + // color can be first or last in CSS2 + if (values.size() > 0 && exp.getRemainingCount() != 0) { + if (color != null) { + throw new InvalidParamException("value", + val, getPropertyName(), ac); + } + } // no need for exp.next() as CssColor parsing is // already doing that. }
Received on Thursday, 30 August 2012 17:03:37 UTC