Bug 249962 - Applying CSS transform on SVG group causes its text elements to flicker in Safari
Summary: Applying CSS transform on SVG group causes its text elements to flicker in Sa...
Status: RESOLVED DUPLICATE of bug 46987
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: Safari 16
Hardware: All macOS 13
: P2 Major
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-12-30 17:58 PST by Jay Wang
Modified: 2023-10-02 18:24 PDT (History)
8 users (show)

See Also:


Attachments
Safari screencast (1.75 MB, image/gif)
2022-12-30 17:58 PST, Jay Wang
no flags Details
Firefox screencast (1.10 MB, image/gif)
2022-12-30 17:59 PST, Jay Wang
no flags Details
Chrome screencast (1.30 MB, image/gif)
2022-12-30 17:59 PST, Jay Wang
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jay Wang 2022-12-30 17:58:41 PST
Created attachment 464263 [details]
Safari screencast

I notice that applying CSS transform on SVG groups would cause their children text elements to flicker in Safari.
The transformation of other elements looks smooth in Safari. The transformation of all children looks smooth in Firefox or Chrome.

See attached videos for example. The code is at https://codepen.io/xiaohk/pen/yLqOZXx.

Related stack overflow questions:

1. https://stackoverflow.com/questions/74967088/applying-css-transform-on-svg-group-e-g-d3s-zoom-transform-causes-its-text
2. https://stackoverflow.com/questions/26837616/css-transform-rotation-causes-text-flicker-in-safari-8-yosemite
3. https://stackoverflow.com/questions/15751012/css-transform-causes-flicker-in-safari-but-only-when-the-browser-is-2000px-w
4. https://stackoverflow.com/questions/3461441/prevent-flicker-on-webkit-transition-of-webkit-transform

I tried to set `-webkit-transform-style:preserve-3d;`, `-webkit-transform: translateZ(0);`, and `-webkit-filter: opacity(1);`, but they didn't work.
Comment 1 Jay Wang 2022-12-30 17:59:31 PST
Created attachment 464264 [details]
Firefox screencast
Comment 2 Jay Wang 2022-12-30 17:59:54 PST
Created attachment 464265 [details]
Chrome screencast
Comment 3 Simon Fraser (smfr) 2023-01-03 15:28:21 PST
I think this is about font sizes getting rounded to integral values.
Comment 4 Radar WebKit Bug Importer 2023-01-06 17:59:18 PST
<rdar://problem/103975675>
Comment 5 Ahmad Saleem 2023-10-02 18:24:25 PDT

*** This bug has been marked as a duplicate of bug 46987 ***