summaryrefslogtreecommitdiff
path: root/src/select/propset.h
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-02-14 21:52:08 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-02-14 21:52:08 +0000
commitb1692363b809dfe3776866e4319b7a659ca159a4 (patch)
treedfb8be075e5d91b0c1db6577e073d51bcfa273ba /src/select/propset.h
parent5429e0ccc289a4538f81fcde0495d27f0cb7a758 (diff)
downloadlibcss-b1692363b809dfe3776866e4319b7a659ca159a4.tar.gz
libcss-b1692363b809dfe3776866e4319b7a659ca159a4.tar.bz2
Finally, a representation of a computed content property.
svn path=/trunk/libcss/; revision=6515
Diffstat (limited to 'src/select/propset.h')
-rw-r--r--src/select/propset.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/select/propset.h b/src/select/propset.h
index 661913b..64f7829 100644
--- a/src/select/propset.h
+++ b/src/select/propset.h
@@ -323,6 +323,32 @@ static inline css_error set_clip(
#undef CLIP_SHIFT
#undef CLIP_INDEX
+#define CONTENT_INDEX 7
+#define CONTENT_SHIFT 0
+#define CONTENT_MASK 0x3
+static inline css_error set_content(
+ css_computed_style *style, uint8_t type,
+ css_computed_content_item *content)
+{
+ uint8_t *bits;
+
+ ENSURE_UNCOMMON;
+
+ /* 2bits: type */
+ bits = &style->uncommon->bits[CONTENT_INDEX];
+
+ *bits = (*bits & ~CONTENT_MASK) |
+ ((type & 0x3) << CONTENT_SHIFT);
+
+ style->uncommon->content = content;
+
+ return CSS_OK;
+}
+#undef CONTENT_MASK
+#undef CONTENT_SHIFT
+#undef CONTENT_INDEX
+
+
#define VERTICAL_ALIGN_INDEX 0
#define VERTICAL_ALIGN_SHIFT 0
#define VERTICAL_ALIGN_MASK 0xff