Merge branch 'master' into f33

This commit is contained in:
Martin Stransky 2021-01-25 15:19:01 +01:00
commit eb94ecde7c
2 changed files with 46 additions and 1 deletions

View File

@ -225,6 +225,7 @@ Patch422: mozilla-1631061.patch
Patch423: mozilla-1681107.patch Patch423: mozilla-1681107.patch
Patch424: firefox-wayland-fix-mzbz-1642949-regression.patch Patch424: firefox-wayland-fix-mzbz-1642949-regression.patch
Patch426: mozilla-1687931.patch Patch426: mozilla-1687931.patch
Patch427: mozilla-1678247.patch
# PGO/LTO patches # PGO/LTO patches
Patch600: pgo.patch Patch600: pgo.patch
@ -434,6 +435,7 @@ This package contains results of tests executed during build.
%patch423 -p1 -b .1681107 %patch423 -p1 -b .1681107
%patch424 -p1 -b .fix-mzbz-1642949-regression %patch424 -p1 -b .fix-mzbz-1642949-regression
%patch426 -p1 -b .1687931 %patch426 -p1 -b .1687931
%patch427 -p1 -b .1678247
# PGO patches # PGO patches
%if %{build_with_pgo} %if %{build_with_pgo}
@ -722,6 +724,7 @@ make -C objdir buildsymbols
# or any files in the application's data directory for provides # or any files in the application's data directory for provides
%global __requires_exclude_from ^(%{_libdir}/%{name}/.*\\.so.*|%{_libdir}/%{name}/gmp-clearkey/0.1/.*\\.so.*|%{_libdir}/%{name}/gtk2/.*\\.so.*)$ %global __requires_exclude_from ^(%{_libdir}/%{name}/.*\\.so.*|%{_libdir}/%{name}/gmp-clearkey/0.1/.*\\.so.*|%{_libdir}/%{name}/gtk2/.*\\.so.*)$
%global __provides_exclude_from ^(%{_libdir}/%{name}/.*\\.so.*|%{_libdir}/%{name}/gmp-clearkey/0.1/.*\\.so.*|%{_libdir}/%{name}/gtk2/.*\\.so.*)$ %global __provides_exclude_from ^(%{_libdir}/%{name}/.*\\.so.*|%{_libdir}/%{name}/gmp-clearkey/0.1/.*\\.so.*|%{_libdir}/%{name}/gtk2/.*\\.so.*)$
%global __requires_exclude ^libxul.*$
# run Firefox test suite # run Firefox test suite
%if 0%{?run_firefox_tests} %if 0%{?run_firefox_tests}
@ -735,7 +738,7 @@ tar xf %{SOURCE37}
cp %{SOURCE40} %{SOURCE41} %{SOURCE42} %{SOURCE38} %{SOURCE39} %{SOURCE43} . cp %{SOURCE40} %{SOURCE41} %{SOURCE42} %{SOURCE38} %{SOURCE39} %{SOURCE43} .
mkdir -p test_results mkdir -p test_results
%if %{test_on_wayland} %if %{test_on_wayland}
./run-tests-wayland || true ./run-tests-wayland %{test_offscreen} || true
%else %else
./run-tests-x11 || true ./run-tests-x11 || true
%endif %endif

42
mozilla-1678247.patch Normal file
View File

@ -0,0 +1,42 @@
diff --git a/widget/gtk/MozContainerWayland.cpp b/widget/gtk/MozContainerWayland.cpp
--- a/widget/gtk/MozContainerWayland.cpp
+++ b/widget/gtk/MozContainerWayland.cpp
@@ -22,6 +22,7 @@
# include "mozilla/Logging.h"
# include "nsTArray.h"
# include "Units.h"
+# include "nsWindow.h"
extern mozilla::LazyLogModule gWidgetWaylandLog;
# define LOGWAYLAND(args) \
MOZ_LOG(gWidgetWaylandLog, mozilla::LogLevel::Debug, args)
@@ -343,21 +344,19 @@
moz_container_wayland_set_opaque_region_locked(container);
}
-static int moz_gtk_widget_get_scale_factor(MozContainer* container) {
- static auto sGtkWidgetGetScaleFactor =
- (gint(*)(GtkWidget*))dlsym(RTLD_DEFAULT, "gtk_widget_get_scale_factor");
- return sGtkWidgetGetScaleFactor
- ? sGtkWidgetGetScaleFactor(GTK_WIDGET(container))
- : 1;
-}
-
static void moz_container_wayland_set_scale_factor_locked(
MozContainer* container) {
if (!container->wl_container.surface) {
return;
}
- wl_surface_set_buffer_scale(container->wl_container.surface,
- moz_gtk_widget_get_scale_factor(container));
+ gpointer user_data = g_object_get_data(G_OBJECT(container), "nsWindow");
+ nsWindow* wnd = static_cast<nsWindow*>(user_data);
+
+ int scale = 1;
+ if (wnd) {
+ scale = wnd->GdkScaleFactor();
+ }
+ wl_surface_set_buffer_scale(container->wl_container.surface, scale);
}
void moz_container_wayland_set_scale_factor(MozContainer* container) {