W3C home > Mailing lists > Public > www-validator-cvs@w3.org > March 2008

2002/css-validator/org/w3c/css/properties/css21 CssBackgroundCSS21.java,1.2,1.3

From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
Date: Mon, 17 Mar 2008 18:23:15 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1JbJzP-0002Ih-Lr@lionel-hutz.w3.org>

Update of /sources/public/2002/css-validator/org/w3c/css/properties/css21
In directory hutz:/tmp/cvs-serv8812

Modified Files:
	CssBackgroundCSS21.java 
Log Message:
CssString not allowed as a value


Index: CssBackgroundCSS21.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css21/CssBackgroundCSS21.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBackgroundCSS21.java	14 Sep 2005 15:14:58 -0000	1.2
+++ CssBackgroundCSS21.java	17 Mar 2008 18:23:13 -0000	1.3
@@ -12,6 +12,7 @@
 import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssValue;
+import org.w3c.css.values.CssString;
 
 /**
  * CssBackgroundCSS21<br />
@@ -34,7 +35,7 @@
     public CssBackgroundCSS21(ApplContext ac, CssExpression expression,
 	    boolean check) throws InvalidParamException {
 
-	CssValue val = expression.getValue();
+	CssValue val;
 	char op = SPACE;
 	boolean find = true;
 
@@ -60,6 +61,9 @@
 	    if(manyValues && val != null && val.equals(inherit)) {
 		throw new InvalidParamException("unrecognize", null, null, ac);
 	    }
+	    if(check && (val instanceof CssString)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 
 	    if (getColor2() == null) {
 		try {
Received on Monday, 17 March 2008 18:23:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:55:00 GMT