Backed out changeset 9066ef314419 (bug 1192910)

This commit is contained in:
Sebastian Hengst 2016-03-08 11:06:18 +01:00
parent 0fc7aee5e1
commit 9fc7bbba2a
4 changed files with 4 additions and 18 deletions

View File

@ -892,19 +892,9 @@ APZCCallbackHelper::NotifyMozMouseScrollEvent(const FrameMetrics::ViewID& aScrol
}
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);

View File

@ -161,7 +161,7 @@ public:
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);

View File

@ -232,5 +232,5 @@ void
ChromeProcessController::NotifyFlushComplete()
{
MOZ_ASSERT(NS_IsMainThread());
APZCCallbackHelper::NotifyFlushComplete(GetPresShell());
APZCCallbackHelper::NotifyFlushComplete();
}

View File

@ -151,11 +151,7 @@ APZChild::RecvNotifyAPZStateChange(const ViewID& aViewId,
bool
APZChild::RecvNotifyFlushComplete()
{
nsCOMPtr<nsIPresShell> shell;
if (nsCOMPtr<nsIDocument> doc = mBrowser->GetDocument()) {
shell = doc->GetShell();
}
APZCCallbackHelper::NotifyFlushComplete(shell.get());
APZCCallbackHelper::NotifyFlushComplete();
return true;
}