summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-02-11 16:37:41 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-02-11 16:37:41 +0000
commita4d9d4c27feb124f53c7a37e1728ad54f898e76a (patch)
treee6cfddd4bd8f49d44803cead0e9c42b25ad9d992 /test
parent94c0ca7fd85b6c60640b9c8c05f99cfea78507ce (diff)
downloadlibcss-a4d9d4c27feb124f53c7a37e1728ad54f898e76a.tar.gz
libcss-a4d9d4c27feb124f53c7a37e1728ad54f898e76a.tar.bz2
Fix dumping of cursor values.
Testcase for this. svn path=/trunk/libcss/; revision=6437
Diffstat (limited to 'test')
-rw-r--r--test/data/parse2/tests1.dat9
-rw-r--r--test/dump.h12
2 files changed, 16 insertions, 5 deletions
diff --git a/test/data/parse2/tests1.dat b/test/data/parse2/tests1.dat
index 402c37e..9f96edd 100644
--- a/test/data/parse2/tests1.dat
+++ b/test/data/parse2/tests1.dat
@@ -38,3 +38,12 @@
| display: block
| display: table-cell
#reset
+
+#data
+* { cursor: url("foo.png"), url("bar.gif"), pointer; }
+#errors
+#expected
+| *
+| cursor: url('foo.png'), url('bar.gif'), pointer
+#reset
+
diff --git a/test/dump.h b/test/dump.h
index b38b0b8..c217565 100644
--- a/test/dump.h
+++ b/test/dump.h
@@ -1132,18 +1132,20 @@ void dump_bytecode(css_style *style, char **ptr)
}
break;
case OP_CURSOR:
- switch (value) {
- case CURSOR_URI:
- {
+ while (value == CURSOR_URI) {
parserutils_hash_entry *he =
*((parserutils_hash_entry **)
bytecode);
ADVANCE(sizeof(ptr));
- *ptr += sprintf(*ptr, "url('%.*s')",
+ *ptr += sprintf(*ptr, "url('%.*s'), ",
(int) he->len,
(char *) he->data);
+
+ value = *((uint32_t *) bytecode);
+ ADVANCE(sizeof(value));
}
- break;
+
+ switch (value) {
case CURSOR_AUTO:
*ptr += sprintf(*ptr, "auto");
break;