mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1213382 - proxy more accessible selection methods, r=tbsaunde
--HG-- extra : rebase_source : 1d8d688d4b1ab671aed5ba28bdcc14b2c4b94f70
This commit is contained in:
parent
cbe8e23af4
commit
42685fa873
@ -533,11 +533,6 @@ public:
|
||||
*/
|
||||
virtual void SetSelected(bool aSelect);
|
||||
|
||||
/**
|
||||
* Extend selection to this accessible.
|
||||
*/
|
||||
void ExtendSelection() { };
|
||||
|
||||
/**
|
||||
* Select the accessible within its container.
|
||||
*/
|
||||
|
@ -30,7 +30,7 @@ class Accessible;
|
||||
* Mozilla creates the implementations of nsIAccessible on demand.
|
||||
* See http://www.mozilla.org/projects/ui/accessibility for more information.
|
||||
*/
|
||||
[scriptable, uuid(66b110b0-c25a-4784-8623-f6ba40c7cfee)]
|
||||
[scriptable, uuid(de2869d9-563c-4943-996b-31a4daa4d097)]
|
||||
interface nsIAccessible : nsISupports
|
||||
{
|
||||
/**
|
||||
@ -231,12 +231,6 @@ interface nsIAccessible : nsISupports
|
||||
*/
|
||||
void setSelected(in boolean isSelected);
|
||||
|
||||
/**
|
||||
* Extend the current selection from its current accessible anchor node
|
||||
* to this accessible
|
||||
*/
|
||||
void extendSelection();
|
||||
|
||||
/**
|
||||
* Select this accessible node only
|
||||
*/
|
||||
|
@ -1621,6 +1621,28 @@ DocAccessibleChild::RecvUnselectAll(const uint64_t& aID,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
DocAccessibleChild::RecvTakeSelection(const uint64_t& aID)
|
||||
{
|
||||
Accessible* acc = IdToAccessible(aID);
|
||||
if (acc) {
|
||||
acc->TakeSelection();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
DocAccessibleChild::RecvSetSelected(const uint64_t& aID, const bool& aSelect)
|
||||
{
|
||||
Accessible* acc = IdToAccessible(aID);
|
||||
if (acc) {
|
||||
acc->SetSelected(aSelect);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
DocAccessibleChild::RecvDoAction(const uint64_t& aID,
|
||||
const uint8_t& aIndex,
|
||||
|
@ -401,6 +401,10 @@ public:
|
||||
virtual bool RecvUnselectAll(const uint64_t& aID,
|
||||
bool* aSuccess) override;
|
||||
|
||||
virtual bool RecvTakeSelection(const uint64_t& aID) override;
|
||||
virtual bool RecvSetSelected(const uint64_t& aID,
|
||||
const bool& aSelect) override;
|
||||
|
||||
virtual bool RecvDoAction(const uint64_t& aID,
|
||||
const uint8_t& aIndex,
|
||||
bool* aSuccess) override;
|
||||
|
@ -216,6 +216,9 @@ child:
|
||||
prio(high) sync SelectAll(uint64_t aID) returns(bool aSuccess);
|
||||
prio(high) sync UnselectAll(uint64_t aID) returns(bool aSuccess);
|
||||
|
||||
async TakeSelection(uint64_t aID);
|
||||
async SetSelected(uint64_t aID, bool aSelected);
|
||||
|
||||
prio(high) sync DoAction(uint64_t aID, uint8_t aIndex) returns(bool aSuccess);
|
||||
prio(high) sync ActionCount(uint64_t aID) returns(uint8_t aCount);
|
||||
prio(high) sync ActionDescriptionAt(uint64_t aID, uint8_t aIndex) returns(nsString aDescription);
|
||||
|
@ -906,6 +906,18 @@ ProxyAccessible::UnselectAll()
|
||||
return success;
|
||||
}
|
||||
|
||||
void
|
||||
ProxyAccessible::TakeSelection()
|
||||
{
|
||||
unused << mDoc->SendTakeSelection(mID);
|
||||
}
|
||||
|
||||
void
|
||||
ProxyAccessible::SetSelected(bool aSelect)
|
||||
{
|
||||
unused << mDoc->SendSetSelected(mID, aSelect);
|
||||
}
|
||||
|
||||
bool
|
||||
ProxyAccessible::DoAction(uint8_t aIndex)
|
||||
{
|
||||
|
@ -309,6 +309,9 @@ public:
|
||||
bool SelectAll();
|
||||
bool UnselectAll();
|
||||
|
||||
void TakeSelection();
|
||||
void SetSelected(bool aSelect);
|
||||
|
||||
bool DoAction(uint8_t aIndex);
|
||||
uint8_t ActionCount();
|
||||
void ActionDescriptionAt(uint8_t aIndex, nsString& aDescription);
|
||||
|
@ -913,9 +913,6 @@ AccessibleWrap::accSelect(
|
||||
if (flagsSelect & SELFLAG_REMOVESELECTION)
|
||||
xpAccessible->SetSelected(false);
|
||||
|
||||
if (flagsSelect & SELFLAG_EXTENDSELECTION)
|
||||
xpAccessible->ExtendSelection();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -498,16 +498,6 @@ xpcAccessible::SetSelected(bool aSelect)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
xpcAccessible::ExtendSelection()
|
||||
{
|
||||
if (!Intl())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
Intl()->ExtendSelection();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
xpcAccessible::TakeSelection()
|
||||
{
|
||||
|
@ -73,7 +73,6 @@ public:
|
||||
final override;
|
||||
|
||||
NS_IMETHOD SetSelected(bool aSelect) final override;
|
||||
NS_IMETHOD ExtendSelection() final override;
|
||||
NS_IMETHOD TakeSelection() final override;
|
||||
NS_IMETHOD TakeFocus() final override;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user