Updated to 71.0 Build 2

This commit is contained in:
Martin Stransky 2019-11-26 11:08:00 +01:00
parent 1c3ae16403
commit 41edb62c46
10 changed files with 45 additions and 666 deletions

2
.gitignore vendored
View File

@ -371,3 +371,5 @@ firefox-3.6.4.source.tar.bz2
/firefox-70.0.1.source.tar.xz
/firefox-langpacks-70.0.1-20191101.tar.xz
/firefox-71.0b12.source.tar.xz
/firefox-71.0.source.tar.xz
/firefox-langpacks-71.0-20191126.tar.xz

View File

@ -1,370 +0,0 @@
diff --git a/layout/xul/nsMenuPopupFrame.cpp b/layout/xul/nsMenuPopupFrame.cpp
--- a/layout/xul/nsMenuPopupFrame.cpp
+++ b/layout/xul/nsMenuPopupFrame.cpp
@@ -1502,7 +1502,7 @@
nscoord oldAlignmentOffset = mAlignmentOffset;
- bool inWayland = false;
+ static bool inWayland = false;
#ifdef MOZ_WAYLAND
inWayland = !GDK_IS_X11_DISPLAY(gdk_display_get_default());
#endif
@@ -1512,9 +1512,9 @@
// However, if a panel is already constrained or flipped (mIsOffset), then we
// want to continue to calculate this. Also, always do this for content
// shells, so that the popup doesn't extend outside the containing frame.
- if (!inWayland && (mInContentShell || (mFlip != FlipType_None &&
- (!aIsMove || mIsOffset ||
- mPopupType != ePopupTypePanel)))) {
+ if (mInContentShell ||
+ (mFlip != FlipType_None &&
+ (!aIsMove || mIsOffset || mPopupType != ePopupTypePanel))) {
int32_t appPerDev = presContext->AppUnitsPerDevPixel();
LayoutDeviceIntRect anchorRectDevPix =
LayoutDeviceIntRect::FromAppUnitsToNearest(anchorRect, appPerDev);
@@ -1532,60 +1532,66 @@
if (mRect.width > screenRect.width) mRect.width = screenRect.width;
if (mRect.height > screenRect.height) mRect.height = screenRect.height;
- // at this point the anchor (anchorRect) is within the available screen
- // area (screenRect) and the popup is known to be no larger than the screen.
+ // We can't get the subsequent change of the popup position under
+ // waylande where gdk_window_move_to_rect is used to place them
+ // because we don't know the absolute position of the window on the screen.
+ if (!inWayland) {
+ // at this point the anchor (anchorRect) is within the available screen
+ // area (screenRect) and the popup is known to be no larger than the
+ // screen.
- // We might want to "slide" an arrow if the panel is of the correct type -
- // but we can only slide on one axis - the other axis must be "flipped or
- // resized" as normal.
- bool slideHorizontal = false, slideVertical = false;
- if (mFlip == FlipType_Slide) {
- int8_t position = GetAlignmentPosition();
- slideHorizontal = position >= POPUPPOSITION_BEFORESTART &&
- position <= POPUPPOSITION_AFTEREND;
- slideVertical = position >= POPUPPOSITION_STARTBEFORE &&
- position <= POPUPPOSITION_ENDAFTER;
- }
+ // We might want to "slide" an arrow if the panel is of the correct type -
+ // but we can only slide on one axis - the other axis must be "flipped or
+ // resized" as normal.
+ bool slideHorizontal = false, slideVertical = false;
+ if (mFlip == FlipType_Slide) {
+ int8_t position = GetAlignmentPosition();
+ slideHorizontal = position >= POPUPPOSITION_BEFORESTART &&
+ position <= POPUPPOSITION_AFTEREND;
+ slideVertical = position >= POPUPPOSITION_STARTBEFORE &&
+ position <= POPUPPOSITION_ENDAFTER;
+ }
- // Next, check if there is enough space to show the popup at full size when
- // positioned at screenPoint. If not, flip the popups to the opposite side
- // of their anchor point, or resize them as necessary.
- bool endAligned = IsDirectionRTL()
- ? mPopupAlignment == POPUPALIGNMENT_TOPLEFT ||
- mPopupAlignment == POPUPALIGNMENT_BOTTOMLEFT
- : mPopupAlignment == POPUPALIGNMENT_TOPRIGHT ||
- mPopupAlignment == POPUPALIGNMENT_BOTTOMRIGHT;
- nscoord preOffsetScreenPoint = screenPoint.x;
- if (slideHorizontal) {
- mRect.width = SlideOrResize(screenPoint.x, mRect.width, screenRect.x,
- screenRect.XMost(), &mAlignmentOffset);
- } else {
- mRect.width = FlipOrResize(
- screenPoint.x, mRect.width, screenRect.x, screenRect.XMost(),
- anchorRect.x, anchorRect.XMost(), margin.left, margin.right,
- offsetForContextMenu.x, hFlip, endAligned, &mHFlip);
- }
- mIsOffset = preOffsetScreenPoint != screenPoint.x;
+ // Next, check if there is enough space to show the popup at full size
+ // when positioned at screenPoint. If not, flip the popups to the opposite
+ // side of their anchor point, or resize them as necessary.
+ bool endAligned = IsDirectionRTL()
+ ? mPopupAlignment == POPUPALIGNMENT_TOPLEFT ||
+ mPopupAlignment == POPUPALIGNMENT_BOTTOMLEFT
+ : mPopupAlignment == POPUPALIGNMENT_TOPRIGHT ||
+ mPopupAlignment == POPUPALIGNMENT_BOTTOMRIGHT;
+ nscoord preOffsetScreenPoint = screenPoint.x;
+ if (slideHorizontal) {
+ mRect.width = SlideOrResize(screenPoint.x, mRect.width, screenRect.x,
+ screenRect.XMost(), &mAlignmentOffset);
+ } else {
+ mRect.width = FlipOrResize(
+ screenPoint.x, mRect.width, screenRect.x, screenRect.XMost(),
+ anchorRect.x, anchorRect.XMost(), margin.left, margin.right,
+ offsetForContextMenu.x, hFlip, endAligned, &mHFlip);
+ }
+ mIsOffset = preOffsetScreenPoint != screenPoint.x;
- endAligned = mPopupAlignment == POPUPALIGNMENT_BOTTOMLEFT ||
- mPopupAlignment == POPUPALIGNMENT_BOTTOMRIGHT;
- preOffsetScreenPoint = screenPoint.y;
- if (slideVertical) {
- mRect.height = SlideOrResize(screenPoint.y, mRect.height, screenRect.y,
- screenRect.YMost(), &mAlignmentOffset);
- } else {
- mRect.height = FlipOrResize(
- screenPoint.y, mRect.height, screenRect.y, screenRect.YMost(),
- anchorRect.y, anchorRect.YMost(), margin.top, margin.bottom,
- offsetForContextMenu.y, vFlip, endAligned, &mVFlip);
+ endAligned = mPopupAlignment == POPUPALIGNMENT_BOTTOMLEFT ||
+ mPopupAlignment == POPUPALIGNMENT_BOTTOMRIGHT;
+ preOffsetScreenPoint = screenPoint.y;
+ if (slideVertical) {
+ mRect.height = SlideOrResize(screenPoint.y, mRect.height, screenRect.y,
+ screenRect.YMost(), &mAlignmentOffset);
+ } else {
+ mRect.height = FlipOrResize(
+ screenPoint.y, mRect.height, screenRect.y, screenRect.YMost(),
+ anchorRect.y, anchorRect.YMost(), margin.top, margin.bottom,
+ offsetForContextMenu.y, vFlip, endAligned, &mVFlip);
+ }
+ mIsOffset = mIsOffset || (preOffsetScreenPoint != screenPoint.y);
+
+ NS_ASSERTION(screenPoint.x >= screenRect.x &&
+ screenPoint.y >= screenRect.y &&
+ screenPoint.x + mRect.width <= screenRect.XMost() &&
+ screenPoint.y + mRect.height <= screenRect.YMost(),
+ "Popup is offscreen");
}
- mIsOffset = mIsOffset || (preOffsetScreenPoint != screenPoint.y);
-
- NS_ASSERTION(screenPoint.x >= screenRect.x &&
- screenPoint.y >= screenRect.y &&
- screenPoint.x + mRect.width <= screenRect.XMost() &&
- screenPoint.y + mRect.height <= screenRect.YMost(),
- "Popup is offscreen");
}
// snap the popup's position in screen coordinates to device pixels,
@@ -1687,6 +1693,14 @@
screen->GetAvailRect(&screenRectPixels.x, &screenRectPixels.y,
&screenRectPixels.width, &screenRectPixels.height);
}
+#ifdef MOZ_WAYLAND
+ else {
+ if (GetWidget() &&
+ GetWidget()->GetScreenRect(&screenRectPixels) != NS_OK) {
+ NS_WARNING("Cannot get screen rect from widget!");
+ }
+ }
+#endif
}
if (mInContentShell) {
diff --git a/widget/ScreenManager.cpp b/widget/ScreenManager.cpp
--- a/widget/ScreenManager.cpp
+++ b/widget/ScreenManager.cpp
@@ -11,6 +11,11 @@
#include "mozilla/dom/DOMTypes.h"
#include "mozilla/Logging.h"
#include "mozilla/StaticPtr.h"
+#ifdef MOZ_WAYLAND
+# include <gdk/gdk.h>
+# include <gdk/gdkx.h>
+# include <gdk/gdkwayland.h>
+#endif /* MOZ_WAYLAND */
static mozilla::LazyLogModule sScreenLog("WidgetScreen");
@@ -104,6 +109,15 @@
NS_IMETHODIMP
ScreenManager::ScreenForRect(int32_t aX, int32_t aY, int32_t aWidth,
int32_t aHeight, nsIScreen** aOutScreen) {
+#ifdef MOZ_WAYLAND
+ static bool inWayland = !GDK_IS_X11_DISPLAY(gdk_display_get_default());
+
+ if (inWayland) {
+ *aOutScreen = nullptr;
+ return NS_OK;
+ }
+#endif
+
if (mScreenList.IsEmpty()) {
MOZ_LOG(sScreenLog, LogLevel::Warning,
("No screen available. This can happen in xpcshell."));
diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h
--- a/widget/gtk/nsWindow.h
+++ b/widget/gtk/nsWindow.h
@@ -398,6 +398,9 @@
static bool HideTitlebarByDefault();
static bool GetTopLevelWindowActiveState(nsIFrame* aFrame);
static bool TitlebarCanUseShapeMask();
+#ifdef MOZ_WAYLAND
+ virtual nsresult GetScreenRect(LayoutDeviceIntRect* aRect) override;
+#endif
protected:
virtual ~nsWindow();
@@ -630,6 +633,7 @@
void HideWaylandTooltips();
void HideWaylandPopupAndAllChildren();
void CleanupWaylandPopups();
+ GtkWindow* GetCurrentTopmostWindow();
/**
* |mIMContext| takes all IME related stuff.
diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -1294,10 +1294,14 @@
GdkWindow* window, const GdkRectangle* flipped_rect,
const GdkRectangle* final_rect, gboolean flipped_x, gboolean flipped_y,
void* aWindow) {
- LOG(("%s [%p] flipped %d %d\n", __FUNCTION__, aWindow, flipped_rect->x,
- flipped_rect->y));
- LOG(("%s [%p] final %d %d\n", __FUNCTION__, aWindow, final_rect->x,
- final_rect->y));
+ LOG(("%s [%p] flipped_x %d flipped_y %d\n", __FUNCTION__, aWindow, flipped_x,
+ flipped_y));
+
+ LOG(("%s [%p] flipped %d %d w:%d h:%d\n", __FUNCTION__, aWindow,
+ flipped_rect->x, flipped_rect->y, flipped_rect->width,
+ flipped_rect->height));
+ LOG(("%s [%p] final %d %d w:%d h:%d\n", __FUNCTION__, aWindow, final_rect->x,
+ final_rect->y, final_rect->width, final_rect->height));
}
#endif
@@ -1384,6 +1388,16 @@
HideWaylandWindow();
}
+ LOG(
+ ("nsWindow::NativeMoveResizeWaylandPopup [%p]: requested rect: x%d y%d "
+ "w%d h%d\n",
+ this, rect.x, rect.y, rect.width, rect.height));
+ if (aSize) {
+ LOG((" aSize: x%d y%d w%d h%d\n", aSize->x, aSize->y, aSize->width,
+ aSize->height));
+ } else {
+ LOG((" No aSize given"));
+ }
sGdkWindowMoveToRect(gdkWindow, &rect, rectAnchor, menuAnchor, hints, 0, 0);
if (isWidgetVisible) {
@@ -1399,7 +1413,8 @@
LOG(("nsWindow::NativeMove [%p] %d %d\n", (void*)this, point.x, point.y));
if (IsWaylandPopup()) {
- NativeMoveResizeWaylandPopup(&point, nullptr);
+ GdkRectangle size = DevicePixelsToGdkSizeRoundUp(mBounds.Size());
+ NativeMoveResizeWaylandPopup(&point, &size);
} else if (mIsTopLevel) {
gtk_window_move(GTK_WINDOW(mShell), point.x, point.y);
} else if (mGdkWindow) {
@@ -6724,6 +6739,16 @@
}
}
+GtkWindow* nsWindow::GetCurrentTopmostWindow() {
+ GtkWindow* parentWindow = GTK_WINDOW(GetGtkWidget());
+ GtkWindow* topmostParentWindow;
+ while (parentWindow) {
+ topmostParentWindow = parentWindow;
+ parentWindow = gtk_window_get_transient_for(parentWindow);
+ }
+ return topmostParentWindow;
+}
+
gint nsWindow::GdkScaleFactor() {
GdkWindow* scaledGdkWindow = mGdkWindow;
if (!mIsX11Display) {
@@ -6732,12 +6757,7 @@
// not updated during it's hidden.
if (mWindowType == eWindowType_popup || mWindowType == eWindowType_dialog) {
// Get toplevel window for scale factor:
- GtkWindow* parentWindow = GTK_WINDOW(GetGtkWidget());
- GtkWindow* topmostParentWindow;
- while (parentWindow) {
- topmostParentWindow = parentWindow;
- parentWindow = gtk_window_get_transient_for(parentWindow);
- }
+ GtkWindow* topmostParentWindow = GetCurrentTopmostWindow();
if (topmostParentWindow) {
scaledGdkWindow =
gtk_widget_get_window(GTK_WIDGET(topmostParentWindow));
@@ -7268,6 +7288,41 @@
return window.forget();
}
+#ifdef MOZ_WAYLAND
+nsresult nsWindow::GetScreenRect(LayoutDeviceIntRect* aRect) {
+ typedef struct _GdkMonitor GdkMonitor;
+ static auto s_gdk_display_get_monitor_at_window =
+ (GdkMonitor * (*)(GdkDisplay*, GdkWindow*))
+ dlsym(RTLD_DEFAULT, "gdk_display_get_monitor_at_window");
+
+ static auto s_gdk_monitor_get_workarea =
+ (void (*)(GdkMonitor*, GdkRectangle*))dlsym(RTLD_DEFAULT,
+ "gdk_monitor_get_workarea");
+
+ if (!s_gdk_display_get_monitor_at_window || !s_gdk_monitor_get_workarea) {
+ return NS_ERROR_NOT_IMPLEMENTED;
+ }
+
+ GtkWindow* topmostParentWindow = GetCurrentTopmostWindow();
+ GdkWindow* gdkWindow = gtk_widget_get_window(GTK_WIDGET(topmostParentWindow));
+
+ GdkMonitor* monitor =
+ s_gdk_display_get_monitor_at_window(gdk_display_get_default(), gdkWindow);
+ if (monitor) {
+ GdkRectangle workArea;
+ s_gdk_monitor_get_workarea(monitor, &workArea);
+ aRect->x = workArea.x;
+ aRect->y = workArea.y;
+ aRect->width = workArea.width;
+ aRect->height = workArea.height;
+ LOG((" workarea for [%p], monitor %p: x%d y%d w%d h%d\n", this, monitor,
+ workArea.x, workArea.y, workArea.width, workArea.height));
+ return NS_OK;
+ }
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+#endif
+
bool nsWindow::GetTopLevelWindowActiveState(nsIFrame* aFrame) {
// Used by window frame and button box rendering. We can end up in here in
// the content process when rendering one of these moz styles freely in a
diff --git a/widget/moz.build b/widget/moz.build
--- a/widget/moz.build
+++ b/widget/moz.build
@@ -210,7 +210,6 @@
'PuppetBidiKeyboard.cpp',
'PuppetWidget.cpp',
'Screen.cpp',
- 'ScreenManager.cpp',
'SharedWidgetUtils.cpp',
'TextEventDispatcher.cpp',
'VsyncDispatcher.cpp',
@@ -242,6 +241,7 @@
SOURCES += [
'nsBaseDragService.cpp',
'nsBaseWidget.cpp',
+ 'ScreenManager.cpp',
]
if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']:
diff --git a/widget/nsIWidget.h b/widget/nsIWidget.h
--- a/widget/nsIWidget.h
+++ b/widget/nsIWidget.h
@@ -1713,6 +1713,15 @@
return NS_ERROR_NOT_IMPLEMENTED;
}
+ // Get rectangle of the screen where the window is placed.
+ // It's used to detect popup overflow under Wayland because
+ // Screenmanager does not work under it.
+#ifdef MOZ_WAYLAND
+ virtual nsresult GetScreenRect(LayoutDeviceIntRect* aRect) {
+ return NS_ERROR_NOT_IMPLEMENTED;
+ }
+#endif
+
private:
class LongTapInfo {
public:

View File

@ -94,14 +94,12 @@ ExcludeArch: ppc64le
Summary: Mozilla Firefox Web browser
Name: firefox
Version: 71.0
Release: 0.1%{?pre_tag}%{?dist}
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
Source0: firefox-71.0b12.source.tar.xz
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}-20191101.tar.xz
Source1: firefox-langpacks-70.0.1-20191101.tar.xz
Source1: firefox-langpacks-%{version}%{?pre_version}-20191126.tar.xz
%endif
Source2: cbindgen-vendor.tar.xz
Source10: firefox-mozconfig
@ -152,17 +150,13 @@ Patch412: mozilla-1337988.patch
Patch415: Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch
Patch417: bug1375074-save-restore-x28.patch
Patch419: mozilla-1568569.patch
#Patch421: mozilla-1579023.patch - 71
Patch422: mozilla-1580174-webrtc-popup.patch
Patch423: D49289-wayland-monitor-size.diff
Patch424: D53011-remote-content-disappear-fix.diff
Patch425: D53965-dropdown-missing-on-multimonitor.diff
# Wayland specific upstream patches
Patch574: firefox-pipewire.patch
#Patch575: mozilla-1548475.patch - 71
Patch590: firefox-wayland-cache-missing.patch
#Patch591: mozilla-1587008.patch
# PGO/LTO patches
Patch600: pgo.patch
@ -352,21 +346,19 @@ This package contains results of tests executed during build.
%patch215 -p1 -b .addons
%patch219 -p1 -b .rhbz-1173156
%patch221 -p1 -b .fedora-ua
#%patch224 -p1 -b .1170092
%patch224 -p1 -b .1170092
#ARM run-time patch
%ifarch aarch64
%patch226 -p1 -b .1354671
%endif
%patch227 -p1 -b .locale-debug
%patch228 -p1 -b .mozilla-1583466
%patch402 -p1 -b .1196777
%ifarch %{arm}
%patch415 -p1 -b .1238661
%endif
#%patch419 -p1 -b .1568569
#%patch421 -p1 -b .1579023 - 71
#%patch423 -p1 -b .D49289
%patch419 -p1 -b .1568569
# overflow widgets broken
%patch424 -p1 -b .D53011
# dropdown missing on multimonitor
@ -374,13 +366,11 @@ This package contains results of tests executed during build.
# Wayland specific upstream patches
%patch574 -p1 -b .firefox-pipewire
#%patch575 -p1 -b .mozilla-1548475 - 71
%patch590 -p1 -b .cache-missing
#%patch591 -p1 -b .mozilla-1587008
# PGO patches
%patch600 -p1 -b .pgo
#%patch601 -p1 -b .1516081
%patch601 -p1 -b .1516081
%patch602 -p1 -b .1516803
%{__rm} -f .mozconfig
@ -959,6 +949,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
#---------------------------------------------------------------------
%changelog
* Tue Nov 26 2019 Martin Stransky <stransky@redhat.com> - 71.0-1
- Updated to 71.0 Build 2
* Tue Nov 19 2019 Jan Horak <jhorak@redhat.com> - 70.0.1-5
- Added fixes for missing popup and overflow widget glitches

View File

@ -1,6 +1,6 @@
diff -up firefox-67.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 firefox-67.0/extensions/pref/autoconfig/src/nsReadConfig.cpp
--- firefox-67.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 2019-05-14 01:08:09.000000000 +0200
+++ firefox-67.0/extensions/pref/autoconfig/src/nsReadConfig.cpp 2019-05-15 15:10:23.860653275 +0200
diff -up firefox-71.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 firefox-71.0/extensions/pref/autoconfig/src/nsReadConfig.cpp
--- firefox-71.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 2019-11-26 01:02:21.000000000 +0100
+++ firefox-71.0/extensions/pref/autoconfig/src/nsReadConfig.cpp 2019-11-26 10:47:04.316154398 +0100
@@ -246,8 +246,20 @@ nsresult nsReadConfig::openAndEvaluateJS
if (NS_FAILED(rv)) return rv;
@ -23,10 +23,10 @@ diff -up firefox-67.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 fi
} else {
nsAutoCString location("resource://gre/defaults/autoconfig/");
location += aFileName;
diff -up firefox-67.0/modules/libpref/Preferences.cpp.1170092 firefox-67.0/modules/libpref/Preferences.cpp
--- firefox-67.0/modules/libpref/Preferences.cpp.1170092 2019-05-15 15:10:23.860653275 +0200
+++ firefox-67.0/modules/libpref/Preferences.cpp 2019-05-15 15:11:58.160110320 +0200
@@ -4417,6 +4417,9 @@ float MOZ_MAYBE_UNUSED GetPref<float>(co
diff -up firefox-71.0/modules/libpref/Preferences.cpp.1170092 firefox-71.0/modules/libpref/Preferences.cpp
--- firefox-71.0/modules/libpref/Preferences.cpp.1170092 2019-11-26 01:02:25.000000000 +0100
+++ firefox-71.0/modules/libpref/Preferences.cpp 2019-11-26 10:47:04.316154398 +0100
@@ -4472,6 +4472,9 @@ nsresult Preferences::InitInitialObjects
//
// Thus, in the omni.jar case, we always load app-specific default
// preferences from omni.jar, whether or not `$app == $gre`.
@ -36,10 +36,10 @@ diff -up firefox-67.0/modules/libpref/Preferences.cpp.1170092 firefox-67.0/modul
nsresult rv = NS_ERROR_FAILURE;
nsZipFind* findPtr;
diff -up firefox-67.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-67.0/toolkit/xre/nsXREDirProvider.cpp
--- firefox-67.0/toolkit/xre/nsXREDirProvider.cpp.1170092 2019-05-14 01:08:35.000000000 +0200
+++ firefox-67.0/toolkit/xre/nsXREDirProvider.cpp 2019-05-15 15:10:23.861653269 +0200
@@ -60,6 +60,7 @@
diff -up firefox-71.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-71.0/toolkit/xre/nsXREDirProvider.cpp
--- firefox-71.0/toolkit/xre/nsXREDirProvider.cpp.1170092 2019-11-26 01:02:29.000000000 +0100
+++ firefox-71.0/toolkit/xre/nsXREDirProvider.cpp 2019-11-26 10:49:40.076095714 +0100
@@ -61,6 +61,7 @@
#endif
#ifdef XP_UNIX
# include <ctype.h>
@ -47,7 +47,7 @@ diff -up firefox-67.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-67.0/tool
#endif
#ifdef XP_IOS
# include "UIKitDirProvider.h"
@@ -524,6 +525,21 @@ nsXREDirProvider::GetFile(const char* aP
@@ -526,6 +527,21 @@ nsXREDirProvider::GetFile(const char* aP
}
}
}
@ -69,9 +69,9 @@ diff -up firefox-67.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-67.0/tool
if (NS_FAILED(rv) || !file) return NS_ERROR_FAILURE;
if (ensureFilePermissions) {
@@ -880,6 +896,16 @@ nsresult nsXREDirProvider::GetFilesInter
@@ -842,6 +858,16 @@ nsresult nsXREDirProvider::GetFilesInter
LoadDirIntoArray(mXULAppDir, kAppendPrefDir, directories);
LoadDirsIntoArray(mAppBundleDirectories, kAppendPrefDir, directories);
+ // Add /etc/<application>/pref/ directory if it exists
+ nsCOMPtr<nsIFile> systemPrefDir;
@ -86,10 +86,10 @@ diff -up firefox-67.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-67.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-67.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 firefox-67.0/xpcom/io/nsAppDirectoryServiceDefs.h
--- firefox-67.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 2019-05-14 01:08:28.000000000 +0200
+++ firefox-67.0/xpcom/io/nsAppDirectoryServiceDefs.h 2019-05-15 15:10:24.044652216 +0200
@@ -62,6 +62,7 @@
diff -up firefox-71.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 firefox-71.0/xpcom/io/nsAppDirectoryServiceDefs.h
--- firefox-71.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 2019-11-26 01:02:30.000000000 +0100
+++ firefox-71.0/xpcom/io/nsAppDirectoryServiceDefs.h 2019-11-26 10:47:04.317154398 +0100
@@ -60,6 +60,7 @@
#define NS_APP_PREFS_DEFAULTS_DIR_LIST "PrefDL"
#define NS_APP_PREFS_OVERRIDE_DIR \
"PrefDOverride" // Directory for per-profile defaults

View File

@ -1,8 +1,8 @@
diff -up firefox-70.0/build/moz.configure/lto-pgo.configure.old firefox-70.0/build/moz.configure/lto-pgo.configure
--- firefox-70.0/build/moz.configure/lto-pgo.configure.old 2019-10-18 20:33:54.240107068 +0200
+++ firefox-70.0/build/moz.configure/lto-pgo.configure 2019-10-18 20:34:44.202009678 +0200
@@ -16,7 +16,7 @@ def pgo_flags(compiler, build_env, targe
diff -up firefox-71.0/build/moz.configure/lto-pgo.configure.1516081 firefox-71.0/build/moz.configure/lto-pgo.configure
--- firefox-71.0/build/moz.configure/lto-pgo.configure.1516081 2019-11-26 01:02:19.000000000 +0100
+++ firefox-71.0/build/moz.configure/lto-pgo.configure 2019-11-26 11:04:10.993077232 +0100
@@ -71,7 +71,7 @@ set_config('PGO_PROFILE_PATH', pgo_profi
def pgo_flags(compiler, target, profdata):
if compiler.type == 'gcc':
return namespace(
- gen_cflags=['-fprofile-generate'],
@ -10,7 +10,7 @@ diff -up firefox-70.0/build/moz.configure/lto-pgo.configure.old firefox-70.0/bui
gen_ldflags=['-fprofile-generate'],
use_cflags=['-fprofile-use', '-fprofile-correction',
'-Wcoverage-mismatch'],
@@ -38,7 +38,7 @@ def pgo_flags(compiler, build_env, targe
@@ -92,7 +92,7 @@ def pgo_flags(compiler, target, profdata
gen_ldflags = ['-fprofile-generate']
return namespace(

View File

@ -1,34 +0,0 @@
diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp
--- a/dom/plugins/base/nsPluginHost.cpp
+++ b/dom/plugins/base/nsPluginHost.cpp
@@ -105,6 +105,10 @@
# include "windows.h"
# include "winbase.h"
#endif
+#if (MOZ_WIDGET_GTK)
+# include <gdk/gdk.h>
+# include <gdk/gdkx.h>
+#endif
#include "npapi.h"
@@ -358,9 +362,15 @@
mOverrideInternalTypes =
Preferences::GetBool("plugin.override_internal_types", false);
- mPluginsDisabled = Preferences::GetBool("plugin.disable", false);
-
- Preferences::AddStrongObserver(this, "plugin.disable");
+ bool waylandBackend = false;
+#if MOZ_WIDGET_GTK
+ waylandBackend = !GDK_IS_X11_DISPLAY(gdk_display_get_default());
+#endif
+ mPluginsDisabled =
+ Preferences::GetBool("plugin.disable", false) || waylandBackend;
+ if (!waylandBackend) {
+ Preferences::AddStrongObserver(this, "plugin.disable");
+ }
nsCOMPtr<nsIObserverService> obsService =
mozilla::services::GetObserverService();

View File

@ -1,7 +1,7 @@
diff -up firefox-69.0/widget/gtk/nsWindow.cpp.1568569 firefox-69.0/widget/gtk/nsWindow.cpp
--- firefox-69.0/widget/gtk/nsWindow.cpp.1568569 2019-08-29 09:42:10.484631750 +0200
+++ firefox-69.0/widget/gtk/nsWindow.cpp 2019-08-29 09:49:35.371121273 +0200
@@ -3252,6 +3252,8 @@ void nsWindow::OnWindowStateEvent(GtkWid
diff -up firefox-71.0/widget/gtk/nsWindow.cpp.1568569 firefox-71.0/widget/gtk/nsWindow.cpp
--- firefox-71.0/widget/gtk/nsWindow.cpp.1568569 2019-11-26 10:51:08.303063138 +0100
+++ firefox-71.0/widget/gtk/nsWindow.cpp 2019-11-26 10:54:28.428994823 +0100
@@ -3348,6 +3348,8 @@ void nsWindow::OnWindowStateEvent(GtkWid
return;
}
@ -10,8 +10,8 @@ diff -up firefox-69.0/widget/gtk/nsWindow.cpp.1568569 firefox-69.0/widget/gtk/ns
if (aEvent->new_window_state & GDK_WINDOW_STATE_ICONIFIED) {
LOG(("\tIconified\n"));
mSizeState = nsSizeMode_Minimized;
@@ -3275,6 +3277,18 @@ void nsWindow::OnWindowStateEvent(GtkWid
#endif // ACCESSIBILITY
@@ -3379,6 +3381,18 @@ void nsWindow::OnWindowStateEvent(GtkWid
mIsTiled = false;
}
+ // Fullscreen video playback may generate bogus alpha values which blends
@ -29,7 +29,7 @@ diff -up firefox-69.0/widget/gtk/nsWindow.cpp.1568569 firefox-69.0/widget/gtk/ns
if (mWidgetListener) {
mWidgetListener->SizeModeChanged(mSizeState);
if (aEvent->changed_mask & GDK_WINDOW_STATE_FULLSCREEN) {
@@ -3800,6 +3814,11 @@ nsresult nsWindow::Create(nsIWidget* aPa
@@ -3930,6 +3944,11 @@ nsresult nsWindow::Create(nsIWidget* aPa
gtk_widget_add_events(eventWidget, kEvents);
if (drawToContainer) {
gtk_widget_add_events(mShell, GDK_PROPERTY_CHANGE_MASK);

View File

@ -1,23 +0,0 @@
diff --git a/security/manager/ssl/nsNSSComponent.cpp b/security/manager/ssl/nsNSSComponent.cpp
--- a/security/manager/ssl/nsNSSComponent.cpp
+++ b/security/manager/ssl/nsNSSComponent.cpp
@@ -683,10 +683,17 @@
AutoSECMODListReadLock secmodLock;
SECMODModuleList* list = SECMOD_GetDefaultModuleList();
while (list) {
- if (SECMOD_HasRemovableSlots(list->module)) {
+ SECMODModule* module = list->module;
+ if (SECMOD_HasRemovableSlots(module)) {
*result = true;
return NS_OK;
}
+ for (int i = 0; i < module->slotCount; i++) {
+ if (!PK11_IsFriendly(module->slots[i])) {
+ *result = true;
+ return NS_OK;
+ }
+ }
list = list->next;
}
#endif

View File

@ -1,189 +0,0 @@
changeset: 498019:9961a0e4d424
tag: tip
parent: 498006:3fa65bda1e50
user: Martin Stransky <stransky@redhat.com>
date: Tue Oct 08 13:32:37 2019 +0200
files: widget/gtk/mozcontainer.cpp
description:
Bug 1587008 - [Wayland/GL] Fixed visual glitches with gl compositor during window resize, r=jhorak
Recently we update egl_window size only in moz_container_size_allocate() which is leads
to visible visual glitches as moz_container_size_allocate() is not called during window resize but
after it.
We need to update egl_window size faster which is done in configure-event callback.
Differential Revision: https://phabricator.services.mozilla.com/D48526
diff --git a/widget/gtk/mozcontainer.cpp b/widget/gtk/mozcontainer.cpp
--- a/widget/gtk/mozcontainer.cpp
+++ b/widget/gtk/mozcontainer.cpp
@@ -136,16 +136,60 @@ void moz_container_put(MozContainer* con
container->children = g_list_append(container->children, child);
/* we assume that the caller of this function will have already set
the parent GdkWindow because we can have many anonymous children. */
gtk_widget_set_parent(child_widget, GTK_WIDGET(container));
}
/* static methods */
+#if defined(MOZ_WAYLAND)
+static gint moz_container_get_scale(MozContainer* container) {
+ static auto sGdkWindowGetScaleFactorPtr =
+ (gint(*)(GdkWindow*))dlsym(RTLD_DEFAULT, "gdk_window_get_scale_factor");
+
+ if (sGdkWindowGetScaleFactorPtr) {
+ GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(container));
+ return (*sGdkWindowGetScaleFactorPtr)(window);
+ }
+
+ return 1;
+}
+
+static void moz_container_resize(MozContainer* container, int width,
+ int height) {
+ // Set correct scaled/unscaled mozcontainer offset
+ // especially when wl_egl is used but we don't recreate it as Gtk+ does.
+ if (container->subsurface) {
+ gint x, y;
+ gdk_window_get_position(gtk_widget_get_window(GTK_WIDGET(container)), &x,
+ &y);
+ wl_subsurface_set_position(container->subsurface, x, y);
+ }
+
+ // Try to only resize wl_egl_window on scale factor change.
+ // It's a bit risky as Gtk+ recreates it at that event.
+ if (container->eglwindow) {
+ gint scale = moz_container_get_scale(container);
+ if (container->surface) {
+ wl_surface_set_buffer_scale(container->surface, scale);
+ }
+ wl_egl_window_resize(container->eglwindow, width * scale, height * scale, 0,
+ 0);
+ }
+}
+
+static gboolean moz_container_configure_event_cb(GtkWidget* widget,
+ GdkEventConfigure* event) {
+ LOG(("moz_container_egl_window_configure_event_cb [%p] %d %d %d %d\n",
+ (void*)widget, event->x, event->y, event->width, event->height));
+ moz_container_resize(MOZ_CONTAINER(widget), event->width, event->height);
+ return FALSE;
+}
+#endif
void moz_container_class_init(MozContainerClass* klass) {
/*GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass); */
GtkContainerClass* container_class = GTK_CONTAINER_CLASS(klass);
GtkWidgetClass* widget_class = GTK_WIDGET_CLASS(klass);
widget_class->map = moz_container_map;
@@ -173,16 +217,21 @@ void moz_container_init(MozContainer* co
container->subsurface = nullptr;
container->eglwindow = nullptr;
container->frame_callback_handler = nullptr;
container->frame_callback_handler_surface_id = -1;
// We can draw to x11 window any time.
container->ready_to_draw = GDK_IS_X11_DISPLAY(gdk_display_get_default());
container->surface_needs_clear = true;
container->inital_draw_cb = nullptr;
+
+ // We need faster resize response in mozcontainer to avoid visual glitches
+ // during window resize.
+ g_signal_connect(container, "configure_event",
+ G_CALLBACK(moz_container_configure_event_cb), nullptr);
#endif
LOG(("%s [%p]\n", __FUNCTION__, (void*)container));
}
#if defined(MOZ_WAYLAND)
void moz_container_set_initial_draw_callback(
MozContainer* container, std::function<void(void)> inital_draw_cb) {
@@ -285,53 +334,26 @@ static void moz_container_unmap_wayland(
container->frame_callback_handler_surface_id = -1;
container->surface_needs_clear = true;
container->ready_to_draw = false;
LOGWAYLAND(("%s [%p]\n", __FUNCTION__, (void*)container));
}
-static gint moz_container_get_scale(MozContainer* container) {
- static auto sGdkWindowGetScaleFactorPtr =
- (gint(*)(GdkWindow*))dlsym(RTLD_DEFAULT, "gdk_window_get_scale_factor");
-
- if (sGdkWindowGetScaleFactorPtr) {
- GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(container));
- return (*sGdkWindowGetScaleFactorPtr)(window);
- }
-
- return 1;
-}
-
void moz_container_scale_changed(MozContainer* container,
GtkAllocation* aAllocation) {
LOGWAYLAND(("%s [%p] surface %p eglwindow %p\n", __FUNCTION__,
(void*)container, (void*)container->surface,
(void*)container->eglwindow));
if (!container->surface) {
return;
}
-
- // Set correct scaled/unscaled mozcontainer offset
- // especially when wl_egl is used but we don't recreate it as Gtk+ does.
- gint x, y;
- gdk_window_get_position(gtk_widget_get_window(GTK_WIDGET(container)), &x, &y);
- wl_subsurface_set_position(container->subsurface, x, y);
-
- // Try to only resize wl_egl_window on scale factor change.
- // It's a bit risky as Gtk+ recreates it at that event.
- if (container->eglwindow) {
- gint scale = moz_container_get_scale(container);
- wl_surface_set_buffer_scale(container->surface,
- moz_container_get_scale(container));
- wl_egl_window_resize(container->eglwindow, aAllocation->width * scale,
- aAllocation->height * scale, 0, 0);
- }
+ moz_container_resize(container, aAllocation->width, aAllocation->height);
}
#endif
void moz_container_map(GtkWidget* widget) {
MozContainer* container;
GList* tmp_list;
GtkWidget* tmp_child;
@@ -451,26 +473,18 @@ void moz_container_size_allocate(GtkWidg
allocation->y, allocation->width,
allocation->height);
}
#if defined(MOZ_WAYLAND)
// We need to position our subsurface according to GdkWindow
// when offset changes (GdkWindow is maximized for instance).
// see gtk-clutter-embed.c for reference.
- if (container->subsurface) {
- gint x, y;
- gdk_window_get_position(gtk_widget_get_window(widget), &x, &y);
- wl_subsurface_set_position(container->subsurface, x, y);
- }
- if (container->eglwindow) {
- gint scale = moz_container_get_scale(container);
- wl_egl_window_resize(container->eglwindow, allocation->width * scale,
- allocation->height * scale, 0, 0);
- }
+ moz_container_resize(MOZ_CONTAINER(widget), allocation->width,
+ allocation->height);
#endif
}
void moz_container_remove(GtkContainer* container, GtkWidget* child_widget) {
MozContainerChild* child;
MozContainer* moz_container;
GdkWindow* parent_window;

View File

@ -1,3 +1,3 @@
SHA512 (cbindgen-vendor.tar.xz) = 88afa0bc6af525cbb46bc75578b90419b28b95b396d5002fbf299a78a173681b840096ff83ef6e48553d1a5e0aa04e79383ab4d09bf431f3b864fcbacc7de46d
SHA512 (firefox-langpacks-70.0.1-20191101.tar.xz) = 307c9d14980ad66b5cfd1ad6a0bd2f4f60d09d9ea9478876b9537c31ae713b5cbe05410b8c01822084aa669f58d017a15ba4f7c6bcbcb07f144437658da72ff4
SHA512 (firefox-71.0b12.source.tar.xz) = 012c3cdb963ce86931397154982f6bbe1b4207bf4cbd1b6728ae218c9705133ea115a6d2eb4c03e1373c821968b7e8e067b3f9cab67b646bd7c598dead21009b
SHA512 (firefox-71.0.source.tar.xz) = 2559bf4703a79a258c6c257d8a2c6b1bc05bb062c13004dc5d5352020fbdd68448bc1d7a2fae34e51f9a9bda576ae2f3118fd99cdad910dd29ef56739c1b8244
SHA512 (firefox-langpacks-71.0-20191126.tar.xz) = d3f465a988951dcf8b80766934f140b4e8f12c168702d2badea1fdaab36a7d67fcddb2b9d413ce50d28b25ec8fce7b237e308d5f675cd4254766e628f988460c