RESOLVED FIXED 273457
REGRESSION(276827@main): Some animated images that used to work no longer work
https://bugs.webkit.org/show_bug.cgi?id=273457
Summary REGRESSION(276827@main): Some animated images that used to work no longer work
Said Abou-Hallawa
Reported 2024-04-29 17:54:53 PDT
Before 276827@main, ImageSource::frameAtIndexCacheIfNeeded() used to take an std::optional<SubsamplingLevel> whose value can be ignored when it passed as std::nullopt. When it is present and its value is different from the current subsamplingLevel, the ImageFrame NativeImage should be destroyed. After 276827@main, BitmapImageSource::frameAtIndexCacheIfNeeded() is now taking SubsamplingLevel with a default value equal to SubsamplingLevel::Default. For all metadata expect the size, this parameter is not passed. This means if a NativeImage with subsamplingLevel != SubsamplingLevel::Default is cached in the current ImageFrame and then a metadata like 'orientation' is requested, this NativeImage will be destroyed. This broke large animated images which can be subsampled. This code in BitmapImageSource::imageFrameDecodeAtIndexHasFinished() causes the image not to be displayed. cacheNativeImageAtIndex(index, subsamplingLevel, options, nativeImage.releaseNonNull()); imageFrameDecodeAtIndexHasFinished(index, animatingState, frameDecodingStatusAtIndex(index)); After caching the NativeImage by calling cacheNativeImageAtIndex(), frameDecodingStatusAtIndex() will destroy this NativeImage immediately because it calls frameAtIndexCacheIfNeeded() which calls destroyNativeImageAtIndex().
Attachments
Said Abou-Hallawa
Comment 1 2024-04-29 17:55:14 PDT
Said Abou-Hallawa
Comment 2 2024-04-29 18:05:02 PDT
EWS
Comment 3 2024-04-30 16:20:54 PDT
Committed 278195@main (f644ba89b026): <https://commits.webkit.org/278195@main> Reviewed commits have been landed. Closing PR #27911 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.