rsvg_parse_style_attrs(): Take a full RsvgNode, not an RsvgState

parent d54c0ea5
......@@ -396,7 +396,7 @@ node_set_atts (RsvgNode * node, RsvgHandle * ctx, const NodeCreator *creator, Rs
else
klazz = NULL;
rsvg_parse_style_attrs (ctx, rsvg_node_get_state (node), creator->element_name, klazz, id, atts);
rsvg_parse_style_attrs (ctx, node, creator->element_name, klazz, id, atts);
}
}
}
......
......@@ -256,7 +256,7 @@ _rsvg_node_svg_apply_atts (RsvgNode *node, RsvgNodeSvg *svg, RsvgHandle *ctx)
klazz = value;
if ((value = rsvg_property_bag_lookup (svg->atts, "id")))
id = value;
rsvg_parse_style_attrs (ctx, rsvg_node_get_state (node), "svg", klazz, id, svg->atts);
rsvg_parse_style_attrs (ctx, node, "svg", klazz, id, svg->atts);
}
}
......
......@@ -1482,7 +1482,7 @@ rsvg_lookup_apply_css_style (RsvgHandle * ctx, const char *target, RsvgState * s
/**
* rsvg_parse_style_attrs:
* @ctx: Rsvg context.
* @state: Rsvg state
* @node: Rsvg node whose state should be modified
* @tag: (nullable): The SVG tag we're processing (eg: circle, ellipse), optionally %NULL
* @klazz: (nullable): The space delimited class list, optionally %NULL
* @atts: Attributes in SAX style.
......@@ -1491,14 +1491,17 @@ rsvg_lookup_apply_css_style (RsvgHandle * ctx, const char *target, RsvgState * s
* stack.
**/
void
rsvg_parse_style_attrs (RsvgHandle * ctx,
RsvgState * state,
rsvg_parse_style_attrs (RsvgHandle *ctx,
RsvgNode *node,
const char *tag, const char *klazz, const char *id, RsvgPropertyBag * atts)
{
int i = 0, j = 0;
char *target = NULL;
gboolean found = FALSE;
GString *klazz_list = NULL;
RsvgState *state;
state = rsvg_node_get_state (node);
if (rsvg_property_bag_size (atts) > 0)
rsvg_parse_style_pairs (ctx, state, atts);
......
......@@ -227,7 +227,7 @@ void rsvg_parse_style (RsvgHandle * ctx, RsvgState * state, const char *str)
G_GNUC_INTERNAL
void rsvg_parse_cssbuffer (RsvgHandle * ctx, const char *buff, size_t buflen);
G_GNUC_INTERNAL
void rsvg_parse_style_attrs (RsvgHandle * ctx, RsvgState * state, const char *tag,
void rsvg_parse_style_attrs (RsvgHandle *ctx, RsvgNode *node, const char *tag,
const char *klazz, const char *id, RsvgPropertyBag * atts);
G_GNUC_INTERNAL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment