mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 1195471 - make getChildCountCB work with proxies r=davidb
This commit is contained in:
parent
76c5e0a04e
commit
5020e2c060
@ -822,12 +822,20 @@ getParentCB(AtkObject *aAtkObj)
|
|||||||
gint
|
gint
|
||||||
getChildCountCB(AtkObject *aAtkObj)
|
getChildCountCB(AtkObject *aAtkObj)
|
||||||
{
|
{
|
||||||
AccessibleWrap* accWrap = GetAccessibleWrap(aAtkObj);
|
if (AccessibleWrap* accWrap = GetAccessibleWrap(aAtkObj)) {
|
||||||
if (!accWrap || nsAccUtils::MustPrune(accWrap)) {
|
if (nsAccUtils::MustPrune(accWrap)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return static_cast<gint>(accWrap->EmbeddedChildCount());
|
return static_cast<gint>(accWrap->EmbeddedChildCount());
|
||||||
|
}
|
||||||
|
|
||||||
|
ProxyAccessible* proxy = GetProxy(aAtkObj);
|
||||||
|
if (proxy && !proxy->MustPruneChildren()) {
|
||||||
|
return proxy->EmbeddedChildCount();
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
AtkObject *
|
AtkObject *
|
||||||
|
@ -1727,6 +1727,22 @@ DocAccessibleChild::RecvTakeFocus(const uint64_t& aID)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
DocAccessibleChild::RecvEmbeddedChildCount(const uint64_t& aID,
|
||||||
|
uint32_t* aCount)
|
||||||
|
{
|
||||||
|
*aCount = 0;
|
||||||
|
|
||||||
|
Accessible* acc = IdToAccessible(aID);
|
||||||
|
if (!acc) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
*aCount = acc->EmbeddedChildCount();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
DocAccessibleChild::RecvIndexOfEmbeddedChild(const uint64_t& aID,
|
DocAccessibleChild::RecvIndexOfEmbeddedChild(const uint64_t& aID,
|
||||||
const uint64_t& aChildID,
|
const uint64_t& aChildID,
|
||||||
|
@ -434,6 +434,9 @@ public:
|
|||||||
|
|
||||||
virtual bool RecvTakeFocus(const uint64_t& aID) override;
|
virtual bool RecvTakeFocus(const uint64_t& aID) override;
|
||||||
|
|
||||||
|
virtual bool RecvEmbeddedChildCount(const uint64_t& aID, uint32_t* aCount)
|
||||||
|
override final;
|
||||||
|
|
||||||
virtual bool RecvIndexOfEmbeddedChild(const uint64_t& aID,
|
virtual bool RecvIndexOfEmbeddedChild(const uint64_t& aID,
|
||||||
const uint64_t& aChildID,
|
const uint64_t& aChildID,
|
||||||
uint32_t* aChildIdx) override final;
|
uint32_t* aChildIdx) override final;
|
||||||
|
@ -226,6 +226,7 @@ child:
|
|||||||
prio(high) sync Step(uint64_t aID) returns(double aStep);
|
prio(high) sync Step(uint64_t aID) returns(double aStep);
|
||||||
|
|
||||||
prio(high) sync TakeFocus(uint64_t aID);
|
prio(high) sync TakeFocus(uint64_t aID);
|
||||||
|
prio(high) sync EmbeddedChildCount(uint64_t aID) returns(uint32_t aCount);
|
||||||
prio(high) sync IndexOfEmbeddedChild(uint64_t aID, uint64_t aChildID)
|
prio(high) sync IndexOfEmbeddedChild(uint64_t aID, uint64_t aChildID)
|
||||||
returns(uint32_t childIdx);
|
returns(uint32_t childIdx);
|
||||||
prio(high) sync EmbeddedChildAt(uint64_t aID, uint32_t aChildIdx)
|
prio(high) sync EmbeddedChildAt(uint64_t aID, uint32_t aChildIdx)
|
||||||
|
@ -979,6 +979,14 @@ ProxyAccessible::TakeFocus()
|
|||||||
unused << mDoc->SendTakeFocus(mID);
|
unused << mDoc->SendTakeFocus(mID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t
|
||||||
|
ProxyAccessible::EmbeddedChildCount() const
|
||||||
|
{
|
||||||
|
uint32_t count;
|
||||||
|
unused << mDoc->SendEmbeddedChildCount(mID, &count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
int32_t
|
int32_t
|
||||||
ProxyAccessible::IndexOfEmbeddedChild(const ProxyAccessible* aChild)
|
ProxyAccessible::IndexOfEmbeddedChild(const ProxyAccessible* aChild)
|
||||||
{
|
{
|
||||||
|
@ -49,6 +49,7 @@ public:
|
|||||||
|
|
||||||
// XXX evaluate if this is fast enough.
|
// XXX evaluate if this is fast enough.
|
||||||
size_t IndexInParent() const { return Parent()->mChildren.IndexOf(this); }
|
size_t IndexInParent() const { return Parent()->mChildren.IndexOf(this); }
|
||||||
|
uint32_t EmbeddedChildCount() const;
|
||||||
int32_t IndexOfEmbeddedChild(const ProxyAccessible*);
|
int32_t IndexOfEmbeddedChild(const ProxyAccessible*);
|
||||||
ProxyAccessible* EmbeddedChildAt(size_t aChildIdx);
|
ProxyAccessible* EmbeddedChildAt(size_t aChildIdx);
|
||||||
bool MustPruneChildren() const;
|
bool MustPruneChildren() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user