- From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 29 Aug 2005 09:52:23 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/properties/css1 In directory hutz:/tmp/cvs-serv2159 Modified Files: CssBackground.java CssBackgroundCSS1.java CssBackgroundCSS2.java CssBackgroundPosition.java CssBackgroundPositionCSS1.java CssBackgroundPositionCSS2.java Log Message: Jean-Guilhem Rouel: Fixes issues with the background property Index: CssBackgroundCSS1.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css1/CssBackgroundCSS1.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- CssBackgroundCSS1.java 26 Aug 2005 14:09:49 -0000 1.2 +++ CssBackgroundCSS1.java 29 Aug 2005 09:52:21 -0000 1.3 @@ -6,6 +6,9 @@ // Please first read the full copyright statement in file COPYRIGHT.html /* * $Log$ + * Revision 1.3 2005/08/29 09:52:21 ylafon + * Jean-Guilhem Rouel: Fixes issues with the background property + * * Revision 1.2 2005/08/26 14:09:49 ylafon * All changes made by Jean-Guilhem Rouel: * @@ -194,8 +197,12 @@ } } if (!find && position == null) { - position = new CssBackgroundPositionCSS1(ac, expression); - find = true; + try { + position = new CssBackgroundPositionCSS1(ac, expression); + find = true; + } catch (InvalidParamException e) { + // nothing to do + } } if (op != SPACE) { throw new InvalidParamException("operator", Index: CssBackground.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css1/CssBackground.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- CssBackground.java 26 Aug 2005 14:09:49 -0000 1.2 +++ CssBackground.java 29 Aug 2005 09:52:21 -0000 1.3 @@ -6,6 +6,9 @@ // Please first read the full copyright statement in file COPYRIGHT.html /* * $Log$ + * Revision 1.3 2005/08/29 09:52:21 ylafon + * Jean-Guilhem Rouel: Fixes issues with the background property + * * Revision 1.2 2005/08/26 14:09:49 ylafon * All changes made by Jean-Guilhem Rouel: * @@ -220,8 +223,12 @@ } } if (!find && position == null) { - position = new CssBackgroundPosition(ac, expression); - find = true; + try { + position = new CssBackgroundPosition(ac, expression); + find = true; + } catch (InvalidParamException e) { + // nothing to do + } } if (op != SPACE) { if (op != SLASH) { Index: CssBackgroundPosition.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css1/CssBackgroundPosition.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- CssBackgroundPosition.java 26 Aug 2005 14:09:49 -0000 1.2 +++ CssBackgroundPosition.java 29 Aug 2005 09:52:21 -0000 1.3 @@ -6,6 +6,9 @@ // Please first read the full copyright statement in file COPYRIGHT.html /* * $Log$ + * Revision 1.3 2005/08/29 09:52:21 ylafon + * Jean-Guilhem Rouel: Fixes issues with the background property + * * Revision 1.2 2005/08/26 14:09:49 ylafon * All changes made by Jean-Guilhem Rouel: * @@ -220,7 +223,7 @@ // two keywords if(next instanceof CssIdent) { int index2 = IndexOfIdent((String) next.get()); - if(index2 == -1) { + if(index2 == -1 && check) { throw new InvalidParamException("value", next, "background-position", ac); } // one is vertical, the other is vertical @@ -277,7 +280,7 @@ // a percentage/length and an keyword if(next instanceof CssIdent) { int index = IndexOfIdent((String) next.get()); - if(index == -1) { + if(check && index == -1) { throw new InvalidParamException("value", val, "background-position", ac); } // the keyword must be a vertical one Index: CssBackgroundPositionCSS1.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css1/CssBackgroundPositionCSS1.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- CssBackgroundPositionCSS1.java 26 Aug 2005 14:09:49 -0000 1.2 +++ CssBackgroundPositionCSS1.java 29 Aug 2005 09:52:21 -0000 1.3 @@ -6,6 +6,9 @@ // Please first read the full copyright statement in file COPYRIGHT.html /* * $Log$ + * Revision 1.3 2005/08/29 09:52:21 ylafon + * Jean-Guilhem Rouel: Fixes issues with the background property + * * Revision 1.2 2005/08/26 14:09:49 ylafon * All changes made by Jean-Guilhem Rouel: * @@ -220,7 +223,7 @@ // two keywords if(next instanceof CssIdent) { int index2 = IndexOfIdent((String) next.get()); - if(index2 == -1) { + if(index2 == -1 && check) { throw new InvalidParamException("value", next, "background-position", ac); } // one is vertical, the other is vertical Index: CssBackgroundCSS2.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css1/CssBackgroundCSS2.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- CssBackgroundCSS2.java 26 Aug 2005 14:09:49 -0000 1.2 +++ CssBackgroundCSS2.java 29 Aug 2005 09:52:21 -0000 1.3 @@ -6,6 +6,9 @@ // Please first read the full copyright statement in file COPYRIGHT.html /* * $Log$ + * Revision 1.3 2005/08/29 09:52:21 ylafon + * Jean-Guilhem Rouel: Fixes issues with the background property + * * Revision 1.2 2005/08/26 14:09:49 ylafon * All changes made by Jean-Guilhem Rouel: * @@ -159,7 +162,7 @@ find = false; val = expression.getValue(); op = expression.getOperator(); - + if (val == null) { break; } @@ -186,10 +189,10 @@ } } if (!find && repeat == null) { - try { - repeat = new CssBackgroundRepeatCSS2(ac, expression); + try { + repeat = new CssBackgroundRepeatCSS2(ac, expression); find = true; - } catch (InvalidParamException e) { + } catch (InvalidParamException e) { // nothing to do, attachment will test this value } } @@ -202,8 +205,12 @@ } } if (!find && position == null) { - position = new CssBackgroundPositionCSS2(ac, expression); - find = true; + try { + position = new CssBackgroundPositionCSS2(ac, expression); + find = true; + } catch (InvalidParamException e) { + // nothing to do + } } if(check && val != null && !find) { throw new InvalidParamException("unrecognize", ac); Index: CssBackgroundPositionCSS2.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css1/CssBackgroundPositionCSS2.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- CssBackgroundPositionCSS2.java 26 Aug 2005 14:09:49 -0000 1.2 +++ CssBackgroundPositionCSS2.java 29 Aug 2005 09:52:21 -0000 1.3 @@ -6,6 +6,9 @@ // Please first read the full copyright statement in file COPYRIGHT.html /* * $Log$ + * Revision 1.3 2005/08/29 09:52:21 ylafon + * Jean-Guilhem Rouel: Fixes issues with the background property + * * Revision 1.2 2005/08/26 14:09:49 ylafon * All changes made by Jean-Guilhem Rouel: * @@ -220,9 +223,9 @@ // two keywords if(next instanceof CssIdent) { int index2 = IndexOfIdent((String) next.get()); - if(index2 == -1) { - throw new InvalidParamException("value", next, "background-position", ac); - } + if(index2 == -1 && check) { + throw new InvalidParamException("value", next, "background-position", ac); + } // one is vertical, the other is vertical // or the two are 'center' if((isHorizontal(index1) && isVertical(index2)) || @@ -277,7 +280,7 @@ // a percentage/length and an keyword if(next instanceof CssIdent) { int index = IndexOfIdent((String) next.get()); - if(index == -1) { + if(check && index == -1) { throw new InvalidParamException("value", next, "background-position", ac); } // the keyword must be a vertical one
Received on Monday, 29 August 2005 09:52:32 UTC