summaryrefslogtreecommitdiff
path: root/test/dump_computed.h
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-06-01 18:32:37 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2014-06-01 18:32:37 +0100
commitc6d7f24987a90bc61e408c4249a6a212276b4174 (patch)
tree75a3f5478618e0e583db6f168193e7645c012dda /test/dump_computed.h
parent89a4d061a46490d5fad3792a565a1a0114c400e0 (diff)
downloadlibcss-c6d7f24987a90bc61e408c4249a6a212276b4174.tar.gz
libcss-c6d7f24987a90bc61e408c4249a6a212276b4174.tar.bz2
Add support for CSS3 overflow-x and overflow-y properties.
Now, overflow is a shorthand property setting both overflow-x and overflow-y. The getter for the computed overflow has been removed, and replaced with two for overflow-x and overflow-y.
Diffstat (limited to 'test/dump_computed.h')
-rw-r--r--test/dump_computed.h39
1 files changed, 32 insertions, 7 deletions
diff --git a/test/dump_computed.h b/test/dump_computed.h
index 451ba1a..5f83767 100644
--- a/test/dump_computed.h
+++ b/test/dump_computed.h
@@ -1918,23 +1918,48 @@ static void dump_computed_style(const css_computed_style *style, char *buf,
ptr += wrote;
*len -= wrote;
- /* overflow */
- val = css_computed_overflow(style);
+ /* overflow-x */
+ val = css_computed_overflow_x(style);
switch (val) {
case CSS_OVERFLOW_INHERIT:
- wrote = snprintf(ptr, *len, "overflow: inherit\n");
+ wrote = snprintf(ptr, *len, "overflow-x: inherit\n");
break;
case CSS_OVERFLOW_VISIBLE:
- wrote = snprintf(ptr, *len, "overflow: visible\n");
+ wrote = snprintf(ptr, *len, "overflow-x: visible\n");
break;
case CSS_OVERFLOW_HIDDEN:
- wrote = snprintf(ptr, *len, "overflow: hidden\n");
+ wrote = snprintf(ptr, *len, "overflow-x: hidden\n");
break;
case CSS_OVERFLOW_SCROLL:
- wrote = snprintf(ptr, *len, "overflow: scroll\n");
+ wrote = snprintf(ptr, *len, "overflow-x: scroll\n");
break;
case CSS_OVERFLOW_AUTO:
- wrote = snprintf(ptr, *len, "overflow: auto\n");
+ wrote = snprintf(ptr, *len, "overflow-x: auto\n");
+ break;
+ default:
+ wrote = 0;
+ break;
+ }
+ ptr += wrote;
+ *len -= wrote;
+
+ /* overflow-y */
+ val = css_computed_overflow_y(style);
+ switch (val) {
+ case CSS_OVERFLOW_INHERIT:
+ wrote = snprintf(ptr, *len, "overflow-y: inherit\n");
+ break;
+ case CSS_OVERFLOW_VISIBLE:
+ wrote = snprintf(ptr, *len, "overflow-y: visible\n");
+ break;
+ case CSS_OVERFLOW_HIDDEN:
+ wrote = snprintf(ptr, *len, "overflow-y: hidden\n");
+ break;
+ case CSS_OVERFLOW_SCROLL:
+ wrote = snprintf(ptr, *len, "overflow-y: scroll\n");
+ break;
+ case CSS_OVERFLOW_AUTO:
+ wrote = snprintf(ptr, *len, "overflow-y: auto\n");
break;
default:
wrote = 0;