Closed Bug 395081 Opened 17 years ago Closed 17 years ago

AccessibleObjectFromPoint returns errors

Categories

(Core :: Disability Access APIs, defect)

All
Windows XP
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: aaronlev, Assigned: aaronlev)

References

(Blocks 1 open bug)

Details

(Keywords: access, regression)

Attachments

(1 file, 3 obsolete files)

1. Open MSAA Inspect and Mozilla
2. Hover of any object in a web page or the user interface

Inspect reports:
Cannot get object from point:
[Error AccessibleObjectFromPoint: hr=0x80004005 - Unspecified error]
Flags: blocking1.9?
Actually most of the UI elements are working. The menu bar is broken, though.

And nothing in content is working.
I think it cannot walk inside an outerdoc accessible into the inner doc accessible.
Assignee: surkov.alexander → aaronleventhal
Keywords: regression
It was a regression from bug 388927.
Unfortunately we're also broken in XUL trees/treeitems now, and this patch doesn't fix that.
Attachment #279848 - Attachment is obsolete: true
Attachment #279848 - Flags: review?(surkov.alexander)
Attachment #279855 - Attachment is obsolete: true
Attachment #279860 - Flags: review?(surkov.alexander)
Attachment #279855 - Flags: review?(surkov.alexander)
Comment on attachment 279860 [details] [diff] [review]
Remove nsHyperTextAccesssible chunk (was for a different bug)


>+  if (MustPrune(this)) {  // Do not dig any further
>+    NS_IF_ADDREF(*aAccessible = fallbackAnswer);
>+    return NS_OK;
>+  }

Does MustPrune() not work here for nsLeafAccessible and nsHTMLAreaAccessible?

>+  if (accessible == this) {
>+    // Manually walk through accessible children and see if
>+    // the are within this point.
>+    // This takes care of cases where layout won't walk into
>+    // things for us, such as image map areas and sub documents

Do you mean GetFrameForPoint() doesn't look inside sub documents?

>+  NS_IMETHOD GetChildAtPoint(PRInt32 aX, PRInt32 aY, nsIAccessible **aAccessible)
>+    { *aAccessible = this; return NS_OK; } // Don't walk into these
> };

I would prefer to keep implementation inside cpp file.

>+NS_IMETHODIMP
>+nsOuterDocAccessible::GetChildAtPoint(PRInt32 aX, PRInt32 aY,
>+                                      nsIAccessible **aAccessible)
>+{
>+  NS_ENSURE_ARG_POINTER(aAccessible);
>+  *aAccessible = nsnull;
>+  if (!mDOMNode) {
>+    return NS_ERROR_FAILURE;
>+  }
>+  PRInt32 docX, docY, docWidth, docHeight;
>+  GetBounds(&docX, &docY, &docWidth, &docHeight);
>+  if (aX < docX || aX >= docX + docWidth || aY < docY || aY >= docY + docHeight) {
>+    return NS_ERROR_FAILURE;
>+  }
>+
>+  return GetFirstChild(aAccessible);  // Always return the inner doc unless bounds outside of it

sorry can you give me an example of accessible tree for this?
> Does MustPrune() not work here for nsLeafAccessible and nsHTMLAreaAccessible?
It doesn't currently work for those because it is a static method that is role based. I don't think it's worth making it virtual.

> Do you mean GetFrameForPoint() doesn't look inside sub documents?
Apparently not, from my tests.

> sorry can you give me an example of accessible tree for this?
Any XUL with an HTML document, created by for example <browser>

> I would prefer to keep implementation inside cpp file.
Mozilla uses inline methods all the time for small things. It's a standard C++ optimization.

Comment on attachment 279860 [details] [diff] [review]
Remove nsHyperTextAccesssible chunk (was for a different bug)

r=me
Attachment #279860 - Flags: review?(surkov.alexander)
Attachment #279860 - Flags: review+
Attachment #279860 - Flags: approval1.9?
btw, please remove MustPrune check from platfom analogue methods like accHitTest()
Blocks: 336168
Attachment #279860 - Flags: approval1.9? → approval1.9+
Surkov, I filed follow-up bug 396603 for comment 12.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: