Bug 164181

Summary: SVG clip-path references can clip out later content
Product: WebKit Reporter: Ryan.d.labar
Component: SVGAssignee: Philip Rogers <pdr>
Status: RESOLVED FIXED    
Severity: Normal CC: chrishtr, commit-queue, dino, esprehn+autocc, glenn, kondapallykalyan, pdr, sabouhallawa, simon.fraser, vincent, webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar
Version: Safari 10   
Hardware: Mac   
OS: macOS 10.12   
Attachments:
Description Flags
Patch
none
PatchWithUpdatedChangeLog
none
PatchWithUpdatedChangeLog2 none

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!