summaryrefslogtreecommitdiff
path: root/docs/Bytecode
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-12-03 16:00:32 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-12-03 16:00:32 +0000
commite14ee0baa1b7f2bfdca10fa5852385a200746c7d (patch)
treec2999575403b45b8d246ceb8291357ad18a4b6a0 /docs/Bytecode
parent23aa9cd7d8154c822335531f0619acce43f544b8 (diff)
downloadlibcss-e14ee0baa1b7f2bfdca10fa5852385a200746c7d.tar.gz
libcss-e14ee0baa1b7f2bfdca10fa5852385a200746c7d.tar.bz2
Changes to the encoding of content in bytecode to better match the spec.
Beginnings of a content property parser. svn path=/trunk/libcss/; revision=5874
Diffstat (limited to 'docs/Bytecode')
-rw-r--r--docs/Bytecode22
1 files changed, 17 insertions, 5 deletions
diff --git a/docs/Bytecode b/docs/Bytecode
index 37a1a27..dfa5712 100644
--- a/docs/Bytecode
+++ b/docs/Bytecode
@@ -314,13 +314,18 @@ Opcodes
10 - content
<value> (14bits) :
- bits 8-13: MBZ
+ bits 8-13: MBZ (except counter & counters, see below)
bits 0-7 :
bit 7 set => string follows
bits 0-6: 0000000 => string,
0000001 => uri,
0000010 => counter,
- 0000011 => attr,
+ bits 12-13: MBZ
+ bits 8-11 : list-style-type
+ 0000011 => counters,
+ bits 12-13: MBZ
+ bits 8-11 : list-style-type
+ 0000100 => attr,
other => rffe.
bit 7 clear => keywords:
bits 0-6: 0000000 => normal,
@@ -338,11 +343,18 @@ Opcodes
For example,
content: open-quote url('http://example.com/')
- " : " attr(name) close-quote;"
+ " : " attr(name) " " counter(x) "." counters(y, ".")
+ close-quote;"
would result in the following bytecode:
- <00080010> <00000081> <00000013> "http://example.com/" <00>
- <00000080> <00000003> " : " <00> <00000083> <00000004> "name"
+ <00080010>
+ <00000081> <ptr to "http://example.com">
+ <00000080> <ptr to " : ">
+ <00000084> <ptr to "name">
+ <00000080> <ptr to " ">
+ <00000382> <ptr to "x">
+ <00000080> <ptr to ".">
+ <00000383> <ptr to "y"> <ptr to ".">
<00000003> <00000000>
11 - counter-increment