Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: bf0c7c6154c617cd29731d5f3a05d3918ec8efa2
https://github.com/WebKit/WebKit/commit/bf0c7c6154c617cd29731d5f3a05d3918ec8efa2
Author: Said Abou-Hallawa <[email protected]>
Date: 2026-06-30 (Tue, 30 Jun 2026)
Changed paths:
M Source/WebCore/platform/graphics/BitmapImageSource.cpp
Log Message:
-----------
REGRESSION(312893@main): ASSERT(m_decodedSize >= decodedSize) in
BitmapImageSource::decodedSizeReset()
https://bugs.webkit.org/show_bug.cgi?id=318238
rdar://181042189
Reviewed by Richard Robinson.
In 312893@main and 296430@main, ImageFrame was changed to include more than one
NativeImage. Managing the decodedSize has to be adjusted to take this into
account.
We should consider removing one or more NativeImages from ImageFrame.
In BitmapImageSource::cacheNativeImageAtIndex() one or more NativeImage are
removed.
But only one NativeImage is added.
Removing the NativeImages is done first by `destroyNativeImageAtIndex()`. The
size
of the removed NativeImages is decremented correctly from decodedSize.
Adding the new NativeImage is done second. The whole size of the `ImageFrame` is
added to the decodedSize which this is wrong. And this is the cause of this
assertion. The size of the added NativeImage should be added only to
decodedSize.
* Source/WebCore/platform/graphics/BitmapImageSource.cpp:
(WebCore::BitmapImageSource::cacheNativeImageAtIndex):
Canonical link: https://commits.webkit.org/316180@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications