Bug 956704 - Introduce a mechanism for only suppressing animation frames. r=smaug

This commit is contained in:
Blake Kaplan
2014-02-26 15:58:21 -08:00
parent 0a73cf69cc
commit 05044bbe0a
8 changed files with 115 additions and 34 deletions

View File

@@ -7979,8 +7979,16 @@ nsDocShell::RestoreFromHistory()
nsCOMPtr<nsIDocument> d = do_GetInterface(parent);
if (d) {
if (d->EventHandlingSuppressed()) {
document->SuppressEventHandling(d->EventHandlingSuppressed());
document->SuppressEventHandling(nsIDocument::eEvents,
d->EventHandlingSuppressed());
}
// Ick, it'd be nicer to not rewalk all of the subdocs here.
if (d->AnimationsPaused()) {
document->SuppressEventHandling(nsIDocument::eAnimationsOnly,
d->AnimationsPaused());
}
nsCOMPtr<nsPIDOMWindow> parentWindow = d->GetWindow();
if (parentWindow) {
parentSuspendCount = parentWindow->TimeoutSuspendCount();