# HG changeset patch # User Mihai Volmer # Date 1440202994 25200 # Fri Aug 21 17:23:14 2015 -0700 # Node ID e01199052fdb5a9889d67283789918430d1b289f # Parent 22c34579ae0720e7d3dc39a22b9d33f13bc0198b Bug 1024343: The document should not stop animations when it is being swapped. r=smaug diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp --- a/dom/base/nsDocument.cpp +++ b/dom/base/nsDocument.cpp @@ -9266,17 +9266,20 @@ nsDocument::OnPageHide(bool aPersisted, // move us around. mIsShowing = false; } if (mAnimationController) { mAnimationController->OnPageHide(); } - if (aPersisted) { + // We do not stop the animations (bug 1024343) + // when the page is refreshing while being dragged out + nsDocShell* docShell = mDocumentContainer.get(); + if (aPersisted && !(docShell && docShell->InFrameSwap())) { SetImagesNeedAnimating(false); } MozExitPointerLock(); // Now send out a PageHide event. nsCOMPtr target = aDispatchStartTarget; if (!target) {