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

2002/css-validator/org/w3c/css/properties/atsc CssBorderColorATSC.java,1.3,1.4 CssBorderStyleATSC.java,1.3,1.4 CssBorderWidthATSC.java,1.3,1.4

From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 19 Apr 2006 11:28:07 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1FWAqt-0005i0-TD@lionel-hutz.w3.org>

Update of /sources/public/2002/css-validator/org/w3c/css/properties/atsc
In directory hutz:/tmp/cvs-serv26855/org/w3c/css/properties/atsc

Modified Files:
	CssBorderColorATSC.java CssBorderStyleATSC.java 
	CssBorderWidthATSC.java 
Log Message:
Jean-Gui strikes back!
http://www.w3.org/Bugs/Public/show_bug.cgi?id=2560 -> @media case insensitive
http://www.w3.org/Bugs/Public/show_bug.cgi?id=3037 -> grammar correction
http://www.w3.org/Bugs/Public/show_bug.cgi?id=2920
http://www.w3.org/Bugs/Public/show_bug.cgi?id=2800
http://www.w3.org/Bugs/Public/show_bug.cgi?id=233
http://www.w3.org/Bugs/Public/show_bug.cgi?id=2919
http://www.w3.org/Bugs/Public/show_bug.cgi?id=2446
http://www.w3.org/Bugs/Public/show_bug.cgi?id=3099

output parameter bug fixed:
        accepted values :
            * text/html and html
            * application/xhtml+xml and xhtml
            * application/soap+xml and soap12
            * everything else: text/plain

fixed a bug with SOAP output



Index: CssBorderStyleATSC.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/atsc/CssBorderStyleATSC.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssBorderStyleATSC.java	14 Sep 2005 15:14:18 -0000	1.3
+++ CssBorderStyleATSC.java	19 Apr 2006 11:28:05 -0000	1.4
@@ -121,9 +121,9 @@
 	switch (expression.getCount()) {
 	case 1:
 	    top = new CssBorderTopStyleATSC(ac, expression);
-	    bottom = new CssBorderBottomStyleATSC((CssBorderFaceStyleATSC) top.get());
+	    /*bottom = new CssBorderBottomStyleATSC((CssBorderFaceStyleATSC) top.get());
 	    right = new CssBorderRightStyleATSC((CssBorderFaceStyleATSC) top.get());
-	    left = new CssBorderLeftStyleATSC((CssBorderFaceStyleATSC) top.get());
+	    left = new CssBorderLeftStyleATSC((CssBorderFaceStyleATSC) top.get());*/
 	    break;
 	case 2:
 	    if (expression.getOperator() != SPACE)
@@ -138,8 +138,8 @@
 		throw new InvalidParamException("unrecognize", ac);
 	    }
 	    right = new CssBorderRightStyleATSC(ac, expression);
-	    bottom = new CssBorderBottomStyleATSC((CssBorderFaceStyleATSC) top.get());
-	    left = new CssBorderLeftStyleATSC((CssBorderFaceStyleATSC) right.get());
+	    /*bottom = new CssBorderBottomStyleATSC((CssBorderFaceStyleATSC) top.get());
+	    left = new CssBorderLeftStyleATSC((CssBorderFaceStyleATSC) right.get());*/
 	    break;
 	case 3:
 	    if (expression.getOperator() != SPACE)
@@ -162,7 +162,7 @@
 		throw new InvalidParamException("unrecognize", ac);
 	    }
 	    bottom = new CssBorderBottomStyleATSC(ac, expression);
-	    left = new CssBorderLeftStyleATSC((CssBorderFaceStyleATSC) right.get());
+	    //left = new CssBorderLeftStyleATSC((CssBorderFaceStyleATSC) right.get());
 	    break;
 	case 4:
 	    if (expression.getOperator() != SPACE)
@@ -224,7 +224,14 @@
      * Returns a string representation of the object.
      */
     public String toString() {
-	if (right.face.equals(left.face)) {
+        String result = "";
+        // top should never be null
+        if(top != null) result += top;
+        if(right != null) result += " " + right;
+        if(bottom != null) result += " " + bottom;
+        if(left != null) result += " " + left;
+        return result;
+	/*if (right.face.equals(left.face)) {
 	    if (top.face.equals(bottom.face)) {
 		if (top.face.equals(right.face)) {
 		    return top.toString();
@@ -236,7 +243,7 @@
 	    }
 	} else {
 	    return top + " " + right + " " + bottom + " " + left;
-	}
+	}*/
     }
 
     /**
@@ -244,10 +251,10 @@
      * Overrides this method for a macro
      */
     public void setImportant() {
-	top.setImportant();
-	right.setImportant();
-	left.setImportant();
-	bottom.setImportant();
+	if(top != null) top.setImportant();
+	if(right != null) right.setImportant();
+	if(left != null) left.setImportant();
+	if(bottom != null) bottom.setImportant();
     }
 
     /**
@@ -319,10 +326,10 @@
      * @param style The CssStyle
      */
     public void addToStyle(ApplContext ac, CssStyle style) {
-	top.addToStyle(ac, style);
-	right.addToStyle(ac, style);
-	left.addToStyle(ac, style);
-	bottom.addToStyle(ac, style);
+	if(top != null) top.addToStyle(ac, style);
+	if(right != null) right.addToStyle(ac, style);
+	if(left != null) left.addToStyle(ac, style);
+	if(bottom != null) bottom.addToStyle(ac, style);
     }
 
     /**
@@ -345,10 +352,10 @@
      */
     public void setInfo(int line, String source) {
 	super.setInfo(line, source);
-	top.setInfo(line, source);
-	right.setInfo(line, source);
-	left.setInfo(line, source);
-	bottom.setInfo(line, source);
+	if(top != null) top.setInfo(line, source);
+	if(right != null) right.setInfo(line, source);
+	if(left != null) left.setInfo(line, source);
+	if(bottom != null) bottom.setInfo(line, source);
     }
 
     /**

Index: CssBorderWidthATSC.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/atsc/CssBorderWidthATSC.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssBorderWidthATSC.java	14 Sep 2005 15:14:18 -0000	1.3
+++ CssBorderWidthATSC.java	19 Apr 2006 11:28:05 -0000	1.4
@@ -89,9 +89,9 @@
 	switch (expression.getCount()) {
 	case 1:
 	    top = new CssBorderTopWidthATSC(ac, expression);
-	    bottom = new CssBorderBottomWidthATSC((CssBorderFaceWidthATSC) top.get());
+	    /*bottom = new CssBorderBottomWidthATSC((CssBorderFaceWidthATSC) top.get());
 	    right = new CssBorderRightWidthATSC((CssBorderFaceWidthATSC) top.get());
-	    left = new CssBorderLeftWidthATSC((CssBorderFaceWidthATSC) top.get());
+	    left = new CssBorderLeftWidthATSC((CssBorderFaceWidthATSC) top.get());*/
 	    break;
 	case 2:
 	    if (expression.getOperator() != SPACE)
@@ -106,8 +106,8 @@
 		throw new InvalidParamException("unrecognize", ac);
 	    }
 	    right = new CssBorderRightWidthATSC(ac, expression);
-	    bottom = new CssBorderBottomWidthATSC((CssBorderFaceWidthATSC) top.get());
-	    left = new CssBorderLeftWidthATSC((CssBorderFaceWidthATSC) right.get());
+	    /*bottom = new CssBorderBottomWidthATSC((CssBorderFaceWidthATSC) top.get());
+	    left = new CssBorderLeftWidthATSC((CssBorderFaceWidthATSC) right.get());*/
 	    break;
 	case 3:
 	    if (expression.getOperator() != SPACE)
@@ -130,7 +130,7 @@
 		throw new InvalidParamException("unrecognize", ac);
 	    }
 	    bottom = new CssBorderBottomWidthATSC(ac, expression);
-	    left = new CssBorderLeftWidthATSC((CssBorderFaceWidthATSC) right.get());
+	    //left = new CssBorderLeftWidthATSC((CssBorderFaceWidthATSC) right.get());
 	    break;
 	case 4:
 	    if (expression.getOperator() != SPACE)
@@ -192,7 +192,14 @@
      * Returns a string representation of the object.
      */
     public String toString() {
-	if (right.face.equals(left.face)) {
+        String result = "";
+        // top should never be null
+        if(top != null) result += top;
+        if(right != null) result += " " + right;
+        if(bottom != null) result += " " + bottom;
+        if(left != null) result += " " + left;
+        return result;
+	/*if (right.face.equals(left.face)) {
 	    if (top.face.equals(bottom.face)) {
 		if (top.face.equals(right.face)) {
 		    return top.toString();
@@ -204,7 +211,7 @@
 	    }
 	} else {
 	    return top + " " + right + " " + bottom + " " + left;
-	}
+	}*/
     }
 
     /**

Index: CssBorderColorATSC.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/atsc/CssBorderColorATSC.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssBorderColorATSC.java	14 Sep 2005 15:14:18 -0000	1.3
+++ CssBorderColorATSC.java	19 Apr 2006 11:28:05 -0000	1.4
@@ -94,9 +94,9 @@
 		expression.next();
 	    } else{*/
 	    top = new CssBorderTopColorATSC(ac, expression);
-	    bottom = new CssBorderBottomColorATSC((CssBorderFaceColorATSC) top.get());
+	    /*bottom = new CssBorderBottomColorATSC((CssBorderFaceColorATSC) top.get());
 	    right = new CssBorderRightColorATSC((CssBorderFaceColorATSC) top.get());
-	    left = new CssBorderLeftColorATSC((CssBorderFaceColorATSC) top.get());
+	    left = new CssBorderLeftColorATSC((CssBorderFaceColorATSC) top.get());*/
 	    break;
 	case 2:
 	    if (expression.getOperator() != SPACE)
@@ -111,8 +111,8 @@
 		throw new InvalidParamException("unrecognize", ac);
 	    }
 	    right = new CssBorderRightColorATSC(ac, expression);
-	    bottom = new CssBorderBottomColorATSC((CssBorderFaceColorATSC) top.get());
-	    left = new CssBorderLeftColorATSC((CssBorderFaceColorATSC) right.get());
+	    /*bottom = new CssBorderBottomColorATSC((CssBorderFaceColorATSC) top.get());
+	    left = new CssBorderLeftColorATSC((CssBorderFaceColorATSC) right.get());*/
 	    break;
 	case 3:
 	    if (expression.getOperator() != SPACE)
@@ -134,7 +134,7 @@
 		throw new InvalidParamException("unrecognize", ac);
 	    }
 	    bottom = new CssBorderBottomColorATSC(ac, expression);
-	    left = new CssBorderLeftColorATSC((CssBorderFaceColorATSC) right.get());
+	    //left = new CssBorderLeftColorATSC((CssBorderFaceColorATSC) right.get());
 	    break;
 	case 4:
 	    if (expression.getOperator() != SPACE)
@@ -196,7 +196,14 @@
      * Returns a string representation of the object.
      */
     public String toString() {
-	if (right.face.equals(left.face)) {
+        String result = "";
+        // top should never be null
+        if(top != null) result += top;
+        if(right != null) result += " " + right;
+        if(bottom != null) result += " " + bottom;
+        if(left != null) result += " " + left;
+        return result;
+	/*if (right.face.equals(left.face)) {
 	    if (top.face.equals(bottom.face)) {
 		if (top.face.equals(right.face)) {
 		    return top.toString();
@@ -208,7 +215,7 @@
 	    }
 	} else {
 	    return top + " " + right + " " + bottom + " " + left;
-	}
+	}*/
     }
 
     /**
Received on Wednesday, 19 April 2006 11:28:15 GMT

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