summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChih-Hsuan Yen <yen@chyen.cc>2019-01-23 16:41:35 +0800
committerChih-Hsuan Yen <yan12125@gmail.com>2019-01-29 07:59:52 +0000
commitdcc4e2c4d96a6ad1447b9fb679afca21bb381218 (patch)
treed01af5d3b71b9e822f40963369820a2c7e0e73db /src
parentac797c4e17376b5497e0c37f15b9da48d622d18f (diff)
downloadqtsvg-dcc4e2c4d96a6ad1447b9fb679afca21bb381218.tar.gz
Allow <style> without type attribute
According to https://www.w3.org/TR/SVG/styling.html#StyleElement, `type` can be omitted. > If the attribute is not specified, then the style sheet language is assumed to be CSS. Original-Author: Christoph Feck Fixes: QTBUG-58326 Fixes: QTBUG-69378 Change-Id: Ic3d0e8db99da8c81e5a01c0dda33fb38428e38d5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/svg/qsvghandler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp
index e935649..0468bbe 100644
--- a/src/svg/qsvghandler.cpp
+++ b/src/svg/qsvghandler.cpp
@@ -3214,7 +3214,7 @@ static bool parseStyleNode(QSvgNode *parent,
Q_UNUSED(handler)
#else
const QStringRef type = attributes.value(QLatin1String("type"));
- if (type.compare(QLatin1String("text/css"), Qt::CaseInsensitive) == 0)
+ if (type.compare(QLatin1String("text/css"), Qt::CaseInsensitive) == 0 || type.isNull())
handler->setInStyle(true);
#endif