mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-10 22:51:58 +00:00
svg_loader: a css style node shouldn't have a parent
This node is supposed to be separeted from the main tree nodes.
This commit is contained in:
parent
5aab26302a
commit
ada4d5e261
1 changed files with 3 additions and 1 deletions
|
@ -2630,10 +2630,12 @@ static void _svgLoaderParserXmlOpen(SvgLoaderData* loader, const char* content,
|
|||
if (!strcmp(tagName, "svg")) return; //Already loaded <svg>(SvgNodeType::Doc) tag
|
||||
if (loader->stack.count > 0) parent = loader->stack.data[loader->stack.count - 1];
|
||||
else parent = loader->doc;
|
||||
node = method(loader, parent, attrs, attrsLength, simpleXmlParseAttributes);
|
||||
if (!strcmp(tagName, "style")) {
|
||||
node = method(loader, nullptr, attrs, attrsLength, simpleXmlParseAttributes);
|
||||
loader->cssStyle = node;
|
||||
loader->style = true;
|
||||
} else {
|
||||
node = method(loader, parent, attrs, attrsLength, simpleXmlParseAttributes);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue