svg_loader: after reading an unsupported style attribute no other values were loaded

After finding an unsupported style attribute the log is printed (on request)
and processing of other values continues.
This commit is contained in:
Mira Grudzinska 2021-06-16 16:16:02 +02:00 committed by JunsuChoi
parent e0a1aa9355
commit 20e926c950

View file

@ -503,7 +503,14 @@ bool simpleXmlParseW3CAttribute(const char* buf, simpleXMLAttributeCb func, cons
}
if (key[0]) {
if (!func((void*)data, key, val)) return false;
#ifdef THORVG_LOG_ENABLED
if (!func((void*)data, key, val)) {
if (!_isIgnoreUnsupportedLogAttributes(key, val)) printf("SVG: Unsupported attributes used [Elements type: %s][Id : %s][Attribute: %s][Value: %s]\n", simpleXmlNodeTypeToString(((SvgLoaderData*)data)->svgParse->node->type).c_str(), ((SvgLoaderData*)data)->svgParse->node->id ? ((SvgLoaderData*)data)->svgParse->node->id->c_str() : "NO_ID", key, val ? val : "NONE");
}
#else
func((void*)data, key, val);
#endif
}
buf = next + 1;