bug 1262233 - stop using a sync message to implement ProxyAccessible::EmbeddedChildCount() r=lsocks

This commit is contained in:
Trevor Saunders 2016-04-04 18:07:58 -04:00
Родитель 5a44fb72ed
Коммит 426fa80158
4 изменённых файлов: 7 добавлений и 22 удалений

Просмотреть файл

@ -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;
}