From 85d58a7d979117800bcdfcfe08f161ca59ad37ae Mon Sep 17 00:00:00 2001 From: Timothy Nikkel Date: Sun, 12 Jul 2015 19:10:07 -0500 Subject: [PATCH] Bug 1176156. Make sure images are asked to decode if we are drawing the alt feedback instead of the image. r=seth The Draw() call on the image would normally kick off decoding, but we don't do that if we are drawing the alt feedback instead. --- layout/generic/nsImageFrame.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/layout/generic/nsImageFrame.cpp b/layout/generic/nsImageFrame.cpp index 09cfcc7b0785..ecb7a5f00cdc 100644 --- a/layout/generic/nsImageFrame.cpp +++ b/layout/generic/nsImageFrame.cpp @@ -1699,6 +1699,13 @@ nsImageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, // indicating the status aLists.Content()->AppendNewToTop(new (aBuilder) nsDisplayAltFeedback(aBuilder, this)); + + // This image is visible (we are being asked to paint it) but it's not + // decoded yet. And we are not going to ask the image to draw, so this + // may be the only chance to tell it that it should decode. + if (currentRequest) { + currentRequest->RequestDecode(); + } } else { aLists.Content()->AppendNewToTop(new (aBuilder) nsDisplayImage(aBuilder, this, mImage));