mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 1214864 - make SetCarretOffset() async r=davidb
It calls TakeFocus() which needs to be async to avoid deadlocks, so it needs to be async as well.
This commit is contained in:
parent
e1504edae4
commit
9eef2078ad
@ -586,9 +586,8 @@ setCaretOffsetCB(AtkText *aText, gint aOffset)
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
if (proxy->SetCaretOffset(aOffset)) {
|
||||
return TRUE;
|
||||
}
|
||||
proxy->SetCaretOffset(aOffset);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
@ -390,13 +390,10 @@ DocAccessibleChild::RecvCaretOffset(const uint64_t& aID, int32_t* aOffset)
|
||||
|
||||
bool
|
||||
DocAccessibleChild::RecvSetCaretOffset(const uint64_t& aID,
|
||||
const int32_t& aOffset,
|
||||
bool* aRetVal)
|
||||
const int32_t& aOffset)
|
||||
{
|
||||
HyperTextAccessible* acc = IdToHyperTextAccessible(aID);
|
||||
*aRetVal = false;
|
||||
if (acc && acc->IsTextRole() && acc->IsValidOffset(aOffset)) {
|
||||
*aRetVal = true;
|
||||
acc->SetCaretOffset(aOffset);
|
||||
}
|
||||
return true;
|
||||
|
@ -103,8 +103,8 @@ public:
|
||||
override;
|
||||
virtual bool RecvCaretOffset(const uint64_t& aID, int32_t* aOffset)
|
||||
override;
|
||||
virtual bool RecvSetCaretOffset(const uint64_t& aID, const int32_t& aOffset,
|
||||
bool* aValid) override;
|
||||
virtual bool RecvSetCaretOffset(const uint64_t& aID, const int32_t& aOffset)
|
||||
override;
|
||||
|
||||
virtual bool RecvCharacterCount(const uint64_t& aID, int32_t* aCount)
|
||||
override;
|
||||
|
@ -92,7 +92,7 @@ child:
|
||||
// TextSubstring is getText in IDL.
|
||||
prio(high) sync CaretLineNumber(uint64_t aID) returns(int32_t aLineNumber);
|
||||
prio(high) sync CaretOffset(uint64_t aID) returns(int32_t aOffset);
|
||||
prio(high) sync SetCaretOffset(uint64_t aID, int32_t aOffset) returns (bool aValid);
|
||||
async SetCaretOffset(uint64_t aID, int32_t aOffset);
|
||||
prio(high) sync CharacterCount(uint64_t aID) returns(int32_t aCount);
|
||||
prio(high) sync SelectionCount(uint64_t aID) returns(int32_t aCount);
|
||||
prio(high) sync TextSubstring(uint64_t aID, int32_t aStartOffset, int32_t
|
||||
|
@ -216,12 +216,10 @@ ProxyAccessible::CaretOffset()
|
||||
return offset;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
ProxyAccessible::SetCaretOffset(int32_t aOffset)
|
||||
{
|
||||
bool valid = false;
|
||||
unused << mDoc->SendSetCaretOffset(mID, aOffset, &valid);
|
||||
return valid;
|
||||
unused << mDoc->SendSetCaretOffset(mID, aOffset);
|
||||
}
|
||||
|
||||
int32_t
|
||||
|
@ -132,7 +132,7 @@ public:
|
||||
|
||||
int32_t CaretLineNumber();
|
||||
int32_t CaretOffset();
|
||||
bool SetCaretOffset(int32_t aOffset);
|
||||
void SetCaretOffset(int32_t aOffset);
|
||||
|
||||
int32_t CharacterCount();
|
||||
int32_t SelectionCount();
|
||||
|
Loading…
Reference in New Issue
Block a user