зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1207355
(Part 4) - Request decodes intelligently in nsBulletFrame. r=tn
This commit is contained in:
Родитель
90c6fe8bde
Коммит
485e5ae23b
|
@ -712,9 +712,20 @@ nsBulletFrame::Notify(imgIRequest *aRequest, int32_t aType, const nsIntRect* aDa
|
|||
// Unconditionally start decoding for now.
|
||||
// XXX(seth): We eventually want to decide whether to do this based on
|
||||
// visibility. We should get that for free from bug 1091236.
|
||||
if (aRequest == mImageRequest) {
|
||||
mImageRequest->RequestDecode();
|
||||
nsCOMPtr<imgIContainer> container;
|
||||
aRequest->GetImage(getter_AddRefs(container));
|
||||
if (container) {
|
||||
// Retrieve the intrinsic size of the image.
|
||||
int32_t width = 0;
|
||||
int32_t height = 0;
|
||||
container->GetWidth(&width);
|
||||
container->GetHeight(&height);
|
||||
|
||||
// Request a decode at that size.
|
||||
container->RequestDecodeForSize(IntSize(width, height),
|
||||
imgIContainer::DECODE_FLAGS_DEFAULT);
|
||||
}
|
||||
|
||||
InvalidateFrame();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче