Closed
Bug 670087
Opened 13 years ago
Closed 11 years ago
AccessibleObjectFromPoint returns incorrect accessible for popup menus
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
RESOLVED
FIXED
mozilla25
People
(Reporter: Jamie, Assigned: surkov)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
20.67 KB,
patch
|
tbsaunde
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
Str:
1. Press alt+f to activate the File menu.
2. Get the location of the "New Tab" menu item.
3. Call AccessibleObjectFromPoint() with a point covered by the location retrieved in step 2.
Expected: The accessible for the "New tab" menu item should be returned.
Actual: Some other accessible outside the menu is returned. (I'm guessing this accessible is overlapped by the menu item.)
The popup window containing the menu (window class name: MozillaDropShadowWindowClass) returns the Firefox top level frame when queried for its client (OBJID_CLIENT). IAccessible::accHitTest on the Firefox top level frame doesn't seem to know about popup menu items.
The MozillaDropShadowWindowClass window should return the popup menu accessible as its client. This menu accessible should answer IAccessible::accHitTest correctly for the menu and its items.
If that isn't an option, you can probably get away with having IAccessible::accHitTest on the top level frame answer for the menu and its items.
Reporter | ||
Comment 1•13 years ago
|
||
Impact: This breaks mouse tracking for Firefox menu items with NVDA.
Related NVDA ticket: http://www.nvda-project.org/ticket/1647
Assignee | ||
Updated•13 years ago
|
Blocks: boundsa11y
Assignee | ||
Comment 2•13 years ago
|
||
the same issue as in bug 480347. I think it's reasonable to follow Jamie's suggestion in any case so keeping open.
Assignee | ||
Comment 3•13 years ago
|
||
Robert, what's the best way to find popup content from window (nsWindow::ProcessMessage) created for popup?
Assignee | ||
Updated•12 years ago
|
Flags: needinfo?(roc)
get the window's view's frame.
Flags: needinfo?(roc)
Comment 5•12 years ago
|
||
Hi, are there any news on this bug? We are developing a GUI automation tool and are having trouble with menus, particular in Thunderbird.
Assignee | ||
Comment 7•12 years ago
|
||
Robert, one more question please. We use nsLayoutUtils::GetFrameForPoint on document root frame (http://mxr.mozilla.org/mozilla-central/source/accessible/src/generic/Accessible.cpp#838) but it seems doesn't take into account any popups shown above the document. How can I detect that the given point points to an element inside popup (originally the point is in screen coordinates)?
Assignee | ||
Updated•12 years ago
|
Flags: needinfo?(roc)
Use nsLayoutUtils::GetPopupFrameForEventCoordinates(rootPresContext, aEvent). You can look at how PresShell::HandleEvent does this.
Flags: needinfo?(roc)
Assignee | ||
Comment 9•11 years ago
|
||
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Attachment #761495 -
Flags: superreview?(roc)
Attachment #761495 -
Flags: review?(trev.saunders)
Attachment #761495 -
Flags: superreview?(roc) → superreview+
Comment 10•11 years ago
|
||
Comment on attachment 761495 [details] [diff] [review]
patch
> void* uniqueID = reinterpret_cast<void*>(-aVarChild.lVal);
>
> // Document.
> if (IsDoc())
>- return AsDoc()->GetAccessibleByUniqueIDInSubtree(uniqueID);
>+ return Document()->GetAccessibleByUniqueIDInSubtree(uniqueID);
what is reason for change?
>+#define NS_LOG_WMGETOBJECT(aWnd, aHwnd, aAcc) \
>+ PR_LOG(gWindowsLog, PR_LOG_ALWAYS, \
>+ ("Get the window:\n {\n HWND: %d, parent HWND: %d, wndobj: %p,\n",\
>+ aHwnd, ::GetParent(aHwnd), aWnd)); \
>+ PR_LOG(gWindowsLog, PR_LOG_ALWAYS, (" acc: %p", aAcc)); \
>+ if (aAcc) { \
> nsAutoString name; \
>- acc->GetName(name); \
>+ aAcc->GetName(name); \
use Name()?
>-nsWindow::GetRootAccessible()
>+nsWindow::GetAccessible()
> {
>+ nsView* view = nsView::GetViewFor(this);
>+ if (view) {
>+ nsIFrame* frame = view->GetFrame();
>+ if (frame && nsLayoutUtils::IsPopup(frame)) {
>+ nsCOMPtr<nsIAccessibilityService> accService =
>+ services::GetAccessibilityService();
>+ if (accService) {
>+ a11y::DocAccessible* docAcc =
>+ GetAccService()->GetDocAccessible(frame->PresContext()->PresShell());
>+ if (docAcc) {
>+ NS_LOG_WMGETOBJECT(this, mWnd,
>+ docAcc->GetAccessible(frame->GetContent()));
>+ return docAcc->GetAccessible(frame->GetContent());
roc I'm assuming this stuff seems reasonable to you. I'd worry a little this might slow down the no a11y case some, but but what becomes GetRootAccessible() has already been pretty slow and could be easily speed up if someone cared I suspect so I'm not really concerned.
Attachment #761495 -
Flags: review?(trev.saunders) → review+
Updated•11 years ago
|
Blocks: 2013q3a11y
Assignee | ||
Comment 11•11 years ago
|
||
Comment 12•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in
before you can comment on or make changes to this bug.
Description
•