From 966a34c2af38689e28259c8e69f13d7389915e60 Mon Sep 17 00:00:00 2001 From: Olli Pettay Date: Wed, 23 Sep 2015 01:43:51 +0300 Subject: [PATCH] Bug 1207253 - make getChildCountCB correctly deal with outerdoc accessibles with proxy children, r=tbsaunde --- accessible/atk/AccessibleWrap.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/accessible/atk/AccessibleWrap.cpp b/accessible/atk/AccessibleWrap.cpp index 4158da5d486..78fb84c217e 100644 --- a/accessible/atk/AccessibleWrap.cpp +++ b/accessible/atk/AccessibleWrap.cpp @@ -827,7 +827,15 @@ getChildCountCB(AtkObject *aAtkObj) return 0; } - return static_cast(accWrap->EmbeddedChildCount()); + uint32_t count = accWrap->EmbeddedChildCount(); + if (count) { + return static_cast(count); + } + + OuterDocAccessible* outerDoc = accWrap->AsOuterDoc(); + if (outerDoc && outerDoc->RemoteChildDoc()) { + return 1; + } } ProxyAccessible* proxy = GetProxy(aAtkObj);