Bug 679791 - Make nsIFrame::IsFocusable use heuristics that don't depend on the graphical display of scrollbars. r=roc

This commit is contained in:
Josh Matthews 2011-08-17 13:55:57 -04:00
parent 2aa06762af
commit 70bf98d8bc

View File

@ -6607,7 +6607,8 @@ nsIFrame::IsFocusable(PRInt32 *aTabIndex, PRBool aWithMouse)
// will be enough to make them keyboard scrollable.
nsIScrollableFrame *scrollFrame = do_QueryFrame(this);
if (scrollFrame &&
scrollFrame->GetActualScrollbarSizes() != nsMargin(0,0,0,0)) {
scrollFrame->GetScrollbarStyles() != nsIScrollableFrame::ScrollbarStyles(NS_STYLE_OVERFLOW_HIDDEN, NS_STYLE_OVERFLOW_HIDDEN) &&
!scrollFrame->GetScrollRange().IsEqualEdges(nsRect(0, 0, 0, 0))) {
// Scroll bars will be used for overflow
isFocusable = PR_TRUE;
tabIndex = 0;