CVS 2002/css-validator/org/w3c/css/properties/css3

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

Modified Files:
	Css3Style.java 
Added Files:
	CssRest.java 
Log Message:
rest per http://www.w3.org/TR/2012/CR-css3-speech-20120320/#rest

--- /sources/public/2002/css-validator/org/w3c/css/properties/css3/Css3Style.java	2013/01/09 09:06:29	1.149
+++ /sources/public/2002/css-validator/org/w3c/css/properties/css3/Css3Style.java	2013/01/09 09:10:06	1.150
@@ -1,6 +1,6 @@
 //
 
-// $Id: Css3Style.java,v 1.149 2013/01/09 09:06:29 ylafon Exp $
+// $Id: Css3Style.java,v 1.150 2013/01/09 09:10:06 ylafon Exp $
 // From Sijtsche de Jong (sy.de.jong@let.rug.nl)
 //
 // COPYRIGHT (c) 1995-2000 World Wide Web Consortium, (MIT, INRIA, Keio University)
@@ -89,6 +89,7 @@
 import org.w3c.css.properties.css.CssPerspective;
 import org.w3c.css.properties.css.CssPerspectiveOrigin;
 import org.w3c.css.properties.css.CssResize;
+import org.w3c.css.properties.css.CssRest;
 import org.w3c.css.properties.css.CssRestAfter;
 import org.w3c.css.properties.css.CssRestBefore;
 import org.w3c.css.properties.css.CssTabSize;
@@ -132,6 +133,7 @@
 	public CssVoiceVolume cssVoiceVolume;
 	public CssRestAfter cssRestAfter;
 	public CssRestBefore cssRestBefore;
+	public CssRest cssRest;
 
 	
 	CssRubyPosition cssRubyPosition;
@@ -1532,6 +1534,15 @@
 		}
 		return cssRestBefore;
 	}
+
+	public final CssRest getRest() {
+		if (cssRest == null) {
+			cssRest =
+					(CssRest) style.CascadingOrder(new CssRest(),
+							style, selector);
+		}
+		return cssRest;
+	}
 	///
 
 	/**

--- /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssRest.java	2013/01/09 09:10:06	NONE
+++ /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssRest.java	2013/01/09 09:10:06	1.1
// $Id: CssRest.java,v 1.1 2013/01/09 09:10:06 ylafon Exp $
// Author: Yves Lafon <ylafon@w3.org>
//
// (c) COPYRIGHT MIT, ERCIM and Keio University, 2013.
// Please first read the full copyright statement in file COPYRIGHT.html
package org.w3c.css.properties.css3;

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 java.util.ArrayList;

/**
 * @spec http://www.w3.org/TR/2012/CR-css3-speech-20120320/#rest
 */
public class CssRest extends org.w3c.css.properties.css.CssRest {

	/**
	 * Create a new CssRest
	 */
	public CssRest() {
		cssRestAfter = new CssRestAfter();
		cssRestBefore = new CssRestBefore();
		value = initial;
	}

	/**
	 * Creates a new CssRest
	 *
	 * @param expression The expression for this property
	 * @throws org.w3c.css.util.InvalidParamException
	 *          Expressions are incorrect
	 */
	public CssRest(ApplContext ac, CssExpression expression, boolean check)
			throws InvalidParamException {
		if (check && expression.getCount() > 2) {
			throw new InvalidParamException("unrecognize", ac);
		}
		setByUser();

		char op;

		cssRestBefore = new CssRestBefore(ac, expression, false);
		if (expression.end()) {
			cssRestAfter = new CssRestAfter();
			cssRestAfter.value = cssRestBefore.value;
			value = cssRestBefore.value;
		} else {
			op = expression.getOperator();
			if (op != CssOperator.SPACE) {
				throw new InvalidParamException("operator",
						((new Character(op)).toString()), ac);
			}
			cssRestAfter = new CssRestAfter(ac, expression, false);
			if (cssRestBefore.value == inherit || cssRestAfter.value == inherit) {
				throw new InvalidParamException("value",
						inherit, getPropertyName(), ac);
			}
			ArrayList<CssValue> values = new ArrayList<CssValue>(2);
			values.add(cssRestBefore.value);
			values.add(cssRestAfter.value);
			value = new CssValueList(values);
		}
	}

	public CssRest(ApplContext ac, CssExpression expression)
			throws InvalidParamException {
		this(ac, expression, false);
	}
}

Received on Wednesday, 9 January 2013 09:10:11 UTC