summaryrefslogtreecommitdiff
path: root/src/select/propset.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/select/propset.h')
-rw-r--r--src/select/propset.h40
1 files changed, 11 insertions, 29 deletions
diff --git a/src/select/propset.h b/src/select/propset.h
index cc4121a..69dba45 100644
--- a/src/select/propset.h
+++ b/src/select/propset.h
@@ -1290,24 +1290,6 @@ static inline css_error set_position(
#undef POSITION_SHIFT
#undef POSITION_INDEX
-#define TEXT_ALIGN_INDEX 23
-#define TEXT_ALIGN_SHIFT 0
-#define TEXT_ALIGN_MASK 0x7
-static inline css_error set_text_align(
- css_computed_style *style, uint8_t type)
-{
- uint8_t *bits = &style->bits[TEXT_ALIGN_INDEX];
-
- /* 3bits: type */
- *bits = (*bits & ~TEXT_ALIGN_MASK) |
- ((type & 0x7) << TEXT_ALIGN_SHIFT);
-
- return CSS_OK;
-}
-#undef TEXT_ALIGN_MASK
-#undef TEXT_ALIGN_SHIFT
-#undef TEXT_ALIGN_INDEX
-
#define TEXT_TRANSFORM_INDEX 24
#define TEXT_TRANSFORM_SHIFT 0
#define TEXT_TRANSFORM_MASK 0x7
@@ -1679,22 +1661,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(
+#define TEXT_ALIGN_INDEX 33
+#define TEXT_ALIGN_SHIFT 0
+#define TEXT_ALIGN_MASK 0xf
+static inline uint8_t set_text_align(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[LIBCSS_ALIGN_INDEX];
+ uint8_t *bits = &style->bits[TEXT_ALIGN_INDEX];
- /* 3bits: type */
- *bits = (*bits & ~LIBCSS_ALIGN_MASK) |
- ((type & 0x7) << LIBCSS_ALIGN_SHIFT);
+ /* 4bits: type */
+ *bits = (*bits & ~TEXT_ALIGN_MASK) |
+ ((type & 0xf) << TEXT_ALIGN_SHIFT);
return CSS_OK;
}
-#undef LIBCSS_ALIGN_MASK
-#undef LIBCSS_ALIGN_SHIFT
-#undef LIBCSS_ALIGN_INDEX
+#undef TEXT_ALIGN_MASK
+#undef TEXT_ALIGN_SHIFT
+#undef TEXT_ALIGN_INDEX
#endif