Backed out changeset 9c232821ae5c (bug 1192910)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Tue, 08 Mar 2016 14:41:48 +0100
changeset 287192 14838e17cfaf4d53a15884705a1e6c887feb8827
parent 287191 677309c89611f3c23ae78d898837efd3781fac5d
child 287193 950506733b03e4062df59650e4852cf162b37a93
push id73102
push userarchaeopteryx@coole-files.de
push dateTue, 08 Mar 2016 13:44:05 +0000
treeherdermozilla-inbound@950506733b03 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1192910
milestone47.0a1
backs out9c232821ae5cd4f2f79a12c58c7e290b2f0d7371
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
Backed out changeset 9c232821ae5c (bug 1192910)
gfx/layers/apz/util/APZCCallbackHelper.cpp
gfx/layers/apz/util/APZCCallbackHelper.h
gfx/layers/apz/util/ChromeProcessController.cpp
gfx/layers/ipc/APZChild.cpp
--- a/gfx/layers/apz/util/APZCCallbackHelper.cpp
+++ b/gfx/layers/apz/util/APZCCallbackHelper.cpp
@@ -887,29 +887,19 @@ APZCCallbackHelper::NotifyMozMouseScroll
 
   nsContentUtils::DispatchTrustedEvent(
     ownerDoc, targetContent,
     aEvent,
     true, true);
 }
 
 void
-APZCCallbackHelper::NotifyFlushComplete(nsIPresShell* aShell)
+APZCCallbackHelper::NotifyFlushComplete()
 {
   MOZ_ASSERT(NS_IsMainThread());
-  // In some cases, flushing the APZ state to the main thread doesn't actually
-  // trigger a flush and repaint (this is an intentional optimization - the stuff
-  // visible to the user is still correct). However, reftests update their
-  // snapshot based on invalidation events that are emitted during paints,
-  // so we ensure that we kick off a paint when an APZ flush is done. Note that
-  // only chrome/testing code can trigger this behaviour.
-  if (aShell && aShell->GetRootFrame()) {
-    aShell->GetRootFrame()->SchedulePaint();
-  }
-
   nsCOMPtr<nsIObserverService> observerService = mozilla::services::GetObserverService();
   MOZ_ASSERT(observerService);
   observerService->NotifyObservers(nullptr, "apz-repaints-flushed", nullptr);
 }
 
 static int32_t sActiveSuppressDisplayport = 0;
 
 void
--- a/gfx/layers/apz/util/APZCCallbackHelper.h
+++ b/gfx/layers/apz/util/APZCCallbackHelper.h
@@ -156,17 +156,17 @@ public:
                                                          const WidgetTouchEvent& aEvent,
                                                          uint64_t aInputBlockId,
                                                          const SetAllowedTouchBehaviorCallback& aCallback);
 
     /* Notify content of a mouse scroll testing event. */
     static void NotifyMozMouseScrollEvent(const FrameMetrics::ViewID& aScrollId, const nsString& aEvent);
 
     /* Notify content that the repaint flush is complete. */
-    static void NotifyFlushComplete(nsIPresShell* aShell);
+    static void NotifyFlushComplete();
 
     /* Temporarily ignore the Displayport for better paint performance. */
     static void SuppressDisplayport(const bool& aEnabled);
     static bool IsDisplayportSuppressed();
 
 private:
   static uint64_t sLastTargetAPZCNotificationInputBlock;
 };
--- a/gfx/layers/apz/util/ChromeProcessController.cpp
+++ b/gfx/layers/apz/util/ChromeProcessController.cpp
@@ -227,10 +227,10 @@ ChromeProcessController::NotifyMozMouseS
 
   APZCCallbackHelper::NotifyMozMouseScrollEvent(aScrollId, aEvent);
 }
 
 void
 ChromeProcessController::NotifyFlushComplete()
 {
   MOZ_ASSERT(NS_IsMainThread());
-  APZCCallbackHelper::NotifyFlushComplete(GetPresShell());
+  APZCCallbackHelper::NotifyFlushComplete();
 }
--- a/gfx/layers/ipc/APZChild.cpp
+++ b/gfx/layers/ipc/APZChild.cpp
@@ -146,21 +146,17 @@ APZChild::RecvNotifyAPZStateChange(const
                                    const int& aArg)
 {
   return mBrowser->NotifyAPZStateChange(aViewId, aChange, aArg);
 }
 
 bool
 APZChild::RecvNotifyFlushComplete()
 {
-  nsCOMPtr<nsIPresShell> shell;
-  if (nsCOMPtr<nsIDocument> doc = mBrowser->GetDocument()) {
-    shell = doc->GetShell();
-  }
-  APZCCallbackHelper::NotifyFlushComplete(shell.get());
+  APZCCallbackHelper::NotifyFlushComplete();
   return true;
 }
 
 void
 APZChild::SetObserver(nsIObserver* aObserver)
 {
   MOZ_ASSERT(!mBrowser);
   mObserver = aObserver;