Bug 271379 - [Nicosia] Images with translate-Z get unloaded when out of view
Summary: [Nicosia] Images with translate-Z get unloaded when out of view
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Unspecified
: P2 Normal
Assignee: Carlos Garcia Campos
URL:
Keywords:
: 250978 255823 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-03-21 07:22 PDT by Kdwk
Modified: 2024-06-10 23:49 PDT (History)
5 users (show)

See Also:


Attachments
Blur test (4.25 KB, application/x-bzip)
2024-03-21 07:22 PDT, Kdwk
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kdwk 2024-03-21 07:22:11 PDT
Created attachment 470457 [details]
Blur test

If translateZ() is used on an image, the image gets unloaded when scrolled out of view, and when you scroll back to the image there's nothing there.

Reproducers:
1. flathub.org (open an app's entry, scroll the screenshots in the carousel in and out of view. The image is unloaded. Then in Inspector highlight the image and uncheck -webkit-transform: translateZ(0); The image pops back immediately. Now even if you scroll the screenshots in and out of view the images stay there.)

2. apple.com/mac-pro (scroll all the way to the Design section and activate the effect of taking off the case from the Mac Pro by scrolling past it. Then scroll back up. The case is gone. Now open Inspector, highlight the image of the case and uncheck z-index: 1; The case pops back immediately (but (correctly) behind the Mac Pro))

3. I attached an HTML file that is used to test performance with blurs in another bug report. Open test-gpu.html. Scroll up and down repeatedly until all the blurred images get unloaded. Then reload the page and do not scroll yet. Open Inspector and uncheck all the transform: translateZ(0); Scroll up and down repeatedly. The images do not get unloaded.

This can be observed in all WebKitGTK versions, whether Cairo or Skia.
Comment 1 Kdwk 2024-03-21 07:22:48 PDT
This supersedes https://bugs.webkit.org/show_bug.cgi?id=255823
Comment 2 Michael Catanzaro 2024-03-21 07:40:29 PDT
*** Bug 255823 has been marked as a duplicate of this bug. ***
Comment 3 Jeff Fortin 2024-03-21 09:26:50 PDT
Would this be the explanation for bug #250978, or that one is a different cause?
Comment 4 Michael Catanzaro 2024-04-24 09:42:27 PDT
*** Bug 250978 has been marked as a duplicate of this bug. ***
Comment 5 Jeff Fortin 2024-04-24 10:00:34 PDT
Easier than https://apple.com/mac-pro as a test case is https://www.apple.com/ipad-keyboards/ ; if you scroll down the iPad keyboards page to the bottom and back up, all images are unloaded, which makes it easier to notice.
Comment 6 Michael Catanzaro 2024-04-24 13:03:03 PDT
I've never noticed this until a few weeks ago, so I mistakenly assumed it was a WebKitGTK regression. But I tested as far back as August and the bug still occurs. If it's a recent regression, it's not caused by a WebKit change.
Comment 7 Abrar Ahmed 2024-06-09 21:39:15 PDT
This can also be observed at https://www.codeedit.app/
Comment 8 Carlos Garcia Campos 2024-06-10 06:22:01 PDT
Pull request: https://github.com/WebKit/WebKit/pull/29672
Comment 9 EWS 2024-06-10 23:49:28 PDT
Committed 279898@main (3deb4217571c): <https://commits.webkit.org/279898@main>

Reviewed commits have been landed. Closing PR #29672 and removing active labels.