W3C home > Mailing lists > Public > www-validator-cvs@w3.org > September 2011

2002/css-validator/org/w3c/css/properties/css21 CssAzimuth.java,1.4,1.5

From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 14 Sep 2011 15:04:50 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1R3r18-0006Ya-V0@lionel-hutz.w3.org>
Update of /sources/public/2002/css-validator/org/w3c/css/properties/css21
In directory hutz:/tmp/cvs-serv25172/properties/css21

Modified Files:
	CssAzimuth.java 
Log Message:
CSS21 actually allows 0, but clarification form the CSS WG has been requested

Index: CssAzimuth.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css21/CssAzimuth.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- CssAzimuth.java	11 Sep 2011 20:30:23 -0000	1.4
+++ CssAzimuth.java	14 Sep 2011 15:04:48 -0000	1.5
@@ -11,6 +11,7 @@
 import org.w3c.css.values.CssAngle;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssIdent;
+import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssOperator;
 import org.w3c.css.values.CssTypes;
 import org.w3c.css.values.CssValue;
@@ -92,6 +93,11 @@
         setByUser();
 
         switch (val.getType()) {
+            case CssTypes.CSS_NUMBER:
+                // find out if we can create an angle out of that value
+                // (ie: equal 0)
+                // per http://www.w3.org/TR/2011/REC-CSS2-20110607/aural.html#angles
+                val = ((CssNumber) val).getAngle();
             case CssTypes.CSS_ANGLE:
                 if (check && expression.getCount() > 1) {
                     throw new InvalidParamException("unrecognize", ac);
Received on Wednesday, 14 September 2011 15:04:52 GMT

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