W3C home > Mailing lists > Public > www-validator-cvs@w3.org > February 2009

2002/css-validator/org/w3c/css/parser CssSelectors.java,1.25,1.26

From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
Date: Thu, 12 Feb 2009 10:55:36 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1LXZEG-0001YO-N2@lionel-hutz.w3.org>

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

Modified Files:
	CssSelectors.java 
Log Message:
specific rule for :first-line, :first-letter, :before and :after in pseudoClass handling

Index: CssSelectors.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/CssSelectors.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- CssSelectors.java	12 Feb 2009 10:32:51 -0000	1.25
+++ CssSelectors.java	12 Feb 2009 10:55:34 -0000	1.26
@@ -188,7 +188,7 @@
 	if(profile == null || profile.equals("") || profile.equals("none")) {
 	    profile = ac.getCssVersion();
 	}   
-		// is it a pseudo-class?
+	// is it a pseudo-class?
 	String[] ps = PseudoFactory.getPseudoClass(profile);
 	if(ps != null) {
 	    for(int i = 0; i < ps.length; i++) {
@@ -198,7 +198,16 @@
 		}
 	    }
 	}
-	// it's not a pseudo-class
+	// it's not a pseudo-class, maybe one pseudo element exception
+	ps = PseudoFactory.getPseudoElementExceptions(profile);
+	if(ps != null) {
+	    for(int i = 0; i < ps.length; i++) {
+		if(pseudo.equals(ps[i])) {
+		    addPseudoClass(new PseudoClassSelector(pseudo));
+		    return;
+		}
+	    }
+	}	
         throw new InvalidParamException("pseudo", ":" + pseudo, ac);
     }
     
Received on Thursday, 12 February 2009 10:55:46 GMT

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