]> gitweb.michael.orlitzky.com - libsvgtiny.git/commitdiff
src/svgtiny_internal.h: add parent style to the parser state
authorMichael Orlitzky <michael@orlitzky.com>
Thu, 16 Nov 2023 16:10:37 +0000 (11:10 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 9 Jun 2025 01:13:07 +0000 (21:13 -0400)
This will come in handy when we want to compose the current (child)
node's styles with its parent's styles.

src/svgtiny_internal.h

index dcb686bed11b8f1a54f39881e0a110d7c2932604..00595dd42a0477e242eca93c430e909c294b1f34 100644 (file)
@@ -61,6 +61,10 @@ struct svgtiny_parse_state {
         * precede it. */
        css_select_ctx *select_ctx;
 
+       /* Keep track of the parent element's computed style so that
+        * we can compose its children's computed styles with it. */
+       css_computed_style *parent_style;
+
        /* paint attributes */
        svgtiny_colour fill;
        svgtiny_colour stroke;