summaryrefslogtreecommitdiff
path: root/src/select/propget.h
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-11-06 12:29:43 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2014-11-07 12:22:40 +0000
commitd250b1019c669478cf462b64ca060e7aedb5def1 (patch)
tree037d3f00e3c4e0f5714f55e3b6f159e41f349a03 /src/select/propget.h
parent121504a4a2b0f8d1e16e507ca71916479c0e5c69 (diff)
downloadlibcss-d250b1019c669478cf462b64ca060e7aedb5def1.tar.gz
libcss-d250b1019c669478cf462b64ca060e7aedb5def1.tar.bz2
Implement selection for column-fill property.
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 a9b8edc..7085eba 100644
--- a/src/select/propget.h
+++ b/src/select/propget.h
@@ -365,6 +365,27 @@ static inline uint8_t get_column_count(
#undef COLUMN_COUNT_SHIFT
#undef COLUMN_COUNT_INDEX
+#define COLUMN_FILL_INDEX 8
+#define COLUMN_FILL_SHIFT 6
+#define COLUMN_FILL_MASK 0x30
+static inline uint8_t get_column_fill(
+ const css_computed_style *style)
+{
+ if (style->uncommon != NULL) {
+ uint8_t bits = style->uncommon->bits[COLUMN_FILL_INDEX];
+ bits &= COLUMN_FILL_MASK;
+ bits >>= COLUMN_FILL_SHIFT;
+
+ /* 2bits: type */
+ return bits;
+ }
+
+ return CSS_COLUMN_FILL_BALANCE;
+}
+#undef COLUMN_FILL_MASK
+#undef COLUMN_FILL_SHIFT
+#undef COLUMN_FILL_INDEX
+
#define CONTENT_INDEX 7
#define CONTENT_SHIFT 0
#define CONTENT_MASK 0x3