Process non-ASCII access keys correctly. Bug 255696, r+sr=roc, a=asa

This commit is contained in:
smontagu%smontagu.org 2005-07-03 12:19:26 +00:00
Родитель 62ad3a25fc
Коммит cd922206ba
1 изменённых файлов: 4 добавлений и 3 удалений

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

@ -934,7 +934,8 @@ nsEventStateManager::HandleAccessKey(nsPresContext* aPresContext,
// Alt or other accesskey modifier is down, we may need to do an accesskey
if (mAccessKeys) {
// Someone registered an accesskey. Find and activate it.
PRUnichar accKey = nsCRT::ToLower((char)aEvent->charCode);
PRUint32 accKey = (IS_IN_BMP(aEvent->charCode)) ?
ToLowerCase((PRUnichar)aEvent->charCode) : aEvent->charCode;
nsVoidKey key(NS_INT32_TO_PTR(accKey));
if (mAccessKeys->Exists(&key)) {
@ -4330,7 +4331,7 @@ nsEventStateManager::RegisterAccessKey(nsIContent* aContent, PRUint32 aKey)
}
if (aContent) {
PRUnichar accKey = nsCRT::ToLower((char)aKey);
PRUint32 accKey = (IS_IN_BMP(aKey)) ? ToLowerCase((PRUnichar)aKey) : aKey;
nsVoidKey key(NS_INT32_TO_PTR(accKey));
@ -4352,7 +4353,7 @@ nsEventStateManager::UnregisterAccessKey(nsIContent* aContent, PRUint32 aKey)
}
if (aContent) {
PRUnichar accKey = nsCRT::ToLower((char)aKey);
PRUint32 accKey = (IS_IN_BMP(aKey)) ? ToLowerCase((PRUnichar)aKey) : aKey;
nsVoidKey key(NS_INT32_TO_PTR(accKey));