Bug 257938 - Should css scrollable areas without scrollbars be tabbable?, patch by Aaron Leventhal, r+sr+a=roc

This commit is contained in:
martijn.martijn@gmail.com 2007-09-04 05:14:52 -07:00
Родитель af73388d93
Коммит f6ccf14d51
1 изменённых файлов: 2 добавлений и 6 удалений

Просмотреть файл

@ -5617,12 +5617,8 @@ nsIFrame::IsFocusable(PRInt32 *aTabIndex, PRBool aWithMouse)
// will be enough to make them keyboard scrollable.
nsCOMPtr<nsIScrollableFrame> scrollFrame = do_QueryInterface(this);
if (scrollFrame) {
nsIScrollableFrame::ScrollbarStyles styles =
scrollFrame->GetScrollbarStyles();
if (styles.mVertical == NS_STYLE_OVERFLOW_SCROLL ||
styles.mVertical == NS_STYLE_OVERFLOW_AUTO ||
styles.mHorizontal == NS_STYLE_OVERFLOW_SCROLL ||
styles.mHorizontal == NS_STYLE_OVERFLOW_AUTO) {
nsMargin margin = scrollFrame->GetActualScrollbarSizes();
if (margin.top || margin.right || margin.bottom || margin.left) {
// Scroll bars will be used for overflow
isFocusable = PR_TRUE;
tabIndex = 0;