Bug 847223. Part 7. Stop assuming all images are visible on frame create. r=mats

This commit is contained in:
Timothy Nikkel 2013-09-14 19:05:05 -05:00
parent ff6006c467
commit 14b99b1338

View File

@ -427,11 +427,6 @@ nsImageLoadingContent::FrameCreated(nsIFrame* aFrame)
IncrementVisibleCount();
}
nsPresContext* presContext = aFrame->PresContext();
if (mVisibleCount == 0) {
presContext->PresShell()->EnsureImageInVisibleList(this);
}
// We pass the SKIP_FRAME_CHECK flag to TrackImage here because our primary
// frame pointer hasn't been setup yet when this is caled.
TrackImage(mCurrentRequest, SKIP_FRAME_CHECK);
@ -439,6 +434,7 @@ nsImageLoadingContent::FrameCreated(nsIFrame* aFrame)
// We need to make sure that our image request is registered, if it should
// be registered.
nsPresContext* presContext = aFrame->PresContext();
if (mCurrentRequest) {
nsLayoutUtils::RegisterImageRequestIfAnimated(presContext, mCurrentRequest,
&mCurrentRequestRegistered);