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

2002/css-validator/org/w3c/css/properties/css3 CssColumnCount.java,1.8,1.9 CssColumnFill.java,1.5,1.6 CssColumnGap.java,1.7,1.8 CssColumnRule.java,1.8,1.9 CssColumnRuleColor.java,1.7,1.8 CssColumnRuleStyle.java,1.9,1.10 CssColumnRuleWidth.java,1.7,1.8 CssColumnSpan.java,1.9,1.10 CssColumnWidth.java,1.9,1.10 CssColumns.java,1.5,1.6

From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
Date: Sun, 23 Oct 2011 14:42:34 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1RHzFy-0002hP-QS@lionel-hutz.w3.org>
Update of /sources/public/2002/css-validator/org/w3c/css/properties/css3
In directory hutz:/tmp/cvs-serv10361/org/w3c/css/properties/css3

Modified Files:
	CssColumnCount.java CssColumnFill.java CssColumnGap.java 
	CssColumnRule.java CssColumnRuleColor.java 
	CssColumnRuleStyle.java CssColumnRuleWidth.java 
	CssColumnSpan.java CssColumnWidth.java CssColumns.java 
Log Message:
proper use of check for shorthand property using other property's constructors

Index: CssColumnRuleColor.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssColumnRuleColor.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- CssColumnRuleColor.java	21 Oct 2011 18:08:43 -0000	1.7
+++ CssColumnRuleColor.java	23 Oct 2011 14:42:32 -0000	1.8
@@ -41,7 +41,7 @@
         setByUser();
         CssValue val = expression.getValue();
 
-        if (expression.getCount() > 1) {
+        if (check && expression.getCount() > 1) {
             throw new InvalidParamException("unrecognize", ac);
         }
         if (inherit.equals(val)) {

Index: CssColumnFill.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssColumnFill.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- CssColumnFill.java	21 Oct 2011 18:08:43 -0000	1.5
+++ CssColumnFill.java	23 Oct 2011 14:42:32 -0000	1.6
@@ -57,7 +57,7 @@
         setByUser();
         CssValue val = expression.getValue();
 
-        if (expression.getCount() > 1) {
+        if (check && expression.getCount() > 1) {
             throw new InvalidParamException("unrecognize", ac);
         }
 

Index: CssColumnWidth.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssColumnWidth.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- CssColumnWidth.java	21 Oct 2011 18:08:43 -0000	1.9
+++ CssColumnWidth.java	23 Oct 2011 14:42:32 -0000	1.10
@@ -20,11 +20,12 @@
 
 /**
  * @spec http://www.w3.org/TR/2011/CR-css3-multicol-20110412/#column-width
- *
  */
 
 public class CssColumnWidth extends org.w3c.css.properties.css.CssColumnWidth {
 
+    private static final String propertyName = "column-width";
+
     CssValue width;
 
     static CssIdent auto;
@@ -44,7 +45,8 @@
      * Create a new CssColumnWidth
      *
      * @param expression The expression for this property
-     * @throws org.w3c.css.util.InvalidParamException Incorrect value
+     * @throws org.w3c.css.util.InvalidParamException
+     *          Incorrect value
      */
     public CssColumnWidth(ApplContext ac, CssExpression expression,
                           boolean check) throws InvalidParamException {
@@ -53,7 +55,7 @@
         CssValue val = expression.getValue();
         Float value;
 
-        if (expression.getCount() > 1) {
+        if (check && expression.getCount() > 1) {
             throw new InvalidParamException("unrecognize", ac);
         }
 

Index: CssColumns.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssColumns.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- CssColumns.java	21 Oct 2011 18:08:43 -0000	1.5
+++ CssColumns.java	23 Oct 2011 14:42:32 -0000	1.6
@@ -22,7 +22,7 @@
 /**
  * @spec http://www.w3.org/TR/2011/CR-css3-multicol-20110412/#columns
  *
- * @see CssColumnWidth
+ * @see org.w3c.css.properties.css3.CssColumnWidth
  * @see org.w3c.css.properties.css3.CssColumnCount
  */
 
@@ -56,7 +56,7 @@
         int nb_val = expression.getCount();
         int nb_auto = 0;
 
-        if (nb_val > 2) {
+        if (check && nb_val > 2) {
             throw new InvalidParamException("unrecognize", ac);
         }
         setByUser();

Index: CssColumnSpan.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssColumnSpan.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- CssColumnSpan.java	21 Oct 2011 18:08:43 -0000	1.9
+++ CssColumnSpan.java	23 Oct 2011 14:42:32 -0000	1.10
@@ -30,7 +30,7 @@
     static CssIdent all;
 
     static {
-        all = new CssIdent("all");
+        all = CssIdent.getIdent("all");
     }
 
     /**
@@ -45,7 +45,8 @@
      * Create a new CssColumnSpan
      *
      * @param expression The expression for this property
-     * @throws org.w3c.css.util.InvalidParamException Values are incorrect
+     * @throws org.w3c.css.util.InvalidParamException
+     *          Values are incorrect
      */
     public CssColumnSpan(ApplContext ac, CssExpression expression,
                          boolean check) throws InvalidParamException {
@@ -53,7 +54,7 @@
         setByUser(); // tell this property is set by the user
         CssValue val = expression.getValue();
 
-        if (expression.getCount() > 1) {
+        if (check && expression.getCount() > 1) {
             throw new InvalidParamException("unrecognize", ac);
         }
 

Index: CssColumnRule.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssColumnRule.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- CssColumnRule.java	21 Oct 2011 18:08:43 -0000	1.8
+++ CssColumnRule.java	23 Oct 2011 14:42:32 -0000	1.9
@@ -49,7 +49,7 @@
         char op;
         int nb_val = expression.getCount();
 
-        if (nb_val > 3) {
+        if (check && nb_val > 3) {
             throw new InvalidParamException("unrecognize", ac);
         }
         setByUser();

Index: CssColumnCount.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssColumnCount.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- CssColumnCount.java	21 Oct 2011 18:08:42 -0000	1.8
+++ CssColumnCount.java	23 Oct 2011 14:42:32 -0000	1.9
@@ -38,7 +38,8 @@
      * Create a new CssColumnCount
      *
      * @param expression The expression for this property
-     * @throws org.w3c.css.util.InvalidParamException Incorrect value
+     * @throws org.w3c.css.util.InvalidParamException
+     *          Incorrect value
      */
     public CssColumnCount(ApplContext ac, CssExpression expression,
                           boolean check) throws InvalidParamException {
@@ -47,7 +48,7 @@
         CssValue val = expression.getValue();
         CssNumber num;
 
-        if (expression.getCount() > 1) {
+        if (check && expression.getCount() > 1) {
             throw new InvalidParamException("unrecognize", ac);
         }
 

Index: CssColumnRuleWidth.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssColumnRuleWidth.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- CssColumnRuleWidth.java	21 Oct 2011 18:08:43 -0000	1.7
+++ CssColumnRuleWidth.java	23 Oct 2011 14:42:32 -0000	1.8
@@ -44,7 +44,7 @@
         setByUser();
         CssValue val = expression.getValue();
 
-        if (expression.getCount() > 1) {
+        if (check && expression.getCount() > 1) {
             throw new InvalidParamException("unrecognize", ac);
         }
 

Index: CssColumnRuleStyle.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssColumnRuleStyle.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- CssColumnRuleStyle.java	21 Oct 2011 18:08:43 -0000	1.9
+++ CssColumnRuleStyle.java	23 Oct 2011 14:42:32 -0000	1.10
@@ -21,7 +21,6 @@
 
 /**
  * @spec http://www.w3.org/TR/2011/CR-css3-multicol-20110412/#column-rule-style
- *
  */
 
 public class CssColumnRuleStyle extends org.w3c.css.properties.css.CssColumnRuleStyle {
@@ -49,7 +48,7 @@
         setByUser();
         CssValue val = expression.getValue();
         // too many values
-        if (expression.getCount() > 1) {
+        if (check && expression.getCount() > 1) {
             throw new InvalidParamException("unrecognize", ac);
         }
         // we only use Css Ident part of the CssBorderStyle acceptable values

Index: CssColumnGap.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssColumnGap.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- CssColumnGap.java	21 Oct 2011 18:08:43 -0000	1.7
+++ CssColumnGap.java	23 Oct 2011 14:42:32 -0000	1.8
@@ -48,7 +48,7 @@
         CssValue val = expression.getValue();
         Float value;
 
-        if (expression.getCount() > 1) {
+        if (check && expression.getCount() > 1) {
             throw new InvalidParamException("unrecognize", ac);
         }
 
Received on Sunday, 23 October 2011 14:42:41 UTC

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