Closed Bug 566188 Opened 14 years ago Closed 14 years ago

MSAA nsAccessibleWrap::GetXPAccessibleFor should return nsAccessible*

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: surkov, Assigned: surkov)

References

(Blocks 2 open bugs)

Details

(Keywords: access)

Attachments

(1 file)

      No description provided.
Attached patch patchSplinter Review
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Attachment #445592 - Flags: review?(bolterbugz)
Attachment #445592 - Flags: feedback?(marco.zehe)
Comment on attachment 445592 [details] [diff] [review]
patch

This try-server build works with JAWS, Window-Eyes and NVDA just fine.
Attachment #445592 - Flags: feedback?(marco.zehe) → feedback+
Comment on attachment 445592 [details] [diff] [review]
patch

>+
>+  nsCOMPtr<nsIAccessible> xpAccessibleResult;

Should that remain an nsIAccessible or should that be converted to an nsAccessible as well here?
(In reply to comment #4)
> (From update of attachment 445592 [details] [diff] [review])
> >+
> >+  nsCOMPtr<nsIAccessible> xpAccessibleResult;
> 
> Should that remain an nsIAccessible or should that be converted to an
> nsAccessible as well here?

We can do nothing with this now because it's used to store result from interface methods which deals with nsIAccessible. Probably we don't need anything, since the result will be queried to IAccessible any way since nsAccessible world doesn't know about nsAccessibleWrap.
Comment on attachment 445592 [details] [diff] [review]
patch

>@@ -272,53 +265,50 @@ STDMETHODIMP nsDocAccessibleWrap::get_ac


> struct nsSearchAccessibleInCacheArg
> {
>-  nsRefPtr<nsAccessNode> mAccessNode;
>+  nsRefPtr<nsAccessible> mAccessible;
>   void *mUniqueID;
> };
> 
> static PLDHashOperator
> SearchAccessibleInCache(const void* aKey, nsDocAccessible* aDocAccessible,
>                         void* aUserArg)
> {
>   NS_ASSERTION(aDocAccessible,
>                "No doc accessible for the object in doc accessible cache!");
> 
>   if (aDocAccessible) {
>     nsSearchAccessibleInCacheArg* arg =
>       static_cast<nsSearchAccessibleInCacheArg*>(aUserArg);
>     nsAccessNode* accessNode =
>       aDocAccessible->GetCachedAccessNode(arg->mUniqueID);
>     if (accessNode) {
>-      arg->mAccessNode = accessNode;
>+      arg->mAccessible = do_QueryObject(accessNode);

Why the change from node to accessible? Doesn't it just add a do_QueryObject call?
(In reply to comment #6)

> Why the change from node to accessible? Doesn't it just add a do_QueryObject
> call?

It adds it here and then removes it there :) Since we expect nsAccessible from this method then I enclosed the query into it.
Comment on attachment 445592 [details] [diff] [review]
patch

fair enough, r=me thanks.
Attachment #445592 - Flags: review?(bolterbugz) → review+
landed on 1.9.3 - http://hg.mozilla.org/mozilla-central/rev/e9ea5ee4f010
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Blocks: a11yperf
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: