- From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
- Date: Sun, 07 Oct 2012 12:16:49 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/properties/css3 In directory hutz:/tmp/cvs-serv10616/css3 Modified Files: Css3Style.java Added Files: CssFlexWrap.java Log Message: flex-wrap per http://www.w3.org/TR/2012/CR-css3-flexbox-20120918/#flex-wrap Index: Css3Style.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/Css3Style.java,v retrieving revision 1.103 retrieving revision 1.104 diff -u -d -r1.103 -r1.104 --- Css3Style.java 7 Oct 2012 12:01:28 -0000 1.103 +++ Css3Style.java 7 Oct 2012 12:16:46 -0000 1.104 @@ -33,6 +33,7 @@ import org.w3c.css.properties.css.CssColumnWidth; import org.w3c.css.properties.css.CssColumns; import org.w3c.css.properties.css.CssFlexDirection; +import org.w3c.css.properties.css.CssFlexWrap; import org.w3c.css.properties.css.CssFontFeatureSettings; import org.w3c.css.properties.css.CssFontKerning; import org.w3c.css.properties.css.CssFontLanguageOverride; @@ -156,6 +157,7 @@ public CssAlignItems cssAlignItems; public CssAlignSelf cssAlignSelf; public CssFlexDirection cssFlexDirection; + public CssFlexWrap cssFlexWrap; CssDropInitialAfterAdjust cssDropInitialAfterAdjust; CssDropInitialAfterAlign cssDropInitialAfterAlign; @@ -1169,6 +1171,15 @@ } return cssFlexDirection; } + + public CssFlexWrap getFlexWrap() { + if (cssFlexWrap == null) { + cssFlexWrap = + (CssFlexWrap) style.CascadingOrder( + new CssFlexWrap(), style, selector); + } + return cssFlexWrap; + } /// --- NEW FILE: CssFlexWrap.java --- // $Id: CssFlexWrap.java,v 1.1 2012/10/07 12:16:47 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; /** * @spec http://www.w3.org/TR/2012/CR-css3-flexbox-20120918/#flex-wrap */ public class CssFlexWrap extends org.w3c.css.properties.css.CssFlexWrap { public static final CssIdent[] allowed_values; static { String[] _allowed_values = {"nowrap", "wrap", "wrap-reverse"}; allowed_values = new CssIdent[_allowed_values.length]; int i = 0; for (String s : _allowed_values) { allowed_values[i++] = CssIdent.getIdent(s); } } public static CssIdent getAllowedIdent(CssIdent ident) { for (CssIdent id : allowed_values) { if (id.equals(ident)) { return id; } } return null; } /** * Create a new CssFlexWrap */ public CssFlexWrap() { value = initial; } /** * Creates a new CssFlexWrap * * @param expression The expression for this property * @throws org.w3c.css.util.InvalidParamException * Expressions are incorrect */ public CssFlexWrap(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 = getAllowedIdent(ident); if (value == null) { throw new InvalidParamException("value", val.toString(), getPropertyName(), ac); } } } else { throw new InvalidParamException("value", val.toString(), getPropertyName(), ac); } expression.next(); } public CssFlexWrap(ApplContext ac, CssExpression expression) throws InvalidParamException { this(ac, expression, false); } }
Received on Sunday, 7 October 2012 12:16:51 UTC