1. 01 Dec, 2016 1 commit
  2. 25 Nov, 2016 5 commits
  3. 24 Nov, 2016 1 commit
    • Federico Mena Quintero's avatar
      gradient.rs: Start an implementation of gradient parameters in Rust · 2842469e
      Federico Mena Quintero authored
      Gradients can inherit their attributes from "fallback" gradients
      mentioned by IRI.  The C code does a little magic to resolve the
      fallbacks: it does a shallow-copy of an RsvgLinearGradient or
      RsvgRadialGradient structure, and then walks the chain of fallbacks,
      filling in the shallow-copied structure as appropriate.  This is done
      even for the children of the gradient node, i.e. its color stops: the
      pointer to the node->children is shallow-copied (!)
      For the Rust version, we'll have specific structures to hold a
      gradient's semantics.  They'll have Option<> fields that can be resolved
      from fallbacks.  We will have a "digested" array of color stops, not a
      high-level array of child nodes that may or may not actually contain
      stop elements.
  4. 22 Nov, 2016 9 commits
  5. 19 Nov, 2016 2 commits
  6. 18 Nov, 2016 2 commits
  7. 17 Nov, 2016 7 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.
    • 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.
    • Federico Mena Quintero's avatar
    • Federico Mena Quintero's avatar
      Make rsvg_node_set_atts() static · b4d5be4d
      Federico Mena Quintero authored
      It is only used in rsvg-base.c anyway; rename it to node_set_atts().
    • Federico Mena Quintero's avatar
      RsvgNode: don't keep the node's element name in this struct while parsing · b2c5f373
      Federico Mena Quintero authored
      While an RsvgHandle is parsing, it keeps a stack with the name of the
      current XML element.  However, it kept the element name as part of the
      RsvgNode structure.  The name pointers are only valid while the
      xmlParserCtxtPtr is alive; after that, node->name contains a dangling
      pointer (fortunately unused).
      Instead of burdening RsvgNode with maintaining the parsing stack, we now
      keep this stack in RsvgHandlePrivate instead.
    • Federico Mena Quintero's avatar
      Remove unused RsvgLoadPolicy · 4daa2de3
      Federico Mena Quintero authored
      It was set to the single possible value at construction time,
      and then checked with an assertion for that value; it wasn't
      used for anything.
    • 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.
  8. 16 Nov, 2016 9 commits
  9. 15 Nov, 2016 1 commit
  10. 12 Nov, 2016 2 commits
  11. 11 Nov, 2016 1 commit