summaryrefslogtreecommitdiff
path: root/css/ruleset.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2004-04-02 23:12:26 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2004-04-02 23:12:26 +0000
commita260f648f8fd215cf5f33bb280f689df3f848cd0 (patch)
tree9bd8ed171af215a205131ec891a4faafaa29d7aa /css/ruleset.c
parent095d17b8ad1238c0f55d2ef650145e0deca90d39 (diff)
downloadnetsurf-a260f648f8fd215cf5f33bb280f689df3f848cd0.tar.gz
netsurf-a260f648f8fd215cf5f33bb280f689df3f848cd0.tar.bz2
[project @ 2004-04-02 23:12:26 by jmb]
Implement CSS cursor property svn path=/import/netsurf/; revision=705
Diffstat (limited to 'css/ruleset.c')
-rw-r--r--css/ruleset.c20
1 files changed, 20 insertions, 0 deletions
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;