summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bytecode/opcodes.h1
-rw-r--r--src/parse/properties.c8
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 *));
}