Temporarily backout bug 1120149 because it conflicts with other uplifts.
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 04 Feb 2015 10:01:50 -0500
changeset 243669 914dfaa20eef
parent 243668 5c93fa7cc6d5
child 243670 842d25881e21
push id4432
push userryanvm@gmail.com
push date2015-02-04 15:12 +0000
treeherdermozilla-beta@7422906b1a32 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1120149
milestone36.0
Temporarily backout bug 1120149 because it conflicts with other uplifts.
image/src/ProgressTracker.cpp
image/src/ProgressTracker.h
--- a/image/src/ProgressTracker.cpp
+++ b/image/src/ProgressTracker.cpp
@@ -362,35 +362,16 @@ ProgressTracker::SyncNotifyInternal(Prox
   }
 
   if (aProgress & FLAG_LOAD_COMPLETE) {
     NOTIFY_IMAGE_OBSERVERS(aProxies,
                            OnLoadComplete(aProgress & FLAG_LAST_PART_COMPLETE));
   }
 }
 
-Progress
-ProgressTracker::Difference(Progress aProgress) const
-{
-  Progress diff = ~mProgress & aProgress;
-
-  // XXX(seth): Hack to work around the fact that some observers have bugs and
-  // need to get onload blocking notifications multiple times. We should fix
-  // those observers and remove this.
-  if ((aProgress & FLAG_DECODE_COMPLETE) &&
-      (mProgress & FLAG_ONLOAD_BLOCKED) &&
-      (mProgress & FLAG_ONLOAD_UNBLOCKED)) {
-    MOZ_ASSERT(!(diff & FLAG_ONLOAD_BLOCKED));
-    MOZ_ASSERT(!(diff & FLAG_ONLOAD_UNBLOCKED));
-    diff |= FLAG_ONLOAD_BLOCKED | FLAG_ONLOAD_UNBLOCKED;
-  }
-
-  return diff;
-}
-
 void
 ProgressTracker::SyncNotifyProgress(Progress aProgress,
                                     const nsIntRect& aInvalidRect
                                                   /* = nsIntRect() */)
 {
   MOZ_ASSERT(NS_IsMainThread(), "Use mConsumers on main thread only");
 
   // Don't unblock onload if we're not blocked.
--- a/image/src/ProgressTracker.h
+++ b/image/src/ProgressTracker.h
@@ -137,17 +137,20 @@ public:
   // Stateless notifications. These are dispatched and immediately forgotten
   // about. All except OnImageAvailable are main thread only.
   void OnDiscard();
   void OnUnlockedDraw();
   void OnImageAvailable();
 
   // Compute the difference between this our progress and aProgress. This allows
   // callers to predict whether SyncNotifyProgress will send any notifications.
-  Progress Difference(Progress aProgress) const;
+  Progress Difference(Progress aProgress) const
+  {
+    return ~mProgress & aProgress;
+  }
 
   // Update our state to incorporate the changes in aProgress and synchronously
   // notify our observers.
   //
   // Because this may result in recursive notifications, no decoding locks may
   // be held.  Called on the main thread only.
   void SyncNotifyProgress(Progress aProgress,
                           const nsIntRect& aInvalidRect = nsIntRect());