Closed Bug 865591 Opened 7 years ago Closed 7 years ago
visible menu item have offscreen state
we were reported the bug that menu items of Firefox menu have offscreen state (except top level menu items).
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.
regressed in Firefox 18
(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
Alex, will you be acting on this bug soon?
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Attachment #748737 - Flags: review?(trev.saunders)
Attachment #748737 - Flags: review?(trev.saunders) → review+
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.