2002/css-validator/org/w3c/css/properties/css CssBackground.java,1.1,1.2 CssBackgroundAttachment.java,1.1,1.2 CssBackgroundColor.java,1.1,1.2 CssBackgroundOrigin.java,1.1,1.2 CssBackgroundPosition.java,1.1,1.2 CssBackgroundRepeat.java,1.1,1.2 CssBackgroundSize.java,1.1,1.2 CssBreakAfter.java,1.1,1.2 CssBreakBefore.java,1.1,1.2 CssBreakInside.java,1.1,1.2 CssColumnFill.java,1.1,1.2 CssColumnRuleColor.java,1.1,1.2 CssColumnSpan.java,1.1,1.2 CssDisplay.java,1.1,1.2

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

Modified Files:
	CssBackground.java CssBackgroundAttachment.java 
	CssBackgroundColor.java CssBackgroundOrigin.java 
	CssBackgroundPosition.java CssBackgroundRepeat.java 
	CssBackgroundSize.java CssBreakAfter.java CssBreakBefore.java 
	CssBreakInside.java CssColumnFill.java CssColumnRuleColor.java 
	CssColumnSpan.java CssDisplay.java 
Log Message:
fix for background-attachment inheritance + background-color CSS3 + starting wrk on background + encoding of some files

Index: CssBreakBefore.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css/CssBreakBefore.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CssBreakBefore.java	5 Jan 2010 13:49:37 -0000	1.1
+++ CssBreakBefore.java	5 Jan 2010 19:49:50 -0000	1.2
@@ -48,7 +48,7 @@
     private static final String propertyName = "break-before";
 
     static CssIdent auto;
-    static HashMap<String, CssIdent> allowed_values;
+    private static HashMap<String, CssIdent> allowed_values;
 
     CssIdent value;
 

Index: CssBackgroundRepeat.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css/CssBackgroundRepeat.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CssBackgroundRepeat.java	5 Jan 2010 13:49:37 -0000	1.1
+++ CssBackgroundRepeat.java	5 Jan 2010 19:49:50 -0000	1.2
@@ -44,8 +44,8 @@
 
     private static final String propertyName = "background-repeat";
     public static CssIdent repeat;
-    public static HashMap<String, CssIdent> allowed_simple_values;
-    public static HashMap<String, CssIdent> allowed_double_values;
+    private static HashMap<String, CssIdent> allowed_simple_values;
+    private static HashMap<String, CssIdent> allowed_double_values;
 
     static {
         allowed_simple_values = new HashMap<String, CssIdent>();

Index: CssBreakInside.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css/CssBreakInside.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CssBreakInside.java	5 Jan 2010 13:49:37 -0000	1.1
+++ CssBreakInside.java	5 Jan 2010 19:49:50 -0000	1.2
@@ -47,7 +47,7 @@
     private static final String propertyName = "break-inside";
 
     static CssIdent auto;
-    static HashMap<String, CssIdent> allowed_values;
+    private static HashMap<String, CssIdent> allowed_values;
 
     CssIdent value;
 

Index: CssColumnFill.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css/CssColumnFill.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CssColumnFill.java	5 Jan 2010 13:49:38 -0000	1.1
+++ CssColumnFill.java	5 Jan 2010 19:49:50 -0000	1.2
@@ -26,7 +26,7 @@
  * balanced, or not. If columns are balanced, UAs should minimize the variation
  * in column length. Otherwise, columns are filled sequentially and will
  * therefore end up having different lengths. In any case, the user agent
- * should try to honor the ÔwidowsÕ and ÔorphansÕ properties.
+ * should try to honor the �widows� and �orphans� properties.
  * <p/>
  * Name: 	column-fill
  * Value: 	auto | balance
@@ -45,7 +45,7 @@
     CssIdent value;
 
     static CssIdent balance;
-    public static HashMap<String, CssIdent> allowed_values;
+    private static HashMap<String, CssIdent> allowed_values;
 
     static {
         balance = CssIdent.getIdent("balance");

Index: CssDisplay.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css/CssDisplay.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CssDisplay.java	5 Jan 2010 13:49:38 -0000	1.1
+++ CssDisplay.java	5 Jan 2010 19:49:50 -0000	1.2
@@ -27,7 +27,7 @@
 
     public CssIdent value;
     public static CssIdent inline;
-    public static HashMap<String, CssIdent> allowed_values;
+    private static HashMap<String, CssIdent> allowed_values;
 
     static {
         allowed_values = new HashMap<String, CssIdent>();

Index: CssBackground.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css/CssBackground.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CssBackground.java	5 Jan 2010 13:49:37 -0000	1.1
+++ CssBackground.java	5 Jan 2010 19:49:50 -0000	1.2
@@ -1,8 +1,8 @@
-//
 // $Id$
 // From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
-//
-// (c) COPYRIGHT MIT and INRIA, 1997.
+// Rewritten 2010 Yves Lafon <ylafon@w3.org>
+
+// (c) COPYRIGHT MIT, ERCIM and Keio, 1997-2010.
 // Please first read the full copyright statement in file COPYRIGHT.html
 package org.w3c.css.properties.css;
 
@@ -10,52 +10,54 @@
 import org.w3c.css.parser.CssSelectors;
 import org.w3c.css.parser.CssStyle;
 import org.w3c.css.properties.css1.Css1Style;
-import org.w3c.css.properties.css.CssBackgroundSize;
 import org.w3c.css.util.ApplContext;
 import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssOperator;
 import org.w3c.css.values.CssValue;
+import org.w3c.css.values.CssValueList;
+
+import static org.w3c.css.values.CssOperator.SLASH;
+import static org.w3c.css.values.CssOperator.SPACE;
 
 /**
- * <H4>
- * <A NAME="background">5.3.7 &nbsp;&nbsp; 'background'</A>
- * </H4>
+ * http://www.w3.org/TR/2009/CR-css3-background-20091217/#the-background
  * <p/>
- * <EM>Value:</EM> &lt;background-color&gt; || &lt;background-image&gt; ||
- * &lt;background-repeat&gt; || &lt;background-attachment&gt; ||
- * &lt;background-position&gt;<BR>
- * <EM>Initial:</EM> not defined for shorthand properties<BR>
- * <EM>Applies to:</EM> all elements<BR>
- * <EM>Inherited:</EM> no<BR>
- * <EM>Percentage values:</EM> allowed on &lt;background-position&gt;<BR>
+ * Name: 	background
+ * Value: 	[ &lt;bg-layer&gt; , ]* &lt;final-bg-layer&gt;
+ * Initial: 	see individual properties
+ * Applies to: 	all elements
+ * Inherited: 	no
+ * Percentages: 	see individual properties
+ * Media: 	visual
+ * Computed value: 	see individual properties
  * <p/>
- * The 'background' property is a shorthand property for setting the individual
- * background properties (i.e., 'background-color', 'background-image',
- * 'background-repeat', 'background-attachment' and 'background-position') at
- * the same place in the style sheet.
+ * Where
  * <p/>
- * Possible values on the 'background' properties are the set of all possible
- * values on the individual properties.
- * <PRE>
- * BODY { background: red }
- * P { background: url(chess.png) gray 50% repeat fixed }
- * </PRE>
- * <P> The 'background' property always sets all the individual background
- * properties.  In the first rule of the above example, only a value for
- * 'background-color' has been given and the other individual properties are
- * set to their initial value. In the second rule, all individual properties
- * have been specified.
+ * &lt;bg-layer&gt; = &lt;bg-image&gt; || &lt;bg-position&gt; ||
+ * / &lt;bg-size&gt; || &lt;repeat-style&gt; || &lt;attachment&gt; ||
+ * &lt;bg-origin&gt;
+ * <p/>
+ * where ‘&lt;bg-position&gt;’ must occur before ‘/ &lt;bg-size&gt;’ if both
+ * are present.
+ * <p/>
+ * &lt;final-bg-layer&gt; = &lt;bg-image&gt; || &lt;bg-position&gt; ||
+ * / &lt;bg-size&gt; || &lt;repeat-style&gt; || &lt;attachment&gt; ||
+ * &lt;bg-origin&gt; || &lt;'background-color'&gt;
+ * <p/>
+ * where ‘&lt;bg-position&gt;’ must not occur before ‘/ &lt;bg-size&gt;’ if
+ * both are present.
+ * <p/>
+ * Note that a color is permitted in &lt;final-bg-layer&gt;, but
+ * not in &lt;bg-layer&gt;.
  *
- * @version $Revision$
  * @see CssBackgroundColor
  * @see CssBackgroundImage
  * @see CssBackgroundRepeat
  * @see CssBackgroundAttachment
  * @see CssBackgroundPosition
+ * @see CssBackgroundSize
  */
-public class CssBackground extends CssProperty
-        implements CssOperator, CssBackgroundConstants {
+public class CssBackground extends CssProperty {
 
     public CssBackgroundColor color;
     public CssBackgroundImage image;
@@ -112,6 +114,7 @@
             val = expression.getValue();
             op = expression.getOperator();
 
+            expression.next();
             if (val == null) {
                 break;
             }
@@ -427,4 +430,51 @@
         }
     }
 
+    // placeholder for the different values
+
+    public class CssBackgroundValue extends CssValueList {
+
+        CssValue bg_image = null;
+        CssValue bg_position = null;
+        CssValue bg_size = null;
+        CssValue repeat_style = null;
+        CssValue attachment = null;
+        CssValue origin = null;
+        CssValue color = null;
+
+        public boolean equals(CssBackgroundValue v) {
+            return false;
+        }
+
+        public String toString() {
+            StringBuilder sb = new StringBuilder();
+            if (bg_image != null) {
+                sb.append(bg_image).append(' ');
+            }
+            if (bg_position != null) {
+                sb.append(bg_position).append(' ');
+            }
+            if (bg_size != null) {
+                sb.append('/').append(bg_size).append(' ');
+            }
+            if (repeat_style != null) {
+                sb.append(repeat_style).append(' ');
+            }
+            if (attachment != null) {
+                sb.append(attachment).append(' ');
+            }
+            if (origin != null) {
+                sb.append(origin).append(' ');
+            }
+            if (color != null) {
+                sb.append(color);
+            } else {
+                int sb_length = sb.length();
+                if (sb_length > 0) {
+                    sb.setLength(sb_length - 1);
+                }
+            }
+            return sb.toString();
+        }
+    }
 }

Index: CssBackgroundPosition.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css/CssBackgroundPosition.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CssBackgroundPosition.java	5 Jan 2010 13:49:37 -0000	1.1
+++ CssBackgroundPosition.java	5 Jan 2010 19:49:50 -0000	1.2
@@ -60,8 +60,8 @@
 
     private static final String propertyName = "background-position";
 
-    public static HashMap<String, CssIdent> allowed_values;
-    public static CssIdent center, top, bottom, left, right;
+    private static HashMap<String, CssIdent> allowed_values;
+    private static CssIdent center, top, bottom, left, right;
     private static CssPercentage defaultPercent0, defaultPercent50;
     private static CssPercentage defaultPercent100;
 
@@ -290,7 +290,7 @@
                 switch (nb_values) {
                     case 1:
                         // If only one value is specified, the second value
-                        // is assumed to be ÔcenterÕ.
+                        // is assumed to be �center�.
                         v.horizontal = v.value.get(0);
                         if (v.horizontal.getType() == CssTypes.CSS_NUMBER) {
                             v.horizontal = defaultPercent0;

Index: CssColumnSpan.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css/CssColumnSpan.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CssColumnSpan.java	5 Jan 2010 13:49:38 -0000	1.1
+++ CssColumnSpan.java	5 Jan 2010 19:49:50 -0000	1.2
@@ -1,8 +1,8 @@
-//
 // $Id$
 // From Sijtsche de Jong (sy.de.jong@let.rug.nl)
-//
-// (c) COPYRIGHT 1995-2009 
+// Rewritten 2010 Yves Lafon <ylafon@w3.org>
+
+// (c) COPYRIGHT 1995-2010
 // World Wide Web Consortium (MIT, ERCIM, Keio University)
 //
 // Please first read the full copyright statement at
@@ -11,7 +11,6 @@
 package org.w3c.css.properties.css;
 
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.properties.css.CssProperty;
 import org.w3c.css.properties.css3.Css3Style;
 import org.w3c.css.util.ApplContext;
 import org.w3c.css.util.InvalidParamException;
@@ -22,14 +21,18 @@
 import org.w3c.css.values.CssValue;
 
 /**
- * From http://www.w3.org/TR/css3-multicol
- *  <P>
- *  <EM>Value:</EM> 1 ||  all <BR>
- *  <EM>Initial:</EM>1<BR>
- *  <EM>Applies to:</EM>static, non-floating elements<BR>
- *  <EM>Inherited:</EM>no<BR>
- *  <EM>Percentages:</EM>N/A<BR>
- *  <EM>Media:</EM>:visual
+ * http://www.w3.org/TR/2009/CR-css3-multicol-20091217/#column-span
+ *
+ * Name:  	column-span
+ * Value: 	1 | all
+ * Initial: 	1
+ * Applies to: 	static, non-floating elements
+ * Inherited: 	no
+ * Percentages: 	N/A
+ * Media: 	visual
+ * Computed value: 	as specified
+ *
+ * This property describes how many columns an element spans across.
  */
 
 public class CssColumnSpan extends CssProperty {
@@ -38,56 +41,60 @@
     ApplContext ac;
 
     static CssIdent all;
+    static CssNumber one;
+
     static {
-	all = new CssIdent("all");
+        all = new CssIdent("all");
+        one = new CssNumber(1);
     }
 
     /**
      * Create a new CssColumnSpan
      */
     public CssColumnSpan() {
-	//nothing to do
+        value = one;
+
     }
 
     /**
      * Create a new CssColumnSpan
      *
      * @param expression The expression for this property
-     * @exception InvalidParamException Values are incorrect
+     * @throws InvalidParamException Values are incorrect
      */
     public CssColumnSpan(ApplContext ac, CssExpression expression,
-	    boolean check) throws InvalidParamException {
-	this.ac = ac;
-	setByUser(); // tell this property is set by the user
-	CssValue val = expression.getValue();
+                         boolean check) throws InvalidParamException {
+        this.ac = ac;
+        setByUser(); // tell this property is set by the user
+        CssValue val = expression.getValue();
 
-	switch (val.getType()) {
-	case CssTypes.CSS_NUMBER:
-	    int ival = ((CssNumber) val).getInt();
-	    if (ival != 1) {
-		throw new InvalidParamException("value", val.toString(),
-						getPropertyName(), ac);
-	    }
-	    value = val;
-	    break;
-	case CssTypes.CSS_IDENT:
-	    if (all.equals(val)) {
-		value = all;
-		break;
-	    }
-	    if (inherit.equals(val)) {
-		value = inherit;
-		break;
-	    }
-	default:
-	    throw new InvalidParamException("value", val.toString(),
-					    getPropertyName(), ac);
-	}
+        switch (val.getType()) {
+            case CssTypes.CSS_NUMBER:
+                int ival = ((CssNumber) val).getInt();
+                if (ival != 1) {
+                    throw new InvalidParamException("value", val.toString(),
+                            getPropertyName(), ac);
+                }
+                value = one;
+                break;
+            case CssTypes.CSS_IDENT:
+                if (all.equals(val)) {
+                    value = all;
+                    break;
+                }
+                if (inherit.equals(val)) {
+                    value = inherit;
+                    break;
+                }
+            default:
+                throw new InvalidParamException("value", val.toString(),
+                        getPropertyName(), ac);
+        }
     }
 
     public CssColumnSpan(ApplContext ac, CssExpression expression)
-    throws InvalidParamException {
-	this(ac, expression, false);
+            throws InvalidParamException {
+        this(ac, expression, false);
     }
 
     /**
@@ -96,23 +103,23 @@
      * @param style The CssStyle
      */
     public void addToStyle(ApplContext ac, CssStyle style) {
-	if (((Css3Style) style).cssColumnSpan != null)
-	    style.addRedefinitionWarning(ac, this);
-	((Css3Style) style).cssColumnSpan = this;
+        if (((Css3Style) style).cssColumnSpan != null)
+            style.addRedefinitionWarning(ac, this);
+        ((Css3Style) style).cssColumnSpan = this;
     }
 
     /**
      * Get this property in the style.
      *
-     * @param style The style where the property is
+     * @param style   The style where the property is
      * @param resolve if true, resolve the style to find this property
      */
     public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
-	if (resolve) {
-	    return ((Css3Style) style).getColumnSpan();
-	} else {
-	    return ((Css3Style) style).cssColumnSpan;
-	}
+        if (resolve) {
+            return ((Css3Style) style).getColumnSpan();
+        } else {
+            return ((Css3Style) style).cssColumnSpan;
+        }
     }
 
     /**
@@ -121,36 +128,36 @@
      * @param property The other property.
      */
     public boolean equals(CssProperty property) {
-	return (property instanceof CssColumnSpan &&
-		value.equals( ((CssColumnSpan) property).value));
+        return (property instanceof CssColumnSpan &&
+                value.equals(((CssColumnSpan) property).value));
     }
 
     /**
      * Returns the name of this property
      */
     public String getPropertyName() {
-	return "column-span";
+        return "column-span";
     }
 
     /**
      * Returns the value of this property
      */
     public Object get() {
-	return value;
+        return value;
     }
 
     /**
      * Returns true if this property is "softly" inherited
      */
     public boolean isSoftlyInherited() {
-	return (value == inherit);
+        return (value == inherit);
     }
 
     /**
      * Returns a string representation of the object
      */
     public String toString() {
-	return value.toString();
+        return value.toString();
     }
 
     /**
@@ -158,8 +165,8 @@
      * It is used by all macro for the function <code>print</code>
      */
     public boolean isDefault() {
-	// we only have 3 values
-	return ((value != all) && (value != inherit));
+        // we only have 3 values
+        return (one == value);
     }
 
 }

Index: CssBackgroundColor.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css/CssBackgroundColor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CssBackgroundColor.java	5 Jan 2010 13:49:37 -0000	1.1
+++ CssBackgroundColor.java	5 Jan 2010 19:49:50 -0000	1.2
@@ -1,39 +1,34 @@
-//
 // $Id$
 // From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
+// Rewritten 2010 Yves Lafon <ylafon@w3.org>
 //
-// (c) COPYRIGHT MIT and INRIA, 1997.
+// (c) COPYRIGHT MIT, ERCIM and Keio, 1997-2010.
 // Please first read the full copyright statement in file COPYRIGHT.html
 
 package org.w3c.css.properties.css;
 
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.properties.css.CssProperty;
 import org.w3c.css.properties.css1.Css1Style;
 import org.w3c.css.properties.css1.CssColor;
 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.CssValue;
 
 /**
- * <H4>
- * &nbsp;&nbsp; 'background-color'
- * </H4>
- * <p/>
- * <EM>Value:</EM> &lt;color&gt; | transparent<BR>
- * <EM>Initial:</EM> transparent<BR>
- * <EM>Applies to:</EM> all elements<BR>
- * <EM>Inherited:</EM> no<BR>
- * <EM>Percentage values:</EM> N/A<BR>
- * <p/>
- * This property sets the background color of an element.
- * <PRE>
- * H1 { background-color: #F00 }
- * </PRE>
+ * http://www.w3.org/TR/2009/CR-css3-background-20091217/#the-background-color
  *
- * @version $Revision$
+ * Name: 	background-color
+ * Value: 	&lt;color&gt;
+ * Initial: 	transparent
+ * Applies to: 	all elements
+ * Inherited: 	no
+ * Percentages: 	N/A
+ * Media: 	visual
+ * Computed value: 	the computed color(s)
+ *
+ * This property sets the background color of an element. The color is drawn
+ * behind any background images.
  */
 public class CssBackgroundColor extends CssProperty {
 
@@ -57,13 +52,28 @@
     public CssBackgroundColor(ApplContext ac, CssExpression expression,
                               boolean check) throws InvalidParamException {
 
+        setByUser();
+        CssValue val = expression.getValue();
+
         if (check && expression.getCount() > 1) {
             throw new InvalidParamException("unrecognize", ac);
         }
 
-        setByUser();
-        CssColor tempcolor = new CssColor(ac, expression, check);
-        color = (CssValue) tempcolor.get();
+        if (inherit.equals(val)) {
+            color = inherit;
+            expression.next();
+        } else {
+            try {
+                // we use the latest version of CssColor, aka CSS3
+                // instead of using CSS21 colors + transparent per spec.
+                CssColor tcolor = new CssColor(ac, expression, check);
+                color = tcolor.getColor();
+            } catch (InvalidParamException e) {
+                throw new InvalidParamException("value",
+                        expression.getValue(),
+                        getPropertyName(), ac);
+            }
+        }
     }
 
     public CssBackgroundColor(ApplContext ac, CssExpression expression)
@@ -149,7 +159,7 @@
      * It is used by all macro for the function <code>print</code>
      */
     public boolean isDefault() {
-        return color == transparent;
+        return (color == transparent);
     }
 
 }

Index: CssColumnRuleColor.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css/CssColumnRuleColor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CssColumnRuleColor.java	5 Jan 2010 13:49:38 -0000	1.1
+++ CssColumnRuleColor.java	5 Jan 2010 19:49:50 -0000	1.2
@@ -18,17 +18,17 @@
 
 /**
  * http://www.w3.org/TR/2009/CR-css3-multicol-20091217/#column-rule-color
- *
+ * <p/>
  * Name:  	column-rule-color
  * Value: 	&lt;color&gt;
- * Initial: 	same as for ÔcolorÕ property [CSS21]
+ * Initial: 	same as for 'color' property [CSS21]
  * Applies to: 	multicol elements
  * Inherited: 	no
  * Percentages: 	N/A
  * Media: 	visual
- * Computed value: 	the same as the computed value for the ÔcolorÕ
+ * Computed value: 	the same as the computed value for the 'color'
  * property [CSS21]
- *
+ * <p/>
  * This property sets the color of the column rule. The &lt;color&gt; values are
  * defined in [CSS21].
  */
@@ -37,7 +37,7 @@
 
     private static final String propertyName = "column-rule-color";
 
-    CssColor color;
+    CssValue color;
 
     /**
      * Create a new CssColumnRuleColor
@@ -62,14 +62,19 @@
             throw new InvalidParamException("unrecognize", ac);
         }
 
-        try {
-            // we use the latest version of CssColor, aka CSS3
-            // instead of using CSS21 colors + transparent per spec.
-            color = new CssColor(ac, expression);
-        } catch (InvalidParamException e) {
-            throw new InvalidParamException("value",
-                    expression.getValue(),
-                    getPropertyName(), ac);
+        if (inherit.equals(val)) {
+            color = inherit;
+        } else {
+            try {
+                // we use the latest version of CssColor, aka CSS3
+                // instead of using CSS21 colors + transparent per spec.
+                CssColor tcolor = new CssColor(ac, expression, check);
+                color = tcolor.getColor();
+            } catch (InvalidParamException e) {
+                throw new InvalidParamException("value",
+                        expression.getValue(),
+                        getPropertyName(), ac);
+            }
         }
     }
 

Index: CssBackgroundAttachment.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css/CssBackgroundAttachment.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CssBackgroundAttachment.java	5 Jan 2010 13:49:37 -0000	1.1
+++ CssBackgroundAttachment.java	5 Jan 2010 19:49:50 -0000	1.2
@@ -32,8 +32,8 @@
  * Computed value: 	as specified
  *
  * If background images are specified, this property specifies whether they
- * are fixed with regard to the viewport (ÔfixedÕ) or scroll along with the
- * element (ÔscrollÕ) or its contents (ÔlocalÕ). The property's value is given
+ * are fixed with regard to the viewport ('fixed') or scroll along with the
+ * element ('scroll') or its contents ('local'). The property's value is given
  *  as a comma-separated list of &lt;attachment&gt; keywords where
  *
  * &lt;attachment&gt; = scroll | fixed | local
@@ -42,7 +42,7 @@
 
     private static final String propertyName = "background-attachment";
 
-    public static HashMap<String, CssIdent> allowed_values;
+    private static HashMap<String, CssIdent> allowed_values;
     public static CssIdent scroll;
 
     static {

Index: CssBackgroundSize.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css/CssBackgroundSize.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CssBackgroundSize.java	5 Jan 2010 13:49:37 -0000	1.1
+++ CssBackgroundSize.java	5 Jan 2010 19:49:50 -0000	1.2
@@ -46,8 +46,8 @@
 
     private static final String propertyName = "background-size";
 
-    public static CssIdent auto;
-    public static HashMap<String, CssIdent> allowed_values;
+    private static CssIdent auto;
+    private static HashMap<String, CssIdent> allowed_values;
 
     static {
         auto = CssIdent.getIdent("auto");

Index: CssBackgroundOrigin.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css/CssBackgroundOrigin.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CssBackgroundOrigin.java	5 Jan 2010 13:49:37 -0000	1.1
+++ CssBackgroundOrigin.java	5 Jan 2010 19:49:50 -0000	1.2
@@ -35,7 +35,7 @@
  *
  * For elements rendered as a single box, specifies the background positioning
  * area. For elements rendered as multiple boxes (e.g., inline boxes on several
- * lines, boxes on several pages) specifies which boxes Ôbox-decoration-breakÕ
+ * lines, boxes on several pages) specifies which boxes �box-decoration-break�
  *  operates on to determine the background positioning area(s).
  *
  * &lt;bg-origin&gt; = border-box | padding-box | content-box
@@ -44,9 +44,9 @@
 public class CssBackgroundOrigin extends CssProperty {
 
     private static final String propertyName = "background-origin";
-    public static CssIdent border_box;
-    public static CssIdent padding_box;
-    public static CssIdent content_box;
+    private static CssIdent border_box;
+    private static CssIdent padding_box;
+    private static CssIdent content_box;
 
     Object value;
 

Index: CssBreakAfter.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css/CssBreakAfter.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CssBreakAfter.java	5 Jan 2010 13:49:37 -0000	1.1
+++ CssBreakAfter.java	5 Jan 2010 19:49:50 -0000	1.2
@@ -48,7 +48,7 @@
     private static final String propertyName = "break-after";
 
     static CssIdent auto;
-    static HashMap<String, CssIdent> allowed_values;
+    private static HashMap<String, CssIdent> allowed_values;
 
     CssIdent value;
 

Received on Tuesday, 5 January 2010 19:49:55 UTC