Author: jmb
Date: Sat Jan 17 18:54:36 2009
New Revision: 6130

URL: http://source.netsurf-browser.org?rev=6130&view=rev
Log:
Fix play-during

Modified:
    trunk/libcss/src/bytecode/opcodes.h
    trunk/libcss/src/parse/properties.c

Modified: trunk/libcss/src/bytecode/opcodes.h
URL: 
http://source.netsurf-browser.org/trunk/libcss/src/bytecode/opcodes.h?rev=6130&r1=6129&r2=6130&view=diff
==============================================================================
--- trunk/libcss/src/bytecode/opcodes.h (original)
+++ trunk/libcss/src/bytecode/opcodes.h Sat Jan 17 18:54:36 2009
@@ -453,6 +453,7 @@
 };
 
 enum op_play_during {
+       PLAY_DURING_TYPE_MASK           = 0x009f,
        PLAY_DURING_URI                 = 0x0080,
        PLAY_DURING_MIX                 = (1<<6),
        PLAY_DURING_REPEAT              = (1<<5),

Modified: trunk/libcss/src/parse/properties.c
URL: 
http://source.netsurf-browser.org/trunk/libcss/src/parse/properties.c?rev=6130&r1=6129&r2=6130&view=diff
==============================================================================
--- trunk/libcss/src/parse/properties.c (original)
+++ trunk/libcss/src/parse/properties.c Sat Jan 17 18:54:36 2009
@@ -4527,6 +4527,8 @@
                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 @@
        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 @@
 
        /* 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 *));
        }


_______________________________________________
netsurf-commits mailing list
[email protected]
http://vlists.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to