- From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 25 Apr 2012 20:21:54 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/css In directory hutz:/tmp/cvs-serv23918/w3c/css/css Modified Files: CssCascadingOrder.java CssParser.java CssStyleRule.java Log Message: Finished implementation of css3-background (background and borders) * border is now a single item, instead of one per level * able to parse all the positive tests, some negative ones will need some tuning * Grammar modification to use the '/' between two numbers without matching a ratio Index: CssParser.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/css/CssParser.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- CssParser.java 9 Feb 2012 17:36:26 -0000 1.7 +++ CssParser.java 25 Apr 2012 20:21:52 -0000 1.8 @@ -78,7 +78,7 @@ * @param url the URL where the input stream comes from. * @param lineno The number line in the source document. * It is used for error message - * @see #parseStyleElement(InputStream, URL, int) + * @see #parseStyleElement(ApplContext, InputStream, String, String, URL, int) * @deprecated Replaced by parseStyleElement */ public abstract void parseStyleElement(ApplContext ac, String input, Index: CssStyleRule.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/css/CssStyleRule.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- CssStyleRule.java 21 Oct 2011 01:49:06 -0000 1.21 +++ CssStyleRule.java 25 Apr 2012 20:21:52 -0000 1.22 @@ -45,9 +45,7 @@ StringBuilder ret = new StringBuilder(); if (selectors != null) { ret.append(selectors); - ret.append(' '); - ret.append('{'); - ret.append('\n'); + ret.append(" {\n"); } for (CssProperty property : properties) { @@ -59,14 +57,11 @@ if (property.getImportant()) { ret.append(" important"); } - ret.append(';'); - ret.append('\n'); + ret.append(";\n"); } if (selectors != null) { ret.append(indent); - ret.append('}'); - ret.append('\n'); - ret.append('\n'); + ret.append("}\n\n"); } return ret.toString(); } Index: CssCascadingOrder.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/css/CssCascadingOrder.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- CssCascadingOrder.java 14 Aug 2011 09:02:19 -0000 1.10 +++ CssCascadingOrder.java 25 Apr 2012 20:21:52 -0000 1.11 @@ -205,30 +205,29 @@ propertyData.add(property); } -} - // all compare functions used in the cascading order -class CompareExplicitWeight implements Comparator<CssProperty> { - public final int compare(CssProperty property1, CssProperty property2) { - int val1 = property1.getExplicitWeight(); - int val2 = property2.getExplicitWeight(); - return (val1 - val2); + class CompareExplicitWeight implements Comparator<CssProperty> { + public final int compare(CssProperty property1, CssProperty property2) { + int val1 = property1.getExplicitWeight(); + int val2 = property2.getExplicitWeight(); + return (val1 - val2); + } } -} -class CompareSpecificity implements Comparator<CssProperty> { - public final int compare(CssProperty property1, CssProperty property2) { - int val1 = property1.getSelectors().getSpecificity(); - int val2 = property2.getSelectors().getSpecificity(); - return (val1 - val2); + class CompareSpecificity implements Comparator<CssProperty> { + public final int compare(CssProperty property1, CssProperty property2) { + int val1 = property1.getSelectors().getSpecificity(); + int val2 = property2.getSelectors().getSpecificity(); + return (val1 - val2); + } } -} -class CompareOrderSpecified implements Comparator<CssProperty> { - public final int compare(CssProperty property1, CssProperty property2) { - long val1 = property1.getOrderSpecified(); - long val2 = property2.getOrderSpecified(); - return ((int) (val1 - val2)); + class CompareOrderSpecified implements Comparator<CssProperty> { + public final int compare(CssProperty property1, CssProperty property2) { + long val1 = property1.getOrderSpecified(); + long val2 = property2.getOrderSpecified(); + return ((int) (val1 - val2)); + } } }
Received on Wednesday, 25 April 2012 20:22:27 UTC