Bug 1132134 - Get Accessible value from the child process, r=tbsaunde

This commit is contained in:
Olli Pettay 2015-02-11 22:00:11 +02:00
parent 8775f87142
commit 9195fc2577
6 changed files with 31 additions and 2 deletions

View File

@ -152,6 +152,8 @@ interface nsIAccessible : nsISupports
/**
* Help text associated with node
*
* @note As of now, this just returns empty string.
*/
readonly attribute AString help;

View File

@ -81,6 +81,19 @@ DocAccessibleChild::RecvName(const uint64_t& aID, nsString* aName)
return true;
}
bool
DocAccessibleChild::RecvValue(const uint64_t& aID, nsString* aValue)
{
Accessible* acc =
mDoc->GetAccessibleByUniqueID(reinterpret_cast<void*>(aID));
if (!acc) {
return true;
}
acc->Value(*aValue);
return true;
}
bool
DocAccessibleChild::RecvDescription(const uint64_t& aID, nsString* aDesc)
{

View File

@ -43,6 +43,8 @@ public:
*/
virtual bool RecvName(const uint64_t& aID, nsString* aName) MOZ_OVERRIDE;
virtual bool RecvValue(const uint64_t& aID, nsString* aValue) MOZ_OVERRIDE;
/*
* Get the description for the accessible with given id.
*/

View File

@ -48,10 +48,11 @@ parent:
child:
prio(high) sync State(uint64_t aID) returns(uint64_t states);
prio(high) sync Name(uint64_t aID) returns(nsString name);
prio(high) sync Value(uint64_t aID) returns(nsString value);
prio(high) sync Description(uint64_t aID) returns(nsString desc);
prio(high) sync Attributes(uint64_t aID) returns(Attribute[] attributes);
prio(high) sync TextSubstring(uint64_t aID, int32_t aStartOffset, int32_t
aEndOffset) returns(nsString aText);
prio(high) sync TextSubstring(uint64_t aID, int32_t aStartOffset, int32_t
aEndOffset) returns(nsString aText);
};
}

View File

@ -63,6 +63,12 @@ ProxyAccessible::Name(nsString& aName) const
unused << mDoc->SendName(mID, &aName);
}
void
ProxyAccessible::Value(nsString& aValue) const
{
unused << mDoc->SendValue(mID, &aValue);
}
void
ProxyAccessible::Description(nsString& aDesc) const
{

View File

@ -69,6 +69,11 @@ public:
*/
void Name(nsString& aName) const;
/*
* Set aValue to the value of the proxied accessible.
*/
void Value(nsString& aValue) const;
/**
* Set aDesc to the description of the proxied accessible.
*/