diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2014-10-04 20:40:56 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2014-10-04 20:47:08 +0100 |
commit | 45e6f65d4365f0a8af540149f9eddf3fb7ecce95 (patch) | |
tree | 95f8b13415fe03e3179ec2ca1663b2160564e44c /test/dump_computed.h | |
parent | 1925f7fb88c6a8f881d6809ce2a70dd5c79f2503 (diff) | |
download | libcss-45e6f65d4365f0a8af540149f9eddf3fb7ecce95.tar.gz libcss-45e6f65d4365f0a8af540149f9eddf3fb7ecce95.tar.bz2 |
Update computed style dumper to dump column-count, and update test data.
Diffstat (limited to 'test/dump_computed.h')
-rw-r--r-- | test/dump_computed.h | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/test/dump_computed.h b/test/dump_computed.h index 5f83767..e1519f0 100644 --- a/test/dump_computed.h +++ b/test/dump_computed.h @@ -151,7 +151,7 @@ static void dump_computed_style(const css_computed_style *style, char *buf, const css_computed_content_item *content = NULL; const css_computed_counter *counter = NULL; lwc_string **string_list = NULL; - int32_t zindex = 0; + int32_t integer = 0; /* background-attachment */ val = css_computed_background_attachment(style); @@ -824,6 +824,25 @@ static void dump_computed_style(const css_computed_style *style, char *buf, ptr += wrote; *len -= wrote; + /* column-count */ + val = css_computed_column_count(style, &integer); + switch (val) { + case CSS_COLUMN_COUNT_INHERIT: + wrote = snprintf(ptr, *len, "column-count: inherit\n"); + break; + case CSS_COLUMN_COUNT_AUTO: + wrote = snprintf(ptr, *len, "column-count: auto\n"); + break; + case CSS_COLUMN_COUNT_SET: + wrote = snprintf(ptr, *len, "column-count: %d\n", integer); + break; + default: + wrote = 0; + break; + } + ptr += wrote; + *len -= wrote; + /* content */ val = css_computed_content(style, &content); switch (val) { @@ -2520,7 +2539,7 @@ static void dump_computed_style(const css_computed_style *style, char *buf, *len -= wrote; /* z-index */ - val = css_computed_z_index(style, &zindex); + val = css_computed_z_index(style, &integer); switch (val) { case CSS_Z_INDEX_INHERIT: wrote = snprintf(ptr, *len, "z-index: inherit\n"); @@ -2529,7 +2548,7 @@ static void dump_computed_style(const css_computed_style *style, char *buf, wrote = snprintf(ptr, *len, "z-index: auto\n"); break; case CSS_Z_INDEX_SET: - wrote = snprintf(ptr, *len, "z-index: %d\n", zindex); + wrote = snprintf(ptr, *len, "z-index: %d\n", integer); break; default: wrote = 0; |