summaryrefslogtreecommitdiff
path: root/src/select/propget.h
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-12-06 13:18:12 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2014-12-06 16:45:18 +0000
commitd4cafaf627dd7ceb1a1dfd8292323c4b474ec57c (patch)
treebda6e1e1f89daa315ad7020cc52ea8311327c2d5 /src/select/propget.h
parent0e2da043cbfe4f4df8e7978c52aa919199925424 (diff)
downloadlibcss-d4cafaf627dd7ceb1a1dfd8292323c4b474ec57c.tar.gz
libcss-d4cafaf627dd7ceb1a1dfd8292323c4b474ec57c.tar.bz2
Add column-span property to computed styles.
Diffstat (limited to 'src/select/propget.h')
-rw-r--r--src/select/propget.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/select/propget.h b/src/select/propget.h
index 423e299..7be323e 100644
--- a/src/select/propget.h
+++ b/src/select/propget.h
@@ -486,6 +486,27 @@ static inline uint8_t get_column_rule_width(
#undef COLUMN_RULE_WIDTH_SHIFT
#undef COLUMN_RULE_WIDTH_INDEX
+#define COLUMN_SPAN_INDEX 11
+#define COLUMN_SPAN_SHIFT 6
+#define COLUMN_SPAN_MASK 0xc0
+static inline uint8_t get_column_span(
+ const css_computed_style *style)
+{
+ if (style->uncommon != NULL) {
+ uint8_t bits = style->uncommon->bits[COLUMN_SPAN_INDEX];
+ bits &= COLUMN_SPAN_MASK;
+ bits >>= COLUMN_SPAN_SHIFT;
+
+ /* 2bits: type */
+ return bits;
+ }
+
+ return CSS_COLUMN_SPAN_NONE;
+}
+#undef COLUMN_SPAN_MASK
+#undef COLUMN_SPAN_SHIFT
+#undef COLUMN_SPAN_INDEX
+
#define CONTENT_INDEX 7
#define CONTENT_SHIFT 0
#define CONTENT_MASK 0x3