From eddf40e132dd3f522c43335af05d52561a39a792 Mon Sep 17 00:00:00 2001 From: Csoregi Natalia Date: Mon, 20 Dec 2021 04:54:58 +0200 Subject: [PATCH] Backed out changeset c738cce970b5 (bug 1544167) for causing permafailures on /browser_popup_condition.js. CLOSED TREE --- toolkit/components/windowwatcher/nsWindowWatcher.cpp | 9 --------- toolkit/components/windowwatcher/nsWindowWatcher.h | 7 ++++--- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/toolkit/components/windowwatcher/nsWindowWatcher.cpp b/toolkit/components/windowwatcher/nsWindowWatcher.cpp index 2005c0dea00e..29f40f921f08 100644 --- a/toolkit/components/windowwatcher/nsWindowWatcher.cpp +++ b/toolkit/components/windowwatcher/nsWindowWatcher.cpp @@ -29,7 +29,6 @@ #include "mozilla/dom/BrowsingContextGroup.h" #include "mozilla/dom/Document.h" #include "mozilla/dom/DocumentInlines.h" -#include "nsIDragService.h" #include "nsIDOMChromeWindow.h" #include "nsIPrompt.h" #include "nsIScriptObjectPrincipal.h" @@ -416,14 +415,6 @@ nsresult nsWindowWatcher::CreateChromeWindow(nsIWebBrowserChrome* aParentChrome, } bool cancel = false; - if (aChromeFlags & nsIWebBrowserChrome::CHROME_OPENAS_DIALOG) { - // If there are any drag and drop operations in flight, try to end them. - nsCOMPtr ds = - do_GetService("@mozilla.org/widget/dragservice;1"); - if (ds) { - ds->EndDragSession(true, 0); - } - } nsCOMPtr newWindowChrome; nsresult rv = mWindowCreator->CreateChromeWindow( aParentChrome, aChromeFlags, aOpenWindowInfo, &cancel, diff --git a/toolkit/components/windowwatcher/nsWindowWatcher.h b/toolkit/components/windowwatcher/nsWindowWatcher.h index 081c3443c6e6..59c3aac54d03 100644 --- a/toolkit/components/windowwatcher/nsWindowWatcher.h +++ b/toolkit/components/windowwatcher/nsWindowWatcher.h @@ -105,9 +105,10 @@ class nsWindowWatcher : public nsIWindowWatcher, const mozilla::Maybe& aOpenerFullZoom = mozilla::Nothing()); private: - MOZ_CAN_RUN_SCRIPT_BOUNDARY nsresult CreateChromeWindow( - nsIWebBrowserChrome* aParentChrome, uint32_t aChromeFlags, - nsIOpenWindowInfo* aOpenWindowInfo, nsIWebBrowserChrome** aResult); + nsresult CreateChromeWindow(nsIWebBrowserChrome* aParentChrome, + uint32_t aChromeFlags, + nsIOpenWindowInfo* aOpenWindowInfo, + nsIWebBrowserChrome** aResult); void MaybeDisablePersistence(const SizeSpec& sizeSpec, nsIDocShellTreeOwner* aTreeOwner);