dom_string_unref(attr);
}
- struct dom_element *parent;
- dom_element_parent_node(node, &parent);
- if (parent == NULL) {
- /* This is the root <svg> node, skip it.
- *
- * While initialising its selection state, libcss sets its
- * node_data->bloom pointer using css__get_parent_bloom().
- * But if there is no parent, that function returns,
- *
- * static css_bloom empty_bloom[CSS_BLOOM_SIZE];
- *
- * A problem later arises because when libcss FINALISES its
- * selection state, it frees node_data->bloom! That obviously
- * won't work then node has no parent, i.e. if it's the root
- * <svg> element.
- */
- css_stylesheet_destroy(inline_sheet);
- return NULL;
- }
- else {
- /* We only needed to know if it was NULL */
- dom_node_unref(parent);
- }
-
code = svgtiny_select_style(state, node, inline_sheet, &styles);
css_stylesheet_destroy(inline_sheet);
if (code != CSS_OK) {