2002/css-validator/org/w3c/css/properties/css3 CssOverflowStyle.java,NONE,1.1 Css3Style.java,1.93,1.94

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

Modified Files:
	Css3Style.java 
Added Files:
	CssOverflowStyle.java 
Log Message:
overflow-style per http://www.w3.org/TR/2008/CR-css3-marquee-20081205/#overflow-style

Index: Css3Style.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/Css3Style.java,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -d -r1.93 -r1.94
--- Css3Style.java	5 Sep 2012 12:00:05 -0000	1.93
+++ Css3Style.java	5 Sep 2012 12:06:06 -0000	1.94
@@ -47,6 +47,7 @@
 import org.w3c.css.properties.css.CssMarqueeSpeed;
 import org.w3c.css.properties.css.CssMarqueeStyle;
 import org.w3c.css.properties.css.CssOpacity;
+import org.w3c.css.properties.css.CssOverflowStyle;
 import org.w3c.css.properties.css.CssOverflowWrap;
 import org.w3c.css.properties.css.CssTabSize;
 import org.w3c.css.properties.css.CssTextAlignLast;
@@ -136,7 +137,8 @@
 	public CssMarqueeSpeed cssMarqueeSpeed;
 	public CssMarqueeStyle cssMarqueeStyle;
 	public CssMarqueePlayCount cssMarqueePlayCount;
-	
+	public CssOverflowStyle cssOverflowStyle;
+
 	CssDropInitialAfterAdjust cssDropInitialAfterAdjust;
 	CssDropInitialAfterAlign cssDropInitialAfterAlign;
 	CssDropInitialBeforeAdjust cssDropInitialBeforeAdjust;
@@ -866,6 +868,15 @@
 		return cssMarqueeStyle;
 	}
 
+	public CssOverflowStyle getOverflowStyle() {
+		if (cssOverflowStyle == null) {
+			cssOverflowStyle =
+					(CssOverflowStyle) style.CascadingOrder(
+							new CssOverflowStyle(), style, selector);
+		}
+		return cssOverflowStyle;
+	}
+
 	public org.w3c.css.properties.css.CssBorderTopRightRadius getBorderTopRightRadius() {
 		if (cssBorder.borderRadius.topRight == null) {
 			cssBorder.borderRadius.topRight =

--- NEW FILE: CssOverflowStyle.java ---
// $Id: CssOverflowStyle.java,v 1.1 2012/09/05 12:06:06 ylafon Exp $
// Author: Yves Lafon <ylafon@w3.org>
//
// (c) COPYRIGHT MIT, ERCIM and Keio University, 2012.
// 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.CssIdent;
import org.w3c.css.values.CssTypes;
import org.w3c.css.values.CssValue;

/**
 * @spec http://www.w3.org/TR/2008/CR-css3-marquee-20081205/#overflow-style
 */
public class CssOverflowStyle extends org.w3c.css.properties.css.CssOverflowStyle {

	private static CssIdent[] allowed_values;

	static {
		String id_values[] = {"auto", "marquee-line", "marquee-block"};
		allowed_values = new CssIdent[id_values.length];
		int i = 0;
		for (String s : id_values) {
			allowed_values[i++] = CssIdent.getIdent(s);
		}
	}

	public static CssIdent getMatchingIdent(CssIdent ident) {
		for (CssIdent id : allowed_values) {
			if (id.equals(ident)) {
				return id;
			}
		}
		return null;
	}

	/**
	 * Create a new CssOverflowStyle
	 */
	public CssOverflowStyle() {
		value = initial;
	}

	/**
	 * Creates a new CssOverflowStyle
	 *
	 * @param expression The expression for this property
	 * @throws org.w3c.css.util.InvalidParamException
	 *          Expressions are incorrect
	 */
	public CssOverflowStyle(ApplContext ac, CssExpression expression, boolean check)
			throws InvalidParamException {
		setByUser();
		CssValue val = expression.getValue();

		if (check && expression.getCount() > 1) {
			throw new InvalidParamException("unrecognize", ac);
		}

		if (val.getType() != CssTypes.CSS_IDENT) {
			throw new InvalidParamException("value",
					expression.getValue(),
					getPropertyName(), ac);
		}
		// ident, so inherit, or allowed value
		if (inherit.equals(val)) {
			value = inherit;
		} else {
			val = getMatchingIdent((CssIdent) val);
			if (val == null) {
				throw new InvalidParamException("value",
						expression.getValue(),
						getPropertyName(), ac);
			}
			value = val;
		}
		expression.next();
	}

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

Received on Wednesday, 5 September 2012 12:07:59 UTC