From 5c20bde8b544d23fd024dad7ace9b46849336ebf Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Fri, 21 Aug 2009 09:45:13 +0000 Subject: -libcss-align svn path=/trunk/libcss/; revision=9378 --- src/select/propset.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/select/propset.h') 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 -- cgit v1.2.3