Bug 222112

Summary: WebKit renders APNGs with corrupted palettes
Product: WebKit Reporter: trashboyjet
Component: ImagesAssignee: Nobody <webkit-unassigned>
Status: RESOLVED MOVED    
Severity: Normal CC: sabouhallawa, simon.fraser
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: iPhone / iPad   
OS: iOS 14   
URL: https://bobatealee.com/hosting/webkitbug/ohyeah.png
Attachments:
Description Flags
Test Case Reduction
none
Test Case Reduction none

Description trashboyjet 2021-02-18 08:59:12 PST
Created attachment 420835 [details]
Test Case Reduction

It appears that WebKit has issues with rendering certain .apng files. I've tested on multiple browsers utilizing WebKit, with a few images, and they generally have corrupted palettes/flickering that does not occur on non-WebKit browsers.

To reproduce this error, simply visit one of the pages attached to this report. It should happen consistently.

By doing the above, you'll see the .apng file flicker or have transparency/palette corruption.

The expected result is to have this function as it does on any non-WebKit browser.

Here's 4 different WebKit browsers I tested on where the issue consistently occurs:
- Safari 14 (macOS)
- Safari 14 (iOS)
- Firefox 31 (iOS)
- Chrome 87.0.4280.77 (iOS)

I've also tested non-WebKit browsers, and the issue isn't present:
- Firefox 85.0.2 (Windows)
- Chrome 88.0.4324.150(Windows)
- Firefox 85.0.1 (macOS)
- Chrome 88.0.4324.182 (macOS)
- Brave 1.19.86 (macOS)

If you need any more information, please let me know.
Comment 1 trashboyjet 2021-02-19 12:45:00 PST
Comment on attachment 420835 [details]
Test Case Reduction

><!DOCTYPE html>
><html>
>	<head>
>		<title>Test Case Reduction</title>
>	</head>
>
>	<body>
>		<img src="https://bobatealee.com/hosting/webkitbug/ohyeah.png"></img>
>	</body>
></html>
Comment 2 trashboyjet 2021-02-19 12:45:58 PST
Created attachment 421015 [details]
Test Case Reduction
Comment 3 Alexey Proskuryakov 2021-02-19 18:41:26 PST
It almost looks intentional on this example, but comparing to other browsers, it's not.
Comment 4 Simon Fraser (smfr) 2021-02-19 19:09:48 PST
rdar://74547307
Comment 5 Simon Fraser (smfr) 2021-02-19 19:09:59 PST
Tracked internally.