summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firefox.spec9
-rw-r--r--mozilla-1767916-multimonitor-crash.patch21
-rw-r--r--mozilla-1767946-profilemanagersize.patch30
3 files changed, 59 insertions, 1 deletions
diff --git a/firefox.spec b/firefox.spec
index 13b52e2..4482ab2 100644
--- a/firefox.spec
+++ b/firefox.spec
@@ -163,7 +163,7 @@ ExcludeArch: aarch64
Summary: Mozilla Firefox Web browser
Name: firefox
Version: 100.0
-Release: 4%{?pre_tag}%{?dist}
+Release: 5%{?pre_tag}%{?dist}
URL: https://www.mozilla.org/firefox/
License: MPLv1.1 or GPLv2+ or LGPLv2+
Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz
@@ -218,6 +218,7 @@ Patch61: firefox-glibc-dynstack.patch
Patch62: build-python.patch
Patch71: 0001-GLIBCXX-fix-for-GCC-12.patch
Patch72: D142373.diff
+Patch73: mozilla-1767916-multimonitor-crash.patch
# Test patches
# Generate without context by
@@ -243,6 +244,7 @@ Patch408: mozilla-1663844.patch
Patch415: mozilla-1670333.patch
Patch416: D145094.diff
Patch417: D145541.diff
+Patch418: mozilla-1767946-profilemanagersize.patch
# PGO/LTO patches
Patch600: pgo.patch
@@ -461,6 +463,7 @@ This package contains results of tests executed during build.
%patch54 -p1 -b .1669639
%patch71 -p1 -b .0001-GLIBCXX-fix-for-GCC-12
%patch72 -p1 -b .D142373
+%patch73 -p1 -b .mozilla-1767916-multimonitor-crash
# Test patches
#%patch100 -p1 -b .firefox-tests-xpcshell
@@ -484,6 +487,7 @@ This package contains results of tests executed during build.
%patch415 -p1 -b .1670333
%patch416 -p1 -b .D145094
%patch417 -p1 -b .D145541
+%patch418 -p1 -b .mozilla-1767946-profilemanagersize
# PGO patches
%if %{build_with_pgo}
@@ -1050,6 +1054,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
#---------------------------------------------------------------------
%changelog
+* Tue May 10 2022 Jan Horak <jhorak@redhat.com> - 100.0-5
+- Fix crashes on f36 multimonitor setup and too big profile manager
+
* Mon May 9 2022 Martin Stransky <stransky@redhat.com>- 100.0-4
- Added fix for mozbz#1767916.
diff --git a/mozilla-1767916-multimonitor-crash.patch b/mozilla-1767916-multimonitor-crash.patch
new file mode 100644
index 0000000..7ca3a2e
--- /dev/null
+++ b/mozilla-1767916-multimonitor-crash.patch
@@ -0,0 +1,21 @@
+diff --git a/widget/gtk/MozContainerWayland.cpp b/widget/gtk/MozContainerWayland.cpp
+--- a/widget/gtk/MozContainerWayland.cpp
++++ b/widget/gtk/MozContainerWayland.cpp
+@@ -527,10 +527,16 @@
+ return;
+ }
+
+ LOGWAYLAND("%s [%p] scale %d\n", __FUNCTION__,
+ (void*)moz_container_get_nsWindow(container), scale);
++ // There is a chance that the attached wl_buffer has not yet been doubled
++ // on the main thread when scale factor changed to 2. This leads to
++ // crash with the following message:
++ // Buffer size (AxB) must be an integer multiple of the buffer_scale (2)
++ // Removing the possibly wrong wl_buffer to prevent that crash:
++ wl_surface_attach(wl_container->surface, nullptr, 0, 0);
+ wl_surface_set_buffer_scale(wl_container->surface, scale);
+ wl_container->buffer_scale = scale;
+ }
+ }
+
+
diff --git a/mozilla-1767946-profilemanagersize.patch b/mozilla-1767946-profilemanagersize.patch
new file mode 100644
index 0000000..4469934
--- /dev/null
+++ b/mozilla-1767946-profilemanagersize.patch
@@ -0,0 +1,30 @@
+diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
+--- a/widget/gtk/nsWindow.cpp
++++ b/widget/gtk/nsWindow.cpp
+@@ -3787,11 +3787,12 @@
+ mPendingConfigures--;
+ }
+
+ // Don't fire configure event for scale changes, we handle that
+ // OnScaleChanged event. Skip that for toplevel windows only.
+- if (mWindowType == eWindowType_toplevel) {
++ if (mWindowType == eWindowType_toplevel ||
++ mWindowType == eWindowType_dialog) {
+ MOZ_DIAGNOSTIC_ASSERT(mGdkWindow,
+ "Getting configure for invisible window?");
+ if (mWindowScaleFactor != gdk_window_get_scale_factor(mGdkWindow)) {
+ LOG(" scale factor changed to %d,return early",
+ gdk_window_get_scale_factor(mGdkWindow));
+@@ -4864,10 +4865,11 @@
+ // Force scale factor recalculation
+ if (!mGdkWindow) {
+ mWindowScaleFactorChanged = true;
+ return;
+ }
++ LOG("OnScaleChanged -> %d\n", gdk_window_get_scale_factor(mGdkWindow));
+
+ // Gtk supply us sometimes with doubled events so stay calm in such case.
+ if (gdk_window_get_scale_factor(mGdkWindow) == mWindowScaleFactor) {
+ return;
+ }
+
bgstack15