summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-12-02 13:57:35 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-12-02 13:57:35 +0000
commit23aa9cd7d8154c822335531f0619acce43f544b8 (patch)
treeee5ac05003e905c369f9d2c1ddd46640921db80a /docs
parentf940655fc3e16613c7dcec4537b16544366a6de1 (diff)
downloadlibcss-23aa9cd7d8154c822335531f0619acce43f544b8.tar.gz
libcss-23aa9cd7d8154c822335531f0619acce43f544b8.tar.bz2
Something approximating clip
svn path=/trunk/libcss/; revision=5870
Diffstat (limited to 'docs')
-rw-r--r--docs/Bytecode31
1 files changed, 21 insertions, 10 deletions
diff --git a/docs/Bytecode b/docs/Bytecode
index 552fc30..37a1a27 100644
--- a/docs/Bytecode
+++ b/docs/Bytecode
@@ -7,7 +7,7 @@ Format
<opcode+flags+value> [<parameters>]
<opcode+flags+value> 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 <top>, <right>, <bottom>, <left> is set to auto. The
+ subsequent parameter list is then 4 - <auto_side> 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
<value> (14bits) :
bits 8-13: MBZ