diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2017-04-27 13:51:34 +0100 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2017-04-27 13:51:34 +0100 |
commit | 49a4a4c5f92389c5180eca43c6cdc607d370408a (patch) | |
tree | 5fdd2a45097adb9427efca75e5fcfaafe9c4b700 /test/dump_computed.h | |
parent | 21a424653c148ca966012826064f8b5db5afc93f (diff) | |
download | libcss-49a4a4c5f92389c5180eca43c6cdc607d370408a.tar.gz libcss-49a4a4c5f92389c5180eca43c6cdc607d370408a.tar.bz2 |
Tests: Dump box-sizing property in selection tests.
Diffstat (limited to 'test/dump_computed.h')
-rw-r--r-- | test/dump_computed.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/dump_computed.h b/test/dump_computed.h index 8efd2ca..eb9d522 100644 --- a/test/dump_computed.h +++ b/test/dump_computed.h @@ -715,6 +715,27 @@ static void dump_computed_style(const css_computed_style *style, char *buf, ptr += wrote; *len -= wrote; + /* box-sizing */ + val = css_computed_box_sizing(style); + switch (val) { + case CSS_BOX_SIZING_INHERIT: + wrote = snprintf(ptr, *len, "box-sizing: inherit\n"); + break; + case CSS_BOX_SIZING_CONTENT_BOX: + wrote = snprintf(ptr, *len, "box-sizing: content-box\n"); + break; + case CSS_BOX_SIZING_BORDER_BOX: + wrote = snprintf(ptr, *len, "box-sizing: border-box\n"); + break; + default: + wrote = 0; + printf("DISASTER!\n"); + assert(0); + break; + } + ptr += wrote; + *len -= wrote; + /* break-after */ val = css_computed_break_after(style); switch (val) { |