Bug 739198 - stop GetAccService()-GetAccessible usage in AccEventGetAccessibleForNode, r=surkov, f=tbsaunde
authorMark Capella <markcapella@twcny.rr.com>
Tue, 22 May 2012 00:00:24 -0400
changeset 96830 f120010dd2bfbaea876dc5a03fb118051fb348e0
parent 96813 ce618ce8d84a03a9f8db4f98ea28cceb69183bfc
child 96831 d1be5a84f4029385cdccc293d1aed080121e094d
push id1439
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 20:19:22 +0000
treeherdermozilla-aurora@ea74834dccd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssurkov
bugs739198
milestone15.0a1
Bug 739198 - stop GetAccService()-GetAccessible usage in AccEventGetAccessibleForNode, r=surkov, f=tbsaunde
accessible/src/base/AccEvent.cpp
--- a/accessible/src/base/AccEvent.cpp
+++ b/accessible/src/base/AccEvent.cpp
@@ -103,17 +103,24 @@ NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(Acc
 NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(AccEvent, Release)
 
 ////////////////////////////////////////////////////////////////////////////////
 // AccEvent protected methods
 
 nsAccessible*
 AccEvent::GetAccessibleForNode() const
 {
-  return mNode ? GetAccService()->GetAccessible(mNode, nsnull) : nsnull;
+  if (mNode) {
+    nsDocAccessible* document =
+      GetAccService()->GetDocAccessible(mNode->OwnerDoc());
+    if (document)
+      return document->GetAccessible(mNode);
+  }
+
+  return nsnull;
 }
 
 void
 AccEvent::CaptureIsFromUserInput(EIsFromUserInput aIsFromUserInput)
 {
   nsINode *targetNode = GetNode();
 
 #ifdef DEBUG