summaryrefslogtreecommitdiff
path: root/src/select/propget.h
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-11-15 20:50:33 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2014-11-15 20:50:33 +0000
commitf30a2de02b63140a4f8194419cef20c7375d6756 (patch)
tree66265ad7d4d0d36956b1233e7702e79f62e4f136 /src/select/propget.h
parent4f240a620321b64354f64d07b382fdf3caa09109 (diff)
downloadlibcss-f30a2de02b63140a4f8194419cef20c7375d6756.tar.gz
libcss-f30a2de02b63140a4f8194419cef20c7375d6756.tar.bz2
Add column-rule-color to computed styles.
Diffstat (limited to 'src/select/propget.h')
-rw-r--r--src/select/propget.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/select/propget.h b/src/select/propget.h
index 63eea95..6150ff7 100644
--- a/src/select/propget.h
+++ b/src/select/propget.h
@@ -413,6 +413,31 @@ static inline uint8_t get_column_gap(
#undef COLUMN_GAP_SHIFT
#undef COLUMN_GAP_INDEX
+#define COLUMN_RULE_COLOR_INDEX 9
+#define COLUMN_RULE_COLOR_SHIFT 0
+#define COLUMN_RULE_COLOR_MASK 0x3
+static inline uint8_t get_column_rule_color(
+ const css_computed_style *style,
+ css_color *color)
+{
+ if (style->uncommon != NULL) {
+ uint8_t bits = style->uncommon->bits[COLUMN_RULE_COLOR_INDEX];
+ bits &= COLUMN_RULE_COLOR_MASK;
+ bits >>= COLUMN_RULE_COLOR_SHIFT;
+
+ /* 2bits: type */
+ *color = style->uncommon->column_rule_color;
+
+ return bits;
+ }
+
+ *color = 0;
+ return CSS_COLUMN_RULE_COLOR_CURRENT_COLOR;
+}
+#undef COLUMN_RULE_COLOR_MASK
+#undef COLUMN_RULE_COLOR_SHIFT
+#undef COLUMN_RULE_COLOR_INDEX
+
#define CONTENT_INDEX 7
#define CONTENT_SHIFT 0
#define CONTENT_MASK 0x3