From 23aa9cd7d8154c822335531f0619acce43f544b8 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Tue, 2 Dec 2008 13:57:35 +0000 Subject: Something approximating clip svn path=/trunk/libcss/; revision=5870 --- docs/Bytecode | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) (limited to 'docs') diff --git a/docs/Bytecode b/docs/Bytecode index 552fc30..37a1a27 100644 --- a/docs/Bytecode +++ b/docs/Bytecode @@ -7,7 +7,7 @@ Format [] is 32 bits wide: - bits 18-13: value + bits 18-31: value bits 10-17 : flags bits 0-9 : opcode @@ -78,14 +78,6 @@ CSS colours are stored as one 32bit value: bits 8-15 : Blue component bits 0-7 : Alpha component -CSS shapes are stored as one 32bit value followed by n CSS dimensions: - - bits 1-31: MBZ - bit 0 : clear => rect, 4 dimensions follow - set => reserved for future expansion - - TODO: how to handle "auto"? - Shorthand properties -------------------- @@ -289,11 +281,30 @@ Opcodes bits 8-13: MBZ bits 0-7: bit 7 set => shape follows - bits 0-6: MBZ + bits 0-2: 000 => rect, + bit 3 => top auto + bit 4 => right auto + bit 5 => bottom auto + bit 6 => left auto + other => rffe. + bits 3-6: MBZ. + bit 7 clear => keywords: bits 0-6: 0000000 => auto, other => rffe. + If the value is rect(top, right, bottom, left), then bits 3-6 encode + which of , , , is set to auto. The + subsequent parameter list is then 4 - entries long. + Each entry is a dimension. Entries are always ordered top, right, + bottom, left. + + For example, + clip: rect(10px, auto, auto, 10px) + would produce the following bytecode: + + <02c0000e> <0000000a> <00000000> <0000000a> <00000000> + 0f - color (14bits) : bits 8-13: MBZ -- cgit v1.2.3