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;ds=sidebyside;h=eb882b3212a23ece39c714311c5bc3d58cf07074;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 43429bb..a7d0499 100644 --- a/src/svgtiny_internal.h +++ b/src/svgtiny_internal.h @@ -54,6 +54,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;