From: Michael Orlitzky Date: Thu, 16 Nov 2023 16:10:37 +0000 (-0500) Subject: src/svgtiny_internal.h: add parent style to the parser state X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=8a3604fb9d700582152056a5cad421da4ffd4092;p=libsvgtiny.git src/svgtiny_internal.h: add parent style to the parser state This will come in handy when we want to compose the current (child) node's styles with its parent's styles. --- diff --git a/src/svgtiny_internal.h b/src/svgtiny_internal.h index dcb686b..00595dd 100644 --- a/src/svgtiny_internal.h +++ b/src/svgtiny_internal.h @@ -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;