Bug 224795

Summary: Zooming browser does not properly scale SVG clip paths
Product: WebKit Reporter: luka
Component: SVGAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, brendan.a, changseok, dino, esprehn+autocc, ews-watchlist, fmalita, fred.wang, glenn, gyuyoung.kim, heycam, kondapallykalyan, noam, pdr, sabouhallawa, schenney, sergio, simon.fraser, thorton, webkit-bug-importer, zalan, zimmermann
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: Mac (Intel)   
OS: macOS 11   
See Also: https://bugs.webkit.org/show_bug.cgi?id=217311
https://bugs.webkit.org/show_bug.cgi?id=236344
Attachments:
Description Flags
An file containing an example of the problem
none
Test case
none
Patch none

Description luka 2021-04-19 18:53:41 PDT
Created attachment 426506 [details]
An file containing an example of the problem

When zooming the browser (via CMD Plus, CMD Minus or via the menu bar), 
an element with an SVG clip path property set does not scale properly on Safari.

I've attached a file clip-path-bug.html showing an example reproduction. 
Notice that when zooming in/out, the red element which has an SVG clip path 
property remains the same size, but other elements scale as expected.

This behaviour is not reproducible on Chrome/Firefox, they both scale 
the red element as expected with the zoom level.
Comment 1 Simon Fraser (smfr) 2021-04-20 09:47:54 PDT
I can reproduce.
Comment 2 Radar WebKit Bug Importer 2021-04-26 18:54:13 PDT
<rdar://problem/77187161>
Comment 3 Simon Fraser (smfr) 2021-08-28 11:27:26 PDT
This testcase works correctly now, but there's still a bug when the clip-path references an SVG element.
Comment 4 Simon Fraser (smfr) 2021-08-28 11:35:22 PDT
Created attachment 436721 [details]
Test case
Comment 5 Simon Fraser (smfr) 2021-08-28 13:22:07 PDT
Created attachment 436723 [details]
Patch
Comment 6 EWS 2021-08-28 18:32:02 PDT
Committed r281736 (241078@main): <https://commits.webkit.org/241078@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 436723 [details].
Comment 7 Brent Fulgham 2022-02-04 12:28:07 PST
This change should be present in STP 139, iOS 15.4 Beta, and macOS 12.3 Beta.