Closed Bug 283482 Opened 20 years ago Closed 20 years ago

MSAA events and objects in wrong HWND for CSS overflow children

Categories

(Firefox :: Disability Access, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: aaronlev, Assigned: aaronlev)

References

()

Details

(Keywords: access)

Attachments

(1 file, 2 obsolete files)

Looking at objects and events with the MSAA SDK Inspect.exe tool, the HWND
reported is always in the window that is owned by the document.

However, when CSS forces the need for a new window (widget), the MSAA objects
and events for that subtree should fall within there.

If we don't, it breaks the focus tracking and OSM of screen readers.
Comment on attachment 175481 [details] [diff] [review]
Make sure MSAA events & WindowFromAccessibleObject() use correct window

>+%{C++
>+  virtual nsIFrame* GetFrame() = 0;
>+%}

This doesn't look right for an IDL file. What about:

nsIFrame getFrame();

Or just leaving it in the nsAccessNode header file?

>Index: accessible/src/msaa/nsAccessibleWrap.cpp
>===================================================================
>RCS file: /cvsroot/mozilla/accessible/src/msaa/nsAccessibleWrap.cpp,v
>retrieving revision 1.18
>diff -p -u -5 -r1.18 nsAccessibleWrap.cpp
>--- accessible/src/msaa/nsAccessibleWrap.cpp	18 Feb 2005 14:36:27 -0000	1.18
>+++ accessible/src/msaa/nsAccessibleWrap.cpp	24 Feb 2005 22:44:47 -0000
>@@ -165,19 +166,44 @@ STDMETHODIMP nsAccessibleWrap::get_accPa
> {
>   *ppdispParent = NULL;
>   if (!mWeakShell)
>     return E_FAIL;  // We've been shut down
> 
>-  nsCOMPtr<nsIAccessible> xpParentAccessible;
>+  nsIFrame *frame = GetFrame();
>+  nsIAtom *frameType = frame ? nsAccessibilityAtoms::viewportFrame : frame->GetType();

So if frame is null, you will call GetType() on it?

>Index: accessible/src/msaa/nsDocAccessibleWrap.cpp
>===================================================================
>RCS file: /cvsroot/mozilla/accessible/src/msaa/nsDocAccessibleWrap.cpp,v
>retrieving revision 1.22
>diff -p -u -5 -r1.22 nsDocAccessibleWrap.cpp
>--- accessible/src/msaa/nsDocAccessibleWrap.cpp	18 Feb 2005 14:36:27 -0000	1.22
>+++ accessible/src/msaa/nsDocAccessibleWrap.cpp	24 Feb 2005 22:44:47 -0000
>@@ -227,11 +196,32 @@ NS_IMETHODIMP nsDocAccessibleWrap::FireT
>   if (role == ROLE_SYSTEM_PANE && aEvent == nsIAccessibleEvent::EVENT_STATE_CHANGE) {
>     // Something on the document has changed
>     // Clear out the cache in this subtree
>   }
> 
>-  HWND hWnd = NS_REINTERPRET_CAST(HWND, mWnd);
>+  HWND hWnd;
>+  hWnd = NS_REINTERPRET_CAST(HWND, mWnd);

Nit: Why did you split this into two lines?
Attachment #175481 - Flags: review?(pkwarren) → review-
if you must have returns, use [notxpcom] nsIFrame getFrame();
*** Bug 283503 has been marked as a duplicate of this bug. ***
Thanks for the [notxpcom] tip timeless.
Attachment #175542 - Flags: review?(pkwarren)
You haven't addressed this comment:

>Index: accessible/src/msaa/nsAccessibleWrap.cpp
>===================================================================
>RCS file: /cvsroot/mozilla/accessible/src/msaa/nsAccessibleWrap.cpp,v
>retrieving revision 1.18
>diff -p -u -5 -r1.18 nsAccessibleWrap.cpp
>--- accessible/src/msaa/nsAccessibleWrap.cpp	18 Feb 2005 14:36:27 -0000	1.18
>+++ accessible/src/msaa/nsAccessibleWrap.cpp	24 Feb 2005 22:44:47 -0000
>@@ -165,19 +166,44 @@ STDMETHODIMP nsAccessibleWrap::get_accPa
> {
>   *ppdispParent = NULL;
>   if (!mWeakShell)
>     return E_FAIL;  // We've been shut down
> 
>-  nsCOMPtr<nsIAccessible> xpParentAccessible;
>+  nsIFrame *frame = GetFrame();
>+  nsIAtom *frameType = frame ? nsAccessibilityAtoms::viewportFrame :
frame->GetType();

So if frame is null, you will call GetType() on it?
Attachment #175542 - Flags: review?(pkwarren)
(In reply to comment #7)
> So if frame is null, you will call GetType() on it?
Yowza! Much better after switching that, thank you. Oy, holy smokes that was
dumb on my part.
Attachment #175481 - Attachment is obsolete: true
Attachment #175542 - Attachment is obsolete: true
Attachment #175582 - Flags: review?(pkwarren)
Attachment #175582 - Flags: review?(pkwarren) → review+
Attachment #175582 - Flags: superreview?(roc)
Attachment #175582 - Flags: superreview?(roc) → superreview+
Status: NEW → RESOLVED
Closed: 20 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: