2002/css-validator/org/w3c/css/properties/css3 CssPaddingCSS3.java,1.3,1.4

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

Modified Files:
	CssPaddingCSS3.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: CssPaddingCSS3.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssPaddingCSS3.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssPaddingCSS3.java	14 Sep 2005 15:15:04 -0000	1.3
+++ CssPaddingCSS3.java	19 Apr 2006 11:28:06 -0000	1.4
@@ -90,17 +90,17 @@
 	switch (expression.getCount()) {
 	case 1:
 	    top = new CssPaddingTopCSS3(ac, expression, check);
-	    bottom = new CssPaddingBottomCSS3(top);
+	    /*bottom = new CssPaddingBottomCSS3(top);
 	    right = new CssPaddingRightCSS3(top);
-	    left = new CssPaddingLeftCSS3(top);
+	    left = new CssPaddingLeftCSS3(top);*/
 	    break;
 	case 2:
 	    if (expression.getOperator() != SPACE)
 		return;
 	    top = new CssPaddingTopCSS3(ac, expression, check);
 	    right = new CssPaddingRightCSS3(ac, expression, check);
-	    bottom = new CssPaddingBottomCSS3(top);
-	    left = new CssPaddingLeftCSS3(right);
+	    /*bottom = new CssPaddingBottomCSS3(top);
+	    left = new CssPaddingLeftCSS3(right);*/
 	    break;
 	case 3:
 	    if (expression.getOperator() != SPACE)
@@ -110,7 +110,7 @@
 		return;
 	    right = new CssPaddingRightCSS3(ac, expression, check);
 	    bottom = new CssPaddingBottomCSS3(ac, expression, check);
-	    left = new CssPaddingLeftCSS3(right);
+	    //left = new CssPaddingLeftCSS3(right);
 	    break;
 	case 4:
 	    if (expression.getOperator() != SPACE)
@@ -182,7 +182,14 @@
 	if (inheritedValue) {
 	    return inherit.toString();
 	}
-	if (right.value.equals(left.value)) {
+        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.value.equals(left.value)) {
 	    if (top.value.equals(bottom.value)) {
 		if (top.value.equals(right.value)) {
 		    return top.toString();
@@ -194,7 +201,7 @@
 	    }
 	} else {
 	    return top + " " + right + " " + bottom + " " + left;
-	}
+	}*/
     }
 
     /**
@@ -226,10 +233,10 @@
      * @param style The CssStyle
      */
     public void addToStyle(ApplContext ac, CssStyle style) {
-	top.addToStyle(ac, style);
-	right.addToStyle(ac, style);
-	bottom.addToStyle(ac, style);
-	left.addToStyle(ac, style);
+	if (top != null) top.addToStyle(ac, style);
+	if (right != null) right.addToStyle(ac, style);
+	if (bottom != null) bottom.addToStyle(ac, style);
+	if (left != null) left.addToStyle(ac, style);
     }
 
     /**
@@ -255,10 +262,10 @@
      */
     public void setInfo(int line, String source) {
 	super.setInfo(line, source);
-	top.setInfo(line, source);
-	right.setInfo(line, source);
-	bottom.setInfo(line, source);
-	left.setInfo(line, source);
+	if (top != null) top.setInfo(line, source);
+	if (right != null) right.setInfo(line, source);
+	if (bottom != null) bottom.setInfo(line, source);
+	if (left != null) left.setInfo(line, source);
     }
 
     /**

Received on Wednesday, 19 April 2006 11:28:17 UTC