- From: CVS User ylafon <cvsmail@w3.org>
- Date: Mon, 24 Nov 2014 14:48:05 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/properties/css3 In directory roscoe:/tmp/cvs-serv10883 Modified Files: CssFlex.java Log Message: added auto per flex wd version (might be removed again later --- /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssFlex.java 2012/10/08 07:20:48 1.1 +++ /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssFlex.java 2014/11/24 14:48:05 1.2 @@ -1,4 +1,4 @@ -// $Id: CssFlex.java,v 1.1 2012/10/08 07:20:48 ylafon Exp $ +// $Id: CssFlex.java,v 1.2 2014/11/24 14:48:05 ylafon Exp $ // Author: Yves Lafon <ylafon@w3.org> // // (c) COPYRIGHT MIT, ERCIM and Keio University, 2012. @@ -21,10 +21,12 @@ import java.math.BigDecimal; /** - * @spec http://www.w3.org/TR/2012/CR-css3-flexbox-20120918/#flex + * @spec http://www.w3.org/TR/2014/WD-css-flexbox-1-20140925/#propdef-flex */ public class CssFlex extends org.w3c.css.properties.css.CssFlexFlow { + public CssIdent auto = CssIdent.getIdent("auto"); + private CssFlexGrow flexGrow; private CssFlexShrink flexShrink; private CssFlexBasis flexBasis; @@ -85,6 +87,15 @@ } break; } + if (auto.equals(ident)) { + value = auto; + if (expression.getCount() > 1) { + throw new InvalidParamException("value", + val.toString(), + getPropertyName(), ac); + } + break; + } if (basisVal == null) { basisVal = CssFlexBasis.getAllowedIdent(ident); if (basisVal == null) { @@ -152,11 +163,17 @@ flexGrow.value = inherit; flexShrink.value = inherit; } else if (value == none) { - flexBasis.value = CssFlexBasis.auto; + flexBasis.value = CssFlexBasis.main_size; CssNumber z = new CssNumber(); z.setValue(BigDecimal.ZERO); flexGrow.value = z; flexShrink.value = z; + } else if (value == auto) { + flexBasis.value = CssFlexBasis.main_size; + CssNumber one = new CssNumber(); + one.setValue(BigDecimal.ONE); + flexGrow.value = one; + flexShrink.value = one; } else { CssValueList v = new CssValueList(); if (growVal != null) {
Received on Monday, 24 November 2014 14:48:07 UTC