[librsvg] Parse presentation attributes before looking for a style matching class/id.



commit 8e3ac5aa1ac8b009a492090641533bcb5004e935
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Apr 14 16:00:04 2010 +0900

    Parse presentation attributes before looking for a style matching class/id.
    
    Fix for bug #614704.

 rsvg-styles.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/rsvg-styles.c b/rsvg-styles.c
index 845f741..61502f4 100644
--- a/rsvg-styles.c
+++ b/rsvg-styles.c
@@ -1282,6 +1282,9 @@ rsvg_parse_style_attrs (RsvgHandle * ctx,
     gboolean found = FALSE;
     GString *klazz_list = NULL;
 
+    if (rsvg_property_bag_size (atts) > 0)
+        rsvg_parse_style_pairs (ctx, state, atts);
+
     /* Try to properly support all of the following, including inheritance:
      * *
      * #id
@@ -1352,8 +1355,6 @@ rsvg_parse_style_attrs (RsvgHandle * ctx,
     if (rsvg_property_bag_size (atts) > 0) {
         const char *value;
 
-        rsvg_parse_style_pairs (ctx, state, atts);
-
         if ((value = rsvg_property_bag_lookup (atts, "style")) != NULL)
             rsvg_parse_style (ctx, state, value);
         if ((value = rsvg_property_bag_lookup (atts, "transform")) != NULL)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]