From 25ce175094499b3b55ffd5c0161ecff06b08edbf Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sat, 27 Jun 2009 12:34:47 +0000 Subject: Fix cue and pause shorthand parsers svn path=/trunk/libcss/; revision=8051 --- src/parse/properties/aural.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/parse/properties/aural.c') 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; -- cgit v1.2.3