[librsvg/librsvg-2.44] Rename methods to set styles from a pbag



commit ae28d217844bb1d75bb12d8fd460daa42c981cc1
Author: Federico Mena Quintero <federico gnome org>
Date:   Fri Sep 14 09:41:19 2018 -0500

    Rename methods to set styles from a pbag

 rsvg_internals/src/load.rs      | 4 ++--
 rsvg_internals/src/node.rs      | 4 ++--
 rsvg_internals/src/structure.rs | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/rsvg_internals/src/load.rs b/rsvg_internals/src/load.rs
index 88e89ffa..3d0b6ff5 100644
--- a/rsvg_internals/src/load.rs
+++ b/rsvg_internals/src/load.rs
@@ -332,7 +332,7 @@ pub extern "C" fn rsvg_load_set_node_atts(
     // attributes until the end, when sax_end_element_cb() calls
     // rsvg_node_svg_apply_atts()
     if node.get_type() != NodeType::Svg {
-        node.parse_style_attributes(handle, tag, pbag);
+        node.set_style(handle, tag, pbag);
     }
 
     node.set_overridden_properties();
@@ -351,6 +351,6 @@ pub extern "C" fn rsvg_load_set_svg_node_atts(
     }
 
     node.with_impl(|svg: &NodeSvg| {
-        svg.parse_style_attributes(node, handle);
+        svg.set_delayed_style(node, handle);
     });
 }
diff --git a/rsvg_internals/src/node.rs b/rsvg_internals/src/node.rs
index c5182e2d..f498a627 100644
--- a/rsvg_internals/src/node.rs
+++ b/rsvg_internals/src/node.rs
@@ -411,9 +411,9 @@ impl Node {
         Ok(())
     }
 
-    // Sets the node's state from the attributes in the pbag.  Also applies
+    // Sets the node's state from the style-related attributes in the pbag.  Also applies
     // CSS rules in our limited way based on the node's tag/class/id.
-    pub fn parse_style_attributes(&self, handle: *const RsvgHandle, tag: &str, pbag: &PropertyBag) {
+    pub fn set_style(&self, handle: *const RsvgHandle, tag: &str, pbag: &PropertyBag<'_>) {
         {
             let mut state = self.state.borrow_mut();
             match state.parse_presentation_attributes(pbag) {
diff --git a/rsvg_internals/src/structure.rs b/rsvg_internals/src/structure.rs
index 4f04f753..92a8135c 100644
--- a/rsvg_internals/src/structure.rs
+++ b/rsvg_internals/src/structure.rs
@@ -116,10 +116,10 @@ impl NodeSvg {
         }
     }
 
-    pub fn parse_style_attributes(&self, node: &RsvgNode, handle: *const RsvgHandle) {
+    pub fn set_delayed_style(&self, node: &RsvgNode, handle: *const RsvgHandle) {
         if let Some(owned_pbag) = self.pbag.borrow().as_ref() {
             let pbag = PropertyBag::from_owned(owned_pbag);
-            node.parse_style_attributes(handle, "svg", &pbag);
+            node.set_style(handle, "svg", &pbag);
         }
     }
 }


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