- From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
- Date: Sun, 07 Oct 2012 10:41:53 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/properties/css3 In directory hutz:/tmp/cvs-serv21488/css3 Modified Files: Css3Style.java Added Files: CssAlignContent.java CssAlignItems.java CssAlignSelf.java Log Message: css align-content/items/self per http://www.w3.org/TR/2012/CR-css3-flexbox-20120918/ --- NEW FILE: CssAlignSelf.java --- // $Id: CssAlignSelf.java,v 1.1 2012/10/07 10:41:51 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/#align-self */ public class CssAlignSelf extends org.w3c.css.properties.css.CssAlignSelf { public static final CssIdent[] allowed_values; static { String[] _allowed_values = {"auto", "flex-start", "flex-end", "center", "baseline", "stretch"}; 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 CssAlignSelf */ public CssAlignSelf() { value = initial; } /** * Creates a new CssAlignSelf * * @param expression The expression for this property * @throws org.w3c.css.util.InvalidParamException * Expressions are incorrect */ public CssAlignSelf(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 CssAlignSelf(ApplContext ac, CssExpression expression) throws InvalidParamException { this(ac, expression, false); } } --- NEW FILE: CssAlignContent.java --- // $Id: CssAlignContent.java,v 1.1 2012/10/07 10:41:51 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/#align-content */ public class CssAlignContent extends org.w3c.css.properties.css.CssAlignContent { public static final CssIdent[] allowed_values; static { String[] _allowed_values = {"flex-start", "flex-end", "center", "space-between", "space-around", "stretch"}; 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 CssAlignContent */ public CssAlignContent() { value = initial; } /** * Creates a new CssAlignContent * * @param expression The expression for this property * @throws org.w3c.css.util.InvalidParamException * Expressions are incorrect */ public CssAlignContent(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 CssAlignContent(ApplContext ac, CssExpression expression) throws InvalidParamException { this(ac, expression, false); } } --- NEW FILE: CssAlignItems.java --- // $Id: CssAlignItems.java,v 1.1 2012/10/07 10:41:51 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/#align-items */ public class CssAlignItems extends org.w3c.css.properties.css.CssAlignItems { public static final CssIdent[] allowed_values; static { String[] _allowed_values = {"flex-start", "flex-end", "center", "baseline", "stretch"}; 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 CssAlignItems */ public CssAlignItems() { value = initial; } /** * Creates a new CssAlignItems * * @param expression The expression for this property * @throws org.w3c.css.util.InvalidParamException * Expressions are incorrect */ public CssAlignItems(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 CssAlignItems(ApplContext ac, CssExpression expression) throws InvalidParamException { this(ac, expression, false); } } Index: Css3Style.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/Css3Style.java,v retrieving revision 1.101 retrieving revision 1.102 diff -u -d -r1.101 -r1.102 --- Css3Style.java 4 Oct 2012 10:26:21 -0000 1.101 +++ Css3Style.java 7 Oct 2012 10:41:51 -0000 1.102 @@ -11,6 +11,9 @@ import org.w3c.css.parser.CssSelectors; import org.w3c.css.properties.atsc.ATSCStyle; +import org.w3c.css.properties.css.CssAlignContent; +import org.w3c.css.properties.css.CssAlignItems; +import org.w3c.css.properties.css.CssAlignSelf; import org.w3c.css.properties.css.CssBackgroundClip; import org.w3c.css.properties.css.CssBackgroundOrigin; import org.w3c.css.properties.css.CssBackgroundSize; @@ -148,6 +151,10 @@ public CssTransitionProperty cssTransitionProperty; public CssTransitionTimingFunction cssTransitionTimingFunction; + public CssAlignContent cssAlignContent; + public CssAlignItems cssAlignItems; + public CssAlignSelf cssAlignSelf; + CssDropInitialAfterAdjust cssDropInitialAfterAdjust; CssDropInitialAfterAlign cssDropInitialAfterAlign; CssDropInitialBeforeAdjust cssDropInitialBeforeAdjust; @@ -1124,7 +1131,33 @@ } return cssTransition; } - + + public CssAlignContent getAlignContent() { + if (cssAlignContent == null) { + cssAlignContent = + (CssAlignContent) style.CascadingOrder( + new CssAlignContent(), style, selector); + } + return cssAlignContent; + } + + public CssAlignItems getAlignItems() { + if (cssAlignItems == null) { + cssAlignItems = + (CssAlignItems) style.CascadingOrder( + new CssAlignItems(), style, selector); + } + return cssAlignItems; + } + + public CssAlignSelf getAlignSelf() { + if (cssAlignSelf == null) { + cssAlignSelf = + (CssAlignSelf) style.CascadingOrder( + new CssAlignSelf(), style, selector); + } + return cssAlignSelf; + } /// /**
Received on Sunday, 7 October 2012 10:41:55 UTC