summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--firefox.spec11
-rw-r--r--mozilla-1508378.patch92
-rw-r--r--mozilla-1517205.patch207
-rw-r--r--sources4
5 files changed, 312 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index 2a900a0..279f02a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -336,3 +336,5 @@ firefox-3.6.4.source.tar.bz2
/firefox-langpacks-66.0.1-20190322.tar.xz
/firefox-66.0.2.source.tar.xz
/firefox-langpacks-66.0.2-20190401.tar.xz
+/firefox-langpacks-66.0.3-20190410.tar.xz
+/firefox-66.0.3.source.tar.xz
diff --git a/firefox.spec b/firefox.spec
index fd618f4..bae9097 100644
--- a/firefox.spec
+++ b/firefox.spec
@@ -98,13 +98,13 @@ ExcludeArch: s390x
Summary: Mozilla Firefox Web browser
Name: firefox
-Version: 66.0.2
+Version: 66.0.3
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}-20190401.tar.xz
+Source1: firefox-langpacks-%{version}%{?pre_version}-20190410.tar.xz
%endif
Source2: cbindgen-vendor.tar.xz
Source10: firefox-mozconfig
@@ -166,6 +166,8 @@ Patch577: mozilla-1535567.patch
Patch578: mozilla-1431399.patch
Patch579: mozilla-1468911.patch
Patch580: mozilla-1539471.patch
+Patch581: mozilla-1517205.patch
+Patch582: mozilla-1508378.patch
# PGO/LTO patches
Patch600: pgo.patch
@@ -383,6 +385,8 @@ This package contains results of tests executed during build.
%patch578 -p1 -b .mozilla-1431399
%patch579 -p1 -b .mozilla-1468911
%patch580 -p1 -b .mozilla-1539471
+%patch581 -p1 -b .mozilla-1517205
+%patch582 -p1 -b .mozilla-1508378
# PGO patches
%patch600 -p1 -b .pgo
@@ -936,6 +940,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
#---------------------------------------------------------------------
%changelog
+* Thu Apr 11 2019 Martin Stransky <stransky@redhat.com> - 66.0.3-1
+- Updated to 66.0.3 (Build 1)
+
* Mon Apr 1 2019 Martin Stransky <stransky@redhat.com> - 66.0.2-1
- Updated to 66.0.2 (Build 1)
- Added fixes for mozbz#1526243, mozbz#1540145
diff --git a/mozilla-1508378.patch b/mozilla-1508378.patch
new file mode 100644
index 0000000..bbbce4b
--- /dev/null
+++ b/mozilla-1508378.patch
@@ -0,0 +1,92 @@
+changeset: 468935:3b964face103
+tag: tip
+user: Martin Stransky <stransky@redhat.com>
+date: Wed Apr 10 15:14:32 2019 +0200
+summary: Bug 1508378 - Fix round error when damage rect size/position is odd number and scale factor is used, r=lsalzman
+
+diff --git a/widget/gtk/WindowSurfaceWayland.cpp b/widget/gtk/WindowSurfaceWayland.cpp
+--- a/widget/gtk/WindowSurfaceWayland.cpp
++++ b/widget/gtk/WindowSurfaceWayland.cpp
+@@ -624,16 +624,33 @@ static void WaylandBufferDelayCommitHand
+ } else {
+ // Referenced WindowSurfaceWayland is already deleted.
+ // Do nothing but just release the mDelayedCommitHandle allocated at
+ // WindowSurfaceWayland::CommitWaylandBuffer().
+ free(aSurface);
+ }
+ }
+
++void WindowSurfaceWayland::CalcRectScale(LayoutDeviceIntRect& aRect, int aScale) {
++ if (aRect.x & 0x1) {
++ aRect.width += 1;
++ }
++ aRect.x = aRect.x / aScale;
++
++ if (aRect.y & 0x1) {
++ aRect.height += 1;
++ }
++ aRect.y = aRect.y / aScale;
++
++ aRect.width = (aRect.width & 0x1) ? aRect.width / aScale + 1 :
++ aRect.width / aScale;
++ aRect.height = (aRect.height & 0x1) ? aRect.height / aScale + 1 :
++ aRect.height / aScale;
++}
++
+ void WindowSurfaceWayland::CommitWaylandBuffer() {
+ MOZ_ASSERT(mPendingCommit, "Committing empty surface!");
+
+ if (mWaitToFullScreenUpdate) {
+ return;
+ }
+
+ wl_surface* waylandSurface = mWindow->GetWaylandSurface();
+@@ -679,21 +696,23 @@ void WindowSurfaceWayland::CommitWayland
+ LayoutDeviceIntRect rect = mWindow->GetBounds();
+ wl_surface_damage(waylandSurface, 0, 0, rect.width, rect.height);
+ mWaylandBufferFullScreenDamage = false;
+ mNeedScaleFactorUpdate = true;
+ } else {
+ gint scaleFactor = mWindow->GdkScaleFactor();
+ for (auto iter = mWaylandBufferDamage.RectIter(); !iter.Done();
+ iter.Next()) {
+- const mozilla::LayoutDeviceIntRect& r = iter.Get();
++ mozilla::LayoutDeviceIntRect r = iter.Get();
+ // We need to remove the scale factor because the wl_surface_damage
+ // also multiplies by current scale factor.
+- wl_surface_damage(waylandSurface, r.x / scaleFactor, r.y / scaleFactor,
+- r.width / scaleFactor, r.height / scaleFactor);
++ if (scaleFactor > 1) {
++ CalcRectScale(r, scaleFactor);
++ }
++ wl_surface_damage(waylandSurface, r.x, r.y, r.width, r.height);
+ }
+ }
+
+ // Clear all back buffer damage as we're committing
+ // all requested regions.
+ mWaylandBufferDamage.SetEmpty();
+
+ mFrameCallback = wl_surface_frame(waylandSurface);
+diff --git a/widget/gtk/WindowSurfaceWayland.h b/widget/gtk/WindowSurfaceWayland.h
+--- a/widget/gtk/WindowSurfaceWayland.h
++++ b/widget/gtk/WindowSurfaceWayland.h
+@@ -96,16 +96,17 @@ class WindowSurfaceWayland : public Wind
+ WindowBackBuffer* GetWaylandBufferToDraw(int aWidth, int aHeight);
+
+ already_AddRefed<gfx::DrawTarget> LockWaylandBuffer(int aWidth, int aHeight,
+ bool aClearBuffer);
+ already_AddRefed<gfx::DrawTarget> LockImageSurface(
+ const gfx::IntSize& aLockSize);
+ bool CommitImageSurfaceToWaylandBuffer(const LayoutDeviceIntRegion& aRegion);
+ void CommitWaylandBuffer();
++ void CalcRectScale(LayoutDeviceIntRect& aRect, int scale);
+
+ // TODO: Do we need to hold a reference to nsWindow object?
+ nsWindow* mWindow;
+ nsWaylandDisplay* mWaylandDisplay;
+ WindowBackBuffer* mWaylandBuffer;
+ LayoutDeviceIntRegion mWaylandBufferDamage;
+ WindowBackBuffer* mBackupBuffer[BACK_BUFFER_NUM];
+ RefPtr<gfxImageSurface> mImageSurface;
+
diff --git a/mozilla-1517205.patch b/mozilla-1517205.patch
new file mode 100644
index 0000000..5f3fbf4
--- /dev/null
+++ b/mozilla-1517205.patch
@@ -0,0 +1,207 @@
+diff -up firefox-66.0.3/widget/gtk/mozcontainer.cpp.mozilla-1517205 firefox-66.0.3/widget/gtk/mozcontainer.cpp
+--- firefox-66.0.3/widget/gtk/mozcontainer.cpp.mozilla-1517205 2019-04-11 13:12:24.583232286 +0200
++++ firefox-66.0.3/widget/gtk/mozcontainer.cpp 2019-04-11 13:20:06.900192082 +0200
+@@ -609,7 +609,6 @@ struct wl_surface *moz_container_get_wl_
+
+ wl_surface_commit(container->surface);
+ wl_display_flush(waylandDisplay->GetDisplay());
+- WaylandDisplayRelease(waylandDisplay);
+ }
+
+ LOG(("moz_container_get_wl_surface() [%p] created surface %p\n",
+diff -up firefox-66.0.3/widget/gtk/nsClipboardWayland.cpp.mozilla-1517205 firefox-66.0.3/widget/gtk/nsClipboardWayland.cpp
+--- firefox-66.0.3/widget/gtk/nsClipboardWayland.cpp.mozilla-1517205 2019-04-09 22:00:47.000000000 +0200
++++ firefox-66.0.3/widget/gtk/nsClipboardWayland.cpp 2019-04-11 13:12:24.583232286 +0200
+@@ -639,7 +639,6 @@ static gboolean offer_hash_remove(gpoint
+ nsRetrievalContextWayland::~nsRetrievalContextWayland(void) {
+ g_hash_table_foreach_remove(mActiveOffers, offer_hash_remove, nullptr);
+ g_hash_table_destroy(mActiveOffers);
+- WaylandDisplayRelease(mDisplay);
+ }
+
+ GdkAtom *nsRetrievalContextWayland::GetTargets(int32_t aWhichClipboard,
+diff -up firefox-66.0.3/widget/gtk/nsWaylandDisplay.cpp.mozilla-1517205 firefox-66.0.3/widget/gtk/nsWaylandDisplay.cpp
+--- firefox-66.0.3/widget/gtk/nsWaylandDisplay.cpp.mozilla-1517205 2019-04-09 22:01:14.000000000 +0200
++++ firefox-66.0.3/widget/gtk/nsWaylandDisplay.cpp 2019-04-11 13:20:26.169157682 +0200
+@@ -19,6 +19,13 @@ namespace widget {
+ static nsWaylandDisplay *gWaylandDisplays[MAX_DISPLAY_CONNECTIONS];
+ static StaticMutex gWaylandDisplaysMutex;
+
++static void ReleaseDisplaysAtExit() {
++ for (int i = 0; i < MAX_DISPLAY_CONNECTIONS; i++) {
++ delete gWaylandDisplays[i];
++ gWaylandDisplays[i] = nullptr;
++ }
++}
++
+ // Each thread which is using wayland connection (wl_display) has to operate
+ // its own wl_event_queue. Main Firefox thread wl_event_queue is handled
+ // by Gtk main loop, other threads/wl_event_queue has to be handled by us.
+@@ -33,7 +40,6 @@ static nsWaylandDisplay *WaylandDisplayG
+ const StaticMutexAutoLock &) {
+ for (auto &display : gWaylandDisplays) {
+ if (display && display->Matches(aDisplay)) {
+- NS_ADDREF(display);
+ return display;
+ }
+ }
+@@ -41,7 +47,7 @@ static nsWaylandDisplay *WaylandDisplayG
+ for (auto &display : gWaylandDisplays) {
+ if (display == nullptr) {
+ display = new nsWaylandDisplay(aDisplay);
+- NS_ADDREF(display);
++ atexit(ReleaseDisplaysAtExit);
+ return display;
+ }
+ }
+@@ -65,26 +71,6 @@ nsWaylandDisplay *WaylandDisplayGet(GdkD
+ return WaylandDisplayGetLocked(display, lock);
+ }
+
+-static bool WaylandDisplayReleaseLocked(nsWaylandDisplay *aDisplay,
+- const StaticMutexAutoLock &) {
+- for (auto &display : gWaylandDisplays) {
+- if (display == aDisplay) {
+- int rc = display->Release();
+- if (rc == 0) {
+- display = nullptr;
+- }
+- return true;
+- }
+- }
+- MOZ_ASSERT(false, "Missing nsWaylandDisplay for this thread!");
+- return false;
+-}
+-
+-void WaylandDisplayRelease(nsWaylandDisplay *aDisplay) {
+- StaticMutexAutoLock lock(gWaylandDisplaysMutex);
+- WaylandDisplayReleaseLocked(aDisplay, lock);
+-}
+-
+ static void WaylandDisplayLoopLocked(wl_display *aDisplay,
+ const StaticMutexAutoLock &) {
+ for (auto &display : gWaylandDisplays) {
+@@ -128,6 +114,8 @@ static void global_registry_handler(void
+ uint32_t id, const char *interface,
+ uint32_t version) {
+ auto display = reinterpret_cast<nsWaylandDisplay *>(data);
++ if (!display)
++ return;
+
+ if (strcmp(interface, "wl_shm") == 0) {
+ auto shm = static_cast<wl_shm *>(
+@@ -178,9 +166,7 @@ bool nsWaylandDisplay::Matches(wl_displa
+ return mThreadId == PR_GetCurrentThread() && aDisplay == mDisplay;
+ }
+
+-NS_IMPL_ISUPPORTS(nsWaylandDisplay, nsISupports);
+-
+-nsWaylandDisplay::nsWaylandDisplay(wl_display *aDisplay)
++nsWaylandDisplay::nsWaylandDisplay(wl_display* aDisplay)
+ : mThreadId(PR_GetCurrentThread()),
+ mDisplay(aDisplay),
+ mEventQueue(nullptr),
+@@ -188,9 +174,10 @@ nsWaylandDisplay::nsWaylandDisplay(wl_di
+ mSubcompositor(nullptr),
+ mSeat(nullptr),
+ mShm(nullptr),
+- mPrimarySelectionDeviceManager(nullptr) {
+- wl_registry *registry = wl_display_get_registry(mDisplay);
+- wl_registry_add_listener(registry, &registry_listener, this);
++ mPrimarySelectionDeviceManager(nullptr),
++ mRegistry(nullptr) {
++ mRegistry = wl_display_get_registry(mDisplay);
++ wl_registry_add_listener(mRegistry, &registry_listener, this);
+
+ if (NS_IsMainThread()) {
+ // Use default event queue in main thread operated by Gtk+.
+@@ -201,17 +188,19 @@ nsWaylandDisplay::nsWaylandDisplay(wl_di
+ mEventQueue = wl_display_create_queue(mDisplay);
+ MessageLoop::current()->PostTask(NewRunnableFunction(
+ "WaylandDisplayLoop", &WaylandDisplayLoop, mDisplay));
+- wl_proxy_set_queue((struct wl_proxy *)registry, mEventQueue);
++ wl_proxy_set_queue((struct wl_proxy *)mRegistry, mEventQueue);
+ wl_display_roundtrip_queue(mDisplay, mEventQueue);
+ wl_display_roundtrip_queue(mDisplay, mEventQueue);
+ }
+ }
+
+ nsWaylandDisplay::~nsWaylandDisplay() {
+- MOZ_ASSERT(mThreadId == PR_GetCurrentThread());
+ // Owned by Gtk+, we don't need to release
+ mDisplay = nullptr;
+
++ wl_registry_destroy(mRegistry);
++ mRegistry = nullptr;
++
+ if (mEventQueue) {
+ wl_event_queue_destroy(mEventQueue);
+ mEventQueue = nullptr;
+diff -up firefox-66.0.3/widget/gtk/nsWaylandDisplay.h.mozilla-1517205 firefox-66.0.3/widget/gtk/nsWaylandDisplay.h
+--- firefox-66.0.3/widget/gtk/nsWaylandDisplay.h.mozilla-1517205 2019-04-09 22:01:13.000000000 +0200
++++ firefox-66.0.3/widget/gtk/nsWaylandDisplay.h 2019-04-11 13:12:24.584232284 +0200
+@@ -20,11 +20,10 @@ namespace widget {
+
+ // Our general connection to Wayland display server,
+ // holds our display connection and runs event loop.
+-class nsWaylandDisplay : public nsISupports {
+- NS_DECL_THREADSAFE_ISUPPORTS
+-
++class nsWaylandDisplay {
+ public:
+ explicit nsWaylandDisplay(wl_display* aDisplay);
++ virtual ~nsWaylandDisplay();
+
+ bool DisplayLoop();
+ bool Matches(wl_display* aDisplay);
+@@ -41,7 +40,6 @@ class nsWaylandDisplay : public nsISuppo
+ return mPrimarySelectionDeviceManager;
+ };
+
+- public:
+ void SetShm(wl_shm* aShm);
+ void SetSubcompositor(wl_subcompositor* aSubcompositor);
+ void SetDataDeviceManager(wl_data_device_manager* aDataDeviceManager);
+@@ -49,9 +47,7 @@ class nsWaylandDisplay : public nsISuppo
+ void SetPrimarySelectionDeviceManager(
+ gtk_primary_selection_device_manager* aPrimarySelectionDeviceManager);
+
+- private:
+- virtual ~nsWaylandDisplay();
+-
++private:
+ PRThread* mThreadId;
+ wl_display* mDisplay;
+ wl_event_queue* mEventQueue;
+@@ -60,10 +56,10 @@ class nsWaylandDisplay : public nsISuppo
+ wl_seat* mSeat;
+ wl_shm* mShm;
+ gtk_primary_selection_device_manager* mPrimarySelectionDeviceManager;
++ wl_registry *mRegistry;
+ };
+
+ nsWaylandDisplay* WaylandDisplayGet(GdkDisplay* aGdkDisplay = nullptr);
+-void WaylandDisplayRelease(nsWaylandDisplay* aDisplay);
+
+ } // namespace widget
+ } // namespace mozilla
+diff -up firefox-66.0.3/widget/gtk/WindowSurfaceWayland.cpp.mozilla-1517205 firefox-66.0.3/widget/gtk/WindowSurfaceWayland.cpp
+--- firefox-66.0.3/widget/gtk/WindowSurfaceWayland.cpp.mozilla-1517205 2019-04-11 13:12:24.577232301 +0200
++++ firefox-66.0.3/widget/gtk/WindowSurfaceWayland.cpp 2019-04-11 13:12:24.583232286 +0200
+@@ -413,16 +413,6 @@ WindowSurfaceWayland::~WindowSurfaceWayl
+ delete mBackupBuffer[i];
+ }
+ }
+-
+- if (!mIsMainThread) {
+- // We can be destroyed from main thread even though we was created/used
+- // in compositor thread. We have to unref/delete WaylandDisplay in
+- // compositor thread then and we can't use MessageLoop::current() here.
+- mDisplayThreadMessageLoop->PostTask(NewRunnableFunction(
+- "WaylandDisplayRelease", &WaylandDisplayRelease, mWaylandDisplay));
+- } else {
+- WaylandDisplayRelease(mWaylandDisplay);
+- }
+ }
+
+ WindowBackBuffer* WindowSurfaceWayland::GetWaylandBufferToDraw(int aWidth,
diff --git a/sources b/sources
index a753462..a59b0b4 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
SHA512 (cbindgen-vendor.tar.xz) = b6737ca86e6223bb9e25861dae05e18469aecbeaa74d0d24719f531b01c74b9a00d9ba4e7faf6366e98cb7f0bdbeedfc337b739fff60bb3d22faabe9751f7ded
-SHA512 (firefox-66.0.2.source.tar.xz) = 2246f3aed4e8a1d557a2383204e926c45d63d7977032512982b3698da4d6260b67fa91507f1a103af0af77198b7ffb34d6609159729aa7bf1c7c16cf2f7efc5b
-SHA512 (firefox-langpacks-66.0.2-20190401.tar.xz) = 7976d5b1de7f3068a0f10c9106cf2e1700af8aa07972b542afac3a78aeb3713e656b4866ff1811e6753e2abe0e172d425db9430d18427997aba572efa9ebc15f
+SHA512 (firefox-langpacks-66.0.3-20190410.tar.xz) = f8bec6c39172def4d12c67be7aa6069b558d5c9b430d338124cb9d2aeb012a692669588028bf04d7ca318d7cf233a99758de893a69751af9dde21fc25aa9565c
+SHA512 (firefox-66.0.3.source.tar.xz) = e857408ffa4acb8676fe3f40cbbdf6c8f0913c6392568cdea8783a94140a4fdff95d117d1a1bfe890097833230b72729f58cdb1df2b552533bb21bd1fe7d77c3
bgstack15