mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1196159 - Set nsGlobalWindow::mIsClosed properly after window.close(). r=billm
This commit is contained in:
parent
f3cee861e8
commit
b750b89be6
@ -8131,6 +8131,7 @@ void
|
||||
nsGlobalWindow::ForceClose()
|
||||
{
|
||||
MOZ_ASSERT(IsOuterWindow());
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
|
||||
if (IsFrame() || !mDocShell) {
|
||||
// This may be a frame in a frameset, or a window that's already closed.
|
||||
@ -8159,6 +8160,12 @@ nsGlobalWindow::FinalClose()
|
||||
// Flag that we were closed.
|
||||
mIsClosed = true;
|
||||
|
||||
// If we get here from CloseOuter then it means that the parent process is
|
||||
// going to close our window for us. It's just important to set mIsClosed.
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
return;
|
||||
}
|
||||
|
||||
// This stuff is non-sensical but incredibly fragile. The reasons for the
|
||||
// behavior here don't make sense today and may not have ever made sense,
|
||||
// but various bits of frontend code break when you change them. If you need
|
||||
|
@ -24,7 +24,7 @@ skip-if = buildapp == 'b2g' || toolkit == 'android' # b2g(needs copy support) b2
|
||||
[test_bug477531.html]
|
||||
[test_bug477700.html]
|
||||
[test_bug478219.xhtml]
|
||||
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s #window.closed not working, bug 907795 # b2g(window.closed not working, bug 907795) b2g-debug(window.closed not working, bug 907795) b2g-desktop(window.closed not working, bug 907795)
|
||||
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' #window.closed not working, bug 907795 # b2g(window.closed not working, bug 907795) b2g-debug(window.closed not working, bug 907795) b2g-desktop(window.closed not working, bug 907795)
|
||||
[test_bug534785.html]
|
||||
[test_bug542914.html]
|
||||
skip-if = (toolkit == 'gonk' && debug) #debug-only failure
|
||||
|
@ -361,7 +361,6 @@ addEventListener("DOMWindowClose", function (aEvent) {
|
||||
if (!aEvent.isTrusted)
|
||||
return;
|
||||
sendAsyncMessage("DOMWindowClose");
|
||||
aEvent.preventDefault();
|
||||
}, false);
|
||||
|
||||
addEventListener("ImageContentLoaded", function (aEvent) {
|
||||
|
Loading…
Reference in New Issue
Block a user