diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2014-12-29 18:21:21 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2014-12-29 19:06:20 +0000 |
commit | 4729e025decd4d92ceeeb40659decf6183594ac6 (patch) | |
tree | 0e6499556d4bb8a6d22c4219fcc13d49272b69dd /src/select/propset.h | |
parent | 24207928eb8ba5cc40db4ddd60c60866ec8af684 (diff) | |
download | libcss-4729e025decd4d92ceeeb40659decf6183594ac6.tar.gz libcss-4729e025decd4d92ceeeb40659decf6183594ac6.tar.bz2 |
Add break-inside 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 d5db8e0..d3d6fb1 100644 --- a/src/select/propset.h +++ b/src/select/propset.h @@ -242,6 +242,28 @@ static inline css_error set_break_before( #undef BREAK_BEFORE_SHIFT #undef BREAK_BEFORE_INDEX +#define BREAK_INSIDE_INDEX 13 +#define BREAK_INSIDE_SHIFT 4 +#define BREAK_INSIDE_MASK (0xf << 4) +static inline css_error set_break_inside( + css_computed_style *style, uint8_t type) +{ + uint8_t *bits; + + ENSURE_UNCOMMON; + + bits = &style->uncommon->bits[BREAK_INSIDE_INDEX]; + + /* 4bits: type */ + *bits = (*bits & ~BREAK_INSIDE_MASK) | + ((type & 0xf) << BREAK_INSIDE_SHIFT); + + return CSS_OK; +} +#undef BREAK_INSIDE_MASK +#undef BREAK_INSIDE_SHIFT +#undef BREAK_INSIDE_INDEX + #define WORD_SPACING_INDEX 3 #define WORD_SPACING_SHIFT 2 #define WORD_SPACING_MASK 0xfc |