W3C home > Mailing lists > Public > www-validator-cvs@w3.org > January 2011

2002/css-validator/org/w3c/css/servlet CssValidator.java,1.43,1.44

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 12 Jan 2011 15:01:58 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1Pd2D0-0002RN-K6@lionel-hutz.w3.org>
Update of /sources/public/2002/css-validator/org/w3c/css/servlet
In directory hutz:/tmp/cvs-serv9051/org/w3c/css/servlet

Modified Files:
	CssValidator.java 
Log Message:
Vendor-specific extensions patch by Cyrille Moureaux

Index: CssValidator.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/servlet/CssValidator.java,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- CssValidator.java	5 Jan 2010 13:49:59 -0000	1.43
+++ CssValidator.java	12 Jan 2011 15:01:56 -0000	1.44
@@ -153,6 +153,18 @@
 	}
     }
 
+    private void processVendorExtensionParameter(HttpServletRequest request,
+                                                 ApplContext context) {
+        String vendorExtensionParameter = request.getParameter("vextwarning");
+        if (vendorExtensionParameter == null ||
+            vendorExtensionParameter.length() == 0) {
+          vendorExtensionParameter =
+              getServletConfig().getInitParameter("vendorExtensionsAsWarnings");
+        }
+        context.setTreatVendorExtensionsAsWarnings(
+            Boolean.valueOf(vendorExtensionParameter));
+    }
+
     /**
      * Performs the HTTP GET operation.
      * An HTTP BAD_REQUEST error is reported if
@@ -338,6 +350,9 @@
 	    errorReport = false;
 	}
 
+        // Allow vendor extensions to just show up as warnings.
+        processVendorExtensionParameter(req, ac);
+
 	// debug mode
 	Util.verbose("\nServlet request ");
 	if (uri != null) {
@@ -615,6 +630,9 @@
 	    errorReport = false;
 	}
 
+        // Allow vendor extensions to just show up as warnings.
+        processVendorExtensionParameter(req, ac);
+
 	// CSS version
 	if (profile != null && (!"none".equals(profile) ||"".equals(profile))) {
 	    if ("css1".equals(profile) || "css2".equals(profile)
Received on Wednesday, 12 January 2011 15:02:00 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:45 UTC