- From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 04 Apr 2012 14:21:13 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/properties/css3
In directory hutz:/tmp/cvs-serv25644/css/properties/css3
Modified Files:
CssBoxShadow.java
Log Message:
extra check for ordering
Index: CssBoxShadow.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssBoxShadow.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- CssBoxShadow.java 4 Apr 2012 13:58:57 -0000 1.4
+++ CssBoxShadow.java 4 Apr 2012 14:21:10 -0000 1.5
@@ -177,6 +177,12 @@
}
if (inset.equals(ident)) {
value.shadow_mod = inset;
+ // inset can be first or last
+ if ((value.color != null || got_length != 0) &&
+ expression.getRemainingCount() != 1) {
+ // so we got a color, but no length, that's not valid
+ throw new InvalidParamException("unrecognize", ac);
+ }
break;
}
// if not a known ident, it must be a color
@@ -188,6 +194,9 @@
break;
case CssTypes.CSS_COLOR:
case CssTypes.CSS_FUNCTION:
+ if (got_length != 0) {
+ length_ok = false;
+ }
// this one is a pain... need to remove function for colors.
CssExpression fexp = new CssExpression();
fexp.addValue(val);
Received on Wednesday, 4 April 2012 14:21:20 UTC