1. 18 May, 2017 1 commit
  2. 16 May, 2017 1 commit
  3. 27 Feb, 2017 1 commit
  4. 17 Feb, 2017 1 commit
  5. 02 Feb, 2017 3 commits
  6. 02 Dec, 2016 1 commit
  7. 18 Nov, 2016 1 commit
  8. 17 Nov, 2016 3 commits
    • Federico Mena Quintero's avatar
      Dispatch creation of new nodes from an array of element names, not a chain of strcmp() · 4b22ec83
      Federico Mena Quintero authored
      Also, the rsvg_new_SOME_NODE_TYPE () constructor functions now take the
      element name.
      
      This lets us:
      
      * Use bsearch() on the sorted array of element names, instead of an
        unordered chain of if (strcmp (...)).  We can replace this later with
        something better like a trie.
      
      * Port things to Rust more easily, since the constructor functions can
        dispatch on their own based on the element name.
      
      * Avoid special cases in the way
        rsvg_new_node_component_transfer_function() and
        rsvg_new_node_light_source() are called; now they dispatch on their
        own based on the element name.
      4b22ec83
    • Federico Mena Quintero's avatar
      node_set_atts(): Check here for the property bag being empty · 58a645cc
      Federico Mena Quintero authored
      Every ::set_atts() implementation used to check on its own whether the
      property bag is empty (common for "plain" SVG elements with no defined
      attributes?) before actually querying the property bag.
      
      Now we do that check in a single place, in the toplevel node_set_atts()
      helper, instead of having each node type do it on its own.
      
      This means that ::set_atts() implementation which do "validation" work
      or any other post-initialization after the attributes have been set,
      will have to support their ::set_atts() not being called at all if there
      are no attributes in the first place.
      58a645cc
    • Federico Mena Quintero's avatar
      Implement rsvg_length_normalize() fully in Rust · 4d19ded9
      Federico Mena Quintero authored
      We add an RsvgLength::normalize() method, and the corresponding
      rsvg_length_normalize() function to make this accessible to the C code.
      
      This removes the old _rsvg_css_normalize_length() function.
      4d19ded9
  9. 11 Nov, 2016 1 commit
  10. 09 Nov, 2016 4 commits
    • Federico Mena Quintero's avatar
      Make rsvg_state_new() / rsvg_state_free() the only way of getting new states · 468f9251
      Federico Mena Quintero authored
      Previously they were allocated on the stack, allocated by hand on the
      heap, allocated with g_slice by rsvg_state_push()...
      
      Make all of that consistent; rsvg_state_new() is the only way to get
      a new state now.
      468f9251
    • Federico Mena Quintero's avatar
      Register newly-created nodes in the defs as soon as possible · c8b08f1d
      Federico Mena Quintero authored
      Don't defer it until each node's implementation of ::set_atts().
      
      This reduces the amount of duplicated code in each implementation of
      ::set_atts().
      c8b08f1d
    • Federico Mena Quintero's avatar
      Rename function to rsvg_defs_register_node_by_id() · e478a290
      Federico Mena Quintero authored
      To make it more clear that the "id" is the XML's id="foo" attribute.
      
      Also, instead of the &something->super.super nonsense, use "self" or
      simply "node" where available.
      e478a290
    • Federico Mena Quintero's avatar
      Make RsvgLength carry its own direction for normalization · 5a85e7cf
      Federico Mena Quintero authored
      This is the pattern that was there before:
      
        foo.some_len = _rsvg_css_parse_length (str);   /* at creation time */
      
        ...
      
        double real_len = _rsvg_css_normalize_length (&foo.some_len, ctx, LENGTH_DIR_HORIZONTAL); /* at rendering time */
      
      This led to a few inconsistencies in the way directions got used -
      sometimes cut&paste errors could creep in and a vertical direction
      would be used for a horizontal length, for example.
      
      This change makes the pattern be
      
        foo.some_len = _rsvg_css_parse_length (str, LENGTH_DIR_HORIZONTAL);   /* at creation time */
      
        ...
      
        double real_len = _rsvg_css_normalize_length (&foo.some_len, ctx); /* at rendering time */
      
      I.e. lengths get their direction-to-be-resolved-as at creation time,
      during parse_length(); this gets stored in a new field length.dir.
      Later, normalize_length() knows which direction to use.
      5a85e7cf
  11. 03 Nov, 2016 1 commit
  12. 12 Feb, 2015 1 commit
    • Federico Mena Quintero's avatar
      Internally use 'char *' for string data · 80f6366f
      Federico Mena Quintero authored
      There was a mixture of guint8*, guchar*, gchar*, etc.  Use char* because that's
      about as sane as we can get, and only cast where we can't change the public API
      or where we must interface with other libraries.  *Cough* xmlChar *cough*.
      
      This removes a metric assload of compiler warnings, and I'm fine with that.
      80f6366f
  13. 17 Aug, 2014 1 commit
  14. 28 Jan, 2012 1 commit
  15. 27 Jan, 2012 2 commits
  16. 26 Jan, 2012 1 commit
    • Christian Persch's avatar
      Add permission check before loading other files · a2e869cb
      Christian Persch authored
      Wrap _rsvg_io_acquire_* in _rsvg_handle_acquire_* that first
      checks whether the load should be allowed. For the moment, always allow
      the load; more restricted policies will be introduced in a follow-up commit.
      a2e869cb
  17. 12 Jan, 2012 1 commit
  18. 27 Nov, 2011 2 commits
  19. 07 Nov, 2011 2 commits
  20. 06 Sep, 2011 1 commit
  21. 22 Jun, 2010 1 commit
  22. 06 Jun, 2010 1 commit
  23. 05 Jun, 2010 1 commit
  24. 30 May, 2010 1 commit
  25. 27 May, 2010 3 commits
  26. 02 May, 2010 1 commit
  27. 27 Apr, 2010 1 commit
  28. 07 Apr, 2010 1 commit