Index: www/firefox/Makefile =================================================================== --- www/firefox/Makefile +++ www/firefox/Makefile @@ -2,23 +2,23 @@ # $FreeBSD$ PORTNAME= firefox -DISTVERSION= 75.0 -PORTREVISION= 1 +DISTVERSION= 76.0b4 PORTEPOCH= 1 CATEGORIES= www MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \ - MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build3/source -DISTFILES= ${DISTNAME}.source${EXTRACT_SUFX} + MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source +DISTNAME= ${PORTNAME}-${PORTVERSION:R} +DISTFILES= ${DISTNAME}${PORTVERSION:E}.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.51:security/nss \ + nss>=3.51.1: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 \ + graphite2>=1.3.14:graphics/graphite2 \ png>=1.6.35:graphics/png \ libvpx>=1.8.2:multimedia/libvpx \ py${PYTHON3_DEFAULT:S/.//}-sqlite3>0:databases/py-sqlite3@py${PYTHON3_DEFAULT:S/.//} \ Index: www/firefox/distinfo =================================================================== --- www/firefox/distinfo +++ www/firefox/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1585942574 -SHA256 (firefox-75.0.source.tar.xz) = bbb1054d8f2717c634480556d3753a8483986af7360e023bb6232df80b746b0f -SIZE (firefox-75.0.source.tar.xz) = 324614064 +TIMESTAMP = 1586743872 +SHA256 (firefox-76.0b4.source.tar.xz) = 7c01764faefcb01c77d876948355bcbb22f3676ad13be021d192c99c5b63807b +SIZE (firefox-76.0b4.source.tar.xz) = 322689008 Index: www/firefox/files/patch-bug1288587 =================================================================== --- www/firefox/files/patch-bug1288587 +++ www/firefox/files/patch-bug1288587 @@ -23,7 +23,7 @@ log.debug("python2: executable from configuration: %r" % python) -@@ -358,7 +365,10 @@ def virtualenv_python2(env_python, build_env, mozillab +@@ -365,7 +372,10 @@ def virtualenv_python2(env_python, build_env, mozillab sys.executable, manager.python_path)) log.info('Reexecuting in the virtualenv') if env_python: @@ -35,7 +35,7 @@ # One would prefer to use os.execl, but that's completely borked on # Windows. sys.exit(subprocess.call([python] + sys.argv)) -@@ -460,6 +470,7 @@ option(env='PYTHON3', nargs=1, help='Python 3 interpre +@@ -468,6 +478,7 @@ option(env='PYTHON3', nargs=1, help='Python 3 interpre @imports(_from='mozbuild.pythonutil', _import='find_python3_executable') @imports(_from='mozbuild.pythonutil', _import='python_executable_version') @imports(_from='six', _import='ensure_text') @@ -43,7 +43,7 @@ def virtualenv_python3(env_python, build_env, mozillabuild, mozconfig, help): if help: return -@@ -495,6 +506,12 @@ def virtualenv_python3(env_python, build_env, mozillab +@@ -503,6 +514,12 @@ def virtualenv_python3(env_python, build_env, mozillab python = mozconfig['vars']['added']['PYTHON3'] elif 'PYTHON3' in mozconfig['vars']['modified']: python = mozconfig['vars']['modified']['PYTHON3'][1] @@ -56,7 +56,7 @@ log.debug("python3: executable from configuration: %r" % python) -@@ -575,7 +592,10 @@ def virtualenv_python3(env_python, build_env, mozillab +@@ -583,7 +600,10 @@ def virtualenv_python3(env_python, build_env, mozillab sys.executable, manager.python_path)) log.info('Re-executing in the virtualenv') if env_python: @@ -65,6 +65,6 @@ + del os.environ['PYTHON3'] + except KeyError: + pass - # One would prefer to use os.execl, but that's completely borked on - # Windows. - sys.exit(subprocess.call([python] + sys.argv)) + # Homebrew on macOS will change Python's sys.executable to a custom + # value which messes with mach's virtualenv handling code. Override + # Homebrew's changes with the correct sys.executable value. Index: www/firefox/files/patch-bug1550891 =================================================================== --- www/firefox/files/patch-bug1550891 +++ www/firefox/files/patch-bug1550891 @@ -72,10 +72,10 @@ #else // Generic Unix: shm_open + shm_unlink do { -@@ -275,6 +282,13 @@ bool SharedMemory::Freeze() { - CHROMIUM_LOG(WARNING) << "failed to freeze shm: " << strerror(errno); +@@ -277,6 +284,14 @@ bool SharedMemory::ReadOnlyCopy(SharedMemory* ro_out) { return false; } + ro_file = mapped_file_; +#elif defined(__FreeBSD__) + cap_rights_t rights; + cap_rights_init(&rights, CAP_MMAP_R); @@ -83,6 +83,7 @@ + CHROMIUM_LOG(WARNING) << "failed to freeze shm: " << strerror(errno); + return false; + } ++ ro_file = mapped_file_; #else DCHECK(frozen_file_ >= 0); DCHECK(mapped_file_ >= 0); Index: www/firefox/files/patch-bug1612377 =================================================================== --- www/firefox/files/patch-bug1612377 +++ /dev/null @@ -1,210 +0,0 @@ -commit f30e2a9e31fa -Author: Martin Stransky -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> 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 -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& 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( Index: www/firefox/files/patch-bug1619258 =================================================================== --- www/firefox/files/patch-bug1619258 +++ /dev/null @@ -1,101 +0,0 @@ -commit 7f9b73f61241 -Author: Martin Stransky -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::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::CreateVAAPIDeviceContext() { - - MediaResult FFmpegVideoDecoder::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 FFmpegVideoDecoder::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::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::ProcessShutdown() { - FFmpegDataDecoder::ProcessShutdown(); - } - -+#ifdef MOZ_WAYLAND_USE_VAAPI -+bool FFmpegVideoDecoder::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 - 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); Index: www/firefox/files/patch-bug1622551 =================================================================== --- www/firefox/files/patch-bug1622551 +++ /dev/null @@ -1,28 +0,0 @@ -Silence Service.profiler errors on Tier3 after bug 1613390 - -diff --git browser/components/BrowserGlue.jsm browser/components/BrowserGlue.jsm -index 8f86bf0584a99..2ce53c6921d15 100644 ---- browser/components/BrowserGlue.jsm -+++ browser/components/BrowserGlue.jsm -@@ -2300,7 +2300,9 @@ BrowserGlue.prototype = { - ChromeUtils.idleDispatch( - () => { - if (!Services.startup.shuttingDown) { -- Services.profiler.AddMarker("startupIdleTask"); -+ if (Services.profiler) { -+ Services.profiler.AddMarker("startupIdleTask"); -+ } - try { - task.task(); - } catch (ex) { -@@ -2371,7 +2373,9 @@ BrowserGlue.prototype = { - for (let task of idleTasks) { - ChromeUtils.idleDispatch(() => { - if (!Services.startup.shuttingDown) { -- Services.profiler.AddMarker("startupLateIdleTask"); -+ if (Services.profiler) { -+ Services.profiler.AddMarker("startupLateIdleTask"); -+ } - try { - task(); - } catch (ex) { Index: www/firefox/files/patch-bug847568 =================================================================== --- www/firefox/files/patch-bug847568 +++ www/firefox/files/patch-bug847568 @@ -227,7 +227,7 @@ + * 100 + GR2_VERSION_BUGFIX >= \ + (major) * 10000 + (minor) * 100 + (bugfix) ) + ], [ -+ #if !GR2_VERSION_REQUIRE(1,3,13) ++ #if !GR2_VERSION_REQUIRE(1,3,14) + #error "Insufficient graphite2 version." + #endif + ], [],