From a260f648f8fd215cf5f33bb280f689df3f848cd0 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Fri, 2 Apr 2004 23:12:26 +0000 Subject: [project @ 2004-04-02 23:12:26 by jmb] Implement CSS cursor property svn path=/import/netsurf/; revision=705 --- css/ruleset.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'css/ruleset.c') diff --git a/css/ruleset.c b/css/ruleset.c index 7ae15bd02..381e1fea3 100644 --- a/css/ruleset.c +++ b/css/ruleset.c @@ -70,6 +70,7 @@ static void parse_border_width_side(struct css_style * const s, const struct css_node * const v, unsigned int i); static void parse_clear(struct css_style * const s, const struct css_node * const v); static void parse_color(struct css_style * const s, const struct css_node * const v); +static void parse_cursor(struct css_style * const s, const struct css_node * v); static void parse_display(struct css_style * const s, const struct css_node * const v); static void parse_float(struct css_style * const s, const struct css_node * const v); static void parse_font(struct css_style * const s, const struct css_node * v); @@ -130,6 +131,7 @@ static const struct property_entry property_table[] = { { "border-width", parse_border_width }, { "clear", parse_clear }, { "color", parse_color }, + { "cursor", parse_cursor }, { "display", parse_display }, { "float", parse_float }, { "font", parse_font }, @@ -735,6 +737,24 @@ void parse_color(struct css_style * const s, const struct css_node * const v) s->color = c; } +void parse_cursor(struct css_style * const s, const struct css_node * v) +{ + css_cursor z; + for (; v; v = v->next) { + switch (v->type) { + case CSS_NODE_IDENT: + z = css_cursor_parse(v->data); + if (z != CSS_CURSOR_UNKNOWN) { + s->cursor = z; + return; + } + break; + default: + break; + } + } +} + void parse_display(struct css_style * const s, const struct css_node * const v) { css_display z; -- cgit v1.2.3