Bug 1414451 - Check that both documents share the same root. r=aklotz a=gchang
authorEitan Isaacson <eitan@monotonous.org>
Fri, 10 Nov 2017 14:59:00 +0200
changeset 704419 1dedf706dac630f65d7e677bdad6315f092a624b
parent 704418 13271ee1aac0e9d4afca5eadee3ef815f73e15e1
child 704420 062c4b37d9ab0653df560445c12ab5b951cd917a
push id91167
push userbmo:csadilek@mozilla.com
push dateTue, 28 Nov 2017 16:21:38 +0000
reviewersaklotz, gchang
bugs1414451
milestone58.0
Bug 1414451 - Check that both documents share the same root. r=aklotz a=gchang
accessible/windows/msaa/AccessibleWrap.cpp
--- a/accessible/windows/msaa/AccessibleWrap.cpp
+++ b/accessible/windows/msaa/AccessibleWrap.cpp
@@ -1540,17 +1540,17 @@ AccessibleWrap::GetIAccessibleFor(const 
   }
 
   return nullptr;
 }
 
 already_AddRefed<IAccessible>
 AccessibleWrap::GetRemoteIAccessibleFor(const VARIANT& aVarChild)
 {
-  DocAccessible* doc = Document();
+  a11y::RootAccessible* root = RootAccessible();
   const nsTArray<DocAccessibleParent*>* remoteDocs =
     DocManager::TopLevelRemoteDocs();
   if (!remoteDocs) {
     return nullptr;
   }
 
   RefPtr<IAccessible> result;
 
@@ -1565,17 +1565,17 @@ AccessibleWrap::GetRemoteIAccessibleFor(
       continue;
     }
 
     Accessible* outerDoc = remoteDoc->OuterDocOfRemoteBrowser();
     if (!outerDoc) {
       continue;
     }
 
-    if (outerDoc->Document() != doc) {
+    if (outerDoc->RootAccessible() != root) {
       continue;
     }
 
     RefPtr<IDispatch> disp =
       GetProxiedAccessibleInSubtree(remoteDoc, aVarChild);
     if (!disp) {
       continue;
     }