Bug 847223. Part 7. Stop assuming all images are visible on frame create. r=mats
authorTimothy Nikkel <tnikkel@gmail.com>
Sat, 14 Sep 2013 19:05:05 -0500
changeset 147217 8f08b1cb5fba
parent 147216 c6dcd4d77085
child 147218 412e57718425
push id33809
push usertnikkel@gmail.com
push dateSun, 15 Sep 2013 00:05:34 +0000
treeherdermozilla-inbound@daa9550337ab [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats
bugs847223
milestone26.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 847223. Part 7. Stop assuming all images are visible on frame create. r=mats
content/base/src/nsImageLoadingContent.cpp
--- a/content/base/src/nsImageLoadingContent.cpp
+++ b/content/base/src/nsImageLoadingContent.cpp
@@ -422,28 +422,24 @@ nsImageLoadingContent::FrameCreated(nsIF
 {
   NS_ASSERTION(aFrame, "aFrame is null");
 
   if (aFrame->HasAnyStateBits(NS_FRAME_IN_POPUP)) {
     // Assume all images in popups are visible.
     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);
   TrackImage(mPendingRequest, SKIP_FRAME_CHECK);
 
   // 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);
   }
 
   if (mPendingRequest) {
     nsLayoutUtils::RegisterImageRequestIfAnimated(presContext, mPendingRequest,
                                                   &mPendingRequestRegistered);