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

2002/css-validator/org/w3c/css/media/css3 AtRuleMedia.java,1.3,1.4 MediaColor.java,1.1,1.2 MediaColorIndex.java,1.1,1.2 MediaDeviceHeight.java,1.1,1.2 MediaDeviceWidth.java,1.1,1.2 MediaHeight.java,1.1,1.2 MediaMonochrome.java,1.1,1.2 MediaWidth.java,1.1,1.2

From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
Date: Thu, 09 Feb 2012 17:36:29 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1RvXvX-0006kQ-7Q@lionel-hutz.w3.org>
Update of /sources/public/2002/css-validator/org/w3c/css/media/css3
In directory hutz:/tmp/cvs-serv25830/w3c/css/media/css3

Modified Files:
	AtRuleMedia.java MediaColor.java MediaColorIndex.java 
	MediaDeviceHeight.java MediaDeviceWidth.java MediaHeight.java 
	MediaMonochrome.java MediaWidth.java 
Log Message:
various things: Use of BigIntegers to avoid limits, background-* are now avoiding multiplication of checks and properties in CssXStyles impls, various updates for other properties, use of a string reader for string input, added the possibility of not following links, prepared for aggregation of all uris parsed

Index: MediaWidth.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/media/css3/MediaWidth.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- MediaWidth.java	21 Oct 2011 01:49:08 -0000	1.1
+++ MediaWidth.java	9 Feb 2012 17:36:27 -0000	1.2
@@ -48,7 +48,7 @@
                     val = ((CssNumber) val).getLength();
                 case CssTypes.CSS_LENGTH:
                     CssLength l = (CssLength) val;
-                    if (l.floatValue() < 0.f) {
+                    if (!l.isPositive()) {
                         throw new InvalidParamException("negative-value",
                                 val.toString(), ac);
                     }

Index: AtRuleMedia.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/media/css3/AtRuleMedia.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- AtRuleMedia.java	8 Nov 2011 17:07:01 -0000	1.3
+++ AtRuleMedia.java	9 Feb 2012 17:36:26 -0000	1.4
@@ -36,6 +36,9 @@
                                                   ApplContext ac) throws InvalidParamException {
         Media media = new Media();
         if (restrictor != null) {
+            // the grammar construct will build a restrictor as 'not' or 'only'
+            // otherwise it will fail at a parse error, that is why we don't
+            // have another else with error reporting
             if ("not".equalsIgnoreCase(restrictor)) {
                 media.setNot(true);
             } else if ("only".equalsIgnoreCase(restrictor)) {

Index: MediaDeviceHeight.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/media/css3/MediaDeviceHeight.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- MediaDeviceHeight.java	21 Oct 2011 01:49:07 -0000	1.1
+++ MediaDeviceHeight.java	9 Feb 2012 17:36:26 -0000	1.2
@@ -49,7 +49,7 @@
                     val = ((CssNumber) val).getLength();
                 case CssTypes.CSS_LENGTH:
                     CssLength l = (CssLength) val;
-                    if (l.floatValue() < 0.f) {
+                    if (!l.isPositive()) {
                         throw new InvalidParamException("negative-value",
                                 val.toString(), ac);
                     }

Index: MediaHeight.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/media/css3/MediaHeight.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- MediaHeight.java	21 Oct 2011 01:49:07 -0000	1.1
+++ MediaHeight.java	9 Feb 2012 17:36:27 -0000	1.2
@@ -48,7 +48,7 @@
                     val = ((CssNumber) val).getLength();
                 case CssTypes.CSS_LENGTH:
                     CssLength l = (CssLength) val;
-                    if (l.floatValue() < 0.f) {
+                    if (!l.isPositive()) {
                         throw new InvalidParamException("negative-value",
                                 val.toString(), ac);
                     }

Index: MediaColor.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/media/css3/MediaColor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- MediaColor.java	21 Oct 2011 01:49:07 -0000	1.1
+++ MediaColor.java	9 Feb 2012 17:36:26 -0000	1.2
@@ -47,7 +47,7 @@
                     throw new InvalidParamException("integer",
                             val.toString(), ac);
                 }
-                if (valnum.getInt() < 0) {
+                if (!valnum.isPositive()) {
                     throw new InvalidParamException("negative-value",
                                 val.toString(), ac);
                 }

Index: MediaMonochrome.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/media/css3/MediaMonochrome.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- MediaMonochrome.java	21 Oct 2011 01:49:08 -0000	1.1
+++ MediaMonochrome.java	9 Feb 2012 17:36:27 -0000	1.2
@@ -47,7 +47,7 @@
                     throw new InvalidParamException("integer",
                             val.toString(), ac);
                 }
-                if (valnum.getInt() < 0) {
+                if (!valnum.isPositive()) {
                     throw new InvalidParamException("negative-value",
                                 val.toString(), ac);
                 }

Index: MediaDeviceWidth.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/media/css3/MediaDeviceWidth.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- MediaDeviceWidth.java	21 Oct 2011 01:49:07 -0000	1.1
+++ MediaDeviceWidth.java	9 Feb 2012 17:36:26 -0000	1.2
@@ -49,7 +49,7 @@
                     val = ((CssNumber) val).getLength();
                 case CssTypes.CSS_LENGTH:
                     CssLength l = (CssLength) val;
-                    if (l.floatValue() < 0.f) {
+                    if (!l.isPositive()) {
                         throw new InvalidParamException("negative-value",
                                 val.toString(), ac);
                     }

Index: MediaColorIndex.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/media/css3/MediaColorIndex.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- MediaColorIndex.java	21 Oct 2011 01:49:07 -0000	1.1
+++ MediaColorIndex.java	9 Feb 2012 17:36:26 -0000	1.2
@@ -47,7 +47,7 @@
                     throw new InvalidParamException("integer",
                             val.toString(), ac);
                 }
-                if (valnum.getInt() < 0) {
+                if (!valnum.isPositive()) {
                     throw new InvalidParamException("negative-value",
                                 val.toString(), ac);
                 }
Received on Thursday, 9 February 2012 17:37:05 GMT

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