From c97107af5cad3c96f75c566880ff139ce378ee62 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Fri, 17 Oct 2003 23:47:13 +0000 Subject: [project @ 2003-10-17 23:47:13 by jmb] Add text-decoration support. Overline needs work. a:link defaults to being underlined. svn path=/import/netsurf/; revision=368 --- css/ruleset.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'css/ruleset.c') diff --git a/css/ruleset.c b/css/ruleset.c index 0cda4b131..c2e84f1d1 100644 --- a/css/ruleset.c +++ b/css/ruleset.c @@ -50,6 +50,7 @@ static void parse_font_weight(struct css_style * const s, const struct css_node static void parse_height(struct css_style * const s, const struct css_node * const v); static void parse_line_height(struct css_style * const s, const struct css_node * const v); static void parse_text_align(struct css_style * const s, const struct css_node * const v); +static void parse_text_decoration(struct css_style * const s, const struct css_node * const v); static void parse_visibility(struct css_style * const s, const struct css_node * const v); static void parse_width(struct css_style * const s, const struct css_node * const v); static void parse_white_space(struct css_style * const s, const struct css_node * const v); @@ -70,6 +71,7 @@ static const struct property_entry property_table[] = { { "height", parse_height }, { "line-height", parse_line_height }, { "text-align", parse_text_align }, + { "text-decoration", parse_text_decoration }, { "visibility", parse_visibility }, { "white-space", parse_white_space }, { "width", parse_width }, @@ -518,6 +520,16 @@ void parse_text_align(struct css_style * const s, const struct css_node * const s->text_align = z; } +void parse_text_decoration(struct css_style * const s, const struct css_node * const v) +{ + css_text_decoration z; + if (v->type != CSS_NODE_IDENT || v->next != 0) + return; + z = css_text_decoration_parse(v->data); + if (z != CSS_TEXT_DECORATION_UNKNOWN) + s->text_decoration = z; +} + void parse_visibility(struct css_style * const s, const struct css_node * const v) { css_visibility z; -- cgit v1.2.3