зеркало из https://github.com/mozilla/gecko-dev.git
bug 1262233 - stop implementing ProxyAccessible::EmbeddedChildAt() with a sync message r=lsocks
This commit is contained in:
Родитель
fbb720e10a
Коммит
696d088bee
|
@ -1845,21 +1845,6 @@ DocAccessibleChild::RecvTakeFocus(const uint64_t& aID)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
DocAccessibleChild::RecvEmbeddedChildAt(const uint64_t& aID,
|
||||
const uint32_t& aIdx,
|
||||
uint64_t* aChildID)
|
||||
{
|
||||
*aChildID = 0;
|
||||
|
||||
Accessible* acc = IdToAccessible(aID);
|
||||
if (!acc)
|
||||
return true;
|
||||
|
||||
*aChildID = reinterpret_cast<uintptr_t>(acc->GetEmbeddedChildAt(aIdx));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
DocAccessibleChild::RecvFocusedChild(const uint64_t& aID,
|
||||
uint64_t* aChild,
|
||||
|
|
|
@ -454,9 +454,6 @@ public:
|
|||
|
||||
virtual bool RecvTakeFocus(const uint64_t& aID) override;
|
||||
|
||||
virtual bool RecvEmbeddedChildAt(const uint64_t& aID, const uint32_t& aIdx,
|
||||
uint64_t* aChildID) override final;
|
||||
|
||||
virtual bool RecvFocusedChild(const uint64_t& aID,
|
||||
uint64_t* aChild,
|
||||
bool* aOk) override;
|
||||
|
|
|
@ -237,8 +237,6 @@ child:
|
|||
prio(high) sync Step(uint64_t aID) returns(double aStep);
|
||||
|
||||
async TakeFocus(uint64_t aID);
|
||||
prio(high) sync EmbeddedChildAt(uint64_t aID, uint32_t aChildIdx)
|
||||
returns(uint64_t aChild);
|
||||
prio(high) sync FocusedChild(uint64_t aID)
|
||||
returns(uint64_t aChild, bool aOk);
|
||||
|
||||
|
|
|
@ -1065,17 +1065,20 @@ ProxyAccessible::IndexOfEmbeddedChild(const ProxyAccessible* aChild)
|
|||
ProxyAccessible*
|
||||
ProxyAccessible::EmbeddedChildAt(size_t aChildIdx)
|
||||
{
|
||||
// For an outer doc the only child is a document, which is of course an
|
||||
// embedded child. Further asking the child process for the id of the child
|
||||
// document won't work because the id of the child doc will be 0, which we
|
||||
// would interpret as being our parent document.
|
||||
if (mOuterDoc) {
|
||||
return ChildAt(aChildIdx);
|
||||
size_t index = 0, kids = mChildren.Length();
|
||||
for (size_t i = 0; i < kids; i++) {
|
||||
if (!mChildren[i]->IsEmbeddedObject()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (index == aChildIdx) {
|
||||
return mChildren[i];
|
||||
}
|
||||
|
||||
index++;
|
||||
}
|
||||
|
||||
uint64_t childID;
|
||||
Unused << mDoc->SendEmbeddedChildAt(mID, aChildIdx, &childID);
|
||||
return mDoc->GetAccessible(childID);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ProxyAccessible*
|
||||
|
|
Загрузка…
Ссылка в новой задаче