diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-08-21 09:45:13 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-08-21 09:45:13 +0000 |
commit | 5c20bde8b544d23fd024dad7ace9b46849336ebf (patch) | |
tree | 07dc508d51d281b7553e471a42ba3684018fe512 /src/select/propset.h | |
parent | 5bd907c74151d0bbe1859c37cb2bde898ab72e2f (diff) | |
download | libcss-5c20bde8b544d23fd024dad7ace9b46849336ebf.tar.gz libcss-5c20bde8b544d23fd024dad7ace9b46849336ebf.tar.bz2 |
-libcss-align
svn path=/trunk/libcss/; revision=9378
Diffstat (limited to 'src/select/propset.h')
-rw-r--r-- | src/select/propset.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/select/propset.h b/src/select/propset.h index ac860fd..cc4121a 100644 --- a/src/select/propset.h +++ b/src/select/propset.h @@ -1679,4 +1679,22 @@ static inline css_error set_list_style_position( #undef LIST_STYLE_POSITION_SHIFT #undef LIST_STYLE_POSITION_INDEX +#define LIBCSS_ALIGN_INDEX 33 +#define LIBCSS_ALIGN_SHIFT 1 +#define LIBCSS_ALIGN_MASK 0xe +static inline uint8_t set_libcss_align( + css_computed_style *style, uint8_t type) +{ + uint8_t *bits = &style->bits[LIBCSS_ALIGN_INDEX]; + + /* 3bits: type */ + *bits = (*bits & ~LIBCSS_ALIGN_MASK) | + ((type & 0x7) << LIBCSS_ALIGN_SHIFT); + + return CSS_OK; +} +#undef LIBCSS_ALIGN_MASK +#undef LIBCSS_ALIGN_SHIFT +#undef LIBCSS_ALIGN_INDEX + #endif |