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 444810 1dedf706dac630f65d7e677bdad6315f092a624b
parent 444809 13271ee1aac0e9d4afca5eadee3ef815f73e15e1
child 444811 062c4b37d9ab0653df560445c12ab5b951cd917a
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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;
     }