summaryrefslogtreecommitdiff
path: root/src/parse/properties.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-01-24 13:22:09 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-01-24 13:22:09 +0000
commit6b49034a412103f1ae48040aad1854a3e037d5d9 (patch)
tree2ae680d148bb17562674f87be0c7329c2d453159 /src/parse/properties.c
parent76d4f965aefaaddbf912e41e6476986e54b1e4d4 (diff)
downloadlibcss-6b49034a412103f1ae48040aad1854a3e037d5d9.tar.gz
libcss-6b49034a412103f1ae48040aad1854a3e037d5d9.tar.bz2
Have orphans and widows treat negative values as illegal. The spec doesn't explicitly outlaw this, but it's clearly nonsensical.
svn path=/trunk/libcss/; revision=6230
Diffstat (limited to 'src/parse/properties.c')
-rw-r--r--src/parse/properties.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/parse/properties.c b/src/parse/properties.c
index f9b8c4c..de30f07 100644
--- a/src/parse/properties.c
+++ b/src/parse/properties.c
@@ -3969,6 +3969,10 @@ css_error parse_orphans(css_language *c,
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;
@@ -6308,6 +6312,10 @@ css_error parse_widows(css_language *c,
if (consumed != token->ilower->len)
return CSS_INVALID;
+ /* Negative values are nonsensical */
+ if (num < 0)
+ return CSS_INVALID;
+
value = WIDOWS_SET;
} else
return CSS_INVALID;