2002/css-validator/org/w3c/css/properties/css3 CssTabSize.java,NONE,1.1 Css3Style.java,1.54,1.55

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

Modified Files:
	Css3Style.java 
Added Files:
	CssTabSize.java 
Log Message:
tab-size per http://www.w3.org/TR/2012/WD-css3-text-20120814/#tab-size1

Index: Css3Style.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/Css3Style.java,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- Css3Style.java	31 Aug 2012 13:52:08 -0000	1.54
+++ Css3Style.java	31 Aug 2012 14:04:19 -0000	1.55
@@ -42,6 +42,7 @@
 import org.w3c.css.properties.css.CssLineBreak;
 import org.w3c.css.properties.css.CssOpacity;
 import org.w3c.css.properties.css.CssOverflowWrap;
+import org.w3c.css.properties.css.CssTabSize;
 import org.w3c.css.properties.css.CssTextAlignLast;
 import org.w3c.css.properties.css.CssTextDecorationColor;
 import org.w3c.css.properties.css.CssTextDecorationStyle;
@@ -147,6 +148,7 @@
 	public CssTextDecorationStyle cssTextDecorationStyle;
 	public CssTextDecorationColor cssTextDecorationColor;
 	public CssTextEmphasisColor cssTextEmphasisColor;
+	public CssTabSize cssTabSize;
 
 	CssDropInitialAfterAdjust cssDropInitialAfterAdjust;
 	CssDropInitialAfterAlign cssDropInitialAfterAlign;
@@ -1430,6 +1432,14 @@
 		return cssTextEmphasisColor;
 	}
 
+	public CssTabSize getTabSize() {
+		if (cssTabSize == null) {
+			cssTabSize =
+					(CssTabSize) style.CascadingOrder(
+							new CssTabSize(), style, selector);
+		}
+		return cssTabSize;
+	}
 	///
 
 	public CssTextIndentCSS3 getTextIndentCSS3() {

--- NEW FILE: CssTabSize.java ---
// $Id: CssTabSize.java,v 1.1 2012/08/31 14:04:19 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.CssLength;
import org.w3c.css.values.CssNumber;
import org.w3c.css.values.CssTypes;
import org.w3c.css.values.CssValue;

/**
 * @spec http://www.w3.org/TR/2012/WD-css3-text-20120814/#tab-size1
 */
public class CssTabSize extends org.w3c.css.properties.css.CssTabSize {

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

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

		if (check && expression.getCount() > 1) {
			throw new InvalidParamException("unrecognize", ac);
		}
		switch (val.getType()) {
			case CssTypes.CSS_NUMBER:
				CssNumber number = (CssNumber) val;
				if (!number.isPositive()) {
					throw new InvalidParamException("negative-value",
							number, getPropertyName(), ac);
				}
				value = val;
				break;
			case CssTypes.CSS_LENGTH:
				CssLength l = (CssLength) val;
				if (!l.isPositive()) {
					throw new InvalidParamException("negative-value",
							l, getPropertyName(), ac);
				}
				value = val;
				break;
			default:
				throw new InvalidParamException("value",
						val, getPropertyName(), ac);
		}
		expression.next();
	}

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

}

Received on Friday, 31 August 2012 14:04:26 UTC