1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-28 03:06:20 -04:00

Merge commit 'origin/dom' into dom

This commit is contained in:
Petr Baudis 2007-08-30 12:31:25 +02:00 committed by Petr Baudis
commit 11c3355957

View File

@ -209,6 +209,41 @@ dom_html_pop_element(struct dom_stack *stack, struct dom_node *node, void *xxx)
import_css_stylesheet(&html_context->css_styles,
html_context->base_href, ds->string, ds->length);
}
#endif
break;
case HTML_ELEMENT_STYLE:
#ifdef CONFIG_CSS
{
struct dom_node_list **list;
struct dom_node *child;
int index;
if (!html_context->options->css_enable)
break;
/* We are interested in anything but attributes ... */
list = get_dom_node_list_by_type(node, DOM_NODE_CDATA_SECTION);
if (!list || !*list)
break;
foreach_dom_node (*list, child, index) {
struct dom_string *value;
switch (child->type) {
case DOM_NODE_CDATA_SECTION:
case DOM_NODE_COMMENT:
case DOM_NODE_TEXT:
value = get_dom_node_value(child);
if (!value)
continue;
css_parse_stylesheet(&html_context->css_styles,
html_context->base_href,
value->string,
value->string + value->length);
}
}
}
#endif
break;
}