diff options
author | James Bursa <james@netsurf-browser.org> | 2003-04-05 16:24:43 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2003-04-05 16:24:43 +0000 |
commit | 75768e67001bcf292f9e8bbbe8139a7432835092 (patch) | |
tree | a242d019452df8740e902ad7f32a518a0ad4e81f /css/ruleset.c | |
parent | 004f6c31e32e1297946935370bdc0be2fe5ae259 (diff) | |
download | netsurf-75768e67001bcf292f9e8bbbe8139a7432835092.tar.gz netsurf-75768e67001bcf292f9e8bbbe8139a7432835092.tar.bz2 |
[project @ 2003-04-05 16:24:43 by bursa]
Re-implement style attributes.
svn path=/import/netsurf/; revision=114
Diffstat (limited to 'css/ruleset.c')
-rw-r--r-- | css/ruleset.c | 29 |
1 files changed, 18 insertions, 11 deletions
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 <assert.h> @@ -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); } } |