diff options
author | Martin Stransky <stransky@redhat.com> | 2019-05-15 16:14:03 +0200 |
---|---|---|
committer | Martin Stransky <stransky@redhat.com> | 2019-05-15 16:14:03 +0200 |
commit | bbb92a85723ed11fe114e3a702c1fe1362fbbf7d (patch) | |
tree | 32f9bfb12f9f13fc94e673f9e646a0a3af876dc0 /mozilla-1535567.patch | |
parent | Updated to 66.0.5 (diff) | |
download | librewolf-fedora-ff-bbb92a85723ed11fe114e3a702c1fe1362fbbf7d.tar.gz librewolf-fedora-ff-bbb92a85723ed11fe114e3a702c1fe1362fbbf7d.tar.bz2 librewolf-fedora-ff-bbb92a85723ed11fe114e3a702c1fe1362fbbf7d.zip |
Updated to 67.0
Diffstat (limited to 'mozilla-1535567.patch')
-rw-r--r-- | mozilla-1535567.patch | 202 |
1 files changed, 36 insertions, 166 deletions
diff --git a/mozilla-1535567.patch b/mozilla-1535567.patch index 1cbe3fd..a2b96a4 100644 --- a/mozilla-1535567.patch +++ b/mozilla-1535567.patch @@ -1,30 +1,7 @@ -diff -up firefox-66.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.old firefox-66.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium -diff -up firefox-66.0/media/webrtc/trunk/Makefile.old firefox-66.0/media/webrtc/trunk/Makefile -diff -up firefox-66.0/widget/gtk/mozcontainer.cpp.old firefox-66.0/widget/gtk/mozcontainer.cpp ---- firefox-66.0/widget/gtk/mozcontainer.cpp.old 2019-03-14 23:12:56.000000000 +0100 -+++ firefox-66.0/widget/gtk/mozcontainer.cpp 2019-03-15 13:23:59.366840324 +0100 -@@ -20,6 +20,20 @@ - # include "maiRedundantObjectFactory.h" - #endif - -+#undef LOG -+#ifdef MOZ_LOGGING -+ -+# include "mozilla/Logging.h" -+# include "nsTArray.h" -+# include "Units.h" -+ -+extern mozilla::LazyLogModule gWidgetLog; -+ -+# define LOG(args) MOZ_LOG(gWidgetLog, mozilla::LogLevel::Debug, args) -+#else -+# define LOG(args) -+#endif /* MOZ_LOGGING */ -+ - #ifdef MOZ_WAYLAND - using namespace mozilla; - using namespace mozilla::widget; -@@ -157,10 +171,14 @@ void moz_container_init(MozContainer *co +diff -up firefox-67.0/widget/gtk/mozcontainer.cpp.mozilla-1535567 firefox-67.0/widget/gtk/mozcontainer.cpp +--- firefox-67.0/widget/gtk/mozcontainer.cpp.mozilla-1535567 2019-05-14 01:08:37.000000000 +0200 ++++ firefox-67.0/widget/gtk/mozcontainer.cpp 2019-05-15 15:56:19.645336209 +0200 +@@ -157,6 +157,7 @@ void moz_container_init(MozContainer *co container->subsurface = nullptr; container->eglwindow = nullptr; container->frame_callback_handler = nullptr; @@ -32,52 +9,34 @@ diff -up firefox-66.0/widget/gtk/mozcontainer.cpp.old firefox-66.0/widget/gtk/mo // 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; - #endif -+ -+ LOG(("moz_container_class_init() [%p]\n", (void *)container)); +@@ -165,6 +166,11 @@ void moz_container_init(MozContainer *co } #if defined(MOZ_WAYLAND) -@@ -170,36 +188,92 @@ static wl_surface *moz_container_get_gtk - dlsym(RTLD_DEFAULT, "gdk_wayland_window_get_wl_surface"); - - GdkWindow *window = gtk_widget_get_window(GTK_WIDGET(container)); -- return sGdkWaylandWindowGetWlSurface(window); -+ wl_surface *surface = sGdkWaylandWindowGetWlSurface(window); -+ -+ LOG(("moz_container_get_gtk_container_surface() [%p] wl_surface %p ID %d\n", -+ (void *)container, (void *)surface, -+ surface ? wl_proxy_get_id((struct wl_proxy *)surface) : -1)); ++void moz_container_set_initial_draw_callback( ++ MozContainer *container, std::function<void(void)> inital_draw_cb) { ++ container->inital_draw_cb = inital_draw_cb; ++} + -+ return surface; - } - - static void frame_callback_handler(void *data, struct wl_callback *callback, + static wl_surface *moz_container_get_gtk_container_surface( + MozContainer *container) { + static auto sGdkWaylandWindowGetWlSurface = (wl_surface * (*)(GdkWindow *)) +@@ -178,37 +184,61 @@ static void frame_callback_handler(void uint32_t time) { MozContainer *container = MOZ_CONTAINER(data); -+ -+ LOG( -+ ("moz_container_frame_callback_handler() [%p] frame_callback_handler %p " -+ "ready_to_draw %d (set to true) " -+ "inital_draw callback %d\n", -+ (void *)container, (void *)container->frame_callback_handler, -+ container->ready_to_draw, container->inital_draw_cb ? 1 : 0)); -+ g_clear_pointer(&container->frame_callback_handler, wl_callback_destroy); + container->frame_callback_handler_surface_id = -1; -+ -+ if (!container->ready_to_draw && container->inital_draw_cb) { -+ container->inital_draw_cb(); -+ } + if (!container->ready_to_draw && container->inital_draw_cb) { + container->inital_draw_cb(); + } container->ready_to_draw = true; } -+void moz_container_set_initial_draw_callback( -+ MozContainer *container, std::function<void(void)> inital_draw_cb) { -+ container->inital_draw_cb = inital_draw_cb; -+} -+ +-void moz_container_set_initial_draw_callback( +- MozContainer *container, std::function<void(void)> inital_draw_cb) { +- container->inital_draw_cb = inital_draw_cb; +-} +- static const struct wl_callback_listener frame_listener = { frame_callback_handler}; @@ -99,10 +58,9 @@ diff -up firefox-66.0/widget/gtk/mozcontainer.cpp.old firefox-66.0/widget/gtk/mo + : -1; + + LOG( -+ ("moz_container_request_parent_frame_callback() [%p] " -+ "container->frame_callback_handler %p " -+ "container->frame_callback_handler_surface_id %d\n", -+ (void *)container, container->frame_callback_handler, ++ ("%s [%p] frame_callback_handler %p " ++ "frame_callback_handler_surface_id %d\n", ++ __FUNCTION__, (void *)container, container->frame_callback_handler, + container->frame_callback_handler_surface_id)); + + if (container->frame_callback_handler && @@ -123,25 +81,22 @@ diff -up firefox-66.0/widget/gtk/mozcontainer.cpp.old firefox-66.0/widget/gtk/mo container); + } else { + container->frame_callback_handler_surface_id = -1; - } ++ } +} - ++ +static gboolean moz_container_map_wayland(GtkWidget *widget, + GdkEventAny *event) { + MozContainer *container = MOZ_CONTAINER(widget); + -+ LOG(("moz_container_map_wayland() begin [%p] ready_to_draw %d\n", -+ (void *)container, container->ready_to_draw)); -+ + if (container->ready_to_draw) { + return FALSE; -+ } -+ + } + + moz_container_request_parent_frame_callback(MOZ_CONTAINER(widget)); return FALSE; } -@@ -208,9 +282,12 @@ static void moz_container_unmap_wayland( +@@ -217,6 +247,7 @@ static void moz_container_unmap_wayland( g_clear_pointer(&container->subsurface, wl_subsurface_destroy); g_clear_pointer(&container->surface, wl_surface_destroy); g_clear_pointer(&container->frame_callback_handler, wl_callback_destroy); @@ -149,23 +104,7 @@ diff -up firefox-66.0/widget/gtk/mozcontainer.cpp.old firefox-66.0/widget/gtk/mo container->surface_needs_clear = true; container->ready_to_draw = false; -+ -+ LOG(("moz_container_unmap_wayland() [%p]\n", (void *)container)); - } - - static gint moz_container_get_scale(MozContainer *container) { -@@ -227,6 +304,10 @@ static gint moz_container_get_scale(MozC - - void moz_container_scale_changed(MozContainer *container, - GtkAllocation *aAllocation) { -+ LOG(("moz_container_scale_changed() [%p] surface %p eglwindow %p\n", -+ (void *)container, (void *)container->surface, -+ (void *)container->eglwindow)); -+ - if (!container->surface) { - return; - } -@@ -320,6 +401,10 @@ void moz_container_realize(GtkWidget *wi +@@ -329,6 +360,10 @@ void moz_container_realize(GtkWidget *wi : gtk_widget_get_visual(widget); window = gdk_window_new(parent, &attributes, attributes_mask); @@ -176,91 +115,22 @@ diff -up firefox-66.0/widget/gtk/mozcontainer.cpp.old firefox-66.0/widget/gtk/mo gdk_window_set_user_data(window, widget); } else { window = parent; -@@ -336,12 +421,8 @@ void moz_container_size_allocate(GtkWidg - - g_return_if_fail(IS_MOZ_CONTAINER(widget)); - -- /* printf("moz_container_size_allocate %p %d %d %d %d\n", -- (void *)widget, -- allocation->x, -- allocation->y, -- allocation->width, -- allocation->height); */ -+ LOG(("moz_container_size_allocate() [%p] %d %d %d %d\n", (void *)widget, -+ allocation->x, allocation->y, allocation->width, allocation->height)); - - /* short circuit if you can */ - container = MOZ_CONTAINER(widget); -@@ -487,8 +568,13 @@ static void moz_container_add(GtkContain - - #ifdef MOZ_WAYLAND +@@ -498,6 +533,7 @@ static void moz_container_add(GtkContain struct wl_surface *moz_container_get_wl_surface(MozContainer *container) { -+ LOG(("moz_container_get_wl_surface() [%p] surface %p ready_to_draw %d\n", -+ (void *)container, (void *)container->surface, -+ container->ready_to_draw)); -+ if (!container->surface) { if (!container->ready_to_draw) { + moz_container_request_parent_frame_callback(container); return nullptr; } GdkDisplay *display = gtk_widget_get_display(GTK_WIDGET(container)); -@@ -526,10 +612,16 @@ struct wl_surface *moz_container_get_wl_ - WaylandDisplayRelease(waylandDisplay); - } - -+ LOG(("moz_container_get_wl_surface() [%p] created surface %p\n", -+ (void *)container, (void *)container->surface)); -+ - return container->surface; - } - - struct wl_egl_window *moz_container_get_wl_egl_window(MozContainer *container) { -+ LOG(("moz_container_get_wl_egl_window() [%p] eglwindow %p\n", -+ (void *)container, (void *)container->eglwindow)); -+ - if (!container->eglwindow) { - wl_surface *surface = moz_container_get_wl_surface(container); - if (!surface) { -@@ -543,6 +635,10 @@ struct wl_egl_window *moz_container_get_ - gdk_window_get_height(window) * scale); - wl_surface_set_buffer_scale(surface, scale); - } -+ -+ LOG(("moz_container_get_wl_egl_window() [%p] created eglwindow %p\n", -+ (void *)container, (void *)container->eglwindow)); -+ - return container->eglwindow; - } - -diff -up firefox-66.0/widget/gtk/mozcontainer.h.old firefox-66.0/widget/gtk/mozcontainer.h ---- firefox-66.0/widget/gtk/mozcontainer.h.old 2019-03-14 23:13:02.000000000 +0100 -+++ firefox-66.0/widget/gtk/mozcontainer.h 2019-03-15 13:23:59.366840324 +0100 -@@ -9,6 +9,7 @@ - #define __MOZ_CONTAINER_H__ - - #include <gtk/gtk.h> -+#include <functional> - - /* - * MozContainer -@@ -76,8 +77,10 @@ struct _MozContainer { +diff -up firefox-67.0/widget/gtk/mozcontainer.h.mozilla-1535567 firefox-67.0/widget/gtk/mozcontainer.h +--- firefox-67.0/widget/gtk/mozcontainer.h.mozilla-1535567 2019-05-14 01:08:37.000000000 +0200 ++++ firefox-67.0/widget/gtk/mozcontainer.h 2019-05-15 15:50:59.440570372 +0200 +@@ -77,6 +77,7 @@ struct _MozContainer { struct wl_subsurface *subsurface; struct wl_egl_window *eglwindow; struct wl_callback *frame_callback_handler; + int frame_callback_handler_surface_id; gboolean surface_needs_clear; gboolean ready_to_draw; -+ std::function<void(void)> inital_draw_cb; - #endif - gboolean force_default_visual; - }; -@@ -100,6 +103,8 @@ gboolean moz_container_has_wl_egl_window - gboolean moz_container_surface_needs_clear(MozContainer *container); - void moz_container_scale_changed(MozContainer *container, - GtkAllocation *aAllocation); -+void moz_container_set_initial_draw_callback( -+ MozContainer *container, std::function<void(void)> inital_draw_cb); - #endif - - #endif /* __MOZ_CONTAINER_H__ */ + std::function<void(void)> inital_draw_cb; |