From 567cf89fb92f9d2866a94bf2b5d1206c3590ed0a Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 18 Jan 2009 00:54:36 +0000 Subject: Fix play-during svn path=/trunk/libcss/; revision=6130 --- src/bytecode/opcodes.h | 1 + src/parse/properties.c | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/bytecode/opcodes.h b/src/bytecode/opcodes.h index 3de9fc1..f82d129 100644 --- a/src/bytecode/opcodes.h +++ b/src/bytecode/opcodes.h @@ -453,6 +453,7 @@ enum op_pitch { }; enum op_play_during { + PLAY_DURING_TYPE_MASK = 0x009f, PLAY_DURING_URI = 0x0080, PLAY_DURING_MIX = (1<<6), PLAY_DURING_REPEAT = (1<<5), diff --git a/src/parse/properties.c b/src/parse/properties.c index b8539d3..422f46a 100644 --- a/src/parse/properties.c +++ b/src/parse/properties.c @@ -4527,6 +4527,8 @@ css_error parse_play_during(css_language *c, uri = token->idata; for (flags = 0; flags < 2; flags++) { + consumeWhitespace(vector, ctx); + token = parserutils_vector_peek(vector, *ctx); if (token != NULL && token->type == CSS_TOKEN_IDENT) { if (token->ilower == c->strings[MIX]) { @@ -4555,7 +4557,8 @@ css_error parse_play_during(css_language *c, opv = buildOPV(OP_PLAY_DURING, flags, value); required_size = sizeof(opv); - if ((flags & FLAG_INHERIT) == false && value == PLAY_DURING_URI) + if ((flags & FLAG_INHERIT) == false && + (value & PLAY_DURING_TYPE_MASK) == PLAY_DURING_URI) required_size += sizeof(parserutils_hash_entry *); /* Allocate result */ @@ -4565,7 +4568,8 @@ css_error parse_play_during(css_language *c, /* Copy the bytecode to it */ memcpy((*result)->bytecode, &opv, sizeof(opv)); - if ((flags & FLAG_INHERIT) == false && value == PLAY_DURING_URI) { + if ((flags & FLAG_INHERIT) == false && + (value & PLAY_DURING_TYPE_MASK) == PLAY_DURING_URI) { memcpy((uint8_t *) (*result)->bytecode + sizeof(opv), &uri, sizeof(parserutils_hash_entry *)); } -- cgit v1.2.3