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

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

From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
Date: Sun, 07 Oct 2012 13:37:31 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1TKr2x-00076S-7W@lionel-hutz.w3.org>
Update of /sources/public/2002/css-validator/org/w3c/css/properties/css3
In directory hutz:/tmp/cvs-serv27236/css3

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

Index: Css3Style.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/Css3Style.java,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -d -r1.108 -r1.109
--- Css3Style.java	7 Oct 2012 13:17:28 -0000	1.108
+++ Css3Style.java	7 Oct 2012 13:37:29 -0000	1.109
@@ -56,6 +56,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.CssOrder;
 import org.w3c.css.properties.css.CssOverflowStyle;
 import org.w3c.css.properties.css.CssOverflowWrap;
 import org.w3c.css.properties.css.CssTabSize;
@@ -166,6 +167,7 @@
 	public CssFlexGrow cssFlexGrow;
 	public CssFlexShrink cssFlexShrink;
 	public CssJustifyContent cssJustifyContent;
+	public CssOrder cssOrder;
 	
 	CssDropInitialAfterAdjust cssDropInitialAfterAdjust;
 	CssDropInitialAfterAlign cssDropInitialAfterAlign;
@@ -1224,6 +1226,15 @@
 		}
 		return cssJustifyContent;
 	}
+
+	public CssOrder getOrder() {
+		if (cssOrder == null) {
+			cssOrder =
+					(CssOrder) style.CascadingOrder(
+							new CssOrder(), style, selector);
+		}
+		return cssOrder;
+	}
 	
 	///
 

--- NEW FILE: CssOrder.java ---
// $Id: CssOrder.java,v 1.1 2012/10/07 13:37:29 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/#order
 */
public class CssOrder extends org.w3c.css.properties.css.CssOrder {

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

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

}
Received on Sunday, 7 October 2012 13:37:32 UTC

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