W3C home > Mailing lists > Public > www-validator-cvs@w3.org > April 2006

2002/css-validator/org/w3c/css/parser AtRuleMedia.java,1.9,1.10 CssFouffa.java,1.35,1.36 CssPropertyFactory.java,1.14,1.15 CssSelectors.java,1.18,1.19

From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 19 Apr 2006 11:28:07 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1FWAqt-0005ho-Ja@lionel-hutz.w3.org>

Update of /sources/public/2002/css-validator/org/w3c/css/parser
In directory hutz:/tmp/cvs-serv26855/org/w3c/css/parser

Modified Files:
	AtRuleMedia.java CssFouffa.java CssPropertyFactory.java 
	CssSelectors.java 
Log Message:
Jean-Gui strikes back!
http://www.w3.org/Bugs/Public/show_bug.cgi?id=2560 -> @media case insensitive
http://www.w3.org/Bugs/Public/show_bug.cgi?id=3037 -> grammar correction
http://www.w3.org/Bugs/Public/show_bug.cgi?id=2920
http://www.w3.org/Bugs/Public/show_bug.cgi?id=2800
http://www.w3.org/Bugs/Public/show_bug.cgi?id=233
http://www.w3.org/Bugs/Public/show_bug.cgi?id=2919
http://www.w3.org/Bugs/Public/show_bug.cgi?id=2446
http://www.w3.org/Bugs/Public/show_bug.cgi?id=3099

output parameter bug fixed:
        accepted values :
            * text/html and html
            * application/xhtml+xml and xhtml
            * application/soap+xml and soap12
            * everything else: text/plain

fixed a bug with SOAP output



Index: CssSelectors.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/CssSelectors.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- CssSelectors.java	16 Sep 2005 13:33:52 -0000	1.18
+++ CssSelectors.java	19 Apr 2006 11:28:05 -0000	1.19
@@ -206,6 +206,9 @@
 		}
 	    }
 	}
+        
+        // the ident isn't a valid pseudo-something
+        throw new InvalidParamException("pseudo", ":" + pseudo, ac);
     }
 
     public void setPseudoFun(String pseudo, String param)

Index: CssPropertyFactory.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/CssPropertyFactory.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- CssPropertyFactory.java	14 Sep 2005 15:14:18 -0000	1.14
+++ CssPropertyFactory.java	19 Apr 2006 11:28:05 -0000	1.15
@@ -187,7 +187,7 @@
     public synchronized CssProperty createProperty(ApplContext ac,
 	    AtRule atRule, String property, CssExpression expression)
     throws Exception {
-	String classname = null;
+	String classname = null;        
 	String media = atRule.toString();
 	int pos = -1;
 	String upperMedia = media.toUpperCase();
@@ -217,7 +217,7 @@
 		String propMedia = PropertiesLoader.mediaProperties.getProperty(property);
 		for(int i = 0; i < list.size(); i++) {
 		    String medium = (String) list.elementAt(i);
-		    if(propMedia.indexOf(medium) == -1 &&
+		    if(propMedia.indexOf(medium.toLowerCase()) == -1 &&
 			    !propMedia.equals("all")) {
 			ac.getFrame().addWarning("noexistence-media",
 				property, medium + " (" + propMedia + ")");

Index: AtRuleMedia.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/AtRuleMedia.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- AtRuleMedia.java	14 Sep 2005 15:14:18 -0000	1.9
+++ AtRuleMedia.java	19 Apr 2006 11:28:05 -0000	1.10
@@ -32,6 +32,8 @@
 
     String restrictor = new String();
     String[] media = new String[mediaCSS3.length];
+    // media list coming from the stylesheet (ie. with case)
+    String[] originalMedia = new String[mediaCSS3.length];
     Vector mediafeatures = new Vector();
 
     boolean empty = true;
@@ -50,8 +52,9 @@
 	//}
 
 	for (int i = 0; i < mediaCSS3.length; i++) {
-	    if (medium.equals(mediaCSS3[i])) {
+	    if (medium.toLowerCase().equals(mediaCSS3[i])) {
 		media[i] = mediaCSS3[i];
+                originalMedia[i] = medium;
 		empty = false;
 		return this;
 	    }
@@ -145,14 +148,14 @@
 	}
 	boolean f = true;
 	for (int i = 0; i < media.length; i++) {
-	    if (media[i] != null) {
+	    if (originalMedia[i] != null) {
 		if (!f) {
 		    ret.append(',');
 		    ret.append(' ');
 		} else {
 		    f = false;
 		}
-		ret.append(media[i]);
+		ret.append(originalMedia[i]);
 	    }
 	}
 

Index: CssFouffa.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/CssFouffa.java,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- CssFouffa.java	14 Sep 2005 15:14:18 -0000	1.35
+++ CssFouffa.java	19 Apr 2006 11:28:05 -0000	1.36
@@ -188,7 +188,7 @@
      */
 
     private CssFouffa(ApplContext ac, URLConnection uco) throws IOException {
-	this(ac, uco.getInputStream(), uco.getURL(), 0);
+	this(ac, uco.getInputStream(), uco.getURL(), 0);        
 	String httpCL = uco.getHeaderField("Content-Location");
 	if (httpCL != null) {
 	    setURL(HTTPURL.getURL(getURL(), httpCL));
Received on Wednesday, 19 April 2006 11:28:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:54:54 GMT