Bug 244406 - Unexpected shift at end of scale transition
Summary: Unexpected shift at end of scale transition
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2022-08-26 12:27 PDT by Jon Lee
Modified: 2022-09-13 12:19 PDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Lee 2022-08-26 12:27:17 PDT
See codepen on desktop:
https://codepen.io/legion80/pen/JjLqgNV

Mouse over the icon links.

There is a scale transition that happens on hover. At the end, the icon shifts to the right.

Changing the font-size to something integral, in the <nav> CSS, fixes the issue.

Does not happen in Firefox or Chrome.
Comment 1 Jon Lee 2022-08-26 12:29:07 PDT
Using sub-integral scaling factors on margin also cause the bug.
Comment 2 Karl Dubost 2022-08-28 22:18:25 PDT
Jon, thanks for the report. 

I can't reproduce in STP 152 on Ventura. 
but I can reproduce on the normal version. 

This is happening during the transition set by 

svg:hover {
fill: red;
transform: scale(1.2);
transition: transform 200ms;
}

With a longer transition, we can see that 
it's moving to the left, just right away
then the transition is starting and 
once it has finished, it's moving to the right back in position.
Comment 3 Radar WebKit Bug Importer 2022-08-28 22:18:34 PDT
<rdar://problem/99262158>
Comment 4 Jon Lee 2022-08-28 23:41:38 PDT
I can reproduce in STP 152 on Monterey 12.5.1.

Karl, if you try other scaling factors, maybe something that includes the hundredths--scale(1.33), for example-- does it then repro on Ventura? I haven't had a chance to switch over to the beta to try.
Comment 5 Karl Dubost 2022-08-29 00:20:55 PDT
Thanks Jon,

Tested on macOS 13.0 ventura
---
Safari                     16.1          18614.2.1.1.1 REPRODUCE
Safari Technology Preview  16.0          18615.1.2.3.  DOES NOT REPRODUCE

even playing with different values of the scale and making sure that all experimental features are set to defaults.
Comment 6 Antoine Quint 2022-09-13 01:51:45 PDT
So this would be a recent regression?
Comment 7 Jon Lee 2022-09-13 08:55:49 PDT
I don't think this is an STP-only regression.

On macOS 12.5.1, with stock Safari, and also updating to Safari 16, I can reproduce. It reproduces on STP 153, also.
Comment 8 Karl Dubost 2022-09-13 12:15:58 PDT
It seems more OS related than browser version?
Comment 9 Karl Dubost 2022-09-13 12:19:42 PDT
Ah no scratch that. :) 
It reproduces on both Ventura and Monterey. 
hmmm :( Let me retry something for testing.