diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2013-09-10 17:51:37 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2013-09-10 17:51:37 +0100 |
commit | a27846b490a4a907872a62e568c412e6d1fc96b6 (patch) | |
tree | 0fd52d2bc8662cdcec01b49f41af08a96972524f /test | |
parent | 72a98c0dd6dfad592a4ec9883d4071b55e87f811 (diff) | |
download | libcss-a27846b490a4a907872a62e568c412e6d1fc96b6.tar.gz libcss-a27846b490a4a907872a62e568c412e6d1fc96b6.tar.bz2 |
Update test dumpers to output writing-mode.
Diffstat (limited to 'test')
-rw-r--r-- | test/dump.h | 14 | ||||
-rw-r--r-- | test/dump_computed.h | 22 |
2 files changed, 36 insertions, 0 deletions
diff --git a/test/dump.h b/test/dump.h index 73b61ea..941117c 100644 --- a/test/dump.h +++ b/test/dump.h @@ -476,6 +476,7 @@ static const char *opcode_names[] = { "column-rule-width", "column-span", "column-width", + "writing-mode", }; static void dump_css_fixed(css_fixed f, char **ptr) @@ -2529,6 +2530,19 @@ void dump_bytecode(css_style *style, char **ptr, uint32_t depth) break; } break; + case CSS_PROP_WRITING_MODE: + switch (value) { + case WRITING_MODE_HORIZONTAL_TB: + *ptr += sprintf(*ptr, "horizontal-tb"); + break; + case WRITING_MODE_VERTICAL_RL: + *ptr += sprintf(*ptr, "vertical-rl"); + break; + case WRITING_MODE_VERTICAL_LR: + *ptr += sprintf(*ptr, "vertical-lr"); + break; + } + break; case CSS_PROP_Z_INDEX: switch (value) { case Z_INDEX_SET: diff --git a/test/dump_computed.h b/test/dump_computed.h index 6a29c2d..451ba1a 100644 --- a/test/dump_computed.h +++ b/test/dump_computed.h @@ -2472,6 +2472,28 @@ static void dump_computed_style(const css_computed_style *style, char *buf, ptr += wrote; *len -= wrote; + /* writing-mode */ + val = css_computed_writing_mode(style); + switch (val) { + case CSS_WRITING_MODE_INHERIT: + wrote = snprintf(ptr, *len, "writing-mode: inherit\n"); + break; + case CSS_WRITING_MODE_HORIZONTAL_TB: + wrote = snprintf(ptr, *len, "writing-mode: horizontal-tb\n"); + break; + case CSS_WRITING_MODE_VERTICAL_RL: + wrote = snprintf(ptr, *len, "writing-mode: vertical-rl\n"); + break; + case CSS_WRITING_MODE_VERTICAL_LR: + wrote = snprintf(ptr, *len, "writing-mode: vertical-lr\n"); + break; + default: + wrote = 0; + break; + } + ptr += wrote; + *len -= wrote; + /* z-index */ val = css_computed_z_index(style, &zindex); switch (val) { |