Bug 97539 - INSERT: SVG clippath not fully supported
Summary: INSERT: SVG clippath not fully supported
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
5.2.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.2.0 target:7.5.0 target:7.4....
Keywords: bibisected, bisected, filter:svg, regression
: 100135 112572 115017 130126 134070 136491 (view as bug list)
Depends on:
Blocks: SVG-Import
  Show dependency treegraph
 
Reported: 2016-02-03 20:34 UTC by Yousuf Philips (jay) (retired)
Modified: 2022-07-27 09:21 UTC (History)
12 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
LibreOffice vs Opera (33.37 KB, image/png)
2016-02-03 20:34 UTC, Yousuf Philips (jay) (retired)
Details
minimized sample (1.16 KB, image/svg+xml)
2019-09-19 11:56 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2016-02-03 20:34:54 UTC
Created attachment 122363 [details]
LibreOffice vs Opera

Steps:
1) Open Writer
2) Insert https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/clippath.svg
3) Compare the output with what you can find in your browser or inkscape

Version: 5.2.0.0.alpha0+
Build ID: 513d5c5781ec14f8512432f31290a3d54c8d57df
CPU Threads: 2; OS Version: Linux 4.2; UI Render: default; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-02-01_10:25:20
Locale: en-US (en_US.UTF-8)

References:
http://www.w3.org/TR/SVG11/masking.html
https://developer.mozilla.org/en-US/docs/Web/SVG/Element/clipPath
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/clip-path
Comment 1 raal 2016-02-04 09:29:23 UTC
I can confirm with  Version: 5.2.0.0.alpha0+
Comment 2 Yousuf Philips (jay) (retired) 2016-02-04 19:26:49 UTC
Seems that the square clippath used to work correctly in 4.3.6, so that type of clippath is a regression.

Another example of the square clippath - https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/gaussian2.svg
Comment 3 Yousuf Philips (jay) (retired) 2016-02-10 14:49:11 UTC
I believe their is a clippath problem with the below SVG, as the white shine along the sword goes over the width of the sword.

https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/scimitar.svg

The element in questions is
<path ... clip-path="url(#clipPath6461)" id="path5425" />
Comment 4 Xisco Faulí 2016-02-16 11:57:08 UTC
There're two problems here, first one is the same as in bug 97582, style is not applied to the clippath.
The second problem found here is when the clippath contains a reference to another clippath. I take this
Comment 5 Commit Notification 2016-02-17 07:07:13 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7b7ffedfa6357b902a5e354d986dac39a3b2f462

SVGIO: tdf#97539: clip-path elements might contain...

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2016-02-27 09:25:51 UTC
Xisco Faulí committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=85fcf15ff41ceb95f46dee586ff7187551be4955

Revert "SVGIO: tdf#97539: clip-path elements might contain..."

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Yousuf Philips (jay) (retired) 2016-02-27 15:46:23 UTC
@Xisco: As this is a regression, shouldnt we be attempting to revert the commit which caused this.
Comment 8 Xisco Faulí 2016-02-29 23:21:02 UTC
Regression from 0347e5c77d281e4a25f79660aafb625691c4f883
Comment 9 Commit Notification 2016-03-07 08:52:26 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d5649ae7b76278cb3155f951d6327157c7c92b65

SVGIO: tdf#97539: clip-path elements might contain...

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2016-03-10 08:09:30 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=fb33451a27d8668bc14f5bcfd6ea742fc4c5b84c

tdf#97539: SVGIO: iterate over parent's clippaths

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Xisco Faulí 2016-03-31 14:33:37 UTC
After 2c29716d349353997bf7cdde63cd9f867c5baeb6, this bug can be considered as RESOLVED FIXED
Comment 12 Xisco Faulí 2016-12-19 00:15:04 UTC
I partially reverted the commit fixing the problem in 5903235d57acb13d9d5286d23b443a01aeab9a3c. it needs to be fixed in a different way. Reopening this
Comment 13 QA Administrators 2018-02-15 03:39:15 UTC Comment hidden (noise)
Comment 14 Roman Kuznetsov 2018-06-19 19:40:15 UTC
still repro in LO 6.1 beta 2
Comment 15 QA Administrators 2019-06-20 02:49:34 UTC Comment hidden (noise, obsolete)
Comment 16 Xisco Faulí 2019-09-19 11:56:28 UTC
Created attachment 154291 [details]
minimized sample
Comment 17 Xisco Faulí 2019-09-19 16:15:14 UTC
*** Bug 100135 has been marked as a duplicate of this bug. ***
Comment 18 Xisco Faulí 2019-09-19 16:15:33 UTC
*** Bug 115017 has been marked as a duplicate of this bug. ***
Comment 19 Xisco Faulí 2020-01-23 08:46:59 UTC
*** Bug 130126 has been marked as a duplicate of this bug. ***
Comment 20 giammi56 2021-10-10 10:41:17 UTC
for further calcifications, please have a look at https://ask.libreoffice.org/t/svg-wrong-rendering/69072

the clipPath should work for rectangular areas as claimed here in the session Clipping http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-v1.1-html/OpenDocument-v1.1.html#15.27.30.Clipping%7Coutline

as shown to the first post, it is not the case.
Comment 21 V Stuart Foote 2021-10-10 12:13:13 UTC
(In reply to giammi56 from comment #20)
> for further calcifications, please have a look at
> https://ask.libreoffice.org/t/svg-wrong-rendering/69072
>
> ...
> 
> as shown to the first post, it is not the case.

The normative reference at ODF 1.3 are:

20.183 fo:clip
https://docs.oasis-open.org/office/OpenDocument/v1.3/os/part3-schema/OpenDocument-v1.3-os-part3-schema.html#__RefHeading__1419798_253892949

with 18.3.8 clipShape
https://docs.oasis-open.org/office/OpenDocument/v1.3/os/part3-schema/OpenDocument-v1.3-os-part3-schema.html#__RefHeading__1416552_253892949 as defined in XSL Layout Related Properties 7.20 --> 7.20.1 "clip"

https://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#section-N44408-Layout-related-Properties
Comment 22 Commit Notification 2022-07-15 17:10:33 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/82c0a363abbceac6464b62c3571aa3225415c7db

tdf#97539; if parent is css style, look one level up

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 23 Commit Notification 2022-07-18 10:28:16 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/24683ac70084dcbb708f95e0fe66ba1886cfe1f1

tdf#97539; if parent is css style, look one level up

It will be available in 7.4.0.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 24 Xisco Faulí 2022-07-18 11:42:52 UTC
*** Bug 134070 has been marked as a duplicate of this bug. ***
Comment 25 Xisco Faulí 2022-07-18 11:47:46 UTC
*** Bug 136491 has been marked as a duplicate of this bug. ***
Comment 26 Xisco Faulí 2022-07-18 12:57:19 UTC
*** Bug 112572 has been marked as a duplicate of this bug. ***
Comment 27 Commit Notification 2022-07-18 20:00:56 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/47c428537154cd94b1d9a7547bde21ce711abd0d

related: tdf#97539: SVGIO: iterate over parent's clippaths

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 28 Commit Notification 2022-07-19 04:59:18 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/6cd06c36b9755cb3a9058ee1572b68e3ef4a3fad

related: tdf#97539: SVGIO: iterate over parent's clippaths

It will be available in 7.4.0.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 29 BogdanB 2022-07-25 21:40:48 UTC
Working well in
Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 41f02927b6d8470c298c8a2f407c98420a5ebe24
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 30 Commit Notification 2022-07-26 09:32:44 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/9e18bc8eca8bf340f765d2eb2d8bcad83b4412b3

tdf#97539; if parent is css style, look one level up

It will be available in 7.3.6.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 31 Commit Notification 2022-07-27 09:21:56 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/d4f5877a6a9bb5cbe70c5d60634aabe1282b96af

related: tdf#97539: SVGIO: iterate over parent's clippaths

It will be available in 7.3.6.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.