From 0e5d05b12544a73d4ecaa4d89d22251afef92916 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Fri, 10 Oct 2003 18:13:36 +0000 Subject: [project @ 2003-10-10 18:13:36 by jmb] CSS visibility support (not collapse) svn path=/import/netsurf/; revision=361 --- 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 81ab6734c..0cda4b131 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_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); @@ -69,6 +70,7 @@ static const struct property_entry property_table[] = { { "height", parse_height }, { "line-height", parse_line_height }, { "text-align", parse_text_align }, + { "visibility", parse_visibility }, { "white-space", parse_white_space }, { "width", parse_width }, }; @@ -516,6 +518,16 @@ void parse_text_align(struct css_style * const s, const struct css_node * const s->text_align = z; } +void parse_visibility(struct css_style * const s, const struct css_node * const v) +{ + css_visibility z; + if (v->type != CSS_NODE_IDENT || v->next != 0) + return; + z = css_visibility_parse(v->data); + if (z != CSS_VISIBILITY_UNKNOWN) + s->visibility = z; +} + void parse_width(struct css_style * const s, const struct css_node * const v) { if (v->type == CSS_NODE_IDENT && strcasecmp(v->data, "auto") == 0) -- cgit v1.2.3