2002/css-validator/org/w3c/css/parser CssFouffa.java,1.57,1.58 CssPropertyFactory.java,1.30,1.31

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

Modified Files:
	CssFouffa.java CssPropertyFactory.java 
Log Message:
parsing of mediaquerylist for html links is now done reusing the same logic (parsing mediaquerylist form the parser, using a String Reader), so that should finish media queries per http://www.w3.org/TR/2010/CR-css3-mediaqueries-20100727/

Index: CssPropertyFactory.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/CssPropertyFactory.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- CssPropertyFactory.java	21 Oct 2011 01:49:08 -0000	1.30
+++ CssPropertyFactory.java	21 Oct 2011 12:52:29 -0000	1.31
@@ -119,7 +119,6 @@
         }
 
         classname = properties.getProperty("mediafeature" + "." + feature.toLowerCase());
-
         if (classname == null) {
             try {
                 AtRuleMedia atRuleMedia = (AtRuleMedia) atRule;

Index: CssFouffa.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/CssFouffa.java,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- CssFouffa.java	21 Oct 2011 01:49:08 -0000	1.57
+++ CssFouffa.java	21 Oct 2011 12:52:29 -0000	1.58
@@ -31,6 +31,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
+import java.io.Reader;
 import java.net.HttpURLConnection;
 import java.net.URL;
 import java.net.URLConnection;
@@ -561,7 +562,8 @@
      * @throw InvalidParamException
      * An error appears during the property creation.
      */
-    public MediaFeature handleMediaFeature(String feature, CssExpression expression)
+    public MediaFeature handleMediaFeature(AtRuleMedia rule, String feature,
+                                           CssExpression expression)
             throws InvalidParamException {
         MediaFeature mf;
         if (Util.onDebug) {
@@ -569,7 +571,7 @@
         }
 
         try {
-            mf = properties.createMediaFeature(ac, getAtRule(), feature, expression);
+            mf = properties.createMediaFeature(ac, rule, feature, expression);
         } catch (InvalidParamException e) {
             throw e;
         } catch (Exception e) {
@@ -797,20 +799,26 @@
 
     public CssFouffa(java.io.InputStream stream) {
         super(stream);
-        properties = new CssPropertyFactory("css2");
+        properties = new CssPropertyFactory("css21");
         // loadConfig("css2", null);
     }
 
     public CssFouffa(java.io.Reader stream) {
         super(stream);
-        properties = new CssPropertyFactory("css2");
+        properties = new CssPropertyFactory("css21");
         // loadConfig("css2", null);
     }
 
     public CssFouffa(CssParserTokenManager tm) {
         super(tm);
-        properties = new CssPropertyFactory("css2");
+        properties = new CssPropertyFactory("css21");
         // loadConfig("css2", null);
     }
 
+    public CssFouffa(ApplContext ac, Reader stream) {
+        super(stream);
+        this.ac = ac;
+        properties = new CssPropertyFactory(ac.getPropertyKey());
+    }
+
 }

Received on Friday, 21 October 2011 12:52:33 UTC