2002/css-validator/org/w3c/css/properties/css3 CssBackground.java,1.8,1.9 CssBackgroundImage.java,1.3,1.4 CssBorderImage.java,1.7,1.8 CssBorderImageSource.java,1.2,1.3 CssCursor.java,1.1,1.2 CssListStyle.java,1.1,1.2 CssListStyleImage.java,1.1,1.2

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

Modified Files:
	CssBackground.java CssBackgroundImage.java CssBorderImage.java 
	CssBorderImageSource.java CssCursor.java CssListStyle.java 
	CssListStyleImage.java 
Log Message:
added image

Index: CssBackground.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssBackground.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- CssBackground.java	2 Nov 2012 09:48:05 -0000	1.8
+++ CssBackground.java	7 Nov 2012 15:46:02 -0000	1.9
@@ -267,6 +267,7 @@
 					break;
 
 				case CssTypes.CSS_URL:
+				case CssTypes.CSS_IMAGE:
 					prev_is_position = false;
 					// we already got one, fail...
 					if (v.bg_image != null || next_is_size) {

Index: CssBorderImage.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssBorderImage.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- CssBorderImage.java	4 May 2012 12:57:59 -0000	1.7
+++ CssBorderImage.java	7 Nov 2012 15:46:02 -0000	1.8
@@ -22,456 +22,457 @@
 public class CssBorderImage extends org.w3c.css.properties.css.CssBorderImage {
 
 
-    /**
-     * Create new CssBorderImage
-     */
-    public CssBorderImage() {
-        value = initial;
-    }
+	/**
+	 * Create new CssBorderImage
+	 */
+	public CssBorderImage() {
+		value = initial;
+	}
 
-    /**
-     * Create new CssBorderImage
-     *
-     * @param expression The expression for this property
-     * @throws InvalidParamException Values are incorrect
-     */
-    public CssBorderImage(ApplContext ac, CssExpression expression,
-                          boolean check) throws InvalidParamException {
-        int state = 0;
-        // <?border-image-source?> || <?border-image-slice?> [ / <?border-image-width?> | / <?border-image-width?>? / <?border-image-outset?> ]? || <?border-image-repeat?>
+	/**
+	 * Create new CssBorderImage
+	 *
+	 * @param expression The expression for this property
+	 * @throws InvalidParamException Values are incorrect
+	 */
+	public CssBorderImage(ApplContext ac, CssExpression expression,
+						  boolean check) throws InvalidParamException {
+		int state = 0;
+		// <?border-image-source?> || <?border-image-slice?> [ / <?border-image-width?> | / <?border-image-width?>? / <?border-image-outset?> ]? || <?border-image-repeat?>
 
-        // state 0, we check for <?border-image-source?> || <?border-image-slice?> || <?border-image-repeat?>
-        // state 1, we check only <?border-image-width?> ( first / after <?border-image-slice?>)
-        // state 2, we check only for  <?border-image-outset?>
-        CssExpression newexp;
-        CssValue val = null;
-        CssValue tval;
-        char op;
+		// state 0, we check for <?border-image-source?> || <?border-image-slice?> || <?border-image-repeat?>
+		// state 1, we check only <?border-image-width?> ( first / after <?border-image-slice?>)
+		// state 2, we check only for  <?border-image-outset?>
+		CssExpression newexp;
+		CssValue val = null;
+		CssValue tval;
+		char op;
 
-        while (!expression.end()) {
-            val = expression.getValue();
-            op = expression.getOperator();
+		while (!expression.end()) {
+			val = expression.getValue();
+			op = expression.getOperator();
 
-            switch (val.getType()) {
-                case CssTypes.CSS_URL:
-                    if (source != null) {
-                        throw new InvalidParamException("unrecognize", ac);
-                    }
-                    // right after the / in step 2 we must have a slice and outset or width
-                    if (state > 0) {
-                        if ((slice == null) ||
-                                ((state == 1 && width == null) || (state == 2 && outset == null))) {
-                            throw new InvalidParamException("value", val.toString(),
-                                    getPropertyName(), ac);
-                        }
-                    }
-                    // work on this expression as it consumes only one token
-                    source = new CssBorderImageSource(ac, expression, false);
-                    // we must reset the operator
-                    state = 0;
-                    op = expression.getOperator();
-                    break;
-                case CssTypes.CSS_SWITCH:
-                    state++;
-                    if (slice == null || state > 2) {
-                        throw new InvalidParamException("value", val.toString(),
-                                getPropertyName(), ac);
-                    }
-                    expression.next();
-                    break;
-                case CssTypes.CSS_IDENT:
-                    if (inherit.equals(val)) {
-                        if (expression.getCount() > 1) {
-                            throw new InvalidParamException("unrecognize", ac);
-                        }
-                        value = inherit;
-                        // TODO force individual values as inherit
-                        expression.next();
-                        break;
-                    }
-                    switch (state) {
-                        case 0:
-                            // state 0, we can only have slice or repeat or image
-                            // slice
-                            tval = CssBorderImageSlice.getMatchingIdent((CssIdent) val);
-                            if (tval != null) {
-                                if (slice != null) {
-                                    throw new InvalidParamException("value", val.toString(),
-                                            getPropertyName(), ac);
-                                }
-                                newexp = getSliceExpression(ac, expression);
-                                if (newexp != null) {
-                                    slice = new CssBorderImageSlice(ac, newexp, check);
-                                    break;
-                                }
-                                throw new InvalidParamException("value", val.toString(),
-                                        getPropertyName(), ac);
-                            }
-                            // repeat
-                            newexp = getRepeatExpression(ac, expression);
-                            if (newexp != null) {
-                                if (repeat != null) {
-                                    throw new InvalidParamException("value", val.toString(),
-                                            getPropertyName(), ac);
-                                }
-                                repeat = new CssBorderImageRepeat(ac, newexp, check);
-                                break;
-                            }
-                            // TODO check for border-image! (none)
-                            if (CssBorderImageSource.isMatchingIdent((CssIdent) val)) {
-                                if (source != null) {
-                                    throw new InvalidParamException("value", val.toString(),
-                                            getPropertyName(), ac);
-                                }
-                                source = new CssBorderImageSource(ac, expression, false);
-                                break;
-                            }
-                            throw new InvalidParamException("value", val.toString(),
-                                    getPropertyName(), ac);
-                        case 1:
-                            // it can be only width or repeat.
-                            // width
-                            tval = CssBorderImageWidth.getMatchingIdent((CssIdent) val);
-                            if (tval != null) {
-                                if (width != null) {
-                                    throw new InvalidParamException("value", val.toString(),
-                                            getPropertyName(), ac);
-                                }
-                                newexp = getWidthExpression(ac, expression);
-                                if (newexp != null) {
-                                    width = new CssBorderImageWidth(ac, newexp, check);
-                                    break;
-                                }
-                                throw new InvalidParamException("value", val.toString(),
-                                        getPropertyName(), ac);
-                            }
-                        case 2:
-                            // outset has no ident so let 1 and 2 check repeat
-                            newexp = getRepeatExpression(ac, expression);
-                            if (newexp != null) {
-                                if (repeat != null) {
-                                    throw new InvalidParamException("value", val.toString(),
-                                            getPropertyName(), ac);
-                                }
-                                // right after the / in step 2 we must have a slice or outset
-                                if ((state == 1 && width == null) || (state == 2 && outset == null)) {
-                                    throw new InvalidParamException("value", val.toString(),
-                                            getPropertyName(), ac);
-                                }
-                                repeat = new CssBorderImageRepeat(ac, newexp, check);
-                                state = 0;
-                                break;
-                            }
-                            // TODO check for border-image! (none)
-                            if (CssBorderImageSource.isMatchingIdent((CssIdent) val)) {
-                                if (source != null) {
-                                    throw new InvalidParamException("value", val.toString(),
-                                            getPropertyName(), ac);
-                                }
-                                // right after the / in step 2 we must have a slice or outset
-                                if ((state == 1 && width == null) || (state == 2 && outset == null)) {
-                                    throw new InvalidParamException("value", val.toString(),
-                                            getPropertyName(), ac);
-                                }
-                                source = new CssBorderImageSource(ac, expression, false);
-                                state = 0;
-                                break;
-                            }
-                            throw new InvalidParamException("value", val.toString(),
-                                    getPropertyName(), ac);
-                    }
-                    break;
-                case CssTypes.CSS_PERCENTAGE:
-                    // can appear only in slice and width (so 0 and 1)
-                    switch (state) {
-                        case 0:
-                            if (slice != null) {
-                                throw new InvalidParamException("value", val.toString(),
-                                        getPropertyName(), ac);
-                            }
-                            newexp = getSliceExpression(ac, expression);
-                            if (newexp != null) {
-                                slice = new CssBorderImageSlice(ac, newexp, check);
-                                break;
-                            }
-                            throw new InvalidParamException("value", val.toString(),
-                                    getPropertyName(), ac);
-                        case 1:
-                            if (width != null) {
-                                throw new InvalidParamException("value", val.toString(),
-                                        getPropertyName(), ac);
-                            }
-                            newexp = getWidthExpression(ac, expression);
-                            if (newexp != null) {
-                                width = new CssBorderImageWidth(ac, newexp, check);
-                                break;
-                            }
-                            throw new InvalidParamException("value", val.toString(),
-                                    getPropertyName(), ac);
-                        case 2:
-                            throw new InvalidParamException("value", val.toString(),
-                                    getPropertyName(), ac);
-                    }
-                    break;
-                case CssTypes.CSS_LENGTH:
-                    // can appear only in width and outset (so 1 and 2)
-                    switch (state) {
-                        case 0:
-                            throw new InvalidParamException("value", val.toString(),
-                                    getPropertyName(), ac);
-                        case 1:
-                            if (width != null) {
-                                throw new InvalidParamException("value", val.toString(),
-                                        getPropertyName(), ac);
-                            }
-                            newexp = getWidthExpression(ac, expression);
-                            if (newexp != null) {
-                                width = new CssBorderImageWidth(ac, newexp, check);
-                                break;
-                            }
-                            throw new InvalidParamException("value", val.toString(),
-                                    getPropertyName(), ac);
-                        case 2:
-                            if (outset != null) {
-                                throw new InvalidParamException("value", val.toString(),
-                                        getPropertyName(), ac);
-                            }
-                            newexp = getOutsetExpression(ac, expression);
-                            if (newexp != null) {
-                                outset = new CssBorderImageOutset(ac, newexp, check);
-                                break;
-                            }
-                            throw new InvalidParamException("value", val.toString(),
-                                    getPropertyName(), ac);
-                    }
-                    break;
-                case CssTypes.CSS_NUMBER:
-                    switch (state) {
-                        case 0:
-                            if (slice != null) {
-                                throw new InvalidParamException("value", val.toString(),
-                                        getPropertyName(), ac);
-                            }
-                            newexp = getSliceExpression(ac, expression);
-                            if (newexp != null) {
-                                slice = new CssBorderImageSlice(ac, newexp, check);
-                                break;
-                            }
-                            throw new InvalidParamException("value", val.toString(),
-                                    getPropertyName(), ac);
-                        case 1:
-                            if (width != null) {
-                                throw new InvalidParamException("value", val.toString(),
-                                        getPropertyName(), ac);
-                            }
-                            newexp = getWidthExpression(ac, expression);
-                            if (newexp != null) {
-                                width = new CssBorderImageWidth(ac, newexp, check);
-                                break;
-                            }
-                            throw new InvalidParamException("value", val.toString(),
-                                    getPropertyName(), ac);
-                        case 2:
-                            if (outset != null) {
-                                throw new InvalidParamException("value", val.toString(),
-                                        getPropertyName(), ac);
-                            }
-                            newexp = getOutsetExpression(ac, expression);
-                            if (newexp != null) {
-                                outset = new CssBorderImageOutset(ac, newexp, check);
-                                break;
-                            }
-                            throw new InvalidParamException("value", val.toString(),
-                                    getPropertyName(), ac);
-                    }
-                    break;
-                default:
-                    throw new InvalidParamException("value", val.toString(),
-                            getPropertyName(), ac);
-            }
-            if (op != SPACE) {
-                throw new InvalidParamException("operator",
-                        Character.toString(op),
-                        ac);
-            }
-        }
-        if (val.getType() == CssTypes.CSS_SWITCH) {
-            // we can't end by a /
-            throw new InvalidParamException("value", val.toString(),
-                    getPropertyName(), ac);
-        }
-        shorthand = true;
-    }
+			switch (val.getType()) {
+				case CssTypes.CSS_URL:
+				case CssTypes.CSS_IMAGE:
+					if (source != null) {
+						throw new InvalidParamException("unrecognize", ac);
+					}
+					// right after the / in step 2 we must have a slice and outset or width
+					if (state > 0) {
+						if ((slice == null) ||
+								((state == 1 && width == null) || (state == 2 && outset == null))) {
+							throw new InvalidParamException("value", val.toString(),
+									getPropertyName(), ac);
+						}
+					}
+					// work on this expression as it consumes only one token
+					source = new CssBorderImageSource(ac, expression, false);
+					// we must reset the operator
+					state = 0;
+					op = expression.getOperator();
+					break;
+				case CssTypes.CSS_SWITCH:
+					state++;
+					if (slice == null || state > 2) {
+						throw new InvalidParamException("value", val.toString(),
+								getPropertyName(), ac);
+					}
+					expression.next();
+					break;
+				case CssTypes.CSS_IDENT:
+					if (inherit.equals(val)) {
+						if (expression.getCount() > 1) {
+							throw new InvalidParamException("unrecognize", ac);
+						}
+						value = inherit;
+						// TODO force individual values as inherit
+						expression.next();
+						break;
+					}
+					switch (state) {
+						case 0:
+							// state 0, we can only have slice or repeat or image
+							// slice
+							tval = CssBorderImageSlice.getMatchingIdent((CssIdent) val);
+							if (tval != null) {
+								if (slice != null) {
+									throw new InvalidParamException("value", val.toString(),
+											getPropertyName(), ac);
+								}
+								newexp = getSliceExpression(ac, expression);
+								if (newexp != null) {
+									slice = new CssBorderImageSlice(ac, newexp, check);
+									break;
+								}
+								throw new InvalidParamException("value", val.toString(),
+										getPropertyName(), ac);
+							}
+							// repeat
+							newexp = getRepeatExpression(ac, expression);
+							if (newexp != null) {
+								if (repeat != null) {
+									throw new InvalidParamException("value", val.toString(),
+											getPropertyName(), ac);
+								}
+								repeat = new CssBorderImageRepeat(ac, newexp, check);
+								break;
+							}
+							// TODO check for border-image! (none)
+							if (CssBorderImageSource.isMatchingIdent((CssIdent) val)) {
+								if (source != null) {
+									throw new InvalidParamException("value", val.toString(),
+											getPropertyName(), ac);
+								}
+								source = new CssBorderImageSource(ac, expression, false);
+								break;
+							}
+							throw new InvalidParamException("value", val.toString(),
+									getPropertyName(), ac);
+						case 1:
+							// it can be only width or repeat.
+							// width
+							tval = CssBorderImageWidth.getMatchingIdent((CssIdent) val);
+							if (tval != null) {
+								if (width != null) {
+									throw new InvalidParamException("value", val.toString(),
+											getPropertyName(), ac);
+								}
+								newexp = getWidthExpression(ac, expression);
+								if (newexp != null) {
+									width = new CssBorderImageWidth(ac, newexp, check);
+									break;
+								}
+								throw new InvalidParamException("value", val.toString(),
+										getPropertyName(), ac);
+							}
+						case 2:
+							// outset has no ident so let 1 and 2 check repeat
+							newexp = getRepeatExpression(ac, expression);
+							if (newexp != null) {
+								if (repeat != null) {
+									throw new InvalidParamException("value", val.toString(),
+											getPropertyName(), ac);
+								}
+								// right after the / in step 2 we must have a slice or outset
+								if ((state == 1 && width == null) || (state == 2 && outset == null)) {
+									throw new InvalidParamException("value", val.toString(),
+											getPropertyName(), ac);
+								}
+								repeat = new CssBorderImageRepeat(ac, newexp, check);
+								state = 0;
+								break;
+							}
+							// TODO check for border-image! (none)
+							if (CssBorderImageSource.isMatchingIdent((CssIdent) val)) {
+								if (source != null) {
+									throw new InvalidParamException("value", val.toString(),
+											getPropertyName(), ac);
+								}
+								// right after the / in step 2 we must have a slice or outset
+								if ((state == 1 && width == null) || (state == 2 && outset == null)) {
+									throw new InvalidParamException("value", val.toString(),
+											getPropertyName(), ac);
+								}
+								source = new CssBorderImageSource(ac, expression, false);
+								state = 0;
+								break;
+							}
+							throw new InvalidParamException("value", val.toString(),
+									getPropertyName(), ac);
+					}
+					break;
+				case CssTypes.CSS_PERCENTAGE:
+					// can appear only in slice and width (so 0 and 1)
+					switch (state) {
+						case 0:
+							if (slice != null) {
+								throw new InvalidParamException("value", val.toString(),
+										getPropertyName(), ac);
+							}
+							newexp = getSliceExpression(ac, expression);
+							if (newexp != null) {
+								slice = new CssBorderImageSlice(ac, newexp, check);
+								break;
+							}
+							throw new InvalidParamException("value", val.toString(),
+									getPropertyName(), ac);
+						case 1:
+							if (width != null) {
+								throw new InvalidParamException("value", val.toString(),
+										getPropertyName(), ac);
+							}
+							newexp = getWidthExpression(ac, expression);
+							if (newexp != null) {
+								width = new CssBorderImageWidth(ac, newexp, check);
+								break;
+							}
+							throw new InvalidParamException("value", val.toString(),
+									getPropertyName(), ac);
+						case 2:
+							throw new InvalidParamException("value", val.toString(),
+									getPropertyName(), ac);
+					}
+					break;
+				case CssTypes.CSS_LENGTH:
+					// can appear only in width and outset (so 1 and 2)
+					switch (state) {
+						case 0:
+							throw new InvalidParamException("value", val.toString(),
+									getPropertyName(), ac);
+						case 1:
+							if (width != null) {
+								throw new InvalidParamException("value", val.toString(),
+										getPropertyName(), ac);
+							}
+							newexp = getWidthExpression(ac, expression);
+							if (newexp != null) {
+								width = new CssBorderImageWidth(ac, newexp, check);
+								break;
+							}
+							throw new InvalidParamException("value", val.toString(),
+									getPropertyName(), ac);
+						case 2:
+							if (outset != null) {
+								throw new InvalidParamException("value", val.toString(),
+										getPropertyName(), ac);
+							}
+							newexp = getOutsetExpression(ac, expression);
+							if (newexp != null) {
+								outset = new CssBorderImageOutset(ac, newexp, check);
+								break;
+							}
+							throw new InvalidParamException("value", val.toString(),
+									getPropertyName(), ac);
+					}
+					break;
+				case CssTypes.CSS_NUMBER:
+					switch (state) {
+						case 0:
+							if (slice != null) {
+								throw new InvalidParamException("value", val.toString(),
+										getPropertyName(), ac);
+							}
+							newexp = getSliceExpression(ac, expression);
+							if (newexp != null) {
+								slice = new CssBorderImageSlice(ac, newexp, check);
+								break;
+							}
+							throw new InvalidParamException("value", val.toString(),
+									getPropertyName(), ac);
+						case 1:
+							if (width != null) {
+								throw new InvalidParamException("value", val.toString(),
+										getPropertyName(), ac);
+							}
+							newexp = getWidthExpression(ac, expression);
+							if (newexp != null) {
+								width = new CssBorderImageWidth(ac, newexp, check);
+								break;
+							}
+							throw new InvalidParamException("value", val.toString(),
+									getPropertyName(), ac);
+						case 2:
+							if (outset != null) {
+								throw new InvalidParamException("value", val.toString(),
+										getPropertyName(), ac);
+							}
+							newexp = getOutsetExpression(ac, expression);
+							if (newexp != null) {
+								outset = new CssBorderImageOutset(ac, newexp, check);
+								break;
+							}
+							throw new InvalidParamException("value", val.toString(),
+									getPropertyName(), ac);
+					}
+					break;
+				default:
+					throw new InvalidParamException("value", val.toString(),
+							getPropertyName(), ac);
+			}
+			if (op != SPACE) {
+				throw new InvalidParamException("operator",
+						Character.toString(op),
+						ac);
+			}
+		}
+		if (val.getType() == CssTypes.CSS_SWITCH) {
+			// we can't end by a /
+			throw new InvalidParamException("value", val.toString(),
+					getPropertyName(), ac);
+		}
+		shorthand = true;
+	}
 
-    public CssBorderImage(ApplContext ac, CssExpression expression)
-            throws InvalidParamException {
-        this(ac, expression, false);
-    }
+	public CssBorderImage(ApplContext ac, CssExpression expression)
+			throws InvalidParamException {
+		this(ac, expression, false);
+	}
 
-    private CssExpression getRepeatExpression(ApplContext ac, CssExpression expression)
-            throws InvalidParamException {
-        CssExpression exp = null;
-        CssValue val, tval;
-        char op;
+	private CssExpression getRepeatExpression(ApplContext ac, CssExpression expression)
+			throws InvalidParamException {
+		CssExpression exp = null;
+		CssValue val, tval;
+		char op;
 
-        val = expression.getValue();
-        op = expression.getOperator();
-        if (val.getType() == CssTypes.CSS_IDENT) {
-            tval = CssBorderImageRepeat.getMatchingIdent((CssIdent) val);
-            if (tval == null) {
-                return null;
-            }
-            exp = new CssExpression();
-            exp.addValue(val);
-            expression.next();
-            if (!expression.end()) {
-                // now get the potential second value
-                // first check the operator
-                if (op != SPACE) {
-                    return exp;
-                }
-                val = expression.getValue();
-                op = expression.getOperator();
-                if (val.getType() == CssTypes.CSS_IDENT) {
-                    tval = CssBorderImageRepeat.getMatchingIdent((CssIdent) val);
-                    if (tval != null) {
-                        exp.addValue(tval);
-                        expression.next();
-                        if (op != SPACE) {
-                            return exp;
-                        }
-                    }
-                }
-            }
-        }
-        return exp;
-    }
+		val = expression.getValue();
+		op = expression.getOperator();
+		if (val.getType() == CssTypes.CSS_IDENT) {
+			tval = CssBorderImageRepeat.getMatchingIdent((CssIdent) val);
+			if (tval == null) {
+				return null;
+			}
+			exp = new CssExpression();
+			exp.addValue(val);
+			expression.next();
+			if (!expression.end()) {
+				// now get the potential second value
+				// first check the operator
+				if (op != SPACE) {
+					return exp;
+				}
+				val = expression.getValue();
+				op = expression.getOperator();
+				if (val.getType() == CssTypes.CSS_IDENT) {
+					tval = CssBorderImageRepeat.getMatchingIdent((CssIdent) val);
+					if (tval != null) {
+						exp.addValue(tval);
+						expression.next();
+						if (op != SPACE) {
+							return exp;
+						}
+					}
+				}
+			}
+		}
+		return exp;
+	}
 
-    private CssExpression getSliceExpression(ApplContext ac, CssExpression expression)
-            throws InvalidParamException {
-        CssExpression exp = new CssExpression();
-        CssValue val, tval;
-        char op;
+	private CssExpression getSliceExpression(ApplContext ac, CssExpression expression)
+			throws InvalidParamException {
+		CssExpression exp = new CssExpression();
+		CssValue val, tval;
+		char op;
 
-        while (exp.getCount() < 5 && !expression.end()) {
-            val = expression.getValue();
-            op = expression.getOperator();
-            switch (val.getType()) {
-                case CssTypes.CSS_NUMBER:
-                case CssTypes.CSS_PERCENTAGE:
-                    exp.addValue(val);
-                    break;
-                case CssTypes.CSS_IDENT:
-                    tval = CssBorderImageSlice.getMatchingIdent((CssIdent) val);
-                    if (tval == null) {
-                        return exp;
-                    }
-                    exp.addValue(val);
-                    break;
-                default:
-                    return exp;
+		while (exp.getCount() < 5 && !expression.end()) {
+			val = expression.getValue();
+			op = expression.getOperator();
+			switch (val.getType()) {
+				case CssTypes.CSS_NUMBER:
+				case CssTypes.CSS_PERCENTAGE:
+					exp.addValue(val);
+					break;
+				case CssTypes.CSS_IDENT:
+					tval = CssBorderImageSlice.getMatchingIdent((CssIdent) val);
+					if (tval == null) {
+						return exp;
+					}
+					exp.addValue(val);
+					break;
+				default:
+					return exp;
 
-            }
-            expression.next();
-            if (op != SPACE) {
-                return exp;
-            }
-        }
-        return exp;
-    }
+			}
+			expression.next();
+			if (op != SPACE) {
+				return exp;
+			}
+		}
+		return exp;
+	}
 
-    private CssExpression getWidthExpression(ApplContext ac, CssExpression expression)
-            throws InvalidParamException {
-        CssExpression exp = new CssExpression();
-        CssValue val, tval;
-        char op;
+	private CssExpression getWidthExpression(ApplContext ac, CssExpression expression)
+			throws InvalidParamException {
+		CssExpression exp = new CssExpression();
+		CssValue val, tval;
+		char op;
 
-        while (exp.getCount() < 4 && !expression.end()) {
-            val = expression.getValue();
-            op = expression.getOperator();
-            switch (val.getType()) {
-                case CssTypes.CSS_LENGTH:
-                case CssTypes.CSS_NUMBER:
-                case CssTypes.CSS_PERCENTAGE:
-                    exp.addValue(val);
-                    break;
-                case CssTypes.CSS_IDENT:
-                    tval = CssBorderImageWidth.getMatchingIdent((CssIdent) val);
-                    if (tval == null) {
-                        return exp;
-                    }
-                    exp.addValue(val);
-                    break;
-                default:
-                    return exp;
+		while (exp.getCount() < 4 && !expression.end()) {
+			val = expression.getValue();
+			op = expression.getOperator();
+			switch (val.getType()) {
+				case CssTypes.CSS_LENGTH:
+				case CssTypes.CSS_NUMBER:
+				case CssTypes.CSS_PERCENTAGE:
+					exp.addValue(val);
+					break;
+				case CssTypes.CSS_IDENT:
+					tval = CssBorderImageWidth.getMatchingIdent((CssIdent) val);
+					if (tval == null) {
+						return exp;
+					}
+					exp.addValue(val);
+					break;
+				default:
+					return exp;
 
-            }
-            expression.next();
-            if (op != SPACE) {
-                return exp;
-            }
-        }
-        return exp;
-    }
+			}
+			expression.next();
+			if (op != SPACE) {
+				return exp;
+			}
+		}
+		return exp;
+	}
 
-    private CssExpression getOutsetExpression(ApplContext ac, CssExpression expression)
-            throws InvalidParamException {
-        CssExpression exp = new CssExpression();
-        CssValue val, tval;
-        char op;
+	private CssExpression getOutsetExpression(ApplContext ac, CssExpression expression)
+			throws InvalidParamException {
+		CssExpression exp = new CssExpression();
+		CssValue val, tval;
+		char op;
 
-        while (exp.getCount() < 4 && !expression.end()) {
-            val = expression.getValue();
-            op = expression.getOperator();
-            switch (val.getType()) {
-                case CssTypes.CSS_LENGTH:
-                case CssTypes.CSS_NUMBER:
-                    exp.addValue(val);
-                    break;
-                default:
-                    return exp;
+		while (exp.getCount() < 4 && !expression.end()) {
+			val = expression.getValue();
+			op = expression.getOperator();
+			switch (val.getType()) {
+				case CssTypes.CSS_LENGTH:
+				case CssTypes.CSS_NUMBER:
+					exp.addValue(val);
+					break;
+				default:
+					return exp;
 
-            }
-            expression.next();
-            if (op != SPACE) {
-                return exp;
-            }
-        }
-        return exp;
-    }
+			}
+			expression.next();
+			if (op != SPACE) {
+				return exp;
+			}
+		}
+		return exp;
+	}
 
-    public String toString() {
-        if (value != null) {
-            return value.toString();
-        }
-        boolean first = true;
-        StringBuilder sb = new StringBuilder();
-        if (source != null) {
-            first = false;
-            sb.append(source);
-        }
-        if (slice != null) {
-            if (first) {
-                first = false;
-            } else {
-                sb.append(' ');
-            }
-            sb.append(slice);
-            if (width != null) {
-                sb.append(" / ").append(width);
-                if (outset != null) {
-                    sb.append(" / ").append(outset);
-                }
-            } else if (outset != null) {
-                sb.append(" / / ").append(outset);
-            }
-        }
-        if (repeat != null) {
-            if (!first) {
-                sb.append(' ');
-            }
-            sb.append(repeat);
-        }
-        return sb.toString();
-    }
+	public String toString() {
+		if (value != null) {
+			return value.toString();
+		}
+		boolean first = true;
+		StringBuilder sb = new StringBuilder();
+		if (source != null) {
+			first = false;
+			sb.append(source);
+		}
+		if (slice != null) {
+			if (first) {
+				first = false;
+			} else {
+				sb.append(' ');
+			}
+			sb.append(slice);
+			if (width != null) {
+				sb.append(" / ").append(width);
+				if (outset != null) {
+					sb.append(" / ").append(outset);
+				}
+			} else if (outset != null) {
+				sb.append(" / / ").append(outset);
+			}
+		}
+		if (repeat != null) {
+			if (!first) {
+				sb.append(' ');
+			}
+			sb.append(repeat);
+		}
+		return sb.toString();
+	}
 }

Index: CssBorderImageSource.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssBorderImageSource.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderImageSource.java	26 Apr 2012 18:33:30 -0000	1.2
+++ CssBorderImageSource.java	7 Nov 2012 15:46:02 -0000	1.3
@@ -46,6 +46,7 @@
         CssValue val = expression.getValue();
         switch (val.getType()) {
             case CssTypes.CSS_URL:
+			case CssTypes.CSS_IMAGE:
                 value = val;
                 break;
             case CssTypes.CSS_IDENT:

Index: CssCursor.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssCursor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CssCursor.java	19 Oct 2012 10:05:53 -0000	1.1
+++ CssCursor.java	7 Nov 2012 15:46:02 -0000	1.2
@@ -80,6 +80,7 @@
 			op = expression.getOperator();
 			switch (val.getType()) {
 				case CssTypes.CSS_URL:
+				case CssTypes.CSS_IMAGE:
 					if (lastIdent != null) {
 						throw new InvalidParamException("value",
 								val.toString(),
@@ -158,7 +159,7 @@
 		// we must have <url number number>
 		CssValue val = expression.getValue();
 		ArrayList<CssValue> values = new ArrayList<CssValue>();
-		if (val.getType() != CssTypes.CSS_URL) {
+		if (val.getType() != CssTypes.CSS_URL && val.getType() != CssTypes.CSS_IMAGE) {
 			throw new InvalidParamException("value",
 					val.toString(),
 					caller.getPropertyName(), ac);

Index: CssListStyleImage.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssListStyleImage.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CssListStyleImage.java	7 Nov 2012 11:34:59 -0000	1.1
+++ CssListStyleImage.java	7 Nov 2012 15:46:02 -0000	1.2
@@ -58,9 +58,7 @@
 		op = expression.getOperator();
 
 		switch (val.getType()) {
-			case CssTypes.CSS_FUNCTION:
-				// TODO check gradient, image
-				// perhaps using val.getImage(); ?
+			case CssTypes.CSS_IMAGE:
 			case CssTypes.CSS_URL:
 				value = val;
 				break;

Index: CssBackgroundImage.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssBackgroundImage.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssBackgroundImage.java	28 Aug 2012 20:31:17 -0000	1.3
+++ CssBackgroundImage.java	7 Nov 2012 15:46:02 -0000	1.4
@@ -55,7 +55,8 @@
             val = expression.getValue();
             op = expression.getOperator();
             switch (val.getType()) {
-                case CssTypes.CSS_URL:
+				case CssTypes.CSS_URL:
+                case CssTypes.CSS_IMAGE:
                     values.add(val);
                     break;
                 case CssTypes.CSS_IDENT:

Index: CssListStyle.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssListStyle.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CssListStyle.java	7 Nov 2012 11:34:59 -0000	1.1
+++ CssListStyle.java	7 Nov 2012 15:46:02 -0000	1.2
@@ -69,8 +69,7 @@
 			op = expression.getOperator();
 
 			switch (val.getType()) {
-				case CssTypes.CSS_FUNCTION:
-					//TODO gradient/image
+				case CssTypes.CSS_IMAGE:
 				case CssTypes.CSS_URL:
 					if (imageVal != null) {
 						throw new InvalidParamException("value", val,

Received on Wednesday, 7 November 2012 15:46:10 UTC