mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 847223. Part 9. Try to avoid asking for a decode of an image whose network request finishes before painting is unsuppressed. r=joe,mats
This commit is contained in:
parent
ed1a166eec
commit
8243dc1741
@ -237,8 +237,16 @@ nsImageLoadingContent::OnStopRequest(imgIRequest* aRequest,
|
||||
if (shell && shell->IsVisible() &&
|
||||
(!shell->DidInitialize() || shell->IsPaintingSuppressed())) {
|
||||
|
||||
if (NS_SUCCEEDED(mCurrentRequest->StartDecoding())) {
|
||||
startedDecoding = true;
|
||||
// If we've gotten a frame and that frame has called FrameCreate and that
|
||||
// frame has been reflowed then we know that it checked it's own visibility
|
||||
// so we can trust our visible count and we don't start decode if we are not
|
||||
// visible.
|
||||
nsIFrame* f = GetOurPrimaryFrame();
|
||||
if (!mFrameCreateCalled || !f ||
|
||||
(f->GetStateBits() & NS_FRAME_FIRST_REFLOW) || mVisibleCount > 0) {
|
||||
if (NS_SUCCEEDED(mCurrentRequest->StartDecoding())) {
|
||||
startedDecoding = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user