Bug 220215 - macOS 11 Big Sur Regression: WebKit transform scaling of an image that is clipped appears choppy (non-fractional)
Summary: macOS 11 Big Sur Regression: WebKit transform scaling of an image that is cli...
Status: RESOLVED MOVED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari 14
Hardware: Mac (Apple Silicon) macOS 11
: P2 Major
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-12-31 17:07 PST by Jonathan Deutsch
Modified: 2021-01-05 19:22 PST (History)
4 users (show)

See Also:


Attachments
Xcode reproduction project (216.11 KB, application/zip)
2020-12-31 17:07 PST, Jonathan Deutsch
no flags Details
Video demonstrating the problem; see the first part of the first run for how choppy it is (100.10 MB, video/quicktime)
2020-12-31 17:09 PST, Jonathan Deutsch
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Deutsch 2020-12-31 17:07:38 PST
Created attachment 416873 [details]
Xcode reproduction project

This is a Big Sur regression.

Scaling an element with an image that is clipped (say by a parent with overflow:hidden) will not render properly on fractional numbers.  The result is that when animating this appears very choppy.

This affects mac applications using the WebKit framework, but not WKWebView or Safari.

I'm attaching a sample project and video demonstrating how bad this looks. The HTML code is:

<style>
#container {
	width: 540px;
	height: 540px;
	overflow: hidden;
}
#child {
	width: 540px;
	height: 540px;
	background-image: url('daiyu01@2x.jpg');
	background-repeat: no-repeat no-repeat;
}
</style>

<div id = "container">
	<div id="child"></div>
</div>
    
<script>
var scale = 1.2;
function heartbeat() {
	scale -= .0004;
	document.getElementById("child").style.transform = "scale(" + scale + ")";
}
window.setInterval(heartbeat, 17);
</script>

This was originally reported by a user of the HTML5 animation tool Tumult Hype: https://tumult.com/hype/
Comment 1 Jonathan Deutsch 2020-12-31 17:09:14 PST
Created attachment 416874 [details]
Video demonstrating the problem; see the first part of the first run for how choppy it is
Comment 2 Radar WebKit Bug Importer 2021-01-02 10:45:39 PST
<rdar://problem/72770761>
Comment 3 Simon Fraser (smfr) 2021-01-05 19:22:51 PST
I believe this is a behavior change in AppKit. It will be tracked via the given radar.