Closed Bug 242425 Opened 20 years ago Closed 20 years ago

nsIAccessible::GetBounds returns incorrect values with tabbed browsing


(Core :: Disability Access APIs, defect)

Windows XP
Not set





(Reporter: aaronlev, Assigned: aaronlev)



(Keywords: access)


(1 file)

1. Open up several browser windows
2. Run an accessibility testing tool that reports the bounds of each object.

What happens:
The bounds information from a non-visible page seem to be overriding the visible
page's bounds info
Can someone tell me if this happens with our ATK support as well? It probably does.
Severity: normal → major
Louie, can you look into this?
Using at-poke, I can't reproduce this issue on Linux build.
I open 2 different pages in 2 windows (as well as in 2 tabs). The "Postion" and
"Size" for each object (exported by at-poke) are corrent when 1 page cover the
other. At-poke can display the bound of each object using blinking rectangle.
Both visible and invisible object have the correct bound.
Louie, I should have been more specific. I think the problem is with
GetChildAtPoint, when you do it all the way from the root of the XUL window into
the HTML.
In MSAA, it always walks into the first tab, even if that one is currently hidden.
Pretty much the same logic, but doesn't have to check the current accessible's
bounds unless none of the children fit.
Attachment #148242 - Flags: review?(Louie.Zhao)
The original "GetChildAtPoint" deal with "ROLE_MENUPOPUP" specially.
"ROLE_MENUPOPUP" seems to have never been returned (returning his child
instead). Don't we need this part anymore ?
Louie, no. I think we were just optimizing and trying not to use GetState() each
time, because at that time STATE_OFFSCREEN was only supported by menus. It's
strange actually, the old code makes no sense, because when it's not a menu role
we check for STATE_OFFSCREEN but always state == 0.

I can't think of any reason why checking STATE_OFFSCREEN for everything wouldn't
be better. I also can't think of any reason why we wouldn't want to return the
menupopup object itself from this method.

Comment on attachment 148242 [details] [diff] [review]
Always check STATE_INVISIBLE and STATE_OFFSCREEN in GetChildAtPoint()

The patch looks good for me.
Attachment #148242 - Flags: review?(Louie.Zhao) → review+
Attachment #148242 - Flags: superreview?(jst)
Comment on attachment 148242 [details] [diff] [review]
Always check STATE_INVISIBLE and STATE_OFFSCREEN in GetChildAtPoint()

Attachment #148242 - Flags: superreview?(jst) → superreview+
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.