diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-06-27 12:34:47 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-06-27 12:34:47 +0000 |
commit | 25ce175094499b3b55ffd5c0161ecff06b08edbf (patch) | |
tree | eedbb2625f3aa9453b314533beba37d41891dcc3 /src/parse/properties/aural.c | |
parent | 81f791010e110283c60b074a08e1b544022d2c6a (diff) | |
download | libcss-25ce175094499b3b55ffd5c0161ecff06b08edbf.tar.gz libcss-25ce175094499b3b55ffd5c0161ecff06b08edbf.tar.bz2 |
Fix cue and pause shorthand parsers
svn path=/trunk/libcss/; revision=8051
Diffstat (limited to 'src/parse/properties/aural.c')
-rw-r--r-- | src/parse/properties/aural.c | 16 |
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; |