diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-08-22 09:33:04 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-08-22 09:33:04 +0000 |
commit | 758b01f92c0d8e1cdd966a5127e267efd0fe6391 (patch) | |
tree | adcb0d6e0a09c2745630ac2520416da513d1eb03 /test/dump_computed.h | |
parent | 64ffb54faffc493ff1cd35943a89d62d08183317 (diff) | |
download | libcss-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 'test/dump_computed.h')
-rw-r--r-- | test/dump_computed.h | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/test/dump_computed.h b/test/dump_computed.h index 551830a..d6a45ba 100644 --- a/test/dump_computed.h +++ b/test/dump_computed.h @@ -1965,6 +1965,15 @@ static void dump_computed_style(const css_computed_style *style, char *buf, case CSS_TEXT_ALIGN_DEFAULT: wrote = snprintf(ptr, *len, "text-align: default\n"); break; + case CSS_TEXT_ALIGN_LIBCSS_LEFT: + wrote = snprintf(ptr, *len, "text-align: -libcss-left\n"); + break; + case CSS_TEXT_ALIGN_LIBCSS_CENTER: + wrote = snprintf(ptr, *len, "text-align: -libcss-center\n"); + break; + case CSS_TEXT_ALIGN_LIBCSS_RIGHT: + wrote = snprintf(ptr, *len, "text-align: -libcss-right\n"); + break; default: wrote = 0; break; @@ -2247,31 +2256,5 @@ static void dump_computed_style(const css_computed_style *style, char *buf, } ptr += wrote; *len -= wrote; - - /* -libcss-align */ - val = css_computed_libcss_align(style); - switch (val) { - case CSS_LIBCSS_ALIGN_LEFT: - wrote = snprintf(ptr, *len, "-libcss-align: left\n"); - break; - case CSS_LIBCSS_ALIGN_RIGHT: - wrote = snprintf(ptr, *len, "-libcss-align: right\n"); - break; - case CSS_LIBCSS_ALIGN_CENTER: - wrote = snprintf(ptr, *len, "-libcss-align: center\n"); - break; - case CSS_LIBCSS_ALIGN_JUSTIFY: - wrote = snprintf(ptr, *len, "-libcss-align: justify\n"); - break; - case CSS_LIBCSS_ALIGN_DEFAULT: - wrote = snprintf(ptr, *len, "-libcss-align: default\n"); - break; - default: - wrote = 0; - break; - } - ptr += wrote; - *len -= wrote; - } |