Author: jmb
Date: Sat Jan 24 07:22:09 2009
New Revision: 6230
URL: http://source.netsurf-browser.org?rev=6230&view=rev
Log:
Have orphans and widows treat negative values as illegal. The spec doesn't
explicitly outlaw this, but it's clearly nonsensical.
Modified:
trunk/libcss/src/parse/properties.c
Modified: trunk/libcss/src/parse/properties.c
URL:
http://source.netsurf-browser.org/trunk/libcss/src/parse/properties.c?rev=6230&r1=6229&r2=6230&view=diff
==============================================================================
--- trunk/libcss/src/parse/properties.c (original)
+++ trunk/libcss/src/parse/properties.c Sat Jan 24 07:22:09 2009
@@ -3969,6 +3969,10 @@
if (consumed != token->ilower->len)
return CSS_INVALID;
+ /* Negative values are nonsensical */
+ if (num < 0)
+ return CSS_INVALID;
+
value = ORPHANS_SET;
} else
return CSS_INVALID;
@@ -6306,6 +6310,10 @@
num = number_from_css_string(&tmp, true, &consumed);
/* Invalid if there are trailing characters */
if (consumed != token->ilower->len)
+ return CSS_INVALID;
+
+ /* Negative values are nonsensical */
+ if (num < 0)
return CSS_INVALID;
value = WIDOWS_SET;
_______________________________________________
netsurf-commits mailing list
[email protected]
http://vlists.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org