From d250b1019c669478cf462b64ca060e7aedb5def1 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 6 Nov 2014 12:29:43 +0000 Subject: Implement selection for column-fill property. --- src/select/propset.h | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'src/select/propset.h') diff --git a/src/select/propset.h b/src/select/propset.h index 52d9d8a..23d8076 100644 --- a/src/select/propset.h +++ b/src/select/propset.h @@ -26,7 +26,7 @@ static const css_computed_uncommon default_uncommon = { 0, 0, (CSS_CLIP_AUTO << 2) | CSS_CONTENT_NORMAL, - (CSS_COLUMN_COUNT_AUTO << 6) + (CSS_COLUMN_COUNT_AUTO << 6) | (CSS_COLUMN_FILL_BALANCE << 4) }, { 0, 0 }, { 0, 0, 0, 0 }, @@ -430,6 +430,28 @@ static inline css_error set_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 css_error set_column_fill( + css_computed_style *style, uint8_t type) +{ + uint8_t *bits; + + ENSURE_UNCOMMON; + + bits = &style->uncommon->bits[COLUMN_FILL_INDEX]; + + /* 2bits: tt : type */ + *bits = (*bits & ~COLUMN_FILL_MASK) | + ((type & 0x3) << COLUMN_FILL_SHIFT); + + return CSS_OK; +} +#undef COLUMN_FILL_MASK +#undef COLUMN_FILL_SHIFT +#undef COLUMN_FILL_INDEX + #define CONTENT_INDEX 7 #define CONTENT_SHIFT 0 #define CONTENT_MASK 0x3 -- cgit v1.2.3