From 75768e67001bcf292f9e8bbbe8139a7432835092 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Sat, 5 Apr 2003 16:24:43 +0000 Subject: [project @ 2003-04-05 16:24:43 by bursa] Re-implement style attributes. svn path=/import/netsurf/; revision=114 --- css/ruleset.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'css/ruleset.c') diff --git a/css/ruleset.c b/css/ruleset.c index 32bb235a3..d9c713d87 100644 --- a/css/ruleset.c +++ b/css/ruleset.c @@ -1,5 +1,5 @@ /** - * $Id: ruleset.c,v 1.2 2003/04/05 15:35:55 bursa Exp $ + * $Id: ruleset.c,v 1.3 2003/04/05 16:24:43 bursa Exp $ */ #include @@ -130,16 +130,23 @@ void css_add_ruleset(struct css_stylesheet *stylesheet, } /* fill in the declarations */ - for (n = declaration; n != 0; n = n->next) { - struct property_entry *p; - assert(n->type == NODE_DECLARATION && n->data != 0 && n->left != 0); - p = bsearch(n->data, property_table, - sizeof(property_table) / sizeof(property_table[0]), - sizeof(property_table[0]), strcasecmp); - if (p == 0) - continue; - p->parse(style, n->left); - } + css_add_declarations(style, declaration); + } +} + + +void css_add_declarations(struct css_style *style, struct node *declaration) +{ + struct node *n; + for (n = declaration; n != 0; n = n->next) { + struct property_entry *p; + assert(n->type == NODE_DECLARATION && n->data != 0 && n->left != 0); + p = bsearch(n->data, property_table, + sizeof(property_table) / sizeof(property_table[0]), + sizeof(property_table[0]), strcasecmp); + if (p == 0) + continue; + p->parse(style, n->left); } } -- cgit v1.2.3