From eb882b3212a23ece39c714311c5bc3d58cf07074 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Thu, 16 Nov 2023 11:10:37 -0500 Subject: [PATCH] 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. --- src/svgtiny_internal.h | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.44.2