Bug 164181 - SVG clip-path references can clip out later content
: SVG clip-path references can clip out later content
Status: RESOLVED FIXED
Product: WebKit
Classification: Unclassified
Component: SVG
: Safari 10
: Macintosh macOS 10.12
: P2 Normal
Assigned To: Philip Rogers
: InRadar
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-10-29 09:30 PDT by Ryan.d.labar
Modified: 2017-02-11 17:19 PST (History)
12 users (show)

See Also:


Attachments
Patch (4.24 KB, patch)
2017-02-06 21:46 PST, Philip Rogers
no flags Details | Formatted Diff | Diff
PatchWithUpdatedChangeLog (4.32 KB, patch)
2017-02-09 17:28 PST, Philip Rogers
no flags Details | Formatted Diff | Diff
PatchWithUpdatedChangeLog2 (4.32 KB, patch)
2017-02-09 17:44 PST, Philip Rogers
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan.d.labar 2016-10-29 09:30:34 PDT
http://codepen.io/ryan_labar/pen/KgLNyx

Also seems to happen in mobile safari

Using CSS clip-path with an SVG with objectBoundingBox only displays first item and hides the rest or inconsistently displays them.
Comment 1 Dean Jackson 2016-10-29 13:45:04 PDT
<rdar://problem/29000405>
Comment 2 vincent 2017-01-31 13:41:59 PST
Not sure it's only related to objectBoundingBox, but I opened this Chromium bug a while ago that seems related:
https://bugs.chromium.org/p/chromium/issues/detail?id=391291&thanks=391291&ts=1404397995

Also, a simple testcase: http://jsbin.com/bipokocegi/edit?html,css,output

Hope this could be fixed soon
Comment 3 Philip Rogers 2017-02-06 21:46:53 PST
Created attachment 300787 [details]
Patch
Comment 4 Philip Rogers 2017-02-09 15:53:27 PST
Ping for review?
Comment 5 Said Abou-Hallawa 2017-02-09 17:06:42 PST
Comment on attachment 300787 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=300787&action=review

> Source/WebCore/ChangeLog:9
> +        clipping codepath) so we need to ensure RenderLayer::setupClipPath saves and restores

RenderLayer::setupClipPath() saves the context and RenderLayer::paintLayerContents() restores back if RenderLayer::setupClipPath() returns true. How about something like that: "...we need to ensure RenderLayer::setupClipPath() saves the context and its caller restores it back so later content is not clipped as well."
Comment 6 Philip Rogers 2017-02-09 17:28:10 PST
Created attachment 301111 [details]
PatchWithUpdatedChangeLog
Comment 7 Philip Rogers 2017-02-09 17:44:59 PST
Created attachment 301114 [details]
PatchWithUpdatedChangeLog2
Comment 8 WebKit Commit Bot 2017-02-09 19:29:14 PST
Comment on attachment 301114 [details]
PatchWithUpdatedChangeLog2

Clearing flags on attachment: 301114

Committed r212038: <http://trac.webkit.org/changeset/212038>
Comment 9 WebKit Commit Bot 2017-02-09 19:29:18 PST
All reviewed patches have been landed.  Closing bug.
Comment 10 Ryan.d.labar 2017-02-11 17:19:58 PST
(In reply to comment #9)
> All reviewed patches have been landed.  Closing bug.

You are all heros!