Bug 224795 - Zooming browser does not properly scale SVG clip paths
Summary: Zooming browser does not properly scale SVG clip paths
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: Safari 14
Hardware: Mac (Intel) macOS 11
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-04-19 18:53 PDT by luka
Modified: 2022-02-10 19:00 PST (History)
22 users (show)

See Also:


Attachments
An file containing an example of the problem (1.16 KB, text/html)
2021-04-19 18:53 PDT, luka
no flags Details
Test case (549 bytes, text/html)
2021-08-28 11:35 PDT, Simon Fraser (smfr)
no flags Details
Patch (15.36 KB, patch)
2021-08-28 13:22 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.