- From: CVS User ylafon <cvsmail@w3.org>
- Date: Thu, 03 Jan 2013 14:57:08 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/properties/css2 In directory roscoe:/tmp/cvs-serv15672/css2 Modified Files: Css2Style.java Added Files: CssCue.java CssCueAfter.java CssCueBefore.java Log Message: cue/cue-before/cue-after per css2/css21/css3 http://www.w3.org/TR/2012/CR-css3-speech-20120320/#cue --- /sources/public/2002/css-validator/org/w3c/css/properties/css2/Css2Style.java 2013/01/02 13:48:14 1.39 +++ /sources/public/2002/css-validator/org/w3c/css/properties/css2/Css2Style.java 2013/01/03 14:57:08 1.40 @@ -1,5 +1,5 @@ // -// $Id: Css2Style.java,v 1.39 2013/01/02 13:48:14 ylafon Exp $ +// $Id: Css2Style.java,v 1.40 2013/01/03 14:57:08 ylafon Exp $ // From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr) // // (c) COPYRIGHT MIT and INRIA, 1997. @@ -16,6 +16,9 @@ import org.w3c.css.properties.css.CssClip; import org.w3c.css.properties.css.CssCounterIncrement; import org.w3c.css.properties.css.CssCounterReset; +import org.w3c.css.properties.css.CssCue; +import org.w3c.css.properties.css.CssCueAfter; +import org.w3c.css.properties.css.CssCueBefore; import org.w3c.css.properties.css.CssCursor; import org.w3c.css.properties.css.CssDirection; import org.w3c.css.properties.css.CssElevation; @@ -54,7 +57,7 @@ import org.w3c.css.values.CssIdent; /** - * @version $Revision: 1.39 $ + * @version $Revision: 1.40 $ */ public class Css2Style extends ACssStyle { @@ -72,6 +75,9 @@ public CssRichness cssRichness; public CssStress cssStress; public CssPitchRange cssPitchRange; + public CssCueAfter cssCueAfter; + public CssCueBefore cssCueBefore; + public CssCue cssCue; /** * font properties @@ -582,6 +588,33 @@ } return cssPitchRange; } + + public final CssCueAfter getCueAfter() { + if (cssCueAfter == null) { + cssCueAfter = + (CssCueAfter) style.CascadingOrder(new CssCueAfter(), + style, selector); + } + return cssCueAfter; + } + + public final CssCueBefore getCueBefore() { + if (cssCueBefore == null) { + cssCueBefore = + (CssCueBefore) style.CascadingOrder(new CssCueBefore(), + style, selector); + } + return cssCueBefore; + } + + public final CssCue getCue() { + if (cssCue == null) { + cssCue = + (CssCue) style.CascadingOrder(new CssCue(), + style, selector); + } + return cssCue; + } /** * Find conflicts in this Style * --- /sources/public/2002/css-validator/org/w3c/css/properties/css2/CssCue.java 2013/01/03 14:57:08 NONE +++ /sources/public/2002/css-validator/org/w3c/css/properties/css2/CssCue.java 2013/01/03 14:57:08 1.1 // $Id: CssCue.java,v 1.1 2013/01/03 14:57:08 ylafon Exp $ // Author: Yves Lafon <ylafon@w3.org> // // (c) COPYRIGHT MIT, ERCIM and Keio University, 2013. // Please first read the full copyright statement in file COPYRIGHT.html package org.w3c.css.properties.css2; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; import org.w3c.css.values.CssOperator; import org.w3c.css.values.CssValue; import org.w3c.css.values.CssValueList; import java.util.ArrayList; /** * @spec http://www.w3.org/TR/2008/REC-CSS2-20080411/aural.html#propdef-cue */ public class CssCue extends org.w3c.css.properties.css.CssCue { /** * Create a new CssCue */ public CssCue() { } /** * Creates a new CssCue * * @param expression The expression for this property * @throws org.w3c.css.util.InvalidParamException * Expressions are incorrect */ public CssCue(ApplContext ac, CssExpression expression, boolean check) throws InvalidParamException { if (check && expression.getCount() > 2) { throw new InvalidParamException("unrecognize", ac); } setByUser(); char op; cssCueBefore = new CssCueBefore(ac, expression, false); if (expression.end()) { cssCueAfter = new CssCueAfter(); cssCueAfter.value = cssCueBefore.value; value = cssCueBefore.value; } else { op = expression.getOperator(); if (op != CssOperator.SPACE) { throw new InvalidParamException("operator", ((new Character(op)).toString()), ac); } cssCueAfter = new CssCueAfter(ac, expression, false); if (cssCueBefore.value == inherit || cssCueAfter.value == inherit) { throw new InvalidParamException("value", inherit, getPropertyName(), ac); } ArrayList<CssValue> values = new ArrayList<CssValue>(2); values.add(cssCueBefore.value); values.add(cssCueAfter.value); value = new CssValueList(values); } } public CssCue(ApplContext ac, CssExpression expression) throws InvalidParamException { this(ac, expression, false); } } --- /sources/public/2002/css-validator/org/w3c/css/properties/css2/CssCueAfter.java 2013/01/03 14:57:08 NONE +++ /sources/public/2002/css-validator/org/w3c/css/properties/css2/CssCueAfter.java 2013/01/03 14:57:08 1.1 // $Id: CssCueAfter.java,v 1.1 2013/01/03 14:57:08 ylafon Exp $ // Author: Yves Lafon <ylafon@w3.org> // // (c) COPYRIGHT MIT, ERCIM and Keio University, 2013. // Please first read the full copyright statement in file COPYRIGHT.html package org.w3c.css.properties.css2; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; import org.w3c.css.values.CssTypes; import org.w3c.css.values.CssValue; /** * @spec http://www.w3.org/TR/2008/REC-CSS2-20080411/aural.html#propdef-cue-after */ public class CssCueAfter extends org.w3c.css.properties.css.CssCueAfter { /** * Create a new CssCueAfter */ public CssCueAfter() { } /** * Creates a new CssCueAfter * * @param expression The expression for this property * @throws org.w3c.css.util.InvalidParamException * Expressions are incorrect */ public CssCueAfter(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_URL: value = val; break; case CssTypes.CSS_IDENT: if (inherit.equals(val)) { value = inherit; break; } if (none.equals(val)) { value = none; break; } default: throw new InvalidParamException("value", val.toString(), getPropertyName(), ac); } expression.next(); } public CssCueAfter(ApplContext ac, CssExpression expression) throws InvalidParamException { this(ac, expression, false); } } --- /sources/public/2002/css-validator/org/w3c/css/properties/css2/CssCueBefore.java 2013/01/03 14:57:08 NONE +++ /sources/public/2002/css-validator/org/w3c/css/properties/css2/CssCueBefore.java 2013/01/03 14:57:08 1.1 // $Id: CssCueBefore.java,v 1.1 2013/01/03 14:57:08 ylafon Exp $ // Author: Yves Lafon <ylafon@w3.org> // // (c) COPYRIGHT MIT, ERCIM and Keio University, 2013. // Please first read the full copyright statement in file COPYRIGHT.html package org.w3c.css.properties.css2; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; import org.w3c.css.values.CssTypes; import org.w3c.css.values.CssValue; /** * @spec http://www.w3.org/TR/2008/REC-CSS2-20080411/aural.html#propdef-cue-before */ public class CssCueBefore extends org.w3c.css.properties.css.CssCueBefore { /** * Create a new CssCueBefore */ public CssCueBefore() { } /** * Creates a new CssCueBefore * * @param expression The expression for this property * @throws org.w3c.css.util.InvalidParamException * Expressions are incorrect */ public CssCueBefore(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_URL: value = val; break; case CssTypes.CSS_IDENT: if (inherit.equals(val)) { value = inherit; break; } if (none.equals(val)) { value = none; break; } default: throw new InvalidParamException("value", val.toString(), getPropertyName(), ac); } expression.next(); } public CssCueBefore(ApplContext ac, CssExpression expression) throws InvalidParamException { this(ac, expression, false); } }
Received on Thursday, 3 January 2013 14:57:09 UTC