summaryrefslogtreecommitdiff
path: root/src/select/propget.h
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-08-22 09:33:04 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-08-22 09:33:04 +0000
commit758b01f92c0d8e1cdd966a5127e267efd0fe6391 (patch)
treeadcb0d6e0a09c2745630ac2520416da513d1eb03 /src/select/propget.h
parent64ffb54faffc493ff1cd35943a89d62d08183317 (diff)
downloadlibcss-758b01f92c0d8e1cdd966a5127e267efd0fe6391.tar.gz
libcss-758b01f92c0d8e1cdd966a5127e267efd0fe6391.tar.bz2
It turns out that using magic values for text-align is simpler than having an entirely new property for html alignment.
svn path=/trunk/libcss/; revision=9387
Diffstat (limited to 'src/select/propget.h')
-rw-r--r--src/select/propget.h39
1 files changed, 11 insertions, 28 deletions
diff --git a/src/select/propget.h b/src/select/propget.h
index 39f6300..bf59e87 100644
--- a/src/select/propget.h
+++ b/src/select/propget.h
@@ -1310,23 +1310,6 @@ static inline uint8_t get_position(
#undef POSITION_SHIFT
#undef POSITION_INDEX
-#define TEXT_ALIGN_INDEX 23
-#define TEXT_ALIGN_SHIFT 0
-#define TEXT_ALIGN_MASK 0x7
-static inline uint8_t get_text_align(
- const css_computed_style *style)
-{
- uint8_t bits = style->bits[TEXT_ALIGN_INDEX];
- bits &= TEXT_ALIGN_MASK;
- bits >>= TEXT_ALIGN_SHIFT;
-
- /* 3bits: type */
- return bits;
-}
-#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
@@ -1721,21 +1704,21 @@ static inline uint8_t get_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 get_libcss_align(
+#define TEXT_ALIGN_INDEX 33
+#define TEXT_ALIGN_SHIFT 0
+#define TEXT_ALIGN_MASK 0xf
+static inline uint8_t get_text_align(
const css_computed_style *style)
{
- uint8_t bits = style->bits[LIBCSS_ALIGN_INDEX];
- bits &= LIBCSS_ALIGN_MASK;
- bits >>= LIBCSS_ALIGN_SHIFT;
+ uint8_t bits = style->bits[TEXT_ALIGN_INDEX];
+ bits &= TEXT_ALIGN_MASK;
+ bits >>= TEXT_ALIGN_SHIFT;
- /* 3bits: type */
+ /* 4bits: type */
return bits;
}
-#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