From 83e8010a4fd29f2c59a56f8add09412ba27ebb09 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 12 Mar 2019 12:32:07 +0100 Subject: [PATCH] Updated to 66.0 --- .gitignore | 2 + firefox-debug-build.patch | 14 --- firefox-mozconfig | 1 - firefox.spec | 34 +++--- mozilla-1170092.patch | 36 +++---- mozilla-1423598-popup.patch | 204 ++++++++++++++++++++++++++++++++++++ mozilla-1522780.patch | 24 ----- mozilla-1532643-popup.patch | 71 +++++++++++++ mozilla-256180.patch | 12 --- sources | 4 +- 10 files changed, 318 insertions(+), 84 deletions(-) delete mode 100644 firefox-debug-build.patch create mode 100644 mozilla-1423598-popup.patch delete mode 100644 mozilla-1522780.patch create mode 100644 mozilla-1532643-popup.patch delete mode 100644 mozilla-256180.patch diff --git a/.gitignore b/.gitignore index eb2ed39..40cbc79 100644 --- a/.gitignore +++ b/.gitignore @@ -329,3 +329,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-65.0.1-20190215.tar.xz /firefox-65.0.2.source.tar.xz /firefox-langpacks-65.0.2-20190301.tar.xz +/firefox-66.0.source.tar.xz +/firefox-langpacks-66.0-20190312.tar.xz diff --git a/firefox-debug-build.patch b/firefox-debug-build.patch deleted file mode 100644 index 1b8ac54..0000000 --- a/firefox-debug-build.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up firefox-63.0.1/browser/installer/package-manifest.in.old firefox-63.0.1/browser/installer/package-manifest.in ---- firefox-63.0.1/browser/installer/package-manifest.in.old 2018-11-14 11:01:54.326071733 +0100 -+++ firefox-63.0.1/browser/installer/package-manifest.in 2018-11-14 11:02:04.402045863 +0100 -@@ -512,8 +512,8 @@ - - ; [Layout Debugger] - #ifdef MOZ_DEBUG --@RESPATH@/chrome/layoutdebug@JAREXT@ --@RESPATH@/chrome/layoutdebug.manifest -+#@RESPATH@/chrome/layoutdebug@JAREXT@ -+#@RESPATH@/chrome/layoutdebug.manifest - #endif - - ; [Personal Security Manager] diff --git a/firefox-mozconfig b/firefox-mozconfig index efdcdb1..d8bf8f3 100644 --- a/firefox-mozconfig +++ b/firefox-mozconfig @@ -13,7 +13,6 @@ ac_add_options --enable-chrome-format=omni ac_add_options --enable-pulseaudio ac_add_options --without-system-icu ac_add_options --with-mozilla-api-keyfile=../mozilla-api-key -ac_add_options --with-google-api-keyfile=../google-api-key ac_add_options --enable-release ac_add_options --update-channel=release ac_add_options --disable-system-sqlite diff --git a/firefox.spec b/firefox.spec index 58f8321..9909fd2 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1,3 +1,6 @@ +# Set to true if it's going to be submitted as update. +%global release_build 0 + # Disabled arm due to rhbz#1658940 ExcludeArch: armv7hl # Disabled due to https://pagure.io/fedora-infrastructure/issue/7581 @@ -17,11 +20,11 @@ ExcludeArch: s390x %global disable_elfhack 1 %global build_with_clang 0 %global use_bundled_cbindgen 1 -# Disable PGO+LTO on Fedora 30 due to broken gdb which can't process -# LTO debuginfo. -%if 0%{?fedora} < 30 %ifnarch %{ix86} ppc64 s390x +%if %{release_build} %global build_with_pgo 1 +%else +%global build_with_pgo 0 %endif %endif %if 0%{?fedora} > 29 @@ -85,15 +88,19 @@ ExcludeArch: s390x %endif %endif +%if !%{release_build} +%global pre_tag .test +%endif + Summary: Mozilla Firefox Web browser Name: firefox -Version: 65.0.2 +Version: 66.0 Release: 1%{?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 %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20190301.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20190312.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -123,7 +130,6 @@ Patch37: build-jit-atomic-always-lucky.patch Patch38: build-cacheFlush-missing.patch Patch40: build-aarch64-skia.patch Patch41: build-disable-elfhack.patch -Patch46: firefox-debug-build.patch # Fedora specific patches Patch215: firefox-enable-addons.patch @@ -136,7 +142,6 @@ Patch227: firefox-locale-debug.patch # Upstream patches Patch402: mozilla-1196777.patch -Patch406: mozilla-256180.patch Patch412: mozilla-1337988.patch Patch413: mozilla-1353817.patch Patch415: Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch @@ -144,7 +149,8 @@ Patch417: bug1375074-save-restore-x28.patch # Wayland specific upstream patches Patch574: firefox-pipewire.patch -Patch575: mozilla-1522780.patch +Patch575: mozilla-1423598-popup.patch +Patch576: mozilla-1532643-popup.patch # PGO/LTO patches Patch600: pgo.patch @@ -313,14 +319,13 @@ This package contains results of tests executed during build. %ifarch s390 %patch25 -p1 -b .rhbz-1219542-s390 %endif -%patch37 -p1 -b .jit-atomic-lucky +#%patch37 -p1 -b .jit-atomic-lucky # TODO Fix later #%patch40 -p1 -b .aarch64-skia %if 0%{?disable_elfhack} %patch41 -p1 -b .disable-elfhack %endif %patch3 -p1 -b .arm -%patch46 -p1 -b .debug # Fedora patches %patch215 -p1 -b .addons @@ -334,7 +339,6 @@ This package contains results of tests executed during build. %patch227 -p1 -b .locale-debug %patch402 -p1 -b .1196777 -%patch406 -p1 -b .256180 %patch413 -p1 -b .1353817 %ifarch %{arm} %patch415 -p1 -b .1238661 @@ -346,9 +350,10 @@ This package contains results of tests executed during build. # Wayland specific upstream patches %if 0%{?fedora} > 28 -%patch574 -p1 -b .firefox-pipewire +#%patch574 -p1 -b .firefox-pipewire %endif -%patch575 -p1 -b .1522780 +%patch575 -p1 -b .mozilla-1423598-popup +%patch576 -p1 -b .mozilla-1532643-popup # PGO patches %patch600 -p1 -b .pgo @@ -896,6 +901,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog +* Tue Mar 12 2019 Martin Stransky - 66.0-1 +- Updated to 66 Build 1 + * Fri Mar 1 2019 Martin Stransky - 65.0.2-1 - Updated to 65.0.2 - Disabled PGO+LTO for Fedora 30 diff --git a/mozilla-1170092.patch b/mozilla-1170092.patch index 4252e10..b5ccad2 100644 --- a/mozilla-1170092.patch +++ b/mozilla-1170092.patch @@ -1,6 +1,6 @@ -diff -up firefox-65.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 firefox-65.0/extensions/pref/autoconfig/src/nsReadConfig.cpp ---- firefox-65.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 2019-01-24 19:48:40.000000000 +0100 -+++ firefox-65.0/extensions/pref/autoconfig/src/nsReadConfig.cpp 2019-01-28 14:35:05.084756038 +0100 +diff -up firefox-66.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 firefox-66.0/extensions/pref/autoconfig/src/nsReadConfig.cpp +--- firefox-66.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 2019-03-12 01:22:16.000000000 +0100 ++++ firefox-66.0/extensions/pref/autoconfig/src/nsReadConfig.cpp 2019-03-12 11:58:36.025238819 +0100 @@ -244,8 +244,20 @@ nsresult nsReadConfig::openAndEvaluateJS if (NS_FAILED(rv)) return rv; @@ -23,10 +23,10 @@ diff -up firefox-65.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 fi } else { nsAutoCString location("resource://gre/defaults/autoconfig/"); location += aFileName; -diff -up firefox-65.0/modules/libpref/Preferences.cpp.1170092 firefox-65.0/modules/libpref/Preferences.cpp ---- firefox-65.0/modules/libpref/Preferences.cpp.1170092 2019-01-24 19:48:47.000000000 +0100 -+++ firefox-65.0/modules/libpref/Preferences.cpp 2019-01-28 14:35:05.085756034 +0100 -@@ -4406,6 +4406,8 @@ float MOZ_MAYBE_UNUSED GetPref(co +diff -up firefox-66.0/modules/libpref/Preferences.cpp.1170092 firefox-66.0/modules/libpref/Preferences.cpp +--- firefox-66.0/modules/libpref/Preferences.cpp.1170092 2019-03-12 01:22:21.000000000 +0100 ++++ firefox-66.0/modules/libpref/Preferences.cpp 2019-03-12 11:58:36.026238817 +0100 +@@ -4407,6 +4407,8 @@ float MOZ_MAYBE_UNUSED GetPref(co // // Thus, in the omni.jar case, we always load app-specific default // preferences from omni.jar, whether or not `$app == $gre`. @@ -35,18 +35,18 @@ diff -up firefox-65.0/modules/libpref/Preferences.cpp.1170092 firefox-65.0/modul nsresult rv; nsZipFind* findPtr; -diff -up firefox-65.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-65.0/toolkit/xre/nsXREDirProvider.cpp ---- firefox-65.0/toolkit/xre/nsXREDirProvider.cpp.1170092 2019-01-24 19:48:56.000000000 +0100 -+++ firefox-65.0/toolkit/xre/nsXREDirProvider.cpp 2019-01-28 14:36:31.645396051 +0100 +diff -up firefox-66.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-66.0/toolkit/xre/nsXREDirProvider.cpp +--- firefox-66.0/toolkit/xre/nsXREDirProvider.cpp.1170092 2019-03-12 01:22:26.000000000 +0100 ++++ firefox-66.0/toolkit/xre/nsXREDirProvider.cpp 2019-03-12 12:05:32.008280260 +0100 @@ -57,6 +57,7 @@ #endif #ifdef XP_UNIX - #include -+#include "nsIXULAppInfo.h" + # include ++# include "nsIXULAppInfo.h" #endif #ifdef XP_IOS - #include "UIKitDirProvider.h" -@@ -525,6 +526,21 @@ nsXREDirProvider::GetFile(const char* aP + # include "UIKitDirProvider.h" +@@ -521,6 +522,21 @@ nsXREDirProvider::GetFile(const char* aP } } } @@ -68,7 +68,7 @@ diff -up firefox-65.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-65.0/tool if (NS_FAILED(rv) || !file) return NS_ERROR_FAILURE; if (ensureFilePermissions) { -@@ -881,6 +897,16 @@ nsresult nsXREDirProvider::GetFilesInter +@@ -877,6 +893,16 @@ nsresult nsXREDirProvider::GetFilesInter LoadDirIntoArray(mXULAppDir, kAppendPrefDir, directories); LoadDirsIntoArray(mAppBundleDirectories, kAppendPrefDir, directories); @@ -85,9 +85,9 @@ diff -up firefox-65.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-65.0/tool rv = NS_NewArrayEnumerator(aResult, directories, NS_GET_IID(nsIFile)); } else if (!strcmp(aProperty, NS_APP_CHROME_DIR_LIST)) { // NS_APP_CHROME_DIR_LIST is only used to get default (native) icons -diff -up firefox-65.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 firefox-65.0/xpcom/io/nsAppDirectoryServiceDefs.h ---- firefox-65.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 2019-01-24 19:48:56.000000000 +0100 -+++ firefox-65.0/xpcom/io/nsAppDirectoryServiceDefs.h 2019-01-28 14:35:05.086756030 +0100 +diff -up firefox-66.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 firefox-66.0/xpcom/io/nsAppDirectoryServiceDefs.h +--- firefox-66.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 2019-03-12 01:22:26.000000000 +0100 ++++ firefox-66.0/xpcom/io/nsAppDirectoryServiceDefs.h 2019-03-12 11:58:36.027238815 +0100 @@ -62,6 +62,7 @@ #define NS_APP_PREFS_DEFAULTS_DIR_LIST "PrefDL" #define NS_APP_PREFS_OVERRIDE_DIR \ diff --git a/mozilla-1423598-popup.patch b/mozilla-1423598-popup.patch new file mode 100644 index 0000000..fc07bd8 --- /dev/null +++ b/mozilla-1423598-popup.patch @@ -0,0 +1,204 @@ +diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h +--- a/widget/gtk/nsWindow.h ++++ b/widget/gtk/nsWindow.h +@@ -457,6 +457,10 @@ + nsWindow* GetTransientForWindowIfPopup(); + bool IsHandlingTouchSequence(GdkEventSequence* aSequence); + ++ void NativeMoveResizeWaylandPopup(GdkPoint* aPosition, GdkRectangle* aSize); ++ ++ GtkTextDirection GetTextDirection(); ++ + #ifdef MOZ_X11 + typedef enum {GTK_WIDGET_COMPOSIDED_DEFAULT = 0, + GTK_WIDGET_COMPOSIDED_DISABLED = 1, +diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp +--- a/widget/gtk/nsWindow.cpp ++++ b/widget/gtk/nsWindow.cpp +@@ -1109,13 +1109,89 @@ + NotifyRollupGeometryChange(); + } + ++#ifdef DEBUG ++static void NativeMoveResizeWaylandPopupCallback(GdkWindow *window, ++ const GdkRectangle *flipped_rect, const GdkRectangle *final_rect, ++ gboolean flipped_x, gboolean flipped_y, void *unused) ++{ ++ LOG(("NativeMoveResizeWaylandPopupCallback flipped %d %d\n", ++ flipped_rect->x, flipped_rect->y)); ++ LOG(("NativeMoveResizeWaylandPopupCallback final %d %d\n", ++ final_rect->x, final_rect->y)); ++} ++#endif ++ ++void nsWindow::NativeMoveResizeWaylandPopup(GdkPoint* aPosition, GdkRectangle* aSize) { ++ // Available as of GTK 3.24+ ++ static auto sGdkWindowMoveToRect = ++ (void (*)(GdkWindow *, const GdkRectangle *, GdkGravity, GdkGravity, ++ GdkAnchorHints, gint, gint)) ++ dlsym(RTLD_DEFAULT, "gdk_window_move_to_rect"); ++ ++ if (!sGdkWindowMoveToRect) { ++ gtk_window_move(GTK_WINDOW(mShell), aPosition->x, aPosition->y); ++ if (aSize) { ++ gtk_window_resize(GTK_WINDOW(mShell), aSize->width, aSize->height); ++ } ++ return; ++ } ++ ++ GdkWindow *gdkWindow = gtk_widget_get_window(GTK_WIDGET(mShell)); ++ if (!gdkWindow) { ++ return; ++ } ++ ++ GtkWidget* parentWidget = ++ GTK_WIDGET(gtk_window_get_transient_for(GTK_WINDOW(mShell))); ++ ++ int x_parent, y_parent; ++ gdk_window_get_origin(gtk_widget_get_window(parentWidget), &x_parent, &y_parent); ++ ++ GdkRectangle rect = { aPosition->x - x_parent, ++ aPosition->y - y_parent, ++ 1, 1}; ++ if (aSize) { ++ rect.width = aSize->width; ++ rect.height = aSize->height; ++ } ++ ++#ifdef DEBUG ++ LOG(("NativeMoveResizeWaylandPopup request position %d,%d\n", ++ aPosition->x, aPosition->y)); ++ if (aSize) { ++ LOG(("NativeMoveResizeWaylandPopup request size %d,%d\n", ++ aSize->width, aSize->height)); ++ } ++ LOG(("NativeMoveResizeWaylandPopup result %d %d\n", rect.x, rect.y)); ++ g_signal_connect(gdkWindow, "moved-to-rect", ++ G_CALLBACK(NativeMoveResizeWaylandPopupCallback), this); ++#endif ++ ++ GdkGravity rectAnchor = GDK_GRAVITY_NORTH_WEST; ++ GdkGravity menuAnchor = GDK_GRAVITY_NORTH_WEST; ++ if (GetTextDirection() == GTK_TEXT_DIR_RTL) { ++ rectAnchor = GDK_GRAVITY_NORTH_EAST; ++ menuAnchor = GDK_GRAVITY_NORTH_EAST; ++ } ++ ++ GdkAnchorHints hints = GdkAnchorHints(GDK_ANCHOR_SLIDE | GDK_ANCHOR_FLIP); ++ if (aSize) { ++ hints = GdkAnchorHints(hints|GDK_ANCHOR_RESIZE); ++ } ++ ++ sGdkWindowMoveToRect(gdkWindow, &rect, rectAnchor, menuAnchor, hints, 0, 0); ++} ++ + void nsWindow::NativeMove() { + GdkPoint point = DevicePixelsToGdkPointRoundDown(mBounds.TopLeft()); +- +- if (mIsTopLevel) { +- gtk_window_move(GTK_WINDOW(mShell), point.x, point.y); +- } else if (mGdkWindow) { +- gdk_window_move(mGdkWindow, point.x, point.y); ++ if (!mIsX11Display && mIsTopLevel && mWindowType == eWindowType_popup) { ++ NativeMoveResizeWaylandPopup(&point, nullptr); ++ } else { ++ if (mIsTopLevel) { ++ gtk_window_move(GTK_WINDOW(mShell), point.x, point.y); ++ } else if (mGdkWindow) { ++ gdk_window_move(mGdkWindow, point.x, point.y); ++ } + } + } + +@@ -3397,11 +3473,6 @@ + GDK_WINDOW_TYPE_HINT_DIALOG); + gtk_window_set_transient_for(GTK_WINDOW(mShell), topLevelParent); + } else if (mWindowType == eWindowType_popup) { +- // With popup windows, we want to control their position, so don't +- // wait for the window manager to place them (which wouldn't +- // happen with override-redirect windows anyway). +- NativeMove(); +- + gtk_window_set_wmclass(GTK_WINDOW(mShell), "Popup", + gdk_get_program_class()); + +@@ -3456,6 +3527,14 @@ + if (topLevelParent) { + gtk_window_set_transient_for(GTK_WINDOW(mShell), topLevelParent); + } ++ ++ // We need realized mShell at NativeMove(). ++ gtk_widget_realize(mShell); ++ ++ // With popup windows, we want to control their position, so don't ++ // wait for the window manager to place them (which wouldn't ++ // happen with override-redirect windows anyway). ++ NativeMove(); + } else { // must be eWindowType_toplevel + SetDefaultIcon(); + gtk_window_set_wmclass(GTK_WINDOW(mShell), "Toplevel", +@@ -3895,23 +3974,27 @@ + LOG(("nsWindow::NativeMoveResize [%p] %d %d %d %d\n", (void *)this, topLeft.x, + topLeft.y, size.width, size.height)); + +- if (mIsTopLevel) { +- // x and y give the position of the window manager frame top-left. +- gtk_window_move(GTK_WINDOW(mShell), topLeft.x, topLeft.y); +- // This sets the client window size. +- MOZ_ASSERT(size.width > 0 && size.height > 0, +- "Can't resize window smaller than 1x1."); +- gtk_window_resize(GTK_WINDOW(mShell), size.width, size.height); +- } else if (mContainer) { +- GtkAllocation allocation; +- allocation.x = topLeft.x; +- allocation.y = topLeft.y; +- allocation.width = size.width; +- allocation.height = size.height; +- gtk_widget_size_allocate(GTK_WIDGET(mContainer), &allocation); +- } else if (mGdkWindow) { +- gdk_window_move_resize(mGdkWindow, topLeft.x, topLeft.y, size.width, +- size.height); ++ if (!mIsX11Display && mIsTopLevel && mWindowType == eWindowType_popup) { ++ NativeMoveResizeWaylandPopup(&topLeft, &size); ++ } else { ++ if (mIsTopLevel) { ++ // x and y give the position of the window manager frame top-left. ++ gtk_window_move(GTK_WINDOW(mShell), topLeft.x, topLeft.y); ++ // This sets the client window size. ++ MOZ_ASSERT(size.width > 0 && size.height > 0, ++ "Can't resize window smaller than 1x1."); ++ gtk_window_resize(GTK_WINDOW(mShell), size.width, size.height); ++ } else if (mContainer) { ++ GtkAllocation allocation; ++ allocation.x = topLeft.x; ++ allocation.y = topLeft.y; ++ allocation.width = size.width; ++ allocation.height = size.height; ++ gtk_widget_size_allocate(GTK_WIDGET(mContainer), &allocation); ++ } else if (mGdkWindow) { ++ gdk_window_move_resize(mGdkWindow, topLeft.x, topLeft.y, size.width, ++ size.height); ++ } + } + + #ifdef MOZ_X11 +@@ -6791,3 +6874,18 @@ + nsChangeHint_RepaintFrame); + } + } ++ ++GtkTextDirection nsWindow::GetTextDirection() { ++ nsView *view = nsView::GetViewFor(this); ++ if (!view) { ++ return GTK_TEXT_DIR_LTR; ++ } ++ nsIFrame *frame = view->GetFrame(); ++ if (!frame) { ++ return GTK_TEXT_DIR_LTR; ++ } ++ ++ WritingMode wm = frame->GetWritingMode(); ++ bool isFrameRTL = !(wm.IsVertical() ? wm.IsVerticalLR() : wm.IsBidiLTR()); ++ return isFrameRTL ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR; ++} + diff --git a/mozilla-1522780.patch b/mozilla-1522780.patch deleted file mode 100644 index 809a598..0000000 --- a/mozilla-1522780.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up firefox-65.0/toolkit/xre/nsAppRunner.cpp.1522780 firefox-65.0/toolkit/xre/nsAppRunner.cpp ---- firefox-65.0/toolkit/xre/nsAppRunner.cpp.1522780 2019-02-04 14:27:16.704591496 +0100 -+++ firefox-65.0/toolkit/xre/nsAppRunner.cpp 2019-02-04 14:30:01.869913509 +0100 -@@ -3839,12 +3839,14 @@ int XREMain::XRE_mainStartup(bool* aExit - - bool disableWayland = true; - #if defined(MOZ_WAYLAND) -- // Make X11 backend the default one. -- // Enable Wayland backend only when GDK_BACKEND is set and -- // Gtk+ >= 3.22 where we can expect recent enough -- // compositor & libwayland interface. -- disableWayland = (PR_GetEnv("GDK_BACKEND") == nullptr) || -- (gtk_check_version(3, 22, 0) != nullptr); -+ // Enable Wayland on Gtk+ >= 3.22 where we can expect recent enough -+ disableWayland = (gtk_check_version(3, 22, 0) != nullptr); -+ if (!disableWayland) { -+ // Make X11 backend the default one unless MOZ_ENABLE_WAYLAND or -+ // GDK_BACKEND are specified. -+ disableWayland = (PR_GetEnv("GDK_BACKEND") == nullptr) && -+ (PR_GetEnv("MOZ_ENABLE_WAYLAND") == nullptr); -+ } - #endif - // On Wayland disabled builds read X11 DISPLAY env exclusively - // and don't care about different displays. diff --git a/mozilla-1532643-popup.patch b/mozilla-1532643-popup.patch new file mode 100644 index 0000000..b809139 --- /dev/null +++ b/mozilla-1532643-popup.patch @@ -0,0 +1,71 @@ +diff -up firefox-66.0/layout/xul/moz.build.mozilla-1532643-popup firefox-66.0/layout/xul/moz.build +--- firefox-66.0/layout/xul/moz.build.mozilla-1532643-popup 2019-03-12 01:22:20.000000000 +0100 ++++ firefox-66.0/layout/xul/moz.build 2019-03-12 12:21:43.036982252 +0100 +@@ -88,3 +88,6 @@ LOCAL_INCLUDES += [ + + if CONFIG['CC_TYPE'] in ('clang', 'gcc'): + CXXFLAGS += ['-Wno-error=shadow'] ++ ++CFLAGS += CONFIG['TK_CFLAGS'] ++CXXFLAGS += CONFIG['TK_CFLAGS'] +diff -up firefox-66.0/layout/xul/nsMenuPopupFrame.cpp.mozilla-1532643-popup firefox-66.0/layout/xul/nsMenuPopupFrame.cpp +--- firefox-66.0/layout/xul/nsMenuPopupFrame.cpp.mozilla-1532643-popup 2019-03-12 01:22:20.000000000 +0100 ++++ firefox-66.0/layout/xul/nsMenuPopupFrame.cpp 2019-03-12 12:23:11.860770255 +0100 +@@ -55,6 +55,10 @@ + #include "mozilla/dom/KeyboardEvent.h" + #include "mozilla/dom/KeyboardEventBinding.h" + #include ++#ifdef MOZ_WAYLAND ++#include ++#include ++#endif /* MOZ_WAYLAND */ + + using namespace mozilla; + using mozilla::dom::Event; +@@ -298,11 +302,29 @@ nsresult nsMenuPopupFrame::CreateWidgetF + !(mode == eTransparencyTransparent || tag == nsGkAtoms::menulist); + widgetData.mPopupLevel = PopupLevel(widgetData.mNoAutoHide); + ++ static bool waylandBackend = ++#ifdef MOZ_WAYLAND ++ !GDK_IS_X11_DISPLAY(gdk_display_get_default()); ++#else ++ false; ++#endif ++ + // panels which have a parent level need a parent widget. This allows them to + // always appear in front of the parent window but behind other windows that + // should be in front of it. + nsCOMPtr parentWidget; +- if (widgetData.mPopupLevel != ePopupLevelTop) { ++ if (waylandBackend) { ++ // On Wayland we always need to connect menu to its parent menu widget ++ // otherwise it's not shown. ++ nsMenuFrame* menuFrame = do_QueryFrame(GetParent()); ++ if (menuFrame) { ++ nsMenuParent* parentPopup = menuFrame->GetMenuParent(); ++ if (parentPopup && parentPopup->IsMenu()) { ++ parentWidget = ++ static_cast(parentPopup)->GetWidget(); ++ } ++ } ++ } else if (widgetData.mPopupLevel != ePopupLevelTop) { + nsCOMPtr dsti = PresContext()->GetDocShell(); + if (!dsti) return NS_ERROR_FAILURE; + +diff -up firefox-66.0/widget/gtk/nsWindow.cpp.mozilla-1532643-popup firefox-66.0/widget/gtk/nsWindow.cpp +--- firefox-66.0/widget/gtk/nsWindow.cpp.mozilla-1532643-popup 2019-03-12 12:21:43.034982257 +0100 ++++ firefox-66.0/widget/gtk/nsWindow.cpp 2019-03-12 12:21:43.037982249 +0100 +@@ -3485,11 +3485,7 @@ nsresult nsWindow::Create(nsIWidget *aPa + } else { + switch (aInitData->mPopupHint) { + case ePopupTypeMenu: +- // Use GDK_WINDOW_TYPE_HINT_UTILITY on Wayland which +- // guides Gtk to create the popup as subsurface +- // instead of xdg_shell popup (see Bug 1423598). +- gtkTypeHint = mIsX11Display ? GDK_WINDOW_TYPE_HINT_POPUP_MENU +- : GDK_WINDOW_TYPE_HINT_UTILITY; ++ gtkTypeHint = GDK_WINDOW_TYPE_HINT_POPUP_MENU; + break; + case ePopupTypeTooltip: + gtkTypeHint = GDK_WINDOW_TYPE_HINT_TOOLTIP; diff --git a/mozilla-256180.patch b/mozilla-256180.patch deleted file mode 100644 index 9392b4a..0000000 --- a/mozilla-256180.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-65.0/layout/generic/nsIFrame.h.256180 firefox-65.0/layout/generic/nsIFrame.h ---- firefox-65.0/layout/generic/nsIFrame.h.256180 2019-01-28 14:42:58.245798815 +0100 -+++ firefox-65.0/layout/generic/nsIFrame.h 2019-01-28 14:44:24.844449119 +0100 -@@ -13,7 +13,7 @@ - #error This header/class should only be used within Mozilla code. It should not be used by extensions. - #endif - --#define MAX_REFLOW_DEPTH 200 -+#define MAX_REFLOW_DEPTH 1000 - - /* nsIFrame is in the process of being deCOMtaminated, i.e., this file is - eventually going to be eliminated, and all callers will use nsFrame instead. diff --git a/sources b/sources index ee7488d..9a966a8 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (cbindgen-vendor.tar.xz) = b6737ca86e6223bb9e25861dae05e18469aecbeaa74d0d24719f531b01c74b9a00d9ba4e7faf6366e98cb7f0bdbeedfc337b739fff60bb3d22faabe9751f7ded -SHA512 (firefox-65.0.2.source.tar.xz) = 880c95f3563c475684be337209b825352de3622caa83322c70b4177010d00c3b0550c7f6156793248433802deab62279eaa2c3b463ece27669c80ba3799ea8b0 -SHA512 (firefox-langpacks-65.0.2-20190301.tar.xz) = 24d4bbbeda42f19159aea3b53d5f70a241ed2026b38be0020f903a222f03a1b8a538bb5461d5acbb824219ae6941bdf4ab5566ec7680349a3ba8e695b83e54ab +SHA512 (firefox-66.0.source.tar.xz) = 8200c887ea9e05a7fac6e964de34b293b20af4e2e3e10bc664adc4204fd54d97b8d560665e1c7a2d93df58b424f8bdd88c927b4bf95351f56124b24f811640dd +SHA512 (firefox-langpacks-66.0-20190312.tar.xz) = 243ae8d15c91fdc80ffa87e4586ac345ef60bb0a8e06afebeed7bc18b02c7302845961afee4c1d8684bcf9fed42f175b641f9b4053653dd000750f430a57d3ff