From 3aea3055e85d7f367ec5b1347c5b96898e237fd2 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 6 Mar 2018 15:06:38 +0100 Subject: [PATCH] Removed unused wayland patches --- mozilla-1431052.patch | 21 ---------- mozilla-1432414.patch | 58 --------------------------- mozilla-1433081.patch | 51 ------------------------ mozilla-1434202.patch | 25 ------------ mozilla-1434565.patch | 16 -------- mozilla-1434572.patch | 93 ------------------------------------------- queue-crash.patch | 26 ------------ remote-profile.patch | 19 --------- 8 files changed, 309 deletions(-) delete mode 100644 mozilla-1431052.patch delete mode 100644 mozilla-1432414.patch delete mode 100644 mozilla-1433081.patch delete mode 100644 mozilla-1434202.patch delete mode 100644 mozilla-1434565.patch delete mode 100644 mozilla-1434572.patch delete mode 100644 queue-crash.patch delete mode 100644 remote-profile.patch diff --git a/mozilla-1431052.patch b/mozilla-1431052.patch deleted file mode 100644 index 59376bd..0000000 --- a/mozilla-1431052.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp ---- a/widget/gtk/nsWindow.cpp -+++ b/widget/gtk/nsWindow.cpp -@@ -6948,11 +6948,15 @@ nsWindow::GetWaylandDisplay() - GdkDisplay* gdkDisplay = gdk_display_get_default(); - return mIsX11Display ? nullptr : - sGdkWaylandDisplayGetWlDisplay(gdkDisplay); - } - - wl_surface* - nsWindow::GetWaylandSurface() - { -- return moz_container_get_wl_surface(MOZ_CONTAINER(mContainer)); -+ if (mContainer) -+ return moz_container_get_wl_surface(MOZ_CONTAINER(mContainer)); -+ -+ NS_WARNING("nsWindow::GetWaylandSurfaces(): We don't have any mContainer for drawing!"); -+ return nullptr; - } - #endif - diff --git a/mozilla-1432414.patch b/mozilla-1432414.patch deleted file mode 100644 index 818dbbd..0000000 --- a/mozilla-1432414.patch +++ /dev/null @@ -1,58 +0,0 @@ -diff --git a/widget/gtk/mozgtk/mozgtk.c b/widget/gtk/mozgtk/mozgtk.c ---- a/widget/gtk/mozgtk/mozgtk.c -+++ b/widget/gtk/mozgtk/mozgtk.c -@@ -224,16 +224,17 @@ STUB(gtk_file_chooser_set_preview_widget - STUB(gtk_file_chooser_set_preview_widget_active) - STUB(gtk_file_chooser_set_select_multiple) - STUB(gtk_file_chooser_widget_get_type) - STUB(gtk_file_filter_add_pattern) - STUB(gtk_file_filter_new) - STUB(gtk_file_filter_set_name) - STUB(gtk_fixed_new) - STUB(gtk_frame_new) -+STUB(gtk_get_current_event_time) - STUB(gtk_grab_add) - STUB(gtk_grab_remove) - STUB(gtk_handle_box_new) - STUB(gtk_hbox_new) - STUB(gtk_icon_info_free) - STUB(gtk_icon_info_load_icon) - STUB(gtk_icon_set_add_source) - STUB(gtk_icon_set_new) -diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp ---- a/widget/gtk/nsWindow.cpp -+++ b/widget/gtk/nsWindow.cpp -@@ -1358,23 +1358,27 @@ SetUserTimeAndStartupIDForActivatedWindo - // we don't want to reuse the timestamp next time we raise the window - GTKToolkit->SetFocusTimestamp(0); - GTKToolkit->SetDesktopStartupID(EmptyCString()); - } - - /* static */ guint32 - nsWindow::GetLastUserInputTime() - { -- // gdk_x11_display_get_user_time tracks button and key presses, -- // DESKTOP_STARTUP_ID used to start the app, drop events from external -- // drags, WM_DELETE_WINDOW delete events, but not usually mouse motion nor -+ // gdk_x11_display_get_user_time/gtk_get_current_event_time tracks -+ // button and key presses, DESKTOP_STARTUP_ID used to start the app, -+ // drop events from external drags, -+ // WM_DELETE_WINDOW delete events, but not usually mouse motion nor - // button and key releases. Therefore use the most recent of - // gdk_x11_display_get_user_time and the last time that we have seen. -- guint32 timestamp = -- gdk_x11_display_get_user_time(gdk_display_get_default()); -+ GdkDisplay* gdkDisplay = gdk_display_get_default(); -+ guint32 timestamp = GDK_IS_X11_DISPLAY(gdkDisplay) ? -+ gdk_x11_display_get_user_time(gdkDisplay) : -+ gtk_get_current_event_time(); -+ - if (sLastUserInputTime != GDK_CURRENT_TIME && - TimestampIsNewerThan(sLastUserInputTime, timestamp)) { - return sLastUserInputTime; - } - - return timestamp; - } - - diff --git a/mozilla-1433081.patch b/mozilla-1433081.patch deleted file mode 100644 index 6677ff0..0000000 --- a/mozilla-1433081.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff --git a/gfx/gl/GLContextProvider.h b/gfx/gl/GLContextProvider.h ---- a/gfx/gl/GLContextProvider.h -+++ b/gfx/gl/GLContextProvider.h -@@ -21,16 +21,18 @@ namespace gl { - - #define IN_GL_CONTEXT_PROVIDER_H - - // Null is always there - #define GL_CONTEXT_PROVIDER_NAME GLContextProviderNull - #include "GLContextProviderImpl.h" - #undef GL_CONTEXT_PROVIDER_NAME - -+#if !defined(MOZ_GL_PROVIDER) -+ - #ifdef XP_WIN - #define GL_CONTEXT_PROVIDER_NAME GLContextProviderWGL - #include "GLContextProviderImpl.h" - #undef GL_CONTEXT_PROVIDER_NAME - #define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderWGL - #define DEFAULT_IMPL WGL - #endif - -@@ -59,23 +61,27 @@ namespace gl { - #define GL_CONTEXT_PROVIDER_NAME GLContextProviderEAGL - #include "GLContextProviderImpl.h" - #undef GL_CONTEXT_PROVIDER_NAME - #ifndef GL_CONTEXT_PROVIDER_DEFAULT - #define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderEAGL - #endif - #endif - -+#else //defined(MOZ_GL_PROVIDER) -+ - #ifdef MOZ_GL_PROVIDER - #define GL_CONTEXT_PROVIDER_NAME MOZ_GL_PROVIDER - #include "GLContextProviderImpl.h" - #undef GL_CONTEXT_PROVIDER_NAME - #define GL_CONTEXT_PROVIDER_DEFAULT MOZ_GL_PROVIDER - #endif - -+#endif -+ - #ifdef GL_CONTEXT_PROVIDER_DEFAULT - typedef GL_CONTEXT_PROVIDER_DEFAULT GLContextProvider; - #else - typedef GLContextProviderNull GLContextProvider; - #endif - - #undef IN_GL_CONTEXT_PROVIDER_H - - diff --git a/mozilla-1434202.patch b/mozilla-1434202.patch deleted file mode 100644 index d91f55e..0000000 --- a/mozilla-1434202.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp ---- a/widget/gtk/nsWindow.cpp -+++ b/widget/gtk/nsWindow.cpp -@@ -3785,16 +3785,20 @@ nsWindow::Create(nsIWidget* aParent, - SetCursor(eCursor_standard); - - if (aInitData->mNoAutoHide) { - gint wmd = ConvertBorderStyles(mBorderStyle); - if (wmd != -1) - gdk_window_set_decorations(mGdkWindow, (GdkWMDecoration) wmd); - } - -+ if (!mIsX11Display) { -+ gtk_widget_set_app_paintable(mShell, TRUE); -+ } -+ - // If the popup ignores mouse events, set an empty input shape. - if (aInitData->mMouseTransparent) { - cairo_rectangle_int_t rect = { 0, 0, 0, 0 }; - cairo_region_t *region = cairo_region_create_rectangle(&rect); - - gdk_window_input_shape_combine_region(mGdkWindow, region, 0, 0); - cairo_region_destroy(region); - } - diff --git a/mozilla-1434565.patch b/mozilla-1434565.patch deleted file mode 100644 index bb42348..0000000 --- a/mozilla-1434565.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -up mozilla-beta-64737c752ac4af4766ad6f82720818521f3aca24/toolkit/components/remote/nsDBusRemoteService.cpp.1434565 mozilla-beta-64737c752ac4af4766ad6f82720818521f3aca24/toolkit/components/remote/nsDBusRemoteService.cpp ---- mozilla-beta-64737c752ac4af4766ad6f82720818521f3aca24/toolkit/components/remote/nsDBusRemoteService.cpp.1434565 2018-02-01 14:14:38.902873024 +0100 -+++ mozilla-beta-64737c752ac4af4766ad6f82720818521f3aca24/toolkit/components/remote/nsDBusRemoteService.cpp 2018-02-01 14:18:02.906281711 +0100 -@@ -89,7 +89,11 @@ nsDBusRemoteService::OpenURL(DBusMessage - errorMsg = nsPrintfCString("org.mozilla.%s.Error", mAppName.get()); - reply = dbus_message_new_error(msg, errorMsg.get(), "Wrong argument"); - } else { -- nsRemoteService::HandleCommandLine(commandLine, nullptr, 0); -+ guint32 timestamp = gtk_get_current_event_time(); -+ if (timestamp == GDK_CURRENT_TIME) { -+ timestamp = guint32(g_get_monotonic_time() / 1000); -+ } -+ nsRemoteService::HandleCommandLine(commandLine, nullptr, timestamp); - reply = dbus_message_new_method_return(msg); - } - diff --git a/mozilla-1434572.patch b/mozilla-1434572.patch deleted file mode 100644 index 835c76f..0000000 --- a/mozilla-1434572.patch +++ /dev/null @@ -1,93 +0,0 @@ -diff --git a/widget/gtk/mozgtk/mozgtk.c b/widget/gtk/mozgtk/mozgtk.c ---- a/widget/gtk/mozgtk/mozgtk.c -+++ b/widget/gtk/mozgtk/mozgtk.c -@@ -66,16 +66,17 @@ STUB(gdk_screen_get_number) - STUB(gdk_screen_get_resolution) - STUB(gdk_screen_get_rgba_visual) - STUB(gdk_screen_get_root_window) - STUB(gdk_screen_get_system_visual) - STUB(gdk_screen_get_width) - STUB(gdk_screen_height) - STUB(gdk_screen_is_composited) - STUB(gdk_screen_width) -+STUB(gdk_selection_owner_get) - STUB(gdk_set_program_class) - STUB(gdk_unicode_to_keyval) - STUB(gdk_visual_get_depth) - STUB(gdk_visual_get_system) - STUB(gdk_window_add_filter) - STUB(gdk_window_begin_move_drag) - STUB(gdk_window_begin_resize_drag) - STUB(gdk_window_destroy) -diff --git a/widget/gtk/nsClipboardWayland.cpp b/widget/gtk/nsClipboardWayland.cpp ---- a/widget/gtk/nsClipboardWayland.cpp -+++ b/widget/gtk/nsClipboardWayland.cpp -@@ -337,21 +346,68 @@ nsRetrievalContextWayland::GetTargets(in - for (int32_t j = 0; j < length; j++) { - targetList[j] = mTargetMIMETypes[j]; - } - - *aTargetNum = length; - return targetList; - } - -+struct fastTrackClipboardData -+{ -+ char* data; -+ int dataLength; -+}; -+ -+static void -+wayland_clipboard_contents_received(GtkClipboard *clipboard, -+ GtkSelectionData *selection_data, -+ gpointer data) -+{ -+ fastTrackClipboardData* clipboardData = -+ static_cast(data); -+ -+ int contentLength = gtk_selection_data_get_length(selection_data); -+ if (contentLength > 0) { -+ clipboardData->data = reinterpret_cast( -+ g_malloc(sizeof(char)*contentLength)); -+ memcpy(clipboardData->data, -+ gtk_selection_data_get_data(selection_data), -+ sizeof(char)*contentLength); -+ } -+ -+ clipboardData->dataLength = contentLength; -+} -+ - const char* - nsRetrievalContextWayland::GetClipboardData(const char* aMimeType, - int32_t aWhichClipboard, - uint32_t* aContentLength) - { -+ /* If actual clipboard data is owned by us we don't need to go -+ * through Wayland but we ask Gtk+ to directly call data -+ * getter callback nsClipboard::SelectionGetEvent(). -+ */ -+ GdkAtom selection = GetSelectionAtom(aWhichClipboard); -+ if (gdk_selection_owner_get(selection)) { -+ fastTrackClipboardData clipboardData = { nullptr, 0 }; -+ gtk_clipboard_request_contents(gtk_clipboard_get(selection), -+ gdk_atom_intern(aMimeType, FALSE), -+ wayland_clipboard_contents_received, -+ &clipboardData); -+ *aContentLength = clipboardData.dataLength; -+ return static_cast(clipboardData.data); -+ } -+ -+ /* TODO: We need to implement GDK_SELECTION_PRIMARY (X11 text selection) -+ * for Wayland backend. -+ */ -+ if (selection == GDK_SELECTION_PRIMARY) -+ return nullptr; -+ - NS_ASSERTION(mDataOffer, "Requested data without valid data offer!"); - - if (!mDataOffer) { - // TODO - // Something went wrong. We're requested to provide clipboard data - // but we haven't got any from wayland. Looks like rhbz#1455915. - return nullptr; - } diff --git a/queue-crash.patch b/queue-crash.patch deleted file mode 100644 index 962fce9..0000000 --- a/queue-crash.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/widget/gtk/WindowSurfaceWayland.cpp b/widget/gtk/WindowSurfaceWayland.cpp ---- a/widget/gtk/WindowSurfaceWayland.cpp -+++ b/widget/gtk/WindowSurfaceWayland.cpp -@@ -268,17 +268,21 @@ nsWaylandDisplay::GetShm() - - if (!mShm) { - // wl_shm is not provided by Gtk so we need to query wayland directly - // See weston/simple-shm.c and create_display() for reference. - wl_registry* registry = wl_display_get_registry(mDisplay); - wl_registry_add_listener(registry, ®istry_listener, this); - - wl_proxy_set_queue((struct wl_proxy *)registry, mEventQueue); -- wl_display_roundtrip_queue(mDisplay, mEventQueue); -+ if (mEventQueue) { -+ wl_display_roundtrip_queue(mDisplay, mEventQueue); -+ } else { -+ wl_display_roundtrip(mDisplay); -+ } - - MOZ_RELEASE_ASSERT(mShm, "Wayland registry query failed!"); - } - - return(mShm); - } - - bool diff --git a/remote-profile.patch b/remote-profile.patch deleted file mode 100644 index 919f735..0000000 --- a/remote-profile.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp -index 386213efebb4..990ba32acbd4 100644 ---- a/toolkit/xre/nsAppRunner.cpp -+++ b/toolkit/xre/nsAppRunner.cpp -@@ -3995,6 +3995,14 @@ XREMain::XRE_mainStartup(bool* aExitFlag) - } - } - -+ if (!profile) { -+#ifdef MOZ_DEV_EDITION -+ profile = "dev-edition-default"; -+#else -+ profile = "default"; -+#endif -+ } -+ - nsCOMPtr mutexDir; - rv = GetSpecialSystemDirectory(OS_TemporaryDirectory, getter_AddRefs(mutexDir)); - if (NS_SUCCEEDED(rv)) {