]> gitweb.michael.orlitzky.com - libsvgtiny.git/blobdiff - src/svgtiny_internal.h
src/svgtiny_internal.h: add CSS context to parser state
[libsvgtiny.git] / src / svgtiny_internal.h
index 6bf5d64d99277f836fb9d59cad878977d8ed7571..7480f233539cdeb11b89aa7c319ec5d084c74dc3 100644 (file)
@@ -11,6 +11,7 @@
 #include <stdbool.h>
 
 #include <dom/dom.h>
+#include <libcss/libcss.h>
 
 #ifndef UNUSED
 #define UNUSED(x) ((void) (x))
@@ -46,7 +47,12 @@ struct svgtiny_parse_state {
                float a, b, c, d, e, f;
        } ctm;
 
-       /*struct css_style style;*/
+       /* A libcss context to hold any stylesheets that are present
+        * in the SVG document. This should be pre-populated rather
+        * than on-the-fly, because, for example, a <style> sheet at
+        * the end of the document should affect the SVG elements that
+        * precede it. */
+       css_select_ctx *select_ctx;
 
        /* paint attributes */
        svgtiny_colour fill;