Bug 319532 [gnome]There is no feedback when use keyboard to navigate disabled
menuitem in Mozilla menu r+sr+a=roc git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@193981 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1904,10 +1904,19 @@ PRBool
|
||||
nsMenuPopupFrame::IsValidItem(nsIContent* aContent)
|
||||
{
|
||||
nsIAtom *tag = aContent->Tag();
|
||||
|
||||
PRBool skipNavigatingDisabledMenuItem;
|
||||
GetPresContext()->LookAndFeel()->
|
||||
GetMetric(nsILookAndFeel::eMetric_SkipNavigatingDisabledMenuItem,
|
||||
skipNavigatingDisabledMenuItem);
|
||||
|
||||
return (tag == nsXULAtoms::menu ||
|
||||
tag == nsXULAtoms::menuitem ||
|
||||
tag == nsHTMLAtoms::option);
|
||||
PRBool result = (tag == nsXULAtoms::menu ||
|
||||
tag == nsXULAtoms::menuitem ||
|
||||
tag == nsHTMLAtoms::option);
|
||||
if (skipNavigatingDisabledMenuItem)
|
||||
result = result && !IsDisabled(aContent);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
PRBool
|
||||
|
||||
@@ -169,6 +169,7 @@ public:
|
||||
eMetric_SelectTextfieldsOnKeyFocus, // select textfields when focused via tab/accesskey?
|
||||
eMetric_SubmenuDelay, // delay before submenus open
|
||||
eMetric_MenusCanOverlapOSBar, // can popups overlap menu/task bar?
|
||||
eMetric_SkipNavigatingDisabledMenuItem, // skip navigating to disabled menu item?
|
||||
eMetric_DragFullWindow, // show window contents while dragging?
|
||||
eMetric_DragThresholdX, // begin a drag if the mouse is moved further than the threshold while the button is down
|
||||
eMetric_DragThresholdY,
|
||||
|
||||
@@ -367,6 +367,9 @@ NS_IMETHODIMP nsLookAndFeel::GetMetric(const nsMetricID aID, PRInt32 & aMetric)
|
||||
// we want XUL popups to be able to overlap the task bar.
|
||||
aMetric = 1;
|
||||
break;
|
||||
case eMetric_SkipNavigatingDisabledMenuItem:
|
||||
aMetric = 1;
|
||||
break;
|
||||
case eMetric_DragFullWindow:
|
||||
aMetric = 1;
|
||||
break;
|
||||
|
||||
@@ -401,6 +401,9 @@ NS_IMETHODIMP nsLookAndFeel::GetMetric(const nsMetricID aID, PRInt32 & aMetric)
|
||||
// we want XUL popups to be able to overlap the task bar.
|
||||
aMetric = 1;
|
||||
break;
|
||||
case eMetric_SkipNavigatingDisabledMenuItem:
|
||||
aMetric = 1;
|
||||
break;
|
||||
case eMetric_DragFullWindow:
|
||||
aMetric = 1;
|
||||
break;
|
||||
|
||||
@@ -94,6 +94,7 @@ nsLookAndFeelIntPref nsXPLookAndFeel::sIntPrefs[] =
|
||||
{ "ui.isScreenReaderActive", eMetric_IsScreenReaderActive, PR_FALSE, nsLookAndFeelTypeInt, 0 },
|
||||
{ "ui.menusCanOverlapOSBar", eMetric_MenusCanOverlapOSBar,
|
||||
PR_FALSE, nsLookAndFeelTypeInt, 0 },
|
||||
{ "ui.skipNavigatingDisabledMenuItem", eMetric_SkipNavigatingDisabledMenuItem, PR_FALSE, nsLookAndFeelTypeInt, 0 },
|
||||
{ "ui.treeOpenDelay",
|
||||
eMetric_TreeOpenDelay, PR_FALSE, nsLookAndFeelTypeInt, 0 },
|
||||
{ "ui.treeCloseDelay",
|
||||
|
||||
Reference in New Issue
Block a user