summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix stack overflow on indirect self-referralAllan Sandfeld Jensen2019-04-242-9/+15
| | | | | Change-Id: If2b13c3dc4a09ce6d18aff97855179172f92878b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix leak in SVG font nodesAllan Sandfeld Jensen2019-04-241-7/+7
| | | | | | | | Their lifetime is controlled by the document, but the logic was confused and lost the node. Change-Id: Ib074dcf209d53ade894ee571a0bc08a1a7acfcab Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge remote-tracking branch 'origin/5.12.3' into 5.12Qt Forward Merge Bot2019-04-172-2/+10
|\ | | | | | | Change-Id: I73662000d1b52a4b61a9bd0a58af2fb9a7dc7b22
| * Fix crash for recursive gradient referencesEirik Aavitsland2019-04-022-2/+10
| | | | | | | | | | | | | | | | | | A reference loop with at least three elements would lead to endless recursion. Fixes: QTBUG-74189 Change-Id: Ie3c1b32da0e98e9218dc387dd3210666018a92e1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Fix assert on misplaced tspan elementAllan Sandfeld Jensen2019-04-121-0/+7
|/ | | | | Change-Id: I75b3a88aae3cbd7838474d7a78f29fcd58172fc2 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix IRI parsing, and use after freeAllan Sandfeld Jensen2019-03-042-3/+16
| | | | | | | | | | Make the parsing of IRI references tighter, and avoid freeing styles when inserting a duplicate id. Fixes: QTBUG-74104 Change-Id: I3a12fcf09ce1c55c135a4209817413ed8af75dec Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Fix heap overflow in path parsingAllan Sandfeld Jensen2019-03-011-1/+1
| | | | | | Fixes: QTBUG-74129 Change-Id: I871c144f1df288a310e82aef979af7cfd7a54095 Reviewed-by: Robert Loehning <robert.loehning@qt.io>
* Don't leak nodes on parsing failuresAllan Sandfeld Jensen2019-02-272-4/+15
| | | | | | | | | | | The QSvgHandler always expects the caller to handle ownership of the generated document, also when the parsing failed. QSvgHandler also failed to handle misplaced group elements. Fixes: QTBUG-74083 Change-Id: I8907117d4305ecd84e328b201791001cb877fc60 Reviewed-by: Robert Loehning <robert.loehning@qt.io>
* Fix QSvgRenderer incorrect render of svg:imageDavid Crémoux2019-02-063-11/+11
| | | | | | | | | | The bounds of QSvgImage are integer based (QRect) which cause rounding issues when decimals values are used to define image (image shifted and with incorrect size). Changing the bounds to QRectF solves the issue. Fixes: QTBUG-73445 Change-Id: I49828e2c0b1917ec878844d520aac182581c23fb Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Allow <style> without type attributeChih-Hsuan Yen2019-01-291-1/+1
| | | | | | | | | | | | | | 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>
* Consider relative path in image tagsLars Schmertmann2018-11-302-5/+20
| | | | | | Task-number: QTBUG-16198 Change-Id: I26bf48cbac39af0fae490ed21579e8de326cd1a3 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Fix parsing of forward referrals in use elementsEirik Aavitsland2018-08-203-15/+55
| | | | | | | | | | SVG <use> elements may refer to a node that is defined later in the file. The parser would then fail to resolve the link. Implement delayed link resolution in the parser to handle such cases. Task-number: QTBUG-69694 Change-Id: I94ffb3511dbd0fac822bb56991415b2d99ccf90e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Migrate QSvgHandler to use QRegularExpressionSamuel Gaist2018-08-121-11/+11
| | | | | | | | This patch updates the QSvgHandler class to use QRegularExpression in place of QRegExp which is to be considered deprecated. Change-Id: Ie35ff1e697741711440b6a99da26d435bc782d15 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-07-311-5/+6
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ic41094e6744df3d84d76bcfe701092e137660f80
| * Fix crash when parsing malformed url referenceEirik Aavitsland2018-07-301-5/+6
| | | | | | | | | | | | | | The parsing did not check for end of input. Change-Id: I56a478877d242146395977b767511425d2b8ced1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix transformation of gradients for svg objectBoundingBox coordinatesEirik Aavitsland2018-06-292-2/+2
| | | | | | | | | | | | | | | | | | | | | | QBrush transformations were not applied in the object coordinate space, even when using Qt's ObjectBoundingMode. Use the new ObjectMode instead to fix this. Task-number: QTBUG-59978 Task-number: QTBUG-67995 Change-Id: I79f529853ed8bca86b1811f4edf66244a026a27c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Make svg icons work as pixmap iconsThorbjørn Martsum2018-06-111-25/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes the svg icon code similar to the code for pixmap icons. We only style the code if we fetch a different mode (+it is not normal) and we try to find icons in same order as the pixmap icons. [ChangeLog][][QIcon/QSvgIconEngine] Made SVG icons behave like pixmap icons: An explicitly-set disabled icon is no longer additionally grayed out. Task-number: QTBUG-67452 Change-Id: I94b4146bae2e9d924a96b602bf23909bd7f0e934 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Morten Kristensen <msk@nullpointer.dk> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | SVG image handler: catch and warn about QImage allocation failureEirik Aavitsland2018-05-221-1/+6
|/ | | | | | | | | | | QImage allocation failure, typically because of out-of-range dimensions, was not immediately caught and reported. This could lead confusing error messages as QPainter would render on a null image. Task-number: QTBUG-68229 Change-Id: If99033244728f1cea635691c6a93564976962f09 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Interpret width or height specified in percent as relative to viewportFrederik Christiani2018-04-301-3/+6
| | | | | | | | | | | When width or height is specified in percent, it is supposed to be relative to the viewport. https://www.w3.org/TR/SVG/coords.html#Units Task-number: QTBUG-2279 Change-Id: Ia1597b88d4e1c705a6755db788a18cf790d5ee97 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Fix rotate animation freezing in wrong positionv5.11.0-beta4Friedemann Kleint2018-04-111-1/+1
| | | | | | | | | | | | In QSvgAnimateTransform::resolveMatrix(), the indexes into the vals array were previously calculated to be 1,1 in the final step, where currentPosition=1, by using qCeil()/qFloor(), resulting in rotationDiff=0 and the rotation snapping back. Fix by setting startElem to endElem - 1 when available. Task-number: QTBUG-67525 Change-Id: Ie1d7e8be6ea8dd9aa155ee8c479037bc269f6df7 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* QSvgHandler: Change some usages of QString to QStringRefFriedemann Kleint2018-02-271-57/+54
| | | | | | | | QString allocation can be avoided in some places after the introduction of QStringRef::toInt()/toDouble(). Change-Id: Ib400f49df04847f85aeea0190215f864f71223bd Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Fix warning when encountering font-size="none"Friedemann Kleint2018-02-271-27/+51
| | | | | | | | | | Extend existing enum by "none" and extract a function to return the specification so that "none" can be cleanly handled. Task-number: QTBUG-66646 Change-Id: If4ec1056c6f0fa407f76b747634bb898e75a5474 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Merge remote-tracking branch 'origin/5.10' into 5.11Liang Qi2018-02-121-1/+1
|\ | | | | | | Change-Id: Ic852de844e8a1e7acfe4aaaf79acf46674ba5ffa
| * MSVC: Don't set a DLL base address for 64-bit5.10Thiago Macieira2018-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The linker complains: LINK : warning LNK4281: undesirable base address 0x67000000 for x64 image; set base address above 4GB for best ASLR optimization And it's not really required anymore, as the recommended /DYNAMICBASE is the default. Change-Id: I56b444f9d6274221a3b7fffd150caab1beecfd43 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-201-1/+1
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I2d1692e18205aa86e7181d907eac21dc096744ae
| * svgiconengine: Fix isNull() for deserialized iconsPalo Kisa2018-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 4a9470e55ce08752501868c60762268fdf2c44af there was introduced specific isNull() implementation for QSvgIconEngine. But the existing check was not sufficient for the scenarios where the QIcon is constructed by deserialization from QDataStream (from previously serialized valid svg QIcon). We also need to check the svgBuffers as the previously serialized svgFiles are silently ignored by QSvgIconEngine::read(). Change-Id: Id64ce233baead053c8b5ca61f1d416e46a8c6088 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* | Port away from QRegion::rects()Marc Mutz2017-12-051-2/+1
| | | | | | | | | | | | | | Use begin()/end() instead. Change-Id: Ia51069dba42aa26e78b071b147a69c7f36947d12 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-2013-43/+78
|\ \ | |/ | | | | Change-Id: I7e158268343c5d92d666d266a87095f1154714dd
| * Merge remote-tracking branch 'origin/5.9' into 5.10v5.10.0-rc3v5.10.0-rc2v5.10.0-rc1v5.10.05.10.0Liang Qi2017-11-154-1/+18
| |\ | | | | | | | | | Change-Id: I2c5f1f592e2141b93fa274124a96f2a63b83acdb
| | * Fix crash on recursive self-referral in <use> elementEirik Aavitsland2017-11-154-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Referring to an ancestor in a <use> element would lead to endless recursion. Add checks to avoid recursion, and also emit a warning while parsing. Task-number: QTBUG-64425 Change-Id: I9ee1b9bfef13796cc3f387ff8579c6b13bc4ae9a Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-3011-42/+60
| |\ \ | | |/ | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I8b9a5a395dbd6659f7806eeebdd665c760a71ec1
| | * Fix outdated FDL license headerv5.9.35.9.3Kai Koehne2017-10-173-15/+15
| | | | | | | | | | | | | | | Change-Id: I2a2501a61107717b8e1adacad064664cf54cd972 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
| | * Fix outdated BSD license headerKai Koehne2017-10-173-9/+39
| | | | | | | | | | | | | | | Change-Id: I3917e7ab180b49c77bff0d071eca10f8bc7f33c7 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
| | * Avoid possible detachingAndré Klitzing2017-10-101-2/+2
| | | | | | | | | | | | | | | Change-Id: Iea5521d1fd53d5af21f99023f8d9ed15ef2f4f68 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Remove unused variablesAndré Klitzing2017-10-062-11/+0
| | | | | | | | | | | | | | | | | | Change-Id: I82fe38e2fbcc070d02d2acb34a43a8c971e84ae9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | * Add missing emitAndré Klitzing2017-10-061-1/+1
| | | | | | | | | | | | | | | Change-Id: I2a3c0a3734548919d8a337b88b9aa6fdf725bbc1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Return correct PdmDevicePixelRatioScaled metricAles Erjavec2017-10-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSvgGenerator::metric returned incorrect value for `PdmDevicePixelRatioScaled` resulting in degenerate `devicePixelRatioF()` return value. [ChangeLog][][QSvgGenerator] Report correct devicePixelRatioF Task-number: QTBUG-63159 Change-Id: Ib45e930b6b1b6d85aea5a68dd2b1b5f16a4eed3b Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | * Remove inaccurate statement about using setSize() from the documentationv5.9.25.9.2Andy Shaw2017-08-231-3/+1
| | | | | | | | | | | | | | | Change-Id: I9a18a0cfc86411336cbf29e0b7fb2f77f704d284 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Replace Q_NULLPTR with nullptrKevin Funk2017-09-273-9/+9
|/ / | | | | | | | | Change-Id: Ibaae1afa39414a951a57c36037fa3b951654329f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devv5.10.0-beta3v5.10.0-beta2v5.10.0-beta1v5.10.0-alpha1Liang Qi2017-08-152-4/+5
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I1ebd40264cf1afaf5bcbf8b2f272e153f51a5625
| * Fix matrix multiplication in parseTransformationMatrix()Christoph Stein2017-07-031-3/+3
| | | | | | | | | | | | | | | | | | Sequencing of a matrix multiplication seems to be erroneous, this may lead to incorrect svg rendering under certain circumstances Task-number: QTBUG-61568 Change-Id: Id8b6c425d4affde8c71faad455a63a87ef5e13a4 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * Do not reallocate memory for QImageAllan Sandfeld Jensen2017-06-201-1/+2
| | | | | | | | | | | | | | | | | | | | If the QImage given to read() already has the right size and depth, we don't need to allocate a new image. This is consistent with other image decoders and why a QImage is provided to the method in the first place. Change-Id: I4944211d4a8d4f19d000cace4a48df505d375f52 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Fix table-row-group in displayStringToEnumRobert Loehning2017-06-071-1/+1
| | | | | | | | | | | | | | Task-number: QTBUG-60583 Change-Id: I685d4d68663703e220150869dff671718a8190a1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-071-6/+5
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Idf7f59a8c4b78438b496f2c16ba9ce48573042e9
| * Correctly parse the stroke-dasharray attributesAndy Shaw2017-05-301-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | When a stroke-dasharray had multiple values separated by spaces it would end up combining them into one instead of treating them separately. This ensures that it is correctly respected. [ChangeLog] Parses the stroke-dasharray attributes in a SVG file correctly. Change-Id: If6e9babe9f63637e56d3d1dba914557829f9d5f0 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-219-95/+182
|\ \ | |/ | | | | Change-Id: I855627bf0387be820d97bbc0226fed07fd1db64a
| * Merge remote-tracking branch 'origin/5.8' into 5.9v5.9.0-beta4v5.9.0-beta3Liang Qi2017-04-181-1/+1
| |\ | | | | | | | | | Change-Id: I4b41cae71f5a5f734a7e3bb8b95130b0cb35e0ac
| | * QSvgIconEngine: Paint correct size if device pixel ratio is fractional5.8Błażej Szczygieł2017-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Use method which returns qreal. It is available since Qt 5.6. Task-number: QTBUG-59729 Change-Id: Ifc1a101c8dd837597c35ce14f0314218d2882501 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | Fix warnings for -no-feature-cssparserv5.9.0-beta2v5.9.0-beta1Nikita Krupenko2017-03-291-2/+4
| | | | | | | | | | | | | | | Change-Id: Ifdb27c6fed26f95acff30f64259d6905e88c3a6f Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-104-63/+47
| |\ \ | | |/ | | | | | | Change-Id: I9244a68bf4709fa136c52132a66d70d7c0b8897b