diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2014-11-06 12:29:43 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2014-11-07 12:22:40 +0000 |
commit | d250b1019c669478cf462b64ca060e7aedb5def1 (patch) | |
tree | 037d3f00e3c4e0f5714f55e3b6f159e41f349a03 /src/select/propset.h | |
parent | 121504a4a2b0f8d1e16e507ca71916479c0e5c69 (diff) | |
download | libcss-d250b1019c669478cf462b64ca060e7aedb5def1.tar.gz libcss-d250b1019c669478cf462b64ca060e7aedb5def1.tar.bz2 |
Implement selection for column-fill property.
Diffstat (limited to 'src/select/propset.h')
-rw-r--r-- | src/select/propset.h | 24 |
1 files changed, 23 insertions, 1 deletions
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 |