visible menu item have offscreen state

RESOLVED FIXED in mozilla24

Status

()

Core
Disability Access APIs
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: surkov, Assigned: surkov)

Tracking

(Blocks: 1 bug, {access, regression})

unspecified
mozilla24
access, regression
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
we were reported the bug that menu items of Firefox menu have offscreen state (except top level menu items).
(Assignee)

Comment 1

4 years ago
Robert, perhaps you could help. We walk up from menu frame to containing XUL scroll frame and then check whether their rects are intersected (http://mxr.mozilla.org/mozilla-central/source/accessible/src/generic/Accessible.cpp#657). In case of menu items they aren't and we conclude that menu item is not visible. Could you please take a look perhaps you will see what's wrong with our code.

I'd guess that menus are special so it doesn't really make sense to check whether its rect is intersected with parent scrollable frame since it can be out of Firefox window boundaries. If so then what a correct way to check whether menuitem is visible or not?
Don't bother checking the ancestors of any frame for which nsLayoutUtils::IsPopup returns true.
(Assignee)

Comment 3

4 years ago
regressed in Firefox 18
Keywords: regression
(Assignee)

Comment 4

4 years ago
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #2)
> Don't bother checking the ancestors of any frame for which
> nsLayoutUtils::IsPopup returns true.

ok, good, thank you. But how to detect whether a menuitem (or nsLayoutUtils::IsPopup() == true frame) is invisible (its menu is not shown) or it is offscreen (when menuitem is scrolled off)?
you can check whether the popup is visible using frame->GetView()->GetViewVisibility() == nsViewVisibility_kShow

Comment 6

4 years ago
Alex, will you be acting on this bug soon?
(Assignee)

Comment 7

4 years ago
yes, hopefully
(Assignee)

Updated

4 years ago
Blocks: 855324
(Assignee)

Comment 8

4 years ago
Created attachment 748737 [details] [diff] [review]
patch
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Attachment #748737 - Flags: review?(trev.saunders)
Attachment #748737 - Flags: review?(trev.saunders) → review+

Comment 9

4 years ago
https://hg.mozilla.org/mozilla-central/rev/820f28f1f2ce
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
(Assignee)

Updated

4 years ago
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.