Merge branch 'master' into f29

This commit is contained in:
Martin Stransky 2018-11-05 15:38:50 +01:00
commit 579766c50c
2 changed files with 177 additions and 1 deletions

View File

@ -87,7 +87,7 @@
Summary: Mozilla Firefox Web browser
Name: firefox
Version: 63.0.1
Release: 3%{?pre_tag}%{?dist}
Release: 4%{?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
@ -153,6 +153,7 @@ Patch421: mozilla-1447775.patch
Patch573: mozilla-1415078.patch
Patch574: firefox-pipewire.patch
Patch581: mozilla-1493081.patch
Patch582: mozilla-1504689.patch
# Debian patches
Patch500: mozilla-440908.patch
@ -364,6 +365,7 @@ This package contains results of tests executed during build.
%patch574 -p1 -b .firefox-pipewire
%endif
%patch581 -p1 -b .mozilla-1493081
%patch582 -p1 -b .mozilla-1504689
%{__rm} -f .mozconfig
%{__cp} %{SOURCE10} .mozconfig
@ -910,6 +912,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
#---------------------------------------------------------------------
%changelog
* Mon Nov 5 2018 Martin Stransky <stransky@redhat.com> - 63.0.1-4
- Added clipboard fix (mozbz#1504689)
* Fri Nov 2 2018 Dan Horak <dhorak@redhat.com> - 63.0.1-3
- Added fixes for ppc64le

171
mozilla-1504689.patch Normal file
View File

@ -0,0 +1,171 @@
changeset: 444459:f76b5c265806
tag: tip
parent: 444456:d2963b5a2897
user: Martin Stransky <stransky@redhat.com>
date: Mon Nov 05 15:26:26 2018 +0100
summary: Bug 1504689 - [Wayland/Clipboard] Don't delete clipboard wl_data_offer after keyboard focus out, r=jhorak
diff --git a/widget/gtk/nsClipboardWayland.cpp b/widget/gtk/nsClipboardWayland.cpp
--- a/widget/gtk/nsClipboardWayland.cpp
+++ b/widget/gtk/nsClipboardWayland.cpp
@@ -520,25 +520,16 @@ nsRetrievalContextWayland::AddDragAndDro
nsWaylandDragContext*
nsRetrievalContextWayland::GetDragContext(void)
{
return mDragContext;
}
void
-nsRetrievalContextWayland::ClearClipboardDataOffers(void)
-{
- if (mClipboardOffer)
- mClipboardOffer = nullptr;
- if (mPrimaryOffer)
- mPrimaryOffer = nullptr;
-}
-
-void
nsRetrievalContextWayland::ClearDragAndDropDataOffer(void)
{
mDragContext = nullptr;
}
// We have a new fresh data content.
// We should attach listeners to it and save for further use.
static void
@@ -711,91 +702,16 @@ gtk_primary_selection_device_listener pr
};
bool
nsRetrievalContextWayland::HasSelectionSupport(void)
{
return mPrimarySelectionDataDeviceManager != nullptr;
}
-static void
-keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard,
- uint32_t format, int fd, uint32_t size)
-{
-}
-
-static void
-keyboard_handle_enter(void *data, struct wl_keyboard *keyboard,
- uint32_t serial, struct wl_surface *surface,
- struct wl_array *keys)
-{
-}
-
-static void
-keyboard_handle_leave(void *data, struct wl_keyboard *keyboard,
- uint32_t serial, struct wl_surface *surface)
-{
- // We lost focus so our clipboard data are outdated
- nsRetrievalContextWayland *context =
- static_cast<nsRetrievalContextWayland*>(data);
-
- context->ClearClipboardDataOffers();
-}
-
-static void
-keyboard_handle_key(void *data, struct wl_keyboard *keyboard,
- uint32_t serial, uint32_t time, uint32_t key,
- uint32_t state)
-{
-}
-
-static void
-keyboard_handle_modifiers(void *data, struct wl_keyboard *keyboard,
- uint32_t serial, uint32_t mods_depressed,
- uint32_t mods_latched, uint32_t mods_locked,
- uint32_t group)
-{
-}
-
-static const struct wl_keyboard_listener keyboard_listener = {
- keyboard_handle_keymap,
- keyboard_handle_enter,
- keyboard_handle_leave,
- keyboard_handle_key,
- keyboard_handle_modifiers,
-};
-
-void
-nsRetrievalContextWayland::ConfigureKeyboard(wl_seat_capability caps)
-{
- // ConfigureKeyboard() is called when wl_seat configuration is changed.
- // We look for the keyboard only, get it when is't available and release it
- // when it's lost (we don't have focus for instance).
- if (caps & WL_SEAT_CAPABILITY_KEYBOARD) {
- mKeyboard = wl_seat_get_keyboard(mSeat);
- wl_keyboard_add_listener(mKeyboard, &keyboard_listener, this);
- } else if (mKeyboard && !(caps & WL_SEAT_CAPABILITY_KEYBOARD)) {
- wl_keyboard_destroy(mKeyboard);
- mKeyboard = nullptr;
- }
-}
-
-static void
-seat_handle_capabilities(void *data, struct wl_seat *seat,
- unsigned int caps)
-{
- nsRetrievalContextWayland *context =
- static_cast<nsRetrievalContextWayland*>(data);
- context->ConfigureKeyboard((wl_seat_capability)caps);
-}
-
-static const struct wl_seat_listener seat_listener = {
- seat_handle_capabilities,
-};
-
void
nsRetrievalContextWayland::InitDataDeviceManager(wl_registry *registry,
uint32_t id,
uint32_t version)
{
int data_device_manager_version = MIN (version, 3);
mDataDeviceManager = (wl_data_device_manager *)wl_registry_bind(registry, id,
&wl_data_device_manager_interface, data_device_manager_version);
@@ -811,17 +727,16 @@ nsRetrievalContextWayland::InitPrimarySe
}
void
nsRetrievalContextWayland::InitSeat(wl_registry *registry,
uint32_t id, uint32_t version,
void *data)
{
mSeat = (wl_seat*)wl_registry_bind(registry, id, &wl_seat_interface, 1);
- wl_seat_add_listener(mSeat, &seat_listener, data);
}
static void
gdk_registry_handle_global(void *data,
struct wl_registry *registry,
uint32_t id,
const char *interface,
uint32_t version)
diff --git a/widget/gtk/nsClipboardWayland.h b/widget/gtk/nsClipboardWayland.h
--- a/widget/gtk/nsClipboardWayland.h
+++ b/widget/gtk/nsClipboardWayland.h
@@ -120,20 +120,18 @@ public:
void RegisterNewDataOffer(wl_data_offer *aWaylandDataOffer);
void RegisterNewDataOffer(gtk_primary_selection_offer *aPrimaryDataOffer);
void SetClipboardDataOffer(wl_data_offer *aWaylandDataOffer);
void SetPrimaryDataOffer(gtk_primary_selection_offer *aPrimaryDataOffer);
void AddDragAndDropDataOffer(wl_data_offer *aWaylandDataOffer);
nsWaylandDragContext* GetDragContext();
- void ClearClipboardDataOffers();
void ClearDragAndDropDataOffer();
- void ConfigureKeyboard(wl_seat_capability caps);
void TransferFastTrackClipboard(int aClipboardRequestNumber,
GtkSelectionData *aSelectionData);
void InitDataDeviceManager(wl_registry *registry, uint32_t id, uint32_t version);
void InitPrimarySelectionDataDeviceManager(wl_registry *registry, uint32_t id);
void InitSeat(wl_registry *registry, uint32_t id, uint32_t version, void *data);
virtual ~nsRetrievalContextWayland() override;