mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1183845 - Only send activation event if document is non-null. r=bz
This commit is contained in:
parent
b655d3ecf9
commit
193b1bbe07
@ -1134,12 +1134,14 @@ nsFocusManager::ActivateOrDeactivate(nsPIDOMWindow* aWindow, bool aActive)
|
||||
aWindow->ActivateOrDeactivate(aActive);
|
||||
|
||||
// Send the activate event.
|
||||
nsContentUtils::DispatchEventOnlyToChrome(aWindow->GetExtantDoc(),
|
||||
aWindow,
|
||||
aActive ?
|
||||
NS_LITERAL_STRING("activate") :
|
||||
NS_LITERAL_STRING("deactivate"),
|
||||
true, true, nullptr);
|
||||
if (aWindow->GetExtantDoc()) {
|
||||
nsContentUtils::DispatchEventOnlyToChrome(aWindow->GetExtantDoc(),
|
||||
aWindow,
|
||||
aActive ?
|
||||
NS_LITERAL_STRING("activate") :
|
||||
NS_LITERAL_STRING("deactivate"),
|
||||
true, true, nullptr);
|
||||
}
|
||||
|
||||
// Look for any remote child frames, iterate over them and send the activation notification.
|
||||
nsContentUtils::CallOnAllRemoteChildren(aWindow, ActivateOrDeactivateChild,
|
||||
|
Loading…
Reference in New Issue
Block a user