Bug 665335 - Don't trigger PresShellActivated when presshell is not activated, r=tbsaunde, roc
authorAlexander Surkov <surkov.alexander@gmail.com>
Mon, 08 Aug 2011 15:57:45 +0900
changeset 73956 c2a23df05c4c280a6936f1f5a875e502a5e15328
parent 73955 e8399b43ac17f29e3787367a91117da02b525df3
child 73999 9c7ab0a15292530bd8b908f1433e87545c60ff82
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
reviewerstbsaunde, roc
bugs665335
milestone8.0a1
Bug 665335 - Don't trigger PresShellActivated when presshell is not activated, r=tbsaunde, roc
layout/base/nsPresShell.cpp
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -9411,19 +9411,21 @@ PresShell::SetIsActive(PRBool aIsActive)
     presContext->RefreshDriver()->SetThrottled(!mIsActive);
   }
 
   // Propagate state-change to my resource documents' PresShells
   mDocument->EnumerateExternalResources(SetExternalResourceIsActive,
                                         &aIsActive);
   nsresult rv = UpdateImageLockingState();
 #ifdef ACCESSIBILITY
-  nsAccessibilityService* accService = AccService();
-  if (accService) {
-    accService->PresShellActivated(this);
+  if (aIsActive) {
+    nsAccessibilityService* accService = AccService();
+    if (accService) {
+      accService->PresShellActivated(this);
+    }
   }
 #endif
   return rv;
 }
 
 /*
  * Determines the current image locking state. Called when one of the
  * dependent factors changes.