зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1103328 (Part 1) - Fire HAS_TRANSPARENCY for clear disposal methods. r=tn
This commit is contained in:
Родитель
d73bc31eb2
Коммит
caa45fe3ec
|
@ -828,6 +828,18 @@ nsGIFDecoder2::WriteInternal(const char* aBuffer, uint32_t aCount,
|
|||
if (mGIFStruct.disposal_method == 4) {
|
||||
mGIFStruct.disposal_method = 3;
|
||||
}
|
||||
|
||||
{
|
||||
int32_t method =
|
||||
FrameBlender::FrameDisposalMethod(mGIFStruct.disposal_method);
|
||||
if (method == FrameBlender::kDisposeClearAll ||
|
||||
method == FrameBlender::kDisposeClear) {
|
||||
// We may have to display the background under this image during
|
||||
// animation playback, so we regard it as transparent.
|
||||
PostHasTransparency();
|
||||
}
|
||||
}
|
||||
|
||||
mGIFStruct.delay_time = GETINT16(q + 1) * 10;
|
||||
GETN(1, gif_consume_block);
|
||||
break;
|
||||
|
|
|
@ -176,6 +176,12 @@ void nsPNGDecoder::CreateFrame(png_uint_32 x_offset, png_uint_32 y_offset,
|
|||
#ifdef PNG_APNG_SUPPORTED
|
||||
if (png_get_valid(mPNG, mInfo, PNG_INFO_acTL)) {
|
||||
mAnimInfo = AnimFrameInfo(mPNG, mInfo);
|
||||
|
||||
if (mAnimInfo.mDispose == FrameBlender::kDisposeClear) {
|
||||
// We may have to display the background under this image during
|
||||
// animation playback, so we regard it as transparent.
|
||||
PostHasTransparency();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче