AccessibleObjectFromEvent not working in-process in 64 bit builds

VERIFIED FIXED in mozilla8

Status

()

Core
Disability Access APIs
VERIFIED FIXED
6 years ago
6 years ago

People

(Reporter: Jamie, Assigned: surkov)

Tracking

({access})

Trunk
mozilla8
x86
Windows 7
access
Points:
---
Bug Flags:
in-litmus -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

6 years ago
AccessibleObjectFromEvent() works fine out-of-process in 64 bit builds. However, in-process, it seems to return an oleacc client accessible instead of a Gecko accessible. I have no idea why this is the case. As far as Gecko is concerned, WM_GETOBJECT should be received and handled the same way, regardless of whether it's in-process or out-of-process.

Marking as unconfirmed because this needs to be tested/verified outside of NVDA code. I'd use Accprobe, but I'm pretty sure it can't do in-context events for 64 bit processes.

Related NVDA ticket: http://www.nvda-project.org/ticket/1454

Comment 1

6 years ago
It seems to be AccessibleObjectFromWindow with the actual problem, though AccessibleObjectFromEvent calls it internally.
A work around has been implemented in NVDA changeset:main,4474 which replaces a call to AccessibleObjectFromEvent with custom code that  sends WM_GETOBJECT, calls ObjectFromLresult, and tries accChild. All the things that I'd think AccessibleObjectFromEvent/AccessibleObjectFromWindow would do normally.
this allows NVDA to render buffers for 64 bit Mozilla Gecko documents.
Although further testing needs to be done to prove this, I don't think this bug can be Gecko specific.
Flags: in-litmus-

Comment 2

6 years ago
Actually, after further investigation, the bug is Gecko's. when gecko handles WM_GETOBJECT it checks lParam to see if its OBJID_CLIENT: http://mxr.mozilla.org/mozilla-central/source/widget/src/windows/nsWindow.cpp#5236
However,  MSDN states in http://msdn.microsoft.com/en-us/library/dd373892%28v=vs.85%29.aspx that the lParam must be cast to DWORD before comparison with one of the OBJID constants as on 64 bit Windows not doing this can cause issues with the sign extension.
My own testing with a custom 64 bit window proc handling WM_GETOBJECT confirms that  the comparison does fail when AccessibleObjectFromWindow is called from 64 bit to 64 bit, but not called from 32 bit to 32 bit or 32 bit to 64 bit.
I do not understand yet why my own custom code I implemented in NVDA which sends the WM_GETOBJECT message manually gets around the bug.
(Reporter)

Comment 3

6 years ago
Marking as new given Mick's thorough testing and findings.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Comment 4

6 years ago
(In reply to comment #3)
> Marking as new given Mick's thorough testing and findings.

guys, you've passed more than half of road :) after verbal patch description one step is to upload patch and ask for review ;) Thank you for doing this!
(Assignee)

Comment 5

6 years ago
Created attachment 542408 [details] [diff] [review]
patch
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Attachment #542408 - Flags: review?(roc)
Attachment #542408 - Flags: feedback?(mick)
(Assignee)

Comment 6

6 years ago
Created attachment 542409 [details] [diff] [review]
patch

the previous one is wrong
Attachment #542408 - Attachment is obsolete: true
Attachment #542408 - Flags: review?(roc)
Attachment #542408 - Flags: feedback?(mick)
Attachment #542409 - Flags: review?(roc)
Attachment #542409 - Flags: feedback?(mick)
(Assignee)

Comment 7

6 years ago
try server build http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/surkov.alexander@gmail.com-d97b5c312a85
Comment on attachment 542409 [details] [diff] [review]
patch

Review of attachment 542409 [details] [diff] [review]:
-----------------------------------------------------------------
Attachment #542409 - Flags: review?(roc) → review+
(Assignee)

Comment 9

6 years ago
landed http://hg.mozilla.org/mozilla-central/rev/62cb7ce43f42
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
(Assignee)

Updated

6 years ago
Attachment #542409 - Flags: feedback?(mick)
(Reporter)

Comment 10

6 years ago
Mick verified fixed in Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:8.0a1) Gecko/20110720 Firefox/8.0a1
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.