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

2002/css-validator/org/w3c/css/selectors AdjacentSiblingSelector.java,NONE,1.1 PseudoFactory.java,1.5,1.6

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-0001YF-Ks@lionel-hutz.w3.org>

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

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

Index: PseudoFactory.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/selectors/PseudoFactory.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- PseudoFactory.java	7 Aug 2007 09:48:45 -0000	1.5
+++ PseudoFactory.java	12 Feb 2009 10:55:34 -0000	1.6
@@ -128,4 +128,19 @@
 	return null;
     }
 
+    /**
+     * Returns the possible pseudo-elements written as pseudo-classes
+     * for a specific profile
+     * @param profile the profile to get associated exceptions to the rule
+     * @return the possible pseudo-elements/classes for the profile
+     */  
+    public static String[] getPseudoElementExceptions(String profile) {
+	if(profile == null || profile.equals("css2") ||
+	   profile.equals("css21") || profile.equals("css3") ||
+	   profile.equals("mobile") || profile.equals("tv")) {
+	    return PSEUDOELEMENT_CONSTANTSCSS2;
+	}
+	return null;
+    }
+    
 }

--- NEW FILE: AdjacentSiblingSelector.java ---
// $Id: AdjacentSiblingSelector.java,v 1.1 2009/02/12 10:55:34 ylafon Exp $
// Author: Jean-Guilhem Rouel
// (c) COPYRIGHT MIT, ERCIM and Keio, 2005.
// Please first read the full copyright statement in file COPYRIGHT.html
package org.w3c.css.selectors;

/**
 * Adjacent<br />
 * Created: Sep 1, 2005 3:59:08 PM<br />
 */
public class AdjacentSiblingSelector implements Selector {

    /**
     * @see Selector#toString()
     */
    public String toString() {
	return " + ";
    }

    /**
     * @see Selector#getName()
     */
    public String getName() {
	return "+";
    }

    /**
     * @see Selector#canApply(Selector)
     */
    public boolean canApply(Selector other) {
	return false;
    }

}
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