зеркало из https://github.com/mozilla/gecko-dev.git
bug 1262233 - stop using a sync message to implement ProxyAccessible::EmbeddedChildCount() r=lsocks
This commit is contained in:
Родитель
5a44fb72ed
Коммит
426fa80158
|
@ -1845,22 +1845,6 @@ DocAccessibleChild::RecvTakeFocus(const uint64_t& aID)
|
|||
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
|
||||
DocAccessibleChild::RecvIndexOfEmbeddedChild(const uint64_t& aID,
|
||||
const uint64_t& aChildID,
|
||||
|
|
|
@ -454,9 +454,6 @@ public:
|
|||
|
||||
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,
|
||||
const uint64_t& aChildID,
|
||||
uint32_t* aChildIdx) override final;
|
||||
|
|
|
@ -237,7 +237,6 @@ child:
|
|||
prio(high) sync Step(uint64_t aID) returns(double aStep);
|
||||
|
||||
async 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)
|
||||
returns(uint32_t childIdx);
|
||||
prio(high) sync EmbeddedChildAt(uint64_t aID, uint32_t aChildIdx)
|
||||
|
|
|
@ -1035,8 +1035,13 @@ ProxyAccessible::TakeFocus()
|
|||
uint32_t
|
||||
ProxyAccessible::EmbeddedChildCount() const
|
||||
{
|
||||
uint32_t count;
|
||||
Unused << mDoc->SendEmbeddedChildCount(mID, &count);
|
||||
size_t count = 0, kids = mChildren.Length();
|
||||
for (size_t i = 0; i < kids; i++) {
|
||||
if (mChildren[i]->IsEmbeddedObject()) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче