2002/css-validator/org/w3c/css/properties/css1 CssColor.java,1.4,1.5

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

Modified Files:
	CssColor.java 
Log Message:
HSL parsing now done in the same place as RGB and RGBA


Index: CssColor.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css1/CssColor.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- CssColor.java	5 Mar 2009 18:01:54 -0000	1.4
+++ CssColor.java	5 Mar 2009 22:46:18 -0000	1.5
@@ -104,38 +104,9 @@
 		color = tempcolor;
 		expression.next();
 	    } else if (attr.getName().equals("hsl")) {
-		Vector hslValues = new Vector();
-		char op;
-
-		CssValue v1 = params.getValue();
-		op = params.getOperator();
-		if (v1 == null || op != COMMA) {
-		    throw new InvalidParamException("invalid-color", ac);
-		}
-		hslValues.addElement(v1);
-		params.next();
-
-		CssValue v2 = params.getValue();
-		op = params.getOperator();
-		if (v2 == null || op != COMMA) {
-		    throw new InvalidParamException("invalid-color", ac);
-		}
-		hslValues.addElement(v2);
-		params.next();
-
-		CssValue v3 = params.getValue();
-		if (v3 == null) {
-		    throw new InvalidParamException("invalid-color", ac);
-		}
-		hslValues.addElement(v3);
-
-		params.starts(); // set position back to the first value
-
-		tempcolor.setHSLColor(hslValues, ac);
-		params.ends();
+		tempcolor.setHSLColor(params, ac);
 		color = tempcolor;
 		expression.next();
-
 	    } else if (attr.getName().equals("hsla")) {
 
 		Vector hslaValues = new Vector();

Received on Thursday, 5 March 2009 22:46:28 UTC