- From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 05 Jan 2010 13:49:49 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/properties/css2/font In directory hutz:/tmp/cvs-serv25562/org/w3c/css/properties/css2/font Modified Files: Ascent.java Baseline.java Bbox.java CapHeight.java Centerline.java DefinitionSrc.java Descent.java FontFamily.java FontProperty.java FontSize.java FontStretch.java FontStyle.java FontVariant.java FontWeight.java Mathline.java Panose1.java Slope.java Src.java Stemh.java Stemv.java Topline.java UnicodeRange.java UnitsPerEm.java Widths.java XHeight.java Log Message: Implementation of css3-background (partial, missing background-color and background, also borders not done) cf. http://www.w3.org/TR/2009/CR-css3-background-20091217/ moved and corrected implementation of css3-multicol cf. http://www.w3.org/TR/2009/CR-css3-multicol-20091217/ Some reorganization of code. Index: FontFamily.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/font/FontFamily.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- FontFamily.java 14 Sep 2005 15:14:58 -0000 1.2 +++ FontFamily.java 5 Jan 2010 13:49:47 -0000 1.3 @@ -13,7 +13,7 @@ import java.util.Vector; import org.w3c.css.parser.CssStyle; -import org.w3c.css.properties.css1.CssProperty; +import org.w3c.css.properties.css.CssProperty; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.util.Util; Index: Topline.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/font/Topline.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Topline.java 14 Sep 2005 15:14:58 -0000 1.2 +++ Topline.java 5 Jan 2010 13:49:47 -0000 1.3 @@ -9,7 +9,7 @@ package org.w3c.css.properties.css2.font; import org.w3c.css.parser.CssStyle; -import org.w3c.css.properties.css1.CssProperty; +import org.w3c.css.properties.css.CssProperty; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; Index: UnitsPerEm.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/font/UnitsPerEm.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- UnitsPerEm.java 14 Sep 2005 15:14:58 -0000 1.2 +++ UnitsPerEm.java 5 Jan 2010 13:49:47 -0000 1.3 @@ -9,7 +9,7 @@ package org.w3c.css.properties.css2.font; import org.w3c.css.parser.CssStyle; -import org.w3c.css.properties.css1.CssProperty; +import org.w3c.css.properties.css.CssProperty; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; Index: Baseline.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/font/Baseline.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Baseline.java 14 Sep 2005 15:14:58 -0000 1.2 +++ Baseline.java 5 Jan 2010 13:49:46 -0000 1.3 @@ -9,7 +9,7 @@ package org.w3c.css.properties.css2.font; import org.w3c.css.parser.CssStyle; -import org.w3c.css.properties.css1.CssProperty; +import org.w3c.css.properties.css.CssProperty; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; Index: Slope.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/font/Slope.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Slope.java 14 Sep 2005 15:14:58 -0000 1.2 +++ Slope.java 5 Jan 2010 13:49:47 -0000 1.3 @@ -9,7 +9,7 @@ package org.w3c.css.properties.css2.font; import org.w3c.css.parser.CssStyle; -import org.w3c.css.properties.css1.CssProperty; +import org.w3c.css.properties.css.CssProperty; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; Index: Bbox.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/font/Bbox.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Bbox.java 14 Sep 2005 15:14:58 -0000 1.2 +++ Bbox.java 5 Jan 2010 13:49:47 -0000 1.3 @@ -9,7 +9,7 @@ package org.w3c.css.properties.css2.font; import org.w3c.css.parser.CssStyle; -import org.w3c.css.properties.css1.CssProperty; +import org.w3c.css.properties.css.CssProperty; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; Index: UnicodeRange.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/font/UnicodeRange.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- UnicodeRange.java 14 Sep 2005 15:14:58 -0000 1.2 +++ UnicodeRange.java 5 Jan 2010 13:49:47 -0000 1.3 @@ -8,88 +8,84 @@ */ package org.w3c.css.properties.css2.font; -import java.util.Vector; - import org.w3c.css.parser.CssStyle; -import org.w3c.css.properties.css1.CssProperty; +import org.w3c.css.properties.css.CssProperty; 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.CssUnicodeRange; +import org.w3c.css.values.CssTypes; import org.w3c.css.values.CssValue; +import java.util.ArrayList; + /** */ public class UnicodeRange extends CssProperty { - Vector values = new Vector(); + ArrayList<CssValue> values = new ArrayList<CssValue>(); /** * Create a new UnicodeRange */ public UnicodeRange() { - // nothing to do + // nothing to do } /** * Creates a new UnicodeRange * * @param expression the unicode range - * @exception InvalidParamException values are incorrect + * @throws InvalidParamException values are incorrect */ public UnicodeRange(ApplContext ac, CssExpression expression, - boolean check) throws InvalidParamException { - char op = expression.getOperator(); - CssValue val = expression.getValue(); - setByUser(); + boolean check) throws InvalidParamException { + char op; + CssValue val = expression.getValue(); + setByUser(); - do { - if (val instanceof CssUnicodeRange) { - // nothing - } else { - throw new InvalidParamException("value", expression.getValue(), - getPropertyName(), ac); - } - values.addElement(val); - op = expression.getOperator(); - expression.next(); - } while (op == CssOperator.COMMA); + do { + if (val.getType() != CssTypes.CSS_UNICODE_RANGE) { + throw new InvalidParamException("value", expression.getValue(), + getPropertyName(), ac); + } + values.add(val); + op = expression.getOperator(); + expression.next(); + } while (op == CssOperator.COMMA); } public UnicodeRange(ApplContext ac, CssExpression expression) - throws InvalidParamException { - this(ac, expression, false); + throws InvalidParamException { + this(ac, expression, false); } /** * Returns the current value */ public Object get() { - return values.elementAt(0); + return values.get(0); } /** * Returns a string representation of the object. */ public String toString() { - String ret =""; - int i = 0; - - while (i < values.size()) { - ret += ", " + values.elementAt(i); - i++; - } - - return ret.substring(2); + StringBuilder sb = new StringBuilder(); + for (CssValue val : values) { + sb.append(val.toString()); + sb.append(", "); + } + sb.setLength(sb.length()-2); + return sb.toString(); } /** * Returns the name of this property */ public String getPropertyName() { - return "unicode-range"; + return "unicode-range"; } /** @@ -98,35 +94,35 @@ * @param style The CssStyle */ public void addToStyle(ApplContext ac, CssStyle style) { - Css2Style style0 = (Css2Style) style; - if (style0.unicodeRange != null) { - style0.addRedefinitionWarning(ac, this); - } - style0.unicodeRange = this; + Css2Style style0 = (Css2Style) style; + if (style0.unicodeRange != null) { + style0.addRedefinitionWarning(ac, this); + } + style0.unicodeRange = this; } /** * Get this property in the style. * - * @param style The style where the property is + * @param style The style where the property is * @param resolve if true, resolve the style to find this property */ public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) { - if (resolve) { - return ((Css2Style) style).getFaceUnicodeRange(); - } else { - return ((Css2Style) style).unicodeRange; - } + if (resolve) { + return ((Css2Style) style).getFaceUnicodeRange(); + } else { + return ((Css2Style) style).unicodeRange; + } } /** * Compares two properties for equality. * - * @param value The other property. + * @param property The other property. */ public boolean equals(CssProperty property) { - // @@TODO - return false; + // @@TODO + return false; } /** @@ -134,7 +130,7 @@ * It is used by all macro for the function <code>print</code> */ public boolean isDefault() { - return false; + return false; } } Index: FontVariant.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/font/FontVariant.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- FontVariant.java 14 Sep 2005 15:14:58 -0000 1.2 +++ FontVariant.java 5 Jan 2010 13:49:47 -0000 1.3 @@ -11,7 +11,7 @@ import java.util.Vector; import org.w3c.css.parser.CssStyle; -import org.w3c.css.properties.css1.CssProperty; +import org.w3c.css.properties.css.CssProperty; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; Index: Descent.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/font/Descent.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Descent.java 14 Sep 2005 15:14:58 -0000 1.2 +++ Descent.java 5 Jan 2010 13:49:47 -0000 1.3 @@ -9,7 +9,7 @@ package org.w3c.css.properties.css2.font; import org.w3c.css.parser.CssStyle; -import org.w3c.css.properties.css1.CssProperty; +import org.w3c.css.properties.css.CssProperty; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; Index: DefinitionSrc.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/font/DefinitionSrc.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- DefinitionSrc.java 14 Sep 2005 15:14:58 -0000 1.2 +++ DefinitionSrc.java 5 Jan 2010 13:49:47 -0000 1.3 @@ -9,7 +9,7 @@ package org.w3c.css.properties.css2.font; import org.w3c.css.parser.CssStyle; -import org.w3c.css.properties.css1.CssProperty; +import org.w3c.css.properties.css.CssProperty; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; Index: FontProperty.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/font/FontProperty.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- FontProperty.java 23 Aug 2005 16:33:50 -0000 1.1 +++ FontProperty.java 5 Jan 2010 13:49:47 -0000 1.2 @@ -9,7 +9,7 @@ package org.w3c.css.properties.css2.font; -import org.w3c.css.properties.css1.CssProperty; +import org.w3c.css.properties.css.CssProperty; /** * @version $Revision$ Index: FontWeight.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/font/FontWeight.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- FontWeight.java 14 Sep 2005 15:14:58 -0000 1.2 +++ FontWeight.java 5 Jan 2010 13:49:47 -0000 1.3 @@ -11,7 +11,7 @@ import java.util.Vector; import org.w3c.css.parser.CssStyle; -import org.w3c.css.properties.css1.CssProperty; +import org.w3c.css.properties.css.CssProperty; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; Index: CapHeight.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/font/CapHeight.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- CapHeight.java 14 Sep 2005 15:14:58 -0000 1.2 +++ CapHeight.java 5 Jan 2010 13:49:47 -0000 1.3 @@ -9,7 +9,7 @@ package org.w3c.css.properties.css2.font; import org.w3c.css.parser.CssStyle; -import org.w3c.css.properties.css1.CssProperty; +import org.w3c.css.properties.css.CssProperty; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; Index: Stemv.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/font/Stemv.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Stemv.java 14 Sep 2005 15:14:58 -0000 1.2 +++ Stemv.java 5 Jan 2010 13:49:47 -0000 1.3 @@ -9,7 +9,7 @@ package org.w3c.css.properties.css2.font; import org.w3c.css.parser.CssStyle; -import org.w3c.css.properties.css1.CssProperty; +import org.w3c.css.properties.css.CssProperty; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; Index: Mathline.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/font/Mathline.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Mathline.java 14 Sep 2005 15:14:58 -0000 1.2 +++ Mathline.java 5 Jan 2010 13:49:47 -0000 1.3 @@ -9,7 +9,7 @@ package org.w3c.css.properties.css2.font; import org.w3c.css.parser.CssStyle; -import org.w3c.css.properties.css1.CssProperty; +import org.w3c.css.properties.css.CssProperty; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; Index: FontStretch.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/font/FontStretch.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- FontStretch.java 14 Sep 2005 15:14:58 -0000 1.2 +++ FontStretch.java 5 Jan 2010 13:49:47 -0000 1.3 @@ -11,7 +11,7 @@ import java.util.Vector; import org.w3c.css.parser.CssStyle; -import org.w3c.css.properties.css1.CssProperty; +import org.w3c.css.properties.css.CssProperty; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; Index: Widths.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/font/Widths.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Widths.java 14 Sep 2005 15:14:58 -0000 1.2 +++ Widths.java 5 Jan 2010 13:49:47 -0000 1.3 @@ -11,7 +11,7 @@ import java.util.Vector; import org.w3c.css.parser.CssStyle; -import org.w3c.css.properties.css1.CssProperty; +import org.w3c.css.properties.css.CssProperty; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; Index: Ascent.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/font/Ascent.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Ascent.java 14 Sep 2005 15:14:58 -0000 1.2 +++ Ascent.java 5 Jan 2010 13:49:46 -0000 1.3 @@ -9,7 +9,7 @@ package org.w3c.css.properties.css2.font; import org.w3c.css.parser.CssStyle; -import org.w3c.css.properties.css1.CssProperty; +import org.w3c.css.properties.css.CssProperty; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; Index: Panose1.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/font/Panose1.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Panose1.java 14 Sep 2005 15:14:58 -0000 1.2 +++ Panose1.java 5 Jan 2010 13:49:47 -0000 1.3 @@ -9,7 +9,7 @@ package org.w3c.css.properties.css2.font; import org.w3c.css.parser.CssStyle; -import org.w3c.css.properties.css1.CssProperty; +import org.w3c.css.properties.css.CssProperty; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; Index: Stemh.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/font/Stemh.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Stemh.java 14 Sep 2005 15:14:58 -0000 1.2 +++ Stemh.java 5 Jan 2010 13:49:47 -0000 1.3 @@ -9,7 +9,7 @@ package org.w3c.css.properties.css2.font; import org.w3c.css.parser.CssStyle; -import org.w3c.css.properties.css1.CssProperty; +import org.w3c.css.properties.css.CssProperty; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; Index: Src.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/font/Src.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Src.java 14 Sep 2005 15:14:58 -0000 1.2 +++ Src.java 5 Jan 2010 13:49:47 -0000 1.3 @@ -10,7 +10,7 @@ import java.util.Vector; import org.w3c.css.parser.CssStyle; -import org.w3c.css.properties.css1.CssProperty; +import org.w3c.css.properties.css.CssProperty; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; Index: XHeight.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/font/XHeight.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- XHeight.java 14 Sep 2005 15:14:58 -0000 1.2 +++ XHeight.java 5 Jan 2010 13:49:47 -0000 1.3 @@ -9,7 +9,7 @@ package org.w3c.css.properties.css2.font; import org.w3c.css.parser.CssStyle; -import org.w3c.css.properties.css1.CssProperty; +import org.w3c.css.properties.css.CssProperty; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; Index: Centerline.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/font/Centerline.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Centerline.java 14 Sep 2005 15:14:58 -0000 1.2 +++ Centerline.java 5 Jan 2010 13:49:47 -0000 1.3 @@ -9,7 +9,7 @@ package org.w3c.css.properties.css2.font; import org.w3c.css.parser.CssStyle; -import org.w3c.css.properties.css1.CssProperty; +import org.w3c.css.properties.css.CssProperty; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; Index: FontSize.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/font/FontSize.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- FontSize.java 14 Sep 2005 15:14:58 -0000 1.2 +++ FontSize.java 5 Jan 2010 13:49:47 -0000 1.3 @@ -11,7 +11,7 @@ import java.util.Vector; import org.w3c.css.parser.CssStyle; -import org.w3c.css.properties.css1.CssProperty; +import org.w3c.css.properties.css.CssProperty; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; Index: FontStyle.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/font/FontStyle.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- FontStyle.java 14 Sep 2005 15:14:58 -0000 1.2 +++ FontStyle.java 5 Jan 2010 13:49:47 -0000 1.3 @@ -11,7 +11,7 @@ import java.util.Vector; import org.w3c.css.parser.CssStyle; -import org.w3c.css.properties.css1.CssProperty; +import org.w3c.css.properties.css.CssProperty; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression;
Received on Tuesday, 5 January 2010 13:50:22 UTC