diff options
author | Richard Wilson <rjw@netsurf-browser.org> | 2005-03-22 00:10:42 +0000 |
---|---|---|
committer | Richard Wilson <rjw@netsurf-browser.org> | 2005-03-22 00:10:42 +0000 |
commit | b832e05f034ccca6d2bcaa058ca0d9d6214bd22b (patch) | |
tree | 472ef7907956bd00501387a6588a51548a0d4793 /render/box.c | |
parent | 28d9260ca463abe3992fd674cc127b6b2baa04aa (diff) | |
download | netsurf-b832e05f034ccca6d2bcaa058ca0d9d6214bd22b.tar.gz netsurf-b832e05f034ccca6d2bcaa058ca0d9d6214bd22b.tar.bz2 |
[project @ 2005-03-22 00:10:42 by rjw]
Experimental cellpadding support
svn path=/import/netsurf/; revision=1569
Diffstat (limited to 'render/box.c')
-rw-r--r-- | render/box.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/render/box.c b/render/box.c index 2eb928d46..3cc8d805f 100644 --- a/render/box.c +++ b/render/box.c @@ -936,6 +936,21 @@ struct css_style * box_get_style(struct content *c, } } } + style->html_style.cellpadding.type = CSS_CELLPADDING_VALUE; + if ((s = (char *) xmlGetProp(n, + (const xmlChar *) "cellpadding"))) { + if (!strrchr(s, '%')) { /* % not implemented */ + int value = atoi(s); + if (0 <= value) { + style->html_style.cellpadding.value = value; + /* todo: match <td> and <th> rules and don't set if they are */ + for (i = 0; i < 4; i++) + style->padding[i].override_cellpadding = false; + } + } + } else { + style->html_style.cellpadding.value = 1; + } } if ((s = (char *) xmlGetProp(n, (const xmlChar *) "style")) != NULL) { |