зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
16e7e36da8
Коммит
ce97afea1d
|
@ -2596,7 +2596,11 @@ nsEventStateManager::SetContentState(nsIContent *aContent, PRInt32 aState)
|
||||||
NS_IF_RELEASE(gLastFocusedContent);
|
NS_IF_RELEASE(gLastFocusedContent);
|
||||||
gLastFocusedContent = mCurrentFocus;
|
gLastFocusedContent = mCurrentFocus;
|
||||||
NS_IF_ADDREF(gLastFocusedContent);
|
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 {
|
} else {
|
||||||
notifyContent[3] = gLastFocusedContent;
|
notifyContent[3] = gLastFocusedContent;
|
||||||
NS_IF_ADDREF(gLastFocusedContent);
|
NS_IF_ADDREF(gLastFocusedContent);
|
||||||
|
|
|
@ -2596,7 +2596,11 @@ nsEventStateManager::SetContentState(nsIContent *aContent, PRInt32 aState)
|
||||||
NS_IF_RELEASE(gLastFocusedContent);
|
NS_IF_RELEASE(gLastFocusedContent);
|
||||||
gLastFocusedContent = mCurrentFocus;
|
gLastFocusedContent = mCurrentFocus;
|
||||||
NS_IF_ADDREF(gLastFocusedContent);
|
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 {
|
} else {
|
||||||
notifyContent[3] = gLastFocusedContent;
|
notifyContent[3] = gLastFocusedContent;
|
||||||
NS_IF_ADDREF(gLastFocusedContent);
|
NS_IF_ADDREF(gLastFocusedContent);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче