From e14ee0baa1b7f2bfdca10fa5852385a200746c7d Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Wed, 3 Dec 2008 16:00:32 +0000 Subject: 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 --- docs/Bytecode | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'docs') 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 (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> + <00000080> + <00000084> + <00000080> + <00000382> + <00000080> + <00000383> <00000003> <00000000> 11 - counter-increment -- cgit v1.2.3