W3C home > Mailing lists > Public > www-validator-cvs@w3.org > October 2012

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

From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
Date: Sun, 07 Oct 2012 13:12:20 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1TKqea-0005hp-2D@lionel-hutz.w3.org>
Update of /sources/public/2002/css-validator/org/w3c/css/properties/css3
In directory hutz:/tmp/cvs-serv21874/css3

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

Index: Css3Style.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/Css3Style.java,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -d -r1.106 -r1.107
--- Css3Style.java	7 Oct 2012 12:59:37 -0000	1.106
+++ Css3Style.java	7 Oct 2012 13:12:17 -0000	1.107
@@ -34,6 +34,7 @@
 import org.w3c.css.properties.css.CssColumns;
 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.CssFlexWrap;
 import org.w3c.css.properties.css.CssFontFeatureSettings;
 import org.w3c.css.properties.css.CssFontKerning;
@@ -161,6 +162,7 @@
 	public CssFlexDirection cssFlexDirection;
 	public CssFlexWrap cssFlexWrap;
 	public CssFlexFlow cssFlexFlow;
+	public CssFlexGrow cssFlexGrow;
 	public CssJustifyContent cssJustifyContent;
 	
 	CssDropInitialAfterAdjust cssDropInitialAfterAdjust;
@@ -1194,6 +1196,15 @@
 		return cssFlexFlow;
 	}
 
+	public CssFlexGrow getFlexGrow() {
+		if (cssFlexGrow == null) {
+			cssFlexGrow =
+					(CssFlexGrow) style.CascadingOrder(
+							new CssFlexGrow(), style, selector);
+		}
+		return cssFlexGrow;
+	}
+	
 	public CssJustifyContent getJustifyContent() {
 		if (cssJustifyContent == null) {
 			cssJustifyContent =

--- NEW FILE: CssFlexGrow.java ---
// $Id: CssFlexGrow.java,v 1.1 2012/10/07 13:12:17 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-grow
 */
public class CssFlexGrow extends org.w3c.css.properties.css.CssFlexGrow {

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

	/**
	 * Creates a new CssFlexGrow
	 *
	 * @param expression The expression for this property
	 * @throws org.w3c.css.util.InvalidParamException
	 *          Expressions are incorrect
	 */
	public CssFlexGrow(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 CssFlexGrow(ApplContext ac, CssExpression expression)
			throws InvalidParamException {
		this(ac, expression, false);
	}

}
Received on Sunday, 7 October 2012 13:12:21 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:52 UTC