diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2014-12-29 18:20:48 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2014-12-29 19:06:20 +0000 |
commit | 24207928eb8ba5cc40db4ddd60c60866ec8af684 (patch) | |
tree | 76dc8a7402a6cc4613cef5c2d61c2f5377a8c89e /src/select/propset.h | |
parent | 30833a1ad59bc1f20a4995b23d2794be17227b51 (diff) | |
download | libcss-24207928eb8ba5cc40db4ddd60c60866ec8af684.tar.gz libcss-24207928eb8ba5cc40db4ddd60c60866ec8af684.tar.bz2 |
Add break-before property support.
Diffstat (limited to 'src/select/propset.h')
-rw-r--r-- | src/select/propset.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/select/propset.h b/src/select/propset.h index c202ce7..d5db8e0 100644 --- a/src/select/propset.h +++ b/src/select/propset.h @@ -220,6 +220,28 @@ static inline css_error set_break_after( #undef BREAK_AFTER_SHIFT #undef BREAK_AFTER_INDEX +#define BREAK_BEFORE_INDEX 12 +#define BREAK_BEFORE_SHIFT 4 +#define BREAK_BEFORE_MASK (0xf << 4) +static inline css_error set_break_before( + css_computed_style *style, uint8_t type) +{ + uint8_t *bits; + + ENSURE_UNCOMMON; + + bits = &style->uncommon->bits[BREAK_BEFORE_INDEX]; + + /* 4bits: type */ + *bits = (*bits & ~BREAK_BEFORE_MASK) | + ((type & 0xf) << BREAK_BEFORE_SHIFT); + + return CSS_OK; +} +#undef BREAK_BEFORE_MASK +#undef BREAK_BEFORE_SHIFT +#undef BREAK_BEFORE_INDEX + #define WORD_SPACING_INDEX 3 #define WORD_SPACING_SHIFT 2 #define WORD_SPACING_MASK 0xfc |