Backed out changeset 071d44d633ea (bug 1234121)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Thu, 07 Apr 2016 14:15:41 +0200
changeset 292216 e17e914479ba7db1e948f0091dc9ce3a74b858fe
parent 292215 556ead25fa217327f8d116b4390db1f459704636
child 292217 0c5141a1d8d9c8e7892960fd264fd9f0f100c510
push id30152
push userkwierso@gmail.com
push dateThu, 07 Apr 2016 20:42:20 +0000
treeherdermozilla-central@06678484909c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1234121
milestone48.0a1
backs out071d44d633eaf4b6981ec86fa87e8c8c538be762
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 071d44d633ea (bug 1234121)
accessible/base/FocusManager.h
accessible/generic/Accessible.cpp
accessible/ipc/ProxyAccessible.cpp
--- a/accessible/base/FocusManager.h
+++ b/accessible/base/FocusManager.h
@@ -1,26 +1,26 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_a11y_FocusManager_h_
 #define mozilla_a11y_FocusManager_h_
 
-#include "mozilla/a11y/Accessible.h"
 #include "nsAutoPtr.h"
 
 class nsINode;
 class nsIDocument;
 class nsISupports;
 
 namespace mozilla {
 namespace a11y {
 
 class AccEvent;
+class Accessible;
 class ProxyAccessible;
 class DocAccessible;
 
 /**
  * Manage the accessible focus. Used to fire and process accessible events.
  */
 class FocusManager
 {
@@ -33,24 +33,16 @@ public:
   Accessible* FocusedAccessible() const { return mFocusedAcc; }
 
   /**
    * Return remote focused accessible.
    */
   ProxyAccessible* FocusedRemoteAccessible() const { return mFocusedProxy; }
 
   /**
-  * Set focused accessible to null.
-  */
-  void ResetFocusedAccessible()
-  {
-    mFocusedAcc = nullptr;
-    mFocusedProxy = nullptr;
-  }
-  /**
    * Return true if given accessible is focused.
    */
   bool IsFocused(const Accessible* aAccessible) const
     { return aAccessible == mFocusedAcc; }
   /**
    * Return true if the given accessible is an active item, i.e. an item that
    * is current within the active widget.
    */
--- a/accessible/generic/Accessible.cpp
+++ b/accessible/generic/Accessible.cpp
@@ -1891,21 +1891,16 @@ Accessible::Shutdown()
 
   if (mParent)
     mParent->RemoveChild(this);
 
   mContent = nullptr;
   mDoc = nullptr;
   if (SelectionMgr() && SelectionMgr()->AccessibleWithCaret(nullptr) == this)
     SelectionMgr()->ResetCaretOffset();
-
-  if (FocusMgr()->IsFocused(this)) {
-    FocusMgr()->ResetFocusedAccessible();
-  }
-
 }
 
 // Accessible protected
 void
 Accessible::ARIAName(nsString& aName)
 {
   // aria-labelledby now takes precedence over aria-label
   nsresult rv = nsTextEquivUtils::
--- a/accessible/ipc/ProxyAccessible.cpp
+++ b/accessible/ipc/ProxyAccessible.cpp
@@ -38,20 +38,16 @@ ProxyAccessible::Shutdown()
       mChildren[idx]->Shutdown();
   } else {
     if (mChildren.Length() != 1)
       MOZ_CRASH("outer doc doesn't own adoc!");
 
     mChildren[0]->AsDoc()->Unbind();
   }
 
-  if (FocusMgr()->FocusedRemoteAccessible() == this) {
-    FocusMgr()->ResetFocusedAccessible();
-  }
-
   mChildren.Clear();
   ProxyDestroyed(this);
   mDoc->RemoveAccessible(this);
 }
 
 void
 ProxyAccessible::SetChildDoc(DocAccessibleParent* aParent)
 {