Bug 252385 - SVG located after subpixel width wobbles when opacity animation kicks in
Summary: SVG located after subpixel width wobbles when opacity animation kicks in
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: Safari 16
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2023-02-16 01:12 PST by Orkhan Alikhanov
Modified: 2023-03-26 20:20 PDT (History)
7 users (show)

See Also:


Attachments
Minimal reproduction html (1.05 KB, text/html)
2023-02-16 01:12 PST, Orkhan Alikhanov
no flags Details
Video showing the movement (467.77 KB, video/quicktime)
2023-02-16 01:17 PST, Orkhan Alikhanov
no flags Details
Minimal reproduction html revised (1.31 KB, text/html)
2023-02-16 01:44 PST, Orkhan Alikhanov
no flags Details
Safari-Chrome-sub-pixel-retina-magnified (1.13 MB, image/png)
2023-02-23 10:15 PST, Said Abou-Hallawa
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Orkhan Alikhanov 2023-02-16 01:12:44 PST
Created attachment 465021 [details]
Minimal reproduction html

We have an svg on the right side of text, we want to fade it in when the row is hovered, the problem is that it wobbles. From what I observe, movement happens when animation starts and ends.
Giving a certain width to the text element fixes the issue. Also tried to wrap the svg in an absolute div, or other similar structures but couldn't figure out a proper workaround.

Happens in Safari 16 (monterey) and Safari 16.2 (ventura) on M1 mac
Comment 1 Orkhan Alikhanov 2023-02-16 01:17:22 PST
Created attachment 465022 [details]
Video showing the movement
Comment 2 Orkhan Alikhanov 2023-02-16 01:44:37 PST
Created attachment 465023 [details]
Minimal reproduction html revised

It turned out that it was not related to the text at all, rather it was related to the subpixel alignment caused by the width of text.
Comment 3 Ahmad Saleem 2023-02-22 11:13:47 PST
I am able to reproduce this bug using WebKit ToT (260676@main) as well using Mini-Browser.
Comment 4 Radar WebKit Bug Importer 2023-02-23 01:13:19 PST
<rdar://problem/105822810>
Comment 5 Said Abou-Hallawa 2023-02-23 09:53:37 PST
This happens on 2x display only. It does not happen on 1x display.
Comment 6 Said Abou-Hallawa 2023-02-23 10:15:55 PST
Created attachment 465138 [details]
Safari-Chrome-sub-pixel-retina-magnified

I think the problem is in the static display of the SVG. In fact the display is correct while the animation is running.  The SVG moves half pixel at the beginning of the animation to the left (which is the correct display position) and then it moves it back at the end. 

See the attached screenshot which shows a magnified display for Safari at the top and Chrome at the bottom.