diff options
Diffstat (limited to 'mochitest-wayland-workaround.patch')
-rw-r--r-- | mochitest-wayland-workaround.patch | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/mochitest-wayland-workaround.patch b/mochitest-wayland-workaround.patch index bc30d6f..6f77b79 100644 --- a/mochitest-wayland-workaround.patch +++ b/mochitest-wayland-workaround.patch @@ -1,6 +1,6 @@ -diff -up firefox-88.0/dom/base/test/browser_multiple_popups.js.mochitest-wayland-workaround firefox-88.0/dom/base/test/browser_multiple_popups.js ---- firefox-88.0/dom/base/test/browser_multiple_popups.js.mochitest-wayland-workaround 2021-04-15 21:44:27.000000000 +0200 -+++ firefox-88.0/dom/base/test/browser_multiple_popups.js 2021-04-22 15:17:36.905908990 +0200 +diff -up firefox-89.0/dom/base/test/browser_multiple_popups.js.mochitest-wayland-workaround firefox-89.0/dom/base/test/browser_multiple_popups.js +--- firefox-89.0/dom/base/test/browser_multiple_popups.js.mochitest-wayland-workaround 2021-05-27 22:29:44.000000000 +0200 ++++ firefox-89.0/dom/base/test/browser_multiple_popups.js 2021-06-01 10:02:59.648432325 +0200 @@ -265,6 +265,7 @@ add_task(async _ => { info("All opened from chrome."); await withTestPage(2, { chrome: true }, async function(browser) { @@ -9,10 +9,10 @@ diff -up firefox-88.0/dom/base/test/browser_multiple_popups.js.mochitest-wayland }); }); -diff -up firefox-88.0/dom/ipc/BrowserChild.cpp.mochitest-wayland-workaround firefox-88.0/dom/ipc/BrowserChild.cpp ---- firefox-88.0/dom/ipc/BrowserChild.cpp.mochitest-wayland-workaround 2021-04-16 01:11:48.000000000 +0200 -+++ firefox-88.0/dom/ipc/BrowserChild.cpp 2021-04-22 15:17:36.905908990 +0200 -@@ -459,7 +459,7 @@ nsresult BrowserChild::Init(mozIDOMWindo +diff -up firefox-89.0/dom/ipc/BrowserChild.cpp.mochitest-wayland-workaround firefox-89.0/dom/ipc/BrowserChild.cpp +--- firefox-89.0/dom/ipc/BrowserChild.cpp.mochitest-wayland-workaround 2021-05-27 22:29:44.000000000 +0200 ++++ firefox-89.0/dom/ipc/BrowserChild.cpp 2021-06-01 10:02:59.649432346 +0200 +@@ -457,7 +457,7 @@ nsresult BrowserChild::Init(mozIDOMWindo } mPuppetWidget->InfallibleCreate(nullptr, nullptr, // no parents @@ -21,10 +21,10 @@ diff -up firefox-88.0/dom/ipc/BrowserChild.cpp.mochitest-wayland-workaround fire nullptr); // HandleWidgetEvent mWebBrowser = nsWebBrowser::Create(this, mPuppetWidget, mBrowsingContext, -diff -up firefox-88.0/toolkit/components/browser/nsWebBrowser.cpp.mochitest-wayland-workaround firefox-88.0/toolkit/components/browser/nsWebBrowser.cpp ---- firefox-88.0/toolkit/components/browser/nsWebBrowser.cpp.mochitest-wayland-workaround 2021-04-16 01:11:48.000000000 +0200 -+++ firefox-88.0/toolkit/components/browser/nsWebBrowser.cpp 2021-04-22 15:17:36.905908990 +0200 -@@ -147,7 +147,8 @@ already_AddRefed<nsWebBrowser> nsWebBrow +diff -up firefox-89.0/toolkit/components/browser/nsWebBrowser.cpp.mochitest-wayland-workaround firefox-89.0/toolkit/components/browser/nsWebBrowser.cpp +--- firefox-89.0/toolkit/components/browser/nsWebBrowser.cpp.mochitest-wayland-workaround 2021-05-27 22:29:54.000000000 +0200 ++++ firefox-89.0/toolkit/components/browser/nsWebBrowser.cpp 2021-06-01 10:02:59.649432346 +0200 +@@ -150,7 +150,8 @@ already_AddRefed<nsWebBrowser> nsWebBrow // handler that always gets called (even for subframes) for any bubbling // event. @@ -34,15 +34,14 @@ diff -up firefox-88.0/toolkit/components/browser/nsWebBrowser.cpp.mochitest-wayl if (NS_WARN_IF(NS_FAILED(rv))) { return nullptr; } -diff -up firefox-88.0/widget/gtk/nsWindow.cpp.mochitest-wayland-workaround firefox-88.0/widget/gtk/nsWindow.cpp ---- firefox-88.0/widget/gtk/nsWindow.cpp.mochitest-wayland-workaround 2021-04-22 15:17:36.903908930 +0200 -+++ firefox-88.0/widget/gtk/nsWindow.cpp 2021-04-22 15:23:27.031343692 +0200 -@@ -2224,8 +2224,22 @@ void nsWindow::SetFocus(Raise aRaise, mo - Preferences::GetBool("widget.wayland-focus-workaroud", false)) { +diff -up firefox-89.0/widget/gtk/nsWindow.cpp.mochitest-wayland-workaround firefox-89.0/widget/gtk/nsWindow.cpp +--- firefox-89.0/widget/gtk/nsWindow.cpp.mochitest-wayland-workaround 2021-06-01 10:02:59.644432243 +0200 ++++ firefox-89.0/widget/gtk/nsWindow.cpp 2021-06-01 10:04:28.715262874 +0200 +@@ -2225,11 +2225,22 @@ void nsWindow::SetFocus(Raise aRaise, mo + false)) { // Wayland does not support focus changes so we need to workaround it // by window hide/show sequence. - owningWindow->NativeShow(false); -- owningWindow->NativeShow(true); + LOG(("Applying Wayland focus workaround for nsWindow %p\n", + owningWindow.get())); + GtkAllocation allocation; @@ -50,7 +49,10 @@ diff -up firefox-88.0/widget/gtk/nsWindow.cpp.mochitest-wayland-workaround firef + LOG((" mShell allocation %d %d -> %d %d\n", allocation.x, + allocation.y, allocation.width, allocation.height)); + owningWindow->Show(false); -+ RefPtr<nsWindow> self(owningWindow); + RefPtr<nsWindow> self(owningWindow); +- NS_DispatchToMainThread(NS_NewRunnableFunction( +- "nsWindow::NativeShow()", +- [self]() -> void { self->NativeShow(true); })); + const GtkAllocation alloc = allocation; + NS_DispatchToMainThread( + NS_NewRunnableFunction("nsWindow::Show()", [self, alloc]() -> void { @@ -62,7 +64,7 @@ diff -up firefox-88.0/widget/gtk/nsWindow.cpp.mochitest-wayland-workaround firef return; } -@@ -7935,6 +7949,8 @@ nsresult nsWindow::SynthesizeNativeMouse +@@ -7962,6 +7973,8 @@ nsresult nsWindow::SynthesizeNativeMouse nsIObserver* aObserver) { AutoObserverNotifier notifier(aObserver, "mouseevent"); @@ -71,7 +73,7 @@ diff -up firefox-88.0/widget/gtk/nsWindow.cpp.mochitest-wayland-workaround firef if (!mGdkWindow) { return NS_OK; } -@@ -7949,6 +7965,12 @@ nsresult nsWindow::SynthesizeNativeMouse +@@ -7976,6 +7989,12 @@ nsresult nsWindow::SynthesizeNativeMouse switch (aNativeMessage) { case NativeMouseMessage::ButtonDown: case NativeMouseMessage::ButtonUp: { |