[librsvg: 75/95] rsvg_filter_primitive_merge_node_set_atts(): Parse attributes with the PHF



commit de76452958d82842dd160013cb5d6922e02e6aa9
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Feb 21 16:59:14 2018 -0600

    rsvg_filter_primitive_merge_node_set_atts(): Parse attributes with the PHF

 rsvg-filter.c | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/rsvg-filter.c b/rsvg-filter.c
index 9eece208..bcf2bf96 100644
--- a/rsvg-filter.c
+++ b/rsvg-filter.c
@@ -2414,11 +2414,26 @@ static void
 rsvg_filter_primitive_merge_node_set_atts (RsvgNode *node, gpointer impl, RsvgHandle *handle, 
RsvgPropertyBag atts)
 {
     RsvgFilterPrimitive *primitive = impl;
+    RsvgPropertyBagIter *iter;
+    const char *key;
+    RsvgAttribute attr;
     const char *value;
 
-    /* see bug 145149 - sodipodi generates bad SVG... */
-    if ((value = rsvg_property_bag_lookup (atts, "in")))
-        g_string_assign (primitive->in, value);
+    iter = rsvg_property_bag_iter_begin (atts);
+
+    while (rsvg_property_bag_iter_next (iter, &key, &attr, &value)) {
+        switch (attr) {
+        case RSVG_ATTRIBUTE_IN:
+            /* see bug 145149 - sodipodi generates bad SVG... */
+            g_string_assign (primitive->in, value);
+            break;
+
+        default:
+            break;
+        }
+    }
+
+    rsvg_property_bag_iter_end (iter);
 }
 
 static void


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