summaryrefslogtreecommitdiff
path: root/src/parse
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-06-27 12:34:47 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-06-27 12:34:47 +0000
commit25ce175094499b3b55ffd5c0161ecff06b08edbf (patch)
treeeedbb2625f3aa9453b314533beba37d41891dcc3 /src/parse
parent81f791010e110283c60b074a08e1b544022d2c6a (diff)
downloadlibcss-25ce175094499b3b55ffd5c0161ecff06b08edbf.tar.gz
libcss-25ce175094499b3b55ffd5c0161ecff06b08edbf.tar.bz2
Fix cue and pause shorthand parsers
svn path=/trunk/libcss/; revision=8051
Diffstat (limited to 'src/parse')
-rw-r--r--src/parse/properties/aural.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/parse/properties/aural.c b/src/parse/properties/aural.c
index 0c4f365..359fa79 100644
--- a/src/parse/properties/aural.c
+++ b/src/parse/properties/aural.c
@@ -269,6 +269,14 @@ css_error parse_cue(css_language *c,
prev_ctx = *ctx;
error = CSS_OK;
+ /* Ensure that we're not about to parse another inherit */
+ token = parserutils_vector_peek(vector, *ctx);
+ if (token != NULL && token->type == CSS_TOKEN_IDENT &&
+ token->ilower == c->strings[INHERIT]) {
+ error = CSS_INVALID;
+ goto cleanup;
+ }
+
if (before == NULL && (error = parse_cue_before(c, vector, ctx,
&before)) == CSS_OK) {
num_read = 1;
@@ -573,6 +581,14 @@ css_error parse_pause(css_language *c,
prev_ctx = *ctx;
error = CSS_OK;
+ /* Ensure that we're not about to parse another inherit */
+ token = parserutils_vector_peek(vector, *ctx);
+ if (token != NULL && token->type == CSS_TOKEN_IDENT &&
+ token->ilower == c->strings[INHERIT]) {
+ error = CSS_INVALID;
+ goto cleanup;
+ }
+
if (before == NULL && (error = parse_pause_before(c, vector,
ctx, &before)) == CSS_OK) {
num_read = 1;