Commit 97f6a127 authored by Hiroyuki Ikezoe's avatar Hiroyuki Ikezoe

fix CSS selector order.

Fix for 592207.
parent 53f13337
......@@ -1296,6 +1296,11 @@ rsvg_parse_style_attrs (RsvgHandle * ctx,
/* * */
rsvg_lookup_apply_css_style (ctx, "*", state);
/* tag */
if (tag != NULL) {
rsvg_lookup_apply_css_style (ctx, tag, state);
}
if (klazz != NULL) {
i = strlen (klazz);
while (j < i) {
......@@ -1330,24 +1335,20 @@ rsvg_parse_style_attrs (RsvgHandle * ctx,
}
}
/* tag#id */
if (tag != NULL && id != NULL && !found) {
target = g_strdup_printf ("%s#%s", tag, id);
/* #id */
if (id != NULL) {
target = g_strdup_printf ("#%s", id);
rsvg_lookup_apply_css_style (ctx, target, state);
g_free (target);
}
/* #id */
if (id != NULL && !found) {
target = g_strdup_printf ("#%s", id);
found = rsvg_lookup_apply_css_style (ctx, target, state);
/* tag#id */
if (tag != NULL && id != NULL) {
target = g_strdup_printf ("%s#%s", tag, id);
rsvg_lookup_apply_css_style (ctx, target, state);
g_free (target);
}
/* tag */
if (tag != NULL && !found)
found = rsvg_lookup_apply_css_style (ctx, tag, state);
if (rsvg_property_bag_size (atts) > 0) {
const char *value;
......
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