Bug 297927. Fix accessible focus events on program launch. r=timeless, sr=tor, a=mkaply

This commit is contained in:
aaronleventhal%moonset.net 2005-06-21 20:07:26 +00:00
Родитель a08a20b609
Коммит 751ebae195
2 изменённых файлов: 7 добавлений и 1 удалений

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

@ -429,6 +429,7 @@ NS_IMETHODIMP nsDocAccessible::Init()
if (mRoleMapEntry && mRoleMapEntry->role != ROLE_DIALOG &&
mRoleMapEntry->role != ROLE_APPLICATION &&
mRoleMapEntry->role != ROLE_ALERT &&
mRoleMapEntry->role != ROLE_DOCUMENT) {
// Document accessible can only have certain roles
// This was set in nsAccessible::Init() based on xhtml2:role attribute

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

@ -587,6 +587,11 @@ NS_IMETHODIMP nsRootAccessible::HandleEvent(nsIDOMEvent* aEvent)
}
}
}
if (accessible == this) {
// Top level window focus events already automatically fired by MSAA
// based on HWND activities. Don't fire the extra focus event.
return NS_OK;
}
FireAccessibleFocusEvent(accessible, targetNode);
}
else if (eventType.EqualsLiteral("ValueChange")) {
@ -862,7 +867,7 @@ NS_IMETHODIMP nsRootAccessible::Shutdown()
}
mCaretAccessible = nsnull;
mAccService = nsnull;
if (mFireEventTimer) {
if (mFireFocusTimer) {
mFireFocusTimer->Cancel();
mFireFocusTimer = nsnull;
}