2002/css-validator/org/w3c/css/properties/css3 CssHyphens.java,NONE,1.1 Css3Style.java,1.46,1.47

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

Modified Files:
	Css3Style.java 
Added Files:
	CssHyphens.java 
Log Message:
hyphens per http://www.w3.org/TR/2012/WD-css3-text-20120814/#hyphens0

Index: Css3Style.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/Css3Style.java,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- Css3Style.java	30 Aug 2012 12:51:56 -0000	1.46
+++ Css3Style.java	30 Aug 2012 13:10:28 -0000	1.47
@@ -38,6 +38,7 @@
 import org.w3c.css.properties.css.CssFontVariantLigatures;
 import org.w3c.css.properties.css.CssFontVariantNumeric;
 import org.w3c.css.properties.css.CssFontVariantPosition;
+import org.w3c.css.properties.css.CssHyphens;
 import org.w3c.css.properties.css.CssOpacity;
 import org.w3c.css.properties.css.CssOverflowWrap;
 import org.w3c.css.properties.css.CssWordBreak;
@@ -136,6 +137,7 @@
 
 	public CssOverflowWrap cssOverflowWrap;
 	public CssWordBreak cssWordBreak;
+	public CssHyphens cssHyphens;
 
 	CssDropInitialAfterAdjust cssDropInitialAfterAdjust;
 	CssDropInitialAfterAlign cssDropInitialAfterAlign;
@@ -1374,7 +1376,7 @@
 		return cssFontVariantAlternates;
 	}
 
-	public org.w3c.css.properties.css.CssOverflowWrap getOverflowWrap() {
+	public CssOverflowWrap getOverflowWrap() {
 		if (cssOverflowWrap == null) {
 			cssOverflowWrap =
 					(CssOverflowWrap) style.CascadingOrder(
@@ -1383,6 +1385,15 @@
 		return cssOverflowWrap;
 	}
 
+	public CssHyphens getHyphens() {
+		if (cssHyphens == null) {
+			cssHyphens =
+					(CssHyphens) style.CascadingOrder(
+							new CssHyphens(), style, selector);
+		}
+		return cssHyphens;
+	}
+
 	///
 
 	public CssTextIndentCSS3 getTextIndentCSS3() {

--- NEW FILE: CssHyphens.java ---
// $Id: CssHyphens.java,v 1.1 2012/08/30 13:10:28 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;

/**
 * @pec http://www.w3.org/TR/2012/WD-css3-text-20120814/#hyphens0
 */
public class CssHyphens extends org.w3c.css.properties.css.CssHyphens {

	public static final CssIdent[] allowed_values;

	static {
		String[] _allowed_values = {"manual", "auto"}; // none is also present
		allowed_values = new CssIdent[_allowed_values.length];
		int i = 0;
		for (String s : _allowed_values) {
			allowed_values[i++] = CssIdent.getIdent(s);
		}
	}

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

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

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

		CssValue val;
		char op;

		val = expression.getValue();
		op = expression.getOperator();

		if (val.getType() == CssTypes.CSS_IDENT) {
			CssIdent ident = (CssIdent) val;
			if (inherit.equals(ident)) {
				value = inherit;
			} else {
				value = getAllowedValue(ident);
				if (value == null) {
					throw new InvalidParamException("value",
							val.toString(),
							getPropertyName(), ac);
				}
			}
		} else {
			throw new InvalidParamException("value",
					val.toString(),
					getPropertyName(), ac);
		}
		expression.next();
	}

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

}

Received on Thursday, 30 August 2012 13:10:35 UTC