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.
This commit is contained in:
Timothy Nikkel 2015-07-12 19:10:07 -05:00
Родитель 12d9815c6e
Коммит 85d58a7d97
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -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));