RESOLVED FIXED 68251
clipPath does not work on foreignObject
https://bugs.webkit.org/show_bug.cgi?id=68251
Summary clipPath does not work on foreignObject
Rob Crowther
Reported 2011-09-16 10:01:14 PDT
Created attachment 107670 [details] A foreignObject containing a 300px square div is not clipped No clipping occurs when applying a clipPath to a foreignObject.
Attachments
A foreignObject containing a 300px square div is not clipped (881 bytes, image/svg+xml)
2011-09-16 10:01 PDT, Rob Crowther
no flags
The same clipPath applied to an svg rect works correctly (697 bytes, image/svg+xml)
2011-09-16 10:02 PDT, Rob Crowther
no flags
Patch (6.18 KB, patch)
2011-11-08 14:29 PST, Florin Malita
no flags
Patch (14.33 KB, patch)
2011-11-10 16:08 PST, Florin Malita
no flags
Rob Crowther
Comment 1 2011-09-16 10:02:44 PDT
Created attachment 107671 [details] The same clipPath applied to an svg rect works correctly
Florin Malita
Comment 2 2011-11-08 14:26:58 PST
The foreignObject element currently doesn't support clip-path. I have a patch but it relies on the FO atomic paint fix to pass the tests (https://bugs.webkit.org/show_bug.cgi?id=58417).
Florin Malita
Comment 3 2011-11-08 14:29:12 PST
WebKit Review Bot
Comment 4 2011-11-08 16:50:00 PST
Comment on attachment 114155 [details] Patch Attachment 114155 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/10369241 New failing tests: svg/foreignObject/clip-path.html
Dirk Schulze
Comment 5 2011-11-09 02:47:00 PST
Comment on attachment 114155 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=114155&action=review It looks good for me in general, I r- it because not only clip-path is effected. I'd like to see masked and filtered FO examples as well. And one example for opacity. > Source/WebCore/ChangeLog:6 > + clipPath does not work on foreignObject > + https://bugs.webkit.org/show_bug.cgi?id=68251 > + > + Reviewed by NOBODY (OOPS!). The change log needs to be more details. What have you done and why? This should be included in the change log. > Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp:62 > if (opacity < 1.0f) > childPaintInfo.context->beginTransparencyLayer(opacity); I think we do the opacity in SVGRenderSupport as well. Can you remove the calls here and after your code please? Also, can you add a test to verify the behavior please? > Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp:75 > if (opacity < 1.0f) > childPaintInfo.context->endTransparencyLayer(); (needs to be removed as well)
Florin Malita
Comment 6 2011-11-10 16:08:18 PST
Florin Malita
Comment 7 2011-11-10 16:14:32 PST
Comment on attachment 114155 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=114155&action=review Thanks for the review Dirk. I've added tests to exercise clipping, masking, filtering and opacity on FOs as suggested. >> Source/WebCore/ChangeLog:6 >> + Reviewed by NOBODY (OOPS!). > > The change log needs to be more details. What have you done and why? This should be included in the change log. Done. >> Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp:62 >> childPaintInfo.context->beginTransparencyLayer(opacity); > > I think we do the opacity in SVGRenderSupport as well. Can you remove the calls here and after your code please? Also, can you add a test to verify the behavior please? Done. >> Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp:75 >> childPaintInfo.context->endTransparencyLayer(); > > (needs to be removed as well) Done.
Dirk Schulze
Comment 8 2011-11-11 13:23:53 PST
Comment on attachment 114593 [details] Patch LGTM. r=me.
WebKit Review Bot
Comment 9 2011-11-11 16:30:21 PST
Comment on attachment 114593 [details] Patch Clearing flags on attachment: 114593 Committed r100045: <http://trac.webkit.org/changeset/100045>
WebKit Review Bot
Comment 10 2011-11-11 16:30:26 PST
All reviewed patches have been landed. Closing bug.
Erik Arvidsson
Comment 11 2012-01-30 14:26:15 PST
*** Bug 44071 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.