W3C home > Mailing lists > Public > www-validator-cvs@w3.org > December 2009

2002/css-validator/org/w3c/css/properties/css3 CssColumnRuleWidth.java,1.2,1.3

From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
Date: Thu, 17 Dec 2009 17:12:45 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1NLJu9-0007Fm-Qs@lionel-hutz.w3.org>
Update of /sources/public/2002/css-validator/org/w3c/css/properties/css3
In directory hutz:/tmp/cvs-serv27831/org/w3c/css/properties/css3

Modified Files:
	CssColumnRuleWidth.java 
Log Message:
column-rule-width uses CSS21 definition

Index: CssColumnRuleWidth.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssColumnRuleWidth.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssColumnRuleWidth.java	14 Sep 2005 15:15:04 -0000	1.2
+++ CssColumnRuleWidth.java	17 Dec 2009 17:12:43 -0000	1.3
@@ -9,7 +9,7 @@
 package org.w3c.css.properties.css3;
 
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.properties.css1.CssBorderWidth;
+import org.w3c.css.properties.css1.CssBorderFaceWidthCSS2;
 import org.w3c.css.properties.css1.CssProperty;
 import org.w3c.css.util.ApplContext;
 import org.w3c.css.util.InvalidParamException;
@@ -17,18 +17,19 @@
 import org.w3c.css.values.CssValue;
 
 /**
+ * http://www.w3.org/TR/css3-multicol/
  *  <P>
- *  <EM>Value:</EM> &lt;border-width&gt; || inherit<BR>
+ *  <EM>Value:</EM> &lt;border-width&gt;<BR>
  *  <EM>Initial:</EM>medium<BR>
- *  <EM>Applies to:</EM>block-level elements<BR>
+ *  <EM>Applies to:</EM>multicol elements<BR>
  *  <EM>Inherited:</EM>no<BR>
- *  <EM>Percentages:</EM>no<BR>
+ *  <EM>Percentages:</EM>N/A<BR>
  *  <EM>Media:</EM>:visual
  */
 
 public class CssColumnRuleWidth extends CssProperty {
 
-    CssBorderWidth value;
+    CssBorderFaceWidthCSS2 value;
 
     /**
      * Create a new CssColumnRuleWidth
@@ -49,11 +50,13 @@
 	setByUser();
 	CssValue val = expression.getValue();
 
-	try {
-	    value = new CssBorderWidth(ac, expression);
-	    expression.next();
+	if (check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
 	}
-	catch (InvalidParamException e) {
+
+	try {
+	    value = new CssBorderFaceWidthCSS2(ac, expression);
+	} catch (InvalidParamException e) {
 	    throw new InvalidParamException("value",
 					    expression.getValue(),
 					    getPropertyName(), ac);
@@ -105,21 +108,21 @@
      * Returns the name of this property
      */
     public String getPropertyName() {
-	return "column-border-width";
+	return "column-rule-width";
     }
 
     /**
      * Returns the value of this property
      */
     public Object get() {
-	return value;
+	return value.getValue();
     }
 
     /**
      * Returns true if this property is "softly" inherited
      */
     public boolean isSoftlyInherited() {
-	return value.equals(inherit);
+	return inherit.equals(value.getValue());
     }
 
     /**
Received on Thursday, 17 December 2009 17:15:56 GMT

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