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

CVS 2002/css-validator/org/w3c/css/properties/css2

From: CVS User ylafon <cvsmail@w3.org>
Date: Mon, 30 Sep 2013 01:06:17 +0000
Message-Id: <E1VQRwH-0004ob-VA@roscoe.w3.org>
To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/properties/css2
In directory roscoe:/tmp/cvs-serv18509/css2

Modified Files:
	CssZIndex.java 
Log Message:
using new CssNumber functions

--- /sources/public/2002/css-validator/org/w3c/css/properties/css2/CssZIndex.java	2012/08/15 20:10:09	1.2
+++ /sources/public/2002/css-validator/org/w3c/css/properties/css2/CssZIndex.java	2013/09/30 01:06:17	1.3
@@ -1,4 +1,4 @@
-// $Id: CssZIndex.java,v 1.2 2012/08/15 20:10:09 ylafon Exp $
+// $Id: CssZIndex.java,v 1.3 2013/09/30 01:06:17 ylafon Exp $
 // From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
 //
 // (c) COPYRIGHT MIT, ERCIM and Keio, 1997-2010.
@@ -11,7 +11,6 @@
 import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssTypes;
 import org.w3c.css.values.CssValue;
 
@@ -20,70 +19,68 @@
  */
 public class CssZIndex extends org.w3c.css.properties.css.CssZIndex {
 
-    /**
-     * Create a new CssZIndex
-     */
-    public CssZIndex() {
-        value = auto;
-    }
-
-    /**
-     * Create a new CssZIndex
-     *
-     * @param ac    The context
-     * @param expression The expression for this property
-     * @param check      true will test the number of parameters
-     * @throws org.w3c.css.util.InvalidParamException The expression is incorrect
-     */
-    public CssZIndex(ApplContext ac, CssExpression expression, boolean check)
-            throws InvalidParamException {
-
-        if (check && expression.getCount() > 1) {
-            throw new InvalidParamException("unrecognize", ac);
-        }
-
-        CssValue val = expression.getValue();
-
-        setByUser();
-        switch (val.getType()) {
-            case CssTypes.CSS_NUMBER:
-                if (((CssNumber) val).isInteger()) {
-                    value = val;
-                    break;
-                }
-                throw new InvalidParamException("integer",
-                    val.toString(),
-                    getPropertyName(), ac);
-            case CssTypes.CSS_IDENT:
-                CssIdent ide = (CssIdent) val;
-                if (inherit.equals(ide)) {
-                    value = inherit;
-                    break;
-                } else if (auto.equals(ide)) {
-                    value = auto;
-                    break;
-                }
-            default:
-                throw new InvalidParamException("value", expression.getValue(),
-                        getPropertyName(), ac);
-        }
-        expression.next();
-    }
-
-    /**
-     * Create a new CssZIndex
-     *
-     * @param ac, the Context
-     * @param expression The expression for this property
-     * @throws org.w3c.css.util.InvalidParamException The expression is incorrect
-     */
-    public CssZIndex(ApplContext ac, CssExpression expression)
-            throws InvalidParamException {
-        this(ac, expression, false);
-    }
-
-    public boolean isDefault() {
-        return (auto == value);
-    }
+	/**
+	 * Create a new CssZIndex
+	 */
+	public CssZIndex() {
+		value = auto;
+	}
+
+	/**
+	 * Create a new CssZIndex
+	 *
+	 * @param ac         The context
+	 * @param expression The expression for this property
+	 * @param check      true will test the number of parameters
+	 * @throws org.w3c.css.util.InvalidParamException
+	 *          The expression is incorrect
+	 */
+	public CssZIndex(ApplContext ac, CssExpression expression, boolean check)
+			throws InvalidParamException {
+
+		if (check && expression.getCount() > 1) {
+			throw new InvalidParamException("unrecognize", ac);
+		}
+
+		CssValue val = expression.getValue();
+
+		setByUser();
+		switch (val.getType()) {
+			case CssTypes.CSS_NUMBER:
+				val.getNumber().checkInteger(ac, this);
+				value = val;
+				break;
+			case CssTypes.CSS_IDENT:
+				CssIdent ide = (CssIdent) val;
+				if (inherit.equals(ide)) {
+					value = inherit;
+					break;
+				} else if (auto.equals(ide)) {
+					value = auto;
+					break;
+				}
+			default:
+				throw new InvalidParamException("value", expression.getValue(),
+						getPropertyName(), ac);
+		}
+		expression.next();
+	}
+
+	/**
+	 * Create a new CssZIndex
+	 *
+	 * @param ac,        the Context
+	 * @param expression The expression for this property
+	 * @throws org.w3c.css.util.InvalidParamException
+	 *          The expression is incorrect
+	 */
+	public CssZIndex(ApplContext ac, CssExpression expression)
+			throws InvalidParamException {
+		this(ac, expression, false);
+	}
+
+	public boolean isDefault() {
+		return (auto == value);
+	}
 
 }
Received on Monday, 30 September 2013 01:06:18 UTC

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