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?
Created attachment 748737 [details] [diff] [review] patch