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

2002/css-validator/org/w3c/css/values CssAngle.java,1.14,1.15 CssCheckableValue.java,1.4,1.5 CssFrequency.java,1.11,1.12 CssLength.java,1.17,1.18 CssNumber.java,1.19,1.20 CssPercentage.java,1.14,1.15 CssTime.java,1.11,1.12 CssValue.java,1.8,1.9

From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 03 Oct 2012 09:49:20 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1TJLZw-0005RV-GX@lionel-hutz.w3.org>
Update of /sources/public/2002/css-validator/org/w3c/css/values
In directory hutz:/tmp/cvs-serv20801/values

Modified Files:
	CssAngle.java CssCheckableValue.java CssFrequency.java 
	CssLength.java CssNumber.java CssPercentage.java CssTime.java 
	CssValue.java 
Log Message:
added transition-duration and transntion-delay per http://www.w3.org/TR/2012/WD-css3-transitions-20120403/

Index: CssValue.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/values/CssValue.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- CssValue.java	6 Sep 2012 12:37:58 -0000	1.8
+++ CssValue.java	3 Oct 2012 09:49:18 -0000	1.9
@@ -65,4 +65,8 @@
 	public CssNumber getNumber() throws InvalidParamException {
 		throw new ClassCastException("unknown");
 	}
+
+	public CssTime getTime() throws InvalidParamException {
+		throw new ClassCastException("unknown");
+	}
 }

Index: CssCheckableValue.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/values/CssCheckableValue.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- CssCheckableValue.java	21 Sep 2012 14:16:26 -0000	1.4
+++ CssCheckableValue.java	3 Oct 2012 09:49:18 -0000	1.5
@@ -24,6 +24,7 @@
 	abstract void checkStrictPositiveness(ApplContext ac, CssProperty property)
 			throws InvalidParamException;
 
+	abstract void warnPositiveness(ApplContext ac, CssProperty property);
 
 	public boolean isInteger() {
 		return false;

Index: CssTime.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/values/CssTime.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- CssTime.java	28 Sep 2012 18:37:56 -0000	1.11
+++ CssTime.java	3 Oct 2012 09:49:18 -0000	1.12
@@ -122,7 +122,7 @@
 	 */
 	public String toString() {
 		if (BigDecimal.ZERO.compareTo(value) == 0) {
-			return value.toPlainString();
+			return value.toPlainString() + 's';
 		}
 		return value.toPlainString() + unit;
 	}
@@ -191,6 +191,18 @@
 	}
 
 	/**
+	 * warn if the value is not positive or null
+	 *
+	 * @param ac       the validation context
+	 * @param property the property the value is defined in
+	 */
+	public void warnPositiveness(ApplContext ac, CssProperty property) {
+		if (!isPositive()) {
+			ac.getFrame().addWarning("negative", toString());
+		}
+	}
+
+	/**
 	 * check if the value is strictly positive
 	 *
 	 * @param ac       the validation context
@@ -204,5 +216,9 @@
 					toString(), property.getPropertyName(), ac);
 		}
 	}
+
+	public CssTime getTime() throws InvalidParamException {
+		return this;
+	}
 }
 

Index: CssNumber.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/values/CssNumber.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- CssNumber.java	1 Oct 2012 14:09:49 -0000	1.19
+++ CssNumber.java	3 Oct 2012 09:49:18 -0000	1.20
@@ -287,4 +287,16 @@
 					toString(), property.getPropertyName(), ac);
 		}
 	}
+
+	/**
+	 * warn if the value is not positive or null
+	 *
+	 * @param ac       the validation context
+	 * @param property the property the value is defined in
+	 */
+	public void warnPositiveness(ApplContext ac, CssProperty property) {
+		if (!isPositive()) {
+			ac.getFrame().addWarning("negative", toString());
+		}
+	}
 }

Index: CssFrequency.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/values/CssFrequency.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- CssFrequency.java	28 Sep 2012 18:37:56 -0000	1.11
+++ CssFrequency.java	3 Oct 2012 09:49:18 -0000	1.12
@@ -203,5 +203,17 @@
 					toString(), property.getPropertyName(), ac);
 		}
 	}
+
+	/**
+	 * warn if the value is not positive or null
+	 *
+	 * @param ac       the validation context
+	 * @param property the property the value is defined in
+	 */
+	public void warnPositiveness(ApplContext ac, CssProperty property) {
+		if (!isPositive()) {
+			ac.getFrame().addWarning("negative", toString());
+		}
+	}
 }
 

Index: CssPercentage.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/values/CssPercentage.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- CssPercentage.java	28 Sep 2012 18:37:56 -0000	1.14
+++ CssPercentage.java	3 Oct 2012 09:49:18 -0000	1.15
@@ -198,4 +198,16 @@
 					toString(), property.getPropertyName(), ac);
 		}
 	}
+
+	/**
+	 * warn if the value is not positive or null
+	 *
+	 * @param ac       the validation context
+	 * @param property the property the value is defined in
+	 */
+	public void warnPositiveness(ApplContext ac, CssProperty property) {
+		if (!isPositive()) {
+			ac.getFrame().addWarning("negative", toString());
+		}
+	}
 }

Index: CssAngle.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/values/CssAngle.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- CssAngle.java	28 Sep 2012 18:37:56 -0000	1.14
+++ CssAngle.java	3 Oct 2012 09:49:18 -0000	1.15
@@ -227,5 +227,17 @@
 					toString(), property.getPropertyName(), ac);
 		}
 	}
+
+	/**
+	 * warn if the value is not positive or null
+	 *
+	 * @param ac       the validation context
+	 * @param property the property the value is defined in
+	 */
+	public void warnPositiveness(ApplContext ac, CssProperty property) {
+		if (!isPositive()) {
+			ac.getFrame().addWarning("negative", toString());
+		}
+	}
 }
 

Index: CssLength.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/values/CssLength.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- CssLength.java	28 Sep 2012 18:37:56 -0000	1.17
+++ CssLength.java	3 Oct 2012 09:49:18 -0000	1.18
@@ -290,5 +290,16 @@
 		}
 	}
 
+	/**
+	 * warn if the value is not positive or null
+	 *
+	 * @param ac       the validation context
+	 * @param property the property the value is defined in
+	 */
+	public void warnPositiveness(ApplContext ac, CssProperty property) {
+		if (!isPositive()) {
+			ac.getFrame().addWarning("negative", toString());
+		}
+	}
 }
 
Received on Wednesday, 3 October 2012 09:49:21 UTC

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