Merge branch 'master' into f31
This commit is contained in:
commit
6543968420
3
.gitignore
vendored
3
.gitignore
vendored
@ -370,3 +370,6 @@ firefox-3.6.4.source.tar.bz2
|
||||
/firefox-langpacks-70.0-20191018.tar.xz
|
||||
/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
|
||||
|
@ -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:
|
||||
|
98
D53011-remote-content-disappear-fix.diff
Normal file
98
D53011-remote-content-disappear-fix.diff
Normal file
@ -0,0 +1,98 @@
|
||||
diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h
|
||||
--- a/widget/gtk/nsWindow.h
|
||||
+++ b/widget/gtk/nsWindow.h
|
||||
@@ -401,6 +401,8 @@
|
||||
#ifdef MOZ_WAYLAND
|
||||
virtual nsresult GetScreenRect(LayoutDeviceIntRect* aRect) override;
|
||||
#endif
|
||||
+ bool IsRemoteContent() { return HasRemoteContent(); }
|
||||
+ static void HideWaylandOpenedPopups();
|
||||
|
||||
protected:
|
||||
virtual ~nsWindow();
|
||||
diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
|
||||
--- a/widget/gtk/nsWindow.cpp
|
||||
+++ b/widget/gtk/nsWindow.cpp
|
||||
@@ -1165,6 +1165,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
+void nsWindow::HideWaylandOpenedPopups() {
|
||||
+ while (gVisibleWaylandPopupWindows) {
|
||||
+ nsWindow* window =
|
||||
+ static_cast<nsWindow*>(gVisibleWaylandPopupWindows->data);
|
||||
+ window->HideWaylandWindow();
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
// Hide popup nsWindows which are no longer in the nsXULPopupManager widget
|
||||
// chain list.
|
||||
void nsWindow::CleanupWaylandPopups() {
|
||||
@@ -1218,7 +1226,10 @@
|
||||
// popup needs to have an unique parent.
|
||||
GtkWidget* nsWindow::ConfigureWaylandPopupWindows() {
|
||||
MOZ_ASSERT(this->mWindowType == eWindowType_popup);
|
||||
- LOG(("nsWindow::ConfigureWaylandPopupWindows [%p]\n", (void*)this));
|
||||
+ LOG(
|
||||
+ ("nsWindow::ConfigureWaylandPopupWindows [%p], frame %p hasRemoteContent "
|
||||
+ "%d\n",
|
||||
+ (void*)this, this->GetFrame(), this->HasRemoteContent()));
|
||||
#if DEBUG
|
||||
if (this->GetFrame() && this->GetFrame()->GetContent()->GetID()) {
|
||||
nsCString nodeId;
|
||||
@@ -1245,14 +1256,14 @@
|
||||
// gVisibleWaylandPopupWindows which were not yet been hidden.
|
||||
CleanupWaylandPopups();
|
||||
// Since the popups are shown by unknown order it can happen that child
|
||||
- // popup is shown before parent popup. The
|
||||
+ // popup is shown before parent popup.
|
||||
// We look for the current window parent in nsXULPopupManager since it
|
||||
// always has correct popup hierarchy while gVisibleWaylandPopupWindows may
|
||||
// not.
|
||||
nsXULPopupManager* pm = nsXULPopupManager::GetInstance();
|
||||
AutoTArray<nsIWidget*, 5> widgetChain;
|
||||
pm->GetSubmenuWidgetChain(&widgetChain);
|
||||
- for (unsigned long i = 0; i < widgetChain.Length(); i++) {
|
||||
+ for (unsigned long i = 0; i < widgetChain.Length() - 1; i++) {
|
||||
unsigned long parentIndex = i + 1;
|
||||
if (widgetChain.Length() > parentIndex && widgetChain[i] == this) {
|
||||
nsWindow* parentWindow =
|
||||
@@ -1264,6 +1275,29 @@
|
||||
}
|
||||
}
|
||||
} else {
|
||||
+ // Panels usually ends there
|
||||
+ if (gVisibleWaylandPopupWindows && HasRemoteContent()) {
|
||||
+ // If the new panel is remote content, we need to close all other popups
|
||||
+ // before to keep the correct hierarchy because the remote content popup
|
||||
+ // can replace the overflow-widget panel.
|
||||
+ HideWaylandOpenedPopups();
|
||||
+ } else if (gVisibleWaylandPopupWindows) {
|
||||
+ // If there is any remote content panel currently opened, close all
|
||||
+ // opened popups to keep the correct hierarchy.
|
||||
+ GList* popupList = gVisibleWaylandPopupWindows;
|
||||
+ while (popupList) {
|
||||
+ nsWindow* waylandWnd = static_cast<nsWindow*>(popupList->data);
|
||||
+ LOG((" Checking [%p] IsRemoteContent %d\n", popupList->data,
|
||||
+ waylandWnd->IsRemoteContent()));
|
||||
+ if (waylandWnd->IsRemoteContent()) {
|
||||
+ // close all popups including remote content before showing our panel
|
||||
+ // Most likely returning from addon panel to overflow-widget.
|
||||
+ HideWaylandOpenedPopups();
|
||||
+ break;
|
||||
+ }
|
||||
+ popupList = popupList->next;
|
||||
+ }
|
||||
+ }
|
||||
// For popups in panels use the last opened popup window as parent,
|
||||
// panels are not stored in nsXULPopupManager.
|
||||
if (gVisibleWaylandPopupWindows) {
|
||||
@@ -4380,6 +4414,7 @@
|
||||
void nsWindow::HideWaylandWindow() {
|
||||
#ifdef MOZ_WAYLAND
|
||||
if (mWindowType == eWindowType_popup) {
|
||||
+ LOG(("nsWindow::HideWaylandWindow: popup [%p]\n", this));
|
||||
GList* foundWindow = g_list_find(gVisibleWaylandPopupWindows, this);
|
||||
if (foundWindow) {
|
||||
gVisibleWaylandPopupWindows =
|
||||
|
97
D53965-dropdown-missing-on-multimonitor.diff
Normal file
97
D53965-dropdown-missing-on-multimonitor.diff
Normal file
@ -0,0 +1,97 @@
|
||||
diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
|
||||
--- a/widget/gtk/nsWindow.cpp
|
||||
+++ b/widget/gtk/nsWindow.cpp
|
||||
@@ -1295,13 +1295,12 @@
|
||||
GdkWindow* window, const GdkRectangle* flipped_rect,
|
||||
const GdkRectangle* final_rect, gboolean flipped_x, gboolean flipped_y,
|
||||
void* aWindow) {
|
||||
- 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,
|
||||
+ LOG(("NativeMoveResizeWaylandPopupCallback [%p] flipped_x %d flipped_y %d\n",
|
||||
+ aWindow, flipped_x, flipped_y));
|
||||
+
|
||||
+ LOG((" flipped_rect x: %d y: %d width: %d height: %d\n", flipped_rect->x,
|
||||
+ flipped_rect->y, flipped_rect->width, flipped_rect->height));
|
||||
+ LOG((" final_rect x: %d y: %d width: %d height: %d\n", final_rect->x,
|
||||
final_rect->y, final_rect->width, final_rect->height));
|
||||
}
|
||||
#endif
|
||||
@@ -1312,12 +1311,13 @@
|
||||
static auto sGdkWindowMoveToRect = (void (*)(
|
||||
GdkWindow*, const GdkRectangle*, GdkGravity, GdkGravity, GdkAnchorHints,
|
||||
gint, gint))dlsym(RTLD_DEFAULT, "gdk_window_move_to_rect");
|
||||
+ LOG(("nsWindow::NativeMoveResizeWaylandPopup [%p]\n", (void*)this));
|
||||
|
||||
// Compositor may be confused by windows with width/height = 0
|
||||
// and positioning such windows leads to Bug 1555866.
|
||||
if (!AreBoundsSane()) {
|
||||
- LOG(("nsWindow::NativeMoveResizeWaylandPopup [%p] Bounds are not sane\n",
|
||||
- (void*)this));
|
||||
+ LOG((" Bounds are not sane (width: %d height: %d)\n", mBounds.width,
|
||||
+ mBounds.height));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1331,15 +1331,14 @@
|
||||
// - gdk_window_move_to_rect() is not available
|
||||
// - the widget doesn't have a valid GdkWindow
|
||||
if (!sGdkWindowMoveToRect || !gdkWindow) {
|
||||
- LOG(("nsWindow::NativeMoveResizeWaylandPopup [%p] use gtk_window_move()\n",
|
||||
- (void*)this));
|
||||
+ LOG((" use gtk_window_move(%d, %d)\n", aPosition->x, aPosition->y));
|
||||
gtk_window_move(GTK_WINDOW(mShell), aPosition->x, aPosition->y);
|
||||
return;
|
||||
}
|
||||
|
||||
GtkWidget* parentWindow = ConfigureWaylandPopupWindows();
|
||||
- LOG(("nsWindow::NativeMoveResizeWaylandPopup [%p] Set popup parent %p\n",
|
||||
- (void*)this, parentWindow));
|
||||
+ LOG(("nsWindow::NativeMoveResizeWaylandPopup: Set popup parent %p\n",
|
||||
+ parentWindow));
|
||||
|
||||
int x_parent, y_parent;
|
||||
gdk_window_get_origin(gtk_widget_get_window(GTK_WIDGET(parentWindow)),
|
||||
@@ -1351,12 +1350,6 @@
|
||||
rect.height = aSize->height;
|
||||
}
|
||||
|
||||
- LOG(("%s [%p] request position %d,%d\n", __FUNCTION__, (void*)this,
|
||||
- aPosition->x, aPosition->y));
|
||||
- if (aSize) {
|
||||
- LOG((" request size %d,%d\n", aSize->width, aSize->height));
|
||||
- }
|
||||
- LOG((" request result %d %d\n", rect.x, rect.y));
|
||||
#ifdef DEBUG
|
||||
if (!g_signal_handler_find(
|
||||
gdkWindow, G_SIGNAL_MATCH_FUNC, 0, 0, nullptr,
|
||||
@@ -1389,10 +1382,8 @@
|
||||
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));
|
||||
+ LOG((" requested rect: x: %d y: %d width: %d height: %d\n", 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));
|
||||
@@ -7348,8 +7339,9 @@
|
||||
if (monitor) {
|
||||
GdkRectangle workArea;
|
||||
s_gdk_monitor_get_workarea(monitor, &workArea);
|
||||
- aRect->x = workArea.x;
|
||||
- aRect->y = workArea.y;
|
||||
+ // The monitor offset won't help us in Wayland, because we can't get the
|
||||
+ // absolute position of our window.
|
||||
+ aRect->x = aRect->y = 0;
|
||||
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,
|
||||
|
@ -1,14 +1,12 @@
|
||||
diff -up firefox-70.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.old firefox-70.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium
|
||||
diff -up firefox-70.0/media/webrtc/trunk/Makefile.old firefox-70.0/media/webrtc/trunk/Makefile
|
||||
diff -up firefox-70.0/old-configure.in.old firefox-70.0/old-configure.in
|
||||
--- firefox-70.0/old-configure.in.old 2019-10-21 15:13:50.777374423 +0200
|
||||
+++ firefox-70.0/old-configure.in 2019-10-21 15:13:59.803371294 +0200
|
||||
@@ -1530,7 +1530,7 @@ MOZ_ARG_WITH_BOOL(system-nss,
|
||||
diff -up firefox-71.0/old-configure.in.nss-version firefox-71.0/old-configure.in
|
||||
--- firefox-71.0/old-configure.in.nss-version 2019-11-25 15:15:15.767572575 +0100
|
||||
+++ firefox-71.0/old-configure.in 2019-11-25 15:16:47.363498527 +0100
|
||||
@@ -1512,7 +1512,7 @@ MOZ_ARG_WITH_BOOL(system-nss,
|
||||
_USE_SYSTEM_NSS=1 )
|
||||
|
||||
if test -n "$_USE_SYSTEM_NSS"; then
|
||||
- AM_PATH_NSS(3.46.1, [MOZ_SYSTEM_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])])
|
||||
+ AM_PATH_NSS(3.46.0, [MOZ_SYSTEM_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])])
|
||||
- AM_PATH_NSS(3.47.1, [MOZ_SYSTEM_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])])
|
||||
+ AM_PATH_NSS(3.47.0, [MOZ_SYSTEM_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])])
|
||||
fi
|
||||
|
||||
NSS_CFLAGS="$NSS_CFLAGS -I${DIST}/include/nss"
|
||||
|
35
firefox.spec
35
firefox.spec
@ -1,5 +1,5 @@
|
||||
# Set to true if it's going to be submitted as update.
|
||||
%global release_build 1
|
||||
%global release_build 0
|
||||
|
||||
# Disabled arm due to rhbz#1658940
|
||||
ExcludeArch: armv7hl
|
||||
@ -10,7 +10,7 @@ ExcludeArch: s390x
|
||||
ExcludeArch: ppc64le
|
||||
%endif
|
||||
|
||||
%global system_nss 0
|
||||
%global system_nss 1
|
||||
%global system_ffi 1
|
||||
# libvpx is too new for Firefox 65
|
||||
%if 0%{?fedora} < 30
|
||||
@ -93,13 +93,13 @@ ExcludeArch: ppc64le
|
||||
|
||||
Summary: Mozilla Firefox Web browser
|
||||
Name: firefox
|
||||
Version: 70.0.1
|
||||
Release: 5.nss%{?pre_tag}%{?dist}
|
||||
Version: 71.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}-20191101.tar.xz
|
||||
Source1: firefox-langpacks-%{version}%{?pre_version}-20191126.tar.xz
|
||||
%endif
|
||||
Source2: cbindgen-vendor.tar.xz
|
||||
Source10: firefox-mozconfig
|
||||
@ -150,15 +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
|
||||
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
|
||||
Patch590: firefox-wayland-cache-missing.patch
|
||||
Patch591: mozilla-1587008.patch
|
||||
|
||||
# PGO/LTO patches
|
||||
Patch600: pgo.patch
|
||||
@ -257,7 +255,7 @@ BuildRequires: xorg-x11-server-Xvfb
|
||||
%if 0%{?pgo_wayland}
|
||||
BuildRequires: mutter
|
||||
%endif
|
||||
BuildRequires: rust = 1.38
|
||||
BuildRequires: rust
|
||||
BuildRequires: cargo
|
||||
BuildRequires: clang-devel
|
||||
|
||||
@ -355,20 +353,20 @@ This package contains results of tests executed during build.
|
||||
%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
|
||||
%patch423 -p1 -b .D49289
|
||||
|
||||
# overflow widgets broken
|
||||
%patch424 -p1 -b .D53011
|
||||
# dropdown missing on multimonitor
|
||||
%patch425 -p1 -b .D53965
|
||||
|
||||
# Wayland specific upstream patches
|
||||
%patch574 -p1 -b .firefox-pipewire
|
||||
%patch575 -p1 -b .mozilla-1548475
|
||||
%patch590 -p1 -b .cache-missing
|
||||
%patch591 -p1 -b .mozilla-1587008
|
||||
|
||||
# PGO patches
|
||||
%patch600 -p1 -b .pgo
|
||||
@ -951,8 +949,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
%changelog
|
||||
* Tue Nov 19 2019 Martin Stransky <stransky@redhat.com> - 70.0.1-5.nss
|
||||
- Built with in-tree nss (rhbz#1752303).
|
||||
* 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
|
||||
|
||||
* Mon Nov 04 2019 Jan Horak <jhorak@redhat.com> - 70.0.1-4
|
||||
- Added fix for non-scrollable popups
|
||||
|
@ -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
|
||||
|
@ -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(
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
4
sources
4
sources
@ -1,3 +1,3 @@
|
||||
SHA512 (cbindgen-vendor.tar.xz) = 88afa0bc6af525cbb46bc75578b90419b28b95b396d5002fbf299a78a173681b840096ff83ef6e48553d1a5e0aa04e79383ab4d09bf431f3b864fcbacc7de46d
|
||||
SHA512 (firefox-70.0.1.source.tar.xz) = 798e18620e50ef10f184b6e43c88cfbad8a446ae005204582bccc2958107910617375b0ff622c85fb768b48d490a31ea7674eef9f0c415aa72cd958f09a9f725
|
||||
SHA512 (firefox-langpacks-70.0.1-20191101.tar.xz) = 307c9d14980ad66b5cfd1ad6a0bd2f4f60d09d9ea9478876b9537c31ae713b5cbe05410b8c01822084aa669f58d017a15ba4f7c6bcbcb07f144437658da72ff4
|
||||
SHA512 (firefox-71.0.source.tar.xz) = 2559bf4703a79a258c6c257d8a2c6b1bc05bb062c13004dc5d5352020fbdd68448bc1d7a2fae34e51f9a9bda576ae2f3118fd99cdad910dd29ef56739c1b8244
|
||||
SHA512 (firefox-langpacks-71.0-20191126.tar.xz) = d3f465a988951dcf8b80766934f140b4e8f12c168702d2badea1fdaab36a7d67fcddb2b9d413ce50d28b25ec8fce7b237e308d5f675cd4254766e628f988460c
|
||||
|
Loading…
Reference in New Issue
Block a user