summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-01-18 00:54:36 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-01-18 00:54:36 +0000
commit567cf89fb92f9d2866a94bf2b5d1206c3590ed0a (patch)
treebb27942d23a64178a70c9fd0afd40df1aa4fc697
parent106ab3dca862a892b2a7c54536adc8d8caaedc91 (diff)
downloadlibcss-567cf89fb92f9d2866a94bf2b5d1206c3590ed0a.tar.gz
libcss-567cf89fb92f9d2866a94bf2b5d1206c3590ed0a.tar.bz2
Fix play-during
svn path=/trunk/libcss/; revision=6130
-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 *));
}