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

2002/css-validator/org/w3c/css/properties/css1 CssFont.java,1.6,1.7 CssFontCSS1.java,1.6,1.7 CssFontCSS2.java,1.7,1.8

From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 03 Apr 2012 14:20:56 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1SF4bQ-0004kg-FP@lionel-hutz.w3.org>
Update of /sources/public/2002/css-validator/org/w3c/css/properties/css1
In directory hutz:/tmp/cvs-serv18166/w3c/css/properties/css1

Modified Files:
	CssFont.java CssFontCSS1.java CssFontCSS2.java 
Log Message:
prepared to replace '/' instances from 'Operator' as in CSS2 to a 'switch' per css3. adapted some classes because of that (expect breakage on font before it's rewritten), fixed 'background' to be in sync with the http://www.w3.org/TR/2012/WD-css3-background-20120214/ spec

Index: CssFontCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css1/CssFontCSS1.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- CssFontCSS1.java	9 Sep 2011 12:16:44 -0000	1.6
+++ CssFontCSS1.java	3 Apr 2012 14:20:54 -0000	1.7
@@ -11,12 +11,7 @@
 import org.w3c.css.properties.css.CssProperty;
 import org.w3c.css.util.ApplContext;
 import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.values.CssLength;
-import org.w3c.css.values.CssOperator;
-import org.w3c.css.values.CssPercentage;
-import org.w3c.css.values.CssValue;
+import org.w3c.css.values.*;
 
 /**
  *   <H4>
@@ -190,8 +185,10 @@
 
 	fontSize = new CssFontSizeCSS1(ac, expression);
 
-	if (op == SLASH) {
-	    op = expression.getOperator();
+    if (val.getType() == CssTypes.CSS_SWITCH) {
+        expression.next();
+        val = expression.getValue();
+        op = expression.getOperator();
 	    lineHeight = new CssLineHeightCSS1(ac, expression);
 	}
 
@@ -337,7 +334,7 @@
     /**
      * Compares two properties for equality.
      *
-     * @param value The other property.
+     * @param property The other property.
      */
     public boolean equals(CssProperty property) {
 	return false;

Index: CssFontCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css1/CssFontCSS2.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- CssFontCSS2.java	9 Feb 2012 17:36:29 -0000	1.7
+++ CssFontCSS2.java	3 Apr 2012 14:20:54 -0000	1.8
@@ -11,12 +11,7 @@
 import org.w3c.css.properties.css.CssProperty;
 import org.w3c.css.util.ApplContext;
 import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.values.CssLength;
-import org.w3c.css.values.CssOperator;
-import org.w3c.css.values.CssPercentage;
-import org.w3c.css.values.CssValue;
+import org.w3c.css.values.*;
 
 /**
  * <H4>
@@ -208,9 +203,11 @@
 
         fontSize = new CssFontSizeCSS2(ac, expression);
 
-        if (op == SLASH) {
+        if (val.getType() == CssTypes.CSS_SWITCH) {
+            expression.next();
+            val = expression.getValue();
             op = expression.getOperator();
-            if (expression.getValue().equals(inherit)) {
+            if (val.equals(inherit)) {
                 throw new InvalidParamException("unrecognize", ac);
             }
             lineHeight = new CssLineHeightCSS2(ac, expression);

Index: CssFont.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css1/CssFont.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- CssFont.java	9 Sep 2011 12:16:44 -0000	1.6
+++ CssFont.java	3 Apr 2012 14:20:54 -0000	1.7
@@ -11,12 +11,7 @@
 import org.w3c.css.properties.css.CssProperty;
 import org.w3c.css.util.ApplContext;
 import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.values.CssLength;
-import org.w3c.css.values.CssOperator;
-import org.w3c.css.values.CssPercentage;
-import org.w3c.css.values.CssValue;
+import org.w3c.css.values.*;
 
 /**
  *   <H4>
@@ -210,7 +205,9 @@
 
 	fontSize = new CssFontSize(ac, expression);
 
-	if (op == SLASH) {
+    if (val.getType() == CssTypes.CSS_SWITCH) {
+        expression.next();
+        val = expression.getValue();
 	    op = expression.getOperator();
 	    if(expression.getValue().equals(inherit)) {
 		throw new InvalidParamException("unrecognize", ac);
@@ -364,7 +361,7 @@
     /**
      * Compares two properties for equality.
      *
-     * @param value The other property.
+     * @param property The other property.
      */
     public boolean equals(CssProperty property) {
 	return false;
Received on Tuesday, 3 April 2012 14:21:02 UTC

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