Bug 242020 - Fixed background-attachment on scrolling element misbehaving.
Summary: Fixed background-attachment on scrolling element misbehaving.
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Other
Hardware: All All
: P2 Major
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-06-26 22:34 PDT by omimanav
Modified: 2022-07-03 22:35 PDT (History)
5 users (show)

See Also:


Attachments
Video with code, demonstrating the issue, notice the laggy/glitchy behaviour. (4.17 MB, video/webm)
2022-06-26 22:34 PDT, omimanav
no flags Details
Test case (763 bytes, text/html)
2022-06-27 11:42 PDT, Simon Fraser (smfr)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description omimanav 2022-06-26 22:34:16 PDT
Created attachment 460500 [details]
Video with code, demonstrating the issue, notice the laggy/glitchy behaviour.

See video attached; as if a fixed background on a scrolling body has a hard time rendering on scroll instead of being a fixed background. I've included the test code below. This isn't an issue on any other browser.
Browser in video is Gnome Web (latest version as of 27/7/22 on Ubuntu repository).
The body is the scrolling element and the background of it tries to keep up with scrolling instead of remaining static/fixed.

Example code shown in video to demonstrate the issue:

<head>
<style>
	div {
		height: 450vh;
		width: 100vw;
		padding: 0;
		margin: 0;
	}

	body {
		background: url("https://i.ibb.co/4FXCrmS/1651208527285.gif");
		background-attachment: fixed;
		background-repeat: no-repeat;
		background-size: cover;
	}
</style>
</head>

<body>
	<div>Test div block</div>
</body>

```
Comment 1 omimanav 2022-06-27 11:37:03 PDT
It's an issue on macOS 10.15 Safari (don't recall what version) and misbehaving albeit differently to this on iOS 15 (doesn't behave as "fixed" attachment). Please consider leaving this an issue on all platforms not just Linux.
Comment 2 Simon Fraser (smfr) 2022-06-27 11:42:12 PDT
I don't see any performance issues on macOS, and on iOS `background-attachment: fixed;` is not supported.
Comment 3 Simon Fraser (smfr) 2022-06-27 11:42:29 PDT
Created attachment 460503 [details]
Test case
Comment 4 Radar WebKit Bug Importer 2022-07-03 22:35:13 PDT
<rdar://problem/96380216>