Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Mar 2020 20:32:40 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r530013 - in head: Mk www/firefox www/firefox/files
Message-ID:  <202003312032.02VKWeio070118@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Tue Mar 31 20:32:40 2020
New Revision: 530013
URL: https://svnweb.freebsd.org/changeset/ports/530013

Log:
  www/firefox: update to 75.0
  
  Changes:	https://www.mozilla.org/firefox/75.0/releasenotes/
  PR:		244793
  Security:	98c69f9a-856b-4180-8f0b-11846626c6cc
  Differential Revision:	https://reviews.freebsd.org/D24062

Added:
  head/www/firefox/files/patch-bug1612377   (contents, props changed)
  head/www/firefox/files/patch-bug1619258   (contents, props changed)
Deleted:
  head/www/firefox/files/patch-bug1594027
  head/www/firefox/files/patch-bug1607052
Modified:
  head/Mk/bsd.gecko.mk   (contents, props changed)
  head/www/firefox/Makefile   (contents, props changed)
  head/www/firefox/distinfo   (contents, props changed)

Modified: head/Mk/bsd.gecko.mk
==============================================================================
--- head/Mk/bsd.gecko.mk	Tue Mar 31 20:25:18 2020	(r530012)
+++ head/Mk/bsd.gecko.mk	Tue Mar 31 20:32:40 2020	(r530013)
@@ -76,8 +76,8 @@ LDFLAGS+=		-Wl,--as-needed
 BUNDLE_LIBS=	yes
 
 BUILD_DEPENDS+=	llvm${LLVM_DEFAULT}>0:devel/llvm${LLVM_DEFAULT} \
-				rust-cbindgen>=0.13.0:devel/rust-cbindgen \
-				${RUST_DEFAULT}>=1.39:lang/${RUST_DEFAULT} \
+				rust-cbindgen>=0.13.1:devel/rust-cbindgen \
+				${RUST_DEFAULT}>=1.41:lang/${RUST_DEFAULT} \
 				${LOCALBASE}/bin/python${PYTHON3_DEFAULT}:lang/python${PYTHON3_DEFAULT:S/.//g} \
 				node:www/node
 MOZ_EXPORT+=	${CONFIGURE_ENV} \

Modified: head/www/firefox/Makefile
==============================================================================
--- head/www/firefox/Makefile	Tue Mar 31 20:25:18 2020	(r530012)
+++ head/www/firefox/Makefile	Tue Mar 31 20:32:40 2020	(r530013)
@@ -2,33 +2,34 @@
 # $FreeBSD$
 
 PORTNAME=	firefox
-DISTVERSION=	74.0
-PORTREVISION=	6
+DISTVERSION=	75.0
 PORTEPOCH=	1
 CATEGORIES=	www
 MASTER_SITES=	MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
-		MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build3/source
+		MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source
 DISTFILES=	${DISTNAME}.source${EXTRACT_SUFX}
 
 MAINTAINER=	gecko@FreeBSD.org
 COMMENT=	Web browser based on the browser portion of Mozilla
 
 BUILD_DEPENDS=	nspr>=4.25:devel/nspr \
-		nss>=3.50:security/nss \
+		nss>=3.51:security/nss \
 		icu>=64.1,1:devel/icu \
 		libevent>=2.1.8:devel/libevent \
 		harfbuzz>=2.6.4:print/harfbuzz \
 		graphite2>=1.3.13:graphics/graphite2 \
 		png>=1.6.35:graphics/png \
-		libvpx>=1.5.0:multimedia/libvpx \
+		libvpx>=1.8.2:multimedia/libvpx \
+		py${PYTHON3_DEFAULT:S/.//}-sqlite3>0:databases/py-sqlite3@py${PYTHON3_DEFAULT:S/.//} \
 		v4l_compat>0:multimedia/v4l_compat \
 		autoconf-2.13:devel/autoconf213 \
 		nasm:devel/nasm \
+		yasm:devel/yasm \
 		zip:archivers/zip
 
 USE_GECKO=	gecko
 CONFLICTS_INSTALL=	firefox-esr
-USE_MOZILLA=	-sqlite -vpx
+USE_MOZILLA=	-sqlite
 
 USES=		tar:xz
 

Modified: head/www/firefox/distinfo
==============================================================================
--- head/www/firefox/distinfo	Tue Mar 31 20:25:18 2020	(r530012)
+++ head/www/firefox/distinfo	Tue Mar 31 20:32:40 2020	(r530013)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1583759447
-SHA256 (firefox-74.0.source.tar.xz) = 74589c2836d7c30134636823c3caefbcaed0ea7c3abb2def9e3ddd9f86d9440a
-SIZE (firefox-74.0.source.tar.xz) = 320001124
+TIMESTAMP = 1585679097
+SHA256 (firefox-75.0.source.tar.xz) = a8eefcc4dca2d90ffac24ecd307eecde912b1cf3d5dc0207b18c9f3eeaca3747
+SIZE (firefox-75.0.source.tar.xz) = 322506492

Added: head/www/firefox/files/patch-bug1612377
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/firefox/files/patch-bug1612377	Tue Mar 31 20:32:40 2020	(r530013)
@@ -0,0 +1,210 @@
+commit f30e2a9e31fa
+Author: Martin Stransky <stransky@redhat.com>
+Date:   Thu Mar 26 12:12:40 2020 +0000
+
+    Bug 1612377 [Wayland] Remove moz_container_set_accelerated(), r=jhorak
+    
+    Differential Revision: https://phabricator.services.mozilla.com/D68351
+    
+    --HG--
+    extra : moz-landing-system : lando
+---
+ widget/gtk/mozcontainer.cpp | 7 +------
+ widget/gtk/mozcontainer.h   | 2 --
+ widget/gtk/nsWindow.cpp     | 1 -
+ 3 files changed, 1 insertion(+), 9 deletions(-)
+
+diff --git widget/gtk/mozcontainer.cpp widget/gtk/mozcontainer.cpp
+index 0c3833bc8ce3e..d438b67f9baea 100644
+--- widget/gtk/mozcontainer.cpp
++++ widget/gtk/mozcontainer.cpp
+@@ -230,7 +230,6 @@ void moz_container_init(MozContainer* container) {
+   container->subsurface_dy = 0;
+   container->surface_position_needs_update = 0;
+   container->initial_draw_cbs.clear();
+-  container->is_accelerated = false;
+ #endif
+ 
+   LOG(("%s [%p]\n", __FUNCTION__, (void*)container));
+@@ -694,14 +693,10 @@ void moz_container_update_opaque_region(MozContainer* container,
+   // When GL compositor / WebRender is used,
+   // moz_container_get_wl_egl_window() is called only once when window
+   // is created or resized so update opaque region now.
+-  if (container->is_accelerated) {
++  if (moz_container_has_wl_egl_window(container)) {
+     moz_container_set_opaque_region(container);
+   }
+ }
+-
+-void moz_container_set_accelerated(MozContainer* container) {
+-  container->is_accelerated = true;
+-}
+ #endif
+ 
+ void moz_container_force_default_visual(MozContainer* container) {
+diff --git widget/gtk/mozcontainer.h widget/gtk/mozcontainer.h
+index 6befb992515dc..885dce5c27a1a 100644
+--- widget/gtk/mozcontainer.h
++++ widget/gtk/mozcontainer.h
+@@ -87,7 +87,6 @@ struct _MozContainer {
+   gboolean surface_needs_clear;
+   gboolean ready_to_draw;
+   std::vector<std::function<void(void)>> initial_draw_cbs;
+-  gboolean is_accelerated;
+ #endif
+   gboolean force_default_visual;
+ };
+@@ -121,7 +120,6 @@ wl_surface* moz_gtk_widget_get_wl_surface(GtkWidget* aWidget);
+ void moz_container_update_opaque_region(MozContainer* container,
+                                         bool aSubtractCorners,
+                                         bool aFullScreen);
+-void moz_container_set_accelerated(MozContainer* container);
+ #endif
+ 
+ #endif /* __MOZ_CONTAINER_H__ */
+diff --git widget/gtk/nsWindow.cpp widget/gtk/nsWindow.cpp
+index 728c1ed7d3226..dbcd8b8ae4941 100644
+--- widget/gtk/nsWindow.cpp
++++ widget/gtk/nsWindow.cpp
+@@ -4138,7 +4138,6 @@ nsresult nsWindow::Create(nsIWidget* aParent, nsNativeWidget aNativeParent,
+           self->mNeedsCompositorResume = true;
+           self->MaybeResumeCompositor();
+         });
+-        moz_container_set_accelerated(mContainer);
+       }
+ #endif
+ 
+
+commit 4d1730dd79f9
+Author: Martin Stransky <stransky@redhat.com>
+Date:   Thu Mar 26 12:12:48 2020 +0000
+
+    Bug 1612377 [Wayland] Update opaque region and widget scale factor when screen DPI changes, r=jhorak
+    
+    - Integrate scale factor setup to moz_container_get_wl_surface() and don't call it explicitly.
+    - No need to set it explicitly at nsWindow::GetWaylandSurface().
+    - Update client offset when scale changes in CSD mode by UpdateClientOffsetFromCSDWindow().
+    - Update scale factor/opaque region on EGL immediately.
+    
+    Differential Revision: https://phabricator.services.mozilla.com/D68352
+    
+    --HG--
+    extra : moz-landing-system : lando
+---
+ widget/gtk/mozcontainer.cpp | 19 ++++++++++++++++++-
+ widget/gtk/mozcontainer.h   |  3 +--
+ widget/gtk/nsWindow.cpp     | 29 ++++++++++++++++++++++-------
+ 3 files changed, 41 insertions(+), 10 deletions(-)
+
+diff --git widget/gtk/mozcontainer.cpp widget/gtk/mozcontainer.cpp
+index d438b67f9baea..eff25264d5678 100644
+--- widget/gtk/mozcontainer.cpp
++++ widget/gtk/mozcontainer.cpp
+@@ -595,6 +595,22 @@ static void moz_container_set_opaque_region(MozContainer* container) {
+   container->opaque_region_needs_update = false;
+ }
+ 
++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;
++}
++
++void moz_container_set_scale_factor(MozContainer* container) {
++  if (!container->surface) {
++    return;
++  }
++  wl_surface_set_buffer_scale(container->surface,
++                              moz_gtk_widget_get_scale_factor(container));
++}
++
+ struct wl_surface* moz_container_get_wl_surface(MozContainer* container) {
+   LOGWAYLAND(("%s [%p] surface %p ready_to_draw %d\n", __FUNCTION__,
+               (void*)container, (void*)container->surface,
+@@ -645,6 +661,8 @@ struct wl_surface* moz_container_get_wl_surface(MozContainer* container) {
+   }
+ 
+   moz_container_set_opaque_region(container);
++  moz_container_set_scale_factor(container);
++
+   return container->surface;
+ }
+ 
+@@ -659,7 +677,6 @@ struct wl_egl_window* moz_container_get_wl_egl_window(MozContainer* container,
+   if (!surface) {
+     return nullptr;
+   }
+-  wl_surface_set_buffer_scale(surface, scale);
+   if (!container->eglwindow) {
+     GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(container));
+     container->eglwindow =
+diff --git widget/gtk/mozcontainer.h widget/gtk/mozcontainer.h
+index 885dce5c27a1a..8d40560cf634b 100644
+--- widget/gtk/mozcontainer.h
++++ widget/gtk/mozcontainer.h
+@@ -112,8 +112,7 @@ void moz_container_move_resize(MozContainer* container, int dx, int dy,
+                                int width, int height);
+ void moz_container_egl_window_set_size(MozContainer* container, int width,
+                                        int height);
+-void moz_container_scale_changed(MozContainer* container,
+-                                 GtkAllocation* aAllocation);
++void moz_container_set_scale_factor(MozContainer* container);
+ void moz_container_add_initial_draw_callback(
+     MozContainer* container, const std::function<void(void)>& initial_draw_cb);
+ wl_surface* moz_gtk_widget_get_wl_surface(GtkWidget* aWidget);
+diff --git widget/gtk/nsWindow.cpp widget/gtk/nsWindow.cpp
+index dbcd8b8ae4941..be9c29a02ba32 100644
+--- widget/gtk/nsWindow.cpp
++++ widget/gtk/nsWindow.cpp
+@@ -2713,7 +2713,7 @@ gboolean nsWindow::OnConfigureEvent(GtkWidget* aWidget,
+     OnSizeAllocate(&allocation);
+   }
+ 
+-  // Client offset are upated by _NET_FRAME_EXTENTS on X11 when system titlebar
++  // Client offset are updated by _NET_FRAME_EXTENTS on X11 when system titlebar
+   // is enabled. In ither cases (Wayland or system titlebar is off on X11)
+   // we don't get _NET_FRAME_EXTENTS X11 property notification so we derive
+   // it from mContainer position.
+@@ -3689,6 +3689,26 @@ void nsWindow::OnScaleChanged(GtkAllocation* aAllocation) {
+   // configure_event is already fired before scale-factor signal,
+   // but size-allocate isn't fired by changing scale
+   OnSizeAllocate(aAllocation);
++
++  // Client offset are updated by _NET_FRAME_EXTENTS on X11 when system titlebar
++  // is enabled. In ither cases (Wayland or system titlebar is off on X11)
++  // we don't get _NET_FRAME_EXTENTS X11 property notification so we derive
++  // it from mContainer position.
++  if (mCSDSupportLevel == CSD_SUPPORT_CLIENT) {
++    if (!mIsX11Display || (mIsX11Display && mDrawInTitlebar)) {
++      UpdateClientOffsetFromCSDWindow();
++    }
++  }
++
++#ifdef MOZ_WAYLAND
++  // We need to update scale and opaque region when scale of egl window
++  // is changed.
++  if (mContainer && moz_container_has_wl_egl_window(mContainer)) {
++    moz_container_set_scale_factor(mContainer);
++    LayoutDeviceIntRegion tmpRegion;
++    UpdateOpaqueRegion(tmpRegion);
++  }
++#endif
+ }
+ 
+ void nsWindow::DispatchDragEvent(EventMessage aMsg,
+@@ -7618,12 +7638,7 @@ void nsWindow::GetCompositorWidgetInitData(
+ #ifdef MOZ_WAYLAND
+ wl_surface* nsWindow::GetWaylandSurface() {
+   if (mContainer) {
+-    struct wl_surface* surface =
+-        moz_container_get_wl_surface(MOZ_CONTAINER(mContainer));
+-    if (surface != NULL) {
+-      wl_surface_set_buffer_scale(surface, GdkScaleFactor());
+-    }
+-    return surface;
++    return moz_container_get_wl_surface(MOZ_CONTAINER(mContainer));
+   }
+ 
+   NS_WARNING(

Added: head/www/firefox/files/patch-bug1619258
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/firefox/files/patch-bug1619258	Tue Mar 31 20:32:40 2020	(r530013)
@@ -0,0 +1,101 @@
+commit 7f9b73f61241
+Author: Martin Stransky <stransky@redhat.com>
+Date:   Wed Mar 18 07:01:27 2020 +0000
+
+    Bug 1619258 [Wayland] Enable VA-API for all formats, r=jya
+    
+    Differential Revision: https://phabricator.services.mozilla.com/D65536
+    
+    --HG--
+    extra : moz-landing-system : lando
+---
+ dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp | 30 ++++++++++++++---------
+ dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h   |  1 +
+ 2 files changed, 20 insertions(+), 11 deletions(-)
+
+diff --git dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
+index 9a71a681eaef5..e0f7504574d6c 100644
+--- dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
++++ dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
+@@ -42,6 +42,9 @@ typedef int VAStatus;
+ #  define VA_STATUS_SUCCESS 0x00000000
+ #endif
+ 
++// Use some extra HW frames for potential rendering lags.
++#define EXTRA_HW_FRAMES 6
++
+ typedef mozilla::layers::Image Image;
+ typedef mozilla::layers::PlanarYCbCrImage PlanarYCbCrImage;
+ 
+@@ -135,10 +138,6 @@ VAAPIFrameHolder::~VAAPIFrameHolder() {
+ }
+ 
+ AVCodec* FFmpegVideoDecoder<LIBAV_VER>::FindVAAPICodec() {
+-  if (mCodecID != AV_CODEC_ID_H264) {
+-    return nullptr;
+-  }
+-
+   AVCodec* decoder = mLib->avcodec_find_decoder(mCodecID);
+   for (int i = 0;; i++) {
+     const AVCodecHWConfig* config = mLib->avcodec_get_hw_config(decoder, i);
+@@ -172,7 +171,6 @@ bool FFmpegVideoDecoder<LIBAV_VER>::CreateVAAPIDeviceContext() {
+ 
+ MediaResult FFmpegVideoDecoder<LIBAV_VER>::InitVAAPIDecoder() {
+   FFMPEG_LOG("Initialising VA-API FFmpeg decoder");
+-  MOZ_ASSERT(mCodecID == AV_CODEC_ID_H264);
+ 
+   if (!mLib->IsVAAPIAvailable()) {
+     FFMPEG_LOG("libva library is missing");
+@@ -282,11 +280,9 @@ RefPtr<MediaDataDecoder::InitPromise> FFmpegVideoDecoder<LIBAV_VER>::Init() {
+   MediaResult rv;
+ 
+ #ifdef MOZ_WAYLAND_USE_VAAPI
+-  if (mCodecID == AV_CODEC_ID_H264) {
+-    rv = InitVAAPIDecoder();
+-    if (NS_SUCCEEDED(rv)) {
+-      return InitPromise::CreateAndResolve(TrackInfo::kVideoTrack, __func__);
+-    }
++  rv = InitVAAPIDecoder();
++  if (NS_SUCCEEDED(rv)) {
++    return InitPromise::CreateAndResolve(TrackInfo::kVideoTrack, __func__);
+   }
+ #endif
+ 
+@@ -338,7 +334,12 @@ void FFmpegVideoDecoder<LIBAV_VER>::InitVAAPICodecContext() {
+   mCodecContext->height = mInfo.mImage.height;
+   mCodecContext->thread_count = 1;
+   mCodecContext->get_format = ChooseVAAPIPixelFormat;
+-  mCodecContext->extra_hw_frames = H264::ComputeMaxRefFrames(mInfo.mExtraData);
++  if (mCodecID == AV_CODEC_ID_H264) {
++    mCodecContext->extra_hw_frames =
++        H264::ComputeMaxRefFrames(mInfo.mExtraData);
++  } else {
++    mCodecContext->extra_hw_frames = EXTRA_HW_FRAMES;
++  }
+ }
+ #endif
+ 
+@@ -697,4 +698,11 @@ void FFmpegVideoDecoder<LIBAV_VER>::ProcessShutdown() {
+   FFmpegDataDecoder<LIBAV_VER>::ProcessShutdown();
+ }
+ 
++#ifdef MOZ_WAYLAND_USE_VAAPI
++bool FFmpegVideoDecoder<LIBAV_VER>::IsHardwareAccelerated(
++    nsACString& aFailureReason) const {
++  return !!mVAAPIDeviceContext;
++}
++#endif
++
+ }  // namespace mozilla
+diff --git dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h
+index 6158f7bc2f6dd..670cb6203dde0 100644
+--- dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h
++++ dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h
+@@ -92,6 +92,7 @@ class FFmpegVideoDecoder<LIBAV_VER>
+   bool CreateVAAPIDeviceContext();
+   void InitVAAPICodecContext();
+   AVCodec* FindVAAPICodec();
++  bool IsHardwareAccelerated(nsACString& aFailureReason) const override;
+ 
+   MediaResult CreateImageVAAPI(int64_t aOffset, int64_t aPts, int64_t aDuration,
+                                MediaDataDecoder::DecodedData& aResults);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202003312032.02VKWeio070118>