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

2002/css-validator/org/w3c/css/properties/css1 Css1Style.java,1.33,1.34

From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
Date: Fri, 07 Sep 2012 14:55:27 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1T9zxv-0003v9-1J@lionel-hutz.w3.org>
Update of /sources/public/2002/css-validator/org/w3c/css/properties/css1
In directory hutz:/tmp/cvs-serv15037/properties/css1

Modified Files:
	Css1Style.java 
Log Message:
first pass at adding units depending on CSS level (including the absolute/relative check

Index: Css1Style.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css1/Css1Style.java,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- Css1Style.java	4 Sep 2012 09:37:39 -0000	1.33
+++ Css1Style.java	7 Sep 2012 14:55:24 -0000	1.34
@@ -19,6 +19,7 @@
 import org.w3c.css.properties.css.CssTextIndent;
 
 import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.util.Util;
 import org.w3c.css.util.Warning;
 import org.w3c.css.util.Warnings;
@@ -33,1763 +34,1760 @@
  */
 public class Css1Style extends CssStyle {
 
[...3326 lines suppressed...]
+				break;
+			case CssTypes.CSS_LENGTH:
+				try {
+					CssLength length = value.getLength();
+					// 0 is always 0, no need to check
+					if (!length.isZero()) {
+						if (length.isAbsolute()) {
+							absolute = true;
+						} else {
+							relative = true;
+						}
+					}
+				} catch (InvalidParamException ipe) {
+				}
+				break;
+			default:
+				/* should never happen */
+		}
+	}
 }
Received on Friday, 7 September 2012 14:55:31 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:51 UTC