bug 1209615 - make remote primary docs RELATION_EMBEDS targets for atk r=davidb
authorTrevor Saunders <tbsaunde@tbsaunde.org>
Tue, 06 Oct 2015 15:03:31 -0400
changeset 266687 81ed1750e33aab9f2fcdc3834e79e7a3168daa60
parent 266686 605191307c3a7530db1172f51039c5bee01499c1
child 266688 c45c9add2d8d081a158492936527aeabec7cddac
push id66255
push usertsaunders@mozilla.com
push dateWed, 07 Oct 2015 22:27:42 +0000
treeherdermozilla-inbound@f48787d52534 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdavidb
bugs1209615
milestone44.0a1
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
bug 1209615 - make remote primary docs RELATION_EMBEDS targets for atk r=davidb
accessible/atk/AccessibleWrap.cpp
--- a/accessible/atk/AccessibleWrap.cpp
+++ b/accessible/atk/AccessibleWrap.cpp
@@ -980,16 +980,23 @@ UpdateAtkRelation(RelationType aType, Ac
     atk_relation_set_remove(aAtkSet, atkRelation);
 
   Relation rel(aAcc->RelationByType(aType));
   nsTArray<AtkObject*> targets;
   Accessible* tempAcc = nullptr;
   while ((tempAcc = rel.Next()))
     targets.AppendElement(AccessibleWrap::GetAtkObject(tempAcc));
 
+  if (aType == RelationType::EMBEDS && aAcc->IsRoot()) {
+    if (ProxyAccessible* proxyDoc =
+        aAcc->AsRoot()->GetPrimaryRemoteTopLevelContentDoc()) {
+      targets.AppendElement(GetWrapperFor(proxyDoc));
+    }
+  }
+
   if (targets.Length()) {
     atkRelation = atk_relation_new(targets.Elements(),
                                    targets.Length(), aAtkType);
     atk_relation_set_add(aAtkSet, atkRelation);
     g_object_unref(atkRelation);
   }
 }