ifdef for mac event processing of access keys

bug=7559 r=dcone
This commit is contained in:
rods%netscape.com 2000-06-02 14:20:50 +00:00
Родитель 4a7e30f9a1
Коммит eab83335f9
2 изменённых файлов: 16 добавлений и 4 удалений

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

@ -590,9 +590,15 @@ nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
case NS_KEY_PRESS:
{
nsKeyEvent* keyEvent = (nsKeyEvent*)aEvent;
#ifdef XP_MAC
PRBool isSpecialAccessKeyDown = keyEvent->isControl;
#else
PRBool isSpecialAccessKeyDown = keyEvent->isAlt;
#endif
//This is to prevent keyboard scrolling while alt modifier in use.
if (keyEvent->isAlt) {
if (isSpecialAccessKeyDown) {
//Alt key is down, we may need to do an accesskey
if (mAccessKeys) {
//Someone registered an accesskey. Find and activate it.
@ -1984,7 +1990,7 @@ nsEventStateManager::GetNextTabbableContent(nsIContent* aRootContent, nsIFrame*
}
//else continue looking for next highest priority tab
mCurrentTabIndex = GetNextTabIndex(aRootContent, forward);
return GetNextTabbableContent(aRootContent, nsnull, forward, aResult);
return GetNextTabbableContent(aRootContent, aFrame, forward, aResult);
}
PRInt32

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

@ -590,9 +590,15 @@ nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
case NS_KEY_PRESS:
{
nsKeyEvent* keyEvent = (nsKeyEvent*)aEvent;
#ifdef XP_MAC
PRBool isSpecialAccessKeyDown = keyEvent->isControl;
#else
PRBool isSpecialAccessKeyDown = keyEvent->isAlt;
#endif
//This is to prevent keyboard scrolling while alt modifier in use.
if (keyEvent->isAlt) {
if (isSpecialAccessKeyDown) {
//Alt key is down, we may need to do an accesskey
if (mAccessKeys) {
//Someone registered an accesskey. Find and activate it.
@ -1984,7 +1990,7 @@ nsEventStateManager::GetNextTabbableContent(nsIContent* aRootContent, nsIFrame*
}
//else continue looking for next highest priority tab
mCurrentTabIndex = GetNextTabIndex(aRootContent, forward);
return GetNextTabbableContent(aRootContent, nsnull, forward, aResult);
return GetNextTabbableContent(aRootContent, aFrame, forward, aResult);
}
PRInt32