Closed Bug 410765 Opened 18 years ago Closed 17 years ago

'List all tabs' button on tabs not working in AT-SPI

Categories

(Core :: Disability Access APIs, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.1a2

People

(Reporter: steve, Assigned: surkov)

Details

(Keywords: fixed1.9.0.2)

Attachments

(1 file, 9 obsolete files)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b3pre) Gecko/2008010204 Minefield/3.0b3pre Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b3pre) Gecko/2008010204 Minefield/3.0b3pre The 'list all tabs' button on the right end of the page tabs does not work through AT-SPI Action:doAction. Press action is exposed but does nothing. Reproducible: Always Steps to Reproduce: 1.Open a number of tabs 2.look at the Action interface of the list all tabs button (hint CTRL+ALT+?) 3. select and do the Press action Actual Results: nothing happens Expected Results: menu to drop down with a list of tabs
Same problem occurs with the 'bookmarks' button at the end of the bookmarks toolbar.
(In reply to comment #1) > Same problem occurs with the 'bookmarks' button at the end of the bookmarks > toolbar. Steve, do you mean the "star" button? If so, it *may* be that this gets fixed once we get bug 412849 fixed. Aaron, do you agree?
(In reply to comment #2) > Steve, do you mean the "star" button? If so, it *may* be that this gets fixed > once we get bug 412849 fixed. Aaron, do you agree? No Marco, actually that is the one part of the location control that does work, though it only changes the appearance of the star the first time and presents a 'dialog' the second time. I meant the little double chevron button that appears at the far right of the bookmark toolbar when there are more booksmark buttons than will fit across. It's named 'bookmarks' and is the last child in accerciser. The bookmark toolbar appears between the navigation toolbar and the page tabs. Both these overflow menus (bookmarks and tabs) should work via a11y
we have accessible hierarchy: pushbutton (xul:toolbarbutton) pushbutton (xul:dropmarket) in gecko action is executed only on pushbutton for dropmarker. Is this hierarchy correct and if it is then should we perform the same action on pushbutton for toolbarbutton?
I don't know enough XUL to comment on the internal hierarchy but all that is exposed is a ROLE_PUSH_BUTTON and I think that is correct. As long as the popup window has the correct hierarchy i don't think the menu needs to be part of the main structure as they are more dynamic than the main menus. It is the same as the non-image items in the location and search widgets. AFAIKS there is no standard semantics (ROLE or RELATION) for saying this button presents a popup, but I've pinged the at-spi list.
Ok, I got you. The problem is we have in Gecko hierarchy: pushbutton (xul:toolbarbutton) pushbutton (xul:dropmarket) but we expose on ATK the following hierarhy: pushbutton (xul:toolbarbutton) because of MustPrune() action on dropmarker works but it doesn't on toolbarbutton. I'm not sure about right way to fix this.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(In reply to comment #5) >AFAIKS there is no > standard semantics (ROLE or RELATION) for saying this button presents a popup, > but I've pinged the at-spi list. Bill Haneman has indicated that 'I believe RELATION_PARENT_WINDOW_OF is/was intended to be the reciprocal of RELATION_POPUP_FOR'. However that can only be set once the popup exists, probably after the button is activated.
Attached patch doesn't work (obsolete) — Splinter Review
idea is to fire real events instead of pure DOM events like Click() method do. But it doesn't work. Dunno why. Button isnt' pressed, menu isn't appeared.
Attached patch wip (obsolete) — Splinter Review
it seems this sends correct events but popup isn't shown, possibly it's mac issue.
Attachment #300650 - Attachment is obsolete: true
Marco, could you test on Windows/Linux. Does the patch doesn't work there as well?
Any idea why real mouse clicks (see the patch) doesn't show menupopup on button@type="menu" like <button type="menu"> <menupopup> <menuitem label="item1"/> <menuitem label="item1"/> </menupopup> </button> Though I do not see the button is pressed as well when I send button up/down events.
Surkov, with this patch, it works fine on Windows. If I do the "press" action from within AccExplorer, the popup comes up, but doesn't in a regular build. I am currently having problems using Accerciser on Linux, so can't test it there. But the problem is definitely fixed on Windows, and possibly on Linux, too. Steve, do you build Firefox on your own and could test with this patch on Linux?
Could you look does the patch fixes bug 404576 as well?
You many need to look at mousethrough attributes to find the right target. Not sure if displaylist has some helper methods for this. Or maybe nsDocument::elementfrompoint, though that one doesn't return anonymous elements. And btw, GetPrimaryFrame may return nsnull.
(In reply to comment #14) > You many need to look at mousethrough attributes to find the right target. > Not sure if displaylist has some helper methods for this. > Or maybe nsDocument::elementfrompoint, though that one doesn't return anonymous > elements. How I can use mousethrough attribute? I mean if I send click event to such element then element won't get notification as XUL author wanted. And it sounds ok. No? > And btw, GetPrimaryFrame may return nsnull. > thank you, I'll fix.
Attached patch patch (obsolete) — Splinter Review
if it fixes bug on Windows then I should do all correct. If the patch doesn't work on another systems then we should file another bugs, possibly not under accessibility component.
Assignee: aaronleventhal → surkov.alexander
Attachment #300840 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #300997 - Flags: review?(aaronleventhal)
Interesting. Why do we have to do it this way where we set the x, y? What happens if the element is currently scrolled off? What if it so far scrolled off that it's way off screen?
Why don't we just do the same widget-retrieving code as nsDOMWindowUtils?
(In reply to comment #18) > Why don't we just do the same widget-retrieving code as nsDOMWindowUtils? > Smaug suggesed to use nsPresShell firstly. I don't know but possibly it's faster to compute point coordinates relative parent frame instead to get client coordinates.
(In reply to comment #17) > Interesting. Why do we have to do it this way where we set the x, y? Sorry what way do you keep in your mind? > What happens if the element is currently scrolled off? What if it so far > scrolled off that it's way off screen? > Actually I didn't test it. But possibly we should to scroll content into visible area, otherwise some actions don't make sense if for example popup will apear out of screen. Do you agree?
> Actually I didn't test it. But possibly we should to scroll content into > visible area, otherwise some actions don't make sense if for example popup will > apear out of screen. Do you agree? Very good idea, yes I agree.
Attached patch patch2 (obsolete) — Splinter Review
Attachment #300997 - Attachment is obsolete: true
Attachment #301276 - Flags: review?(aaronleventhal)
Attachment #300997 - Flags: review?(aaronleventhal)
Comment on attachment 301276 [details] [diff] [review] patch2 What if the element is in something that's not scrollable and it's still offscreen? Should we fail in that case?
(In reply to comment #23) > (From update of attachment 301276 [details] [diff] [review]) > What if the element is in something that's not scrollable and it's still > offscreen? Should we fail in that case? > With the patch it's clicked, at least oncommand event is fired. Possibly it's ok?
Surkov, can you test different kinds of ofscreen scenarios and see what happens?
The patch doesn't work on linux and mac
(In reply to comment #25) > Surkov, can you test different kinds of ofscreen scenarios and see what > happens? > What kind of ofscreen scenarious keep in mind? I tried scrolled out button. It is made visible and clicked. If the button can't be scrolled into visible area then it's clicked any way because I get its command event.
(In reply to comment #26) > The patch doesn't work on linux and mac So, I guess we need a new patch then? (In reply to comment #27) > What kind of ofscreen scenarious keep in mind? I tried scrolled out button. It > is made visible and clicked. If the button can't be scrolled into visible area > then it's clicked any way because I get its command event. Okay.
Comment on attachment 301276 [details] [diff] [review] patch2 Cancelling review until we have a patch that works on Linux and Mac as well.
Attachment #301276 - Flags: review?(aaronleventhal)
(In reply to comment #29) > (From update of attachment 301276 [details] [diff] [review]) > Cancelling review until we have a patch that works on Linux and Mac as well. > If it's right approach then the patch should work on linux and mac and if it doesn't then the problem lies in something else. I think let's get some reviews to get know the approach is correct/wrong.
Comment on attachment 301276 [details] [diff] [review] patch2 Could you check if the taken approach is correct to send click events to element that is much identical with real users clicks?
Attachment #301276 - Flags: superreview?(roc)
Attachment #301276 - Flags: review?(Olli.Pettay)
Comment on attachment 301276 [details] [diff] [review] patch2 >+ nsEventStatus status = nsEventStatus_eIgnore; >+ presShell->HandleEventWithTarget(&eventDown, frame, content, &status); Event handling may delete |frame|, but you still use |frame| later. The existing code has the bug that |content| isn't a strong pointer, so reusing it after first event dispatch is dangerous.
Attachment #301276 - Flags: review?(Olli.Pettay) → review-
Surkov, did you already test on Linux and Mac? Comment 26 made me think that you tested and it doesn't work.
Attached patch patch3 (obsolete) — Splinter Review
with Olli's comments
Attachment #301276 - Attachment is obsolete: true
Attachment #331287 - Flags: superreview?(roc)
Attachment #331287 - Flags: review?(Olli.Pettay)
Attachment #301276 - Flags: superreview?(roc)
(In reply to comment #33) > Surkov, did you already test on Linux and Mac? Comment 26 made me think that > you tested and it doesn't work. > Yes. Though I'm sure about Mac only.
Why wouldn't we fix xulElement->Click() so it works correctly? Won't others run into the same problem when they try to use it?
Attached patch patch4 (obsolete) — Splinter Review
works on Windows and OS X (didn't try on Linux yet)
Attachment #331287 - Attachment is obsolete: true
Attachment #331302 - Flags: superreview?(roc)
Attachment #331302 - Flags: review?(Olli.Pettay)
Attachment #331287 - Flags: superreview?(roc)
Attachment #331287 - Flags: review?(Olli.Pettay)
Attachment #331302 - Flags: review?(aaronleventhal)
Attachment #331302 - Flags: review?(marco.zehe)
Comment on attachment 331302 [details] [diff] [review] patch4 Nit: "mouseup haven't been fired". It's either "mouseups haven't", or "mouseup hasn't". Same for all other cases where this comes up. "haven't" implies plural. if you want to use the singular, it's always "hasn't".
Attachment #331302 - Flags: review?(marco.zehe) → review+
+ // Fire mouse button down event. + nsCOMPtr<nsIWidget> parentWidget = parentFrame->GetWindow(); + + nsMouseEvent eventDown(PR_TRUE, NS_MOUSE_BUTTON_DOWN, parentWidget, + nsMouseEvent::eReal, nsMouseEvent::eNormal); + + eventDown.refPoint.x = x; + eventDown.refPoint.y = y; + This isn't right. The coordinates should be relative to the widget but you have only made them relative to the view. I would do what nsDOMWindowUtils::SendMouseEvent does: use GetOffsetToExternal to make the coordinates relative to the presshell's root frame, and use the root frame's widget.
Attached patch patch5 (obsolete) — Splinter Review
Attachment #331302 - Attachment is obsolete: true
Attachment #331591 - Flags: superreview?(roc)
Attachment #331591 - Flags: review?(Olli.Pettay)
Attachment #331302 - Flags: superreview?(roc)
Attachment #331302 - Flags: review?(aaronleventhal)
Attachment #331302 - Flags: review?(Olli.Pettay)
Attachment #331591 - Flags: review?(aaronleventhal)
So if the down-click causes the frame to move, your coordinates might be wrong. You probably should separate the mouse-event-dispatch code into a helper function that you call twice. The helper function can compute the coordinates each time.
Attached patch patch6 (obsolete) — Splinter Review
Attachment #331591 - Attachment is obsolete: true
Attachment #331633 - Flags: superreview?(roc)
Attachment #331633 - Flags: review?(Olli.Pettay)
Attachment #331591 - Flags: superreview?(roc)
Attachment #331591 - Flags: review?(aaronleventhal)
Attachment #331591 - Flags: review?(Olli.Pettay)
Attachment #331633 - Flags: review?(aaronleventhal)
Comment on attachment 331633 [details] [diff] [review] patch6 >+ // Fire mouse down and mouse up events. >+ nsIFrame* rootFrame = presShell->GetRootFrame(); >+ if (!rootFrame) >+ return; >+ >+ nsCOMPtr<nsIWidget> rootWidget = rootFrame->GetWindow(); >+ if (!rootWidget) >+ return; >+ >+ PRBool res = nsAccUtils::DispatchMouseEvent(NS_MOUSE_BUTTON_DOWN, presShell, >+ content, rootFrame, rootWidget); >+ if (!res) >+ return; >+ >+ nsAccUtils::DispatchMouseEvent(NS_MOUSE_BUTTON_UP, presShell, >+ content, rootFrame, rootWidget); You're reusing rootFrame, which may be a dead object after the first DispatchMouseEvent. Just make DispatchMouseEvent to re-fetch rootFrame and widget in every call. What happens if page is scrolled when mousedown is dispatched? DOM Events code use PR_Now, not PR_IntervalNow (though see bug 238041)
(In reply to comment #43). > > What happens if page is scrolled when mousedown is dispatched? > Im not sure but I woudn't care a lot actually. Marco said he don't know or didn't notice similar situation in real cases. I think we will send mousedown/mouseup in any way for the same control and since the method I fix should activate it (send click) then it's that we expect. > DOM Events code use PR_Now, not PR_IntervalNow (though see bug 238041) > I didn't catch unique opinion from that bug. And since it's not fixed yet then I'm not sure I about right way the meantime. nsDOMWindowUtils::SendMouseEvent uses PR_IntervalNow still.
Attached patch patch7 (obsolete) — Splinter Review
(In reply to comment #43) > You're reusing rootFrame, which may be a dead object after the first > DispatchMouseEvent. > Just make DispatchMouseEvent to re-fetch rootFrame and widget in every call.
Attachment #331633 - Attachment is obsolete: true
Attachment #331776 - Flags: superreview?(roc)
Attachment #331776 - Flags: review?(Olli.Pettay)
Attachment #331633 - Flags: superreview?(roc)
Attachment #331633 - Flags: review?(aaronleventhal)
Attachment #331633 - Flags: review?(Olli.Pettay)
(In reply to comment #45) > Created an attachment (id=331776) [details] > patch7 > > (In reply to comment #43) > > You're reusing rootFrame, which may be a dead object after the first > > DispatchMouseEvent. > > Just make DispatchMouseEvent to re-fetch rootFrame and widget in every call. > this is addressed in the last patch
Comment on attachment 331776 [details] [diff] [review] patch7 + nsRect rect = frame->GetRect(); Make this nsSize size = frame->GetSize(). + PRInt32 x = presContext->AppUnitsToDevPixels(point.x) + + presContext->AppUnitsToDevPixels(rect.width) / 2; + PRInt32 y = presContext->AppUnitsToDevPixels(point.y) + + presContext->AppUnitsToDevPixels(rect.height) / 2; Just make two calls to AppUnitsToDevPixels: ...(point.x + rect.width/2) + event.refPoint.x = x; + event.refPoint.y = y; event.refPoint = nsIntPoint(x, y); sr+ with that.
Attachment #331776 - Flags: superreview?(roc) → superreview+
Attachment #331776 - Flags: review?(Olli.Pettay) → review+
Attached patch patch8Splinter Review
Attachment #331776 - Attachment is obsolete: true
Attachment #331851 - Flags: review?(aaronleventhal)
Attachment #331851 - Flags: review?(aaronleventhal) → review+
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1a2
Comment on attachment 331851 [details] [diff] [review] patch8 that's major bug for screen readers, requesting to put the patch into Firefox3.0
Attachment #331851 - Flags: approval1.9.0.2?
Flags: wanted1.9.0.x+
Flags: in-testsuite+
Comment on attachment 331851 [details] [diff] [review] patch8 Approved for 1.9.0.2. Please land in CVS. a=ss
Attachment #331851 - Flags: approval1.9.0.2? → approval1.9.0.2+
checked in to 1.9.0 Checking in accessible/src/base/nsAccessibilityUtils.cpp; /cvsroot/mozilla/accessible/src/base/nsAccessibilityUtils.cpp,v <-- nsAccessibilityUtils.cpp new revision: 1.33; previous revision: 1.32 done Checking in accessible/src/base/nsAccessibilityUtils.h; /cvsroot/mozilla/accessible/src/base/nsAccessibilityUtils.h,v <-- nsAccessibilityUtils.h new revision: 1.26; previous revision: 1.25 done Checking in accessible/src/base/nsAccessible.cpp; /cvsroot/mozilla/accessible/src/base/nsAccessible.cpp,v <-- nsAccessible.cpp new revision: 1.378; previous revision: 1.377 done Checking in accessible/tests/mochitest/Makefile.in; /cvsroot/mozilla/accessible/tests/mochitest/Makefile.in,v <-- Makefile.in new revision: 1.18; previous revision: 1.17 done RCS file: /cvsroot/mozilla/accessible/tests/mochitest/test_nsIAccessible_actions.xul,v done Checking in accessible/tests/mochitest/test_nsIAccessible_actions.xul; /cvsroot/mozilla/accessible/tests/mochitest/test_nsIAccessible_actions.xul,v <-- test_nsIAccessible_actions.xul initial revision: 1.1 done
Keywords: fixed1.9.0.2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: