Bug 1207253 - make getChildCountCB correctly deal with outerdoc accessibles with proxy children, r=tbsaunde
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Wed, 23 Sep 2015 01:43:51 +0300
changeset 263791 c8146f364b03160f68968b44ef25d40532ae99dd
parent 263790 1ab1ef2f842aaddf34533e8886fb46d73afbaa8b
child 263792 99acde94c567c5455e9642124da61ba797b1ac09
push id65445
push useropettay@mozilla.com
push dateTue, 22 Sep 2015 23:02:47 +0000
treeherdermozilla-inbound@99acde94c567 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstbsaunde
bugs1207253
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 1207253 - make getChildCountCB correctly deal with outerdoc accessibles with proxy children, r=tbsaunde
accessible/atk/AccessibleWrap.cpp
--- a/accessible/atk/AccessibleWrap.cpp
+++ b/accessible/atk/AccessibleWrap.cpp
@@ -822,17 +822,25 @@ getParentCB(AtkObject *aAtkObj)
 gint
 getChildCountCB(AtkObject *aAtkObj)
 {
   if (AccessibleWrap* accWrap = GetAccessibleWrap(aAtkObj)) {
     if (nsAccUtils::MustPrune(accWrap)) {
       return 0;
     }
 
-    return static_cast<gint>(accWrap->EmbeddedChildCount());
+    uint32_t count = accWrap->EmbeddedChildCount();
+    if (count) {
+      return static_cast<gint>(count);
+    }
+
+    OuterDocAccessible* outerDoc = accWrap->AsOuterDoc();
+    if (outerDoc && outerDoc->RemoteChildDoc()) {
+      return 1;
+    }
   }
 
   ProxyAccessible* proxy = GetProxy(aAtkObj);
   if (proxy && !proxy->MustPruneChildren()) {
     return proxy->EmbeddedChildCount();
   }
 
   return 0;