2002/css-validator/org/w3c/css/properties/css3 CssFlexShrink.java,NONE,1.1 Css3Style.java,1.107,1.108

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

Modified Files:
	Css3Style.java 
Added Files:
	CssFlexShrink.java 
Log Message:
flex-shrink per http://www.w3.org/TR/2012/CR-css3-flexbox-20120918/#flex-shrink

Index: Css3Style.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/Css3Style.java,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -d -r1.107 -r1.108
--- Css3Style.java	7 Oct 2012 13:12:17 -0000	1.107
+++ Css3Style.java	7 Oct 2012 13:17:28 -0000	1.108
@@ -35,6 +35,7 @@
 import org.w3c.css.properties.css.CssFlexDirection;
 import org.w3c.css.properties.css.CssFlexFlow;
 import org.w3c.css.properties.css.CssFlexGrow;
+import org.w3c.css.properties.css.CssFlexShrink;
 import org.w3c.css.properties.css.CssFlexWrap;
 import org.w3c.css.properties.css.CssFontFeatureSettings;
 import org.w3c.css.properties.css.CssFontKerning;
@@ -163,6 +164,7 @@
 	public CssFlexWrap cssFlexWrap;
 	public CssFlexFlow cssFlexFlow;
 	public CssFlexGrow cssFlexGrow;
+	public CssFlexShrink cssFlexShrink;
 	public CssJustifyContent cssJustifyContent;
 	
 	CssDropInitialAfterAdjust cssDropInitialAfterAdjust;
@@ -1204,7 +1206,16 @@
 		}
 		return cssFlexGrow;
 	}
-	
+
+	public CssFlexShrink getFlexShrink() {
+		if (cssFlexShrink == null) {
+			cssFlexShrink =
+					(CssFlexShrink) style.CascadingOrder(
+							new CssFlexShrink(), style, selector);
+		}
+		return cssFlexShrink;
+	}
+
 	public CssJustifyContent getJustifyContent() {
 		if (cssJustifyContent == null) {
 			cssJustifyContent =

--- NEW FILE: CssFlexShrink.java ---
// $Id: CssFlexShrink.java,v 1.1 2012/10/07 13:17: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.CssNumber;
import org.w3c.css.values.CssTypes;
import org.w3c.css.values.CssValue;

/**
 * @spec http://www.w3.org/TR/2012/CR-css3-flexbox-20120918/#flex-shrink
 */
public class CssFlexShrink extends org.w3c.css.properties.css.CssFlexShrink {

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

	/**
	 * Creates a new CssFlexShrink
	 *
	 * @param expression The expression for this property
	 * @throws org.w3c.css.util.InvalidParamException
	 *          Expressions are incorrect
	 */
	public CssFlexShrink(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();

		switch (val.getType()) {
			case CssTypes.CSS_NUMBER:
				CssNumber num = val.getNumber();
				num.checkPositiveness(ac, this);
				break;
			case CssTypes.CSS_IDENT:
				CssIdent ident = (CssIdent) val;
				if (inherit.equals(ident)) {
					value = inherit;
					break;
				}
				// let it flow
			default:
				throw new InvalidParamException("value",
						val.toString(),
						getPropertyName(), ac);
		}
		expression.next();

	}

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

}

Received on Sunday, 7 October 2012 13:17:31 UTC