diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2016-10-13 12:44:27 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2016-10-13 12:44:27 +0100 |
commit | b42d253f8697f8d2afa0d25367aa722f4a0c0812 (patch) | |
tree | 98ecb56d3f6cd545d7150b6d33e3f9f83e5583d7 /content/handlers/css/hints.c | |
parent | 22d917c92d3f49379a57bad3dcd4b87817717848 (diff) | |
download | netsurf-b42d253f8697f8d2afa0d25367aa722f4a0c0812.tar.gz netsurf-b42d253f8697f8d2afa0d25367aa722f4a0c0812.tar.bz2 |
Table cell nowrap attribute is presentational hint, not UA style.
Diffstat (limited to 'content/handlers/css/hints.c')
-rw-r--r-- | content/handlers/css/hints.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/content/handlers/css/hints.c b/content/handlers/css/hints.c index fd25d5397..a96212386 100644 --- a/content/handlers/css/hints.c +++ b/content/handlers/css/hints.c @@ -1497,6 +1497,22 @@ static void css_hint_bg_image( } } +static void css_hint_white_space_nowrap( + nscss_select_ctx *ctx, + dom_node *node) +{ + struct css_hint *hint = &(hint_ctx.hints[hint_ctx.len]); + dom_exception err; + bool nowrap; + + err = dom_element_has_attribute(node, corestring_dom_nowrap, &nowrap); + if (err == DOM_NO_ERR && nowrap == true) { + hint->prop = CSS_PROP_WHITE_SPACE; + hint->status = CSS_WHITE_SPACE_NOWRAP; + hint = css_hint_advance(hint); + } +} + /* Exported function, documeted in css/hints.h */ css_error node_presentational_hint(void *pw, void *node, @@ -1517,6 +1533,7 @@ css_error node_presentational_hint(void *pw, void *node, case DOM_HTML_ELEMENT_TYPE_TD: css_hint_width(pw, node); css_hint_table_cell_border_padding(pw, node); + css_hint_white_space_nowrap(pw, node); /* fallthrough */ case DOM_HTML_ELEMENT_TYPE_TR: css_hint_height(pw, node); |