Fix for bug 53669, allow combination :focus/:active state notifications so that pre-focused HTML4 buttons work. r:saari,sr:jst

This commit is contained in:
joki%netscape.com 2001-02-07 07:05:56 +00:00
Родитель 16e7e36da8
Коммит ce97afea1d
2 изменённых файлов: 10 добавлений и 2 удалений

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

@ -2596,7 +2596,11 @@ nsEventStateManager::SetContentState(nsIContent *aContent, PRInt32 aState)
NS_IF_RELEASE(gLastFocusedContent);
gLastFocusedContent = mCurrentFocus;
NS_IF_ADDREF(gLastFocusedContent);
aContent = nsnull;
//If this notification was for focus alone then get rid of aContent
//ref to avoid unnecessary notification.
if (!(aState & ~NS_EVENT_STATE_FOCUS)) {
aContent = nsnull;
}
} else {
notifyContent[3] = gLastFocusedContent;
NS_IF_ADDREF(gLastFocusedContent);

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

@ -2596,7 +2596,11 @@ nsEventStateManager::SetContentState(nsIContent *aContent, PRInt32 aState)
NS_IF_RELEASE(gLastFocusedContent);
gLastFocusedContent = mCurrentFocus;
NS_IF_ADDREF(gLastFocusedContent);
aContent = nsnull;
//If this notification was for focus alone then get rid of aContent
//ref to avoid unnecessary notification.
if (!(aState & ~NS_EVENT_STATE_FOCUS)) {
aContent = nsnull;
}
} else {
notifyContent[3] = gLastFocusedContent;
NS_IF_ADDREF(gLastFocusedContent);