diff --git a/Mk/Uses/qt-dist.mk b/Mk/Uses/qt-dist.mk index d63794857ac3..de81ae118073 100644 --- a/Mk/Uses/qt-dist.mk +++ b/Mk/Uses/qt-dist.mk @@ -85,7 +85,11 @@ _QT6_MASTER_SITES= ${MASTER_SITE_QT} _QT6_MASTER_SITE_SUBDIR= official_releases/qt/${_QT_VERSION:R}/${_QT_VERSION}/submodules \ official_releases/additional_libraries/${_QT_VERSION:R}/${_QT_VERSION}/ # Qt5 specific distnames +. if ${_QT_DIST} == webengine +_QT5_DISTNAME= ${_QT_DIST:S,^,qt,:S,$,-everywhere-opensource-src-${DISTVERSION},} +. else _QT5_DISTNAME= ${_QT_DIST:S,^,qt,:S,$,-everywhere-src-${DISTVERSION},} +. endif _QT5_DISTNAME_kde= ${_QT_DIST:S,^,kde-qt,:S,$,-${DISTVERSION},} # Qt6 specific distnames _QT6_DISTNAME= ${_QT_DIST:S,^,qt,:S,$,-everywhere-src-${DISTVERSION},} diff --git a/www/qt5-webengine/Makefile b/www/qt5-webengine/Makefile index 780c8d924d23..1868b13c8b96 100644 --- a/www/qt5-webengine/Makefile +++ b/www/qt5-webengine/Makefile @@ -16,7 +16,7 @@ PORTNAME= webengine DISTVERSION= ${QT5_VERSION} -PORTREVISION= 8 +PORTREVISION= 0 CATEGORIES= www PKGNAMEPREFIX= qt5- @@ -24,7 +24,6 @@ MAINTAINER= kde@FreeBSD.org COMMENT= Qt 5 library to render web content BUILD_DEPENDS= bison:devel/bison \ - yasm:devel/yasm \ ${LOCALBASE}/include/linux/input.h:devel/evdev-proto \ ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg \ @@ -38,6 +37,7 @@ LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg \ liblcms2.so:graphics/lcms2 \ libnspr4.so:devel/nspr \ libnss3.so:security/nss \ + libopenh264.so:multimedia/openh264 \ libopus.so:audio/opus \ libpci.so:devel/libpci \ libpng.so:graphics/png \ @@ -47,7 +47,16 @@ LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg \ libwebp.so:graphics/webp DISTINFO_FILE= ${.CURDIR}/distinfo -QT5_VERSION= 5.15.2 +QT5_VERSION= 5.15.8 + +# Add extra-patch-no-mempcpy-nasm only when there's no mempcpy() in base. +# Nested variable expansion avoids executing the test when not needed for +# expanding EXTRA_PATCHES. +# mempcpy was introduced in ee37f64cf875255338f917a9da76c643cf59786c +EXTRA_PATCHES+= ${"${:!${GREP} mempcpy ${CROSS_SYSROOT}/usr/include/string.h \ + || ${TRUE}!}" == "":?${PATCHDIR}/extra-patch-no-mempcpy-nasm:} + +WRKSRC= ${WRKDIR}/qtwebengine-everywhere-src-${DISTVERSION} OPTIONS_SINGLE= AUDIO OPTIONS_SINGLE_AUDIO= ALSA PULSEAUDIO SNDIO @@ -71,15 +80,16 @@ SNDIO_VARS_OFF= QMAKE_CONFIGURE_ARGS+=-no-sndio # We pass `norecursive' to USES=qmake because src/plugins/plugins.pro checks # whether webenginewidgets is available, which fails when qmake processes all # .pro files at once. -USES= gl gnome gperf jpeg ninja:build pkgconfig python:2.7,build \ - qmake:norecursive,outsource qt-dist:5,webengine shebangfix xorg +USES= gl gnome gperf jpeg minizip ninja:build nodejs:build,lts \ + pkgconfig python:2.7,build qmake:norecursive,outsource \ + qt-dist:5,webengine shebangfix xorg USE_GL= gl USE_GNOME= glib20 libxml2 libxslt USE_QT= core declarative gui location network printsupport \ webchannel widgets \ buildtools:build designer:build qmake:build -USE_XORG= x11 xcb xcomposite xcursor xdamage xext xfixes xi xorgproto \ - xrandr xrender xscrnsaver xtst +USE_XORG= x11 xcb xcomposite xcursor xdamage xext xfixes xi xkbfile \ + xorgproto xrandr xrender xscrnsaver xtst QMAKE_CONFIGURE_ARGS= -proprietary-codecs -system-ffmpeg @@ -132,10 +142,10 @@ post-extract-SNDIO-on: post-patch: @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \ ${WRKSRC}/src/3rdparty/chromium/base/linux_util.cc \ + ${WRKSRC}/src/3rdparty/chromium/base/test/BUILD.gn \ ${WRKSRC}/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni \ ${WRKSRC}/src/3rdparty/chromium/chrome/common/chrome_paths.cc \ ${WRKSRC}/src/3rdparty/chromium/third_party/pdfium/core/fxge/fx_ge_linux.cpp \ - ${WRKSRC}/src/3rdparty/chromium/third_party/pdfium/xfa/fgas/font/cfx_fontsourceenum_file.cpp \ ${WRKSRC}/src/3rdparty/gn/build/gen.py .if ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} || ${ARCH} == sparc64 @@ -149,8 +159,9 @@ pre-configure: # $LOCALBASE/bin/python being python3 if the default versions is set to 3.x. ${MKDIR} ${CONFIGURE_WRKSRC}/bin && ${LN} -s ${PYTHON_CMD} ${CONFIGURE_WRKSRC}/bin/python # Unbundle a few dependencies. - ${PYTHON_CMD} ${WRKSRC}/src/3rdparty/chromium/build/linux/unbundle/replace_gn_files.py \ - --system-libraries libwebp libxml libxslt yasm + cd ${WRKSRC}/src/3rdparty/chromium && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} \ + ./build/linux/unbundle/replace_gn_files.py --system-libraries\ + fontconfig freetype harfbuzz-ng libdrm libevent libpng libwebp libxml libxslt openh264 opus || ${FALSE} # Rerun syncqt.pl -- otherwise the resulting package misses some forwarding headers. cd ${WRKSRC} && ${QT_BINDIR}/syncqt.pl -version ${QT5_VERSION} diff --git a/www/qt5-webengine/distinfo b/www/qt5-webengine/distinfo index d08fca4450e8..40537861d0f6 100644 --- a/www/qt5-webengine/distinfo +++ b/www/qt5-webengine/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1606050276 -SHA256 (KDE/Qt/5.15.2/qtwebengine-everywhere-src-5.15.2.tar.xz) = c8afca0e43d84f7bd595436fbe4d13a5bbdb81ec5104d605085d07545b6f91e0 -SIZE (KDE/Qt/5.15.2/qtwebengine-everywhere-src-5.15.2.tar.xz) = 280142544 +TIMESTAMP = 1673702204 +SHA256 (KDE/Qt/5.15.8/qtwebengine-everywhere-opensource-src-5.15.8.tar.xz) = 4f56dcab592a8e44c93951fb9d4840b5f73fd80ec2776979d38e42abca2b61e3 +SIZE (KDE/Qt/5.15.8/qtwebengine-everywhere-opensource-src-5.15.8.tar.xz) = 316379144 diff --git a/www/qt5-webengine/files/extra-patch-no-mempcpy-nasm b/www/qt5-webengine/files/extra-patch-no-mempcpy-nasm new file mode 100644 index 000000000000..b9b39c0d846a --- /dev/null +++ b/www/qt5-webengine/files/extra-patch-no-mempcpy-nasm @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/nasm/config/config-linux.h.orig 2022-06-08 06:40:31 UTC ++++ src/3rdparty/chromium/third_party/nasm/config/config-linux.h +@@ -336,7 +336,7 @@ + #define HAVE_MEMORY_H 1 + + /* Define to 1 if you have the `mempcpy' function. */ +-#define HAVE_MEMPCPY 1 ++/* #undef HAVE_MEMPCPY */ + + /* Define to 1 if you have a working `mmap' system call. */ + #define HAVE_MMAP 1 diff --git a/www/qt5-webengine/files/freebsd.pri b/www/qt5-webengine/files/freebsd.pri index 873da96cd3f5..2cbfe4735b5a 100644 --- a/www/qt5-webengine/files/freebsd.pri +++ b/www/qt5-webengine/files/freebsd.pri @@ -4,8 +4,3 @@ gn_args += enable_basic_printing=true \ enable_print_preview=true \ use_dbus=true \ use_udev=false - -# Once the port works better, we can think about readding the diverse `use_system_` -# for bundled libraries. -# For now, only add very few system libraries. -gn_args += use_system_yasm=true diff --git a/www/qt5-webengine/files/patch-clang b/www/qt5-webengine/files/patch-clang deleted file mode 100644 index 6d3310806100..000000000000 --- a/www/qt5-webengine/files/patch-clang +++ /dev/null @@ -1,40 +0,0 @@ ---- src/3rdparty/chromium/base/strings/safe_sprintf_unittest.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/base/strings/safe_sprintf_unittest.cc -@@ -730,6 +730,7 @@ TEST(SafeSPrintfTest, EmbeddedNul) { - } - - TEST(SafeSPrintfTest, EmitNULL) { -+/* Avoid compiler error: http://pastebin.com/1edWUE84 - char buf[40]; - #if defined(__GNUC__) - #pragma GCC diagnostic push -@@ -741,6 +742,7 @@ TEST(SafeSPrintfTest, EmitNULL) { - EXPECT_EQ("0x0", std::string(buf)); - EXPECT_EQ(6, SafeSPrintf(buf, "%s", NULL)); - EXPECT_EQ("", std::string(buf)); -+*/ - #if defined(__GCC__) - #pragma GCC diagnostic pop - #endif ---- src/3rdparty/chromium/base/threading/thread_local_storage_unittest.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/base/threading/thread_local_storage_unittest.cc -@@ -86,7 +86,7 @@ class ThreadLocalStorageRunner : public DelegateSimple - void ThreadLocalStorageCleanup(void *value) { - int *ptr = reinterpret_cast(value); - // Destructors should never be called with a NULL. -- ASSERT_NE(reinterpret_cast(NULL), ptr); -+ ASSERT_NE(static_cast(NULL), ptr); - if (*ptr == kFinalTlsValue) - return; // We've been called enough times. - ASSERT_LT(kFinalTlsValue, *ptr); ---- src/3rdparty/chromium/media/audio/audio_output_proxy_unittest.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/media/audio/audio_output_proxy_unittest.cc -@@ -410,7 +410,7 @@ class AudioOutputProxyTest : public testing::Test { - // |stream| is closed at this point. Start() should reopen it again. - EXPECT_CALL(manager(), MakeAudioOutputStream(_, _, _)) - .Times(2) -- .WillRepeatedly(Return(reinterpret_cast(NULL))); -+ .WillRepeatedly(Return(static_cast(NULL))); - - EXPECT_CALL(callback_, OnError()).Times(2); - diff --git a/www/qt5-webengine/files/patch-mkspecs_features_functions.prf b/www/qt5-webengine/files/patch-mkspecs_features_functions.prf index d8a05ec83133..7410d6d6af83 100644 --- a/www/qt5-webengine/files/patch-mkspecs_features_functions.prf +++ b/www/qt5-webengine/files/patch-mkspecs_features_functions.prf @@ -1,4 +1,4 @@ ---- mkspecs/features/functions.prf.orig 2020-11-07 01:22:36 UTC +--- mkspecs/features/functions.prf.orig 2021-12-15 16:12:54 UTC +++ mkspecs/features/functions.prf @@ -84,6 +84,10 @@ defineReplace(gnWebEngineArgs) { include($$QTWEBENGINE_ROOT/src/buildtools/config/windows.pri) @@ -19,15 +19,15 @@ include($$QTWEBENGINE_ROOT/src/pdf/config/common.pri) isEmpty(gn_args): error(No gn_args found please make sure you have valid configuration.) return($$gn_args) -@@ -106,6 +111,7 @@ defineReplace(gnArch) { - contains(qtArch, "arm64"): return(arm64) +@@ -107,6 +112,7 @@ defineReplace(gnArch) { contains(qtArch, "mips"): return(mipsel) contains(qtArch, "mips64"): return(mips64el) + contains(qtArch, "mips64el"): return(mips64el) + contains(qtArch, "power64"): return(ppc64) return(unknown) } -@@ -113,6 +119,7 @@ defineReplace(gnOS) { +@@ -114,6 +120,7 @@ defineReplace(gnOS) { macos: return(mac) win32: return(win) linux: return(linux) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_BUILD.gn index d0328ec408a0..be4c4ae2a7fb 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_BUILD.gn +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_BUILD.gn @@ -1,15 +1,15 @@ ---- src/3rdparty/chromium/BUILD.gn.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/BUILD.gn.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/BUILD.gn -@@ -419,7 +419,7 @@ group("gn_all") { +@@ -423,7 +423,7 @@ group("gn_all") { ] } -- if (is_linux || is_android) { -+ if ((is_linux && !is_bsd) || is_android) { +- if (is_linux || is_chromeos || is_android) { ++ if ((is_linux && !is_bsd) || is_chromeos || is_android) { deps += [ "//third_party/breakpad:breakpad_unittests", "//third_party/breakpad:core-2-minidump", -@@ -460,8 +460,6 @@ group("gn_all") { +@@ -464,8 +464,6 @@ group("gn_all") { "//net:disk_cache_memory_test", "//net:quic_client", "//net:quic_server", @@ -18,7 +18,7 @@ "//testing:empty_main", ] -@@ -516,10 +514,6 @@ group("gn_all") { +@@ -520,10 +518,6 @@ group("gn_all") { "//chrome/test:load_library_perf_tests", "//chrome/test:sync_performance_tests", "//chrome/test/chromedriver:chromedriver", @@ -29,7 +29,7 @@ "//media/cast:generate_barcode_video", "//media/cast:generate_timecode_audio", "//net:crash_cache", -@@ -592,10 +586,6 @@ group("gn_all") { +@@ -595,10 +589,6 @@ group("gn_all") { "//mojo:mojo_perftests", "//services/service_manager/public/cpp", "//testing/gmock:gmock_main", @@ -40,7 +40,7 @@ ] if (!is_android) { -@@ -669,7 +659,7 @@ group("gn_all") { +@@ -676,7 +666,7 @@ group("gn_all") { host_os == "win" && !use_qt) { deps += [ "//chrome/test/mini_installer:mini_installer_tests" ] } @@ -49,16 +49,25 @@ deps += [ "//third_party/breakpad:symupload($host_toolchain)" ] } -@@ -802,7 +792,6 @@ group("gn_all") { +@@ -691,7 +681,7 @@ group("gn_all") { + } + } + +- if (is_mac || is_win || is_android || (is_linux && !is_chromeos)) { ++ if (is_mac || is_win || is_android || (is_linux && !is_chromeos && !is_bsd)) { + deps += [ + "//third_party/crashpad/crashpad:crashpad_tests", + "//third_party/crashpad/crashpad/handler:crashpad_handler", +@@ -810,7 +800,6 @@ group("gn_all") { "//chrome/browser/vr:vr_common_perftests", "//chrome/browser/vr:vr_common_unittests", "//chrome/browser/vr:vr_pixeltests", - "//tools/perf/contrib/vr_benchmarks:vr_perf_tests", ] - if (is_desktop_linux && use_ozone) { - deps += [ "//chrome/browser/vr/testapp:vr_testapp" ] -@@ -1085,7 +1074,7 @@ if (!is_ios && !use_qt) { - ] + if (is_android) { + deps += [ "//chrome/browser/android/vr:vr_android_unittests" ] +@@ -1103,7 +1092,7 @@ if (!is_ios && !use_qt) { + data_deps += [ "//content/web_test:web_test_common_mojom_js_data_deps" ] } - if (!is_win && !is_android) { @@ -66,16 +75,16 @@ data_deps += [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] } -@@ -1094,7 +1083,7 @@ if (!is_ios && !use_qt) { +@@ -1112,7 +1101,7 @@ if (!is_ios && !use_qt) { data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } -- if (is_linux) { -+ if (is_linux && !is_bsd) { +- if (is_linux || is_chromeos) { ++ if ((is_linux && !is_bsd) || is_chromeos) { data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } -@@ -1286,9 +1275,6 @@ group("chromium_builder_perf") { +@@ -1308,9 +1297,6 @@ group("chromium_builder_perf") { if (is_win) { data_deps += [ "//chrome/installer/mini_installer:mini_installer" ] diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_BUILD.gn index 552ca411ae1d..166ea3ca28e4 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_BUILD.gn +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/BUILD.gn.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/base/BUILD.gn.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/BUILD.gn -@@ -59,7 +59,7 @@ declare_args() { +@@ -54,7 +54,7 @@ declare_args() { # replacement base::Location::Current(). On by default in non-official builds # for testing purposes. # TODO(https://crbug.com/974061): remove this eventually. @@ -9,20 +9,19 @@ # Unsafe developer build. Has developer-friendly features that may weaken or # disable security measures like sandboxing or ASLR. -@@ -929,7 +929,7 @@ jumbo_component("base") { +@@ -886,7 +886,7 @@ jumbo_component("base") { "timer/hi_res_timer_manager_posix.cc", ] -- if (!is_nacl && !is_mac && !is_ios) { -+ if (!is_nacl && !is_mac && !is_ios && !is_bsd) { +- if (!is_nacl && !is_apple) { ++ if (!is_nacl && !is_apple && !is_bsd) { sources += [ - "profiler/stack_copier_signal.cc", - "profiler/stack_copier_signal.h", -@@ -938,6 +938,12 @@ jumbo_component("base") { + "cpu_affinity_posix.cc", + "cpu_affinity_posix.h", +@@ -897,6 +897,11 @@ jumbo_component("base") { "profiler/thread_delegate_posix.h", ] } -+ + if (is_bsd) { + sources += [ + "profiler/stack_sampler_posix.cc", @@ -30,41 +29,34 @@ + } } - jumbo_excluded_sources = [] -@@ -1239,7 +1245,13 @@ jumbo_component("base") { + jumbo_excluded_sources = [ +@@ -1213,7 +1218,6 @@ jumbo_component("base") { "process/process_metrics_linux.cc", "threading/platform_thread_linux.cc", ] - jumbo_excluded_sources += [ "process/memory_linux.cc" ] -+ # Omit this because it will be excluded via "is_bsd" further down in -+ # this file -+ # jumbo_excluded_sources += [ "process/memory_linux.cc" ] -+ # ...but remove the following files from jumbo merge otherwise it will -+ # emit errors of redefined variables -+ jumbo_excluded_sources += [ "metrics/histogram.cc" ] -+ jumbo_excluded_sources += [ "metrics/sparse_histogram.cc" ] } if (!is_nacl) { -@@ -1324,7 +1336,7 @@ jumbo_component("base") { - # Needed for if using newer C++ library than sysroot, except if - # building inside the cros_sdk environment - use host_toolchain as a - # more robust check for this. -- if (!use_sysroot && (is_android || (is_linux && !is_chromecast && !use_qt)) && -+ if (!use_sysroot && (is_android || (is_linux && !is_chromecast && !use_qt) && !is_clang) && - host_toolchain != "//build/toolchain/cros:host") { - libs += [ "atomic" ] - } -@@ -1350,7 +1362,7 @@ jumbo_component("base") { - "allocator/allocator_shim_override_glibc_weak_symbols.h", - ] - deps += [ "//base/allocator:tcmalloc" ] -- } else if (is_linux && use_allocator == "none") { -+ } else if ((is_linux && !is_bsd) && use_allocator == "none") { - sources += [ "allocator/allocator_shim_default_dispatch_to_glibc.cc" ] - } else if (is_android && use_allocator == "none") { - sources += [ -@@ -1947,6 +1959,33 @@ jumbo_component("base") { +@@ -1355,7 +1359,7 @@ jumbo_component("base") { + "allocator/allocator_shim_default_dispatch_to_mac_zoned_malloc.cc", + ] + } +- if (is_chromeos || is_linux) { ++ if ((is_chromeos || is_linux) && !is_bsd) { + sources += [ "allocator/allocator_shim_default_dispatch_to_glibc.cc" ] + } + if (is_win) { +@@ -1826,7 +1830,7 @@ jumbo_component("base") { + ] + } + +- if (is_linux || is_chromeos || is_android) { ++ if ((is_linux || is_chromeos || is_android) && !is_bsd) { + sources += [ + "allocator/partition_allocator/spinning_futex_linux.cc", + "allocator/partition_allocator/spinning_futex_linux.h", +@@ -1982,6 +1986,34 @@ jumbo_component("base") { } } @@ -94,29 +86,26 @@ + "util" # process_metrics_freebsd + ] + } ++ + # iOS if (is_ios) { sources -= [ -@@ -2903,7 +2942,7 @@ test("base_unittests") { +@@ -3095,7 +3127,7 @@ test("base_unittests") { + ] + } + +- if (is_linux || is_chromeos) { ++ if ((is_linux || is_chromeos) && !is_bsd) { + sources += [ "debug/proc_maps_linux_unittest.cc" ] + } + +@@ -3136,7 +3168,7 @@ test("base_unittests") { "posix/unix_domain_socket_unittest.cc", "task/thread_pool/task_tracker_posix_unittest.cc", ] -- if (!is_nacl && !is_mac && !is_ios) { -+ if (!is_nacl && !is_mac && !is_ios && !is_bsd) { - sources += [ "profiler/stack_copier_signal_unittest.cc" ] - } - } -@@ -3092,6 +3131,12 @@ test("base_unittests") { - - manifest = "//build/config/fuchsia/tests.cmx" - } -+ -+ if (is_bsd) { -+ sources -= [ -+ "debug/proc_maps_linux_unittest.cc", -+ ] -+ } - - if (!is_fuchsia && !is_ios) { - sources += [ "files/file_locking_unittest.cc" ] +- if (!is_nacl && !is_apple) { ++ if (!is_nacl && !is_apple && !is_bsd) { + sources += [ + "cpu_affinity_posix_unittest.cc", + "profiler/stack_copier_signal_unittest.cc", diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_allocator__shim.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_allocator__shim.cc deleted file mode 100644 index 1e77cff619cf..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_allocator__shim.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/base/allocator/allocator_shim.cc.orig 2019-11-27 21:12:25 UTC -+++ src/3rdparty/chromium/base/allocator/allocator_shim.cc -@@ -70,7 +70,7 @@ inline const base::allocator::AllocatorDispatch* GetCh - // Unfortunately due to that bug NoBarrier_Load() is mistakenly fully - // barriered on Linux+Clang, and that causes visible perf regressons. - return reinterpret_cast( --#if defined(OS_LINUX) && defined(__clang__) -+#if (defined(OS_BSD) || defined(OS_LINUX)) && defined(__clang__) - *static_cast(&g_chain_head) - #else - base::subtle::NoBarrier_Load(&g_chain_head) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_allocator__shim__default__dispatch__to__glibc.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_allocator__shim__default__dispatch__to__glibc.cc index b1f7257651b2..ac4d249046da 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_allocator__shim__default__dispatch__to__glibc.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_allocator__shim__default__dispatch__to__glibc.cc @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc -@@ -5,18 +5,28 @@ - #include "base/allocator/allocator_shim.h" +@@ -6,18 +6,28 @@ + #include "base/compiler_specific.h" #include -#include @@ -36,7 +36,7 @@ } // extern "C" namespace { -@@ -24,32 +34,32 @@ namespace { +@@ -25,32 +35,32 @@ void* GlibcMalloc(const AllocatorDispatch*, size_t siz using base::allocator::AllocatorDispatch; void* GlibcMalloc(const AllocatorDispatch*, size_t size, void* context) { @@ -73,4 +73,4 @@ + __free(address); } - size_t GlibcGetSizeEstimate(const AllocatorDispatch*, + NO_SANITIZE("cfi-icall") diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_allocator__shim__unittest.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_allocator__shim__unittest.cc deleted file mode 100644 index d2a9b9220b4a..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_allocator__shim__unittest.cc +++ /dev/null @@ -1,45 +0,0 @@ ---- src/3rdparty/chromium/base/allocator/allocator_shim_unittest.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/base/allocator/allocator_shim_unittest.cc -@@ -29,7 +29,7 @@ - #include "base/allocator/allocator_interception_mac.h" - #include "base/mac/mac_util.h" - #include "third_party/apple_apsl/malloc.h" --#else -+#elif !defined(OS_BSD) - #include - #endif - -@@ -294,7 +294,7 @@ TEST_F(AllocatorShimTest, InterceptLibcSymbols) { - ASSERT_GE(aligned_allocs_intercepted_by_size[61], 1u); - #endif // !OS_WIN - --#if !defined(OS_WIN) && !defined(OS_MACOSX) -+#if !defined(OS_WIN) && !defined(OS_MACOSX) && !defined(OS_BSD) - void* memalign_ptr = memalign(128, 53); - ASSERT_NE(nullptr, memalign_ptr); - ASSERT_EQ(0u, reinterpret_cast(memalign_ptr) % 128); -@@ -307,7 +307,7 @@ TEST_F(AllocatorShimTest, InterceptLibcSymbols) { - ASSERT_GE(aligned_allocs_intercepted_by_alignment[kPageSize], 1u); - // pvalloc rounds the size up to the next page. - ASSERT_GE(aligned_allocs_intercepted_by_size[kPageSize], 1u); --#endif // !OS_WIN && !OS_MACOSX -+#endif // !OS_WIN && !OS_MACOSX && !OS_BSD - - char* realloc_ptr = static_cast(malloc(10)); - strcpy(realloc_ptr, "foobar"); -@@ -323,13 +323,13 @@ TEST_F(AllocatorShimTest, InterceptLibcSymbols) { - free(zero_alloc_ptr); - ASSERT_GE(frees_intercepted_by_addr[Hash(zero_alloc_ptr)], 1u); - --#if !defined(OS_WIN) && !defined(OS_MACOSX) -+#if !defined(OS_WIN) && !defined(OS_MACOSX) && !defined(OS_BSD) - free(memalign_ptr); - ASSERT_GE(frees_intercepted_by_addr[Hash(memalign_ptr)], 1u); - - free(pvalloc_ptr); - ASSERT_GE(frees_intercepted_by_addr[Hash(pvalloc_ptr)], 1u); --#endif // !OS_WIN && !OS_MACOSX -+#endif // !OS_WIN && !OS_MACOSX && !OS_BSD - - #if !defined(OS_WIN) - free(posix_memalign_ptr); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_page__allocator__internals__posix.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_page__allocator__internals__posix.h index b952a67abb10..2e3cee2557fa 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_page__allocator__internals__posix.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_page__allocator__internals__posix.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_internals_posix.h -@@ -16,7 +16,7 @@ - - #include +@@ -24,7 +24,7 @@ + #if defined(OS_ANDROID) + #include #endif --#if defined(OS_LINUX) -+#if defined(OS_BSD) || defined(OS_LINUX) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include #include diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc.cc new file mode 100644 index 000000000000..f502277f6b96 --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc.cc @@ -0,0 +1,12 @@ +--- src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.cc +@@ -202,6 +202,9 @@ void PartitionAllocGlobalInit(OomFunction on_out_of_me + // Check that some of our zanier calculations worked out as expected. + #if ENABLE_TAG_FOR_MTE_CHECKED_PTR + static_assert(kSmallestBucket >= kAlignment, "generic smallest bucket"); ++#elif defined(__i386__) && defined(OS_FREEBSD) ++ // alignof(std::max_align_t) is only 4 on FreeBSD/i386 ++ static_assert(kSmallestBucket >= kAlignment, "generic smallest bucket"); + #else + static_assert(kSmallestBucket == kAlignment, "generic smallest bucket"); + #endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_base__switches.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_base__switches.cc index 63225c12f7d9..02e1ce9f6294 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_base__switches.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_base__switches.cc @@ -1,20 +1,20 @@ ---- src/3rdparty/chromium/base/base_switches.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/base/base_switches.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/base_switches.cc -@@ -114,7 +114,7 @@ const char kWaitForDebugger[] = "wait-for-debugger"; +@@ -117,7 +117,7 @@ const char kDisableUsbKeyboardDetect[] = "disable const char kDisableUsbKeyboardDetect[] = "disable-usb-keyboard-detect"; #endif --#if defined(OS_LINUX) && !defined(OS_CHROMEOS) -+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !BUILDFLAG(IS_LACROS) ++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS) && !BUILDFLAG(IS_LACROS)) || defined(OS_BSD) // The /dev/shm partition is too small in certain VM environments, causing // Chrome to fail or crash (see http://crbug.com/715363). Use this flag to // work-around this issue (a temporary directory will always be used to create -@@ -135,7 +135,7 @@ const char kEnableCrashReporterForTesting[] = - const char kEnableReachedCodeProfiler[] = "enable-reached-code-profiler"; +@@ -152,7 +152,7 @@ const char kForceFieldTrialParams[] = "force-fieldtria + #endif --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // Controls whether or not retired instruction counts are surfaced for threads // in trace events on Linux. // diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_base__switches.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_base__switches.h index df66c09b5d0c..4fb9dcae5349 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_base__switches.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_base__switches.h @@ -1,20 +1,20 @@ ---- src/3rdparty/chromium/base/base_switches.h.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/base/base_switches.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/base_switches.h -@@ -37,7 +37,7 @@ extern const char kWaitForDebugger[]; +@@ -39,7 +39,7 @@ extern const char kDisableUsbKeyboardDetect[]; extern const char kDisableUsbKeyboardDetect[]; #endif --#if defined(OS_LINUX) && !defined(OS_CHROMEOS) -+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !BUILDFLAG(IS_LACROS) ++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS) && !BUILDFLAG(IS_LACROS)) || defined(OS_BSD) extern const char kDisableDevShmUsage[]; #endif -@@ -50,7 +50,7 @@ extern const char kEnableReachedCodeProfiler[]; - extern const char kOrderfileMemoryOptimization[]; +@@ -55,7 +55,7 @@ extern const char kForceFieldTrialParams[]; + extern const char kForceFieldTrialParams[]; #endif --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) extern const char kEnableThreadInstructionCount[]; #endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_cpu.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_cpu.cc index e5fa1f7efec0..b642eaea26f1 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_cpu.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_cpu.cc @@ -1,38 +1,44 @@ ---- src/3rdparty/chromium/base/cpu.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/base/cpu.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/cpu.cc -@@ -15,7 +15,7 @@ - #include "base/stl_util.h" - #include "build/build_config.h" +@@ -16,7 +16,7 @@ --#if defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) || defined(OS_LINUX)) -+#if defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD)) + #include "base/stl_util.h" + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || \ ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) || \ + defined(OS_AIX) + #include "base/containers/flat_set.h" + #include "base/files/file_util.h" +@@ -31,7 +31,7 @@ + #endif + + #if defined(ARCH_CPU_ARM_FAMILY) && \ +- (defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS)) ++ (defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS)) #include "base/files/file_util.h" #endif -@@ -98,7 +98,7 @@ uint64_t xgetbv(uint32_t xcr) { +@@ -182,6 +182,14 @@ std::string* CpuInfoBrand() { - #endif // ARCH_CPU_X86_FAMILY - --#if defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) || defined(OS_LINUX)) -+#if defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD)) - std::string* CpuInfoBrand() { - static std::string* brand = []() { - // This function finds the value from /proc/cpuinfo under the key "model -@@ -128,7 +128,7 @@ std::string* CpuInfoBrand() { return brand; } ++#elif defined(OS_BSD) ++std::string* CpuInfoBrand() { ++ static std::string* brand = []() { ++ return new std::string(SysInfo::CPUModelName()); ++ }(); ++ ++ return brand; ++} #endif // defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) || -- // defined(OS_LINUX)) -+ // defined(OS_LINUX) || defined(OS_BSD)) + // defined(OS_LINUX) || defined(OS_CHROMEOS)) - } // namespace - -@@ -252,7 +252,7 @@ void CPU::Initialize() { +@@ -305,7 +313,7 @@ void CPU::Initialize() { } } #elif defined(ARCH_CPU_ARM_FAMILY) --#if (defined(OS_ANDROID) || defined(OS_LINUX)) -+#if (defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD)) +-#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) cpu_brand_ = *CpuInfoBrand(); #elif defined(OS_WIN) // Windows makes high-resolution thread timing information available in diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_cpu.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_cpu.h new file mode 100644 index 000000000000..77da4e02ef20 --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_cpu.h @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/base/cpu.h.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/base/cpu.h +@@ -73,7 +73,7 @@ class BASE_EXPORT CPU final { + IntelMicroArchitecture GetIntelMicroArchitecture() const; + const std::string& cpu_brand() const { return cpu_brand_; } + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || \ ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) || \ + defined(OS_AIX) + enum class CoreType { + kUnknown = 0, +@@ -124,7 +124,7 @@ class BASE_EXPORT CPU final { + // cpuidle driver. + using CoreIdleTimes = std::vector; + static bool GetCumulativeCoreIdleTimes(CoreIdleTimes&); +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) + // defined(OS_AIX) + + private: diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_debugger__posix.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_debugger__posix.cc index d42b192f2a90..50452ecbf8c0 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_debugger__posix.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_debugger__posix.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/debug/debugger_posix.cc.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/base/debug/debugger_posix.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/debug/debugger_posix.cc -@@ -86,7 +86,7 @@ bool BeingDebugged() { +@@ -98,7 +98,7 @@ bool BeingDebugged() { KERN_PROC, KERN_PROC_PID, getpid() @@ -9,7 +9,7 @@ , sizeof(struct kinfo_proc), 0 #endif -@@ -94,33 +94,35 @@ bool BeingDebugged() { +@@ -106,33 +106,35 @@ bool BeingDebugged() { // Caution: struct kinfo_proc is marked __APPLE_API_UNSTABLE. The source and // binary interfaces may change. diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_elf__reader.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_elf__reader.cc index eb8a4b38f723..5acd319f25bb 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_elf__reader.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_elf__reader.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/debug/elf_reader.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/base/debug/elf_reader.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/debug/elf_reader.cc -@@ -35,7 +35,9 @@ using Nhdr = Elf64_Nhdr; +@@ -38,7 +38,9 @@ using Word = Elf64_Word; using Word = Elf64_Word; #endif @@ -8,9 +8,9 @@ constexpr char kGnuNoteName[] = "GNU"; +#endif - // Returns a pointer to the header of the ELF binary mapped into memory, - // or a null pointer if the header is invalid. -@@ -98,6 +100,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base, + // Returns a pointer to the header of the ELF binary mapped into memory, or a + // null pointer if the header is invalid. Here and below |elf_mapped_base| is a +@@ -75,6 +77,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base, bool found = false; while (current_section < section_end) { current_note = reinterpret_cast(current_section); @@ -18,7 +18,7 @@ if (current_note->n_type == NT_GNU_BUILD_ID) { StringPiece note_name(current_section + sizeof(Nhdr), current_note->n_namesz); -@@ -107,6 +110,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base, +@@ -84,6 +87,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base, break; } } diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_proc__maps__linux.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_proc__maps__linux.cc index e98f090c003c..c2a1443ead38 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_proc__maps__linux.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_proc__maps__linux.cc @@ -1,15 +1,15 @@ ---- src/3rdparty/chromium/base/debug/proc_maps_linux.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/base/debug/proc_maps_linux.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/debug/proc_maps_linux.cc -@@ -12,7 +12,7 @@ +@@ -13,7 +13,7 @@ #include "base/strings/string_split.h" #include "build/build_config.h" --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_ANDROID) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) #include #endif -@@ -28,6 +28,11 @@ +@@ -29,6 +29,11 @@ namespace debug { namespace base { namespace debug { @@ -21,7 +21,7 @@ // Scans |proc_maps| starting from |pos| returning true if the gate VMA was // found, otherwise returns false. static bool ContainsGateVMA(std::string* proc_maps, size_t pos) { -@@ -43,15 +48,16 @@ static bool ContainsGateVMA(std::string* proc_maps, si +@@ -44,15 +49,16 @@ static bool ContainsGateVMA(std::string* proc_maps, si return false; #endif } @@ -40,7 +40,7 @@ return false; } proc_maps->clear(); -@@ -65,7 +71,7 @@ bool ReadProcMaps(std::string* proc_maps) { +@@ -66,7 +72,7 @@ bool ReadProcMaps(std::string* proc_maps) { ssize_t bytes_read = HANDLE_EINTR(read(fd.get(), buffer, kReadSize)); if (bytes_read < 0) { @@ -49,7 +49,7 @@ proc_maps->clear(); return false; } -@@ -76,6 +82,7 @@ bool ReadProcMaps(std::string* proc_maps) { +@@ -77,6 +83,7 @@ bool ReadProcMaps(std::string* proc_maps) { if (bytes_read == 0) break; @@ -57,7 +57,7 @@ // The gate VMA is handled as a special case after seq_file has finished // iterating through all entries in the virtual memory table. // -@@ -86,6 +93,7 @@ bool ReadProcMaps(std::string* proc_maps) { +@@ -87,6 +94,7 @@ bool ReadProcMaps(std::string* proc_maps) { // Avoid this by searching for the gate VMA and breaking early. if (ContainsGateVMA(proc_maps, pos)) break; @@ -65,7 +65,7 @@ } return true; -@@ -114,10 +122,32 @@ bool ParseProcMaps(const std::string& input, +@@ -115,10 +123,32 @@ bool ParseProcMaps(const std::string& input, MappedMemoryRegion region; const char* line = lines[i].c_str(); char permissions[5] = {'\0'}; // Ensure NUL-terminated string. @@ -99,7 +99,7 @@ // Sample format from man 5 proc: // -@@ -133,6 +163,7 @@ bool ParseProcMaps(const std::string& input, +@@ -134,6 +164,7 @@ bool ParseProcMaps(const std::string& input, DPLOG(WARNING) << "sscanf failed for line: " << line; return false; } @@ -107,7 +107,7 @@ region.permissions = 0; -@@ -151,14 +182,31 @@ bool ParseProcMaps(const std::string& input, +@@ -152,14 +183,31 @@ bool ParseProcMaps(const std::string& input, else if (permissions[2] != '-') return false; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_stack__trace.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_stack__trace.cc index 1fac016eeff0..eb1f8a003b67 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_stack__trace.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_stack__trace.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/base/debug/stack_trace.cc.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/base/debug/stack_trace.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/debug/stack_trace.cc -@@ -14,7 +14,7 @@ +@@ -15,7 +15,7 @@ #if BUILDFLAG(CAN_UNWIND_WITH_FRAME_POINTERS) --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) #include #include "base/process/process_handle.h" #include "base/threading/platform_thread.h" diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_stack__trace__posix.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_stack__trace__posix.cc index ba906e94bc2a..439424603491 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_stack__trace__posix.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_stack__trace__posix.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/base/debug/stack_trace_posix.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/base/debug/stack_trace_posix.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/debug/stack_trace_posix.cc @@ -35,7 +35,7 @@ #include #endif --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "base/debug/proc_maps_linux.h" #endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_file__path__watcher.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_file__path__watcher.cc deleted file mode 100644 index 1afb711c7f77..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_file__path__watcher.cc +++ /dev/null @@ -1,15 +0,0 @@ ---- src/3rdparty/chromium/base/files/file_path_watcher.cc.orig 2020-11-07 01:22:36 UTC -+++ src/3rdparty/chromium/base/files/file_path_watcher.cc -@@ -20,10 +20,10 @@ FilePathWatcher::~FilePathWatcher() { - // static - bool FilePathWatcher::RecursiveWatchAvailable() { - #if (defined(OS_MACOSX) && !defined(OS_IOS)) || defined(OS_WIN) || \ -- defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) -+ (defined(OS_LINUX) && !defined(OS_BSD)) || defined(OS_ANDROID) || defined(OS_AIX) - return true; - #else -- // FSEvents isn't available on iOS. -+ // FSEvents isn't available on iOS and the kqueue watcher. - return false; - #endif - } diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_file__path__watcher__unittest.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_file__path__watcher__unittest.cc deleted file mode 100644 index 385939a432fb..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_file__path__watcher__unittest.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/base/files/file_path_watcher_unittest.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/base/files/file_path_watcher_unittest.cc -@@ -438,7 +438,7 @@ TEST_F(FilePathWatcherTest, WatchDirectory) { - VLOG(1) << "Waiting for file1 creation"; - ASSERT_TRUE(WaitForEvents()); - --#if !defined(OS_MACOSX) -+#if !defined(OS_MACOSX) && !defined(OS_BSD) - // Mac implementation does not detect files modified in a directory. - ASSERT_TRUE(WriteFile(file1, "content v2")); - VLOG(1) << "Waiting for file1 modification"; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_file__util.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_file__util.h index 6b6543e338ab..1959cff3502d 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_file__util.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_file__util.h @@ -1,11 +1,28 @@ ---- src/3rdparty/chromium/base/files/file_util.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/base/files/file_util.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/files/file_util.h -@@ -445,7 +445,7 @@ BASE_EXPORT bool VerifyPathControlledByAdmin(const bas +@@ -278,14 +278,14 @@ BASE_EXPORT bool ExecutableExistsInPath(Environment* e + BASE_EXPORT bool ExecutableExistsInPath(Environment* env, + const FilePath::StringType& executable); + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_AIX) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_AIX) || defined(OS_BSD) + // Determine if files under a given |path| can be mapped and then mprotect'd + // PROT_EXEC. This depends on the mount options used for |path|, which vary + // among different Linux distributions and possibly local configuration. It also + // depends on details of kernel--ChromeOS uses the noexec option for /dev/shm + // but its kernel allows mprotect with PROT_EXEC anyway. + BASE_EXPORT bool IsPathExecutable(const FilePath& path); +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_AIX) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_AIX) || defined(OS_BSD) + + #endif // OS_POSIX + +@@ -592,7 +592,7 @@ BASE_EXPORT int GetMaximumPathComponentLength(const ba // the directory |path|, in the number of FilePath::CharType, or -1 on failure. BASE_EXPORT int GetMaximumPathComponentLength(const base::FilePath& path); --#if defined(OS_LINUX) || defined(OS_AIX) -+#if defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_AIX) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_AIX) || defined(OS_BSD) // Broad categories of file systems as returned by statfs() on Linux. enum FileSystemType { FILE_SYSTEM_UNKNOWN, // statfs failed. diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_file__util__posix.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_file__util__posix.cc index 4ba4d5bf0e6e..8795a29068de 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_file__util__posix.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_file__util__posix.cc @@ -1,11 +1,60 @@ ---- src/3rdparty/chromium/base/files/file_util_posix.cc.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/base/files/file_util_posix.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/files/file_util_posix.cc -@@ -407,7 +407,7 @@ bool CopyDirectoryExcl(const FilePath& from_path, - #endif // !defined(OS_NACL_NONSFI) +@@ -412,7 +412,7 @@ bool CreateLocalNonBlockingPipe(int fds[2]) { + } bool CreateLocalNonBlockingPipe(int fds[2]) { --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) return pipe2(fds, O_CLOEXEC | O_NONBLOCK) == 0; #else int raw_fds[2]; +@@ -947,8 +947,12 @@ bool AllocateFileRegion(File* file, int64_t offset, si + // space. It can fail because the filesystem doesn't support it. In that case, + // use the manual method below. + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) ++#if defined(OS_BSD) ++ if (HANDLE_EINTR(posix_fallocate(file->GetPlatformFile(), offset, size)) != -1) ++#else + if (HANDLE_EINTR(fallocate(file->GetPlatformFile(), 0, offset, size)) != -1) ++#endif + return true; + DPLOG(ERROR) << "fallocate"; + #elif defined(OS_APPLE) +@@ -1172,7 +1176,7 @@ PrefetchResult PreReadFile(const FilePath& file_path, + // posix_fadvise() is only available in the Android NDK in API 21+. Older + // versions may have the required kernel support, but don't have enough usage + // to justify backporting. +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || \ ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || \ + (defined(OS_ANDROID) && __ANDROID_API__ >= 21) + File file(file_path, File::FLAG_OPEN | File::FLAG_READ); + if (!file.IsValid()) +@@ -1208,7 +1212,7 @@ PrefetchResult PreReadFile(const FilePath& file_path, + return internal::PreReadFileSlow(file_path, max_bytes) + ? PrefetchResult{PrefetchResultCode::kSlowSuccess} + : PrefetchResult{PrefetchResultCode::kSlowFailed}; +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || (defined(OS_ANDROID) && ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || (defined(OS_ANDROID) && + // __ANDROID_API__ >= 21) + } + +@@ -1243,7 +1247,7 @@ bool MoveUnsafe(const FilePath& from_path, const FileP + + #endif // !defined(OS_NACL_NONSFI) + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_AIX) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_AIX) || defined(OS_BSD) + BASE_EXPORT bool IsPathExecutable(const FilePath& path) { + bool result = false; + FilePath tmp_file_path; +@@ -1264,6 +1268,6 @@ BASE_EXPORT bool IsPathExecutable(const FilePath& path + } + return result; + } +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_AIX) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_AIX) || defined(OS_BSD) + + } // namespace base diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_scoped__file.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_scoped__file.cc index 85c3a240ec4e..b5f516c5bd1d 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_scoped__file.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_scoped__file.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/base/files/scoped_file.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/base/files/scoped_file.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/files/scoped_file.cc @@ -30,7 +30,7 @@ void ScopedFDCloseTraits::Free(int fd) { // a single open directory would bypass the entire security model. int ret = IGNORE_EINTR(close(fd)); --#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_FUCHSIA) || \ -+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_FUCHSIA) || defined(OS_BSD) || \ - defined(OS_ANDROID) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_APPLE) || \ ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || defined(OS_APPLE) || \ + defined(OS_FUCHSIA) || defined(OS_ANDROID) // NB: Some file descriptors can return errors from close() e.g. network // filesystems such as NFS and Linux input devices. On Linux, macOS, and diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_i18n_icu__util.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_i18n_icu__util.cc index f43379359f78..beef6293b3b1 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_i18n_icu__util.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_i18n_icu__util.cc @@ -1,20 +1,20 @@ ---- src/3rdparty/chromium/base/i18n/icu_util.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/base/i18n/icu_util.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/i18n/icu_util.cc -@@ -49,7 +49,7 @@ +@@ -48,7 +48,7 @@ + #include "third_party/icu/source/common/unicode/unistr.h" #endif - #if defined(OS_ANDROID) || defined(OS_FUCHSIA) || \ -- (defined(OS_LINUX) && !BUILDFLAG(IS_CHROMECAST)) -+ (defined(OS_LINUX) && !BUILDFLAG(IS_CHROMECAST)) || defined(OS_BSD) +-#if defined(OS_ANDROID) || defined(OS_FUCHSIA) || \ ++#if defined(OS_ANDROID) || defined(OS_FUCHSIA) || defined(OS_BSD) || \ + ((defined(OS_LINUX) || defined(OS_CHROMEOS)) && !BUILDFLAG(IS_CHROMECAST)) #include "third_party/icu/source/i18n/unicode/timezone.h" #endif - @@ -345,7 +345,7 @@ void InitializeIcuTimeZone() { fuchsia::IntlProfileWatcher::GetPrimaryTimeZoneIdForIcuInitialization(); icu::TimeZone::adoptDefault( icu::TimeZone::createTimeZone(icu::UnicodeString::fromUTF8(zone_id))); --#elif defined(OS_LINUX) && !BUILDFLAG(IS_CHROMECAST) -+#elif (defined(OS_LINUX) || defined(OS_BSD)) && !BUILDFLAG(IS_CHROMECAST) +-#elif (defined(OS_LINUX) || defined(OS_CHROMEOS)) && !BUILDFLAG(IS_CHROMECAST) ++#elif (defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)) && !BUILDFLAG(IS_CHROMECAST) // To respond to the time zone change properly, the default time zone // cache in ICU has to be populated on starting up. // See TimeZoneMonitorLinux::NotifyClientsFromImpl(). diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_linux__util.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_linux__util.cc index 4f8d31d82be8..5c17c98e93d9 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_linux__util.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_linux__util.cc @@ -1,6 +1,14 @@ ---- src/3rdparty/chromium/base/linux_util.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/base/linux_util.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/linux_util.cc -@@ -78,6 +78,9 @@ class DistroNameGetter { +@@ -15,6 +15,7 @@ + + #include + #include ++#include + + #include "base/files/dir_reader_posix.h" + #include "base/files/file_util.h" +@@ -78,6 +79,9 @@ class DistroNameGetter { public: DistroNameGetter() { static const char* const kFilesToCheck[] = {"/etc/os-release", @@ -10,3 +18,21 @@ "/usr/lib/os-release"}; for (const char* file : kFilesToCheck) { if (ReadDistroFromOSReleaseFile(file)) +@@ -134,6 +138,9 @@ bool GetThreadsForProcess(pid_t pid, std::vector* tids) { ++#if defined(OS_BSD) ++ return false; ++#else + // 25 > strlen("/proc//task") + strlen(std::to_string(INT_MAX)) + 1 = 22 + char buf[25]; + strings::SafeSPrintf(buf, "/proc/%d/task", pid); +@@ -153,6 +160,7 @@ bool GetThreadsForProcess(pid_t pid, std::vector(info->si_addr); - #else // OS_POSIX && !OS_MACOSX -- ucontext_t* context = reinterpret_cast(context_ptr); -+ struct ucontext_t* context = reinterpret_cast(context_ptr); - #if defined(ARCH_CPU_X86) - crash_addr = static_cast(context->uc_mcontext.gregs[REG_EIP]); - #elif defined(ARCH_CPU_X86_64) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_discardable__memory.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_discardable__memory.cc index fa920e8f17ca..d77508d7d9e6 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_discardable__memory.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_discardable__memory.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/base/memory/discardable_memory.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/base/memory/discardable_memory.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/memory/discardable_memory.cc @@ -23,7 +23,7 @@ const base::Feature kMadvFreeDiscardableMemory{ "MadvFreeDiscardableMemory", base::FEATURE_DISABLED_BY_DEFAULT}; #endif // defined(OS_POSIX) --#if defined(OS_ANDROID) || defined(OS_LINUX) -+#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) const base::Feature kDiscardableMemoryBackingTrial{ "DiscardableMemoryBackingTrial", base::FEATURE_DISABLED_BY_DEFAULT}; @@ -13,15 +13,15 @@ DiscardableMemoryTrialGroup::kEmulatedSharedMemory, &kDiscardableMemoryBackingParamOptions}; --#endif // defined(OS_ANDROID) || defined(OS_LINUX) -+#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) +-#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) } // namespace features namespace { --#if defined(OS_ANDROID) || defined(OS_LINUX) -+#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) DiscardableMemoryBacking GetBackingForFieldTrial() { DiscardableMemoryTrialGroup trial_group = @@ -29,13 +29,13 @@ } NOTREACHED(); } --#endif // defined(OS_ANDROID) || defined(OS_LINUX) -+#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) +-#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) } // namespace --#if defined(OS_ANDROID) || defined(OS_LINUX) -+#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // Probe capabilities of this device to determine whether we should participate // in the discardable memory backing trial. @@ -43,21 +43,21 @@ DCHECK(DiscardableMemoryBackingFieldTrialIsEnabled()); return features::kDiscardableMemoryBackingParam.Get(); } --#endif // defined(OS_ANDROID) || defined(OS_LINUX) -+#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) +-#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) DiscardableMemory::DiscardableMemory() = default; DiscardableMemory::~DiscardableMemory() = default; DiscardableMemoryBacking GetDiscardableMemoryBacking() { --#if defined(OS_ANDROID) || defined(OS_LINUX) -+#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) if (DiscardableMemoryBackingFieldTrialIsEnabled()) { return GetBackingForFieldTrial(); } --#endif // defined(OS_ANDROID) || defined(OS_LINUX) -+#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) +-#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #if defined(OS_ANDROID) if (ashmem_device_is_supported()) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_discardable__memory__internal.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_discardable__memory__internal.h index 1396425170e2..0278711d18de 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_discardable__memory__internal.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_discardable__memory__internal.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/base/memory/discardable_memory_internal.h.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/base/memory/discardable_memory_internal.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/memory/discardable_memory_internal.h @@ -10,7 +10,7 @@ #include "base/metrics/field_trial_params.h" #include "build/build_config.h" --#if defined(OS_ANDROID) || defined(OS_LINUX) -+#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) namespace base { @@ -13,7 +13,7 @@ } // namespace base --#endif // defined(OS_LINUX) || defined(OS_ANDROID) -+#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) #endif // BASE_MEMORY_DISCARDABLE_MEMORY_INTERNAL_H_ diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_madv__free__discardable__memory__posix.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_madv__free__discardable__memory__posix.cc index 5aa744d1575d..7841d0bf0819 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_madv__free__discardable__memory__posix.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_madv__free__discardable__memory__posix.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/base/memory/madv_free_discardable_memory_posix.cc.orig 2020-04-08 09:41:36 UTC +--- src/3rdparty/chromium/base/memory/madv_free_discardable_memory_posix.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/memory/madv_free_discardable_memory_posix.cc -@@ -271,7 +271,7 @@ void MadvFreeDiscardableMemoryPosix::SetKeepMemoryForT +@@ -296,7 +296,7 @@ bool MadvFreeDiscardableMemoryPosix::IsResident() cons bool MadvFreeDiscardableMemoryPosix::IsResident() const { DFAKE_SCOPED_RECURSIVE_LOCK(thread_collision_warner_); --#ifdef OS_MACOSX -+#if defined(OS_MACOSX) || defined(OS_BSD) +-#if defined(OS_APPLE) ++#if defined(OS_APPLE) || defined(OS_BSD) std::vector vec(allocated_pages_); #else std::vector vec(allocated_pages_); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_platform__shared__memory__region.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_platform__shared__memory__region.h index 63e4a74a1b09..357625b3b3fe 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_platform__shared__memory__region.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_platform__shared__memory__region.h @@ -1,29 +1,29 @@ ---- src/3rdparty/chromium/base/memory/platform_shared_memory_region.h.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/base/memory/platform_shared_memory_region.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/memory/platform_shared_memory_region.h -@@ -28,7 +28,7 @@ +@@ -27,7 +27,7 @@ #include "base/files/scoped_file.h" #endif --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) namespace content { class SandboxIPCHandler; } -@@ -122,7 +122,7 @@ class BASE_EXPORT PlatformSharedMemoryRegion { +@@ -120,7 +120,7 @@ class BASE_EXPORT PlatformSharedMemoryRegion { kMaxValue = GET_SHMEM_TEMP_DIR_FAILURE }; --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // Structure to limit access to executable region creation. struct ExecutableRegion { private: -@@ -276,7 +276,7 @@ class BASE_EXPORT PlatformSharedMemoryRegion { +@@ -264,7 +264,7 @@ class BASE_EXPORT PlatformSharedMemoryRegion { CheckPlatformHandlePermissionsCorrespondToMode); static PlatformSharedMemoryRegion Create(Mode mode, size_t size --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) , bool executable = false #endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_platform__shared__memory__region__posix.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_platform__shared__memory__region__posix.cc index f90fe21fa47a..e2087d966737 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_platform__shared__memory__region__posix.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_platform__shared__memory__region__posix.cc @@ -1,38 +1,38 @@ ---- src/3rdparty/chromium/base/memory/platform_shared_memory_region_posix.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/base/memory/platform_shared_memory_region_posix.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/memory/platform_shared_memory_region_posix.cc -@@ -76,7 +76,7 @@ FDPair ScopedFDPair::get() const { +@@ -70,7 +70,7 @@ FDPair ScopedFDPair::get() const { return {fd.get(), readonly_fd.get()}; } --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // static ScopedFD PlatformSharedMemoryRegion::ExecutableRegion::CreateFD(size_t size) { PlatformSharedMemoryRegion region = -@@ -85,7 +85,7 @@ ScopedFD PlatformSharedMemoryRegion::ExecutableRegion: +@@ -79,7 +79,7 @@ ScopedFD PlatformSharedMemoryRegion::ExecutableRegion: return region.PassPlatformHandle().fd; return ScopedFD(); } --#endif // defined(OS_LINUX) -+#endif // defined(OS_LINUX) || defined(OS_BSD) +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // static PlatformSharedMemoryRegion PlatformSharedMemoryRegion::Take( -@@ -224,7 +224,7 @@ bool PlatformSharedMemoryRegion::MapAtInternal(off_t o +@@ -204,7 +204,7 @@ PlatformSharedMemoryRegion PlatformSharedMemoryRegion: // static PlatformSharedMemoryRegion PlatformSharedMemoryRegion::Create(Mode mode, size_t size --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) , bool executable #endif -@@ -255,7 +255,7 @@ PlatformSharedMemoryRegion PlatformSharedMemoryRegion: +@@ -233,7 +233,7 @@ PlatformSharedMemoryRegion PlatformSharedMemoryRegion: // flag. FilePath directory; if (!GetShmemTempDir( --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) executable, #else false /* executable */, diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_shared__memory__mapping__unittest.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_shared__memory__mapping__unittest.cc deleted file mode 100644 index 6505106475d0..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_shared__memory__mapping__unittest.cc +++ /dev/null @@ -1,39 +0,0 @@ ---- src/3rdparty/chromium/base/memory/shared_memory_mapping_unittest.cc.orig 2019-05-23 12:39:34 UTC -+++ src/3rdparty/chromium/base/memory/shared_memory_mapping_unittest.cc -@@ -12,6 +12,7 @@ - #include "base/containers/span.h" - #include "base/memory/read_only_shared_memory_region.h" - #include "testing/gtest/include/gtest/gtest.h" -+#include "base/sys_byteorder.h" - - namespace base { - -@@ -69,8 +70,8 @@ TEST_F(SharedMemoryMappingTest, SpanWithAutoDeducedEle - - for (size_t i = 0; i < write_span.size(); ++i) - write_span[i] = i + 1; -- EXPECT_EQ(0x04030201u, read_span[0]); -- EXPECT_EQ(0x08070605u, read_span[1]); -+ EXPECT_EQ(HostToNet32(0x01020304u), read_span[0]); -+ EXPECT_EQ(HostToNet32(0x05060708u), read_span[1]); - } - - TEST_F(SharedMemoryMappingTest, SpanWithExplicitElementCount) { -@@ -95,13 +96,13 @@ TEST_F(SharedMemoryMappingTest, SpanWithExplicitElemen - - for (size_t i = 0; i < write_span.size(); ++i) - write_span[i] = i + 1; -- EXPECT_EQ(0x04030201u, read_span[0]); -- EXPECT_EQ(0x08070605u, read_span[1]); -- EXPECT_EQ(0x04030201u, read_span_2[0]); -+ EXPECT_EQ(HostToNet32(0x01020304u), read_span[0]); -+ EXPECT_EQ(HostToNet32(0x05060708u), read_span[1]); -+ EXPECT_EQ(HostToNet32(0x01020304u), read_span_2[0]); - - std::fill(write_span_2.begin(), write_span_2.end(), 0); - EXPECT_EQ(0u, read_span[0]); -- EXPECT_EQ(0x08070605u, read_span[1]); -+ EXPECT_EQ(HostToNet32(0x05060708u), read_span[1]); - EXPECT_EQ(0u, read_span_2[0]); - } - diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_message__loop_message__pump__glib.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_message__loop_message__pump__glib.cc new file mode 100644 index 000000000000..f54b950bffee --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_message__loop_message__pump__glib.cc @@ -0,0 +1,28 @@ +--- src/3rdparty/chromium/base/message_loop/message_pump_glib.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/base/message_loop/message_pump_glib.cc +@@ -8,6 +8,11 @@ + #include + #include + ++#if defined(OS_BSD) ++#include ++#include ++#endif ++ + #include "base/logging.h" + #include "base/numerics/safe_conversions.h" + #include "base/posix/eintr_wrapper.h" +@@ -48,9 +53,13 @@ bool RunningOnMainThread() { + } + + bool RunningOnMainThread() { ++#if defined(OS_BSD) ++ return pthread_main_np(); ++#else + auto pid = getpid(); + auto tid = PlatformThread::CurrentId(); + return pid > 0 && tid > 0 && pid == tid; ++#endif + } + + // A brief refresher on GLib: diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_metrics_bucket__ranges__unittest.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_metrics_bucket__ranges__unittest.cc deleted file mode 100644 index a360b48af449..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_metrics_bucket__ranges__unittest.cc +++ /dev/null @@ -1,32 +0,0 @@ ---- src/3rdparty/chromium/base/metrics/bucket_ranges_unittest.cc.orig 2019-05-23 12:39:34 UTC -+++ src/3rdparty/chromium/base/metrics/bucket_ranges_unittest.cc -@@ -7,6 +7,7 @@ - #include - - #include "testing/gtest/include/gtest/gtest.h" -+#include "base/sys_byteorder.h" - - namespace base { - namespace { -@@ -64,13 +65,21 @@ TEST(BucketRangesTest, Checksum) { - ranges.set_range(2, 2); - - ranges.ResetChecksum(); -+#if defined(ARCH_CPU_LITTLE_ENDIAN) - EXPECT_EQ(289217253u, ranges.checksum()); -+#else -+ EXPECT_EQ(2767231596u, ranges.checksum()); -+#endif - - ranges.set_range(2, 3); - EXPECT_FALSE(ranges.HasValidChecksum()); - - ranges.ResetChecksum(); -+#if defined(ARCH_CPU_LITTLE_ENDIAN) - EXPECT_EQ(2843835776u, ranges.checksum()); -+#else -+ EXPECT_EQ(3556223738u, ranges.checksum()); -+#endif - EXPECT_TRUE(ranges.HasValidChecksum()); - } - diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_native__library__unittest.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_native__library__unittest.cc deleted file mode 100644 index d9d1bd87e167..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_native__library__unittest.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/base/native_library_unittest.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/base/native_library_unittest.cc -@@ -120,7 +120,7 @@ TEST(NativeLibraryTest, LoadLibrary) { - // Android dlopen() requires further investigation, as it might vary across - // versions with respect to symbol resolution scope. - // TSan and MSan error out on RTLD_DEEPBIND, https://crbug.com/705255 --#if !defined(OS_ANDROID) && !defined(THREAD_SANITIZER) && \ -+#if !defined(OS_ANDROID) && !defined(OS_BSD) && !defined(THREAD_SANITIZER) && \ - !defined(MEMORY_SANITIZER) - - // Verifies that the |prefer_own_symbols| option satisfies its guarantee that diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_numerics_safe__math__shared__impl.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_numerics_safe__math__shared__impl.h index 62c4313ff1e4..da9d35242799 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_numerics_safe__math__shared__impl.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_numerics_safe__math__shared__impl.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/numerics/safe_math_shared_impl.h.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/base/numerics/safe_math_shared_impl.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/numerics/safe_math_shared_impl.h -@@ -23,8 +23,7 @@ +@@ -24,8 +24,7 @@ // Where available use builtin math overflow support on Clang and GCC. #elif !defined(__native_client__) && \ ((defined(__clang__) && \ diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_posix_unix__domain__socket.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_posix_unix__domain__socket.cc index a36e2b27ddf0..459f4db2b6b4 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_posix_unix__domain__socket.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_posix_unix__domain__socket.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/base/posix/unix_domain_socket.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/base/posix/unix_domain_socket.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/posix/unix_domain_socket.cc @@ -5,7 +5,10 @@ #include "base/posix/unix_domain_socket.h" @@ -7,11 +7,11 @@ +#include #include +#include -+#include ++#include a #if !defined(OS_NACL_NONSFI) #include #endif -@@ -28,6 +31,14 @@ namespace base { +@@ -29,6 +32,14 @@ const size_t UnixDomainSocket::kMaxFileDescriptors = 1 const size_t UnixDomainSocket::kMaxFileDescriptors = 16; @@ -26,16 +26,16 @@ #if !defined(OS_NACL_NONSFI) bool CreateSocketPair(ScopedFD* one, ScopedFD* two) { int raw_socks[2]; -@@ -150,7 +161,7 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd, - #if !defined(OS_NACL_NONSFI) && !defined(OS_MACOSX) +@@ -151,7 +162,7 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd, + #if !defined(OS_NACL_NONSFI) && !defined(OS_APPLE) // The PNaCl toolchain for Non-SFI binary build and macOS do not support // ucred. macOS supports xucred, but this structure is insufficient. - + CMSG_SPACE(sizeof(struct ucred)) + + CMSG_SPACE(sizeof(struct cmsgcred)) - #endif // OS_NACL_NONSFI or OS_MACOSX + #endif // !defined(OS_NACL_NONSFI) && !defined(OS_APPLE) ; char control_buffer[kControlBufferSize]; -@@ -180,9 +191,9 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd, +@@ -181,9 +192,9 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd, // SCM_CREDENTIALS. if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_CREDENTIALS) { @@ -43,7 +43,7 @@ + DCHECK_EQ(payload_len, sizeof(struct cmsgcred)); DCHECK_EQ(pid, -1); - pid = reinterpret_cast(CMSG_DATA(cmsg))->pid; -+ pid = getpid(); ++ pid = getpid(); } - #endif // !defined(OS_NACL_NONSFI) && !defined(OS_MACOSX) + #endif // !defined(OS_NACL_NONSFI) && !defined(OS_APPLE) } diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_posix_unix__domain__socket__unittest.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_posix_unix__domain__socket__unittest.cc deleted file mode 100644 index 00e6f87bdcc9..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_posix_unix__domain__socket__unittest.cc +++ /dev/null @@ -1,12 +0,0 @@ ---- src/3rdparty/chromium/base/posix/unix_domain_socket_unittest.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/base/posix/unix_domain_socket_unittest.cc -@@ -8,6 +8,9 @@ - #include - #include - #include -+#if defined(OS_BSD) -+#include -+#endif - #include - - #include "base/bind.h" diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_internal__linux.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_internal__linux.cc index 536a8516b3c0..244c17d754bb 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_internal__linux.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_internal__linux.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/process/internal_linux.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/base/process/internal_linux.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/process/internal_linux.cc -@@ -29,7 +29,11 @@ namespace internal { +@@ -30,7 +30,11 @@ const char kProcDir[] = "/proc"; const char kProcDir[] = "/proc"; @@ -12,7 +12,7 @@ FilePath GetProcPidDir(pid_t pid) { return FilePath(kProcDir).Append(NumberToString(pid)); -@@ -64,6 +68,7 @@ bool ReadProcFile(const FilePath& file, std::string* b +@@ -66,6 +70,7 @@ bool ReadProcFile(const FilePath& file, std::string* b DLOG(WARNING) << "Failed to read " << file.MaybeAsASCII(); return false; } @@ -20,7 +20,7 @@ return !buffer->empty(); } -@@ -79,6 +84,22 @@ bool ParseProcStats(const std::string& stats_data, +@@ -81,6 +86,22 @@ bool ParseProcStats(const std::string& stats_data, if (stats_data.empty()) return false; @@ -43,7 +43,7 @@ // The stat file is formatted as: // pid (process name) data1 data2 .... dataN // Look for the closing paren by scanning backwards, to avoid being fooled by -@@ -108,6 +129,7 @@ bool ParseProcStats(const std::string& stats_data, +@@ -110,6 +131,7 @@ bool ParseProcStats(const std::string& stats_data, base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); for (const auto& i : other_stats) proc_stats->push_back(i); @@ -51,7 +51,7 @@ return true; } -@@ -155,7 +177,11 @@ int64_t ReadProcStatsAndGetFieldAsInt64(pid_t pid, Pro +@@ -157,7 +179,11 @@ int64_t ReadProcSelfStatsAndGetFieldAsInt64(ProcStatsF } int64_t ReadProcSelfStatsAndGetFieldAsInt64(ProcStatsFields field_num) { @@ -63,7 +63,7 @@ return ReadStatFileAndGetFieldAsInt64(stat_file, field_num); } -@@ -171,6 +197,9 @@ size_t ReadProcStatsAndGetFieldAsSizeT(pid_t pid, +@@ -173,6 +199,9 @@ Time GetBootTime() { } Time GetBootTime() { @@ -73,7 +73,7 @@ FilePath path("/proc/stat"); std::string contents; if (!ReadProcFile(path, &contents)) -@@ -184,9 +213,13 @@ Time GetBootTime() { +@@ -186,9 +215,13 @@ Time GetBootTime() { if (!StringToInt(btime_it->second, &btime)) return Time(); return Time::FromTimeT(btime); @@ -87,7 +87,7 @@ FilePath path("/proc/stat"); std::string contents; if (!ReadProcFile(path, &contents)) -@@ -210,6 +243,7 @@ TimeDelta GetUserCpuTimeSinceBoot() { +@@ -212,6 +245,7 @@ TimeDelta GetUserCpuTimeSinceBoot() { return TimeDelta(); return ClockTicksToTimeDelta(user + nice); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_internal__linux.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_internal__linux.h index 22e69ac74cc0..456448938743 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_internal__linux.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_internal__linux.h @@ -1,15 +1,15 @@ ---- src/3rdparty/chromium/base/process/internal_linux.h.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/base/process/internal_linux.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/process/internal_linux.h -@@ -14,6 +14,8 @@ - - #include "base/files/file_path.h" +@@ -18,6 +18,8 @@ + #include "base/strings/string_number_conversions.h" + #include "base/threading/platform_thread.h" +#include /* pid_t */ + namespace base { class Time; -@@ -50,6 +52,14 @@ bool ParseProcStats(const std::string& stats_data, +@@ -59,6 +61,14 @@ enum ProcStatsFields { // If the ordering ever changes, carefully review functions that use these // values. enum ProcStatsFields { @@ -24,7 +24,7 @@ VM_COMM = 1, // Filename of executable, without parentheses. VM_STATE = 2, // Letter indicating the state of the process. VM_PPID = 3, // PID of the parent. -@@ -62,6 +72,7 @@ enum ProcStatsFields { +@@ -71,6 +81,7 @@ enum ProcStatsFields { VM_STARTTIME = 21, // The time the process started in clock ticks. VM_VSIZE = 22, // Virtual memory size in bytes. VM_RSS = 23, // Resident Set Size in pages. diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_kill.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_kill.h index 212c9e0fa508..d0e3f90ef9d2 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_kill.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_kill.h @@ -1,11 +1,16 @@ ---- src/3rdparty/chromium/base/process/kill.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/base/process/kill.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/process/kill.h -@@ -111,7 +111,7 @@ BASE_EXPORT TerminationStatus GetTerminationStatus(Pro +@@ -113,11 +113,11 @@ BASE_EXPORT TerminationStatus GetKnownDeadTerminationS BASE_EXPORT TerminationStatus GetKnownDeadTerminationStatus( ProcessHandle handle, int* exit_code); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // Spawns a thread to wait asynchronously for the child |process| to exit // and then reaps it. BASE_EXPORT void EnsureProcessGetsReaped(Process process); +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + #endif // defined(OS_POSIX) + + // Registers |process| to be asynchronously monitored for termination, forcibly diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_kill__posix.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_kill__posix.cc index 872646558dbb..0c63fa2ad1dc 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_kill__posix.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_kill__posix.cc @@ -1,11 +1,20 @@ ---- src/3rdparty/chromium/base/process/kill_posix.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/base/process/kill_posix.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/process/kill_posix.cc -@@ -167,7 +167,7 @@ void EnsureProcessTerminated(Process process) { +@@ -160,7 +160,7 @@ void EnsureProcessTerminated(Process process) { 0, new BackgroundReaper(std::move(process), TimeDelta::FromSeconds(2))); } --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) void EnsureProcessGetsReaped(Process process) { DCHECK(!process.is_current()); +@@ -171,7 +171,7 @@ void EnsureProcessGetsReaped(Process process) { + PlatformThread::CreateNonJoinable( + 0, new BackgroundReaper(std::move(process), TimeDelta())); + } +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + + #endif // !defined(OS_APPLE) + #endif // !defined(OS_NACL_NONSFI) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_launch.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_launch.cc index b663e8c6d674..00a9d0e07265 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_launch.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_launch.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/base/process/launch.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/base/process/launch.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/process/launch.cc -@@ -15,7 +15,7 @@ LaunchOptions::~LaunchOptions() = default; +@@ -15,7 +15,7 @@ LaunchOptions LaunchOptionsForTest() { LaunchOptions LaunchOptionsForTest() { LaunchOptions options; --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // To prevent accidental privilege sharing to an untrusted child, processes // are started with PR_SET_NO_NEW_PRIVS. Do not set that here, since this // new child will be used for testing only. diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_launch.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_launch.h index 3f0e1db51042..0ee76d96e2f7 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_launch.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_launch.h @@ -1,20 +1,29 @@ ---- src/3rdparty/chromium/base/process/launch.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/base/process/launch.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/process/launch.h -@@ -171,7 +171,7 @@ struct BASE_EXPORT LaunchOptions { - FileHandleMappingVector fds_to_remap; - #endif // defined(OS_WIN) +@@ -180,7 +180,7 @@ struct BASE_EXPORT LaunchOptions { + bool clear_environment = false; + #endif // OS_WIN || OS_POSIX || OS_FUCHSIA --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // If non-zero, start the process using clone(), using flags as provided. // Unlike in clone, clone_flags may not contain a custom termination signal // that is sent to the parent when the child dies. The termination signal will -@@ -184,7 +184,7 @@ struct BASE_EXPORT LaunchOptions { +@@ -193,7 +193,7 @@ struct BASE_EXPORT LaunchOptions { // Sets parent process death signal to SIGKILL. bool kill_on_parent_death = false; --#endif // defined(OS_LINUX) -+#endif // defined(OS_LINUX) || defined(OS_BSD) +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) - #if defined(OS_FUCHSIA) - // If valid, launches the application in that job object. + #if defined(OS_MAC) + // Mach ports that will be accessible to the child process. These are not +@@ -408,7 +408,7 @@ BASE_EXPORT LaunchOptions LaunchOptionsForTest(); + // binary. This should not be called in production/released code. + BASE_EXPORT LaunchOptions LaunchOptionsForTest(); + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_NACL_NONSFI) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_NACL_NONSFI) || defined(OS_BSD) + // A wrapper for clone with fork-like behavior, meaning that it returns the + // child's pid in the parent and 0 in the child. |flags|, |ptid|, and |ctid| are + // as in the clone system call (the CLONE_VM flag is not supported). diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_launch__posix.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_launch__posix.cc index 7707a66a78bb..d84fed44853c 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_launch__posix.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_launch__posix.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/process/launch_posix.cc.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/base/process/launch_posix.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/process/launch_posix.cc -@@ -64,6 +64,7 @@ +@@ -65,6 +65,7 @@ #error "macOS should use launch_mac.cc" #endif @@ -8,3 +8,32 @@ extern char** environ; namespace base { +@@ -228,6 +229,28 @@ void CloseSuperfluousFds(const base::InjectiveMultimap + DirReaderPosix fd_dir(kFDDir); + if (!fd_dir.IsValid()) { + // Fallback case: Try every possible fd. ++ ++#if defined(OS_FREEBSD) ++ // CEM: blast away most of the range with closefrom(). A common use case ++ // of this function only maps STDIN/STDOUT/STDERR and closefrom(3) is much ++ // cheaper than x00,000 close(2) invocations with a high RLIMIT_NOFILE. ++ // ++ // In the other caller, it is still very likely that the fds we care about ++ // are in relatively low number space and we can save hundreds of thousands ++ // of syscalls. ++ int max_valid_fd = -1; ++ for (size_t j = 0; j < saved_mapping.size(); j++) { ++ int fd = saved_mapping[j].dest; ++ if (fd > max_valid_fd) ++ max_valid_fd = fd; ++ } ++ if (max_valid_fd < STDERR_FILENO) ++ max_valid_fd = STDERR_FILENO; ++ ++ closefrom(max_valid_fd + 1); ++ max_fds = static_cast(max_valid_fd) + 1; ++#endif ++ + for (size_t i = 0; i < max_fds; ++i) { + const int fd = static_cast(i); + if (fd == STDIN_FILENO || fd == STDOUT_FILENO || fd == STDERR_FILENO) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_memory.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_memory.cc index e46078fe2f71..861beab959ae 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_memory.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_memory.cc @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/base/process/memory.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/base/process/memory.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/process/memory.cc -@@ -10,7 +10,7 @@ - namespace base { +@@ -55,7 +55,7 @@ NOINLINE void OnNoMemoryInternal(size_t size) { + } // namespace internal // Defined in memory_win.cc for Windows. -#if !defined(OS_WIN) @@ -9,12 +9,12 @@ namespace { -@@ -31,7 +31,7 @@ void TerminateBecauseOutOfMemory(size_t size) { - #endif +@@ -74,7 +74,7 @@ void TerminateBecauseOutOfMemory(size_t size) { + #endif // !defined(OS_WIN) // Defined in memory_mac.mm for Mac. --#if !defined(OS_MACOSX) -+#if !defined(OS_MACOSX) && !defined(OS_BSD) +-#if !defined(OS_APPLE) ++#if !defined(OS_APPLE) && !defined(OS_BSD) bool UncheckedCalloc(size_t num_items, size_t size, void** result) { const size_t alloc_size = num_items * size; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_memory.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_memory.h index 30db955cf7ac..fff5b11fed1a 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_memory.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_memory.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/base/process/memory.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/base/process/memory.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/process/memory.h -@@ -32,7 +32,7 @@ BASE_EXPORT void EnableTerminationOnOutOfMemory(); +@@ -24,7 +24,7 @@ BASE_EXPORT void TerminateBecauseOutOfMemory(size_t si // Crash reporting classifies such crashes as OOM. BASE_EXPORT void TerminateBecauseOutOfMemory(size_t size); --#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || \ ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) || \ + defined(OS_AIX) BASE_EXPORT extern size_t g_oom_size; - // The maximum allowed value for the OOM score. diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_memory__unittest.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_memory__unittest.cc deleted file mode 100644 index 4debdc39382d..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_memory__unittest.cc +++ /dev/null @@ -1,18 +0,0 @@ ---- src/3rdparty/chromium/base/process/memory_unittest.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/base/process/memory_unittest.cc -@@ -104,7 +104,7 @@ TEST(MemoryTest, AllocatorShimWorking) { - // OpenBSD does not support these tests. Don't test these on ASan/TSan/MSan - // configurations: only test the real allocator. - // Windows only supports these tests with the allocator shim in place. --#if !defined(OS_OPENBSD) && BUILDFLAG(USE_ALLOCATOR_SHIM) && \ -+#if !defined(OS_BSD) && BUILDFLAG(USE_ALLOCATOR_SHIM) && \ - !defined(MEMORY_TOOL_REPLACES_ALLOCATOR) - - namespace { -@@ -529,5 +529,5 @@ TEST_F(OutOfMemoryHandledTest, UncheckedCalloc) { - EXPECT_FALSE(base::UncheckedCalloc(1, test_size_, &value_)); - EXPECT_TRUE(value_ == nullptr); - } --#endif // !defined(OS_OPENBSD) && BUILDFLAG(ENABLE_WIN_ALLOCATOR_SHIM_TESTS) && -+#endif // !defined(OS_BSD) && BUILDFLAG(ENABLE_WIN_ALLOCATOR_SHIM_TESTS) && - // !defined(MEMORY_TOOL_REPLACES_ALLOCATOR) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__handle.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__handle.cc index 4219aa5a6ca4..56d3b9a92a77 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__handle.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__handle.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/base/process/process_handle.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/base/process/process_handle.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/process/process_handle.cc -@@ -39,7 +39,7 @@ uint32_t GetUniqueIdForProcess() { - return g_unique_id; +@@ -30,7 +30,7 @@ UniqueProcId GetUniqueIdForProcess() { + : UniqueProcId(GetCurrentProcId()); } --#if defined(OS_LINUX) || defined(OS_AIX) -+#if defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_AIX) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_AIX) || defined(OS_BSD) void InitUniqueIdForProcessInPidNamespace(ProcessId pid_outside_of_namespace) { - g_unique_id = MangleProcessId(pid_outside_of_namespace); + DCHECK(pid_outside_of_namespace != kNullProcessId); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__handle.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__handle.h index 38af4532258a..acf0a3b24727 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__handle.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__handle.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/base/process/process_handle.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/base/process/process_handle.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/process/process_handle.h -@@ -64,7 +64,7 @@ BASE_EXPORT ProcessId GetCurrentProcId(); - // a process's PID. - BASE_EXPORT uint32_t GetUniqueIdForProcess(); +@@ -103,7 +103,7 @@ BASE_EXPORT UniqueProcId GetUniqueIdForProcess(); + // processes may be reused. + BASE_EXPORT UniqueProcId GetUniqueIdForProcess(); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // When a process is started in a different PID namespace from the browser // process, this function must be called with the process's PID in the browser's // PID namespace in order to initialize its unique ID. Not thread safe. diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__linux.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__linux.cc index a239e89b6e00..32184643371a 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__linux.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__linux.cc @@ -1,16 +1,33 @@ ---- src/3rdparty/chromium/base/process/process_linux.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/base/process/process_linux.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/process/process_linux.cc -@@ -79,6 +79,9 @@ Time Process::CreationTime() const { - internal::VM_STARTTIME) - : internal::ReadProcStatsAndGetFieldAsInt64( - Pid(), internal::VM_STARTTIME); +@@ -24,7 +24,9 @@ namespace { + + namespace { + ++#if !defined(OS_BSD) + const int kForegroundPriority = 0; ++#endif + + #if defined(OS_CHROMEOS) || BUILDFLAG(IS_LACROS) + // We are more aggressive in our lowering of background process priority +@@ -69,7 +71,7 @@ struct CGroups { + return groups; + } + }; +-#else ++#elif !defined(OS_BSD) + const int kBackgroundPriority = 5; + #endif // defined(OS_CHROMEOS) || BUILDFLAG(IS_LACROS) + +@@ -96,13 +98,18 @@ Time Process::CreationTime() const { + if (!start_ticks) + return Time(); + +#if defined(OS_BSD) + return Time::FromTimeT(start_ticks); +#else - if (!start_ticks) - return Time(); TimeDelta start_offset = internal::ClockTicksToTimeDelta(start_ticks); -@@ -86,8 +89,10 @@ Time Process::CreationTime() const { + Time boot_time = internal::GetBootTime(); if (boot_time.is_null()) return Time(); return Time(boot_time + start_offset); @@ -20,12 +37,12 @@ +#if !defined(OS_BSD) // static bool Process::CanBackgroundProcesses() { - #if defined(OS_CHROMEOS) -@@ -139,6 +144,7 @@ bool Process::SetProcessBackgrounded(bool background) + #if defined(OS_CHROMEOS) || BUILDFLAG(IS_LACROS) +@@ -154,6 +161,7 @@ bool Process::SetProcessBackgrounded(bool background) DPCHECK(result == 0); return result == 0; } +#endif // !defined(OS_BSD) - #if defined(OS_CHROMEOS) + #if defined(OS_CHROMEOS) || BUILDFLAG(IS_LACROS) bool IsProcessBackgroundedCGroup(const StringPiece& cgroup_contents) { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.cc index 5d2d57979c0a..d145178272f2 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.cc @@ -1,38 +1,38 @@ ---- src/3rdparty/chromium/base/process/process_metrics.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/base/process/process_metrics.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/process/process_metrics.cc -@@ -57,7 +57,7 @@ SystemMetrics SystemMetrics::Sample() { +@@ -49,7 +49,7 @@ SystemMetrics SystemMetrics::Sample() { SystemMetrics system_metrics; system_metrics.committed_memory_ = GetSystemCommitCharge(); --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) GetSystemMemoryInfo(&system_metrics.memory_info_); GetVmStatInfo(&system_metrics.vmstat_info_); GetSystemDiskInfo(&system_metrics.disk_info_); -@@ -75,7 +75,7 @@ std::unique_ptr SystemMetrics::ToValue() const +@@ -68,7 +68,7 @@ std::unique_ptr SystemMetrics::ToValue() const std::unique_ptr res(new DictionaryValue()); res->SetIntKey("committed_memory", static_cast(committed_memory_)); --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) std::unique_ptr meminfo = memory_info_.ToValue(); std::unique_ptr vmstat = vmstat_info_.ToValue(); meminfo->MergeDictionary(vmstat.get()); -@@ -126,7 +126,7 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage( +@@ -119,7 +119,7 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage( } #endif --#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) -+#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) +-#if defined(OS_APPLE) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \ ++#if defined(OS_APPLE) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || \ + defined(OS_AIX) int ProcessMetrics::CalculateIdleWakeupsPerSecond( uint64_t absolute_idle_wakeups) { - return CalculateEventsPerSecond(absolute_idle_wakeups, -@@ -138,7 +138,7 @@ int ProcessMetrics::GetIdleWakeupsPerSecond() { +@@ -132,7 +132,7 @@ int ProcessMetrics::GetIdleWakeupsPerSecond() { NOTIMPLEMENTED(); // http://crbug.com/120488 return 0; } --#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) -+#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) +-#endif // defined(OS_APPLE) || defined(OS_LINUX) || defined(OS_CHROMEOS) || ++#endif // defined(OS_APPLE) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || + // defined(OS_AIX) - #if defined(OS_MACOSX) - int ProcessMetrics::CalculatePackageIdleWakeupsPerSecond( + #if defined(OS_APPLE) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.h index 2df8b171a04a..104309d6f874 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.h @@ -1,131 +1,163 @@ ---- src/3rdparty/chromium/base/process/process_metrics.h.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/base/process/process_metrics.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/process/process_metrics.h -@@ -41,7 +41,7 @@ namespace base { +@@ -47,7 +47,7 @@ struct IoCounters; // Full declaration is in process_metrics_iocounters.h. struct IoCounters; --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) // Minor and major page fault counts since the process creation. // Both counts are process-wide, and exclude child processes. // -@@ -51,7 +51,7 @@ struct PageFaultCounts { +@@ -57,7 +57,7 @@ struct PageFaultCounts { int64_t minor; int64_t major; }; --#endif // defined(OS_LINUX) || defined(OS_ANDROID) -+#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) // Convert a POSIX timeval to microseconds. BASE_EXPORT int64_t TimeValToMicroseconds(const struct timeval& tv); -@@ -92,7 +92,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -98,7 +98,7 @@ class BASE_EXPORT ProcessMetrics { // convenience wrapper for CreateProcessMetrics(). static std::unique_ptr CreateCurrentProcessMetrics(); --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) // Resident Set Size is a Linux/Android specific memory concept. Do not // attempt to extend this to other platforms. BASE_EXPORT size_t GetResidentSetSize() const; -@@ -168,14 +168,14 @@ class BASE_EXPORT ProcessMetrics { +@@ -124,7 +124,7 @@ class BASE_EXPORT ProcessMetrics { + // will result in a time delta of 2 seconds/per 1 wall-clock second. + TimeDelta GetCumulativeCPUUsage(); + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || \ ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) || \ + defined(OS_AIX) + // Emits the cumulative CPU usage for all currently active threads since they + // were started into the output parameter (replacing its current contents). +@@ -159,7 +159,7 @@ class BASE_EXPORT ProcessMetrics { + bool ParseProcTimeInState(const std::string& content, + PlatformThreadId tid, + TimeInStatePerThread& time_in_state_per_thread); +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) || + // defined(OS_AIX) + + // Returns the number of average idle cpu wakeups per second since the last +@@ -216,14 +216,14 @@ class BASE_EXPORT ProcessMetrics { int GetOpenFdSoftLimit() const; #endif // defined(OS_POSIX) --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) // Bytes of swap as reported by /proc/[pid]/status. uint64_t GetVmSwapBytes() const; // Minor and major page fault count as reported by /proc/[pid]/stat. // Returns true for success. bool GetPageFaultCounts(PageFaultCounts* counts) const; --#endif // defined(OS_LINUX) || defined(OS_ANDROID) -+#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) // Returns total memory usage of malloc. size_t GetMallocUsage(); -@@ -187,7 +187,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -235,7 +235,7 @@ class BASE_EXPORT ProcessMetrics { ProcessMetrics(ProcessHandle process, PortProvider* port_provider); - #endif // !defined(OS_MACOSX) || defined(OS_IOS) + #endif // !defined(OS_MAC) --#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) -+#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) +-#if defined(OS_APPLE) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \ ++#if defined(OS_APPLE) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || \ + defined(OS_AIX) int CalculateIdleWakeupsPerSecond(uint64_t absolute_idle_wakeups); #endif - #if defined(OS_MACOSX) -@@ -216,7 +216,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -246,10 +246,10 @@ class BASE_EXPORT ProcessMetrics { + uint64_t absolute_package_idle_wakeups); + #endif + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || \ ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) || \ + defined(OS_AIX) + CPU::CoreType GetCoreType(int core_index); +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) || + // defined(OS_AIX) + + #if defined(OS_WIN) +@@ -271,7 +271,7 @@ class BASE_EXPORT ProcessMetrics { // Number of bytes transferred to/from disk in bytes. uint64_t last_cumulative_disk_usage_ = 0; --#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) -+#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) +-#if defined(OS_APPLE) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \ ++#if defined(OS_APPLE) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || \ + defined(OS_AIX) // Same thing for idle wakeups. TimeTicks last_idle_wakeups_time_; - uint64_t last_absolute_idle_wakeups_; -@@ -264,7 +264,7 @@ BASE_EXPORT size_t GetHandleLimit(); +@@ -323,7 +323,7 @@ BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_de BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_descriptors); #endif // defined(OS_POSIX) --#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \ -+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || \ - defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_FUCHSIA) +-#if defined(OS_WIN) || defined(OS_APPLE) || defined(OS_LINUX) || \ ++#if defined(OS_WIN) || defined(OS_APPLE) || defined(OS_LINUX) || defined(OS_BSD) || \ + defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_AIX) || \ + defined(OS_FUCHSIA) // Data about system-wide memory consumption. Values are in KB. Available on - // Windows, Mac, Linux, Android and Chrome OS. -@@ -298,7 +298,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { +@@ -358,7 +358,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { int avail_phys = 0; #endif --#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || \ ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) || \ + defined(OS_AIX) // This provides an estimate of available memory as described here: // https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773 - // NOTE: this is ONLY valid in kernels 3.14 and up. Its value will always -@@ -312,7 +312,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { +@@ -373,7 +373,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { int swap_free = 0; #endif --#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_AIX) || \ -+#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) || \ - defined(OS_FUCHSIA) +-#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \ ++#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || \ + defined(OS_AIX) || defined(OS_FUCHSIA) int buffers = 0; int cached = 0; -@@ -322,7 +322,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { +@@ -383,7 +383,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { int inactive_file = 0; int dirty = 0; int reclaimable = 0; --#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_AIX) || -+#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) || - // defined(OS_FUCHSIA) +-#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || ++#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || + // defined(OS_AIX) defined(OS_FUCHSIA) - #if defined(OS_CHROMEOS) -@@ -348,10 +348,10 @@ struct BASE_EXPORT SystemMemoryInfoKB { + #if defined(OS_CHROMEOS) || BUILDFLAG(IS_LACROS) +@@ -406,11 +406,11 @@ BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoK // Exposed for memory debugging widget. BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo); --#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || -+#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) - // defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_FUCHSIA) +-#endif // defined(OS_WIN) || defined(OS_APPLE) || defined(OS_LINUX) || ++#endif // defined(OS_WIN) || defined(OS_APPLE) || defined(OS_LINUX) || defined(OS_BSD) || + // defined(OS_CHROMEOS) defined(OS_ANDROID) || defined(OS_AIX) || + // defined(OS_FUCHSIA) --#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || \ ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) || \ + defined(OS_AIX) // Parse the data found in /proc//stat and return the sum of the // CPU-related ticks. Returns -1 on parse error. - // Exposed for testing. -@@ -424,7 +424,7 @@ BASE_EXPORT bool GetSystemDiskInfo(SystemDiskInfo* dis +@@ -485,7 +485,7 @@ BASE_EXPORT TimeDelta GetUserCpuTimeSinceBoot(); // Returns the amount of time spent in user space since boot across all CPUs. BASE_EXPORT TimeDelta GetUserCpuTimeSinceBoot(); --#endif // defined(OS_LINUX) || defined(OS_ANDROID) -+#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) || + // defined(OS_AIX) - #if defined(OS_CHROMEOS) - // Data from files in directory /sys/block/zram0 about ZRAM usage. -@@ -519,7 +519,7 @@ class BASE_EXPORT SystemMetrics { + #if defined(OS_CHROMEOS) || BUILDFLAG(IS_LACROS) +@@ -597,7 +597,7 @@ class BASE_EXPORT SystemMetrics { FRIEND_TEST_ALL_PREFIXES(SystemMetricsTest, SystemMetrics); size_t committed_memory_; --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) SystemMemoryInfoKB memory_info_; VmStatInfo vmstat_info_; SystemDiskInfo disk_info_; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics__freebsd.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics__freebsd.cc index 7fa8c5cd382b..dded3805a4ce 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics__freebsd.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics__freebsd.cc @@ -1,14 +1,17 @@ ---- src/3rdparty/chromium/base/process/process_metrics_freebsd.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/base/process/process_metrics_freebsd.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/process/process_metrics_freebsd.cc -@@ -5,6 +5,7 @@ +@@ -3,8 +3,10 @@ + // found in the LICENSE file. + #include "base/process/process_metrics.h" ++#include "base/notreached.h" #include +#include #include #include #include -@@ -14,11 +15,29 @@ +@@ -14,11 +16,29 @@ #include "base/process/process_metrics_iocounters.h" #include "base/stl_util.h" @@ -40,7 +43,7 @@ // static std::unique_ptr ProcessMetrics::CreateProcessMetrics( -@@ -69,4 +88,216 @@ size_t GetSystemCommitCharge() { +@@ -69,4 +89,216 @@ size_t GetSystemCommitCharge() { return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize); } diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics__posix.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics__posix.cc index 4dd9ffe6de82..b604ca381991 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics__posix.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics__posix.cc @@ -1,15 +1,15 @@ ---- src/3rdparty/chromium/base/process/process_metrics_posix.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/base/process/process_metrics_posix.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/process/process_metrics_posix.cc -@@ -19,6 +19,8 @@ +@@ -20,6 +20,8 @@ - #if defined(OS_MACOSX) + #if defined(OS_APPLE) #include +#elif defined(OS_FREEBSD) +#include #else #include #endif -@@ -107,7 +109,7 @@ size_t ProcessMetrics::GetMallocUsage() { +@@ -126,7 +128,7 @@ size_t ProcessMetrics::GetMallocUsage() { #else return minfo.hblkhd + minfo.arena; #endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_register__context.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_register__context.h index e43368959186..0d5fc62fbeea 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_register__context.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_register__context.h @@ -1,15 +1,15 @@ ---- src/3rdparty/chromium/base/profiler/register_context.h.orig 2020-04-08 09:41:36 UTC +--- src/3rdparty/chromium/base/profiler/register_context.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/profiler/register_context.h @@ -17,7 +17,7 @@ #include - #elif defined(OS_MACOSX) + #elif defined(OS_APPLE) #include --#elif defined(OS_ANDROID) || defined(OS_LINUX) -+#elif defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) +-#elif defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) ++#elif defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include #endif -@@ -152,6 +152,48 @@ inline uintptr_t& RegisterContextInstructionPointer(mc +@@ -190,6 +190,48 @@ inline uintptr_t& RegisterContextInstructionPointer(mc } #endif // #if defined(ARCH_CPU_ARM_FAMILY) && defined(ARCH_CPU_32_BITS) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_sampling__profiler__thread__token.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_sampling__profiler__thread__token.cc index 318762d4070a..14d811845a39 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_sampling__profiler__thread__token.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_sampling__profiler__thread__token.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/base/profiler/sampling_profiler_thread_token.cc.orig 2020-04-08 09:41:36 UTC +--- src/3rdparty/chromium/base/profiler/sampling_profiler_thread_token.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/profiler/sampling_profiler_thread_token.cc -@@ -7,7 +7,7 @@ +@@ -7,7 +7,7 @@ SamplingProfilerThreadToken GetSamplingProfilerCurrent namespace base { SamplingProfilerThreadToken GetSamplingProfilerCurrentThreadToken() { --#if defined(OS_ANDROID) || defined(OS_LINUX) -+#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) return {PlatformThread::CurrentId(), pthread_self()}; #else return {PlatformThread::CurrentId()}; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_sampling__profiler__thread__token.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_sampling__profiler__thread__token.h index 0954d059cff0..66bfa91d3dc5 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_sampling__profiler__thread__token.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_sampling__profiler__thread__token.h @@ -1,20 +1,20 @@ ---- src/3rdparty/chromium/base/profiler/sampling_profiler_thread_token.h.orig 2020-04-08 09:41:36 UTC +--- src/3rdparty/chromium/base/profiler/sampling_profiler_thread_token.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/profiler/sampling_profiler_thread_token.h @@ -9,7 +9,7 @@ #include "base/threading/platform_thread.h" #include "build/build_config.h" --#if defined(OS_ANDROID) || defined(OS_LINUX) -+#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include #endif -@@ -21,7 +21,7 @@ namespace base { +@@ -21,7 +21,7 @@ struct SamplingProfilerThreadToken { // functions used to obtain the stack base address. struct SamplingProfilerThreadToken { PlatformThreadId id; --#if defined(OS_ANDROID) || defined(OS_LINUX) -+#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) pthread_t pthread_id; #endif }; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_stack__copier__signal.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_stack__copier__signal.cc index 5983abf16e99..f42f24f26f85 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_stack__copier__signal.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_stack__copier__signal.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/base/profiler/stack_copier_signal.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/base/profiler/stack_copier_signal.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/profiler/stack_copier_signal.cc @@ -4,7 +4,14 @@ @@ -15,7 +15,7 @@ #include #include #include -@@ -33,8 +40,13 @@ class AsyncSafeWaitableEvent { +@@ -34,8 +41,13 @@ class AsyncSafeWaitableEvent { // for a pthread mutex. So, also check the condition. while (true) { int res = @@ -29,7 +29,7 @@ if (futex_.load(std::memory_order_acquire) != 0) return true; if (res != 0) -@@ -44,8 +56,12 @@ class AsyncSafeWaitableEvent { +@@ -45,8 +57,12 @@ class AsyncSafeWaitableEvent { void Signal() { futex_.store(1, std::memory_order_release); @@ -42,7 +42,7 @@ } private: -@@ -215,11 +231,18 @@ bool StackCopierSignal::CopyStack(StackBuffer* stack_b +@@ -216,11 +232,18 @@ bool StackCopierSignal::CopyStack(StackBuffer* stack_b if (!scoped_sigaction.succeeded()) return false; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_stack__sampling__profiler__unittest.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_stack__sampling__profiler__test__util.cc similarity index 56% rename from www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_stack__sampling__profiler__unittest.cc rename to www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_stack__sampling__profiler__test__util.cc index 8e8ff9841ab1..c2ee5d016d95 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_stack__sampling__profiler__unittest.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_stack__sampling__profiler__test__util.cc @@ -1,9 +1,9 @@ ---- src/3rdparty/chromium/base/profiler/stack_sampling_profiler_unittest.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/base/profiler/stack_sampling_profiler_unittest.cc -@@ -39,7 +39,7 @@ - #include +--- src/3rdparty/chromium/base/profiler/stack_sampling_profiler_test_util.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/base/profiler/stack_sampling_profiler_test_util.cc +@@ -32,7 +32,7 @@ + // Fortunately, it provides _alloca, which functions identically. #include - #include + #define alloca _alloca -#else +#elif !defined(OS_BSD) #include diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_thread__delegate__posix.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_thread__delegate__posix.cc index 580f980fc476..68cc5632eec3 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_thread__delegate__posix.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_thread__delegate__posix.cc @@ -1,16 +1,16 @@ ---- src/3rdparty/chromium/base/profiler/thread_delegate_posix.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/base/profiler/thread_delegate_posix.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/profiler/thread_delegate_posix.cc -@@ -9,6 +9,9 @@ +@@ -12,6 +12,9 @@ + #include "base/profiler/thread_delegate_posix.h" #include "base/stl_util.h" - #include "build/build_config.h" +#if defined(OS_FREEBSD) +#include +#endif - namespace base { - -@@ -17,7 +20,12 @@ namespace { + #if defined(OS_ANDROID) + #include "base/files/file_util.h" +@@ -43,7 +46,12 @@ uintptr_t GetThreadStackBaseAddressImpl( uintptr_t GetThreadStackBaseAddressImpl( SamplingProfilerThreadToken thread_token) { pthread_attr_t attr; @@ -23,7 +23,7 @@ // See crbug.com/617730 for limitations of this approach on Linux. void* address; size_t size; -@@ -93,16 +101,33 @@ std::vector ThreadDelegatePosix::GetRegist +@@ -130,16 +138,33 @@ std::vector ThreadDelegatePosix::GetRegist return { // Return the set of callee-save registers per the i386 System V ABI // section 2.2.3, plus the stack pointer. @@ -57,7 +57,7 @@ reinterpret_cast(&thread_context->gregs[REG_RBP]), reinterpret_cast(&thread_context->gregs[REG_RBX]), reinterpret_cast(&thread_context->gregs[REG_R12]), -@@ -110,6 +135,7 @@ std::vector ThreadDelegatePosix::GetRegist +@@ -147,6 +172,7 @@ std::vector ThreadDelegatePosix::GetRegist reinterpret_cast(&thread_context->gregs[REG_R14]), reinterpret_cast(&thread_context->gregs[REG_R15]), reinterpret_cast(&thread_context->gregs[REG_RSP]), diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_sampling__heap__profiler_sampling__heap__profiler.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_sampling__heap__profiler_sampling__heap__profiler.cc index 3cd3787ceddf..8c489bc2956f 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_sampling__heap__profiler_sampling__heap__profiler.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_sampling__heap__profiler_sampling__heap__profiler.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/sampling_heap_profiler/sampling_heap_profiler.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/base/sampling_heap_profiler/sampling_heap_profiler.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/sampling_heap_profiler/sampling_heap_profiler.cc -@@ -29,6 +29,10 @@ +@@ -30,6 +30,10 @@ #include #endif @@ -10,9 +10,9 @@ + #if defined(OS_ANDROID) && BUILDFLAG(CAN_UNWIND_WITH_CFI_TABLE) && \ defined(OFFICIAL_BUILD) - #include "base/trace_event/cfi_backtrace_android.h" -@@ -64,6 +68,10 @@ const char* GetAndLeakThreadName() { - #elif defined(OS_MACOSX) + #include "base/trace_event/cfi_backtrace_android.h" // no-presubmit-check +@@ -65,6 +69,10 @@ const char* GetAndLeakThreadName() { + #elif defined(OS_APPLE) int err = pthread_getname_np(pthread_self(), name, kBufferLen); if (err == 0 && *name != '\0') + return strdup(name); @@ -20,5 +20,5 @@ + pthread_get_name_np(pthread_self(), name, kBufferLen); + if (*name != '\0') return strdup(name); - #endif // defined(OS_LINUX) || defined(OS_ANDROID) + #endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_security__unittest.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_security__unittest.cc deleted file mode 100644 index 7dbb4163a24b..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_security__unittest.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/base/security_unittest.cc.orig 2020-04-08 09:41:36 UTC -+++ src/3rdparty/chromium/base/security_unittest.cc -@@ -60,7 +60,7 @@ NOINLINE Type HideValueFromCompiler(volatile Type valu - // FAILS_ is too clunky. - void OverflowTestsSoftExpectTrue(bool overflow_detected) { - if (!overflow_detected) { --#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_MACOSX) -+#if defined(OS_POSIX) && !defined(OS_NACL) - // Sadly, on Linux, Android, and OSX we don't have a good story yet. Don't - // fail the test, but report. - printf("Platform has overflow: %s\n", diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_synchronization_lock__impl.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_synchronization_lock__impl.h index 438382b2c2b2..aab2088aab83 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_synchronization_lock__impl.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_synchronization_lock__impl.h @@ -1,12 +1,15 @@ ---- src/3rdparty/chromium/base/synchronization/lock_impl.h.orig 2020-04-08 09:41:36 UTC +--- src/3rdparty/chromium/base/synchronization/lock_impl.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/synchronization/lock_impl.h -@@ -67,10 +67,13 @@ void LockImpl::Unlock() { - ::ReleaseSRWLockExclusive(reinterpret_cast(&native_handle_)); +@@ -105,6 +105,8 @@ void LockImpl::Unlock() { } + #elif defined(OS_POSIX) || defined(OS_FUCHSIA) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wthread-safety-analysis" - void LockImpl::Unlock() { + + bool LockImpl::Try() { + int rv = pthread_mutex_trylock(&native_handle_); +@@ -116,6 +118,7 @@ void LockImpl::Unlock() { int rv = pthread_mutex_unlock(&native_handle_); DCHECK_EQ(rv, 0) << ". " << strerror(rv); } diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_syslog__logging.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_syslog__logging.cc index 3d6b2fa82ae4..f6437000aff0 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_syslog__logging.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_syslog__logging.cc @@ -1,20 +1,20 @@ ---- src/3rdparty/chromium/base/syslog_logging.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/base/syslog_logging.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/syslog_logging.cc -@@ -11,7 +11,7 @@ - #include "base/callback_helpers.h" - #include "base/debug/stack_trace.h" +@@ -13,7 +13,7 @@ + #include "base/strings/string_util.h" + #include "base/win/scoped_handle.h" #include "base/win/win_util.h" --#elif defined(OS_LINUX) -+#elif defined(OS_LINUX) || defined(OS_BSD) +-#elif defined(OS_LINUX) || defined(OS_CHROMEOS) ++#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // defines LOG_INFO, LOG_WARNING macros that could conflict with // base::LOG_INFO, base::LOG_WARNING. #include -@@ -110,7 +110,7 @@ EventLogMessage::~EventLogMessage() { +@@ -134,7 +134,7 @@ EventLogMessage::~EventLogMessage() { if (user_sid != nullptr) ::LocalFree(user_sid); --#elif defined(OS_LINUX) -+#elif defined(OS_LINUX) || defined(OS_BSD) +-#elif defined(OS_LINUX) || defined(OS_CHROMEOS) ++#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) const char kEventSource[] = "chrome"; openlog(kEventSource, LOG_NOWAIT | LOG_PID, LOG_USER); // We can't use the defined names for the logging severity from syslog.h diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info.cc index 7820f051cc60..3a82bd0472e8 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/base/system/sys_info.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/base/system/sys_info.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/system/sys_info.cc -@@ -102,7 +102,7 @@ void SysInfo::GetHardwareInfo(base::OnceCallback - #include "base/logging.h" + #include "base/notreached.h" ++#include "base/process/process_metrics.h" +#include "base/strings/string_util.h" namespace base { @@ -15,44 +16,61 @@ - sysctlbyname("vm.stats.vm.v_page_count", &pages, &size, NULL, 0); - sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0); - if (pages == -1 || page_size == -1) { -+ if(r == 0) ++ ++ if (r == 0) + r = sysctlbyname("vm.stats.vm.v_page_count", &pages, &size, NULL, 0); -+ if(r == 0) -+ r =sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0); -+ if(r == -1) { ++ if (r == 0) ++ r = sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0); ++ ++ if (r == -1) { NOTREACHED(); return 0; } ++ return static_cast(pages) * page_size; } +int64_t SysInfo::AmountOfAvailablePhysicalMemoryImpl() { + int page_size, r = 0; -+ unsigned pgfree, pginact, pgcache; ++ unsigned int pgfree, pginact, pgcache; + size_t size = sizeof(page_size); + size_t szpg = sizeof(pgfree); -+ if(r == 0) ++ ++ if (r == 0) + r = sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0); -+ if(r == 0) ++ if (r == 0) + r = sysctlbyname("vm.stats.vm.v_free_count", &pgfree, &szpg, NULL, 0); -+ if(r == 0) ++ if (r == 0) + r = sysctlbyname("vm.stats.vm.v_inactive_count", &pginact, &szpg, NULL, 0); -+ if(r == 0) ++ if (r == 0) + r = sysctlbyname("vm.stats.vm.v_cache_count", &pgcache, &szpg, NULL, 0); -+ if(r == -1) { ++ ++ if (r == -1) { + NOTREACHED(); + return 0; + } ++ + return static_cast((pgfree + pginact + pgcache) * page_size); +} + // static ++int64_t SysInfo::AmountOfAvailablePhysicalMemory(const SystemMemoryInfoKB& info) { ++ int64_t res_kb = info.available != 0 ++ ? info.available - info.active_file ++ : info.free + info.reclaimable + info.inactive_file; ++ return res_kb * 1024; ++} ++ ++// static +std::string SysInfo::CPUModelName() { + int mib[] = { CTL_HW, HW_MODEL }; + char name[256]; + size_t size = base::size(name); -+ if (sysctl(mib, base::size(mib), &name, &size, NULL, 0) == 0) ++ ++ if (sysctl(mib, base::size(mib), &name, &size, NULL, 0) == 0) { + return name; ++ } ++ + return std::string(); +} + @@ -71,12 +89,13 @@ + +SysInfo::HardwareInfo SysInfo::GetHardwareInfoSync() { + HardwareInfo info; -+ // Set the manufacturer to "FreeBSD" and the model to -+ // an empty string. ++ + info.manufacturer = "FreeBSD"; + info.model = HardwareModelName(); ++ + DCHECK(IsStringUTF8(info.manufacturer)); + DCHECK(IsStringUTF8(info.model)); ++ + return info; } diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info__posix.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info__posix.cc index c696bede9c3e..45da8acd4454 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info__posix.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info__posix.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/system/sys_info_posix.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/base/system/sys_info_posix.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/system/sys_info_posix.cc -@@ -220,6 +220,8 @@ std::string SysInfo::OperatingSystemArchitecture() { +@@ -223,6 +223,8 @@ std::string SysInfo::OperatingSystemArchitecture() { arch = "x86"; } else if (arch == "amd64") { arch = "x86_64"; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_test_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_test_BUILD.gn new file mode 100644 index 000000000000..3ca8a275c195 --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_test_BUILD.gn @@ -0,0 +1,15 @@ +--- src/3rdparty/chromium/base/test/BUILD.gn.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/base/test/BUILD.gn +@@ -415,7 +415,11 @@ if (is_linux || is_chromeos) { + + copy("fonts_conf") { + sources = [ "fonts.conf" ] +- outputs = [ "${root_build_dir}/etc/fonts/{{source_file_part}}" ] ++ if (is_bsd) { ++ outputs = [ "${root_build_dir}/%%LOCALBASE%%/etc/fonts/{{source_file_part}}" ] ++ } else { ++ outputs = [ "${root_build_dir}/etc/fonts/{{source_file_part}}" ] ++ } + } + + if (current_toolchain == host_toolchain) { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_test_test__file__util__posix.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_test_test__file__util__posix.cc new file mode 100644 index 000000000000..34bc924058e5 --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_test_test__file__util__posix.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/base/test/test_file_util_posix.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/base/test/test_file_util_posix.cc +@@ -87,7 +87,7 @@ void SyncPageCacheToDisk() { + sync(); + } + +-#if !defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_APPLE) && \ ++#if !defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_APPLE) && !defined(OS_BSD) && \ + !defined(OS_ANDROID) + bool EvictFileFromSystemCache(const FilePath& file) { + // There doesn't seem to be a POSIX way to cool the disk cache. diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_test_test__suite.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_test_test__suite.cc new file mode 100644 index 000000000000..db6b07de0e08 --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_test_test__suite.cc @@ -0,0 +1,37 @@ +--- src/3rdparty/chromium/base/test/test_suite.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/base/test/test_suite.cc +@@ -66,7 +66,7 @@ + #include "base/test/test_support_android.h" + #endif + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + #include "base/test/fontconfig_util_linux.h" + #endif + +@@ -382,14 +382,14 @@ void TestSuite::PreInitialize() { + testing::GTEST_FLAG(catch_exceptions) = false; + #endif + EnableTerminationOnHeapCorruption(); +-#if (defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(USE_AURA) ++#if (defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)) && defined(USE_AURA) + // When calling native char conversion functions (e.g wrctomb) we need to + // have the locale set. In the absence of such a call the "C" locale is the + // default. In the gtk code (below) gtk_init() implicitly sets a locale. + setlocale(LC_ALL, ""); + // We still need number to string conversions to be locale insensitive. + setlocale(LC_NUMERIC, "C"); +-#endif // (defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(USE_AURA) ++#endif // (defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)) && defined(USE_AURA) + + // On Android, AtExitManager is created in + // testing/android/native_test_wrapper.cc before main() is called. +@@ -650,7 +650,7 @@ void TestSuite::Initialize() { + // TODO(jshin): Should we set the locale via an OS X locale API here? + i18n::SetICUDefaultLocale("en_US"); + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + SetUpFontconfig(); + #endif + diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_third__party_libevent_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_third__party_libevent_BUILD.gn index 895938da5c21..92d87ab1a79c 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_third__party_libevent_BUILD.gn +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_third__party_libevent_BUILD.gn @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/base/third_party/libevent/BUILD.gn.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/base/third_party/libevent/BUILD.gn.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/third_party/libevent/BUILD.gn @@ -48,13 +48,20 @@ static_library("bundled_libevent") { "mac/event-config.h", ] include_dirs = [ "mac" ] -- } else if (is_linux) { -+ } else if (is_linux && !is_bsd) { +- } else if (is_linux || is_chromeos) { ++ } else if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "epoll.c", "linux/config.h", @@ -13,7 +13,7 @@ ] include_dirs = [ "linux" ] + } else if (is_bsd) { -+ sources += [ ++ sources += [ + "kqueue.c", + "freebsd/config.h", + "freebsd/event-config.h", diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread.h index 455a56311c14..7feb415bc0a5 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/base/threading/platform_thread.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/base/threading/platform_thread.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/threading/platform_thread.h -@@ -217,7 +217,7 @@ class BASE_EXPORT PlatformThread { +@@ -230,7 +230,7 @@ class BASE_EXPORT PlatformThread { + // Returns a realtime period provided by |delegate|. + static TimeDelta GetRealtimePeriod(Delegate* delegate); - static ThreadPriority GetCurrentThreadPriority(); - --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // Toggles a specific thread's priority at runtime. This can be used to // change the priority of a thread in a different process and will fail // if the calling process does not have proper permissions. The diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__internal__posix.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__internal__posix.h new file mode 100644 index 000000000000..6bedc19c611e --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__internal__posix.h @@ -0,0 +1,18 @@ +--- src/3rdparty/chromium/base/threading/platform_thread_internal_posix.h.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/base/threading/platform_thread_internal_posix.h +@@ -47,13 +47,13 @@ Optional GetCurrentThreadPriorityForPl + // of CanIncreaseThreadPriority(). + Optional GetCurrentThreadPriorityForPlatform(); + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + // Current thread id is cached in thread local storage for performance reasons. + // In some rare cases it's important to clear that cache explicitly (e.g. after + // going through clone() syscall which does not call pthread_atfork() + // handlers). + BASE_EXPORT void ClearTidCache(); +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + + } // namespace internal + diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__linux.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__linux.cc index 2743e9c6b4e2..67331095574d 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__linux.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__linux.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/threading/platform_thread_linux.cc.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/base/threading/platform_thread_linux.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/threading/platform_thread_linux.cc -@@ -18,7 +18,9 @@ +@@ -24,7 +24,9 @@ #if !defined(OS_NACL) && !defined(OS_AIX) #include @@ -10,7 +10,7 @@ #include #include #include -@@ -99,7 +101,7 @@ const ThreadPriorityToNiceValuePair kThreadPriorityToN +@@ -264,7 +266,7 @@ Optional CanIncreaseCurrentThreadPriorityForPlat Optional CanIncreaseCurrentThreadPriorityForPlatform( ThreadPriority priority) { @@ -19,7 +19,7 @@ // A non-zero soft-limit on RLIMIT_RTPRIO is required to be allowed to invoke // pthread_setschedparam in SetCurrentThreadPriorityForPlatform(). struct rlimit rlim; -@@ -141,7 +143,7 @@ Optional GetCurrentThreadPriorityForPl +@@ -314,7 +316,7 @@ void PlatformThread::SetName(const std::string& name) void PlatformThread::SetName(const std::string& name) { ThreadIdNameManager::GetInstance()->SetName(name); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__posix.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__posix.cc index b093025e77df..c9f5903772ae 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__posix.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__posix.cc @@ -1,11 +1,54 @@ ---- src/3rdparty/chromium/base/threading/platform_thread_posix.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/base/threading/platform_thread_posix.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/threading/platform_thread_posix.cc -@@ -61,7 +61,7 @@ void* ThreadFunc(void* params) { - if (!thread_params->joinable) - base::ThreadRestrictions::SetSingletonAllowed(false); +@@ -32,6 +32,10 @@ + #include + #endif --#if !defined(OS_NACL) -+#if !defined(OS_NACL) && !defined(OS_BSD) - // Threads on linux/android may inherit their priority from the thread - // where they were created. This explicitly sets the priority of all new - // threads. ++#if defined(OS_BSD) ++#include ++#endif ++ + #if defined(OS_FUCHSIA) + #include + #else +@@ -141,7 +145,7 @@ bool CreateThread(size_t stack_size, + return success; + } + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + + // Store the thread ids in local storage since calling the SWI can + // expensive and PlatformThread::CurrentId is used liberally. Clear +@@ -159,11 +163,11 @@ class InitAtFork { + InitAtFork() { pthread_atfork(nullptr, nullptr, internal::ClearTidCache); } + }; + +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSSD) + + } // namespace + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + + namespace internal { + +@@ -173,7 +177,7 @@ void ClearTidCache() { + + } // namespace internal + +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + + // static + PlatformThreadId PlatformThread::CurrentId() { +@@ -181,6 +185,8 @@ PlatformThreadId PlatformThread::CurrentId() { + // into the kernel. + #if defined(OS_APPLE) + return pthread_mach_thread_np(pthread_self()); ++#elif defined(OS_BSD) ++ return pthread_getthreadid_np(); + #elif defined(OS_LINUX) || defined(OS_CHROMEOS) + static NoDestructor init_at_fork; + if (g_thread_id == -1) { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_thread__task__runner__handle.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_thread__task__runner__handle.cc index d5e9ab5b8a7e..dc784f037c4f 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_thread__task__runner__handle.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_thread__task__runner__handle.cc @@ -1,14 +1,14 @@ ---- src/3rdparty/chromium/base/threading/thread_task_runner_handle.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/base/threading/thread_task_runner_handle.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/threading/thread_task_runner_handle.cc -@@ -7,6 +7,7 @@ +@@ -8,6 +8,7 @@ #include #include "base/bind.h" +#include "base/callback_helpers.h" + #include "base/check_op.h" #include "base/lazy_instance.h" - #include "base/logging.h" - #include "base/memory/ptr_util.h" -@@ -37,6 +38,7 @@ bool ThreadTaskRunnerHandle::IsSet() { + #include "base/run_loop.h" +@@ -38,6 +39,7 @@ bool ThreadTaskRunnerHandle::IsSet() { return !!thread_task_runner_tls.Pointer()->Get(); } @@ -16,7 +16,7 @@ // static ScopedClosureRunner ThreadTaskRunnerHandle::OverrideForTesting( scoped_refptr overriding_task_runner) { -@@ -86,6 +88,7 @@ ScopedClosureRunner ThreadTaskRunnerHandle::OverrideFo +@@ -82,6 +84,7 @@ ScopedClosureRunner ThreadTaskRunnerHandle::OverrideFo base::Unretained(ttrh->task_runner_.get()), std::move(no_running_during_override))); } diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_trace__event_malloc__dump__provider.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_trace__event_malloc__dump__provider.cc index 96f1a2b2e151..37a21d2928cd 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_trace__event_malloc__dump__provider.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_trace__event_malloc__dump__provider.cc @@ -1,8 +1,8 @@ ---- src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc @@ -17,6 +17,8 @@ - #if defined(OS_MACOSX) + #if defined(OS_APPLE) #include +#elif defined(OS_BSD) +#include diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_trace__event_process__memory__dump.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_trace__event_process__memory__dump.cc index 1f4bf87ac594..b68c42c821de 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_trace__event_process__memory__dump.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_trace__event_process__memory__dump.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/base/trace_event/process_memory_dump.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/base/trace_event/process_memory_dump.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/base/trace_event/process_memory_dump.cc -@@ -93,7 +93,7 @@ size_t ProcessMemoryDump::CountResidentBytes(void* sta +@@ -95,7 +95,7 @@ size_t ProcessMemoryDump::CountResidentBytes(void* sta #if defined(OS_WIN) std::unique_ptr vec( new PSAPI_WORKING_SET_EX_INFORMATION[max_vec_size]); --#elif defined(OS_MACOSX) -+#elif defined(OS_MACOSX) || defined(OS_BSD) +-#elif defined(OS_APPLE) ++#elif defined(OS_APPLE) || defined(OS_BSD) std::unique_ptr vec(new char[max_vec_size]); #elif defined(OS_POSIX) || defined(OS_FUCHSIA) std::unique_ptr vec(new unsigned char[max_vec_size]); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_util_memory__pressure_system__memory__pressure__evaluator.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_util_memory__pressure_system__memory__pressure__evaluator.cc new file mode 100644 index 000000000000..92ff93c2159d --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_util_memory__pressure_system__memory__pressure__evaluator.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/base/util/memory_pressure/system_memory_pressure_evaluator.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/base/util/memory_pressure/system_memory_pressure_evaluator.cc +@@ -14,7 +14,7 @@ + #elif defined(OS_WIN) + #include "base/util/memory_pressure/system_memory_pressure_evaluator_win.h" + #include "base/win/windows_version.h" +-#elif defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) + #include "base/util/memory_pressure/system_memory_pressure_evaluator_linux.h" + #endif + +@@ -45,7 +45,7 @@ SystemMemoryPressureEvaluator::CreateDefaultSystemEval + evaluator->CreateOSSignalPressureEvaluator(monitor->CreateVoter()); + } + return evaluator; +-#elif defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) + return std::make_unique( + monitor->CreateVoter()); + #endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_BUILD.gn index 0d7a73775ff4..29df750432e0 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_BUILD.gn +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_BUILD.gn @@ -1,17 +1,17 @@ ---- src/3rdparty/chromium/build/config/BUILD.gn.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/build/config/BUILD.gn.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/build/config/BUILD.gn -@@ -166,7 +166,7 @@ config("debug") { +@@ -137,7 +137,7 @@ config("debug") { # builds, and we have to tell it to turn it off. defines += [ "_HAS_ITERATOR_DEBUGGING=0" ] } -- } else if (is_linux && current_cpu == "x64" && enable_iterator_debugging) { -+ } else if ((is_linux || is_bsd) && current_cpu == "x64" && enable_iterator_debugging) { +- } else if ((is_linux || is_chromeos) && current_cpu == "x64" && enable_iterator_debugging) { ++ } else if ((is_linux || is_chromeos || is_bsd) && current_cpu == "x64" && enable_iterator_debugging) { # Enable libstdc++ debugging facilities to help catch problems early, see # http://crbug.com/65151 . # TODO(phajdan.jr): Should we enable this for all of POSIX? -@@ -267,9 +267,7 @@ config("default_libs") { +@@ -235,9 +235,7 @@ config("default_libs") { ] - } else if (is_linux) { + } else if (is_linux || is_chromeos) { libs = [ - "dl", "pthread", @@ -19,12 +19,12 @@ ] } } -@@ -346,7 +344,7 @@ config("executable_config") { +@@ -320,7 +318,7 @@ config("executable_config") { "//build/config/ios:ios_dynamic_flags", "//build/config/ios:ios_executable_flags", ] -- } else if (is_linux || is_android || current_os == "aix") { -+ } else if (is_linux || is_bsd || is_android || current_os == "aix") { +- } else if (is_linux || is_chromeos || is_android || current_os == "aix") { ++ } else if (is_linux || is_bsd || is_chromeos || is_android || current_os == "aix") { configs += [ "//build/config/gcc:executable_config" ] if (is_chromecast) { configs += [ "//build/config/chromecast:executable_config" ] diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_BUILDCONFIG.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_BUILDCONFIG.gn index 8176349b40f8..f8211707ed0a 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_BUILDCONFIG.gn +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_BUILDCONFIG.gn @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/build/config/BUILDCONFIG.gn.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/build/config/BUILDCONFIG.gn.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/build/config/BUILDCONFIG.gn @@ -131,10 +131,10 @@ declare_args() { is_official_build = false @@ -33,16 +33,16 @@ # See comments in build/toolchain/cros/BUILD.gn about board compiles. if (is_clang) { _default_toolchain = "//build/toolchain/linux:clang_$target_cpu" -@@ -296,10 +296,11 @@ is_android = current_os == "android" +@@ -290,10 +290,11 @@ is_android = current_os == "android" + # current_os value directly. + + is_android = current_os == "android" ++is_bsd = current_os == "freebsd" is_chromeos = current_os == "chromeos" is_fuchsia = current_os == "fuchsia" is_ios = current_os == "ios" --is_linux = current_os == "chromeos" || current_os == "linux" -+is_linux = current_os == "chromeos" || current_os == "linux" || current_os == "freebsd" +-is_linux = current_os == "linux" ++is_linux = current_os == "linux" || current_os == "freebsd" is_mac = current_os == "mac" is_nacl = current_os == "nacl" is_win = current_os == "win" || current_os == "winuwp" -+is_bsd = current_os == "freebsd" - - is_posix = !is_win && !is_fuchsia - diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_BUILD.gn index 3abed52065a4..cecfb1c215e1 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_BUILD.gn +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_BUILD.gn @@ -1,24 +1,24 @@ ---- src/3rdparty/chromium/build/config/compiler/BUILD.gn.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/build/config/compiler/BUILD.gn.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/build/config/compiler/BUILD.gn -@@ -144,7 +144,7 @@ declare_args() { - # 'is_android' breaks content_shell_test_apk on android-kitkat-arm-rel. - # 'use_xcode_clang' may call old clang. - init_stack_vars = -- !is_android && !use_xcode_clang && (!is_official_build || is_linux) -+ !is_android && !use_xcode_clang && (!is_official_build || is_linux) && !is_bsd +@@ -134,7 +134,7 @@ declare_args() { + # + # TODO(crbug.com/977230): Enabling this when 'use_xcode_clang' is true may + # call an old clang that doesn't support auto-init. +- init_stack_vars = !is_android && !use_xcode_clang ++ init_stack_vars = !is_android && !use_xcode_clang && !is_bsd # This argument is to control whether enabling text section splitting in the # final binary. When enabled, the separated text sections with prefix -@@ -313,7 +313,7 @@ config("compiler") { +@@ -297,7 +297,7 @@ config("compiler") { } # Linker warnings. -- if (fatal_linker_warnings && !is_mac && !is_ios && current_os != "aix") { -+ if (fatal_linker_warnings && !is_mac && !is_ios && !is_bsd && current_os != "aix") { +- if (fatal_linker_warnings && !is_apple && current_os != "aix") { ++ if (fatal_linker_warnings && !is_apple && !is_bsd && current_os != "aix") { ldflags += [ "-Wl,--fatal-warnings" ] } - if (fatal_linker_warnings && (is_mac || is_ios)) { -@@ -419,7 +419,7 @@ config("compiler") { + if (fatal_linker_warnings && is_apple && +@@ -407,7 +407,7 @@ config("compiler") { # Compiler instrumentation can introduce dependencies in DSOs to symbols in # the executable they are loaded into, so they are unresolved at link-time. @@ -27,16 +27,7 @@ ldflags += [ "-Wl,-z,defs", "-Wl,--as-needed", -@@ -518,7 +518,7 @@ config("compiler") { - ldflags += [ "-Wl,-z,keep-text-section-prefix" ] - } - -- if (is_clang && !is_nacl && !use_xcode_clang && !use_qt) { -+ if (is_clang && !is_nacl && !use_xcode_clang && !use_qt && !is_bsd) { - cflags += [ "-fcrash-diagnostics-dir=" + - rebase_path("//tools/clang/crashreports", root_build_dir) ] - -@@ -789,7 +789,7 @@ config("compiler_cpu_abi") { +@@ -795,7 +795,7 @@ config("compiler_cpu_abi") { cflags += [ "-mtune=$arm_tune" ] } } else if (current_cpu == "arm64") { @@ -45,7 +36,7 @@ cflags += [ "--target=aarch64-linux-gnu" ] ldflags += [ "--target=aarch64-linux-gnu" ] } -@@ -1139,7 +1139,7 @@ config("compiler_deterministic") { +@@ -1148,7 +1148,7 @@ config("compiler_deterministic") { "-Xclang", ".", ] @@ -54,7 +45,7 @@ # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167) asmflags = [ "-Wa,-fdebug-compilation-dir,." ] } -@@ -1541,7 +1541,7 @@ config("default_warnings") { +@@ -1550,7 +1550,7 @@ config("default_warnings") { cflags += [ "-Wno-nonportable-include-path" ] } @@ -63,16 +54,25 @@ # Flags NaCl (Clang 3.7) and Xcode 9.2 (Clang clang-900.0.39.2) do not # recognize. cflags += [ -@@ -1791,7 +1791,7 @@ config("thin_archive") { +@@ -1724,7 +1724,7 @@ config("no_chromium_code") { + # suppressing them individually, we just blanket suppress them here. + "-Wno-unused-variable", + ] +- if (!is_nacl && (current_toolchain == host_toolchain || !use_xcode_clang)) { ++ if (!is_nacl && (current_toolchain == host_toolchain || !use_xcode_clang) && !is_bsd) { + cflags += [ + # TODO(https://crbug.com/1031169): Clean up and enable. + "-Wno-misleading-indentation", +@@ -1802,7 +1802,7 @@ config("thin_archive") { # Mac and iOS use the mac-specific "libtool" command, not ar, which doesn't # have a "thin archive" mode (it does accept -T, but it means truncating # archive names to 16 characters, which is not what we want). -- if ((is_posix && !is_nacl && !is_mac && !is_ios) || is_fuchsia) { -+ if ((is_posix && !is_nacl && !is_mac && !is_ios && !is_bsd) || is_fuchsia) { +- if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) { ++ if ((is_posix && !is_nacl && !is_apple && !is_bsd) || is_fuchsia) { arflags = [ "-T" ] } else if (is_win && use_lld) { arflags = [ "/llvmlibthin" ] -@@ -2323,7 +2323,7 @@ config("symbols") { +@@ -2343,7 +2343,7 @@ config("symbols") { # flag, so we can use use -g1 for pnacl and nacl-clang compiles. # gcc nacl is is_nacl && !is_clang, pnacl and nacl-clang are && is_clang. if (!is_nacl || is_clang) { @@ -80,11 +80,11 @@ + cflags += [ "-g0" ] } - if (is_clang && !is_nacl && !use_xcode_clang && !use_qt) { -@@ -2351,7 +2351,7 @@ config("symbols") { + # TODO(https://crbug.com/1050118): Investigate missing debug info on mac. +@@ -2385,7 +2385,7 @@ config("symbols") { # DWARF info may be corrupt; offsets in a range list entry are in different # sections" there. Maybe just a bug in nacl_switch_32.S. - if (!is_mac && !is_ios && !is_nacl && current_cpu != "x86" && + if (!is_apple && !is_nacl && current_cpu != "x86" && - (use_gold || use_lld)) { + (use_gold || use_lld) && !is_bsd) { if (is_clang) { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_compiler.gni b/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_compiler.gni index 5984a4ff6b60..064760a6fe87 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_compiler.gni +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_compiler.gni @@ -1,15 +1,6 @@ ---- src/3rdparty/chromium/build/config/compiler/compiler.gni.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/build/config/compiler/compiler.gni.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/build/config/compiler/compiler.gni -@@ -47,7 +47,7 @@ declare_args() { - # only two architectures that are currently checked in). Turn this off when - # you are using a custom toolchain and need to control -B in cflags. - linux_use_bundled_binutils = -- linux_use_bundled_binutils_override && is_linux && -+ linux_use_bundled_binutils_override && (is_linux && !is_bsd) && - (current_cpu == "x64" || current_cpu == "x86") - binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", - root_build_dir) -@@ -193,7 +193,7 @@ declare_args() { +@@ -195,7 +195,7 @@ declare_args() { declare_args() { # Whether to use the gold linker from binutils instead of lld or bfd. use_gold = diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_features.gni b/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_features.gni index bab3166c078d..7a66f85e786d 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_features.gni +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_features.gni @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/build/config/features.gni.orig 2020-04-29 07:57:35 UTC +--- src/3rdparty/chromium/build/config/features.gni.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/build/config/features.gni @@ -26,7 +26,7 @@ declare_args() { proprietary_codecs = is_chrome_branded || is_chromecast # libudev usage. This currently only affects the content layer. -- use_udev = is_linux && !is_chromecast -+ use_udev = is_linux && !is_chromecast && !is_bsd +- use_udev = (is_linux || is_chromeos) && !is_chromecast ++ use_udev = (is_linux || is_chromeos) && !is_chromecast && !is_bsd - use_dbus = is_linux && !is_chromecast + use_dbus = (is_linux || is_chromeos) && !is_chromecast diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_freetype_freetype.gni b/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_freetype_freetype.gni new file mode 100644 index 000000000000..36300a081f3a --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_freetype_freetype.gni @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/build/config/freetype/freetype.gni.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/build/config/freetype/freetype.gni +@@ -10,7 +10,7 @@ declare_args() { + # than version 2.7.1 and have color bitmap support compiled in. WARNING: + # System FreeType configurations other than as described WILL INTRODUCE TEXT + # RENDERING AND SECURITY REGRESSIONS. +- use_system_freetype = false ++ use_system_freetype = true + use_qt_freetype = false + qt_freetype_includes = "" + } diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_detect__host__arch.py b/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_detect__host__arch.py index c3f9fbd7e18c..c0a3613db0de 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_detect__host__arch.py +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_detect__host__arch.py @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/build/detect_host_arch.py.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/build/detect_host_arch.py.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/build/detect_host_arch.py -@@ -19,6 +19,8 @@ def HostArch(): +@@ -21,6 +21,8 @@ def HostArch(): host_arch = 'ia32' elif host_arch in ['x86_64', 'amd64']: host_arch = 'x64' diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_gn__run__binary.py b/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_gn__run__binary.py index eddb4b6968b9..c5d1b262db43 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_gn__run__binary.py +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_gn__run__binary.py @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/build/gn_run_binary.py.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/build/gn_run_binary.py.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/build/gn_run_binary.py -@@ -19,7 +19,7 @@ path = './' + sys.argv[1] +@@ -24,7 +24,7 @@ args = [path] + sys.argv[2:] # The rest of the arguments are passed directly to the executable. args = [path] + sys.argv[2:] diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_toolchain_gcc__toolchain.gni b/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_toolchain_gcc__toolchain.gni index ee1fdffa81bc..67cab2fb1152 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_toolchain_gcc__toolchain.gni +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_toolchain_gcc__toolchain.gni @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni -@@ -36,6 +36,11 @@ if (is_linux && target_os == "android") { - enable_resource_whitelist_generation = false +@@ -50,6 +50,11 @@ if (enable_resource_allowlist_generation) { + "enable_resource_allowlist_generation=true does not work for target_os=$target_os") } +declare_args() { @@ -12,7 +12,7 @@ # This template defines a toolchain for something that works like gcc # (including clang). # -@@ -589,13 +594,23 @@ template("clang_toolchain") { +@@ -641,13 +646,23 @@ template("clang_toolchain") { } gcc_toolchain(target_name) { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_toolchain_get__concurrent__links.py b/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_toolchain_get__concurrent__links.py index c1e6fae93cb7..1965d2b25c0c 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_toolchain_get__concurrent__links.py +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_toolchain_get__concurrent__links.py @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/build/toolchain/get_concurrent_links.py.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/build/toolchain/get_concurrent_links.py.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/build/toolchain/get_concurrent_links.py -@@ -46,6 +46,14 @@ def _GetTotalMemoryInBytes(): +@@ -53,6 +53,14 @@ def _GetTotalMemoryInBytes(): return int(subprocess.check_output(['sysctl', '-n', 'hw.memsize'])) except Exception: return 0 diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_devtools_devtools__eye__dropper.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_devtools_devtools__eye__dropper.cc index cdd6542873b3..86c9cb82b39d 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_devtools_devtools__eye__dropper.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_devtools_devtools__eye__dropper.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/chrome/browser/devtools/devtools_eye_dropper.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/chrome/browser/devtools/devtools_eye_dropper.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/chrome/browser/devtools/devtools_eye_dropper.cc -@@ -211,7 +211,7 @@ void DevToolsEyeDropper::UpdateCursor() { +@@ -163,7 +163,7 @@ void DevToolsEyeDropper::UpdateCursor() { // magnified projection only with centered hotspot. // Mac Retina requires cursor to be > 120px in order to render smoothly. --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) const float kCursorSize = 63; const float kDiameter = 63; const float kHotspotOffset = 32; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_input__ime_input__ime__api.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_input__ime_input__ime__api.h deleted file mode 100644 index 4c7b75dade4b..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_input__ime_input__ime__api.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/chrome/browser/extensions/api/input_ime/input_ime_api.h.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/chrome/browser/extensions/api/input_ime/input_ime_api.h -@@ -31,7 +31,7 @@ - - #if defined(OS_CHROMEOS) - #include "chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.h" --#elif defined(OS_LINUX) || defined(OS_WIN) -+#elif defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) - #include "chrome/browser/extensions/api/input_ime/input_ime_api_nonchromeos.h" - #endif // defined(OS_CHROMEOS) - diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_settings__private_prefs__util.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_settings__private_prefs__util.cc index 43e8dab7405d..a04f720df1cd 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_settings__private_prefs__util.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_settings__private_prefs__util.cc @@ -1,20 +1,20 @@ ---- src/3rdparty/chromium/chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/chrome/browser/extensions/api/settings_private/prefs_util.cc -@@ -153,7 +153,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetWhitelist - (*s_whitelist)[bookmarks::prefs::kShowBookmarkBar] = +@@ -169,7 +169,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist + (*s_allowlist)[bookmarks::prefs::kShowBookmarkBar] = settings_api::PrefType::PREF_TYPE_BOOLEAN; -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) - (*s_whitelist)[::prefs::kUseCustomChromeFrame] = + (*s_allowlist)[::prefs::kUseCustomChromeFrame] = settings_api::PrefType::PREF_TYPE_BOOLEAN; #endif -@@ -163,7 +163,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetWhitelist +@@ -179,7 +179,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist // Appearance settings. - (*s_whitelist)[::prefs::kCurrentThemeID] = + (*s_allowlist)[::prefs::kCurrentThemeID] = settings_api::PrefType::PREF_TYPE_STRING; -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) -+#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) - (*s_whitelist)[::prefs::kUsesSystemTheme] = ++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) + (*s_allowlist)[::prefs::kUsesSystemTheme] = settings_api::PrefType::PREF_TYPE_BOOLEAN; #endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__event__log__uploader.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__event__log__uploader.cc new file mode 100644 index 000000000000..63c7c5d69587 --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__event__log__uploader.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/browser/media/webrtc/webrtc_event_log_uploader.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/chrome/browser/media/webrtc/webrtc_event_log_uploader.cc +@@ -42,6 +42,8 @@ const char kProduct[] = "Chrome_Linux"; + const char kProduct[] = "Chrome_ChromeOS"; + #elif defined(OS_LINUX) + const char kProduct[] = "Chrome_Linux"; ++#elif defined(OS_FREEBSD) ++const char kProduct[] = "Chrome_FreeBSD"; + #elif defined(OS_ANDROID) + const char kProduct[] = "Chrome_Android"; + #else diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__log__uploader.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__log__uploader.cc new file mode 100644 index 000000000000..661b4673e99d --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__log__uploader.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/browser/media/webrtc/webrtc_log_uploader.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/chrome/browser/media/webrtc/webrtc_log_uploader.cc +@@ -359,6 +359,8 @@ void WebRtcLogUploader::SetupMultipart( + const char product[] = "Chrome_Android"; + #elif defined(OS_CHROMEOS) + const char product[] = "Chrome_ChromeOS"; ++#elif defined(OS_FREEBSD) ++ const char product[] = "Chrome_FreeBSD"; + #else + #error Platform not supported. + #endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__logging__controller.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__logging__controller.cc new file mode 100644 index 000000000000..964a45363da6 --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__logging__controller.cc @@ -0,0 +1,33 @@ +--- src/3rdparty/chromium/chrome/browser/media/webrtc/webrtc_logging_controller.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/chrome/browser/media/webrtc/webrtc_logging_controller.cc +@@ -23,10 +23,10 @@ + #include "content/public/browser/browser_context.h" + #include "content/public/browser/render_process_host.h" + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + #include "content/public/browser/child_process_security_policy.h" + #include "storage/browser/file_system/isolated_context.h" +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + + using webrtc_event_logging::WebRtcEventLogManager; + +@@ -273,7 +273,7 @@ void WebRtcLoggingController::StartEventLogging( + web_app_id, callback); + } + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + void WebRtcLoggingController::GetLogsDirectory( + LogsDirectoryCallback callback, + LogsDirectoryErrorCallback error_callback) { +@@ -319,7 +319,7 @@ void WebRtcLoggingController::GrantLogsDirectoryAccess + FROM_HERE, + base::BindOnce(std::move(callback), file_system.id(), registered_name)); + } +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + + void WebRtcLoggingController::OnRtpPacket( + std::unique_ptr packet_header, diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__logging__controller.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__logging__controller.h new file mode 100644 index 000000000000..14a61283c23d --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__logging__controller.h @@ -0,0 +1,36 @@ +--- src/3rdparty/chromium/chrome/browser/media/webrtc/webrtc_logging_controller.h.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/chrome/browser/media/webrtc/webrtc_logging_controller.h +@@ -133,13 +133,13 @@ class WebRtcLoggingController + size_t web_app_id, + const StartEventLoggingCallback& callback); + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + // Ensures that the WebRTC Logs directory exists and then grants render + // process access to the 'WebRTC Logs' directory, and invokes |callback| with + // the ids necessary to create a DirectoryEntry object. + void GetLogsDirectory(LogsDirectoryCallback callback, + LogsDirectoryErrorCallback error_callback); +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + + // chrome::mojom::WebRtcLoggingClient methods: + void OnAddMessages( +@@ -192,7 +192,7 @@ class WebRtcLoggingController + bool success, + const std::string& error_message); + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + // Grants the render process access to the 'WebRTC Logs' directory, and + // invokes |callback| with the ids necessary to create a DirectoryEntry + // object. If the |logs_path| couldn't be created or found, |error_callback| +@@ -200,7 +200,7 @@ class WebRtcLoggingController + void GrantLogsDirectoryAccess(LogsDirectoryCallback callback, + LogsDirectoryErrorCallback error_callback, + const base::FilePath& logs_path); +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + + static base::FilePath GetLogDirectoryAndEnsureExists( + const base::FilePath& browser_context_directory_path); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_about__ui.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_about__ui.cc index 83d631589d88..9f2de9901454 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_about__ui.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_about__ui.cc @@ -1,20 +1,20 @@ ---- src/3rdparty/chromium/chrome/browser/ui/webui/about_ui.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/chrome/browser/ui/webui/about_ui.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/chrome/browser/ui/webui/about_ui.cc -@@ -391,7 +391,7 @@ std::string ChromeURLs() { +@@ -579,7 +579,7 @@ std::string ChromeURLs() { return html; } --#if defined(OS_LINUX) || defined(OS_OPENBSD) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_OPENBSD) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) std::string AboutLinuxProxyConfig() { std::string data; AppendHeader(&data, 0, -@@ -446,7 +446,7 @@ void AboutUIHTMLSource::StartDataRequest( - .GetRawDataResource(idr) - .as_string(); +@@ -635,7 +635,7 @@ void AboutUIHTMLSource::StartDataRequest( + response = + ui::ResourceBundle::GetSharedInstance().LoadDataResourceString(idr); } --#if defined(OS_LINUX) || defined(OS_OPENBSD) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_OPENBSD) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) } else if (source_name_ == chrome::kChromeUILinuxProxyConfigHost) { response = AboutLinuxProxyConfig(); #endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc index a344a88fd4a2..75395364b420 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc @@ -1,53 +1,56 @@ ---- src/3rdparty/chromium/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2020-03-16 14:04:24 UTC +--- src/3rdparty/chromium/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -@@ -209,11 +209,11 @@ +@@ -249,12 +249,12 @@ #include "chrome/browser/ui/webui/conflicts/conflicts_ui.h" #endif --#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || \ ++#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || defined(OS_BSD) || \ + defined(OS_CHROMEOS) #include "chrome/browser/ui/webui/discards/discards_ui.h" #endif --#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \ ++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || \ + defined(OS_ANDROID) #include "chrome/browser/ui/webui/sandbox/sandbox_internals_ui.h" #endif - -@@ -311,7 +311,7 @@ bool IsAboutUI(const GURL& url) { +@@ -428,7 +428,7 @@ bool IsAboutUI(const GURL& url) { #if !defined(OS_ANDROID) || url.host_piece() == chrome::kChromeUITermsHost #endif --#if defined(OS_LINUX) || defined(OS_OPENBSD) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_OPENBSD) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || url.host_piece() == chrome::kChromeUILinuxProxyConfigHost #endif #if defined(OS_CHROMEOS) -@@ -624,7 +624,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -819,7 +819,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we if (url.host_piece() == chrome::kChromeUINaClHost) return &NewWebUI; #endif --#if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA) -+#if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA) || defined(OS_BSD) +-#if ((defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(TOOLKIT_VIEWS)) || \ ++#if ((defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(TOOLKIT_VIEWS)) || defined(OS_BSD) || \ + defined(USE_AURA) if (url.host_piece() == chrome::kChromeUITabModalConfirmDialogHost) return &NewWebUI; - #endif -@@ -674,17 +674,17 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we - return &NewWebUI; +@@ -870,19 +870,19 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we + return &NewWebUI; } #endif --#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \ ++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || \ + defined(OS_ANDROID) if (url.host_piece() == chrome::kChromeUISandboxHost) { return &NewWebUI; } #endif --#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || \ ++#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || defined(OS_BSD) || \ + defined(OS_CHROMEOS) if (url.host_piece() == chrome::kChromeUIDiscardsHost) return &NewWebUI; #endif - #if defined(OS_WIN) || defined(OS_MACOSX) || \ + #if defined(OS_WIN) || defined(OS_MAC) || \ - (defined(OS_LINUX) && !defined(OS_CHROMEOS)) + (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) if (url.host_piece() == chrome::kChromeUIBrowserSwitchHost) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_BUILD.gn deleted file mode 100644 index e30488ef9348..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_BUILD.gn +++ /dev/null @@ -1,13 +0,0 @@ ---- src/3rdparty/chromium/chrome/common/BUILD.gn.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/chrome/common/BUILD.gn -@@ -295,6 +295,10 @@ static_library("common") { - public_deps += [ "//ppapi/shared_impl" ] - } - -+ if (is_bsd) { -+ sources -= [ "component_flash_hint_file_linux.cc" ] -+ } -+ - if (enable_extensions) { - sources += [ - "cast_messages.cc", diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths.cc index 5ef10846d941..21451f0adc05 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths.cc @@ -1,41 +1,47 @@ ---- src/3rdparty/chromium/chrome/common/chrome_paths.cc.orig 2020-03-16 14:04:24 UTC +--- src/3rdparty/chromium/chrome/common/chrome_paths.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/chrome/common/chrome_paths.cc -@@ -51,21 +51,21 @@ const base::FilePath::CharType kPepperFlashSystemBaseD +@@ -52,21 +52,29 @@ const base::FilePath::CharType kPepperFlashSystemBaseD FILE_PATH_LITERAL("Internet Plug-Ins/PepperFlashPlayer"); #endif --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // The path to the external extension .json files. // /usr/share seems like a good choice, see: http://www.pathname.com/fhs/ const base::FilePath::CharType kFilepathSinglePrefExtensions[] = #if BUILDFLAG(GOOGLE_CHROME_BRANDING) -- FILE_PATH_LITERAL("/usr/share/google-chrome/extensions"); ++#if defined(OS_BSD) + FILE_PATH_LITERAL("%%LOCALBASE%%/share/google-chrome/extensions"); ++#else + FILE_PATH_LITERAL("/usr/share/google-chrome/extensions"); ++#endif #else -- FILE_PATH_LITERAL("/usr/share/chromium/extensions"); ++#if defined(OS_BSD) + FILE_PATH_LITERAL("%%LOCALBASE%%/share/chromium/extensions"); ++#else + FILE_PATH_LITERAL("/usr/share/chromium/extensions"); ++#endif #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) // The path to the hint file that tells the pepper plugin loader // where it can find the latest component updated flash. const base::FilePath::CharType kComponentUpdatedFlashHint[] = FILE_PATH_LITERAL("latest-component-updated-flash"); --#endif // defined(OS_LINUX) -+#endif // defined(OS_LINUX) || defined(OS_BSD) +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) - #if defined(OS_LINUX) && BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT) - // The name of the hint file that tells the latest component updated Widevine -@@ -204,7 +204,7 @@ bool PathProvider(int key, base::FilePath* result) { + #if (defined(OS_LINUX) || defined(OS_CHROMEOS)) && \ + BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT) +@@ -207,7 +215,7 @@ bool PathProvider(int key, base::FilePath* result) { return false; break; case chrome::DIR_DEFAULT_DOWNLOADS_SAFE: --#if defined(OS_WIN) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) if (!GetUserDownloadsDirectorySafe(&cur)) return false; break; -@@ -495,6 +495,9 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -494,6 +502,9 @@ bool PathProvider(int key, base::FilePath* result) { case chrome::DIR_POLICY_FILES: { #if BUILDFLAG(GOOGLE_CHROME_BRANDING) cur = base::FilePath(FILE_PATH_LITERAL("/etc/opt/chrome/policies")); @@ -45,34 +51,34 @@ #else cur = base::FilePath(FILE_PATH_LITERAL("/etc/chromium/policies")); #endif -@@ -502,7 +505,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -501,7 +512,7 @@ bool PathProvider(int key, base::FilePath* result) { } #endif #if defined(OS_CHROMEOS) || \ -- (defined(OS_LINUX) && BUILDFLAG(CHROMIUM_BRANDING)) || defined(OS_MACOSX) -+ ((defined(OS_LINUX) || defined(OS_BSD)) && BUILDFLAG(CHROMIUM_BRANDING)) || defined(OS_MACOSX) +- (defined(OS_LINUX) && BUILDFLAG(CHROMIUM_BRANDING)) || defined(OS_MAC) ++ (defined(OS_LINUX) && BUILDFLAG(CHROMIUM_BRANDING)) || defined(OS_MAC) || defined(OS_BSD) case chrome::DIR_USER_EXTERNAL_EXTENSIONS: { if (!base::PathService::Get(chrome::DIR_USER_DATA, &cur)) return false; -@@ -510,7 +513,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -509,7 +520,7 @@ bool PathProvider(int key, base::FilePath* result) { break; } #endif --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) case chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS: { cur = base::FilePath(kFilepathSinglePrefExtensions); break; -@@ -545,7 +548,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -544,7 +555,7 @@ bool PathProvider(int key, base::FilePath* result) { #endif break; --#if defined(OS_LINUX) || defined(OS_MACOSX) -+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || defined(OS_BSD) case chrome::DIR_NATIVE_MESSAGING: - #if defined(OS_MACOSX) + #if defined(OS_MAC) #if BUILDFLAG(GOOGLE_CHROME_BRANDING) -@@ -559,6 +562,9 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -558,6 +569,9 @@ bool PathProvider(int key, base::FilePath* result) { #if BUILDFLAG(GOOGLE_CHROME_BRANDING) cur = base::FilePath(FILE_PATH_LITERAL( "/etc/opt/chrome/native-messaging-hosts")); @@ -82,30 +88,12 @@ #else cur = base::FilePath(FILE_PATH_LITERAL( "/etc/chromium/native-messaging-hosts")); -@@ -571,7 +577,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -570,7 +584,7 @@ bool PathProvider(int key, base::FilePath* result) { return false; cur = cur.Append(FILE_PATH_LITERAL("NativeMessagingHosts")); break; --#endif // defined(OS_LINUX) || defined(OS_MACOSX) -+#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || defined(OS_BSD) #if !defined(OS_ANDROID) case chrome::DIR_GLOBAL_GCM_STORE: if (!base::PathService::Get(chrome::DIR_USER_DATA, &cur)) -@@ -579,7 +585,7 @@ bool PathProvider(int key, base::FilePath* result) { - cur = cur.Append(kGCMStoreDirname); - break; - #endif // !defined(OS_ANDROID) --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - case chrome::FILE_COMPONENT_FLASH_HINT: - if (!base::PathService::Get( - chrome::DIR_COMPONENT_UPDATED_PEPPER_FLASH_PLUGIN, &cur)) { -@@ -587,7 +593,7 @@ bool PathProvider(int key, base::FilePath* result) { - } - cur = cur.Append(kComponentUpdatedFlashHint); - break; --#endif // defined(OS_LINUX) -+#endif // defined(OS_LINUX) || defined(OS_BSD) - #if defined(OS_CHROMEOS) - case chrome::FILE_CHROME_OS_COMPONENT_FLASH: - cur = base::FilePath(kChromeOSComponentFlash); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths.h index fe1d715da347..ebe4034bd259 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths.h @@ -1,42 +1,29 @@ ---- src/3rdparty/chromium/chrome/common/chrome_paths.h.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/chrome/common/chrome_paths.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/chrome/common/chrome_paths.h -@@ -53,7 +53,7 @@ enum { +@@ -51,7 +51,7 @@ enum { // contains subdirectories. #endif #if defined(OS_CHROMEOS) || \ -- (defined(OS_LINUX) && BUILDFLAG(CHROMIUM_BRANDING)) || defined(OS_MACOSX) -+ ((defined(OS_LINUX) || defined(OS_BSD)) && BUILDFLAG(CHROMIUM_BRANDING)) || defined(OS_MACOSX) +- (defined(OS_LINUX) && BUILDFLAG(CHROMIUM_BRANDING)) || defined(OS_MAC) ++ (defined(OS_LINUX) && BUILDFLAG(CHROMIUM_BRANDING)) || defined(OS_MAC) || defined(OS_BSD) DIR_USER_EXTERNAL_EXTENSIONS, // Directory for per-user external extensions // on Chrome Mac and Chromium Linux. // On Chrome OS, this path is used for OEM -@@ -61,7 +61,7 @@ enum { +@@ -59,7 +59,7 @@ enum { // create it. #endif --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) DIR_STANDALONE_EXTERNAL_EXTENSIONS, // Directory for 'per-extension' // definition manifest files that // describe extensions which are to be -@@ -108,7 +108,7 @@ enum { +@@ -120,7 +120,7 @@ enum { DIR_SUPERVISED_USER_INSTALLED_WHITELISTS, // Directory where sanitized // supervised user whitelists are // installed. --#if defined(OS_LINUX) || defined(OS_MACOSX) -+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || defined(OS_BSD) DIR_NATIVE_MESSAGING, // System directory where native messaging host // manifest files are stored. DIR_USER_NATIVE_MESSAGING, // Directory with Native Messaging Hosts -@@ -123,10 +123,10 @@ enum { - DIR_GEN_TEST_DATA, // Directory where generated test data resides. - DIR_TEST_DATA, // Directory where unit test data resides. - DIR_TEST_TOOLS, // Directory where unit test tools reside. --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - FILE_COMPONENT_FLASH_HINT, // A file in a known location that points to - // the component updated flash plugin. --#endif // defined(OS_LINUX) -+#endif // defined(OS_LINUX) || defined(OS_BSD) - #if defined(OS_CHROMEOS) - FILE_CHROME_OS_COMPONENT_FLASH, // The location of component updated Flash on - // Chrome OS. diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths__internal.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths__internal.h index 119738e27b10..55db9c44a65d 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths__internal.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths__internal.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/chrome/common/chrome_paths_internal.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/chrome/common/chrome_paths_internal.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/chrome/common/chrome_paths_internal.h -@@ -45,7 +45,7 @@ void GetUserCacheDirectory(const base::FilePath& profi +@@ -45,7 +45,7 @@ bool GetUserDocumentsDirectory(base::FilePath* result) // Get the path to the user's documents directory. bool GetUserDocumentsDirectory(base::FilePath* result); --#if defined(OS_WIN) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // Gets the path to a safe default download directory for a user. bool GetUserDownloadsDirectorySafe(base::FilePath* result); #endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__switches.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__switches.cc index 891541e97a5a..884b939f05e2 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__switches.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__switches.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/chrome/common/chrome_switches.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/chrome/common/chrome_switches.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/chrome/common/chrome_switches.cc -@@ -860,7 +860,7 @@ const char kAllowNaClFileHandleAPI[] = "allow-n +@@ -808,7 +808,7 @@ const char kAllowNaClSocketAPI[] = "allow-n const char kAllowNaClSocketAPI[] = "allow-nacl-socket-api"; #endif --#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) -+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || \ ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || defined(OS_BSD) || \ + defined(OS_WIN) const char kEnableNewAppMenuIcon[] = "enable-new-app-menu-icon"; - // Causes the browser to launch directly in guest mode. diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__switches.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__switches.h index e4122d43b69d..214902bb4eae 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__switches.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__switches.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/chrome/common/chrome_switches.h.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/chrome/common/chrome_switches.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/chrome/common/chrome_switches.h -@@ -263,7 +263,7 @@ extern const char kAllowNaClFileHandleAPI[]; +@@ -253,7 +253,7 @@ extern const char kAllowNaClSocketAPI[]; extern const char kAllowNaClSocketAPI[]; #endif --#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) -+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || \ ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || defined(OS_BSD) || \ + defined(OS_WIN) extern const char kEnableNewAppMenuIcon[]; extern const char kGuest[]; - #endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_webui__url__constants.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_webui__url__constants.cc index f02817656c6a..85fbcfb34cdc 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_webui__url__constants.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_webui__url__constants.cc @@ -1,48 +1,50 @@ ---- src/3rdparty/chromium/chrome/common/webui_url_constants.cc.orig 2020-04-08 09:41:36 UTC +--- src/3rdparty/chromium/chrome/common/webui_url_constants.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/chrome/common/webui_url_constants.cc -@@ -318,7 +318,7 @@ bool IsSystemWebUIHost(base::StringPiece host) { - const char kChromeUICastHost[] = "cast"; - #endif +@@ -340,7 +340,7 @@ bool IsSystemWebUIHost(base::StringPiece host) { + } + #endif // defined(OS_CHROMEOS) --#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || \ ++#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || defined(OS_BSD) || \ + defined(OS_CHROMEOS) const char kChromeUIDiscardsHost[] = "discards"; const char kChromeUIDiscardsURL[] = "chrome://discards/"; - const char kChromeUIHatsHost[] = "hats"; -@@ -329,17 +329,17 @@ const char kChromeUIHatsURL[] = "chrome://hats/"; +@@ -362,18 +362,18 @@ const char kChromeUILinuxProxyConfigHost[] = "linux-pr const char kChromeUILinuxProxyConfigHost[] = "linux-proxy-config"; #endif --#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \ ++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || \ + defined(OS_ANDROID) const char kChromeUISandboxHost[] = "sandbox"; #endif - #if defined(OS_WIN) || defined(OS_MACOSX) || \ + #if defined(OS_WIN) || defined(OS_MAC) || \ - (defined(OS_LINUX) && !defined(OS_CHROMEOS)) + (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) const char kChromeUIBrowserSwitchHost[] = "browser-switch"; const char kChromeUIBrowserSwitchURL[] = "chrome://browser-switch/"; #endif --#if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA) -+#if ((defined(OS_LINUX) || defined(OS_BSD)) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA) +-#if ((defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(TOOLKIT_VIEWS)) || \ ++#if ((defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)) && defined(TOOLKIT_VIEWS)) || \ + defined(USE_AURA) const char kChromeUITabModalConfirmDialogHost[] = "tab-modal-confirm-dialog"; #endif - -@@ -605,13 +605,13 @@ const char* const kChromeHostURLs[] = { +@@ -548,14 +548,14 @@ const char* const kChromeHostURLs[] = { kChromeUIInternetDetailDialogHost, kChromeUIAssistantOptInHost, #endif --#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || \ ++#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || defined(OS_BSD) || \ + defined(OS_CHROMEOS) kChromeUIDiscardsHost, #endif - #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) + #if defined(OS_POSIX) && !defined(OS_MAC) && !defined(OS_ANDROID) kChromeUILinuxProxyConfigHost, #endif --#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \ ++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || \ + defined(OS_ANDROID) kChromeUISandboxHost, #endif - #if defined(OS_WIN) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_webui__url__constants.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_webui__url__constants.h index ecf37559478f..ea1f93f9bfd1 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_webui__url__constants.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_webui__url__constants.h @@ -1,32 +1,33 @@ ---- src/3rdparty/chromium/chrome/common/webui_url_constants.h.orig 2020-03-16 14:04:24 UTC +--- src/3rdparty/chromium/chrome/common/webui_url_constants.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/chrome/common/webui_url_constants.h -@@ -268,7 +268,7 @@ bool IsSystemWebUIHost(base::StringPiece host); - extern const char kChromeUICastHost[]; - #endif +@@ -291,7 +291,7 @@ bool IsSystemWebUIHost(base::StringPiece host); --#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) + #endif // defined(OS_CHROMEOS) + +-#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || \ ++#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || defined(OS_BSD) || \ + defined(OS_CHROMEOS) extern const char kChromeUIDiscardsHost[]; extern const char kChromeUIDiscardsURL[]; - extern const char kChromeUIHatsHost[]; -@@ -280,17 +280,17 @@ extern const char kChromeUIHatsURL[]; +@@ -311,18 +311,18 @@ extern const char kChromeUILinuxProxyConfigHost[]; extern const char kChromeUILinuxProxyConfigHost[]; #endif --#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \ ++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || \ + defined(OS_ANDROID) extern const char kChromeUISandboxHost[]; #endif - #if defined(OS_WIN) || defined(OS_MACOSX) || \ + #if defined(OS_WIN) || defined(OS_MAC) || \ - (defined(OS_LINUX) && !defined(OS_CHROMEOS)) + (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) extern const char kChromeUIBrowserSwitchHost[]; extern const char kChromeUIBrowserSwitchURL[]; #endif --#if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA) -+#if ((defined(OS_LINUX) || defined(OS_BSD)) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA) +-#if ((defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(TOOLKIT_VIEWS)) || \ ++#if ((defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)) && defined(TOOLKIT_VIEWS)) || \ + defined(USE_AURA) extern const char kChromeUITabModalConfirmDialogHost[]; #endif - diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_renderer_pepper_pepper__flash__font__file__host.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_renderer_pepper_pepper__flash__font__file__host.cc index 89c9cc80e1f3..747cbfebde8f 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_renderer_pepper_pepper__flash__font__file__host.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_renderer_pepper_pepper__flash__font__file__host.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/chrome/renderer/pepper/pepper_flash_font_file_host.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/chrome/renderer/pepper/pepper_flash_font_file_host.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/chrome/renderer/pepper/pepper_flash_font_file_host.cc @@ -15,7 +15,7 @@ #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/proxy/serialized_structs.h" --#if defined(OS_LINUX) || defined(OS_OPENBSD) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_OPENBSD) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "components/services/font/public/cpp/font_loader.h" #include "content/public/common/common_sandbox_support_linux.h" #elif defined(OS_WIN) @@ -13,8 +13,8 @@ const ppapi::proxy::SerializedFontDescription& description, PP_PrivateFontCharset charset) : ResourceHost(host->GetPpapiHost(), instance, resource) { --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // The global SkFontConfigInterface is configured and initialized with a // SkFontconfigInterface compatible font_service::FontLoader in // RendererBlinkPlatformImpl (called from RenderThreadImpl::Init) at startup @@ -22,8 +22,8 @@ void* buffer, size_t* length) { bool result = false; --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) if (font_file_.IsValid()) { result = content::GetFontTable(font_file_.GetPlatformFile(), table, 0 /* offset */, diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_renderer_pepper_pepper__flash__font__file__host.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_renderer_pepper_pepper__flash__font__file__host.h index 4196fbdcfb81..2c9bb754f5f5 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_renderer_pepper_pepper__flash__font__file__host.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_renderer_pepper_pepper__flash__font__file__host.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/chrome/renderer/pepper/pepper_flash_font_file_host.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/chrome/renderer/pepper/pepper_flash_font_file_host.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/chrome/renderer/pepper/pepper_flash_font_file_host.h @@ -14,7 +14,7 @@ #include "ppapi/c/private/pp_private_font_charset.h" #include "ppapi/host/resource_host.h" --#if defined(OS_LINUX) || defined(OS_OPENBSD) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_OPENBSD) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "base/files/file.h" #elif defined(OS_WIN) #include "third_party/skia/include/core/SkRefCnt.h" @@ -13,8 +13,8 @@ uint32_t table); bool GetFontData(uint32_t table, void* buffer, size_t* length); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) base::File font_file_; #elif defined(OS_WIN) sk_sp typeface_; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_autofill_content_renderer_password__form__conversion__utils.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_autofill_content_renderer_password__form__conversion__utils.cc index 0cc2901ad127..245226303b78 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_autofill_content_renderer_password__form__conversion__utils.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_autofill_content_renderer_password__form__conversion__utils.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/components/autofill/content/renderer/password_form_conversion_utils.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/components/autofill/content/renderer/password_form_conversion_utils.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/components/autofill/content/renderer/password_form_conversion_utils.cc -@@ -37,7 +37,11 @@ +@@ -19,7 +19,11 @@ #include "third_party/blink/public/web/web_form_control_element.h" #include "third_party/blink/public/web/web_input_element.h" #include "third_party/blink/public/web/web_local_frame.h" @@ -11,4 +11,4 @@ +#endif #include "url/gurl.h" - using blink::WebFormControlElement; + using blink::WebElement; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_content__settings_core_browser_website__settings__registry.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_content__settings_core_browser_website__settings__registry.cc index 4daa3daa7d8f..608408ef215a 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_content__settings_core_browser_website__settings__registry.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_content__settings_core_browser_website__settings__registry.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/components/content_settings/core/browser/website_settings_registry.cc.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/components/content_settings/core/browser/website_settings_registry.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/components/content_settings/core/browser/website_settings_registry.cc @@ -66,7 +66,7 @@ const WebsiteSettingsInfo* WebsiteSettingsRegistry::Re #if defined(OS_WIN) @@ -8,4 +8,4 @@ +#elif (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) if (!(platform & PLATFORM_LINUX)) return nullptr; - #elif defined(OS_MACOSX) && !defined(OS_IOS) + #elif defined(OS_MAC) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_cookie__config_cookie__store__util.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_cookie__config_cookie__store__util.cc index eac52d7007d0..1f2fc10e6575 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_cookie__config_cookie__store__util.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_cookie__config_cookie__store__util.cc @@ -1,24 +1,26 @@ ---- src/3rdparty/chromium/components/cookie_config/cookie_store_util.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/components/cookie_config/cookie_store_util.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/components/cookie_config/cookie_store_util.cc -@@ -11,7 +11,7 @@ +@@ -11,7 +11,7 @@ namespace cookie_config { namespace cookie_config { --#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_WIN) || defined(OS_APPLE) || defined(OS_LINUX) || \ ++#if defined(OS_WIN) || defined(OS_APPLE) || defined(OS_LINUX) || defined(OS_BSD) || \ + defined(OS_CHROMEOS) namespace { - // Use the operating system's mechanisms to encrypt cookies before writing -@@ -63,10 +63,10 @@ base::LazyInstance::Destructor +@@ -64,12 +64,12 @@ net::CookieCryptoDelegate* GetCookieCryptoDelegate() { net::CookieCryptoDelegate* GetCookieCryptoDelegate() { return g_cookie_crypto_delegate.Pointer(); } --#else // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) -+#else // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) +-#else // defined(OS_WIN) || defined(OS_APPLE) || defined(OS_LINUX) || ++#else // defined(OS_WIN) || defined(OS_APPLE) || defined(OS_LINUX) || defined(OS_BSD) || + // defined(OS_CHROMEOS) net::CookieCryptoDelegate* GetCookieCryptoDelegate() { return NULL; } --#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) -+#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) +-#endif // defined(OS_WIN) || defined(OS_APPLE) || defined(OS_LINUX) || ++#endif // defined(OS_WIN) || defined(OS_APPLE) || defined(OS_LINUX) || defined(OS_BSD) || + // defined(OS_CHROMEOS) } // namespace cookie_config diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_content_browser_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_content_browser_BUILD.gn index 137500aa4e33..49d8263ef3be 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_content_browser_BUILD.gn +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_content_browser_BUILD.gn @@ -1,15 +1,15 @@ ---- src/3rdparty/chromium/components/crash/content/browser/BUILD.gn.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/components/crash/content/browser/BUILD.gn.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/components/crash/content/browser/BUILD.gn -@@ -28,7 +28,7 @@ source_set("browser") { +@@ -35,7 +35,7 @@ source_set("browser") { "//content/public/common", ] -- if (is_linux || is_android) { -+ if ((is_linux && !is_bsd) || is_android) { +- if (is_linux || is_chromeos || is_android) { ++ if ((is_linux || is_chromeos || is_android) && !is_bsd) { set_sources_assignment_filter([]) # Want this file on both Linux and Android. -@@ -42,13 +42,13 @@ source_set("browser") { +@@ -49,13 +49,13 @@ source_set("browser") { deps += [ "//third_party/crashpad/crashpad/client" ] } diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_core_common_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_core_common_BUILD.gn index 31dad0abae33..c7be0520b797 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_core_common_BUILD.gn +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_core_common_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/components/crash/core/common/BUILD.gn.orig 2020-03-16 14:04:24 UTC +--- src/3rdparty/chromium/components/crash/core/common/BUILD.gn.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/components/crash/core/common/BUILD.gn -@@ -7,7 +7,7 @@ import("//components/gwp_asan/buildflags/buildflags.gn +@@ -7,7 +7,7 @@ declare_args() { declare_args() { # If set to true, this will stub out and disable the entire crash key system. @@ -9,23 +9,32 @@ } group("common") { -@@ -110,7 +110,9 @@ target(crash_key_target_type, "crash_key_lib") { - ] - } +@@ -32,7 +32,7 @@ use_crashpad_annotation = + # implementations will be instantiated and set, doubling the storage + # used for keys. This is intended to be used temporarily to test Crashpad + # integrations without disabling Breakpad. +-use_combined_annotations = is_linux || is_chromeos ++use_combined_annotations = (is_linux || is_chromeos) && !is_bsd -- deps += [ "//third_party/breakpad:client" ] + buildflag_header("crash_buildflags") { + header = "crash_buildflags.h" +@@ -93,7 +93,9 @@ target(crash_key_target_type, "crash_key_lib") { + sources += [ "crash_key_stubs.cc" ] + } else if (use_crashpad_annotation) { + sources += [ "crash_key_crashpad.cc" ] +- deps += [ "//third_party/crashpad/crashpad/client" ] + if (!is_bsd) { -+ deps += [ "//third_party/breakpad:client" ] ++ deps += [ "//third_party/crashpad/crashpad/client" ] + } - if (use_combined_annotations) { - public_deps += [ "//third_party/crashpad/crashpad/client" ] - } -@@ -173,7 +175,7 @@ source_set("unit_tests") { - sources += [ "objc_zombie_unittest.mm" ] - } + } else { + include_dirs = [ "//third_party/breakpad/breakpad/src" ] -- if (!is_mac && !is_ios && !is_win && !is_fuchsia && !is_android) { -+ if (!is_mac && !is_ios && !is_win && !is_fuchsia && !is_android && !is_bsd) { +@@ -184,7 +186,7 @@ source_set("unit_tests") { + sources += [ "crash_key_breakpad_ios_unittest.cc" ] + deps += [ "//third_party/breakpad:client" ] + include_dirs = [ "//third_party/breakpad/breakpad/src/" ] +- } else if (!is_mac && !is_win && !is_fuchsia && !is_android) { ++ } else if (!is_mac && !is_win && !is_fuchsia && !is_android && !is_bsd) { include_dirs = [ "//third_party/breakpad/breakpad/src/" ] sources += [ "crash_key_breakpad_unittest.cc" ] } diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_download_internal_common_base__file.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_download_internal_common_base__file.cc index fcc55937477f..ba8b58303645 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_download_internal_common_base__file.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_download_internal_common_base__file.cc @@ -1,11 +1,20 @@ ---- src/3rdparty/chromium/components/download/internal/common/base_file.cc.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/components/download/internal/common/base_file.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/components/download/internal/common/base_file.cc -@@ -446,7 +446,7 @@ DownloadInterruptReason BaseFile::LogInterruptReason( - return reason; +@@ -604,7 +604,7 @@ GURL GetEffectiveAuthorityURL(const GURL& source_url, + + } // namespace + +-#if defined(OS_WIN) || defined(OS_APPLE) || defined(OS_LINUX) || \ ++#if defined(OS_WIN) || defined(OS_APPLE) || defined(OS_LINUX) || defined(OS_BSD) || \ + defined(OS_CHROMEOS) + + DownloadInterruptReason BaseFile::AnnotateWithSourceInformationSync( +@@ -623,7 +623,7 @@ DownloadInterruptReason BaseFile::AnnotateWithSourceIn + + return QuarantineFileResultToReason(result); } - --#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) - - namespace { - +-#else // !OS_WIN && !OS_APPLE && !OS_LINUX && !OS_CHROMEOS ++#else // !OS_WIN && !OS_APPLE && !OS_LINUX && !OS_CHROMEOS && !OS_BSD + DownloadInterruptReason BaseFile::AnnotateWithSourceInformationSync( + const std::string& client_guid, + const GURL& source_url, diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_feedback_anonymizer__tool.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_feedback_anonymizer__tool.cc deleted file mode 100644 index d78e21053979..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_feedback_anonymizer__tool.cc +++ /dev/null @@ -1,14 +0,0 @@ ---- src/3rdparty/chromium/components/feedback/anonymizer_tool.cc.orig 2019-05-23 12:39:34 UTC -+++ src/3rdparty/chromium/components/feedback/anonymizer_tool.cc -@@ -13,7 +13,11 @@ - #include "base/strings/stringprintf.h" - #include "content/public/browser/browser_thread.h" - #include "net/base/ip_address.h" -+#if defined(OS_BSD) -+#include -+#else - #include "third_party/re2/src/re2/re2.h" -+#endif - - using re2::RE2; - diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_flags__ui_flags__state.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_flags__ui_flags__state.cc index b79cf25a8b9a..1681114b5093 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_flags__ui_flags__state.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_flags__ui_flags__state.cc @@ -1,8 +1,8 @@ ---- src/3rdparty/chromium/components/flags_ui/flags_state.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/components/flags_ui/flags_state.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/components/flags_ui/flags_state.cc -@@ -653,7 +653,7 @@ int FlagsState::GetCurrentPlatform() { +@@ -687,7 +687,7 @@ int FlagsState::GetCurrentPlatform() { return kOsWin; - #elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check. + #elif defined(OS_CHROMEOS) return kOsCrOS; -#elif defined(OS_LINUX) || defined(OS_OPENBSD) +#elif defined(OS_LINUX) || defined(OS_OPENBSD) || defined(OS_FREEBSD) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_keyed__service_core_dependency__graph__unittest.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_keyed__service_core_dependency__graph__unittest.cc deleted file mode 100644 index 8c2789392175..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_keyed__service_core_dependency__graph__unittest.cc +++ /dev/null @@ -1,14 +0,0 @@ ---- src/3rdparty/chromium/components/keyed_service/core/dependency_graph_unittest.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/components/keyed_service/core/dependency_graph_unittest.cc -@@ -9,7 +9,11 @@ - #include "components/keyed_service/core/dependency_graph.h" - #include "components/keyed_service/core/dependency_node.h" - #include "testing/gtest/include/gtest/gtest.h" -+#if defined(OS_BSD) -+#include -+#else - #include "third_party/re2/src/re2/re2.h" -+#endif - - namespace { - diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_metrics_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_metrics_BUILD.gn index 6698ef0eabd4..8c681fab859f 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_metrics_BUILD.gn +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_metrics_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/components/metrics/BUILD.gn.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/components/metrics/BUILD.gn.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/components/metrics/BUILD.gn -@@ -142,6 +142,11 @@ static_library("metrics") { +@@ -190,6 +190,11 @@ jumbo_static_library("metrics") { if (is_fuchsia) { sources += [ "drive_metrics_provider_fuchsia.cc" ] } @@ -11,4 +11,4 @@ + } - # The component metrics provider is a separate target because it depends upon + if (is_android) { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_metrics_metrics__log.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_metrics_metrics__log.cc index 374e750efb1e..56242b06e5a7 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_metrics_metrics__log.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_metrics_metrics__log.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/components/metrics/metrics_log.cc.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/components/metrics/metrics_log.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/components/metrics/metrics_log.cc -@@ -198,7 +198,7 @@ void MetricsLog::RecordCoreSystemProfile(MetricsServic +@@ -224,7 +224,7 @@ void MetricsLog::RecordCoreSystemProfile( // OperatingSystemVersion refers to the ChromeOS release version. #if defined(OS_CHROMEOS) os->set_kernel_version(base::SysInfo::KernelVersion()); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_metrics_system__memory__stats__recorder__linux.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_metrics_system__memory__stats__recorder__linux.cc deleted file mode 100644 index e3340e52c178..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_metrics_system__memory__stats__recorder__linux.cc +++ /dev/null @@ -1,18 +0,0 @@ ---- src/3rdparty/chromium/components/metrics/system_memory_stats_recorder_linux.cc.orig 2019-11-27 21:12:25 UTC -+++ src/3rdparty/chromium/components/metrics/system_memory_stats_recorder_linux.cc -@@ -30,6 +30,7 @@ namespace metrics { - UMA_HISTOGRAM_LINEAR(name, sample, 2500, 50) - - void RecordMemoryStats(RecordMemoryStatsType type) { -+#if !defined(OS_FREEBSD) - base::SystemMemoryInfoKB memory; - if (!base::GetSystemMemoryInfo(&memory)) - return; -@@ -81,6 +82,7 @@ void RecordMemoryStats(RecordMemoryStatsType type) { - break; - } - } -+#endif // !defined(OS_FREEBSD) - } - - } // namespace metrics diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_neterror_resources_neterror.js b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_neterror_resources_neterror.js index 6fee612e68ba..6bd54f98757c 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_neterror_resources_neterror.js +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_neterror_resources_neterror.js @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/components/neterror/resources/neterror.js.orig 2020-04-08 09:41:36 UTC +--- src/3rdparty/chromium/components/neterror/resources/neterror.js.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/components/neterror/resources/neterror.js -@@ -201,7 +201,7 @@ function setUpCachedButton(buttonStrings) { +@@ -153,7 +153,7 @@ let primaryControlOnLeft = true; } let primaryControlOnLeft = true; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_network__session__configurator_browser_network__session__configurator.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_network__session__configurator_browser_network__session__configurator.cc index 15b66ed1b8b7..4b94d182fb20 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_network__session__configurator_browser_network__session__configurator.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_network__session__configurator_browser_network__session__configurator.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/components/network_session_configurator/browser/network_session_configurator.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/components/network_session_configurator/browser/network_session_configurator.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/components/network_session_configurator/browser/network_session_configurator.cc -@@ -591,7 +591,7 @@ net::URLRequestContextBuilder::HttpCacheParams::Type C +@@ -749,7 +749,7 @@ net::URLRequestContextBuilder::HttpCacheParams::Type C } #endif // #if !defined(OS_ANDROID) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_os__crypt.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_os__crypt.h index ea074e866ea3..bd01dccf79e2 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_os__crypt.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_os__crypt.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/components/os_crypt/os_crypt.h.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/components/os_crypt/os_crypt.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/components/os_crypt/os_crypt.h @@ -15,9 +15,9 @@ #include "base/strings/string16.h" @@ -10,9 +10,9 @@ -#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) +#endif // (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) - #if defined(OS_WIN) || (defined(OS_MACOSX) && !defined(OS_IOS)) + #if defined(OS_WIN) || defined(OS_MAC) class PrefRegistrySimple; -@@ -34,13 +34,13 @@ struct Config; +@@ -34,13 +34,13 @@ class OSCrypt { // true for Linux, if a password management tool is available. class OSCrypt { public: @@ -24,8 +24,8 @@ -#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) +#endif // (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) --#if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) -+#if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) +-#if defined(OS_APPLE) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) ++#if defined(OS_APPLE) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) // On Linux returns true iff the real secret key (not hardcoded one) is // available. On MacOS returns true if Keychain is available (for mock // Keychain it returns true if not using locked Keychain, false if using @@ -38,7 +38,7 @@ // For unit testing purposes, inject methods to be used. // |get_key_storage_mock| provides the desired |KeyStorage| implementation. // If the provider returns |nullptr|, a hardcoded password will be used. -@@ -146,6 +146,6 @@ void UseMockKeyStorageForTesting( +@@ -146,6 +146,6 @@ COMPONENT_EXPORT(OS_CRYPT) void ClearCacheForTesting() // Clears any caching and most lazy initialisations performed by the production // code. Should be used after any test which required a password. COMPONENT_EXPORT(OS_CRYPT) void ClearCacheForTesting(); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_os__crypt__unittest.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_os__crypt__unittest.cc deleted file mode 100644 index 1f8f1fdcada7..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_os__crypt__unittest.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/components/os_crypt/os_crypt_unittest.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/components/os_crypt/os_crypt_unittest.cc -@@ -18,7 +18,7 @@ - #include "components/os_crypt/os_crypt_mocker.h" - #include "testing/gtest/include/gtest/gtest.h" - --#if defined(OS_LINUX) && !defined(OS_CHROMEOS) -+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) - #include "components/os_crypt/os_crypt_mocker_linux.h" - #endif - diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_BUILD.gn deleted file mode 100644 index 35762dbd4a7e..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_BUILD.gn +++ /dev/null @@ -1,16 +0,0 @@ ---- src/3rdparty/chromium/components/storage_monitor/BUILD.gn.orig 2019-11-27 21:12:25 UTC -+++ src/3rdparty/chromium/components/storage_monitor/BUILD.gn -@@ -79,6 +79,13 @@ static_library("storage_monitor") { - } - } - -+ if (is_bsd) { -+ sources += [ -+ "storage_monitor_freebsd.cc", -+ "storage_monitor_freebsd.h", -+ ] -+ } -+ - if (use_udev) { - sources += [ - "udev_util_linux.cc", diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_removable__device__constants.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_removable__device__constants.cc deleted file mode 100644 index d19717d86250..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_removable__device__constants.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/components/storage_monitor/removable_device_constants.cc.orig 2019-05-23 12:39:34 UTC -+++ src/3rdparty/chromium/components/storage_monitor/removable_device_constants.cc -@@ -10,7 +10,7 @@ namespace storage_monitor { - const char kFSUniqueIdPrefix[] = "UUID:"; - const char kVendorModelSerialPrefix[] = "VendorModelSerial:"; - --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - const char kVendorModelVolumeStoragePrefix[] = "VendorModelVolumeStorage:"; - #endif - diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_removable__device__constants.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_removable__device__constants.h deleted file mode 100644 index 7bddc6a7c8d3..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_removable__device__constants.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/components/storage_monitor/removable_device_constants.h.orig 2019-05-23 12:39:34 UTC -+++ src/3rdparty/chromium/components/storage_monitor/removable_device_constants.h -@@ -15,7 +15,7 @@ namespace storage_monitor { - extern const char kFSUniqueIdPrefix[]; - extern const char kVendorModelSerialPrefix[]; - --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - extern const char kVendorModelVolumeStoragePrefix[]; - #endif - diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_storage__monitor__freebsd.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_storage__monitor__freebsd.cc deleted file mode 100644 index 792dfbb705c2..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_storage__monitor__freebsd.cc +++ /dev/null @@ -1,57 +0,0 @@ ---- src/3rdparty/chromium/components/storage_monitor/storage_monitor_freebsd.cc.orig 2018-12-29 13:28:53 UTC -+++ src/3rdparty/chromium/components/storage_monitor/storage_monitor_freebsd.cc -@@ -0,0 +1,54 @@ -+// Copyright 2014 The Chromium Authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+// StorageMonitorFreeBSD implementation. -+ -+#include "components/storage_monitor/storage_monitor_freebsd.h" -+ -+#include -+ -+#include -+ -+#include "base/bind.h" -+#include "base/metrics/histogram.h" -+#include "base/process/kill.h" -+#include "base/process/launch.h" -+#include "base/stl_util.h" -+#include "base/strings/string_number_conversions.h" -+#include "base/strings/string_util.h" -+#include "base/strings/utf_string_conversions.h" -+#include "components/storage_monitor/media_storage_util.h" -+#include "components/storage_monitor/removable_device_constants.h" -+#include "components/storage_monitor/storage_info.h" -+ -+using content::BrowserThread; -+ -+namespace storage_monitor { -+ -+namespace { -+ -+} // namespace -+ -+StorageMonitorFreeBSD::StorageMonitorFreeBSD() { -+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); -+} -+ -+StorageMonitorFreeBSD::~StorageMonitorFreeBSD() { -+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); -+} -+ -+void StorageMonitorFreeBSD::Init() { -+} -+ -+bool StorageMonitorFreeBSD::GetStorageInfoForPath( -+ const base::FilePath& path, -+ StorageInfo* device_info) const { -+ return false; // TODO -+} -+ -+StorageMonitor* StorageMonitor::CreateInternal() { -+ return new StorageMonitorFreeBSD(); -+} -+ -+} // namespace storage_monitor diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_storage__monitor__freebsd.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_storage__monitor__freebsd.h deleted file mode 100644 index 0194a8cc6d9a..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_storage__monitor__freebsd.h +++ /dev/null @@ -1,48 +0,0 @@ ---- src/3rdparty/chromium/components/storage_monitor/storage_monitor_freebsd.h.orig 2017-01-29 22:59:23 UTC -+++ src/3rdparty/chromium/components/storage_monitor/storage_monitor_freebsd.h -@@ -0,0 +1,45 @@ -+// Copyright 2014 The Chromium Authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+// StorageMonitorFreeBSD processes mount point change events, notifies listeners -+// about the addition and deletion of media devices, and answers queries about -+// mounted devices. -+// StorageMonitorFreeBSD lives on the UI thread, and uses ??? -+// the FILE thread to get mount point change events. -+ -+#ifndef COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_FREEBSD_H_ -+#define COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_FREEBSD_H_ -+ -+#include -+#include -+ -+#include "base/compiler_specific.h" -+#include "base/files/file_path.h" -+#include "base/files/file_path_watcher.h" -+#include "base/memory/weak_ptr.h" -+#include "components/storage_monitor/storage_monitor.h" -+#include "content/public/browser/browser_thread.h" -+ -+namespace storage_monitor { -+ -+class StorageMonitorFreeBSD : public StorageMonitor { -+ public: -+ // Should only be called by browser start up code. -+ // Use StorageMonitor::GetInstance() instead. -+ explicit StorageMonitorFreeBSD(); -+ virtual ~StorageMonitorFreeBSD(); -+ -+ // Must be called for StorageMonitorFreeBSD to work. -+ virtual void Init() override; -+ private: -+ // StorageMonitor implementation. -+ virtual bool GetStorageInfoForPath(const base::FilePath& path, -+ StorageInfo* device_info) const override; -+ -+ DISALLOW_COPY_AND_ASSIGN(StorageMonitorFreeBSD); -+}; -+ -+} // namespace storage_monitor -+ -+#endif // COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_FREEBSD_H_ diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_update__client_update__query__params.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_update__client_update__query__params.cc index c71549e7a32b..1bc5548599b8 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_update__client_update__query__params.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_update__client_update__query__params.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/components/update_client/update_query_params.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/components/update_client/update_query_params.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/components/update_client/update_query_params.cc -@@ -38,6 +38,8 @@ const char kOs[] = +@@ -39,6 +39,8 @@ const char kOs[] = "fuchsia"; #elif defined(OS_OPENBSD) "openbsd"; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_url__matcher_regex__set__matcher.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_url__matcher_regex__set__matcher.cc index 09e3b8de29b2..6f062a13afaf 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_url__matcher_regex__set__matcher.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_url__matcher_regex__set__matcher.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/components/url_matcher/regex_set_matcher.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/components/url_matcher/regex_set_matcher.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/components/url_matcher/regex_set_matcher.cc -@@ -11,8 +11,13 @@ +@@ -12,8 +12,13 @@ #include "base/logging.h" #include "base/strings/string_util.h" #include "components/url_matcher/substring_set_matcher.h" diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_app_content__main.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_app_content__main.cc new file mode 100644 index 000000000000..7aeb08df039b --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_app_content__main.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/content/app/content_main.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/content/app/content_main.cc +@@ -232,7 +232,7 @@ int RunContentProcess(const ContentMainParams& params, + base::EnableTerminationOnOutOfMemory(); + #endif + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + // The various desktop environments set this environment variable that + // allows the dbus client library to connect directly to the bus. When this + // variable is not set (test environments like xvfb-run), the dbus client diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_app_content__main__runner__impl.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_app_content__main__runner__impl.cc index 00cd0cb587ca..ff289e2267aa 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_app_content__main__runner__impl.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_app_content__main__runner__impl.cc @@ -1,73 +1,65 @@ ---- src/3rdparty/chromium/content/app/content_main_runner_impl.cc.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/content/app/content_main_runner_impl.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/app/content_main_runner_impl.cc -@@ -93,17 +93,17 @@ - #include "base/posix/global_descriptors.h" - #include "content/public/common/content_descriptors.h" - --#if !defined(OS_MACOSX) -+#if !defined(OS_MACOSX) && !defined(OS_BSD) - #include "services/service_manager/zygote/common/zygote_fork_delegate_linux.h" - #endif --#if !defined(OS_MACOSX) && !defined(OS_ANDROID) -+#if !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD) - #include "sandbox/linux/services/libc_interceptor.h" - #include "services/service_manager/zygote/zygote_main.h" - #endif +@@ -131,7 +131,7 @@ #endif // OS_POSIX || OS_FUCHSIA --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "base/native_library.h" #include "base/rand_util.h" - #include "services/service_manager/zygote/common/common_sandbox_support_linux.h" -@@ -126,7 +126,7 @@ - #if BUILDFLAG(ENABLE_WEBRTC) - #include "third_party/webrtc_overrides/init_webrtc.h" // nogncheck + #include "content/public/common/zygote/sandbox_support_linux.h" +@@ -150,7 +150,7 @@ + #include "content/public/common/content_client.h" #endif --#endif // OS_LINUX -+#endif // OS_LINUX || defined(OS_BSD) - #if !defined(CHROME_MULTIPLE_DLL_BROWSER) - #include "content/child/field_trial.h" -@@ -314,7 +314,7 @@ void InitializeZygoteSandboxForBrowserProcess( +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + + #if BUILDFLAG(USE_ZYGOTE_HANDLE) + #include "content/browser/sandbox_host_linux.h" +@@ -308,7 +308,7 @@ void InitializeZygoteSandboxForBrowserProcess( } #endif // BUILDFLAG(USE_ZYGOTE_HANDLE) --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #if BUILDFLAG(ENABLE_PLUGINS) // Loads the (native) libraries but does not initialize them (i.e., does not -@@ -413,7 +413,7 @@ void PreSandboxInit() { +@@ -401,7 +401,7 @@ void PreSandboxInit() { } #endif // BUILDFLAG(USE_ZYGOTE_HANDLE) --#endif // OS_LINUX -+#endif // OS_LINUX || defined(OS_BSD) +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) } // namespace -@@ -471,7 +471,7 @@ int RunZygote(ContentMainDelegate* delegate) { +@@ -464,7 +464,7 @@ int RunZygote(ContentMainDelegate* delegate) { delegate->ZygoteStarting(&zygote_fork_delegates); media::InitializeMediaLibrary(); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) PreSandboxInit(); #endif -@@ -644,11 +644,11 @@ int ContentMainRunnerImpl::Initialize(const ContentMai - base::GlobalDescriptors::kBaseDescriptor); - #endif // !OS_ANDROID +@@ -841,7 +841,7 @@ int ContentMainRunnerImpl::Run(bool start_service_mana + delegate_->PostFieldTrialInitialization(); + } --#if defined(OS_LINUX) || defined(OS_OPENBSD) -+#if defined(OS_LINUX) - g_fds->Set(service_manager::kCrashDumpSignal, - service_manager::kCrashDumpSignal + - base::GlobalDescriptors::kBaseDescriptor); --#endif // OS_LINUX || OS_OPENBSD -+#endif // OS_LINUX - - #endif // !OS_WIN +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + // If dynamic Mojo Core is being used, ensure that it's loaded very early in + // the child/zygote process, before any sandbox is initialized. The library + // is not fully initialized with IPC support until a ChildProcess is later +@@ -851,7 +851,7 @@ int ContentMainRunnerImpl::Run(bool start_service_mana + CHECK_EQ(mojo::LoadCoreLibrary(GetMojoCoreSharedLibraryPath()), + MOJO_RESULT_OK); + } +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + } + MainFunctionParams main_params(command_line); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_BUILD.gn index 534c876cd7f1..f30e7619d0fe 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_BUILD.gn +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_BUILD.gn @@ -1,12 +1,18 @@ ---- src/3rdparty/chromium/content/browser/BUILD.gn.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/content/browser/BUILD.gn.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/browser/BUILD.gn -@@ -2003,6 +2003,9 @@ jumbo_static_library("browser") { - # resources on other platforms. - deps += [ "//content/browser/devtools:devtools_resources" ] +@@ -2090,6 +2090,15 @@ jumbo_static_library("browser") { + deps += [ "//third_party/speech-dispatcher" ] } -+ if (is_bsd) { -+ deps -= [ "//services/service_manager/zygote" ] -+ } - if (enable_basic_printing) { - deps += [ "//printing" ] ++ if (is_bsd) { ++ sources -= [ ++ "sandbox_host_linux.cc", ++ "sandbox_host_linux.h", ++ "sandbox_ipc_linux.cc", ++ "sandbox_ipc_linux.h", ++ ] ++ } ++ + # ChromeOS also defines linux but their memory-monitors conflict. + if (is_chromeos) { + sources += [ diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_browser__main__loop.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_browser__main__loop.cc index 84d2a3b34f81..a5c964121a11 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_browser__main__loop.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_browser__main__loop.cc @@ -1,34 +1,38 @@ ---- src/3rdparty/chromium/content/browser/browser_main_loop.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/content/browser/browser_main_loop.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/browser/browser_main_loop.cc -@@ -247,6 +247,13 @@ - #include "mojo/public/cpp/bindings/lib/test_random_mojo_delays.h" +@@ -372,7 +372,7 @@ std::unique_ptr CreateMem + if (chromeos::switches::MemoryPressureHandlingEnabled()) + monitor = std::make_unique(); + #elif defined(OS_MAC) || defined(OS_WIN) || defined(OS_FUCHSIA) || \ +- (defined(OS_LINUX) && !defined(OS_CHROMEOS) && !BUILDFLAG(IS_CHROMECAST)) ++ (defined(OS_LINUX) && !defined(OS_CHROMEOS) && !BUILDFLAG(IS_CHROMECAST)) || defined(OS_BSD) + monitor = std::make_unique(); #endif + // No memory monitor on other platforms... +@@ -618,7 +618,7 @@ int BrowserMainLoop::EarlyInitialization() { -+#if defined(OS_BSD) -+#include "content/browser/sandbox_host_linux.h" -+#include "services/service_manager/zygote/common/common_sandbox_support_linux.h" -+#include "content/public/common/common_sandbox_support_linux.h" -+#include "services/service_manager/sandbox/sandbox.h" -+#endif -+ - // One of the linux specific headers defines this as a macro. - #ifdef DestroyAll - #undef DestroyAll -@@ -665,7 +672,7 @@ int BrowserMainLoop::EarlyInitialization() { + // Up the priority of the UI thread unless it was already high (since Mac + // and recent versions of Android (O+) do this automatically). +-#if !defined(OS_MAC) ++#if !defined(OS_MAC) && !defined(OS_BSD) + if (base::FeatureList::IsEnabled( + features::kBrowserUseDisplayThreadPriority) && + base::PlatformThread::GetCurrentThreadPriority() < +@@ -628,7 +628,7 @@ int BrowserMainLoop::EarlyInitialization() { } - #endif // !defined(OS_MACOSX) + #endif // !defined(OS_MAC) --#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \ -+#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || \ +-#if defined(OS_MAC) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \ ++#if defined(OS_MAC) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || \ defined(OS_ANDROID) // We use quite a few file descriptors for our IPC as well as disk the disk // cache,and the default limit on the Mac is low (256), so bump it up. -@@ -675,7 +682,7 @@ int BrowserMainLoop::EarlyInitialization() { +@@ -638,7 +638,7 @@ int BrowserMainLoop::EarlyInitialization() { // users can easily hit this limit with many open tabs. Bump up the limit to // an arbitrarily high number. See https://crbug.com/539567 base::IncreaseFdLimitTo(8192); --#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_CHROMEOS) || -+#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || +-#endif // defined(OS_MAC) || defined(OS_LINUX) || defined(OS_CHROMEOS) || ++#endif // defined(OS_MAC) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || // defined(OS_ANDROID) #if defined(OS_WIN) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_child__process__launcher__helper__linux.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_child__process__launcher__helper__linux.cc index 6654ccf5d093..f9745942ff4a 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_child__process__launcher__helper__linux.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_child__process__launcher__helper__linux.cc @@ -1,53 +1,40 @@ ---- src/3rdparty/chromium/content/browser/child_process_launcher_helper_linux.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/content/browser/child_process_launcher_helper_linux.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/browser/child_process_launcher_helper_linux.cc -@@ -18,7 +18,9 @@ +@@ -18,9 +18,12 @@ + #include "content/public/common/content_switches.h" + #include "content/public/common/result_codes.h" #include "content/public/common/sandboxed_process_launcher_delegate.h" - #include "services/service_manager/sandbox/linux/sandbox_linux.h" - #include "services/service_manager/zygote/common/common_sandbox_support_linux.h" ++ +#if !defined(OS_BSD) - #include "services/service_manager/zygote/common/zygote_handle.h" + #include "content/public/common/zygote/sandbox_support_linux.h" + #include "content/public/common/zygote/zygote_handle.h" + #include "sandbox/policy/linux/sandbox_linux.h" +#endif - #include "services/service_manager/zygote/host/zygote_communication_linux.h" - #include "services/service_manager/zygote/host/zygote_host_impl_linux.h" -@@ -50,11 +52,13 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLaunche + namespace content { + namespace internal { +@@ -50,10 +53,12 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLaunche options->fds_to_remap = files_to_register.GetMappingWithIDAdjustment( base::GlobalDescriptors::kBaseDescriptor); +#if !defined(OS_BSD) if (GetProcessType() == switches::kRendererProcess) { const int sandbox_fd = SandboxHostLinux::GetInstance()->GetChildSocket(); - options->fds_to_remap.push_back( - std::make_pair(sandbox_fd, service_manager::GetSandboxFD())); + options->fds_to_remap.push_back(std::make_pair(sandbox_fd, GetSandboxFD())); } +#endif options->environment = delegate_->GetEnvironment(); -@@ -69,6 +73,7 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr +@@ -68,6 +73,7 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr int* launch_result) { *is_synchronous_launch = true; +#if !defined(OS_BSD) - service_manager::ZygoteHandle zygote_handle = + ZygoteHandle zygote_handle = base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoZygote) ? nullptr -@@ -82,7 +87,6 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr - GetProcessType()); - *launch_result = LAUNCH_RESULT_SUCCESS; - --#if !defined(OS_OPENBSD) - if (handle) { - // It could be a renderer process or an utility process. - int oom_score = content::kMiscOomScore; -@@ -92,13 +96,13 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr - service_manager::ZygoteHostImpl::GetInstance()->AdjustRendererOOMScore( - handle, oom_score); - } --#endif - - Process process; - process.process = base::Process(handle); +@@ -97,6 +103,7 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr process.zygote = zygote_handle; return process; } @@ -55,7 +42,7 @@ Process process; process.process = base::LaunchProcess(*command_line(), options); -@@ -116,10 +120,14 @@ ChildProcessTerminationInfo ChildProcessLauncherHelper +@@ -114,10 +121,14 @@ ChildProcessTerminationInfo ChildProcessLauncherHelper const ChildProcessLauncherHelper::Process& process, bool known_dead) { ChildProcessTerminationInfo info; @@ -70,9 +57,9 @@ info.status = base::GetKnownDeadTerminationStatus(process.process.Handle(), &info.exit_code); } else { -@@ -143,13 +151,17 @@ void ChildProcessLauncherHelper::ForceNormalProcessTer +@@ -141,13 +152,17 @@ void ChildProcessLauncherHelper::ForceNormalProcessTer DCHECK(CurrentlyOnProcessLauncherTaskRunner()); - process.process.Terminate(service_manager::RESULT_CODE_NORMAL_EXIT, false); + process.process.Terminate(RESULT_CODE_NORMAL_EXIT, false); // On POSIX, we must additionally reap the child. +#if !defined(OS_BSD) if (process.zygote) { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_compositor_viz__process__transport__factory.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_compositor_viz__process__transport__factory.cc index 10c04f977b9f..39be10cafee1 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_compositor_viz__process__transport__factory.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_compositor_viz__process__transport__factory.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/browser/compositor/viz_process_transport_factory.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/content/browser/compositor/viz_process_transport_factory.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/browser/compositor/viz_process_transport_factory.cc -@@ -109,7 +109,7 @@ class HostDisplayClient : public viz::HostDisplayClien +@@ -108,7 +108,7 @@ class HostDisplayClient : public viz::HostDisplayClien HostDisplayClient& operator=(const HostDisplayClient&) = delete; // viz::HostDisplayClient: diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_devtools_protocol_system__info__handler.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_devtools_protocol_system__info__handler.cc index 522db7b2f24b..95219a8fb29a 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_devtools_protocol_system__info__handler.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_devtools_protocol_system__info__handler.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/content/browser/devtools/protocol/system_info_handler.cc.orig 2020-03-16 14:04:24 UTC +--- src/3rdparty/chromium/content/browser/devtools/protocol/system_info_handler.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/browser/devtools/protocol/system_info_handler.cc -@@ -48,7 +48,7 @@ std::unique_ptr GfxSizeToSystemInfoS +@@ -47,7 +47,7 @@ std::unique_ptr GfxSizeToSystemInfoS // Give the GPU process a few seconds to provide GPU info. - // Linux Debug builds need more time -- see Issue 796437. + // Linux Debug builds need more time -- see Issue 796437 and 1046598. // Windows builds need more time -- see Issue 873112 and 1004472. --#if (defined(OS_LINUX) && !defined(NDEBUG)) -+#if ((defined(OS_LINUX) || defined(OS_BSD)) && !defined(NDEBUG)) - const int kGPUInfoWatchdogTimeoutMs = 20000; - #elif defined(OS_WIN) +-#if ((defined(OS_LINUX) || defined(OS_CHROMEOS)) && !defined(NDEBUG)) || \ ++#if ((defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)) && !defined(NDEBUG)) || \ + defined(OS_WIN) const int kGPUInfoWatchdogTimeoutMs = 30000; + #else diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_font__access_font__enumeration__cache.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_font__access_font__enumeration__cache.h new file mode 100644 index 000000000000..d880e41854fc --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_font__access_font__enumeration__cache.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/content/browser/font_access/font_enumeration_cache.h.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/content/browser/font_access/font_enumeration_cache.h +@@ -15,7 +15,7 @@ + #include "third_party/blink/public/common/font_access/font_enumeration_table.pb.h" + #include "third_party/blink/public/mojom/font_access/font_access.mojom.h" + +-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \ ++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || \ + defined(OS_MAC) + #define PLATFORM_HAS_LOCAL_FONT_ENUMERATION_IMPL 1 + #endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_compositor__util.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_compositor__util.cc new file mode 100644 index 000000000000..c214dbcc9d9a --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_compositor__util.cc @@ -0,0 +1,16 @@ +--- src/3rdparty/chromium/content/browser/gpu/compositor_util.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/content/browser/gpu/compositor_util.cc +@@ -131,11 +131,11 @@ const GpuFeatureData GetGpuFeatureData( + {"video_decode", + SafeGetFeatureStatus(gpu_feature_info, + gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE), +-#if defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_CHROMEOS) ++#if (defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_CHROMEOS)) || defined(OS_BSD) + !command_line.HasSwitch(switches::kEnableAcceleratedVideoDecode), + #else + command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode), +-#endif // defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_CHROMEOS) ++#endif // (defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_CHROMEOS)) || defined(OS_BSD) + DisableInfo::Problem( + "Accelerated video decode has been disabled, either via blocklist, " + "about:flags or the command line."), diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__process__host.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__process__host.cc index 1732a21eac4e..2c63b58e6486 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__process__host.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__process__host.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/content/browser/gpu/gpu_process_host.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/content/browser/gpu/gpu_process_host.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/browser/gpu/gpu_process_host.cc -@@ -1076,7 +1076,7 @@ bool GpuProcessHost::LaunchGpuProcess() { +@@ -1123,7 +1123,7 @@ bool GpuProcessHost::LaunchGpuProcess() { std::unique_ptr cmd_line = std::make_unique(base::CommandLine::NO_PROGRAM); #else --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) int child_flags = gpu_launcher.empty() ? ChildProcessHost::CHILD_ALLOW_SELF : ChildProcessHost::CHILD_NORMAL; - #elif defined(OS_MACOSX) + #elif defined(OS_MAC) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_media_media__internals.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_media_media__internals.cc deleted file mode 100644 index 1a0ece4173e5..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_media_media__internals.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/content/browser/media/media_internals.cc.orig 2020-11-07 01:22:36 UTC -+++ src/3rdparty/chromium/content/browser/media/media_internals.cc -@@ -560,7 +560,7 @@ void MediaInternals::UpdateVideoCaptureDeviceCapabilit - device_dict->SetString("id", descriptor.device_id); - device_dict->SetString("name", descriptor.GetNameAndModel()); - device_dict->Set("formats", std::move(format_list)); --#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \ -+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || \ - defined(OS_ANDROID) - device_dict->SetString("captureApi", descriptor.GetCaptureApiTypeString()); - #endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_ppapi__plugin__process__host.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_ppapi__plugin__process__host.cc index 985b0b4c1f82..e00a71969337 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_ppapi__plugin__process__host.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_ppapi__plugin__process__host.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/content/browser/ppapi_plugin_process_host.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/content/browser/ppapi_plugin_process_host.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/browser/ppapi_plugin_process_host.cc -@@ -359,7 +359,7 @@ bool PpapiPluginProcessHost::Init(const PepperPluginIn +@@ -364,7 +364,7 @@ bool PpapiPluginProcessHost::Init(const PepperPluginIn base::CommandLine::StringType plugin_launcher = browser_command_line.GetSwitchValueNative(switches::kPpapiPluginLauncher); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) int flags = plugin_launcher.empty() ? ChildProcessHost::CHILD_ALLOW_SELF : ChildProcessHost::CHILD_NORMAL; - #elif defined(OS_MACOSX) + #elif defined(OS_MAC) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_ppapi__plugin__process__host__receiver__bindings.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_ppapi__plugin__process__host__receiver__bindings.cc index 25b0bff9f590..84693b1d83fe 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_ppapi__plugin__process__host__receiver__bindings.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_ppapi__plugin__process__host__receiver__bindings.cc @@ -1,20 +1,20 @@ ---- src/3rdparty/chromium/content/browser/ppapi_plugin_process_host_receiver_bindings.cc.orig 2020-03-16 14:04:24 UTC +--- src/3rdparty/chromium/content/browser/ppapi_plugin_process_host_receiver_bindings.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/browser/ppapi_plugin_process_host_receiver_bindings.cc @@ -8,7 +8,7 @@ #include "build/build_config.h" --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "components/services/font/public/mojom/font_service.mojom.h" // nogncheck #include "content/browser/font_service.h" // nogncheck #endif -@@ -17,7 +17,7 @@ namespace content { +@@ -17,7 +17,7 @@ void PpapiPluginProcessHost::BindHostReceiver( void PpapiPluginProcessHost::BindHostReceiver( mojo::GenericPendingReceiver receiver) { --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) if (auto font_receiver = receiver.As()) ConnectToFontService(std::move(font_receiver)); #endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_delegated__frame__host.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_delegated__frame__host.cc new file mode 100644 index 000000000000..feac86732ec5 --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_delegated__frame__host.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/content/browser/renderer_host/delegated_frame_host.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/content/browser/renderer_host/delegated_frame_host.cc +@@ -258,7 +258,7 @@ void DelegatedFrameHost::EmbedSurface( + + if (!primary_surface_id || + primary_surface_id->local_surface_id() != local_surface_id_) { +-#if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) ++#if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) + // On Windows and Linux, we would like to produce new content as soon as + // possible or the OS will create an additional black gutter. Until we can + // block resize on surface synchronization on these platforms, we will not diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_input_input__device__change__observer.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_input_input__device__change__observer.cc index 32f2adfcf953..b248bbb43b91 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_input_input__device__change__observer.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_input_input__device__change__observer.cc @@ -1,29 +1,29 @@ ---- src/3rdparty/chromium/content/browser/renderer_host/input/input_device_change_observer.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/content/browser/renderer_host/input/input_device_change_observer.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/browser/renderer_host/input/input_device_change_observer.cc -@@ -10,7 +10,7 @@ +@@ -9,7 +9,7 @@ #if defined(OS_WIN) #include "ui/events/devices/input_device_observer_win.h" --#elif defined(OS_LINUX) -+#elif defined(OS_LINUX) || defined(OS_BSD) +-#elif defined(OS_LINUX) || defined(OS_CHROMEOS) ++#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "ui/events/devices/device_data_manager.h" #elif defined(OS_ANDROID) #include "ui/events/devices/input_device_observer_android.h" -@@ -22,7 +22,7 @@ InputDeviceChangeObserver::InputDeviceChangeObserver(R +@@ -21,7 +21,7 @@ InputDeviceChangeObserver::InputDeviceChangeObserver(R render_view_host_impl_ = rvhi; #if defined(OS_WIN) ui::InputDeviceObserverWin::GetInstance()->AddObserver(this); --#elif defined(OS_LINUX) -+#elif defined(OS_LINUX) || defined(OS_BSD) +-#elif defined(OS_LINUX) || defined(OS_CHROMEOS) ++#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) ui::DeviceDataManager::GetInstance()->AddObserver(this); #elif defined(OS_ANDROID) ui::InputDeviceObserverAndroid::GetInstance()->AddObserver(this); -@@ -32,7 +32,7 @@ InputDeviceChangeObserver::InputDeviceChangeObserver(R +@@ -31,7 +31,7 @@ InputDeviceChangeObserver::~InputDeviceChangeObserver( InputDeviceChangeObserver::~InputDeviceChangeObserver() { #if defined(OS_WIN) ui::InputDeviceObserverWin::GetInstance()->RemoveObserver(this); --#elif defined(OS_LINUX) -+#elif defined(OS_LINUX) || defined(OS_BSD) +-#elif defined(OS_LINUX) || defined(OS_CHROMEOS) ++#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) ui::DeviceDataManager::GetInstance()->RemoveObserver(this); #elif defined(OS_ANDROID) ui::InputDeviceObserverAndroid::GetInstance()->RemoveObserver(this); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_pepper_pepper__file__io__host.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_pepper_pepper__file__io__host.cc index 6b13a3848c6f..dc982fe6c9e0 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_pepper_pepper__file__io__host.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_pepper_pepper__file__io__host.cc @@ -1,20 +1,20 @@ ---- src/3rdparty/chromium/content/browser/renderer_host/pepper/pepper_file_io_host.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/content/browser/renderer_host/pepper/pepper_file_io_host.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/browser/renderer_host/pepper/pepper_file_io_host.cc -@@ -432,7 +432,7 @@ void PepperFileIOHost::OnLocalFileOpened( +@@ -438,7 +438,7 @@ void PepperFileIOHost::OnLocalFileOpened( ppapi::host::ReplyMessageContext reply_context, const base::FilePath& path, base::File::Error error_code) { --#if defined(OS_WIN) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // Quarantining a file before its contents are available is only supported on // Windows and Linux. if (!FileOpenForWrite(open_flags_) || error_code != base::File::FILE_OK) { -@@ -452,7 +452,7 @@ void PepperFileIOHost::OnLocalFileOpened( +@@ -459,7 +459,7 @@ void PepperFileIOHost::OnLocalFileOpened( #endif } --#if defined(OS_WIN) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) void PepperFileIOHost::OnLocalFileQuarantined( ppapi::host::ReplyMessageContext reply_context, const base::FilePath& path, diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__message__filter.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__message__filter.cc index e26881bc62f1..cb06875c7f46 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__message__filter.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__message__filter.cc @@ -1,29 +1,29 @@ ---- src/3rdparty/chromium/content/browser/renderer_host/render_message_filter.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/content/browser/renderer_host/render_message_filter.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/browser/renderer_host/render_message_filter.cc -@@ -73,7 +73,7 @@ - #if defined(OS_MACOSX) +@@ -70,7 +70,7 @@ + #if defined(OS_MAC) #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" #endif --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "base/linux_util.h" #include "base/threading/platform_thread.h" #endif -@@ -165,7 +165,7 @@ void RenderMessageFilter::CreateFullscreenWidget( - std::move(callback).Run(route_id); +@@ -117,7 +117,7 @@ void RenderMessageFilter::GenerateRoutingID( + std::move(callback).Run(render_widget_helper_->GetNextRoutingID()); } --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) void RenderMessageFilter::SetThreadPriorityOnFileThread( base::PlatformThreadId ns_tid, base::ThreadPriority priority) { -@@ -186,7 +186,7 @@ void RenderMessageFilter::SetThreadPriorityOnFileThrea +@@ -138,7 +138,7 @@ void RenderMessageFilter::SetThreadPriorityOnFileThrea } #endif --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) void RenderMessageFilter::SetThreadPriority(int32_t ns_tid, base::ThreadPriority priority) { constexpr base::TaskTraits kTraits = { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__message__filter.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__message__filter.h index ed96990da419..f9da823099a0 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__message__filter.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__message__filter.h @@ -1,19 +1,19 @@ ---- src/3rdparty/chromium/content/browser/renderer_host/render_message_filter.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/content/browser/renderer_host/render_message_filter.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/browser/renderer_host/render_message_filter.h -@@ -110,14 +110,14 @@ class CONTENT_EXPORT RenderMessageFilter - const url::Origin& cache_storage_origin, - const std::string& cache_storage_cache_name) override; +@@ -79,14 +79,14 @@ class CONTENT_EXPORT RenderMessageFilter + // mojom::RenderMessageFilter: + void GenerateRoutingID(GenerateRoutingIDCallback routing_id) override; void HasGpuProcess(HasGpuProcessCallback callback) override; --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) void SetThreadPriority(int32_t ns_tid, base::ThreadPriority priority) override; #endif void OnResolveProxy(const GURL& url, IPC::Message* reply_msg); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) void SetThreadPriorityOnFileThread(base::PlatformThreadId ns_tid, base::ThreadPriority priority); #endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__process__host__impl.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__process__host__impl.cc index 4bb971655ad5..2a88644d74c1 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__process__host__impl.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__process__host__impl.cc @@ -1,47 +1,56 @@ ---- src/3rdparty/chromium/content/browser/renderer_host/render_process_host_impl.cc.orig 2020-03-16 14:04:24 UTC +--- src/3rdparty/chromium/content/browser/renderer_host/render_process_host_impl.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/browser/renderer_host/render_process_host_impl.cc -@@ -236,7 +236,7 @@ - #include "content/browser/gpu/gpu_data_manager_impl.h" +@@ -234,7 +234,7 @@ + #include "third_party/blink/public/mojom/android_font_lookup/android_font_lookup.mojom.h" #endif --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include #include -@@ -1165,7 +1165,7 @@ static constexpr size_t kUnknownPlatformProcessLimit = +@@ -1232,7 +1232,7 @@ size_t GetPlatformProcessLimit() { // to indicate failure and std::numeric_limits::max() to indicate // unlimited. size_t GetPlatformProcessLimit() { --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) struct rlimit limit; if (getrlimit(RLIMIT_NPROC, &limit) != 0) return kUnknownPlatformProcessLimit; -@@ -1176,7 +1176,7 @@ size_t GetPlatformProcessLimit() { +@@ -1243,7 +1243,7 @@ size_t GetPlatformProcessLimit() { #else // TODO(https://crbug.com/104689): Implement on other platforms. return kUnknownPlatformProcessLimit; --#endif // defined(OS_LINUX) -+#endif // defined(OS_LINUX) || defined(OS_BSD) +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) } #endif // !defined(OS_ANDROID) && !defined(OS_CHROMEOS) -@@ -1218,7 +1218,7 @@ void RenderProcessHostImpl::IOThreadHostImpl::BindHost +@@ -1325,7 +1325,7 @@ void RenderProcessHostImpl::IOThreadHostImpl::BindHost return; } --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) if (auto font_receiver = receiver.As()) { ConnectToFontService(std::move(font_receiver)); return; -@@ -1588,7 +1588,7 @@ bool RenderProcessHostImpl::Init() { +@@ -1751,7 +1751,7 @@ bool RenderProcessHostImpl::Init() { renderer_prefix = browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) int flags = renderer_prefix.empty() ? ChildProcessHost::CHILD_ALLOW_SELF : ChildProcessHost::CHILD_NORMAL; - #elif defined(OS_MACOSX) + #elif defined(OS_MAC) +@@ -3323,7 +3323,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin + #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !BUILDFLAG(IS_LACROS) + switches::kDisableDevShmUsage, + #endif +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID) ++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)) || defined(OS_BSD) + switches::kEnableAcceleratedVideoDecode, + #endif + #if defined(OS_MAC) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__process__host__impl.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__process__host__impl.h deleted file mode 100644 index 9a11ad8fb389..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__process__host__impl.h +++ /dev/null @@ -1,15 +0,0 @@ ---- src/3rdparty/chromium/content/browser/renderer_host/render_process_host_impl.h.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/content/browser/renderer_host/render_process_host_impl.h -@@ -348,10 +348,10 @@ class CONTENT_EXPORT RenderProcessHostImpl - is_for_guests_only_ = is_for_guests_only; - } - --#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) -+#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD) - // Launch the zygote early in the browser startup. - static void EarlyZygoteLaunch(); --#endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) -+#endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD) - - void RecomputeAndUpdateWebKitPreferences(); - diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__view__host__impl.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__view__host__impl.cc index cfdb8ac96242..c894a87f3090 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__view__host__impl.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__view__host__impl.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/content/browser/renderer_host/render_view_host_impl.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/content/browser/renderer_host/render_view_host_impl.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/browser/renderer_host/render_view_host_impl.cc -@@ -151,7 +151,7 @@ void GetPlatformSpecificPrefs(RendererPreferences* pre +@@ -278,7 +278,7 @@ void RenderViewHostImpl::GetPlatformSpecificPrefs( display::win::ScreenWin::GetSystemMetricsInDIP(SM_CYVSCROLL); prefs->arrow_bitmap_width_horizontal_scroll_bar_in_dips = display::win::ScreenWin::GetSystemMetricsInDIP(SM_CXHSCROLL); --#elif defined(OS_LINUX) -+#elif defined(OS_LINUX) || defined(OS_BSD) +-#elif defined(OS_LINUX) || defined(OS_CHROMEOS) ++#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) prefs->system_font_family_name = gfx::Font().GetFontName(); - #endif - } + #elif defined(OS_FUCHSIA) + // Make Blink's "focus ring" invisible. The focus ring is a hairline border diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__aura.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__aura.cc index c678141dcccb..6435eed7c8dd 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__aura.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__aura.cc @@ -1,24 +1,38 @@ ---- src/3rdparty/chromium/content/browser/renderer_host/render_widget_host_view_aura.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/content/browser/renderer_host/render_widget_host_view_aura.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -119,7 +119,7 @@ +@@ -111,11 +111,11 @@ + #include "ui/gfx/gdi_util.h" + #endif + +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) #include "content/browser/accessibility/browser_accessibility_auralinux.h" #endif -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) -+#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) ++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) #include "ui/base/ime/linux/text_edit_command_auralinux.h" #include "ui/base/ime/linux/text_edit_key_bindings_delegate_auralinux.h" #endif -@@ -2077,7 +2077,7 @@ bool RenderWidgetHostViewAura::NeedsInputGrab() { +@@ -492,7 +492,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewAura::Ge + if (manager) + return ToBrowserAccessibilityWin(manager->GetRoot())->GetCOM(); + +-#elif defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) + BrowserAccessibilityManager* manager = + host()->GetOrCreateRootBrowserAccessibilityManager(); + if (manager && manager->GetRoot()) +@@ -2224,7 +2224,7 @@ bool RenderWidgetHostViewAura::NeedsMouseCapture() { } bool RenderWidgetHostViewAura::NeedsMouseCapture() { -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) return NeedsInputGrab(); - #endif + #else return false; -@@ -2277,7 +2277,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit +@@ -2388,7 +2388,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit if (!target_host) return; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__event__handler.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__event__handler.cc index ee7bceefecfb..f4e3be677cf4 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__event__handler.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__event__handler.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/content/browser/renderer_host/render_widget_host_view_event_handler.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/content/browser/renderer_host/render_widget_host_view_event_handler.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/browser/renderer_host/render_widget_host_view_event_handler.cc -@@ -619,7 +619,7 @@ bool RenderWidgetHostViewEventHandler::CanRendererHand +@@ -716,7 +716,7 @@ bool RenderWidgetHostViewEventHandler::CanRendererHand if (event->type() == ui::ET_MOUSE_EXITED) { if (mouse_locked || selection_popup) return false; --#if defined(OS_WIN) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // Don't forward the mouse leave message which is received when the context // menu is displayed by the page. This confuses the page and causes state // changes. diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_jank__monitor.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_jank__monitor__impl.cc similarity index 77% rename from www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_jank__monitor.cc rename to www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_jank__monitor__impl.cc index 60eb18543e75..8966735056af 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_jank__monitor.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_jank__monitor__impl.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/browser/scheduler/responsiveness/jank_monitor.cc.orig 2019-11-27 21:12:25 UTC -+++ src/3rdparty/chromium/content/browser/scheduler/responsiveness/jank_monitor.cc -@@ -298,7 +298,7 @@ void JankMonitor::ThreadExecutionState::DidRunTaskOrEv +--- src/3rdparty/chromium/content/browser/scheduler/responsiveness/jank_monitor_impl.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/content/browser/scheduler/responsiveness/jank_monitor_impl.cc +@@ -332,7 +332,7 @@ void JankMonitorImpl::ThreadExecutionState::DidRunTask // in context menus, among others). Simply ignore the mismatches for now. // See https://crbug.com/929813 for the details of why the mismatch // happens. diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_native__event__observer.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_native__event__observer.cc index 578cfdec2c4e..175b00bda991 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_native__event__observer.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_native__event__observer.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/content/browser/scheduler/responsiveness/native_event_observer.cc.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/content/browser/scheduler/responsiveness/native_event_observer.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/browser/scheduler/responsiveness/native_event_observer.cc @@ -15,7 +15,7 @@ #include "ui/events/platform/platform_event_source.h" --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "ui/aura/env.h" #include "ui/events/event.h" #endif @@ -13,8 +13,8 @@ DeregisterObserver(); } --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) void NativeEventObserver::RegisterObserver() { aura::Env::GetInstance()->AddWindowEventDispatcherObserver(this); } @@ -22,8 +22,8 @@ did_run_event_callback_.Run(info.unique_id); events_being_processed_.pop_back(); } --#endif // defined(OS_LINUX) -+#endif // defined(OS_LINUX) || defined(OS_BSD) +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #if defined(OS_WIN) void NativeEventObserver::RegisterObserver() { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_native__event__observer.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_native__event__observer.h index fd00071c4d7f..279d409f0de7 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_native__event__observer.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_native__event__observer.h @@ -1,20 +1,20 @@ ---- src/3rdparty/chromium/content/browser/scheduler/responsiveness/native_event_observer.h.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/content/browser/scheduler/responsiveness/native_event_observer.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/browser/scheduler/responsiveness/native_event_observer.h @@ -14,7 +14,7 @@ #include "content/public/browser/native_event_processor_observer_mac.h" #endif --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "ui/aura/window_event_dispatcher_observer.h" #endif -@@ -39,7 +39,7 @@ namespace responsiveness { +@@ -39,7 +39,7 @@ class CONTENT_EXPORT NativeEventObserver class CONTENT_EXPORT NativeEventObserver - #if defined(OS_MACOSX) + #if defined(OS_MAC) : public NativeEventProcessorObserver --#elif defined(OS_LINUX) -+#elif defined(OS_LINUX) || defined(OS_BSD) +-#elif defined(OS_LINUX) || defined(OS_CHROMEOS) ++#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) : public aura::WindowEventDispatcherObserver #elif defined(OS_WIN) : public base::MessagePumpForUI::Observer @@ -22,8 +22,8 @@ NativeEventObserver(WillRunEventCallback will_run_event_callback, DidRunEventCallback did_run_event_callback); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) ~NativeEventObserver() override; #else virtual ~NativeEventObserver(); @@ -31,8 +31,8 @@ // Exposed for tests. void WillRunNativeEvent(const void* opaque_identifier) override; void DidRunNativeEvent(const void* opaque_identifier) override; --#elif defined(OS_LINUX) -+#elif defined(OS_LINUX) || defined(OS_BSD) +-#elif defined(OS_LINUX) || defined(OS_CHROMEOS) ++#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // aura::WindowEventDispatcherObserver overrides: void OnWindowEventDispatcherStartedProcessing( aura::WindowEventDispatcher* dispatcher, @@ -40,8 +40,8 @@ void RegisterObserver(); void DeregisterObserver(); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) struct EventInfo { const void* unique_id; }; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_watcher.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_watcher.cc deleted file mode 100644 index e22ca804e81f..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_watcher.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- src/3rdparty/chromium/content/browser/scheduler/responsiveness/watcher.cc.orig 2019-11-27 21:12:25 UTC -+++ src/3rdparty/chromium/content/browser/scheduler/responsiveness/watcher.cc -@@ -96,7 +96,7 @@ void Watcher::DidRunTask(const base::PendingTask* task - // in context menus, among others). Simply ignore the mismatches for now. - // See https://crbug.com/929813 for the details of why the mismatch - // happens. --#if !defined(OS_CHROMEOS) && defined(OS_LINUX) && defined(USE_OZONE) -+#if !defined(OS_CHROMEOS) && (defined(OS_LINUX) || defined(OS_BSD)) && defined(USE_OZONE) - return currently_running_metadata_ui_.clear(); - #endif - DCHECK_LE(*mismatched_task_identifiers, 1); -@@ -156,7 +156,7 @@ void Watcher::DidRunEventOnUIThread(const void* opaque - mismatched_event_identifiers_ui_ += 1; - // See comment in DidRunTask() for why |currently_running_metadata_ui_| may - // be reset. --#if !defined(OS_CHROMEOS) && defined(OS_LINUX) && defined(USE_OZONE) -+#if !defined(OS_CHROMEOS) && (defined(OS_LINUX) || defined(OS_BSD)) && defined(USE_OZONE) - return currently_running_metadata_ui_.clear(); - #endif - DCHECK_LE(mismatched_event_identifiers_ui_, 1); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_utility__process__host.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_utility__process__host.cc index 1ff7abe0b599..e3a8e61dba2a 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_utility__process__host.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_utility__process__host.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/content/browser/utility_process_host.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/content/browser/utility_process_host.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/browser/utility_process_host.cc -@@ -247,7 +247,7 @@ UtilityProcessHost::UtilityProcessHost() +@@ -59,7 +59,7 @@ UtilityProcessHost::UtilityProcessHost(std::unique_ptr UtilityProcessHost::UtilityProcessHost(std::unique_ptr client) - : sandbox_type_(service_manager::SandboxType::kUtility), --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) + : sandbox_type_(sandbox::policy::SandboxType::kUtility), +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) child_flags_(ChildProcessHost::CHILD_ALLOW_SELF), #else child_flags_(ChildProcessHost::CHILD_NORMAL), diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_utility__process__host__receiver__bindings.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_utility__process__host__receiver__bindings.cc index 3c600bd92a52..8905dcb4cd74 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_utility__process__host__receiver__bindings.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_utility__process__host__receiver__bindings.cc @@ -1,20 +1,20 @@ ---- src/3rdparty/chromium/content/browser/utility_process_host_receiver_bindings.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/content/browser/utility_process_host_receiver_bindings.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/browser/utility_process_host_receiver_bindings.cc -@@ -8,7 +8,7 @@ +@@ -10,7 +10,7 @@ + #include "content/public/browser/content_browser_client.h" + #include "content/public/common/content_client.h" - #include "build/build_config.h" - --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "components/services/font/public/mojom/font_service.mojom.h" // nogncheck #include "content/browser/font_service.h" // nogncheck #endif -@@ -17,7 +17,7 @@ namespace content { +@@ -19,7 +19,7 @@ void UtilityProcessHost::BindHostReceiver( void UtilityProcessHost::BindHostReceiver( mojo::GenericPendingReceiver receiver) { --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) if (auto font_receiver = receiver.As()) { ConnectToFontService(std::move(font_receiver)); return; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_v8__snapshot__files.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_v8__snapshot__files.cc index 654e1887c973..64cdfdf1d236 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_v8__snapshot__files.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_v8__snapshot__files.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/content/browser/v8_snapshot_files.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/content/browser/v8_snapshot_files.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/browser/v8_snapshot_files.cc -@@ -10,7 +10,7 @@ +@@ -10,7 +10,7 @@ std::map GetV8SnapshotFil namespace content { std::map GetV8SnapshotFilesToPreload() { --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #if defined(USE_V8_CONTEXT_SNAPSHOT) return {{kV8ContextSnapshotDataDescriptor, - base::FilePath(FILE_PATH_LITERAL("v8_context_snapshot.bin"))}}; + base::FilePath(FILE_PATH_LITERAL(V8_CONTEXT_SNAPSHOT_FILENAME))}}; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_web__contents_web__contents__view__aura.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_web__contents_web__contents__view__aura.cc new file mode 100644 index 000000000000..349d61e5c203 --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_web__contents_web__contents__view__aura.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/content/browser/web_contents/web_contents_view_aura.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/content/browser/web_contents/web_contents_view_aura.cc +@@ -1211,7 +1211,7 @@ void WebContentsViewAura::OnMouseEvent(ui::MouseEvent* + // Linux window managers like to handle raise-on-click themselves. If we + // raise-on-click manually, this may override user settings that prevent + // focus-stealing. +-#if !defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#if !defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_BSD) + // It is possible for the web-contents to be destroyed while it is being + // activated. Use a weak-ptr to track whether that happened or not. + // More in https://crbug.com/1040725 diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_webui_shared__resources__data__source.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_webui_shared__resources__data__source.cc index aaef1622e203..35a8075cf046 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_webui_shared__resources__data__source.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_webui_shared__resources__data__source.cc @@ -1,17 +1,18 @@ ---- src/3rdparty/chromium/content/browser/webui/shared_resources_data_source.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/content/browser/webui/shared_resources_data_source.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/browser/webui/shared_resources_data_source.cc -@@ -131,12 +131,12 @@ const std::map CreateMojoResourceIdT +@@ -120,13 +120,13 @@ const std::map CreateMojoResourceIdT "mojo/mojo/public/mojom/base/text_direction.mojom.html"}, {IDR_MOJO_TEXT_DIRECTION_MOJOM_LITE_JS, "mojo/mojo/public/mojom/base/text_direction.mojom-lite.js"}, --#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || \ ++#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || defined(OS_BSD) || \ + defined(OS_CHROMEOS) || defined(OS_ANDROID) {IDR_MOJO_TIME_MOJOM_HTML, "mojo/mojo/public/mojom/base/time.mojom.html"}, {IDR_MOJO_TIME_MOJOM_LITE_JS, "mojo/mojo/public/mojom/base/time.mojom-lite.js"}, --#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) -+#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) +-#endif // defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || ++#endif // defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || defined(OS_BSD) || + // defined(OS_CHROMEOS) || defined(OS_ANDROID) }; } - diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_host_zygote__host__impl__linux.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_zygote__host_zygote__host__impl__linux.cc similarity index 57% rename from www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_host_zygote__host__impl__linux.cc rename to www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_zygote__host_zygote__host__impl__linux.cc index 07e46cdc1c91..54cd42a7d7b7 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_host_zygote__host__impl__linux.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_zygote__host_zygote__host__impl__linux.cc @@ -1,35 +1,35 @@ ---- src/3rdparty/chromium/services/service_manager/zygote/host/zygote_host_impl_linux.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/services/service_manager/zygote/host/zygote_host_impl_linux.cc -@@ -72,6 +72,7 @@ ZygoteHostImpl* ZygoteHostImpl::GetInstance() { +--- src/3rdparty/chromium/content/browser/zygote_host/zygote_host_impl_linux.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/content/browser/zygote_host/zygote_host_impl_linux.cc +@@ -73,6 +73,7 @@ void ZygoteHostImpl::Init(const base::CommandLine& com } void ZygoteHostImpl::Init(const base::CommandLine& command_line) { +#if !defined(OS_BSD) - if (command_line.HasSwitch(service_manager::switches::kNoSandbox)) { + if (command_line.HasSwitch(sandbox::policy::switches::kNoSandbox)) { return; } -@@ -122,6 +123,7 @@ void ZygoteHostImpl::Init(const base::CommandLine& com +@@ -123,6 +124,7 @@ void ZygoteHostImpl::Init(const base::CommandLine& com "you can try using --" - << service_manager::switches::kNoSandbox << "."; + << sandbox::policy::switches::kNoSandbox << "."; } +#endif } void ZygoteHostImpl::AddZygotePid(pid_t pid) { -@@ -146,6 +148,7 @@ pid_t ZygoteHostImpl::LaunchZygote( +@@ -147,6 +149,9 @@ pid_t ZygoteHostImpl::LaunchZygote( base::CommandLine* cmd_line, base::ScopedFD* control_fd, base::FileHandleMappingVector additional_remapped_fds) { -+#if !defined(OS_BSD) ++#if defined(OS_BSD) ++ NOTIMPLEMENTED(); ++#else int fds[2]; CHECK_EQ(0, socketpair(AF_UNIX, SOCK_SEQPACKET, 0, fds)); CHECK(base::UnixDomainSocket::EnableReceiveProcessId(fds[0])); -@@ -210,9 +213,12 @@ pid_t ZygoteHostImpl::LaunchZygote( +@@ -214,9 +219,10 @@ pid_t ZygoteHostImpl::LaunchZygote( AddZygotePid(pid); return pid; -+#else -+ return 0; +#endif } diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_host_zygote__host__impl__linux.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_zygote__host_zygote__host__impl__linux.h similarity index 55% rename from www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_host_zygote__host__impl__linux.h rename to www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_zygote__host_zygote__host__impl__linux.h index e3a233def28b..e30c9659dd18 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_host_zygote__host__impl__linux.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_zygote__host_zygote__host__impl__linux.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/services/service_manager/zygote/host/zygote_host_impl_linux.h.orig 2019-05-23 12:39:34 UTC -+++ src/3rdparty/chromium/services/service_manager/zygote/host/zygote_host_impl_linux.h -@@ -44,8 +44,10 @@ class COMPONENT_EXPORT(SERVICE_MANAGER_ZYGOTE) ZygoteH +--- src/3rdparty/chromium/content/browser/zygote_host/zygote_host_impl_linux.h.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/content/browser/zygote_host/zygote_host_impl_linux.h +@@ -42,8 +42,10 @@ class CONTENT_EXPORT ZygoteHostImpl : public ZygoteHos base::ScopedFD* control_fd, base::FileHandleMappingVector additional_remapped_fds); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_child_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_child_BUILD.gn deleted file mode 100644 index c60bf9cbf4a0..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_child_BUILD.gn +++ /dev/null @@ -1,16 +0,0 @@ ---- src/3rdparty/chromium/content/child/BUILD.gn.orig 2020-11-07 01:22:36 UTC -+++ src/3rdparty/chromium/content/child/BUILD.gn -@@ -147,8 +147,12 @@ target(link_target_type, "child") { - deps += [ - "//components/services/font/public/cpp", - "//components/services/font/public/mojom", -- "//services/service_manager/zygote", - ] -+ if (!is_bsd) { -+ deps += [ -+ "//services/service_manager/zygote", -+ ] -+ } - } - - if (is_win) { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_child_child__process.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_child_child__process.cc new file mode 100644 index 000000000000..3a6b4eed3aab --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_child_child__process.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/content/child/child_process.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/content/child/child_process.cc +@@ -50,7 +50,7 @@ ChildProcess::ChildProcess(base::ThreadPriority io_thr + DCHECK(!g_lazy_child_process_tls.Pointer()->Get()); + g_lazy_child_process_tls.Pointer()->Set(this); + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + const base::CommandLine& command_line = + *base::CommandLine::ForCurrentProcess(); + if (IsMojoCoreSharedLibraryEnabled()) { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_BUILD.gn index 1b50454bb41d..c3ce17b7e5e5 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_BUILD.gn +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/common/BUILD.gn.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/content/common/BUILD.gn.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/common/BUILD.gn -@@ -414,6 +414,12 @@ source_set("common") { +@@ -329,6 +329,15 @@ static_library("common") { libs += [ "android" ] } @@ -8,8 +8,20 @@ + sources -= [ + "sandbox_init_linux.cc", + ] ++ deps += [ ++ "//third_party/fontconfig", ++ ] + } + if (is_debug && !is_component_build && enable_plugins) { # Content depends on the PPAPI message logging stuff; if this isn't here, # some unit test binaries won't compile. This only worked in release mode +@@ -355,7 +364,7 @@ static_library("common") { + sources -= [ "cursors/webcursor_aura.cc" ] + } + +- if (is_linux || is_chromeos) { ++ if ((is_linux || is_chromeos) && !is_bsd) { + sources += [ + "zygote/sandbox_support_linux.cc", + "zygote/send_zygote_child_ping_linux.cc", diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_mojo__core__library__support.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_mojo__core__library__support.cc new file mode 100644 index 000000000000..39d492af3363 --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_mojo__core__library__support.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/content/common/mojo_core_library_support.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/content/common/mojo_core_library_support.cc +@@ -15,7 +15,7 @@ base::Optional GetMojoCoreSharedLibrar + } + + base::Optional GetMojoCoreSharedLibraryPath() { +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + const base::CommandLine& command_line = + *base::CommandLine::ForCurrentProcess(); + if (!command_line.HasSwitch(switches::kMojoCoreLibraryPath)) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_user__agent.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_user__agent.cc index 5912a4fc19da..b351e08afd79 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_user__agent.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_user__agent.cc @@ -1,8 +1,8 @@ ---- src/3rdparty/chromium/content/common/user_agent.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/content/common/user_agent.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/common/user_agent.cc -@@ -125,6 +125,14 @@ std::string BuildOSCpuInfo() { +@@ -214,6 +214,14 @@ std::string BuildOSCpuInfoFromOSVersionAndCpuType(cons + ); #endif - ); // NOLINT +#if defined(OS_BSD) +#if defined(__x86_64__) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_gpu_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_gpu_BUILD.gn deleted file mode 100644 index 2281d7279d42..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_gpu_BUILD.gn +++ /dev/null @@ -1,20 +0,0 @@ ---- src/3rdparty/chromium/content/gpu/BUILD.gn.orig 2020-11-07 01:22:36 UTC -+++ src/3rdparty/chromium/content/gpu/BUILD.gn -@@ -96,7 +96,7 @@ target(link_target_type, "gpu_sources") { - ] - } - -- if (is_linux) { -+ if (is_linux && !is_bsd) { - deps += [ "//services/service_manager/zygote" ] - } - -@@ -130,7 +130,7 @@ target(link_target_type, "gpu_sources") { - - # Use DRI on desktop Linux builds. - if (current_cpu != "s390x" && current_cpu != "ppc64" && is_desktop_linux && -- (!is_chromecast || is_cast_desktop_build) && !use_qt) { -+ (!is_chromecast || is_cast_desktop_build) && !use_qt && !is_bsd) { - configs += [ "//build/config/linux/dri" ] - } - } diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__main.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__main.cc index e033dd27625d..dde8e79eca09 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__main.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__main.cc @@ -1,56 +1,20 @@ ---- src/3rdparty/chromium/content/gpu/gpu_main.cc.orig 2020-03-16 14:04:24 UTC +--- src/3rdparty/chromium/content/gpu/gpu_main.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/gpu/gpu_main.cc -@@ -85,7 +85,7 @@ - #include "ui/gfx/x/x11_switches.h" // nogncheck +@@ -86,7 +86,7 @@ + #include "ui/gfx/x/x11_types.h" // nogncheck #endif --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "content/gpu/gpu_sandbox_hook_linux.h" #include "content/public/common/sandbox_init.h" - #include "services/service_manager/sandbox/linux/sandbox_linux.h" -@@ -106,7 +106,7 @@ namespace content { - - namespace { - --#if defined(OS_LINUX) -+#if defined(OS_LINUX) && !defined(OS_BSD) - bool StartSandboxLinux(gpu::GpuWatchdogThread*, - const gpu::GPUInfo*, - const gpu::GpuPreferences&); -@@ -167,7 +167,7 @@ class ContentSandboxHelper : public gpu::GpuSandboxHel - bool EnsureSandboxInitialized(gpu::GpuWatchdogThread* watchdog_thread, - const gpu::GPUInfo* gpu_info, - const gpu::GpuPreferences& gpu_prefs) override { --#if defined(OS_LINUX) -+#if defined(OS_LINUX) && !defined(OS_BSD) - return StartSandboxLinux(watchdog_thread, gpu_info, gpu_prefs); - #elif defined(OS_WIN) - return StartSandboxWindows(sandbox_info_); -@@ -273,7 +273,7 @@ int GpuMain(const MainFunctionParams& parameters) { - main_thread_task_executor = - std::make_unique( - gpu_preferences.message_pump_type); --#elif defined(OS_LINUX) -+#elif defined(OS_LINUX) || defined(OS_BSD) + #include "sandbox/policy/linux/sandbox_linux.h" +@@ -274,7 +274,7 @@ int GpuMain(const MainFunctionParams& parameters) { + gpu_preferences.message_pump_type); + } + #endif +-#elif defined(OS_LINUX) || defined(OS_CHROMEOS) ++#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #error "Unsupported Linux platform." - #elif defined(OS_MACOSX) + #elif defined(OS_MAC) // Cross-process CoreAnimation requires a CFRunLoop to function at all, and -@@ -379,7 +379,7 @@ int GpuMain(const MainFunctionParams& parameters) { - - namespace { - --#if defined(OS_LINUX) -+#if defined(OS_LINUX) && !defined(OS_BSD) - bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdog_thread, - const gpu::GPUInfo* gpu_info, - const gpu::GpuPreferences& gpu_prefs) { -@@ -414,7 +414,7 @@ bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdo - - return res; - } --#endif // defined(OS_LINUX) -+#endif // defined(OS_LINUX) && !defined(OS_BSD) - - #if defined(OS_WIN) - bool StartSandboxWindows(const sandbox::SandboxInterfaceInfo* sandbox_info) { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__sandbox__hook__linux.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__sandbox__hook__linux.cc index 924727ed53ae..7b6a4d0fa07d 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__sandbox__hook__linux.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__sandbox__hook__linux.cc @@ -1,18 +1,15 @@ ---- src/3rdparty/chromium/content/gpu/gpu_sandbox_hook_linux.cc.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/content/gpu/gpu_sandbox_hook_linux.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/gpu/gpu_sandbox_hook_linux.cc -@@ -95,8 +95,9 @@ static const char kLibV4lEncPluginPath[] = - "/usr/lib/libv4l/plugins/libv4l-encplugin.so"; - #endif +@@ -100,6 +100,7 @@ constexpr int dlopen_flag = RTLD_NOW | RTLD_GLOBAL | R --constexpr int dlopen_flag = RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE; -+constexpr int dlopen_flag = RTLD_NOW | RTLD_GLOBAL; + constexpr int dlopen_flag = RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE; +#if !defined(OS_BSD) - void AddV4L2GpuWhitelist( + void AddV4L2GpuPermissions( std::vector* permissions, - const service_manager::SandboxSeccompBPF::Options& options) { -@@ -277,8 +278,10 @@ std::vector FilePermissionsForGp - AddStandardGpuWhiteList(&permissions); + const sandbox::policy::SandboxSeccompBPF::Options& options) { +@@ -359,8 +360,10 @@ std::vector FilePermissionsForGp + AddStandardGpuPermissions(&permissions); return permissions; } +#endif @@ -20,9 +17,9 @@ void LoadArmGpuLibraries() { +#if !defined(OS_BSD) // Preload the Mali library. - if (UseChromecastSandboxWhitelist()) { - for (const char* path : kWhitelistedChromecastPaths) { -@@ -293,6 +296,7 @@ void LoadArmGpuLibraries() { + if (UseChromecastSandboxAllowlist()) { + for (const char* path : kAllowedChromecastPaths) { +@@ -375,6 +378,7 @@ void LoadArmGpuLibraries() { // Preload the Tegra V4L2 (video decode acceleration) library. dlopen(kLibTegraPath, dlopen_flag); } @@ -30,26 +27,28 @@ } bool LoadAmdGpuLibraries() { -@@ -348,6 +352,7 @@ bool LoadLibrariesForGpu( - return true; +@@ -414,12 +418,14 @@ void LoadChromecastV4L2Libraries() { } + void LoadChromecastV4L2Libraries() { +#if !defined(OS_BSD) - sandbox::syscall_broker::BrokerCommandSet CommandSetForGPU( - const service_manager::SandboxLinux::Options& options) { - sandbox::syscall_broker::BrokerCommandSet command_set; -@@ -368,13 +373,17 @@ bool BrokerProcessPreSandboxHook( - service_manager::SetProcessTitleFromCommandLine(nullptr); - return true; - } + for (const char* path : kAllowedChromecastPaths) { + const std::string library_path(std::string(path) + + std::string("libvpcodec.so")); + if (dlopen(library_path.c_str(), dlopen_flag)) + break; + } +#endif + } + bool LoadLibrariesForGpu( +@@ -466,9 +472,12 @@ bool GpuProcessPreSandboxHook(sandbox::policy::Sandbox } // namespace - bool GpuProcessPreSandboxHook(service_manager::SandboxLinux::Options options) { + bool GpuProcessPreSandboxHook(sandbox::policy::SandboxLinux::Options options) { + NOTIMPLEMENTED(); +#if !defined(OS_BSD) - service_manager::SandboxLinux::GetInstance()->StartBrokerProcess( + sandbox::policy::SandboxLinux::GetInstance()->StartBrokerProcess( CommandSetForGPU(options), FilePermissionsForGpu(options), base::BindOnce(BrokerProcessPreSandboxHook), options); +#endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.cc index aaf54946fa06..a6b9c767e270 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.cc @@ -1,29 +1,29 @@ ---- src/3rdparty/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.cc.orig 2020-04-08 09:41:36 UTC +--- src/3rdparty/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.cc @@ -19,7 +19,7 @@ - #if defined(OS_MACOSX) + #if defined(OS_MAC) #include "content/child/child_process_sandbox_support_impl_mac.h" --#elif defined(OS_LINUX) -+#elif defined(OS_LINUX) || defined(OS_BSD) +-#elif defined(OS_LINUX) || defined(OS_CHROMEOS) ++#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "content/child/child_process_sandbox_support_impl_linux.h" #include "mojo/public/cpp/bindings/pending_remote.h" #endif -@@ -34,7 +34,7 @@ typedef struct CGFont* CGFontRef; +@@ -34,7 +34,7 @@ PpapiBlinkPlatformImpl::PpapiBlinkPlatformImpl() { namespace content { PpapiBlinkPlatformImpl::PpapiBlinkPlatformImpl() { --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) mojo::PendingRemote font_service; ChildThread::Get()->BindHostReceiver( font_service.InitWithNewPipeAndPassReceiver()); -@@ -52,7 +52,7 @@ PpapiBlinkPlatformImpl::~PpapiBlinkPlatformImpl() { +@@ -52,7 +52,7 @@ blink::WebSandboxSupport* PpapiBlinkPlatformImpl::GetS void PpapiBlinkPlatformImpl::Shutdown() {} blink::WebSandboxSupport* PpapiBlinkPlatformImpl::GetSandboxSupport() { --#if defined(OS_LINUX) || defined(OS_MACOSX) -+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || defined(OS_BSD) return sandbox_support_.get(); #else return nullptr; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.h index e3fb3ef01fe3..fafa5543c725 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.h @@ -1,25 +1,25 @@ ---- src/3rdparty/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.h.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.h @@ -13,7 +13,7 @@ #include "build/build_config.h" #include "content/child/blink_platform_impl.h" --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "components/services/font/public/cpp/font_loader.h" #include "third_party/skia/include/core/SkRefCnt.h" #endif -@@ -42,11 +42,11 @@ class PpapiBlinkPlatformImpl : public BlinkPlatformImp - bool sync_dir) override; +@@ -36,11 +36,11 @@ class PpapiBlinkPlatformImpl : public BlinkPlatformImp + blink::WebThemeEngine* ThemeEngine() override; private: --#if defined(OS_LINUX) || defined(OS_MACOSX) -+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || defined(OS_BSD) std::unique_ptr sandbox_support_; #endif --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) sk_sp font_loader_; #endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_app_content__main__delegate.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_app_content__main__delegate.cc index 3c159529cf40..affdf641a0d7 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_app_content__main__delegate.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_app_content__main__delegate.cc @@ -1,18 +1,17 @@ ---- src/3rdparty/chromium/content/public/app/content_main_delegate.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/content/public/app/content_main_delegate.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/public/app/content_main_delegate.cc -@@ -27,13 +27,13 @@ int ContentMainDelegate::RunProcess( +@@ -24,12 +24,12 @@ int ContentMainDelegate::RunProcess( return -1; } --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) void ContentMainDelegate::ZygoteStarting( - std::vector>* - delegates) {} + std::vector>* delegates) {} --#endif // defined(OS_LINUX) -+#endif // defined(OS_LINUX) || defined(OS_BSD) +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) int ContentMainDelegate::TerminateForFatalInitializationError() { CHECK(false); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_app_content__main__delegate.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_app_content__main__delegate.h index d8a24d56661b..220911f301fc 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_app_content__main__delegate.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_app_content__main__delegate.h @@ -1,20 +1,20 @@ ---- src/3rdparty/chromium/content/public/app/content_main_delegate.h.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/content/public/app/content_main_delegate.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/public/app/content_main_delegate.h -@@ -60,7 +60,7 @@ class CONTENT_EXPORT ContentMainDelegate { +@@ -49,7 +49,7 @@ class CONTENT_EXPORT ContentMainDelegate { // Called right before the process exits. virtual void ProcessExiting(const std::string& process_type) {} --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // Tells the embedder that the zygote process is starting, and allows it to // specify one or more zygote delegates if it wishes by storing them in // |*delegates|. -@@ -70,7 +70,7 @@ class CONTENT_EXPORT ContentMainDelegate { +@@ -58,7 +58,7 @@ class CONTENT_EXPORT ContentMainDelegate { // Called every time the zygote process forks. virtual void ZygoteForked() {} --#endif // defined(OS_LINUX) -+#endif // defined(OS_LINUX) || defined(OS_BSD) +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // Fatal errors during initialization are reported by this function, so that // the embedder can implement graceful exit by displaying some message and diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_zygote__host__linux.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_browser_zygote__host_zygote__host__linux.h similarity index 61% rename from www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_zygote__host__linux.h rename to www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_browser_zygote__host_zygote__host__linux.h index 22ac58a31a3b..380b5967e2b3 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_zygote__host__linux.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_browser_zygote__host_zygote__host__linux.h @@ -1,8 +1,8 @@ ---- src/3rdparty/chromium/services/service_manager/zygote/zygote_host_linux.h.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/services/service_manager/zygote/zygote_host_linux.h +--- src/3rdparty/chromium/content/public/browser/zygote_host/zygote_host_linux.h.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/content/public/browser/zygote_host/zygote_host_linux.h @@ -30,11 +30,13 @@ class ZygoteHost { // after the first render has been forked. - virtual int GetRendererSandboxStatus() const = 0; + virtual int GetRendererSandboxStatus() = 0; +#if !defined(OS_BSD) // Adjust the OOM score of the given renderer's PID. The allowed @@ -13,4 +13,4 @@ +#endif }; - } // namespace service_manager + } // namespace content diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_BUILD.gn deleted file mode 100644 index 92b2ffd34d7b..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_BUILD.gn +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/content/public/common/BUILD.gn.orig 2020-11-07 01:22:36 UTC -+++ src/3rdparty/chromium/content/public/common/BUILD.gn -@@ -254,7 +254,7 @@ jumbo_source_set("common_sources") { - deps += [ "//content/public/android:jni" ] - } - -- if (is_linux) { -+ if (is_linux && !is_bsd) { - deps += [ "//services/service_manager/zygote" ] - } - diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_child__process__host.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_child__process__host.h index 4e21f8dbb7ec..702eb9981322 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_child__process__host.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_child__process__host.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/content/public/common/child_process_host.h.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/content/public/common/child_process_host.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/public/common/child_process_host.h -@@ -51,7 +51,7 @@ class CONTENT_EXPORT ChildProcessHost : public IPC::Se +@@ -81,7 +81,7 @@ class CONTENT_EXPORT ChildProcessHost : public IPC::Se // No special behavior requested. CHILD_NORMAL = 0, --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // Indicates that the child execed after forking may be execced from // /proc/self/exe rather than using the "real" app path. This prevents // autoupdate from confusing us if it changes the file out from under us. diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_common__param__traits__macros.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_common__param__traits__macros.h index c35c92d4478f..ca91f1884ac0 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_common__param__traits__macros.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_common__param__traits__macros.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/content/public/common/common_param_traits_macros.h.orig 2020-04-08 09:41:36 UTC +--- src/3rdparty/chromium/content/public/common/common_param_traits_macros.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/public/common/common_param_traits_macros.h -@@ -333,7 +333,7 @@ IPC_STRUCT_TRAITS_BEGIN(blink::mojom::RendererPreferen +@@ -138,7 +138,7 @@ IPC_STRUCT_TRAITS_BEGIN(blink::mojom::RendererPreferen IPC_STRUCT_TRAITS_MEMBER(accept_languages) - IPC_STRUCT_TRAITS_MEMBER(disable_client_blocked_error_page) IPC_STRUCT_TRAITS_MEMBER(plugin_fullscreen_allowed) --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) + IPC_STRUCT_TRAITS_MEMBER(caret_browsing_enabled) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) IPC_STRUCT_TRAITS_MEMBER(system_font_family_name) + IPC_STRUCT_TRAITS_MEMBER(selection_clipboard_buffer_available) #endif - #if defined(OS_WIN) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__constants.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__constants.cc index c27b7e8e88f0..574d1cc48707 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__constants.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__constants.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/content/public/common/content_constants.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/content/public/common/content_constants.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/public/common/content_constants.cc -@@ -46,7 +46,7 @@ const int kDefaultDetachableCancelDelayMs = 30000; - const char kCorsExemptPurposeHeaderName[] = "Purpose"; - const char kCorsExemptRequestedWithHeaderName[] = "X-Requested-With"; +@@ -56,7 +56,7 @@ std::string GetCorsExemptRequestedWithHeaderName() { + return base::JoinString(pieces, "-"); + } --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) const int kLowestRendererOomScore = 300; const int kHighestRendererOomScore = 1000; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__constants.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__constants.h index 3bc59f512be4..1e4e4ef25177 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__constants.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__constants.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/content/public/common/content_constants.h.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/content/public/common/content_constants.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/public/common/content_constants.h -@@ -65,7 +65,7 @@ CONTENT_EXPORT extern const int kDefaultDetachableCanc - CONTENT_EXPORT extern const char kCorsExemptPurposeHeaderName[]; - CONTENT_EXPORT extern const char kCorsExemptRequestedWithHeaderName[]; +@@ -70,7 +70,7 @@ CONTENT_EXPORT std::string GetCorsExemptRequestedWithH + // it at run time. + CONTENT_EXPORT std::string GetCorsExemptRequestedWithHeaderName(); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // The OOM score adj constants // The highest and lowest assigned OOM score adjustment (oom_score_adj) for // renderers and extensions used by the OomPriority Manager. diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__features.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__features.cc index 00e26170dfdf..0a20c5933ee3 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__features.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__features.cc @@ -1,24 +1,26 @@ ---- src/3rdparty/chromium/content/public/common/content_features.cc.orig 2020-03-16 14:04:24 UTC +--- src/3rdparty/chromium/content/public/common/content_features.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/public/common/content_features.cc -@@ -54,7 +54,7 @@ const base::Feature kAudioServiceLaunchOnStartup{ - const base::Feature kAudioServiceOutOfProcess{ +@@ -55,7 +55,7 @@ const base::Feature kAudioServiceOutOfProcess { + const base::Feature kAudioServiceOutOfProcess { "AudioServiceOutOfProcess", - #if defined(OS_WIN) || defined(OS_MACOSX) || \ + #if defined(OS_WIN) || defined(OS_MAC) || \ - (defined(OS_LINUX) && !defined(OS_CHROMEOS)) + (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -634,7 +634,7 @@ const base::Feature kWebAssemblyThreads { +@@ -787,8 +787,8 @@ const base::Feature kWebAssemblyThreads { }; // Enable WebAssembly trap handler. --#if (defined(OS_LINUX) || defined(OS_WIN) || defined(OS_MACOSX)) && \ -+#if (defined(OS_BSD) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_MACOSX)) && \ +-#if (defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_WIN) || \ +- defined(OS_MAC)) && \ ++#if (defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_BSD) || \ ++ defined(OS_MAC)) && \ defined(ARCH_CPU_X86_64) const base::Feature kWebAssemblyTrapHandler{"WebAssemblyTrapHandler", base::FEATURE_ENABLED_BY_DEFAULT}; -@@ -669,7 +669,7 @@ const base::Feature kWebAuthBle{"WebAuthenticationBle" +@@ -818,7 +818,7 @@ const base::Feature kWebAuthCable { // https://w3c.github.io/webauthn const base::Feature kWebAuthCable { "WebAuthenticationCable", diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__switches.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__switches.cc index 9800bc96ba0c..0eed30bc02a1 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__switches.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__switches.cc @@ -1,8 +1,17 @@ ---- src/3rdparty/chromium/content/public/common/content_switches.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/content/public/common/content_switches.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/public/common/content_switches.cc -@@ -978,7 +978,7 @@ const char kDisableAudioSupportForDesktopShare[] = - const char kDisablePanelFitting[] = "disable-panel-fitting"; +@@ -907,7 +907,7 @@ const char kDisableAcceleratedVideoDecode[] = + const char kDisableAcceleratedVideoDecode[] = + "disable-accelerated-video-decode"; + +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID) ++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)) || defined(OS_BSD) + // Enables hardware acceleration of video decoding on linux. (defaults to off) + const char kEnableAcceleratedVideoDecode[] = "enable-accelerated-video-decode"; #endif +@@ -971,7 +971,7 @@ const char kEnableAutomation[] = "enable-automation"; + // Enable indication that browser is controlled by automation. + const char kEnableAutomation[] = "enable-automation"; -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_FREEBSD) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__switches.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__switches.h index 1dc251a70fd1..3cb48491a0b4 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__switches.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__switches.h @@ -1,7 +1,16 @@ ---- src/3rdparty/chromium/content/public/common/content_switches.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/content/public/common/content_switches.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/public/common/content_switches.h -@@ -277,7 +277,7 @@ CONTENT_EXPORT extern const char kEnableOSKOverscroll[ - CONTENT_EXPORT extern const char kDisablePanelFitting[]; +@@ -254,7 +254,7 @@ CONTENT_EXPORT extern const char kWebXrRuntimeWMR[]; + CONTENT_EXPORT extern const char kWebXrRuntimeOpenXr[]; + CONTENT_EXPORT extern const char kWebXrRuntimeWMR[]; + +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID) ++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)) || defined(OS_BSD) + CONTENT_EXPORT extern const char kEnableAcceleratedVideoDecode[]; + #endif + CONTENT_EXPORT extern const char kDisableAcceleratedVideoDecode[]; +@@ -275,7 +275,7 @@ CONTENT_EXPORT extern const char kRendererWaitForJavaD + CONTENT_EXPORT extern const char kRendererWaitForJavaDebugger[]; #endif -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_use__zoom__for__dsf__policy.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_use__zoom__for__dsf__policy.cc index 0d09edabc835..b4270f6d81a9 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_use__zoom__for__dsf__policy.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_use__zoom__for__dsf__policy.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/content/public/common/use_zoom_for_dsf_policy.cc.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/content/public/common/use_zoom_for_dsf_policy.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/public/common/use_zoom_for_dsf_policy.cc -@@ -25,7 +25,7 @@ const base::Feature kUseZoomForDsfEnabledByDefault{ +@@ -25,7 +25,7 @@ bool IsUseZoomForDSFEnabledByDefault() { #endif bool IsUseZoomForDSFEnabledByDefault() { --#if defined(OS_LINUX) || defined(OS_FUCHSIA) -+#if defined(OS_LINUX) || defined(OS_FUCHSIA) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_FUCHSIA) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_FUCHSIA) || defined(OS_BSD) return true; #elif defined(OS_WIN) || defined(OS_ANDROID) return base::FeatureList::IsEnabled(kUseZoomForDsfEnabledByDefault); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_common_zygote__features.gni b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_zygote_features.gni similarity index 55% rename from www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_common_zygote__features.gni rename to www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_zygote_features.gni index 7147022ea159..74ea2fcea5ef 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_common_zygote__features.gni +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_zygote_features.gni @@ -1,5 +1,5 @@ ---- src/3rdparty/chromium/services/service_manager/zygote/common/zygote_features.gni.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/services/service_manager/zygote/common/zygote_features.gni +--- src/3rdparty/chromium/content/public/common/zygote/features.gni.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/content/public/common/zygote/features.gni @@ -2,4 +2,4 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_BUILD.gn deleted file mode 100644 index 662a6e733b35..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_BUILD.gn +++ /dev/null @@ -1,18 +0,0 @@ ---- src/3rdparty/chromium/content/renderer/BUILD.gn.orig 2020-11-07 01:22:36 UTC -+++ src/3rdparty/chromium/content/renderer/BUILD.gn -@@ -462,10 +462,11 @@ target(link_target_type, "renderer") { - } - - if (is_linux) { -- deps += [ -- "//components/services/font/public/cpp", -- "//services/service_manager/zygote", -- ] -+ deps += [ "//components/services/font/public/cpp" ] -+ -+ if (!is_bsd) { -+ deps += [ "//services/service_manager/zygote" ] -+ } - } - - if (is_mac) { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_render__process__impl.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_render__process__impl.cc index 1f5e385509d8..2222245d83da 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_render__process__impl.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_render__process__impl.cc @@ -1,20 +1,20 @@ ---- src/3rdparty/chromium/content/renderer/render_process_impl.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/content/renderer/render_process_impl.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/renderer/render_process_impl.cc -@@ -43,7 +43,7 @@ +@@ -44,7 +44,7 @@ #if defined(OS_WIN) #include "base/win/win_util.h" #endif --#if defined(OS_LINUX) && defined(ARCH_CPU_X86_64) -+#if (defined(OS_LINUX) || defined(OS_BSD)) && defined(ARCH_CPU_X86_64) +-#if (defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(ARCH_CPU_X86_64) ++#if (defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)) && defined(ARCH_CPU_X86_64) #include "v8/include/v8-wasm-trap-handler-posix.h" #endif namespace { -@@ -156,7 +156,7 @@ RenderProcessImpl::RenderProcessImpl() +@@ -177,7 +177,7 @@ RenderProcessImpl::RenderProcessImpl() SetV8FlagIfNotFeature(features::kWebAssemblyTrapHandler, "--no-wasm-trap-handler"); --#if defined(OS_LINUX) && defined(ARCH_CPU_X86_64) -+#if (defined(OS_LINUX) || defined(OS_BSD)) && defined(ARCH_CPU_X86_64) +-#if (defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(ARCH_CPU_X86_64) ++#if (defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)) && defined(ARCH_CPU_X86_64) if (base::FeatureList::IsEnabled(features::kWebAssemblyTrapHandler)) { base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); - if (!command_line->HasSwitch( + if (!command_line->HasSwitch(switches::kDisableInProcessStackTraces)) { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_render__thread__impl.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_render__thread__impl.cc index 29655c421212..a4fda898d4eb 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_render__thread__impl.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_render__thread__impl.cc @@ -1,51 +1,11 @@ ---- src/3rdparty/chromium/content/renderer/render_thread_impl.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/content/renderer/render_thread_impl.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/renderer/render_thread_impl.cc -@@ -176,12 +176,21 @@ - #include "mojo/public/cpp/bindings/message_dumper.h" - #endif +@@ -173,7 +173,7 @@ -+#if !defined(OS_BSD) - #if defined(OS_MACOSX) + #if defined(OS_MAC) #include - #else +-#else ++#elif !defined(OS_BSD) #include #endif -+#endif -+#if defined(OS_BSD) -+#include -+#include -+#include -+#include -+#endif -+ - using base::ThreadRestrictions; - using blink::WebDocument; - using blink::WebFrame; -@@ -739,7 +748,7 @@ void RenderThreadImpl::Init() { - DCHECK(parsed_num_raster_threads) << string_value; - DCHECK_GT(num_raster_threads, 0); - --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - categorized_worker_pool_->SetBackgroundingCallback( - main_thread_scheduler_->DefaultTaskRunner(), - base::BindOnce( -@@ -762,7 +771,7 @@ void RenderThreadImpl::Init() { - base::DiscardableMemoryAllocator::SetInstance( - discardable_memory_allocator_.get()); - --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - if (base::FeatureList::IsEnabled( - blink::features::kBlinkCompositorUseDisplayThreadPriority)) { - render_message_filter()->SetThreadPriority( -@@ -1148,7 +1157,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: - !cmd_line->HasSwitch(switches::kDisableGpuMemoryBufferVideoFrames); - #else - cmd_line->HasSwitch(switches::kEnableGpuMemoryBufferVideoFrames); --#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_WIN) -+#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) - const bool enable_media_stream_gpu_memory_buffers = - enable_gpu_memory_buffers && - base::FeatureList::IsEnabled( diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.cc index 868fc376dfe8..eaf6a5aef6cd 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.cc @@ -1,47 +1,47 @@ ---- src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.cc.orig 2020-04-08 09:41:36 UTC +--- src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.cc -@@ -99,7 +99,7 @@ +@@ -97,7 +97,7 @@ - #if defined(OS_MACOSX) + #if defined(OS_MAC) #include "content/child/child_process_sandbox_support_impl_mac.h" --#elif defined(OS_LINUX) -+#elif defined(OS_LINUX) || defined(OS_BSD) +-#elif defined(OS_LINUX) || defined(OS_CHROMEOS) ++#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "content/child/child_process_sandbox_support_impl_linux.h" #endif -@@ -174,7 +174,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( +@@ -169,7 +169,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( + main_thread_scheduler_(main_thread_scheduler) { + // RenderThread may not exist in some tests. if (RenderThreadImpl::current()) { - io_runner_ = RenderThreadImpl::current()->GetIOTaskRunner(); - thread_safe_sender_ = RenderThreadImpl::current()->thread_safe_sender(); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) mojo::PendingRemote font_service; RenderThreadImpl::current()->BindHostReceiver( font_service.InitWithNewPipeAndPassReceiver()); -@@ -184,7 +184,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( +@@ -179,7 +179,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( #endif } --#if defined(OS_LINUX) || defined(OS_MACOSX) -+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || defined(OS_BSD) if (sandboxEnabled()) { - #if defined(OS_MACOSX) + #if defined(OS_MAC) sandbox_support_ = std::make_unique(); -@@ -266,7 +266,7 @@ RendererBlinkPlatformImpl::CreateNetworkURLLoaderFacto +@@ -232,7 +232,7 @@ void RendererBlinkPlatformImpl::SetDisplayThreadPriori void RendererBlinkPlatformImpl::SetDisplayThreadPriority( base::PlatformThreadId thread_id) { --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) if (RenderThreadImpl* render_thread = RenderThreadImpl::current()) { render_thread->render_message_filter()->SetThreadPriority( thread_id, base::ThreadPriority::DISPLAY); -@@ -279,7 +279,7 @@ blink::BlameContext* RendererBlinkPlatformImpl::GetTop +@@ -245,7 +245,7 @@ blink::WebSandboxSupport* RendererBlinkPlatformImpl::G } blink::WebSandboxSupport* RendererBlinkPlatformImpl::GetSandboxSupport() { --#if defined(OS_LINUX) || defined(OS_MACOSX) -+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || defined(OS_BSD) return sandbox_support_.get(); #else // These platforms do not require sandbox support. diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.h index 51de136951ec..d4a1fd47d773 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.h @@ -1,20 +1,20 @@ ---- src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.h.orig 2020-04-29 07:57:35 UTC +--- src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.h -@@ -31,7 +31,7 @@ +@@ -30,7 +30,7 @@ #include "third_party/blink/public/mojom/cache_storage/cache_storage.mojom.h" #include "third_party/blink/public/mojom/loader/code_cache.mojom.h" --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "components/services/font/public/cpp/font_loader.h" // nogncheck #include "third_party/skia/include/core/SkRefCnt.h" // nogncheck #endif -@@ -221,7 +221,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi +@@ -224,7 +224,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi + // Return the mojo interface for making CodeCache calls. + blink::mojom::CodeCacheHost& GetCodeCacheHost(); - scoped_refptr io_runner_; - --#if defined(OS_LINUX) || defined(OS_MACOSX) -+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || defined(OS_BSD) std::unique_ptr sandbox_support_; #endif @@ -22,8 +22,8 @@ mojo::PendingRemote code_cache_host_remote_; mojo::SharedRemote code_cache_host_; --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) sk_sp font_loader_; #endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__main__platform__delegate__linux.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__main__platform__delegate__linux.cc index b1b240e7cfc8..245403ffed52 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__main__platform__delegate__linux.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__main__platform__delegate__linux.cc @@ -1,12 +1,12 @@ ---- src/3rdparty/chromium/content/renderer/renderer_main_platform_delegate_linux.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/content/renderer/renderer_main_platform_delegate_linux.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/renderer/renderer_main_platform_delegate_linux.cc -@@ -30,6 +30,7 @@ void RendererMainPlatformDelegate::PlatformUninitializ +@@ -30,6 +30,7 @@ bool RendererMainPlatformDelegate::EnableSandbox() { } bool RendererMainPlatformDelegate::EnableSandbox() { +#if !defined(OS_BSD) // The setuid sandbox is started in the zygote process: zygote_main_linux.cc - // https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox.md + // https://chromium.googlesource.com/chromium/src/+/master/docs/linux/suid_sandbox.md // @@ -65,7 +66,7 @@ bool RendererMainPlatformDelegate::EnableSandbox() { CHECK_EQ(errno, EPERM); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_shell_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_shell_BUILD.gn index 3f9e10e0762b..f8133ab31ba5 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_shell_BUILD.gn +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_shell_BUILD.gn @@ -1,29 +1,42 @@ ---- src/3rdparty/chromium/content/shell/BUILD.gn.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/content/shell/BUILD.gn.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/shell/BUILD.gn -@@ -90,7 +90,7 @@ static_library("content_shell_app") { - "//content/public/app:both", - "//v8", - ] +@@ -94,7 +94,7 @@ static_library("content_shell_app") { + "//content/web_test:web_test_renderer", + ] + } - if (!is_fuchsia) { + if (!is_fuchsia && !is_bsd) { deps += [ "//components/crash/core/app", "//components/crash/core/app:test_support", -@@ -366,6 +366,13 @@ static_library("content_shell_lib") { - ] - deps += [ "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.ui.policy" ] - } -+ if (is_bsd) { -+ deps -= [ -+ "//components/crash/content/browser", -+ "//components/crash/core/app", -+ "//components/crash/core/app:test_support", -+ ] -+ } +@@ -253,7 +253,7 @@ static_library("content_shell_lib") { - # Annoyingly, this target and web_test_support have circular includes. - allow_circular_includes_from = [ "//content/test:web_test_support" ] -@@ -959,7 +966,7 @@ group("content_shell_crash_test") { + if (is_fuchsia) { + deps += [ "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.ui.policy" ] +- } else { ++ } else if (!is_bsd) { + deps += [ + "//components/crash/content/browser", + "//components/crash/core/app", +@@ -505,7 +505,7 @@ if (is_android) { + } + } + +- if (is_win || is_linux || is_chromeos) { ++ if ((is_win || is_linux || is_chromeos) && !is_bsd) { + data_deps += + [ "//third_party/crashpad/crashpad/handler:crashpad_handler" ] + } +@@ -791,7 +791,7 @@ group("content_shell_crash_test") { + mac_bin_path + "otool", + ] + } +- if (is_posix) { ++ if (is_posix && !is_bsd) { + data += [ + "//components/crash/content/tools/generate_breakpad_symbols.py", + "//components/crash/content/tools/dmp2minidump.py", +@@ -800,7 +800,7 @@ group("content_shell_crash_test") { if (is_win) { data_deps += [ "//build/win:copy_cdb_to_output" ] } diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_test_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_test_BUILD.gn new file mode 100644 index 000000000000..5d6baa9d83a5 --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_test_BUILD.gn @@ -0,0 +1,28 @@ +--- src/3rdparty/chromium/content/test/BUILD.gn.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/content/test/BUILD.gn +@@ -1398,10 +1398,12 @@ test("content_browsertests") { + } + + if (is_linux || is_chromeos) { +- sources += [ +- "../browser/utility_process_sandbox_browsertest.cc", +- "../browser/zygote_host/zygote_browsertest.cc", +- ] ++ if (!is_bsd) { ++ sources += [ ++ "../browser/utility_process_sandbox_browsertest.cc", ++ "../browser/zygote_host/zygote_browsertest.cc", ++ ] ++ } + deps += [ + "//services/service_manager/tests:interfaces", + "//ui/gfx:test_support", +@@ -1655,7 +1657,7 @@ static_library("run_all_unittests") { + ":test_support", + "//base/test:test_support", + ] +- if (is_linux || is_chromeos) { ++ if ((is_linux || is_chromeos) && !is_bsd) { + deps += [ "//content/common:set_process_title_linux" ] + } + } diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_utility_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_utility_BUILD.gn deleted file mode 100644 index 287f2d72922f..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_utility_BUILD.gn +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/content/utility/BUILD.gn.orig 2020-11-07 01:22:36 UTC -+++ src/3rdparty/chromium/content/utility/BUILD.gn -@@ -82,7 +82,7 @@ jumbo_source_set("utility") { - deps += [ "//services/proxy_resolver:lib" ] - } - -- if (is_linux && !use_qt) { -+ if (is_linux && !use_qt && !is_bsd) { - deps += [ "//content/utility/soda:soda_sandbox_hook" ] - } - diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.cc index f03e88ba881d..612f0d3d52f5 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.cc @@ -1,29 +1,29 @@ ---- src/3rdparty/chromium/content/utility/utility_blink_platform_with_sandbox_support_impl.cc.orig 2020-03-16 14:04:24 UTC +--- src/3rdparty/chromium/content/utility/utility_blink_platform_with_sandbox_support_impl.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/utility/utility_blink_platform_with_sandbox_support_impl.cc @@ -9,7 +9,7 @@ - #if defined(OS_MACOSX) + #if defined(OS_MAC) #include "content/child/child_process_sandbox_support_impl_mac.h" --#elif defined(OS_LINUX) -+#elif defined(OS_LINUX) || defined(OS_BSD) +-#elif defined(OS_LINUX) || defined(OS_CHROMEOS) ++#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "content/child/child_process_sandbox_support_impl_linux.h" #endif -@@ -17,7 +17,7 @@ namespace content { +@@ -17,7 +17,7 @@ UtilityBlinkPlatformWithSandboxSupportImpl:: UtilityBlinkPlatformWithSandboxSupportImpl:: UtilityBlinkPlatformWithSandboxSupportImpl() { --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) mojo::PendingRemote font_service; UtilityThread::Get()->BindHostReceiver( font_service.InitWithNewPipeAndPassReceiver()); -@@ -34,7 +34,7 @@ UtilityBlinkPlatformWithSandboxSupportImpl:: +@@ -34,7 +34,7 @@ UtilityBlinkPlatformWithSandboxSupportImpl::GetSandbox blink::WebSandboxSupport* UtilityBlinkPlatformWithSandboxSupportImpl::GetSandboxSupport() { --#if defined(OS_LINUX) || defined(OS_MACOSX) -+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || defined(OS_BSD) return sandbox_support_.get(); #else return nullptr; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.h index 441d61d46386..df93d4170b33 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.h @@ -1,24 +1,24 @@ ---- src/3rdparty/chromium/content/utility/utility_blink_platform_with_sandbox_support_impl.h.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/content/utility/utility_blink_platform_with_sandbox_support_impl.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/content/utility/utility_blink_platform_with_sandbox_support_impl.h @@ -11,7 +11,7 @@ #include "build/build_config.h" #include "third_party/blink/public/platform/platform.h" --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "components/services/font/public/cpp/font_loader.h" // nogncheck #include "third_party/skia/include/core/SkRefCnt.h" // nogncheck #endif -@@ -39,10 +39,10 @@ class UtilityBlinkPlatformWithSandboxSupportImpl : pub +@@ -33,10 +33,10 @@ class UtilityBlinkPlatformWithSandboxSupportImpl : pub blink::WebSandboxSupport* GetSandboxSupport() override; private: --#if defined(OS_LINUX) || defined(OS_MACOSX) -+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || defined(OS_BSD) std::unique_ptr sandbox_support_; #endif --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) sk_sp font_loader_; #endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_zygote_zygote__linux.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_zygote_zygote__linux.cc new file mode 100644 index 000000000000..d927059d3542 --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_zygote_zygote__linux.cc @@ -0,0 +1,16 @@ +--- src/3rdparty/chromium/content/zygote/zygote_linux.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/content/zygote/zygote_linux.cc +@@ -1,7 +1,7 @@ + // Copyright (c) 2012 The Chromium Authors. All rights reserved. + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. +- ++#if 0 + #include "content/zygote/zygote_linux.h" + + #include +@@ -650,3 +650,4 @@ bool Zygote::HandleGetSandboxStatus(int fd, base::Pick + } + + } // namespace content ++#endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_zygote__main__linux.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_zygote_zygote__main__linux.cc similarity index 61% rename from www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_zygote__main__linux.cc rename to www/qt5-webengine/files/patch-src_3rdparty_chromium_content_zygote_zygote__main__linux.cc index 5f4e44634dca..50d0fb99d2bb 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_zygote__main__linux.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_zygote_zygote__main__linux.cc @@ -1,5 +1,5 @@ ---- src/3rdparty/chromium/services/service_manager/zygote/zygote_main_linux.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/services/service_manager/zygote/zygote_main_linux.cc +--- src/3rdparty/chromium/content/zygote/zygote_main_linux.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/content/zygote/zygote_main_linux.cc @@ -11,7 +11,9 @@ #include #include @@ -10,7 +10,7 @@ #include #include #include -@@ -101,6 +103,7 @@ static bool CreateInitProcessReaper( +@@ -99,6 +101,7 @@ static bool EnterSuidSandbox(sandbox::SetuidSandboxCli // created through the setuid sandbox. static bool EnterSuidSandbox(sandbox::SetuidSandboxClient* setuid_sandbox, base::OnceClosure post_fork_parent_callback) { @@ -18,31 +18,31 @@ DCHECK(setuid_sandbox); DCHECK(setuid_sandbox->IsSuidSandboxChild()); -@@ -133,6 +136,9 @@ static bool EnterSuidSandbox(sandbox::SetuidSandboxCli +@@ -131,6 +134,9 @@ static bool EnterSuidSandbox(sandbox::SetuidSandboxCli - CHECK(service_manager::SandboxDebugHandling::SetDumpableStatusAndHandlers()); + CHECK(sandbox::policy::SandboxDebugHandling::SetDumpableStatusAndHandlers()); return true; +#else + return false; -+#endif ++#endif // !defined(OS_BSD) } static void DropAllCapabilities(int proc_fd) { -@@ -178,6 +184,7 @@ static void EnterLayerOneSandbox(service_manager::Sand +@@ -178,6 +184,7 @@ bool ZygoteMain( bool ZygoteMain( std::vector> fork_delegates) { +#if !defined(OS_BSD) sandbox::SetAmZygoteOrRenderer(true, GetSandboxFD()); - auto* linux_sandbox = service_manager::SandboxLinux::GetInstance(); -@@ -240,6 +247,9 @@ bool ZygoteMain( + auto* linux_sandbox = sandbox::policy::SandboxLinux::GetInstance(); +@@ -243,6 +250,9 @@ bool ZygoteMain( // This function call can return multiple times, once per fork(). return zygote.ProcessRequests(); +#else + return false; -+#endif ++#endif // !defined(OS_BSD) } - } // namespace service_manager + } // namespace content diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_device_gamepad_gamepad__provider.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_device_gamepad_gamepad__provider.cc index e1f722403ed5..94647a6f6c06 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_device_gamepad_gamepad__provider.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_device_gamepad_gamepad__provider.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/device/gamepad/gamepad_provider.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/device/gamepad/gamepad_provider.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/device/gamepad/gamepad_provider.cc -@@ -167,7 +167,7 @@ void GamepadProvider::Initialize(std::unique_ptrIsValidPort()) return; --#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || \ ++#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || defined(OS_BSD) || \ + defined(OS_CHROMEOS) bool has_permission = extension->permissions_data()->HasAPIPermission( APIPermission::kNativeMessaging); - if (!has_permission) { -@@ -432,11 +432,11 @@ void MessageService::OpenChannelToNativeApp( +@@ -447,12 +447,12 @@ void MessageService::OpenChannelToNativeApp( channel->opener->IncrementLazyKeepaliveCount(); AddChannel(std::move(channel), receiver_port_id); --#else // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)) -+#else // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)) +-#else // !(defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || ++#else // !(defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || defined(OS_BSD) || + // defined(OS_CHROMEOS)) const char kNativeMessagingNotSupportedError[] = "Native Messaging is not supported on this platform."; opener_port->DispatchOnDisconnect(kNativeMessagingNotSupportedError); --#endif // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)) -+#endif // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)) +-#endif // !(defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || ++#endif // !(defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || defined(OS_BSD) || + // defined(OS_CHROMEOS)) } - void MessageService::OpenChannelToTab(const ChannelEndpoint& source, diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_browser__context__keyed__service__factories.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_browser__context__keyed__service__factories.cc index adc37efe2f1b..64ced00400d9 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_browser__context__keyed__service__factories.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_browser__context__keyed__service__factories.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/extensions/browser/browser_context_keyed_service_factories.cc.orig 2020-04-08 09:41:36 UTC +--- src/3rdparty/chromium/extensions/browser/browser_context_keyed_service_factories.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/extensions/browser/browser_context_keyed_service_factories.cc -@@ -81,7 +81,7 @@ void EnsureBrowserContextKeyedServiceFactoriesBuilt() - IdleManagerFactory::GetInstance(); - #endif // !defined(TOOLKIT_QT) - ManagementAPI::GetFactoryInstance(); --#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_MACOSX) -+#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) +@@ -106,7 +106,7 @@ void EnsureBrowserContextKeyedServiceFactoriesBuilt() + #if defined(OS_CHROMEOS) + NetworkingConfigServiceFactory::GetInstance(); + #endif +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_WIN) || \ ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_BSD) || \ + defined(OS_MAC) NetworkingPrivateEventRouterFactory::GetInstance(); #endif - PowerAPI::GetFactoryInstance(); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_shell_app_shell__main__delegate.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_shell_app_shell__main__delegate.cc index 2e31ad26e4b3..d630dd96839b 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_shell_app_shell__main__delegate.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_shell_app_shell__main__delegate.cc @@ -1,20 +1,20 @@ ---- src/3rdparty/chromium/extensions/shell/app/shell_main_delegate.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/extensions/shell/app/shell_main_delegate.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/extensions/shell/app/shell_main_delegate.cc -@@ -38,7 +38,7 @@ +@@ -37,7 +37,7 @@ #if defined(OS_WIN) #include "base/base_paths_win.h" --#elif defined(OS_LINUX) -+#elif defined(OS_LINUX) || defined(OS_BSD) +-#elif defined(OS_LINUX) || defined(OS_CHROMEOS) ++#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "base/nix/xdg_util.h" - #elif defined(OS_MACOSX) + #elif defined(OS_MAC) #include "base/base_paths_mac.h" -@@ -70,7 +70,7 @@ base::FilePath GetDataPath() { +@@ -69,7 +69,7 @@ base::FilePath GetDataPath() { return cmd_line->GetSwitchValuePath(switches::kContentShellDataPath); base::FilePath data_dir; --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) std::unique_ptr env(base::Environment::Create()); data_dir = base::nix::GetXDGDirectory( env.get(), base::nix::kXdgConfigHomeEnvVar, base::nix::kDotConfigDir); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_common_gpu__memory__buffer__support.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_common_gpu__memory__buffer__support.cc index c93c44ba4d8a..d5bfcfe5b1e9 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_common_gpu__memory__buffer__support.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_common_gpu__memory__buffer__support.cc @@ -1,20 +1,20 @@ ---- src/3rdparty/chromium/gpu/command_buffer/common/gpu_memory_buffer_support.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/gpu/command_buffer/common/gpu_memory_buffer_support.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/gpu/command_buffer/common/gpu_memory_buffer_support.cc -@@ -54,7 +54,7 @@ bool IsImageSizeValidForGpuMemoryBufferFormat(const gf +@@ -55,7 +55,7 @@ uint32_t GetPlatformSpecificTextureTarget() { uint32_t GetPlatformSpecificTextureTarget() { - #if defined(OS_MACOSX) + #if defined(OS_MAC) return macos_specific_texture_target; --#elif defined(OS_ANDROID) || defined(OS_LINUX) -+#elif defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) +-#elif defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) ++#elif defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) return GL_TEXTURE_EXTERNAL_OES; #elif defined(OS_WIN) || defined(OS_FUCHSIA) return GL_TEXTURE_2D; -@@ -84,7 +84,7 @@ GPU_EXPORT uint32_t GetBufferTextureTarget(gfx::Buffer +@@ -85,7 +85,7 @@ GPU_EXPORT bool NativeBufferNeedsPlatformSpecificTextu GPU_EXPORT bool NativeBufferNeedsPlatformSpecificTextureTarget( gfx::BufferFormat format) { --#if defined(USE_OZONE) || defined(OS_LINUX) -+#if defined(USE_OZONE) || defined(OS_LINUX) || defined(OS_BSD) +-#if defined(USE_OZONE) || defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(USE_OZONE) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // Always use GL_TEXTURE_2D as the target for RGB textures. // https://crbug.com/916728 if (format == gfx::BufferFormat::R_8 || format == gfx::BufferFormat::RG_88 || diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_external__semaphore.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_external__semaphore.cc new file mode 100644 index 000000000000..38e2cda79a8e --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_external__semaphore.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/gpu/command_buffer/service/external_semaphore.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/gpu/command_buffer/service/external_semaphore.cc +@@ -39,7 +39,7 @@ GLuint ImportSemaphoreHandleToGLSemaphore(SemaphoreHan + }, + base::Time::Now())); + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) + if (handle.vk_handle_type() != + VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT) { + DLOG(ERROR) << "Importing semaphore handle of unexpected type:" diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_external__vk__image__backing.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_external__vk__image__backing.cc index d282e4ede213..233454f98d85 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_external__vk__image__backing.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_external__vk__image__backing.cc @@ -1,82 +1,38 @@ ---- src/3rdparty/chromium/gpu/command_buffer/service/external_vk_image_backing.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/gpu/command_buffer/service/external_vk_image_backing.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/gpu/command_buffer/service/external_vk_image_backing.cc @@ -29,7 +29,7 @@ - #include "ui/gl/buildflags.h" - #include "ui/gl/gl_context.h" + #include "ui/gl/gl_version_info.h" + #include "ui/gl/scoped_binders.h" --#if defined(OS_LINUX) && BUILDFLAG(USE_DAWN) -+#if (defined(OS_LINUX) || defined(OS_BSD)) && BUILDFLAG(USE_DAWN) +-#if (defined(OS_LINUX) || defined(OS_CHROMEOS)) && BUILDFLAG(USE_DAWN) ++#if (defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)) && BUILDFLAG(USE_DAWN) #include "gpu/command_buffer/service/external_vk_image_dawn_representation.h" #endif -@@ -37,7 +37,7 @@ - #include "gpu/vulkan/fuchsia/vulkan_fuchsia_ext.h" - #endif - --#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || defined(OS_BSD) - #define GL_DEDICATED_MEMORY_OBJECT_EXT 0x9581 - #define GL_TEXTURE_TILING_EXT 0x9580 - #define GL_TILING_TYPES_EXT 0x9583 -@@ -510,7 +510,7 @@ std::unique_ptr +@@ -583,7 +583,7 @@ ExternalVkImageBacking::ProduceDawn(SharedImageManager ExternalVkImageBacking::ProduceDawn(SharedImageManager* manager, MemoryTypeTracker* tracker, WGPUDevice wgpuDevice) { --#if defined(OS_LINUX) && BUILDFLAG(USE_DAWN) -+#if (defined(OS_LINUX) || defined(OS_BSD)) && BUILDFLAG(USE_DAWN) +-#if (defined(OS_LINUX) || defined(OS_CHROMEOS)) && BUILDFLAG(USE_DAWN) ++#if (defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)) && BUILDFLAG(USE_DAWN) auto wgpu_format = viz::ToWGPUFormat(format()); if (wgpu_format == WGPUTextureFormat_Undefined) { -@@ -529,14 +529,14 @@ ExternalVkImageBacking::ProduceDawn(SharedImageManager +@@ -602,7 +602,7 @@ ExternalVkImageBacking::ProduceDawn(SharedImageManager return std::make_unique( manager, this, tracker, wgpuDevice, wgpu_format, std::move(memory_fd)); --#else // !defined(OS_LINUX) || !BUILDFLAG(USE_DAWN) -+#else // (!defined(OS_LINUX) && !defined(OS_BSD)) || !BUILDFLAG(USE_DAWN) +-#else // (!defined(OS_LINUX) && !defined(OS_CHROMEOS)) || !BUILDFLAG(USE_DAWN) ++#else // (!defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_BSD)) || !BUILDFLAG(USE_DAWN) NOTIMPLEMENTED_LOG_ONCE(); return nullptr; #endif - } - - GLuint ExternalVkImageBacking::ProduceGLTextureInternal() { --#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || \ -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || defined(OS_BSD) || \ - defined(OS_WIN) - GrVkImageInfo image_info; - bool result = backend_texture_.getVkImageInfo(&image_info); -@@ -545,7 +545,7 @@ GLuint ExternalVkImageBacking::ProduceGLTextureInterna +@@ -615,7 +615,7 @@ GLuint ExternalVkImageBacking::ProduceGLTextureInterna gl::GLApi* api = gl::g_current_gl_context; - GLuint memory_object = 0; + base::Optional memory_object; if (!use_separate_gl_texture()) { --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) auto memory_fd = image_->GetMemoryFd(); - if (!memory_fd.is_valid()) { + if (!memory_fd.is_valid()) return 0; -@@ -608,7 +608,7 @@ GLuint ExternalVkImageBacking::ProduceGLTextureInterna - } - api->glBindTextureFn(GL_TEXTURE_2D, old_texture_binding); - return texture_service_id; --#else // !defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_FUCHSIA) -+#else // !defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_FUCHSIA) && !defined(OS_BSD) - #error Unsupported OS - #endif - } -@@ -622,7 +622,7 @@ ExternalVkImageBacking::ProduceGLTexture(SharedImageMa - return nullptr; - } - --#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || \ -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || defined(OS_BSD) || \ - defined(OS_WIN) - if (!texture_) { - GLuint texture_service_id = ProduceGLTextureInternal(); -@@ -666,7 +666,7 @@ ExternalVkImageBacking::ProduceGLTexturePassthrough( - return nullptr; - } - --#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || \ -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || defined(OS_BSD) || \ - defined(OS_WIN) - if (!texture_passthrough_) { - GLuint texture_service_id = ProduceGLTextureInternal(); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_external__vk__image__backing.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_external__vk__image__backing.h deleted file mode 100644 index 532edfc3d66f..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_external__vk__image__backing.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/gpu/command_buffer/service/external_vk_image_backing.h.orig 2020-11-07 01:22:36 UTC -+++ src/3rdparty/chromium/gpu/command_buffer/service/external_vk_image_backing.h -@@ -151,7 +151,7 @@ class ExternalVkImageBacking final : public ClearTrack - - private: - --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) - // Extract file descriptor from image - int GetMemoryFd(const GrVkImageInfo& image_info); - #endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_external__vk__image__gl__representation.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_external__vk__image__gl__representation.cc deleted file mode 100644 index c2158ce9d26c..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_external__vk__image__gl__representation.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/gpu/command_buffer/service/external_vk_image_gl_representation.cc.orig 2020-11-07 01:22:36 UTC -+++ src/3rdparty/chromium/gpu/command_buffer/service/external_vk_image_gl_representation.cc -@@ -188,7 +188,7 @@ GLuint ExternalVkImageGLRepresentationShared::ImportVk - SemaphoreHandle handle) { - if (!handle.is_valid()) - return 0; --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) - if (handle.vk_handle_type() != - VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT) { - DLOG(ERROR) << "Importing semaphore handle of unexpected type:" diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_program__manager.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_program__manager.cc index 5f7c0cc5ef0e..e98c15fa4ea7 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_program__manager.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_program__manager.cc @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/gpu/command_buffer/service/program_manager.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/gpu/command_buffer/service/program_manager.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/gpu/command_buffer/service/program_manager.cc -@@ -31,7 +31,11 @@ - #include "gpu/command_buffer/service/progress_reporter.h" +@@ -30,7 +30,11 @@ + #include "gpu/command_buffer/service/program_cache.h" #include "gpu/command_buffer/service/shader_manager.h" #include "gpu/config/gpu_preferences.h" +#if defined(OS_BSD) @@ -10,5 +10,5 @@ #include "third_party/re2/src/re2/re2.h" +#endif #include "ui/gl/gl_version_info.h" + #include "ui/gl/progress_reporter.h" - using base::TimeDelta; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__control__list.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__control__list.cc index 3e207886d85d..cd22d1dbeb0c 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__control__list.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__control__list.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/gpu/config/gpu_control_list.cc.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/gpu/config/gpu_control_list.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/gpu/config/gpu_control_list.cc -@@ -16,7 +16,11 @@ +@@ -17,7 +17,11 @@ #include "base/values.h" #include "build/build_config.h" #include "gpu/config/gpu_util.h" @@ -12,21 +12,21 @@ namespace gpu { namespace { -@@ -213,7 +217,7 @@ bool GpuControlList::More::GLVersionInfoMismatch( +@@ -275,7 +279,7 @@ GpuControlList::GLType GpuControlList::More::GetDefaul GpuControlList::GLType GpuControlList::More::GetDefaultGLType() { #if defined(OS_CHROMEOS) return kGLTypeGL; -#elif defined(OS_LINUX) || defined(OS_OPENBSD) +#elif defined(OS_LINUX) || defined(OS_BSD) return kGLTypeGL; - #elif defined(OS_MACOSX) + #elif defined(OS_MAC) return kGLTypeGL; -@@ -699,7 +703,7 @@ GpuControlList::OsType GpuControlList::GetOsType() { +@@ -781,7 +785,7 @@ GpuControlList::OsType GpuControlList::GetOsType() { return kOsAndroid; #elif defined(OS_FUCHSIA) return kOsFuchsia; -#elif defined(OS_LINUX) || defined(OS_OPENBSD) +#elif defined(OS_LINUX) || defined(OS_BSD) return kOsLinux; - #elif defined(OS_MACOSX) + #elif defined(OS_MAC) return kOsMacosx; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__test__config.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__test__config.cc index 310a2fa61210..c8d71e31c3cb 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__test__config.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__test__config.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/gpu/config/gpu_test_config.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/gpu/config/gpu_test_config.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/gpu/config/gpu_test_config.cc -@@ -25,7 +25,7 @@ namespace { +@@ -27,7 +27,7 @@ GPUTestConfig::OS GetCurrentOS() { GPUTestConfig::OS GetCurrentOS() { #if defined(OS_CHROMEOS) return GPUTestConfig::kOsChromeOS; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.cc index df1a32be61ee..bf4a4352c7d4 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.cc @@ -1,29 +1,38 @@ ---- src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.cc -@@ -14,7 +14,7 @@ +@@ -16,7 +16,7 @@ #include "gpu/ipc/common/gpu_memory_buffer_impl_io_surface.h" #endif --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "ui/gfx/client_native_pixmap_factory.h" #include "ui/gfx/linux/client_native_pixmap_factory_dmabuf.h" #endif -@@ -24,7 +24,7 @@ +@@ -26,7 +26,7 @@ #include "ui/ozone/public/ozone_platform.h" #endif --#if defined(USE_OZONE) || defined(OS_LINUX) -+#if defined(USE_OZONE) || defined(OS_LINUX) || defined(OS_BSD) +-#if defined(USE_OZONE) || defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(USE_OZONE) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "gpu/ipc/common/gpu_memory_buffer_impl_native_pixmap.h" #endif -@@ -181,7 +181,7 @@ GpuMemoryBufferSupport::CreateGpuMemoryBufferImplFromH +@@ -66,7 +66,7 @@ GpuMemoryBufferSupport::GetNativeGpuMemoryBufferType() + return gfx::IO_SURFACE_BUFFER; + #elif defined(OS_ANDROID) + return gfx::ANDROID_HARDWARE_BUFFER; +-#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(USE_OZONE) ++#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || defined(USE_OZONE) + return gfx::NATIVE_PIXMAP; + #elif defined(OS_WIN) + return gfx::DXGI_SHARED_HANDLE; +@@ -194,7 +194,7 @@ GpuMemoryBufferSupport::CreateGpuMemoryBufferImplFromH return GpuMemoryBufferImplIOSurface::CreateFromHandle( std::move(handle), size, format, usage, std::move(callback)); #endif --#if defined(OS_LINUX) || defined(USE_OZONE) -+#if defined(OS_LINUX) || defined(USE_OZONE) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(USE_OZONE) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || defined(USE_OZONE) case gfx::NATIVE_PIXMAP: return GpuMemoryBufferImplNativePixmap::CreateFromHandle( client_native_pixmap_factory(), std::move(handle), size, format, diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.h index 389adaf7f4d2..7985da8b5648 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.h.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.h @@ -16,7 +16,7 @@ #include "ui/gfx/geometry/size.h" #include "ui/gfx/gpu_memory_buffer.h" --#if defined(OS_LINUX) || defined(USE_OZONE) -+#if defined(OS_LINUX) || defined(OS_BSD) || defined(USE_OZONE) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(USE_OZONE) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || defined(USE_OZONE) namespace gfx { class ClientNativePixmapFactory; } @@ -13,17 +13,17 @@ bool IsNativeGpuMemoryBufferConfigurationSupported(gfx::BufferFormat format, gfx::BufferUsage usage); --#if defined(OS_LINUX) || defined(USE_OZONE) -+#if defined(OS_LINUX) || defined(OS_BSD) || defined(USE_OZONE) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(USE_OZONE) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || defined(USE_OZONE) gfx::ClientNativePixmapFactory* client_native_pixmap_factory() { return client_native_pixmap_factory_.get(); } -@@ -61,7 +61,7 @@ class GPU_EXPORT GpuMemoryBufferSupport { +@@ -62,7 +62,7 @@ class GPU_EXPORT GpuMemoryBufferSupport { GpuMemoryBufferImpl::DestructionCallback callback); private: --#if defined(OS_LINUX) || defined(USE_OZONE) -+#if defined(OS_LINUX) || defined(OS_BSD) || defined(USE_OZONE) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(USE_OZONE) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || defined(USE_OZONE) std::unique_ptr client_native_pixmap_factory_; #endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__init.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__init.cc index 1a0aacbdf4b9..1861e04e373e 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__init.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__init.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/gpu/ipc/service/gpu_init.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/gpu/ipc/service/gpu_init.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/gpu/ipc/service/gpu_init.cc -@@ -92,7 +92,7 @@ void InitializePlatformOverlaySettings(GPUInfo* gpu_in +@@ -109,7 +109,7 @@ void InitializePlatformOverlaySettings(GPUInfo* gpu_in #endif } @@ -9,7 +9,7 @@ bool CanAccessNvidiaDeviceFile() { bool res = true; base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, -@@ -103,7 +103,7 @@ bool CanAccessNvidiaDeviceFile() { +@@ -120,7 +120,7 @@ bool CanAccessNvidiaDeviceFile() { } return res; } @@ -18,119 +18,83 @@ class GpuWatchdogInit { public: -@@ -161,7 +161,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL - gpu_info_.subpixel_font_rendering = true; - #endif +@@ -205,7 +205,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL + device_perf_info_ = device_perf_info; + } -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) if (gpu_info_.gpu.vendor_id == 0x10de && // NVIDIA gpu_info_.gpu.driver_vendor == "NVIDIA" && !CanAccessNvidiaDeviceFile()) return false; -@@ -213,7 +213,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL - delayed_watchdog_enable = true; - #endif - --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - // PreSandbox is mainly for resource handling and not related to the GPU - // driver, it doesn't need the GPU watchdog. The loadLibrary may take long - // time that killing and restarting the GPU process will not help. -@@ -258,7 +258,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -339,14 +339,14 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL } - - bool attempted_startsandbox = false; --#if defined(OS_LINUX) -+#if defined(OS_LINUX) && !defined(OS_BSD) - // On Chrome OS ARM Mali, GPU driver userspace creates threads when - // initializing a GL context, so start the sandbox early. - // TODO(zmo): Need to collect OS version before this. -@@ -267,7 +267,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL - watchdog_thread_.get(), &gpu_info_, gpu_preferences_); - attempted_startsandbox = true; - } --#endif // defined(OS_LINUX) -+#endif // defined(OS_LINUX) && !defined(OS_BSD) - - base::TimeTicks before_initialize_one_off = base::TimeTicks::Now(); - -@@ -291,14 +291,14 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL - } - if (gl_initialized && use_swiftshader && + if (gl_initialized && gl_use_swiftshader_ && gl::GetGLImplementation() != gl::kGLImplementationSwiftShaderGL) { --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) VLOG(1) << "Quit GPU process launch to fallback to SwiftShader cleanly " << "on Linux"; return false; #else gl::init::ShutdownGL(true); gl_initialized = false; --#endif // OS_LINUX -+#endif // OS_LINUX || OS_BSD +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) } if (!gl_initialized) { -@@ -324,7 +324,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL - } - } - --#if defined(OS_LINUX) -+#if defined(OS_LINUX) && !defined(OS_BSD) - // The ContentSandboxHelper is currently the only one implementation of - // gpu::GpuSandboxHelper and it has no dependency. Except on Linux where - // VaapiWrapper checks the GL implementation to determine which display -@@ -375,7 +375,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -426,7 +426,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL command_line, gpu_feature_info_, gpu_preferences_.disable_software_rasterizer, false); - if (use_swiftshader) { --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) + if (gl_use_swiftshader_) { +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) VLOG(1) << "Quit GPU process launch to fallback to SwiftShader cleanly " << "on Linux"; return false; -@@ -389,7 +389,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -440,7 +440,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL << "failed"; return false; } --#endif // OS_LINUX -+#endif // OS_LINUX || OS_BSD +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) } - } else { // use_swiftshader == true + } else { // gl_use_swiftshader_ == true switch (gpu_preferences_.use_vulkan) { -@@ -445,7 +445,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -516,7 +516,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL - InitializePlatformOverlaySettings(&gpu_info_); + InitializePlatformOverlaySettings(&gpu_info_, gpu_feature_info_); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // Driver may create a compatibility profile context when collect graphics // information on Linux platform. Try to collect graphics information // based on core profile context after disabling platform extensions. -@@ -464,7 +464,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -535,7 +535,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL return false; } } --#endif // defined(OS_LINUX) -+#endif // defined(OS_LINUX) || defined(OS_BSD) +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) - if (use_swiftshader) { + if (gl_use_swiftshader_) { AdjustInfoToSwiftShader(); -@@ -631,7 +631,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -703,7 +703,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c - InitializePlatformOverlaySettings(&gpu_info_); + InitializePlatformOverlaySettings(&gpu_info_, gpu_feature_info_); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // Driver may create a compatibility profile context when collect graphics // information on Linux platform. Try to collect graphics information // based on core profile context after disabling platform extensions. -@@ -651,7 +651,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -723,7 +723,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c } } } --#endif // defined(OS_LINUX) -+#endif // defined(OS_LINUX) || defined(OS_BSD) +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) - if (use_swiftshader) { + if (gl_use_swiftshader_) { AdjustInfoToSwiftShader(); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__memory__buffer__factory.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__memory__buffer__factory.cc index 3869ff69bd0a..a36899972fea 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__memory__buffer__factory.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__memory__buffer__factory.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/gpu/ipc/service/gpu_memory_buffer_factory.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/gpu/ipc/service/gpu_memory_buffer_factory.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/gpu/ipc/service/gpu_memory_buffer_factory.cc @@ -12,7 +12,7 @@ #include "gpu/ipc/service/gpu_memory_buffer_factory_io_surface.h" #endif --#if defined(OS_LINUX) || defined(OS_FUCHSIA) -+#if defined(OS_LINUX) || defined(OS_FUCHSIA) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_FUCHSIA) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_FUCHSIA) || defined(OS_BSD) #include "gpu/ipc/service/gpu_memory_buffer_factory_native_pixmap.h" #endif @@ -13,8 +13,8 @@ return std::make_unique(); #elif defined(OS_ANDROID) return std::make_unique(); --#elif defined(OS_LINUX) || defined(OS_FUCHSIA) -+#elif defined(OS_LINUX) || defined(OS_FUCHSIA) || defined(OS_BSD) +-#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_FUCHSIA) ++#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_FUCHSIA) || defined(OS_BSD) return std::make_unique( vulkan_context_provider); #elif defined(OS_WIN) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__watchdog__thread.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__watchdog__thread.cc index 18c1d9d4f780..d0d75deda70f 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__watchdog__thread.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__watchdog__thread.cc @@ -1,15 +1,15 @@ ---- src/3rdparty/chromium/gpu/ipc/service/gpu_watchdog_thread.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/gpu/ipc/service/gpu_watchdog_thread.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/gpu/ipc/service/gpu_watchdog_thread.cc -@@ -64,7 +64,7 @@ void GpuWatchdogTimeoutHistogram(GpuWatchdogTimeoutEve - base::UmaHistogramEnumeration("GPU.WatchdogThread.V1.Timeout", timeout_event); - } +@@ -57,7 +57,7 @@ const int kNewGpuTimeout = 15000; + const int kNewGpuTimeout = 15000; + #endif -#if defined(USE_X11) +#if defined(USE_X11) && !defined(OS_BSD) const base::FilePath::CharType kTtyFilePath[] = FILE_PATH_LITERAL("/sys/class/tty/tty0/active"); #endif -@@ -82,7 +82,7 @@ GpuWatchdogThreadImplV1::GpuWatchdogThreadImplV1() +@@ -75,7 +75,7 @@ GpuWatchdogThreadImplV1::GpuWatchdogThreadImplV1() arm_cpu_time_(), #endif suspension_counter_(this) @@ -18,7 +18,7 @@ , host_tty_(-1) #endif -@@ -104,7 +104,7 @@ GpuWatchdogThreadImplV1::GpuWatchdogThreadImplV1() +@@ -97,7 +97,7 @@ GpuWatchdogThreadImplV1::GpuWatchdogThreadImplV1() DCHECK(result); #endif @@ -27,7 +27,7 @@ tty_file_ = base::OpenFile(base::FilePath(kTtyFilePath), "r"); UpdateActiveTTY(); host_tty_ = active_tty_; -@@ -252,7 +252,7 @@ GpuWatchdogThreadImplV1::~GpuWatchdogThreadImplV1() { +@@ -239,7 +239,7 @@ GpuWatchdogThreadImplV1::~GpuWatchdogThreadImplV1() { base::PowerMonitor::RemoveObserver(this); @@ -36,7 +36,7 @@ if (tty_file_) fclose(tty_file_); #endif -@@ -435,7 +435,7 @@ void GpuWatchdogThreadImplV1::DeliberatelyTerminateToR +@@ -388,7 +388,7 @@ void GpuWatchdogThreadImplV1::DeliberatelyTerminateToR return; #endif @@ -45,7 +45,7 @@ // Don't crash if we're not on the TTY of our host X11 server. UpdateActiveTTY(); if (host_tty_ != -1 && active_tty_ != -1 && host_tty_ != active_tty_) { -@@ -610,7 +610,7 @@ base::ThreadTicks GpuWatchdogThreadImplV1::GetWatchedT +@@ -548,7 +548,7 @@ base::ThreadTicks GpuWatchdogThreadImplV1::GetWatchedT } #endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__watchdog__thread.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__watchdog__thread.h index 4e23c471b835..c114c47d3286 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__watchdog__thread.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__watchdog__thread.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/gpu/ipc/service/gpu_watchdog_thread.h.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/gpu/ipc/service/gpu_watchdog_thread.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/gpu/ipc/service/gpu_watchdog_thread.h @@ -213,7 +213,7 @@ class GPU_IPC_SERVICE_EXPORT GpuWatchdogThreadImplV1 base::ThreadTicks GetWatchedThreadTime(); @@ -9,9 +9,9 @@ void UpdateActiveTTY(); #endif -@@ -271,7 +271,7 @@ class GPU_IPC_SERVICE_EXPORT GpuWatchdogThreadImplV1 - // whether GpuWatchdogThreadEvent::kGpuWatchdogStart has been recorded. - bool is_watchdog_start_histogram_recorded = false; +@@ -261,7 +261,7 @@ class GPU_IPC_SERVICE_EXPORT GpuWatchdogThreadImplV1 + base::Time check_time_; + base::TimeTicks check_timeticks_; -#if defined(USE_X11) +#if defined(USE_X11) && !defined(OS_BSD) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__function__pointers.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__function__pointers.cc index 13bd6eef33ae..888fd629a259 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__function__pointers.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__function__pointers.cc @@ -1,32 +1,38 @@ ---- src/3rdparty/chromium/gpu/vulkan/vulkan_function_pointers.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/gpu/vulkan/vulkan_function_pointers.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/gpu/vulkan/vulkan_function_pointers.cc -@@ -828,7 +828,7 @@ bool VulkanFunctionPointers::BindDeviceFunctionPointer +@@ -862,7 +862,7 @@ bool VulkanFunctionPointers::BindDeviceFunctionPointer } #endif // defined(OS_ANDROID) --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) if (gfx::HasExtension(enabled_extensions, VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME)) { - vkGetSemaphoreFdKHRFn = reinterpret_cast( -@@ -847,9 +847,9 @@ bool VulkanFunctionPointers::BindDeviceFunctionPointer + vkGetSemaphoreFdKHR = reinterpret_cast( +@@ -881,7 +881,7 @@ bool VulkanFunctionPointers::BindDeviceFunctionPointer return false; } } --#endif // defined(OS_LINUX) || defined(OS_ANDROID) -+#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + #if defined(OS_WIN) + if (gfx::HasExtension(enabled_extensions, +@@ -906,7 +906,7 @@ bool VulkanFunctionPointers::BindDeviceFunctionPointer + } + #endif // defined(OS_WIN) + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) if (gfx::HasExtension(enabled_extensions, VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME)) { - vkGetMemoryFdKHRFn = reinterpret_cast( -@@ -869,7 +869,7 @@ bool VulkanFunctionPointers::BindDeviceFunctionPointer + vkGetMemoryFdKHR = reinterpret_cast( +@@ -926,7 +926,7 @@ bool VulkanFunctionPointers::BindDeviceFunctionPointer return false; } } --#endif // defined(OS_LINUX) || defined(OS_ANDROID) -+#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) - #if defined(OS_FUCHSIA) + #if defined(OS_WIN) if (gfx::HasExtension(enabled_extensions, diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__function__pointers.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__function__pointers.h index a28a148510bc..a3836d70cf42 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__function__pointers.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__function__pointers.h @@ -1,51 +1,70 @@ ---- src/3rdparty/chromium/gpu/vulkan/vulkan_function_pointers.h.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/gpu/vulkan/vulkan_function_pointers.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/gpu/vulkan/vulkan_function_pointers.h -@@ -227,15 +227,15 @@ struct VulkanFunctionPointers { - vkGetAndroidHardwareBufferPropertiesANDROIDFn; +@@ -236,10 +236,10 @@ struct COMPONENT_EXPORT(VULKAN) VulkanFunctionPointers + vkGetAndroidHardwareBufferPropertiesANDROID; #endif // defined(OS_ANDROID) --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) - VulkanFunction vkGetSemaphoreFdKHRFn; - VulkanFunction vkImportSemaphoreFdKHRFn; --#endif // defined(OS_LINUX) || defined(OS_ANDROID) -+#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) + VulkanFunction vkGetSemaphoreFdKHR; + VulkanFunction vkImportSemaphoreFdKHR; +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) - VulkanFunction vkGetMemoryFdKHRFn; - VulkanFunction vkGetMemoryFdPropertiesKHRFn; --#endif // defined(OS_LINUX) || defined(OS_ANDROID) -+#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + #if defined(OS_WIN) + VulkanFunction vkGetSemaphoreWin32HandleKHR; +@@ -247,10 +247,10 @@ struct COMPONENT_EXPORT(VULKAN) VulkanFunctionPointers + vkImportSemaphoreWin32HandleKHR; + #endif // defined(OS_WIN) - #if defined(OS_FUCHSIA) - VulkanFunction -@@ -447,18 +447,18 @@ struct VulkanFunctionPointers { - ->vkGetAndroidHardwareBufferPropertiesANDROIDFn +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) + VulkanFunction vkGetMemoryFdKHR; + VulkanFunction vkGetMemoryFdPropertiesKHR; +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) + + #if defined(OS_WIN) + VulkanFunction vkGetMemoryWin32HandleKHR; +@@ -955,7 +955,7 @@ ALWAYS_INLINE VkResult vkGetAndroidHardwareBufferPrope + } #endif // defined(OS_ANDROID) --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) - #define vkGetSemaphoreFdKHR \ - gpu::GetVulkanFunctionPointers()->vkGetSemaphoreFdKHRFn - #define vkImportSemaphoreFdKHR \ - gpu::GetVulkanFunctionPointers()->vkImportSemaphoreFdKHRFn --#endif // defined(OS_LINUX) || defined(OS_ANDROID) -+#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) + ALWAYS_INLINE VkResult + vkGetSemaphoreFdKHR(VkDevice device, + const VkSemaphoreGetFdInfoKHR* pGetFdInfo, +@@ -969,7 +969,7 @@ ALWAYS_INLINE VkResult vkImportSemaphoreFdKHR( + return gpu::GetVulkanFunctionPointers()->vkImportSemaphoreFdKHR( + device, pImportSemaphoreFdInfo); + } +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) - #define vkGetMemoryFdKHR gpu::GetVulkanFunctionPointers()->vkGetMemoryFdKHRFn - #define vkGetMemoryFdPropertiesKHR \ - gpu::GetVulkanFunctionPointers()->vkGetMemoryFdPropertiesKHRFn --#endif // defined(OS_LINUX) || defined(OS_ANDROID) -+#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + #if defined(OS_WIN) + ALWAYS_INLINE VkResult vkGetSemaphoreWin32HandleKHR( +@@ -988,7 +988,7 @@ vkImportSemaphoreWin32HandleKHR(VkDevice device, + } + #endif // defined(OS_WIN) - #if defined(OS_FUCHSIA) - #define vkImportSemaphoreZirconHandleFUCHSIA \ -@@ -493,4 +493,4 @@ struct VulkanFunctionPointers { - gpu::GetVulkanFunctionPointers()->vkGetSwapchainImagesKHRFn - #define vkQueuePresentKHR gpu::GetVulkanFunctionPointers()->vkQueuePresentKHRFn +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) + ALWAYS_INLINE VkResult vkGetMemoryFdKHR(VkDevice device, + const VkMemoryGetFdInfoKHR* pGetFdInfo, + int* pFd) { +@@ -1003,7 +1003,7 @@ vkGetMemoryFdPropertiesKHR(VkDevice device, + return gpu::GetVulkanFunctionPointers()->vkGetMemoryFdPropertiesKHR( + device, handleType, fd, pMemoryFdProperties); + } +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) + + #if defined(OS_WIN) + ALWAYS_INLINE VkResult vkGetMemoryWin32HandleKHR( +@@ -1083,4 +1083,4 @@ ALWAYS_INLINE VkResult vkQueuePresentKHR(VkQueue queue + pPresentInfo); + } -#endif // GPU_VULKAN_VULKAN_FUNCTION_POINTERS_H_ \ No newline at end of file diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_BUILD.gn deleted file mode 100644 index d496b245ecb4..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_BUILD.gn +++ /dev/null @@ -1,56 +0,0 @@ ---- src/3rdparty/chromium/headless/BUILD.gn.orig 2020-11-07 01:22:36 UTC -+++ src/3rdparty/chromium/headless/BUILD.gn -@@ -276,7 +276,7 @@ jumbo_source_set("headless_shared_sources") { - sources += generated_devtools_api - sources += get_target_outputs(":protocol_sources") - -- if (!is_fuchsia) { -+ if (!is_fuchsia && !is_bsd) { - sources += [ - "lib/headless_crash_reporter_client.cc", - "lib/headless_crash_reporter_client.h", -@@ -295,7 +295,7 @@ jumbo_source_set("headless_shared_sources") { - "//url", - ] - -- if (!is_fuchsia) { -+ if (!is_fuchsia && !is_bsd) { - deps += [ "//components/crash/content/browser" ] - } - if (is_component_build && is_win) { -@@ -451,7 +451,7 @@ jumbo_component("headless_non_renderer") { - "//v8", - ] - -- if (!is_fuchsia) { -+ if (!is_fuchsia && !is_bsd) { - deps += [ "//components/crash/content/browser" ] - } - if (is_win) { -@@ -598,7 +598,7 @@ test("headless_unittests") { - "//testing/gtest", - ] - -- if (!is_fuchsia) { -+ if (!is_fuchsia && !is_bsd) { - deps += [ "//components/crash/content/browser" ] - } - -@@ -682,7 +682,7 @@ test("headless_browsertests") { - "//ui/base/clipboard", - ] - -- if (!is_fuchsia) { -+ if (!is_fuchsia && !is_bsd) { - deps += [ "//components/crash/content/browser" ] - } - -@@ -810,7 +810,7 @@ jumbo_static_library("headless_shell_lib") { - public_deps += [ ":headless_non_renderer" ] - } - -- if (!is_fuchsia) { -+ if (!is_fuchsia && !is_bsd) { - deps += [ "//components/crash/content/browser" ] - } - diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__content__browser__client.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__content__browser__client.cc deleted file mode 100644 index fc29f01740e0..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__content__browser__client.cc +++ /dev/null @@ -1,29 +0,0 @@ ---- src/3rdparty/chromium/headless/lib/browser/headless_content_browser_client.cc.orig 2020-11-07 01:22:36 UTC -+++ src/3rdparty/chromium/headless/lib/browser/headless_content_browser_client.cc -@@ -157,7 +157,7 @@ HeadlessContentBrowserClient::GetGeneratedCodeCacheSet - return content::GeneratedCodeCacheSettings(true, 0, context->GetPath()); - } - --#if defined(OS_POSIX) && !defined(OS_MACOSX) -+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD) - void HeadlessContentBrowserClient::GetAdditionalMappedFilesForChildProcess( - const base::CommandLine& command_line, - int child_process_id, -@@ -168,7 +168,7 @@ void HeadlessContentBrowserClient::GetAdditionalMapped - mappings->Share(service_manager::kCrashDumpSignal, crash_signal_fd); - #endif // defined(HEADLESS_USE_BREAKPAD) - } --#endif // defined(OS_POSIX) && !defined(OS_MACOSX) -+#endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD) - - void HeadlessContentBrowserClient::AppendExtraCommandLineSwitches( - base::CommandLine* command_line, -@@ -231,7 +231,7 @@ void HeadlessContentBrowserClient::AppendExtraCommandL - process_type, child_process_id); - } - --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - // Processes may only query perf_event_open with the BPF sandbox disabled. - if (old_command_line.HasSwitch(::switches::kEnableThreadInstructionCount) && - old_command_line.HasSwitch(service_manager::switches::kNoSandbox)) { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__content__browser__client.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__content__browser__client.h deleted file mode 100644 index 8149762c1f44..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__content__browser__client.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/headless/lib/browser/headless_content_browser_client.h.orig 2019-05-23 12:39:34 UTC -+++ src/3rdparty/chromium/headless/lib/browser/headless_content_browser_client.h -@@ -34,7 +34,7 @@ class HeadlessContentBrowserClient : public content::C - ::storage::OptionalQuotaSettingsCallback callback) override; - content::GeneratedCodeCacheSettings GetGeneratedCodeCacheSettings( - content::BrowserContext* context) override; --#if defined(OS_POSIX) && !defined(OS_MACOSX) -+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD) - void GetAdditionalMappedFilesForChildProcess( - const base::CommandLine& command_line, - int child_process_id, diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__request__context__manager.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__request__context__manager.cc deleted file mode 100644 index ad33b76c8e1f..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__request__context__manager.cc +++ /dev/null @@ -1,29 +0,0 @@ ---- src/3rdparty/chromium/headless/lib/browser/headless_request_context_manager.cc.orig 2019-11-27 21:12:25 UTC -+++ src/3rdparty/chromium/headless/lib/browser/headless_request_context_manager.cc -@@ -23,7 +23,7 @@ namespace headless { - - namespace { - --#if defined(OS_LINUX) && !defined(OS_CHROMEOS) -+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) - static char kProductName[] = "HeadlessChrome"; - #endif - -@@ -53,7 +53,7 @@ net::NetworkTrafficAnnotationTag GetProxyConfigTraffic - return traffic_annotation; - } - --#if defined(OS_LINUX) && !defined(OS_CHROMEOS) -+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) - ::network::mojom::CryptConfigPtr BuildCryptConfigOnce( - const base::FilePath& user_data_path) { - static bool done_once = false; -@@ -193,7 +193,7 @@ HeadlessRequestContextManager::HeadlessRequestContextM - proxy_config_monitor_ = std::make_unique( - base::ThreadTaskRunnerHandle::Get()); - } --#if defined(OS_LINUX) && !defined(OS_CHROMEOS) -+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) - auto crypt_config = BuildCryptConfigOnce(user_data_path_); - if (crypt_config) - content::GetNetworkService()->SetCryptConfig(std::move(crypt_config)); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_headless__content__main__delegate.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_headless__content__main__delegate.cc deleted file mode 100644 index 4096c07e657f..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_headless__content__main__delegate.cc +++ /dev/null @@ -1,38 +0,0 @@ ---- src/3rdparty/chromium/headless/lib/headless_content_main_delegate.cc.orig 2020-11-07 01:22:36 UTC -+++ src/3rdparty/chromium/headless/lib/headless_content_main_delegate.cc -@@ -322,7 +322,7 @@ void HeadlessContentMainDelegate::InitCrashReporter( - const base::CommandLine& command_line) { - if (command_line.HasSwitch(::switches::kDisableBreakpad)) - return; --#if defined(OS_FUCHSIA) -+#if defined(OS_FUCHSIA) || defined(OS_BSD) - // TODO(fuchsia): Implement this when crash reporting/Breakpad are available - // in Fuchsia. (crbug.com/753619) - NOTIMPLEMENTED(); -@@ -351,7 +351,7 @@ void HeadlessContentMainDelegate::InitCrashReporter( - crash_reporter::InitializeCrashpadWithEmbeddedHandler( - process_type.empty(), process_type, "", base::FilePath()); - #endif // defined(HEADLESS_USE_BREAKPAD) --#endif // defined(OS_FUCHSIA) -+#endif // defined(OS_FUCHSIA) || defined(OS_BSD) - } - - -@@ -405,7 +405,7 @@ int HeadlessContentMainDelegate::RunProcess( - } - #endif // !defined(CHROME_MULTIPLE_DLL_CHILD) - --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - void SIGTERMProfilingShutdown(int signal) { - content::Profiling::Stop(); - struct sigaction sigact; -@@ -440,7 +440,7 @@ void HeadlessContentMainDelegate::ZygoteForked() { - breakpad::InitCrashReporter(process_type); - #endif - } --#endif // defined(OS_LINUX) -+#endif // defined(OS_LINUX) || defined(OS_BSD) - - // static - HeadlessContentMainDelegate* HeadlessContentMainDelegate::GetInstance() { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_headless__content__main__delegate.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_headless__content__main__delegate.h deleted file mode 100644 index 9db0c5da6b17..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_headless__content__main__delegate.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/headless/lib/headless_content_main_delegate.h.orig 2019-11-27 21:12:25 UTC -+++ src/3rdparty/chromium/headless/lib/headless_content_main_delegate.h -@@ -58,7 +58,7 @@ class HEADLESS_EXPORT HeadlessContentMainDelegate - - HeadlessBrowserImpl* browser() const { return browser_.get(); } - --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - void ZygoteForked() override; - #endif - diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_headless__macros.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_headless__macros.h deleted file mode 100644 index 0cacf68ca091..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_headless__macros.h +++ /dev/null @@ -1,13 +0,0 @@ ---- src/3rdparty/chromium/headless/lib/headless_macros.h.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/headless/lib/headless_macros.h -@@ -7,8 +7,8 @@ - - #include "build/build_config.h" - --#if defined(OS_POSIX) && !defined(OS_MACOSX) -+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD) - #define HEADLESS_USE_BREAKPAD --#endif // defined(OS_POSIX) && !defined(OS_MACOSX) -+#endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD) - - #endif // HEADLESS_LIB_HEADLESS_MACROS_H_ diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__channel.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__channel.h index a02c3aba19eb..24a3f2dbebbc 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__channel.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__channel.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/ipc/ipc_channel.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/ipc/ipc_channel.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/ipc/ipc_channel.h -@@ -244,7 +244,7 @@ class COMPONENT_EXPORT(IPC) Channel : public Sender { +@@ -245,7 +245,7 @@ class COMPONENT_EXPORT(IPC) Channel : public Sender { static std::string GenerateUniqueRandomChannelID(); #endif --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // Sandboxed processes live in a PID namespace, so when sending the IPC hello // message from client to server we need to send the PID from the global // PID namespace. diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__channel__common.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__channel__common.cc index 5bc6e3b690bd..3ce6c1e3e101 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__channel__common.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__channel__common.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/ipc/ipc_channel_common.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/ipc/ipc_channel_common.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/ipc/ipc_channel_common.cc -@@ -10,7 +10,7 @@ +@@ -10,7 +10,7 @@ namespace IPC { namespace IPC { --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) namespace { int g_global_pid = 0; @@ -13,8 +13,8 @@ return g_global_pid; } --#endif // defined(OS_LINUX) -+#endif // defined(OS_LINUX) || defined(OS_BSD) +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // static std::unique_ptr Channel::CreateClient( diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__channel__mojo.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__channel__mojo.cc index 33b019e3f748..1291c9af6b2c 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__channel__mojo.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__channel__mojo.cc @@ -1,11 +1,15 @@ ---- src/3rdparty/chromium/ipc/ipc_channel_mojo.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/ipc/ipc_channel_mojo.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/ipc/ipc_channel_mojo.cc -@@ -64,7 +64,7 @@ class MojoChannelFactory : public ChannelFactory { +@@ -74,10 +74,10 @@ base::ProcessId GetSelfPID() { }; base::ProcessId GetSelfPID() { --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) if (int global_pid = Channel::GetGlobalPid()) return global_pid; - #endif // OS_LINUX +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + #if defined(OS_NACL) + return -1; + #else diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__message__utils.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__message__utils.cc index 8c8449f7f08b..decda8e66c2f 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__message__utils.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__message__utils.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/ipc/ipc_message_utils.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/ipc/ipc_message_utils.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/ipc/ipc_message_utils.cc -@@ -348,7 +348,7 @@ void ParamTraits::Log(const param_type& +@@ -356,7 +356,7 @@ void ParamTraits::Log(const param_type& l->append(base::NumberToString(p)); } --#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_FUCHSIA) || \ -+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) || defined(OS_FUCHSIA) || \ - (defined(OS_ANDROID) && defined(ARCH_CPU_64_BITS)) +-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \ ++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || \ + defined(OS_FUCHSIA) || (defined(OS_ANDROID) && defined(ARCH_CPU_64_BITS)) void ParamTraits::Log(const param_type& p, std::string* l) { l->append(base::NumberToString(p)); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__message__utils.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__message__utils.h index 200fda59c907..5bae2a9000eb 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__message__utils.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__message__utils.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/ipc/ipc_message_utils.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/ipc/ipc_message_utils.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/ipc/ipc_message_utils.h -@@ -203,7 +203,7 @@ struct ParamTraits { +@@ -209,7 +209,7 @@ struct ParamTraits { // 3) Android 64 bit and Fuchsia also have int64_t typedef'd to long. // Since we want to support Android 32<>64 bit IPC, as long as we don't have // these traits for 32 bit ARM then that'll catch any errors. --#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_FUCHSIA) || \ -+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) || defined(OS_FUCHSIA) || \ - (defined(OS_ANDROID) && defined(ARCH_CPU_64_BITS)) +-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \ ++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || \ + defined(OS_FUCHSIA) || (defined(OS_ANDROID) && defined(ARCH_CPU_64_BITS)) template <> struct ParamTraits { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_BUILD.gn index 25b9547160f6..e88f47bef29a 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_BUILD.gn +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_BUILD.gn @@ -1,13 +1,20 @@ ---- src/3rdparty/chromium/media/audio/BUILD.gn.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/media/audio/BUILD.gn.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/media/audio/BUILD.gn -@@ -240,8 +240,18 @@ source_set("audio") { - deps += [ "//media/base/android:media_jni_headers" ] +@@ -234,7 +234,7 @@ source_set("audio") { + ] } -- if (is_linux) { -+ if (is_linux && !use_sndio) { +- if (is_linux || is_chromeos) { ++ if ((is_linux || is_chromeos) && !use_sndio) { sources += [ "linux/audio_manager_linux.cc" ] + } + +@@ -297,6 +297,17 @@ source_set("audio") { + } else { + deps += [ ":libpulse_stubs" ] + } + } ++ + if (use_sndio) { + libs += [ "sndio" ] + sources += [ @@ -15,8 +22,8 @@ + "sndio/sndio_input.cc", + "sndio/sndio_input.h", + "sndio/sndio_output.cc", -+ "sndio/sndio_output.h" ++ "sndio/sndio_output.h", + ] } - if (use_alsa) { + if (is_fuchsia) { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_alsa_audio__manager__alsa.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_alsa_audio__manager__alsa.cc index a7c26b66f025..5d009360c9b9 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_alsa_audio__manager__alsa.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_alsa_audio__manager__alsa.cc @@ -1,26 +1,26 @@ ---- src/3rdparty/chromium/media/audio/alsa/audio_manager_alsa.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/media/audio/alsa/audio_manager_alsa.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/media/audio/alsa/audio_manager_alsa.cc -@@ -93,7 +93,9 @@ void AudioManagerAlsa::GetAlsaAudioDevices(StreamType +@@ -89,7 +89,9 @@ void AudioManagerAlsa::GetAlsaAudioDevices(StreamType int card = -1; // Loop through the sound cards to get ALSA device hints. -+#ifdef OS_LINUX ++#if defined(OS_LINUX) while (!wrapper_->CardNext(&card) && card >= 0) { +#endif void** hints = NULL; int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints); if (!error) { -@@ -105,7 +107,9 @@ void AudioManagerAlsa::GetAlsaAudioDevices(StreamType +@@ -101,7 +103,9 @@ void AudioManagerAlsa::GetAlsaAudioDevices(StreamType DLOG(WARNING) << "GetAlsaAudioDevices: unable to get device hints: " << wrapper_->StrError(error); } -+#ifdef OS_LINUX ++#if defined(OS_LINUX) } +#endif } void AudioManagerAlsa::GetAlsaDevicesInfo(AudioManagerAlsa::StreamType type, -@@ -188,7 +192,11 @@ bool AudioManagerAlsa::IsAlsaDeviceAvailable( +@@ -184,7 +188,11 @@ bool AudioManagerAlsa::IsAlsaDeviceAvailable( // goes through software conversion if needed (e.g. incompatible // sample rate). // TODO(joi): Should we prefer "hw" instead? @@ -30,23 +30,23 @@ + static const char kDeviceTypeDesired[] = "plug"; +#endif return strncmp(kDeviceTypeDesired, device_name, - arraysize(kDeviceTypeDesired) - 1) == 0; + base::size(kDeviceTypeDesired) - 1) == 0; } -@@ -210,7 +218,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDevice( +@@ -206,7 +214,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDevice( // Loop through the sound cards. // Don't use snd_device_name_hint(-1,..) since there is a access violation // inside this ALSA API with libasound.so.2.0.0. -+#ifdef OS_LINUX ++#if defined(OS_LINUX) while (!wrapper_->CardNext(&card) && (card >= 0) && !has_device) { +#endif int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints); if (!error) { for (void** hint_iter = hints; *hint_iter != NULL; hint_iter++) { -@@ -234,7 +244,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDevice( +@@ -230,7 +240,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDevice( DLOG(WARNING) << "HasAnyAudioDevice: unable to get device hints: " << wrapper_->StrError(error); } -+#ifdef OS_LINUX ++#if defined(OS_LINUX) } +#endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__features.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__features.cc index 55c0f4e13ddd..212850d8d219 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__features.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__features.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/media/audio/audio_features.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/media/audio/audio_features.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/media/audio/audio_features.cc -@@ -11,7 +11,7 @@ namespace features { +@@ -11,7 +11,7 @@ const base::Feature kAudioServiceOutOfProcessKillAtHan // detected. It will be restarted when needed. const base::Feature kAudioServiceOutOfProcessKillAtHang{ "AudioServiceOutOfProcessKillAtHang", --#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || \ ++#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || defined(OS_BSD) || \ + defined(OS_CHROMEOS) base::FEATURE_ENABLED_BY_DEFAULT #else - base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__input__device.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__input__device.cc index abdee2ffadf6..1c2d2bb40b21 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__input__device.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__input__device.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/media/audio/audio_input_device.cc.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/media/audio/audio_input_device.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/media/audio/audio_input_device.cc -@@ -248,7 +248,7 @@ void AudioInputDevice::OnStreamCreated( - // also a risk of false positives if we are suspending when starting the stream +@@ -253,7 +253,7 @@ void AudioInputDevice::OnStreamCreated( // here. See comments in AliveChecker and PowerObserverHelper for details and // todos. --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - const bool stop_at_first_alive_notification = true; - const bool pause_check_during_suspend = false; + if (detect_dead_stream_ == DeadStreamDetection::kEnabled) { +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + const bool stop_at_first_alive_notification = true; + const bool pause_check_during_suspend = false; #else diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__manager.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__manager.cc index 025eff421ad5..252941eb736d 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__manager.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__manager.cc @@ -1,29 +1,29 @@ ---- src/3rdparty/chromium/media/audio/audio_manager.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/media/audio/audio_manager.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/media/audio/audio_manager.cc -@@ -94,7 +94,7 @@ class AudioManagerHelper : public base::PowerObserver +@@ -48,7 +48,7 @@ class AudioManagerHelper { } #endif --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) void set_app_name(const std::string& app_name) { app_name_ = app_name; } const std::string& app_name() const { return app_name_; } #endif -@@ -229,7 +229,7 @@ class AudioManagerHelper : public base::PowerObserver +@@ -59,7 +59,7 @@ class AudioManagerHelper { std::unique_ptr com_initializer_for_testing_; #endif --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) std::string app_name_; #endif -@@ -313,7 +313,7 @@ void AudioManager::StartHangMonitorIfNeeded( - GetHelper()->StartHangTimer(std::move(task_runner)); +@@ -130,7 +130,7 @@ std::unique_ptr AudioManager::CreateForT + return Create(std::move(audio_thread), GetHelper()->fake_log_factory()); } --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // static void AudioManager::SetGlobalAppName(const std::string& app_name) { GetHelper()->set_app_name(app_name); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__manager.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__manager.h index 052c3b0313dc..e7bd059c3168 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__manager.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__manager.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/media/audio/audio_manager.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/media/audio/audio_manager.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/media/audio/audio_manager.h -@@ -70,7 +70,7 @@ class MEDIA_EXPORT AudioManager { - static void StartHangMonitorIfNeeded( - scoped_refptr task_runner); +@@ -60,7 +60,7 @@ class MEDIA_EXPORT AudioManager { + static std::unique_ptr CreateForTesting( + std::unique_ptr audio_thread); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // Sets the name of the audio source as seen by external apps. Only actually - // used with PulseAudio as of this writing. + // used with PulseAudio and MPRIS as of this writing. static void SetGlobalAppName(const std::string& app_name); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_audio__latency.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_audio__latency.cc index 60f0cc03deaa..b85057d7d88e 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_audio__latency.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_audio__latency.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/media/base/audio_latency.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/media/base/audio_latency.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/media/base/audio_latency.cc -@@ -106,7 +106,7 @@ int AudioLatency::GetRtcBufferSize(int sample_rate, in +@@ -113,7 +113,7 @@ int AudioLatency::GetRtcBufferSize(int sample_rate, in return frames_per_buffer; } --#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_FUCHSIA) -+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_FUCHSIA) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || \ ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || defined(OS_BSD) || \ + defined(OS_FUCHSIA) // On Linux, MacOS and Fuchsia, the low level IO implementations on the // browser side supports all buffer size the clients want. We use the native - // peer connection buffer size (10ms) to achieve best possible performance. diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_media__switches.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_media__switches.cc index 655e73968b37..7fdca1cea0dd 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_media__switches.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_media__switches.cc @@ -1,9 +1,18 @@ ---- src/3rdparty/chromium/media/base/media_switches.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/media/base/media_switches.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/media/base/media_switches.cc -@@ -346,7 +346,7 @@ const base::Feature kGav1VideoDecoder{"Gav1VideoDecode +@@ -361,7 +361,7 @@ const base::Feature kGlobalMediaControls { const base::Feature kGlobalMediaControls { "GlobalMediaControls", - #if defined(OS_WIN) || defined(OS_MACOSX) || \ + #if defined(OS_WIN) || defined(OS_MAC) || \ +- (defined(OS_LINUX) && !defined(OS_CHROMEOS)) ++ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) + base::FEATURE_ENABLED_BY_DEFAULT + #else + base::FEATURE_DISABLED_BY_DEFAULT +@@ -390,7 +390,7 @@ const base::Feature kGlobalMediaControlsPictureInPictu + const base::Feature kGlobalMediaControlsPictureInPicture { + "GlobalMediaControlsPictureInPicture", + #if defined(OS_WIN) || defined(OS_MAC) || \ - (defined(OS_LINUX) && !defined(OS_CHROMEOS)) + (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) base::FEATURE_ENABLED_BY_DEFAULT diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_scopedfd__helper.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_scopedfd__helper.h index d43f44cd4c09..bc6cc0f09e20 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_scopedfd__helper.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_scopedfd__helper.h @@ -1,23 +1,19 @@ ---- src/3rdparty/chromium/media/base/scopedfd_helper.h.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/media/base/scopedfd_helper.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/media/base/scopedfd_helper.h -@@ -11,17 +11,17 @@ - namespace media { - - // Theoretically, we can test on defined(OS_POSIX) || defined(OS_FUCHSIA), but --// since the only current user is V4L2 we are limiting the scope to OS_LINUX so -+// since the only current user is V4L2 we are limiting the scope to OS_LINUX || OS_BSD so +@@ -14,14 +14,14 @@ namespace media { + // since the only current user is V4L2 we are limiting the scope to OS_LINUX so // the binary size does not inflate on non-using systems. Feel free to adapt // this and BUILD.gn as our needs evolve. --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // Return a new vector containing duplicates of |fds|, or PCHECKs in case of an // error. MEDIA_EXPORT std::vector DuplicateFDs( const std::vector& fds); --#endif // OS_LINUX -+#endif // OS_LINUX || OS_BSD +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) } // namespace media diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_status.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_status.cc index a01106d43bbe..8163a80d7594 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_status.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_status.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/media/base/status.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/media/base/status.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/media/base/status.cc -@@ -66,7 +66,9 @@ Status&& Status::AddCause(Status&& cause) && { +@@ -70,7 +70,9 @@ void Status::AddFrame(const base::Location& location) void Status::AddFrame(const base::Location& location) { DCHECK(data_); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_video__frame.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_video__frame.cc index 1852a3b25f3a..64ce86596af3 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_video__frame.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_video__frame.cc @@ -1,74 +1,83 @@ ---- src/3rdparty/chromium/media/base/video_frame.cc.orig 2020-03-16 14:04:24 UTC +--- src/3rdparty/chromium/media/base/video_frame.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/media/base/video_frame.cc -@@ -57,7 +57,7 @@ std::string VideoFrame::StorageTypeToString( +@@ -60,7 +60,7 @@ std::string VideoFrame::StorageTypeToString( return "OWNED_MEMORY"; case VideoFrame::STORAGE_SHMEM: return "SHMEM"; --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) case VideoFrame::STORAGE_DMABUFS: return "DMABUFS"; #endif -@@ -74,7 +74,7 @@ std::string VideoFrame::StorageTypeToString( +@@ -77,7 +77,7 @@ bool VideoFrame::IsStorageTypeMappable(VideoFrame::Sto // static bool VideoFrame::IsStorageTypeMappable(VideoFrame::StorageType storage_type) { return --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // This is not strictly needed but makes explicit that, at VideoFrame // level, DmaBufs are not mappable from userspace. storage_type != VideoFrame::STORAGE_DMABUFS && -@@ -257,7 +257,7 @@ static base::Optional GetDefaultLayo +@@ -262,7 +262,7 @@ static base::Optional GetDefaultLayo return VideoFrameLayout::CreateWithPlanes(format, coded_size, planes); } --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // This class allows us to embed a vector into a scoped_refptr, and // thus to have several VideoFrames share the same set of DMABUF FDs. class VideoFrame::DmabufHolder -@@ -275,7 +275,7 @@ class VideoFrame::DmabufHolder +@@ -280,7 +280,7 @@ class VideoFrame::DmabufHolder friend class base::RefCountedThreadSafe; ~DmabufHolder() = default; }; --#endif // defined(OS_LINUX) -+#endif // defined(OS_LINUX) || defined(OS_BSD) +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // static bool VideoFrame::IsValidConfig(VideoPixelFormat format, -@@ -588,7 +588,7 @@ scoped_refptr VideoFrame::WrapExternalGpuM +@@ -607,7 +607,7 @@ scoped_refptr VideoFrame::WrapExternalGpuM + } + + uint64_t modifier = gfx::NativePixmapHandle::kNoModifier; +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + if (gpu_memory_buffer->GetType() == gfx::NATIVE_PIXMAP) { + const auto gmb_handle = gpu_memory_buffer->CloneHandle(); + if (gmb_handle.is_null() || +@@ -645,7 +645,7 @@ scoped_refptr VideoFrame::WrapExternalGpuM return frame; } --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // static scoped_refptr VideoFrame::WrapExternalDmabufs( const VideoFrameLayout& layout, -@@ -724,7 +724,7 @@ scoped_refptr VideoFrame::WrapVideoFrame( +@@ -847,7 +847,7 @@ scoped_refptr VideoFrame::WrapVideoFrame( } } --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) DCHECK(frame->dmabuf_fds_); // If there are any |dmabuf_fds_| plugged in, we should refer them too. wrapping_frame->dmabuf_fds_ = frame->dmabuf_fds_; -@@ -1050,7 +1050,7 @@ VideoFrame::mailbox_holder(size_t texture_index) const +@@ -1190,7 +1190,7 @@ VideoFrame::mailbox_holder(size_t texture_index) const : mailbox_holders_[texture_index]; } --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) const std::vector& VideoFrame::DmabufFds() const { DCHECK_EQ(storage_type_, STORAGE_DMABUFS); -@@ -1133,7 +1133,7 @@ VideoFrame::VideoFrame(const VideoFrameLayout& layout, +@@ -1273,7 +1273,7 @@ VideoFrame::VideoFrame(const VideoFrameLayout& layout, storage_type_(storage_type), visible_rect_(Intersection(visible_rect, gfx::Rect(layout.coded_size()))), natural_size_(natural_size), --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) dmabuf_fds_(base::MakeRefCounted()), #endif timestamp_(timestamp), diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_video__frame.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_video__frame.h index 1250f8a74c1d..61d4be14a39e 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_video__frame.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_video__frame.h @@ -1,50 +1,50 @@ ---- src/3rdparty/chromium/media/base/video_frame.h.orig 2020-03-16 14:04:24 UTC +--- src/3rdparty/chromium/media/base/video_frame.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/media/base/video_frame.h -@@ -39,9 +39,9 @@ +@@ -41,9 +41,9 @@ #include "base/mac/scoped_cftyperef.h" - #endif // defined(OS_MACOSX) + #endif // defined(OS_MAC) --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "base/files/scoped_file.h" --#endif // defined(OS_LINUX) -+#endif // defined(OS_LINUX) || defined(OS_BSD) +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) namespace gfx { class GpuMemoryBuffer; -@@ -80,7 +80,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -83,7 +83,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte STORAGE_UNOWNED_MEMORY = 2, // External, non owned data pointers. STORAGE_OWNED_MEMORY = 3, // VideoFrame has allocated its own data buffer. STORAGE_SHMEM = 4, // Backed by unsafe (writable) shared memory. --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // TODO(mcasas): Consider turning this type into STORAGE_NATIVE // based on the idea of using this same enum value for both DMA // buffers on Linux and CVPixelBuffers on Mac (which currently use -@@ -245,7 +245,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -260,7 +260,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte ReleaseMailboxCB mailbox_holder_release_cb, base::TimeDelta timestamp); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // Wraps provided dmabufs // (https://www.kernel.org/doc/html/latest/driver-api/dma-buf.html) with a // VideoFrame. The frame will take ownership of |dmabuf_fds|, and will -@@ -476,7 +476,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -507,7 +507,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte // mailbox, the caller must wait for the included sync point. const gpu::MailboxHolder& mailbox_holder(size_t texture_index) const; --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // Returns a vector containing the backing DmaBufs for this frame. The number // of returned DmaBufs will be equal or less than the number of planes of // the frame. If there are less, this means that the last FD contains the -@@ -662,7 +662,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -696,7 +696,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte // GPU memory buffer, if this frame is STORAGE_GPU_MEMORY_BUFFER. std::unique_ptr gpu_memory_buffer_; --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) class DmabufHolder; // Dmabufs for the frame, used when storage is STORAGE_DMABUFS. Size is either diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_blink_webmediaplayer__impl.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_blink_webmediaplayer__impl.cc deleted file mode 100644 index 2c1a72a6e7d9..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_blink_webmediaplayer__impl.cc +++ /dev/null @@ -1,15 +0,0 @@ ---- src/3rdparty/chromium/media/blink/webmediaplayer_impl.cc.orig 2020-11-07 01:22:36 UTC -+++ src/3rdparty/chromium/media/blink/webmediaplayer_impl.cc -@@ -280,7 +280,11 @@ void CreateAllocation(base::trace_event::ProcessMemory - - auto* std_allocator = base::trace_event::MemoryDumpManager::GetInstance() - ->system_allocator_pool_name(); -- pmd->AddSuballocation(dump->guid(), std_allocator); -+ if (std_allocator == nullptr) { -+ pmd->AddSuballocation(dump->guid(), std::string()); -+ } else { -+ pmd->AddSuballocation(dump->guid(), std_allocator); -+ } - } - - } // namespace diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_create__video__capture__device__factory.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_create__video__capture__device__factory.cc index 667722536567..e89a19ab9754 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_create__video__capture__device__factory.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_create__video__capture__device__factory.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/media/capture/video/create_video_capture_device_factory.cc.orig 2019-03-07 09:23:57 UTC +--- src/3rdparty/chromium/media/capture/video/create_video_capture_device_factory.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/media/capture/video/create_video_capture_device_factory.cc @@ -10,7 +10,7 @@ #include "media/capture/video/fake_video_capture_device_factory.h" @@ -8,8 +8,8 @@ +#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) #include "media/capture/video/linux/video_capture_device_factory_linux.h" #elif defined(OS_CHROMEOS) - #include "media/capture/video/chromeos/public/cros_features.h" -@@ -31,7 +31,7 @@ namespace { + #include "media/capture/video/chromeos/camera_app_device_bridge_impl.h" +@@ -82,7 +82,7 @@ CreatePlatformSpecificVideoCaptureDeviceFactory( std::unique_ptr CreatePlatformSpecificVideoCaptureDeviceFactory( scoped_refptr ui_task_runner) { @@ -17,4 +17,4 @@ +#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) return std::make_unique(ui_task_runner); #elif defined(OS_CHROMEOS) - // On Chrome OS we have to support two use cases: + return CreateChromeOSVideoCaptureDeviceFactory(ui_task_runner, {}); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_fake__video__capture__device__factory.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_fake__video__capture__device__factory.cc index 738f83887ee7..df4b71711a26 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_fake__video__capture__device__factory.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_fake__video__capture__device__factory.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/media/capture/video/fake_video_capture_device_factory.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/media/capture/video/fake_video_capture_device_factory.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/media/capture/video/fake_video_capture_device_factory.cc -@@ -200,7 +200,7 @@ void FakeVideoCaptureDeviceFactory::GetDeviceDescripto +@@ -208,7 +208,7 @@ void FakeVideoCaptureDeviceFactory::GetDevicesInfo( + int entry_index = 0; for (const auto& entry : devices_config_) { - device_descriptors->emplace_back( - base::StringPrintf("fake_device_%d", entry_index), entry.device_id, --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - VideoCaptureApi::LINUX_V4L2_SINGLE_PLANE - #elif defined(OS_MACOSX) - VideoCaptureApi::MACOSX_AVFOUNDATION + VideoCaptureApi api = +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + VideoCaptureApi::LINUX_V4L2_SINGLE_PLANE; + #elif defined(OS_MAC) + VideoCaptureApi::MACOSX_AVFOUNDATION; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_file__video__capture__device__factory.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_file__video__capture__device__factory.cc index 86332f519852..6aa602d91dd9 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_file__video__capture__device__factory.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_file__video__capture__device__factory.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/media/capture/video/file_video_capture_device_factory.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/media/capture/video/file_video_capture_device_factory.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/media/capture/video/file_video_capture_device_factory.cc -@@ -53,7 +53,7 @@ void FileVideoCaptureDeviceFactory::GetDeviceDescripto - #elif defined(OS_MACOSX) - command_line_file_path.value(), kFileVideoCaptureDeviceName, - VideoCaptureApi::MACOSX_AVFOUNDATION --#elif defined(OS_LINUX) -+#elif defined(OS_LINUX) || defined(OS_BSD) - command_line_file_path.value(), kFileVideoCaptureDeviceName, - VideoCaptureApi::LINUX_V4L2_SINGLE_PLANE +@@ -52,7 +52,7 @@ void FileVideoCaptureDeviceFactory::GetDevicesInfo( + VideoCaptureApi::WIN_DIRECT_SHOW; + #elif defined(OS_MAC) + VideoCaptureApi::MACOSX_AVFOUNDATION; +-#elif defined(OS_LINUX) || defined(OS_CHROMEOS) ++#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + VideoCaptureApi::LINUX_V4L2_SINGLE_PLANE; #else + VideoCaptureApi::UNKNOWN; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.cc index e055255785d5..5fd752bcd53f 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/media/capture/video/linux/v4l2_capture_delegate.cc.orig 2019-03-01 17:04:22 UTC +--- src/3rdparty/chromium/media/capture/video/linux/v4l2_capture_delegate.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/media/capture/video/linux/v4l2_capture_delegate.cc @@ -4,8 +4,10 @@ @@ -20,7 +20,7 @@ #include #endif -@@ -28,10 +30,10 @@ +@@ -28,10 +30,10 @@ using media::mojom::MeteringMode; using media::mojom::MeteringMode; @@ -33,14 +33,15 @@ // TODO(aleksandar.stojiljkovic): Wrap this with kernel version check once the // format is introduced to kernel. -@@ -342,9 +344,9 @@ void V4L2CaptureDelegate::AllocateAndStart( +@@ -341,9 +343,9 @@ void V4L2CaptureDelegate::AllocateAndStart( // operation (|errno| == EINVAL in this case) or plain failure. if ((power_line_frequency_ == V4L2_CID_POWER_LINE_FREQUENCY_50HZ) || (power_line_frequency_ == V4L2_CID_POWER_LINE_FREQUENCY_60HZ) -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) -+//#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) - || (power_line_frequency_ == V4L2_CID_POWER_LINE_FREQUENCY_AUTO) +- || (power_line_frequency_ == V4L2_CID_POWER_LINE_FREQUENCY_AUTO) -#endif ++//#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) ++// || (power_line_frequency_ == V4L2_CID_POWER_LINE_FREQUENCY_AUTO) +//#endif ) { struct v4l2_control control = {}; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_video__capture__buffer__pool__impl.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_video__capture__buffer__pool__impl.cc index 0e5cdf2d9dba..2a790b9207c2 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_video__capture__buffer__pool__impl.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_video__capture__buffer__pool__impl.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/media/capture/video/video_capture_buffer_pool_impl.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/media/capture/video/video_capture_buffer_pool_impl.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/media/capture/video/video_capture_buffer_pool_impl.cc @@ -58,7 +58,7 @@ VideoCaptureBufferPoolImpl::CreateSharedMemoryViaRawFi int buffer_id) { // This requires platforms where base::SharedMemoryHandle is backed by a // file descriptor. --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) base::AutoLock lock(lock_); VideoCaptureBufferTracker* tracker = GetTracker(buffer_id); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_video__capture__device__client.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_video__capture__device__client.cc index d0b040943296..176af241f2a7 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_video__capture__device__client.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_video__capture__device__client.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/media/capture/video/video_capture_device_client.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/media/capture/video/video_capture_device_client.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/media/capture/video/video_capture_device_client.cc -@@ -308,7 +308,7 @@ void VideoCaptureDeviceClient::OnIncomingCapturedData( +@@ -318,7 +318,7 @@ void VideoCaptureDeviceClient::OnIncomingCapturedData( // see http://linuxtv.org/downloads/v4l-dvb-apis/packed-rgb.html. // Windows RGB24 defines blue at lowest byte, // see https://msdn.microsoft.com/en-us/library/windows/desktop/dd407253 --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) fourcc_format = libyuv::FOURCC_RAW; #elif defined(OS_WIN) fourcc_format = libyuv::FOURCC_24BG; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_formats_common_offset__byte__queue.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_formats_common_offset__byte__queue.cc index c8962872b7a5..62dd7bf5dd7c 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_formats_common_offset__byte__queue.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_formats_common_offset__byte__queue.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/media/formats/common/offset_byte_queue.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/media/formats/common/offset_byte_queue.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/media/formats/common/offset_byte_queue.cc -@@ -46,13 +46,13 @@ void OffsetByteQueue::PeekAt(int64_t offset, const uin +@@ -47,13 +47,13 @@ void OffsetByteQueue::PeekAt(int64_t offset, const uin *size = tail() - offset; } diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_formats_mp2t_es__parser__adts.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_formats_mp2t_es__parser__adts.cc index 9d13bffdd8ff..a3be52d1ca38 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_formats_mp2t_es__parser__adts.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_formats_mp2t_es__parser__adts.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/media/formats/mp2t/es_parser_adts.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/media/formats/mp2t/es_parser_adts.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/media/formats/mp2t/es_parser_adts.cc -@@ -63,11 +63,11 @@ bool EsParserAdts::LookForAdtsFrame(AdtsFrame* adts_fr +@@ -62,11 +62,11 @@ bool EsParserAdts::LookForAdtsFrame(AdtsFrame* adts_fr const uint8_t* es; es_queue_->Peek(&es, &es_size); @@ -15,7 +15,7 @@ const uint8_t* cur_buf = &es[offset]; if (!isAdtsSyncWord(cur_buf)) continue; -@@ -107,7 +107,7 @@ bool EsParserAdts::LookForAdtsFrame(AdtsFrame* adts_fr +@@ -106,7 +106,7 @@ bool EsParserAdts::LookForAdtsFrame(AdtsFrame* adts_fr return true; } diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_gpu_buffer__validation.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_gpu_buffer__validation.cc index bacd13f50584..bac2e6421b56 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_gpu_buffer__validation.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_gpu_buffer__validation.cc @@ -1,21 +1,21 @@ ---- src/3rdparty/chromium/media/gpu/buffer_validation.cc.orig 2020-03-16 14:04:24 UTC +--- src/3rdparty/chromium/media/gpu/buffer_validation.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/media/gpu/buffer_validation.cc @@ -12,15 +12,15 @@ #include "ui/gfx/geometry/size.h" #include "ui/gfx/gpu_memory_buffer.h" --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include #include --#endif // defined(OS_LINUX) -+#endif // defined(OS_LINUX) || defined(OS_BSD) +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) namespace media { bool GetFileSize(const int fd, size_t* size) { --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) if (fd < 0) { VLOGF(1) << "Invalid file descriptor"; return false; @@ -23,8 +23,8 @@ #else NOTIMPLEMENTED(); return false; --#endif // defined(OS_LINUX) -+#endif // defined(OS_LINUX) || defined(OS_BSD) +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) } bool VerifyGpuMemoryBufferHandle(media::VideoPixelFormat pixel_format, @@ -32,8 +32,8 @@ VLOGF(1) << "Unexpected GpuMemoryBufferType: " << gmb_handle.type; return false; } --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) const size_t num_planes = media::VideoFrame::NumPlanes(pixel_format); if (num_planes != gmb_handle.native_pixmap_handle.planes.size() || num_planes == 0) { @@ -41,8 +41,8 @@ #else NOTIMPLEMENTED(); return false; --#endif // defined(OS_LINUX) -+#endif // defined(OS_LINUX) || defined(OS_BSD) +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) } } // namespace media diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_media__options.gni b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_media__options.gni index 2f6341d092ef..9fb87c0aec0b 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_media__options.gni +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_media__options.gni @@ -1,10 +1,10 @@ ---- src/3rdparty/chromium/media/media_options.gni.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/media/media_options.gni.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/media/media_options.gni -@@ -99,6 +99,9 @@ declare_args() { +@@ -130,6 +130,9 @@ declare_args() { # Enables runtime selection of ALSA library for audio. use_alsa = false -+ # Enables runtime selection of sndio library for audio. ++ # Enable runtime selection of sndio(7) + use_sndio = false + # Alsa should be used on non-Android, non-Mac POSIX systems. diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_mojo_clients_mojo__video__encode__accelerator.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_mojo_clients_mojo__video__encode__accelerator.cc index f44565e54196..82d6d8e51eef 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_mojo_clients_mojo__video__encode__accelerator.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_mojo_clients_mojo__video__encode__accelerator.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/media/mojo/clients/mojo_video_encode_accelerator.cc.orig 2020-03-16 14:04:24 UTC +--- src/3rdparty/chromium/media/mojo/clients/mojo_video_encode_accelerator.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/media/mojo/clients/mojo_video_encode_accelerator.cc -@@ -124,7 +124,7 @@ void MojoVideoEncodeAccelerator::Encode(scoped_refptr< - frame->layout().num_planes()); +@@ -134,7 +134,7 @@ void MojoVideoEncodeAccelerator::Encode(scoped_refptr< + DCHECK_EQ(num_planes, frame->layout().num_planes()); DCHECK(vea_.is_bound()); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // TODO(crbug.com/1003197): Remove this once we stop supporting STORAGE_DMABUF // in VideoEncodeAccelerator. if (frame->storage_type() == VideoFrame::STORAGE_DMABUFS) { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_mojo_mojom_video__frame__mojom__traits.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_mojo_mojom_video__frame__mojom__traits.cc index 5afda79571de..c8e370fbfccc 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_mojo_mojom_video__frame__mojom__traits.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_mojo_mojom_video__frame__mojom__traits.cc @@ -1,32 +1,32 @@ ---- src/3rdparty/chromium/media/mojo/mojom/video_frame_mojom_traits.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/media/mojo/mojom/video_frame_mojom_traits.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/media/mojo/mojom/video_frame_mojom_traits.cc -@@ -20,9 +20,9 @@ - #include "ui/gfx/mojom/buffer_types_mojom_traits.h" +@@ -21,9 +21,9 @@ #include "ui/gfx/mojom/color_space_mojom_traits.h" + #include "ui/gl/mojom/hdr_metadata_mojom_traits.h" --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "base/posix/eintr_wrapper.h" --#endif // defined(OS_LINUX) -+#endif // defined(OS_LINUX) || defined(OS_BSD) +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) namespace mojo { -@@ -62,7 +62,7 @@ media::mojom::VideoFrameDataPtr MakeVideoFrameData( +@@ -63,7 +63,7 @@ media::mojom::VideoFrameDataPtr MakeVideoFrameData( std::move(offsets))); } --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) if (input->storage_type() == media::VideoFrame::STORAGE_DMABUFS) { std::vector dmabuf_fds; -@@ -165,7 +165,7 @@ bool StructTraits gpu_task_runner, base::WeakPtr media_gpu_channel_manager, -@@ -279,7 +279,7 @@ std::unique_ptr GpuMojoMediaClient::Crea +@@ -298,7 +298,7 @@ std::unique_ptr GpuMojoMediaClient::Crea command_buffer_id->route_id)); } --#elif defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX) -+#elif defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) +-#elif defined(OS_MAC) || defined(OS_WIN) || defined(OS_LINUX) || \ ++#elif defined(OS_MAC) || defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) || \ + defined(OS_CHROMEOS) #if defined(OS_WIN) // Don't instantiate the DXVA decoder if it's not supported. - if (gpu_workarounds_.disable_dxva_video_decoder) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_video_fake__gpu__memory__buffer.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_video_fake__gpu__memory__buffer.cc index abf65d69a066..a0d87da18902 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_video_fake__gpu__memory__buffer.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_video_fake__gpu__memory__buffer.cc @@ -1,38 +1,38 @@ ---- src/3rdparty/chromium/media/video/fake_gpu_memory_buffer.cc.orig 2020-03-16 14:04:24 UTC +--- src/3rdparty/chromium/media/video/fake_gpu_memory_buffer.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/media/video/fake_gpu_memory_buffer.cc -@@ -6,7 +6,7 @@ +@@ -10,7 +10,7 @@ + #include "media/base/format_utils.h" + #include "media/base/video_frame.h" - #include "build/build_config.h" - --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include #include #include -@@ -44,7 +44,7 @@ class FakeGpuMemoryBufferImpl : public gpu::GpuMemoryB +@@ -48,7 +48,7 @@ class FakeGpuMemoryBufferImpl : public gpu::GpuMemoryB } // namespace --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) base::ScopedFD GetDummyFD() { base::ScopedFD fd(open("/dev/zero", O_RDWR)); DCHECK(fd.is_valid()); -@@ -67,7 +67,7 @@ FakeGpuMemoryBuffer::FakeGpuMemoryBuffer(const gfx::Si - // Set a dummy id since this is for testing only. - handle_.id = gfx::GpuMemoryBufferId(0); +@@ -78,7 +78,7 @@ FakeGpuMemoryBuffer::FakeGpuMemoryBuffer(const gfx::Si + static base::NoDestructor buffer_id_generator; + handle_.id = gfx::GpuMemoryBufferId(buffer_id_generator->GetNext()); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - // Set a dummy fd since this is for testing only. - handle_.native_pixmap_handle.planes.push_back( - gfx::NativePixmapPlane(size_.width(), 0, y_plane_size, GetDummyFD())); -@@ -76,7 +76,7 @@ FakeGpuMemoryBuffer::FakeGpuMemoryBuffer(const gfx::Si - size_.width(), handle_.native_pixmap_handle.planes[0].size, - uv_plane_size, GetDummyFD())); +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + for (size_t i = 0; i < VideoFrame::NumPlanes(video_pixel_format_); i++) { + const gfx::Size plane_size_in_bytes = + VideoFrame::PlaneSize(video_pixel_format_, i, size_); +@@ -87,7 +87,7 @@ FakeGpuMemoryBuffer::FakeGpuMemoryBuffer(const gfx::Si + GetDummyFD()); } --#endif // defined(OS_LINUX) -+#endif // defined(OS_LINUX) || defined(OS_BSD) + handle_.native_pixmap_handle.modifier = modifier; +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) } FakeGpuMemoryBuffer::~FakeGpuMemoryBuffer() = default; @@ -40,8 +40,8 @@ gfx::GpuMemoryBufferHandle handle; handle.type = gfx::NATIVE_PIXMAP; handle.id = handle_.id; --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) handle.native_pixmap_handle = gfx::CloneHandleForIPC(handle_.native_pixmap_handle); #endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_video_gpu__memory__buffer__video__frame__pool.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_video_gpu__memory__buffer__video__frame__pool.cc index dd00223fa48a..319160b52276 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_video_gpu__memory__buffer__video__frame__pool.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_video_gpu__memory__buffer__video__frame__pool.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/media/video/gpu_memory_buffer_video_frame_pool.cc.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/media/video/gpu_memory_buffer_video_frame_pool.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/media/video/gpu_memory_buffer_video_frame_pool.cc -@@ -633,7 +633,7 @@ void GpuMemoryBufferVideoFramePool::PoolImpl::CreateHa +@@ -573,7 +573,7 @@ void GpuMemoryBufferVideoFramePool::PoolImpl::CreateHa } bool is_software_backed_video_frame = !video_frame->HasTextures(); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) is_software_backed_video_frame &= !video_frame->HasDmaBufs(); #endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_webrtc_webrtc__switches.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_webrtc_webrtc__switches.cc deleted file mode 100644 index f19a5e3f59ad..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_webrtc_webrtc__switches.cc +++ /dev/null @@ -1,18 +0,0 @@ ---- src/3rdparty/chromium/media/webrtc/webrtc_switches.cc.orig 2020-03-16 14:04:24 UTC -+++ src/3rdparty/chromium/media/webrtc/webrtc_switches.cc -@@ -44,7 +44,7 @@ namespace media { - - bool IsWebRtcApmInAudioServiceEnabled() { - #if defined(OS_WIN) || defined(OS_MACOSX) || \ -- (defined(OS_LINUX) && !defined(OS_CHROMEOS)) -+ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) - return base::FeatureList::IsEnabled(features::kWebRtcApmInAudioService) && - !base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kForceDisableWebRtcApmInAudioService); -@@ -53,4 +53,4 @@ bool IsWebRtcApmInAudioServiceEnabled() { - #endif - } - --} // namespace media -\ No newline at end of file -+} // namespace media diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_c_system_thunks.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_c_system_thunks.cc index 13d86e7b7993..a28ab88498e4 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_c_system_thunks.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_c_system_thunks.cc @@ -1,49 +1,46 @@ ---- src/3rdparty/chromium/mojo/public/c/system/thunks.cc.orig 2020-04-08 09:41:36 UTC +--- src/3rdparty/chromium/mojo/public/c/system/thunks.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/mojo/public/c/system/thunks.cc -@@ -15,7 +15,7 @@ - #include "build/build_config.h" +@@ -20,7 +20,7 @@ #include "mojo/public/c/system/core.h" + #include "mojo/public/c/system/macros.h" -#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) +#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) #include "base/environment.h" #include "base/files/file_path.h" #include "base/optional.h" -@@ -58,7 +58,7 @@ namespace mojo { - class CoreLibraryInitializer { - public: - CoreLibraryInitializer(const MojoInitializeOptions* options) { +@@ -68,7 +68,7 @@ class CoreLibraryInitializer { + ~CoreLibraryInitializer() = default; + + MojoResult LoadLibrary(base::FilePath library_path) { -#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) +#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) - bool application_provided_path = false; - base::Optional library_path; - if (options && options->struct_size >= sizeof(*options) && -@@ -77,7 +77,7 @@ class CoreLibraryInitializer { + if (library_ && library_->is_valid()) + return MOJO_RESULT_OK; - if (!library_path) { +@@ -82,7 +82,7 @@ class CoreLibraryInitializer { + + if (library_path.empty()) { // Default to looking for the library in the current working directory. -#if defined(OS_CHROMEOS) || defined(OS_LINUX) +#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD) const base::FilePath::CharType kDefaultLibraryPathValue[] = FILE_PATH_LITERAL("./libmojo_core.so"); #elif defined(OS_WIN) -@@ -127,16 +127,16 @@ class CoreLibraryInitializer { +@@ -126,13 +126,13 @@ class CoreLibraryInitializer { - CHECK_GT(g_thunks.size, 0u) - << "Invalid mojo_core library: " << library_path->value(); --#else // defined(OS_CHROMEOS) || defined(OS_LINUX) -+#else // defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD) - NOTREACHED() - << "Dynamic mojo_core loading is not supported on this platform."; --#endif // defined(OS_CHROMEOS) || defined(OS_LINUX) -+#endif // defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD) + library_ = std::move(library); + return MOJO_RESULT_OK; +-#else // defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) ++#else // defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) + return MOJO_RESULT_UNIMPLEMENTED; +-#endif // defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) ++#endif // defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) } - ~CoreLibraryInitializer() = default; - private: -#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) +#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) base::Optional library_; #endif - + }; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_js_mojo__bindings__resources.grd b/www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_js_mojo__bindings__resources.grd index a06c736cb67c..6950925e9274 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_js_mojo__bindings__resources.grd +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_js_mojo__bindings__resources.grd @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/mojo/public/js/mojo_bindings_resources.grd.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/mojo/public/js/mojo_bindings_resources.grd.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/mojo/public/js/mojo_bindings_resources.grd -@@ -60,7 +60,7 @@ +@@ -59,7 +59,7 @@ + file="${root_gen_dir}/mojo/public/mojom/base/text_direction.mojom-lite.js" use_base_dir="false" - type="BINDATA" - compress="gzip" /> -- -+ + type="BINDATA" /> +- ++ #include #include -@@ -177,6 +179,7 @@ AddressTrackerLinux::AddressTrackerLinux( - AddressTrackerLinux::~AddressTrackerLinux() = default; - - void AddressTrackerLinux::Init() { +@@ -190,6 +192,7 @@ void AddressTrackerLinux::Init() { + DCHECK_LT(base::android::BuildInfo::GetInstance()->sdk_int(), + base::android::SDK_VERSION_P); + #endif +#if !defined(OS_FREEBSD) netlink_fd_.reset(socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE)); if (!netlink_fd_.is_valid()) { PLOG(ERROR) << "Could not create NETLINK socket"; -@@ -272,6 +275,7 @@ void AddressTrackerLinux::AbortAndForceOnline() { +@@ -274,6 +277,7 @@ void AddressTrackerLinux::Init() { + base::BindRepeating(&AddressTrackerLinux::OnFileCanReadWithoutBlocking, + base::Unretained(this))); + } ++#endif // !OS_FREEBSD + } + + void AddressTrackerLinux::AbortAndForceOnline() { +@@ -285,6 +289,7 @@ void AddressTrackerLinux::AbortAndForceOnline() { connection_type_initialized_cv_.Broadcast(); } @@ -26,7 +34,7 @@ AddressTrackerLinux::AddressMap AddressTrackerLinux::GetAddressMap() const { AddressTrackerAutoLock lock(*this, address_map_lock_); return address_map_; -@@ -290,6 +294,7 @@ bool AddressTrackerLinux::IsInterfaceIgnored(int inter +@@ -303,6 +308,7 @@ bool AddressTrackerLinux::IsInterfaceIgnored(int inter const char* interface_name = get_interface_name_(interface_index, buf); return ignored_interfaces_.find(interface_name) != ignored_interfaces_.end(); } @@ -34,7 +42,7 @@ NetworkChangeNotifier::ConnectionType AddressTrackerLinux::GetCurrentConnectionType() { -@@ -348,6 +353,7 @@ void AddressTrackerLinux::HandleMessage(const char* bu +@@ -361,6 +367,7 @@ void AddressTrackerLinux::HandleMessage(const char* bu bool* address_changed, bool* link_changed, bool* tunnel_changed) { @@ -42,7 +50,7 @@ DCHECK(buffer); // Note that NLMSG_NEXT decrements |length| to reflect the number of bytes // remaining in |buffer|. -@@ -460,6 +466,10 @@ void AddressTrackerLinux::HandleMessage(const char* bu +@@ -473,6 +480,10 @@ void AddressTrackerLinux::HandleMessage(const char* bu break; } } @@ -53,36 +61,21 @@ } void AddressTrackerLinux::OnFileCanReadWithoutBlocking() { -@@ -487,31 +497,7 @@ bool AddressTrackerLinux::IsTunnelInterfaceName(const +@@ -500,6 +511,7 @@ void AddressTrackerLinux::UpdateCurrentConnectionType( } void AddressTrackerLinux::UpdateCurrentConnectionType() { -- AddressTrackerLinux::AddressMap address_map = GetAddressMap(); -- std::unordered_set online_links = GetOnlineLinks(); -- -- // Strip out tunnel interfaces from online_links -- for (auto it = online_links.cbegin(); it != online_links.cend();) { -- if (IsTunnelInterface(*it)) { -- it = online_links.erase(it); -- } else { -- ++it; -- } -- } -- -- NetworkInterfaceList networks; -- NetworkChangeNotifier::ConnectionType type = -- NetworkChangeNotifier::CONNECTION_NONE; -- if (GetNetworkListImpl(&networks, 0, online_links, address_map, -- get_interface_name_)) { -- type = NetworkChangeNotifier::ConnectionTypeFromInterfaceList(networks); -- } else { -- type = online_links.empty() ? NetworkChangeNotifier::CONNECTION_NONE -- : NetworkChangeNotifier::CONNECTION_UNKNOWN; -- } -- -- AddressTrackerAutoLock lock(*this, connection_type_lock_); -- current_connection_type_ = type; ++#if !defined(OS_FREEBSD) + AddressTrackerLinux::AddressMap address_map = GetAddressMap(); + std::unordered_set online_links = GetOnlineLinks(); + +@@ -525,6 +537,9 @@ void AddressTrackerLinux::UpdateCurrentConnectionType( + + AddressTrackerAutoLock lock(*this, connection_type_lock_); + current_connection_type_ = type; ++#else + NOTIMPLEMENTED(); ++#endif } int AddressTrackerLinux::GetThreadsWaitingForConnectionTypeInitForTesting() { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_address__tracker__linux__unittest.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_address__tracker__linux__unittest.cc deleted file mode 100644 index da8abb68297c..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_address__tracker__linux__unittest.cc +++ /dev/null @@ -1,14 +0,0 @@ ---- src/3rdparty/chromium/net/base/address_tracker_linux_unittest.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/net/base/address_tracker_linux_unittest.cc -@@ -4,7 +4,11 @@ - - #include "net/base/address_tracker_linux.h" - -+#if defined(__linux__) - #include -+#else -+#include -+#endif - - #include - #include diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_features.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_features.cc deleted file mode 100644 index d58417fa4064..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_features.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/net/base/features.cc.orig 2020-11-07 01:22:36 UTC -+++ src/3rdparty/chromium/net/base/features.cc -@@ -92,7 +92,7 @@ const base::Feature kBlockExternalRequestsFromNonSecur - #if BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED) - const base::Feature kCertVerifierBuiltinFeature { - "CertVerifierBuiltin", --#if defined(OS_CHROMEOS) || defined(OS_LINUX) -+#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD) - base::FEATURE_ENABLED_BY_DEFAULT - #else - base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_network__change__notifier.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_network__change__notifier.cc index 01306733fbfc..20e8a9dcb595 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_network__change__notifier.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_network__change__notifier.cc @@ -1,22 +1,22 @@ ---- src/3rdparty/chromium/net/base/network_change_notifier.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/net/base/network_change_notifier.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/net/base/network_change_notifier.cc -@@ -35,7 +35,7 @@ +@@ -36,7 +36,7 @@ #include "net/base/network_change_notifier_linux.h" - #elif defined(OS_MACOSX) + #elif defined(OS_APPLE) #include "net/base/network_change_notifier_mac.h" -#elif defined(OS_CHROMEOS) || defined(OS_ANDROID) +#elif defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) #include "net/base/network_change_notifier_posix.h" #elif defined(OS_FUCHSIA) #include "net/base/network_change_notifier_fuchsia.h" -@@ -240,8 +240,11 @@ std::unique_ptr NetworkChangeNo +@@ -249,8 +249,11 @@ std::unique_ptr NetworkChangeNo #elif defined(OS_FUCHSIA) return std::make_unique( - 0 /* required_features */); + fuchsia::hardware::ethernet::Features()); +#elif defined(OS_BSD) + return std::make_unique( -+ std::make_unique( -+ nullptr /* task_runner */, nullptr /* dns_config_service */)); ++ std::make_unique( ++ nullptr /* task_runner */, nullptr /* dns_config_service */)); #else - NOTIMPLEMENTED(); return NULL; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_cert_cert__verifier.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_cert_cert__verifier.cc new file mode 100644 index 000000000000..576afb9f02fe --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_cert_cert__verifier.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/net/cert/cert_verifier.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/net/cert/cert_verifier.cc +@@ -87,7 +87,7 @@ std::unique_ptr CertVerifier::CreateDefa + return std::unique_ptr(); + #else + scoped_refptr verify_proc; +-#if defined(OS_FUCHSIA) || defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_FUCHSIA) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + verify_proc = + CertVerifyProc::CreateBuiltinVerifyProc(std::move(cert_net_fetcher)); + #elif BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_cert_cert__verify__proc.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_cert_cert__verify__proc.cc new file mode 100644 index 000000000000..8b790f717b5f --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_cert_cert__verify__proc.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/net/cert/cert_verify_proc.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/net/cert/cert_verify_proc.cc +@@ -493,7 +493,7 @@ base::Value CertVerifyParams(X509Certificate* cert, + + } // namespace + +-#if !(defined(OS_FUCHSIA) || defined(OS_LINUX) || defined(OS_CHROMEOS)) ++#if !(defined(OS_FUCHSIA) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)) + // static + scoped_refptr CertVerifyProc::CreateSystemVerifyProc( + scoped_refptr cert_net_fetcher) { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_cert_cert__verify__proc.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_cert_cert__verify__proc.h new file mode 100644 index 000000000000..ca31bc1d341d --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_cert_cert__verify__proc.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/net/cert/cert_verify_proc.h.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/net/cert/cert_verify_proc.h +@@ -66,7 +66,7 @@ class NET_EXPORT CertVerifyProc + kMaxValue = kChainLengthOne + }; + +-#if !(defined(OS_FUCHSIA) || defined(OS_LINUX) || defined(OS_CHROMEOS)) ++#if !(defined(OS_FUCHSIA) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)) + // Creates and returns a CertVerifyProc that uses the system verifier. + // |cert_net_fetcher| may not be used, depending on the implementation. + static scoped_refptr CreateSystemVerifyProc( diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_cert_test__root__certs.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_cert_test__root__certs.h new file mode 100644 index 000000000000..349c5da9e394 --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_cert_test__root__certs.h @@ -0,0 +1,26 @@ +--- src/3rdparty/chromium/net/cert/test_root_certs.h.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/net/cert/test_root_certs.h +@@ -75,7 +75,7 @@ class NET_EXPORT TestRootCerts { + // engine is appropriate. The caller is responsible for freeing the + // returned HCERTCHAINENGINE. + HCERTCHAINENGINE GetChainEngine() const; +-#elif defined(OS_FUCHSIA) || defined(OS_LINUX) || defined(OS_CHROMEOS) ++#elif defined(OS_BSD) || defined(OS_FUCHSIA) || defined(OS_LINUX) || defined(OS_CHROMEOS) + TrustStore* test_trust_store() { return &test_trust_store_; } + #endif + +@@ -93,12 +93,12 @@ class NET_EXPORT TestRootCerts { + #elif defined(OS_APPLE) + base::ScopedCFTypeRef temporary_roots_; + TrustStoreInMemory test_trust_store_; +-#elif defined(OS_FUCHSIA) || defined(OS_LINUX) || defined(OS_CHROMEOS) ++#elif defined(OS_BSD) || defined(OS_FUCHSIA) || defined(OS_LINUX) || defined(OS_CHROMEOS) + TrustStoreInMemory test_trust_store_; + #endif + + #if defined(OS_WIN) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || \ +- defined(OS_LINUX) || defined(OS_CHROMEOS) ++ defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + // True if there are no temporarily trusted root certificates. + bool empty_ = true; + #endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_disk__cache_blockfile_disk__format.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_disk__cache_blockfile_disk__format.h new file mode 100644 index 000000000000..b1e47548e894 --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_disk__cache_blockfile_disk__format.h @@ -0,0 +1,12 @@ +--- src/3rdparty/chromium/net/disk_cache/blockfile/disk_format.h.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/net/disk_cache/blockfile/disk_format.h +@@ -149,7 +149,9 @@ struct RankingsNode { + }; + #pragma pack(pop) + ++#if !defined(OS_BSD) + static_assert(sizeof(RankingsNode) == 36, "bad RankingsNode"); ++#endif + + } // namespace disk_cache + diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_address__sorter__posix.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_address__sorter__posix.cc index 65d7fe402b48..b184f5a7b6bf 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_address__sorter__posix.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_address__sorter__posix.cc @@ -1,8 +1,10 @@ ---- src/3rdparty/chromium/net/dns/address_sorter_posix.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/net/dns/address_sorter_posix.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/net/dns/address_sorter_posix.cc -@@ -14,6 +14,7 @@ +@@ -13,7 +13,9 @@ + #include // Must be included before ifaddrs.h. #include #include ++#include #include +#include #include diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_dns__config__service__posix__unittest.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_dns__config__service__posix__unittest.cc deleted file mode 100644 index 04823baa0fe8..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_dns__config__service__posix__unittest.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/net/dns/dns_config_service_posix_unittest.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/net/dns/dns_config_service_posix_unittest.cc -@@ -2,8 +2,6 @@ - // Use of this source code is governed by a BSD-style license that can be - // found in the LICENSE file. - --#include -- - #include - - #include "base/cancelable_callback.h" diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_dns__reloader.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_dns__reloader.cc index 14e2c63dc34d..3b6137bbdee2 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_dns__reloader.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_dns__reloader.cc @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/net/dns/dns_reloader.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/net/dns/dns_reloader.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/net/dns/dns_reloader.cc @@ -7,6 +7,10 @@ - #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \ + #if defined(OS_POSIX) && !defined(OS_APPLE) && !defined(OS_OPENBSD) && \ !defined(OS_ANDROID) && !defined(OS_FUCHSIA) +#if defined(OS_FREEBSD) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_dns__util.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_dns__util.cc index 01b8768202e9..54eeb6d5f9df 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_dns__util.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_dns__util.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/net/dns/dns_util.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/net/dns/dns_util.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/net/dns/dns_util.cc -@@ -28,6 +28,8 @@ const int kMaxLabelLength = 63; +@@ -39,6 +39,8 @@ const uint16_t kFlagNamePointer = 0xc000; } // namespace diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_host__resolver__proc.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_host__resolver__proc.cc index 59dd38a1b9b2..3f1751387363 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_host__resolver__proc.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_host__resolver__proc.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/net/dns/host_resolver_proc.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/net/dns/host_resolver_proc.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/net/dns/host_resolver_proc.cc -@@ -195,7 +195,7 @@ int SystemHostResolverCall(const std::string& host, - // current process during that time. - base::ScopedBlockingCall scoped_blocking_call(base::BlockingType::WILL_BLOCK); +@@ -159,7 +159,7 @@ int SystemHostResolverCall(const std::string& host, + base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, + base::BlockingType::WILL_BLOCK); --#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \ -+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD) && \ +-#if defined(OS_POSIX) && !defined(OS_APPLE) && !defined(OS_OPENBSD) && \ ++#if defined(OS_POSIX) && !defined(OS_APPLE) && !defined(OS_BSD) && \ !defined(OS_ANDROID) && !defined(OS_FUCHSIA) DnsReloaderMaybeReload(); #endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_features.gni b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_features.gni deleted file mode 100644 index d62b8ce0f9ea..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_features.gni +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/net/features.gni.orig 2019-05-23 12:39:34 UTC -+++ src/3rdparty/chromium/net/features.gni -@@ -27,7 +27,7 @@ declare_args() { - disable_brotli_filter = false - - # Multicast DNS. -- enable_mdns = is_win || is_linux || is_fuchsia || is_mac || is_ios -+ enable_mdns = is_win || is_linux || is_fuchsia || is_mac || is_ios || is_bsd - - # Reporting not used on iOS. - enable_reporting = !is_ios diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_http_http__auth__gssapi__posix.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_http_http__auth__gssapi__posix.cc index e865ad7c429f..c54ba5f6e2f9 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_http_http__auth__gssapi__posix.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_http_http__auth__gssapi__posix.cc @@ -1,14 +1,14 @@ ---- src/3rdparty/chromium/net/http/http_auth_gssapi_posix.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/net/http/http_auth_gssapi_posix.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/net/http/http_auth_gssapi_posix.cc -@@ -431,8 +431,9 @@ base::NativeLibrary GSSAPISharedLibrary::LoadSharedLib +@@ -367,8 +367,9 @@ base::NativeLibrary GSSAPISharedLibrary::LoadSharedLib static const char* const kDefaultLibraryNames[] = { - #if defined(OS_MACOSX) + #if defined(OS_APPLE) "/System/Library/Frameworks/GSS.framework/GSS" -#elif defined(OS_OPENBSD) - "libgssapi.so" // Heimdal - OpenBSD +#elif defined(OS_BSD) -+ "libgssapi.so" // Heimdal - OpenBSD / FreeBSD + "libgssapi_krb5.so.2", // MIT Kerberos - FreeBSD ++ "libgssapi.so" // Heimdal - OpenBSD, FreeBSD #else "libgssapi_krb5.so.2", // MIT Kerberos - FC, Suse10, Debian "libgssapi.so.4", // Heimdal - Suse10, MDK diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_nqe_network__quality__estimator.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_nqe_network__quality__estimator.cc index 761ad39fabf7..c7b2d610934b 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_nqe_network__quality__estimator.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_nqe_network__quality__estimator.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/net/nqe/network_quality_estimator.cc.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/net/nqe/network_quality_estimator.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/net/nqe/network_quality_estimator.cc -@@ -99,7 +99,7 @@ nqe::internal::NetworkID DoGetCurrentNetworkID() { +@@ -108,7 +108,7 @@ nqe::internal::NetworkID DoGetCurrentNetworkID( case NetworkChangeNotifier::ConnectionType::CONNECTION_ETHERNET: break; case NetworkChangeNotifier::ConnectionType::CONNECTION_WIFI: --#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_WIN) -+#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) +-#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \ ++#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || \ + defined(OS_WIN) network_id.id = GetWifiSSID(); #endif - break; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_proxy__resolution_configured__proxy__resolution__service.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_proxy__resolution_configured__proxy__resolution__service.cc index e5613bb1dda5..a4c1294b1656 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_proxy__resolution_configured__proxy__resolution__service.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_proxy__resolution_configured__proxy__resolution__service.cc @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/net/proxy_resolution/configured_proxy_resolution_service.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/net/proxy_resolution/configured_proxy_resolution_service.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/net/proxy_resolution/configured_proxy_resolution_service.cc -@@ -47,7 +47,7 @@ - #elif defined(OS_MACOSX) +@@ -46,7 +46,7 @@ + #elif defined(OS_MAC) #include "net/proxy_resolution/proxy_config_service_mac.h" #include "net/proxy_resolution/proxy_resolver_mac.h" -#elif defined(OS_LINUX) && !defined(OS_CHROMEOS) @@ -9,16 +9,16 @@ #include "net/proxy_resolution/proxy_config_service_linux.h" #elif defined(OS_ANDROID) #include "net/proxy_resolution/proxy_config_service_android.h" -@@ -61,7 +61,7 @@ namespace net { +@@ -60,7 +60,7 @@ namespace { namespace { - #if defined(OS_WIN) || defined(OS_IOS) || defined(OS_MACOSX) || \ + #if defined(OS_WIN) || defined(OS_APPLE) || \ - (defined(OS_LINUX) && !defined(OS_CHROMEOS)) + (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) constexpr net::NetworkTrafficAnnotationTag kSystemProxyConfigTrafficAnnotation = net::DefineNetworkTrafficAnnotation("proxy_config_system", R"( semantics { -@@ -1436,7 +1436,7 @@ ConfiguredProxyResolutionService::CreateSystemProxyCon +@@ -1409,7 +1409,7 @@ ConfiguredProxyResolutionService::CreateSystemProxyCon << "profile_io_data.cc::CreateProxyConfigService and this should " << "be used only for examples."; return std::make_unique(); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_proxy__resolution_proxy__config__service__linux.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_proxy__resolution_proxy__config__service__linux.cc index 910f3d1fd87c..3adc66f12657 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_proxy__resolution_proxy__config__service__linux.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_proxy__resolution_proxy__config__service__linux.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/net/proxy_resolution/proxy_config_service_linux.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/net/proxy_resolution/proxy_config_service_linux.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/net/proxy_resolution/proxy_config_service_linux.cc @@ -6,7 +6,9 @@ @@ -10,7 +10,7 @@ #include #include -@@ -493,6 +495,7 @@ int StringToIntOrDefault(base::StringPiece value, int +@@ -511,6 +513,7 @@ int StringToIntOrDefault(base::StringPiece value, int return default_value; } @@ -18,7 +18,7 @@ // This is the KDE version that reads kioslaverc and simulates gsettings. // Doing this allows the main Delegate code, as well as the unit tests // for it, to stay the same - and the settings map fairly well besides. -@@ -982,6 +985,7 @@ class SettingGetterImplKDE : public ProxyConfigService +@@ -1001,6 +1004,7 @@ class SettingGetterImplKDE : public ProxyConfigService DISALLOW_COPY_AND_ASSIGN(SettingGetterImplKDE); }; @@ -26,7 +26,7 @@ } // namespace -@@ -1197,8 +1201,10 @@ ProxyConfigServiceLinux::Delegate::Delegate( +@@ -1215,8 +1219,10 @@ ProxyConfigServiceLinux::Delegate::Delegate( case base::nix::DESKTOP_ENVIRONMENT_KDE3: case base::nix::DESKTOP_ENVIRONMENT_KDE4: case base::nix::DESKTOP_ENVIRONMENT_KDE5: diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_socket__posix.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_socket__posix.cc index c0639367db7a..a109b8eb957a 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_socket__posix.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_socket__posix.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/net/socket/socket_posix.cc.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/net/socket/socket_posix.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/net/socket/socket_posix.cc -@@ -568,7 +568,7 @@ void SocketPosix::ReadCompleted() { +@@ -517,7 +517,7 @@ int SocketPosix::DoWrite(IOBuffer* buf, int buf_len) { } int SocketPosix::DoWrite(IOBuffer* buf, int buf_len) { --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) // Disable SIGPIPE for this write. Although Chromium globally disables // SIGPIPE, the net stack may be used in other consumers which do not do // this. MSG_NOSIGNAL is a Linux-only API. On OS X, this is a setsockopt on diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_socks5__client__socket.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_socks5__client__socket.cc index 3d468c0fbe88..345e2558fca2 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_socks5__client__socket.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_socks5__client__socket.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/net/socket/socks5_client_socket.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/net/socket/socks5_client_socket.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/net/socket/socks5_client_socket.cc @@ -4,6 +4,10 @@ @@ -10,4 +10,4 @@ + #include - #include "base/callback_helpers.h" + #include "base/bind.h" diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_udp__socket__posix.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_udp__socket__posix.cc index e580aaa0d164..116c9280ec07 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_udp__socket__posix.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_udp__socket__posix.cc @@ -1,100 +1,67 @@ ---- src/3rdparty/chromium/net/socket/udp_socket_posix.cc.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/net/socket/udp_socket_posix.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/net/socket/udp_socket_posix.cc -@@ -68,7 +68,7 @@ const int kActivityMonitorMinimumSamplesForThroughputE +@@ -70,6 +70,32 @@ const base::TimeDelta kActivityMonitorMsThreshold = const base::TimeDelta kActivityMonitorMsThreshold = base::TimeDelta::FromMilliseconds(100); --#if defined(OS_MACOSX) -+#if defined(OS_MACOSX) || defined(OS_BSD) - // When enabling multicast using setsockopt(IP_MULTICAST_IF) MacOS - // requires passing IPv4 address instead of interface index. This function - // resolves IPv4 address by interface index. The |address| is returned in -@@ -97,7 +97,7 @@ int GetIPv4AddressFromIndex(int socket, uint32_t index - return OK; - } ++#if defined(OS_BSD) ++int GetIPv4AddressFromIndex(int socket, uint32_t index, uint32_t* address) { ++ if (!index) { ++ *address = htonl(INADDR_ANY); ++ return OK; ++ } ++ ++ sockaddr_in* result = nullptr; ++ ++ ifreq ifr; ++ ifr.ifr_addr.sa_family = AF_INET; ++ if (!if_indextoname(index, ifr.ifr_name)) ++ return MapSystemError(errno); ++ int rv = ioctl(socket, SIOCGIFADDR, &ifr); ++ if (rv == -1) ++ return MapSystemError(errno); ++ result = reinterpret_cast(&ifr.ifr_addr); ++ ++ if (!result) ++ return ERR_ADDRESS_INVALID; ++ ++ *address = result->sin_addr.s_addr; ++ return OK; ++} ++#endif ++ + #if defined(OS_MAC) --#endif // OS_MACOSX -+#endif // OS_MACOSX || OS_BSD - - #if defined(OS_MACOSX) && !defined(OS_IOS) - -@@ -644,13 +644,13 @@ int UDPSocketPosix::SetDoNotFragment() { + // On OSX the file descriptor is guarded to detect the cause of +@@ -622,13 +648,13 @@ void UDPSocketPosix::SetMsgConfirm(bool confirm) { } void UDPSocketPosix::SetMsgConfirm(bool confirm) { --#if !defined(OS_MACOSX) && !defined(OS_IOS) -+#if !defined(OS_MACOSX) && !defined(OS_IOS) && !defined(OS_BSD) +-#if !defined(OS_APPLE) ++#if !defined(OS_APPLE) && !defined(OS_BSD) if (confirm) { sendto_flags_ |= MSG_CONFIRM; } else { sendto_flags_ &= ~MSG_CONFIRM; } --#endif // !defined(OS_MACOSX) && !defined(OS_IOS) -+#endif // !defined(OS_MACOSX) && !defined(OS_IOS) && !defined(OS_BSD) +-#endif // !defined(OS_APPLE) ++#endif // !defined(OS_APPLE) && !defined(OS_BSD) } int UDPSocketPosix::AllowAddressReuse() { -@@ -665,17 +665,20 @@ int UDPSocketPosix::SetBroadcast(bool broadcast) { - DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); - int value = broadcast ? 1 : 0; - int rv; --#if defined(OS_MACOSX) -+#if defined(OS_MACOSX) || defined(OS_BSD) - // SO_REUSEPORT on OSX permits multiple processes to each receive - // UDP multicast or broadcast datagrams destined for the bound - // port. - // This is only being set on OSX because its behavior is platform dependent - // and we are playing it safe by only setting it on platforms where things - // break. -+ rv = setsockopt(socket_, SOL_SOCKET, SO_REUSEADDR, &value, sizeof(value)); -+ if (rv != 0) -+ return MapSystemError(errno); - rv = setsockopt(socket_, SOL_SOCKET, SO_REUSEPORT, &value, sizeof(value)); - if (rv != 0) - return MapSystemError(errno); --#endif // defined(OS_MACOSX) -+#endif // defined(OS_MACOSX) || defined(OS_BSD) - rv = setsockopt(socket_, SOL_SOCKET, SO_BROADCAST, &value, sizeof(value)); - - return rv == 0 ? OK : MapSystemError(errno); -@@ -937,19 +940,24 @@ int UDPSocketPosix::SetMulticastOptions() { - if (multicast_interface_ != 0) { - switch (addr_family_) { - case AF_INET: { --#if defined(OS_MACOSX) -+#if defined(OS_MACOSX) || defined(OS_BSD) - ip_mreq mreq = {}; - int error = GetIPv4AddressFromIndex(socket_, multicast_interface_, - &mreq.imr_interface.s_addr); - if (error != OK) - return error; --#else // defined(OS_MACOSX) -+#else // defined(OS_MACOSX) || defined(OS_BSD) - ip_mreqn mreq = {}; +@@ -917,7 +943,11 @@ int UDPSocketPosix::SetMulticastOptions() { mreq.imr_ifindex = multicast_interface_; mreq.imr_address.s_addr = htonl(INADDR_ANY); --#endif // !defined(OS_MACOSX) -+#endif // !defined(OS_MACOSX) || defined(OS_BSD) int rv = setsockopt(socket_, IPPROTO_IP, IP_MULTICAST_IF, +#if defined(OS_BSD) -+ reinterpret_cast(&mreq.imr_interface.s_addr), -+ sizeof(mreq.imr_interface.s_addr)); ++ reinterpret_cast(&mreq.imr_address.s_addr), sizeof(mreq.imr_address.s_addr)); +#else reinterpret_cast(&mreq), sizeof(mreq)); +#endif if (rv) return MapSystemError(errno); break; -@@ -1011,7 +1019,7 @@ int UDPSocketPosix::JoinGroup(const IPAddress& group_a - if (addr_family_ != AF_INET) - return ERR_ADDRESS_INVALID; - --#if defined(OS_MACOSX) -+#if defined(OS_MACOSX) || defined(OS_BSD) - ip_mreq mreq = {}; - int error = GetIPv4AddressFromIndex(socket_, multicast_interface_, - &mreq.imr_interface.s_addr); -@@ -1059,9 +1067,18 @@ int UDPSocketPosix::LeaveGroup(const IPAddress& group_ +@@ -1018,9 +1048,18 @@ int UDPSocketPosix::LeaveGroup(const IPAddress& group_ case IPAddress::kIPv4AddressSize: { if (addr_family_ != AF_INET) return ERR_ADDRESS_INVALID; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_udp__socket__posix.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_udp__socket__posix.h index 14b859f71923..3fdb94e19af4 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_udp__socket__posix.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_udp__socket__posix.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/net/socket/udp_socket_posix.h.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/net/socket/udp_socket_posix.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/net/socket/udp_socket_posix.h -@@ -33,7 +33,7 @@ +@@ -35,7 +35,7 @@ #if defined(__ANDROID__) && defined(__aarch64__) #define HAVE_SENDMMSG 1 --#elif defined(OS_LINUX) -+#elif defined(OS_LINUX) || defined(OS_BSD) +-#elif defined(OS_LINUX) || defined(OS_CHROMEOS) ++#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #define HAVE_SENDMMSG 1 #else #define HAVE_SENDMMSG 0 diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_unix__domain__client__socket__posix.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_unix__domain__client__socket__posix.cc index f1a851f7b85a..83caf2eb26ed 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_unix__domain__client__socket__posix.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_unix__domain__client__socket__posix.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/net/socket/unix_domain_client_socket_posix.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/net/socket/unix_domain_client_socket_posix.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/net/socket/unix_domain_client_socket_posix.cc -@@ -56,7 +56,7 @@ bool UnixDomainClientSocket::FillAddress(const std::st +@@ -57,7 +57,7 @@ bool UnixDomainClientSocket::FillAddress(const std::st return true; } --#if defined(OS_ANDROID) || defined(OS_LINUX) -+#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // Convert the path given into abstract socket name. It must start with // the '\0' character, so we are adding it. |addr_len| must specify the // length of the structure exactly, as potentially the socket name may diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_tools_cert__verify__tool_cert__verify__tool.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_tools_cert__verify__tool_cert__verify__tool.cc index 180bbe9d97f8..74113d99bf16 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_tools_cert__verify__tool_cert__verify__tool.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_tools_cert__verify__tool_cert__verify__tool.cc @@ -1,20 +1,29 @@ ---- src/3rdparty/chromium/net/tools/cert_verify_tool/cert_verify_tool.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/net/tools/cert_verify_tool/cert_verify_tool.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/net/tools/cert_verify_tool/cert_verify_tool.cc -@@ -26,7 +26,7 @@ +@@ -29,7 +29,7 @@ #include "net/url_request/url_request_context_builder.h" #include "net/url_request/url_request_context_getter.h" --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "net/proxy_resolution/proxy_config.h" #include "net/proxy_resolution/proxy_config_service_fixed.h" #endif -@@ -45,7 +45,7 @@ void SetUpOnNetworkThread(std::unique_ptr CreateCertVerifyImplFr + base::StringPiece impl_name, + scoped_refptr cert_net_fetcher, + bool use_system_roots) { +-#if !(defined(OS_FUCHSIA) || defined(OS_LINUX) || defined(OS_CHROMEOS)) ++#if !(defined(OS_FUCHSIA) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)) + if (impl_name == "platform") { + if (!use_system_roots) { + std::cerr << "WARNING: platform verifier not supported with " diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_tools_quic_quic__http__proxy__backend.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_tools_quic_quic__http__proxy__backend.cc index a3b220eda37c..5348d54c24c0 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_tools_quic_quic__http__proxy__backend.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_tools_quic_quic__http__proxy__backend.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/net/tools/quic/quic_http_proxy_backend.cc.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/net/tools/quic/quic_http_proxy_backend.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/net/tools/quic/quic_http_proxy_backend.cc -@@ -160,7 +160,7 @@ void QuicHttpProxyBackend::InitializeURLRequestContext +@@ -162,7 +162,7 @@ void QuicHttpProxyBackend::InitializeURLRequestContext // Enable HTTP2, but disable QUIC on the backend context_builder.SetSpdyAndQuicEnabled(true /* http2 */, false /* quic */); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // On Linux, use a fixed ProxyConfigService, since the default one // depends on glib. context_builder.set_proxy_config_service( diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_traffic__annotation_network__traffic__annotation.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_traffic__annotation_network__traffic__annotation.h index f2907ce0a88b..5a2e0a735285 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_traffic__annotation_network__traffic__annotation.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_traffic__annotation_network__traffic__annotation.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/net/traffic_annotation/network_traffic_annotation.h.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/net/traffic_annotation/network_traffic_annotation.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/net/traffic_annotation/network_traffic_annotation.h -@@ -356,7 +356,7 @@ struct MutablePartialNetworkTrafficAnnotationTag { +@@ -359,7 +359,7 @@ struct MutablePartialNetworkTrafficAnnotationTag { } // namespace net // Placeholder for unannotated usages. @@ -9,7 +9,7 @@ #define TRAFFIC_ANNOTATION_WITHOUT_PROTO(ANNOTATION_ID) \ net::DefineNetworkTrafficAnnotation(ANNOTATION_ID, "No proto yet.") #endif -@@ -367,7 +367,7 @@ struct MutablePartialNetworkTrafficAnnotationTag { +@@ -370,7 +370,7 @@ struct MutablePartialNetworkTrafficAnnotationTag { // // On Linux and Windows, use MISSING_TRAFFIC_ANNOTATION or // TRAFFIC_ANNOTATION_FOR_TESTS. diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_url__request_url__fetcher.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_url__request_url__fetcher.cc index bd7453b18da3..a71ffda1d17b 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_url__request_url__fetcher.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_url__request_url__fetcher.cc @@ -1,8 +1,8 @@ ---- src/3rdparty/chromium/net/url_request/url_fetcher.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/net/url_request/url_fetcher.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/net/url_request/url_fetcher.cc -@@ -11,7 +11,7 @@ namespace net { - - URLFetcher::~URLFetcher() = default; +@@ -21,7 +21,7 @@ void URLFetcher::SetIgnoreCertificateRequests(bool ign + URLFetcherImpl::SetIgnoreCertificateRequests(ignored); + } -#if (!defined(OS_WIN) && !defined(OS_LINUX)) || defined(OS_CHROMEOS) +#if (!defined(OS_WIN) && !defined(OS_LINUX) && !defined(OS_BSD)) || defined(OS_CHROMEOS) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_url__request_url__fetcher.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_url__request_url__fetcher.h index d1fa6c39daf1..d8e2a2df15a1 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_url__request_url__fetcher.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_url__request_url__fetcher.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/net/url_request/url_fetcher.h.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/net/url_request/url_fetcher.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/net/url_request/url_fetcher.h -@@ -113,7 +113,7 @@ class NET_EXPORT URLFetcher { +@@ -355,7 +355,7 @@ class NET_EXPORT URLFetcher { // The unannotated Create() methods are not available on desktop Linux + // Windows. They are available on other platforms, since we only audit network // annotations on Linux & Windows. diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_url__request_url__request__context.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_url__request_url__request__context.cc index 91c36c440cf1..a2216b747474 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_url__request_url__request__context.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_url__request_url__request__context.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/net/url_request/url_request_context.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/net/url_request/url_request_context.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/net/url_request/url_request_context.cc -@@ -89,7 +89,7 @@ const HttpNetworkSession::Context* URLRequestContext:: +@@ -91,7 +91,7 @@ const HttpNetworkSession::Context* URLRequestContext:: return &network_session->context(); } diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_url__request_url__request__context.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_url__request_url__request__context.h index 13e2f80df8f0..d09e22c375de 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_url__request_url__request__context.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_url__request_url__request__context.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/net/url_request/url_request_context.h.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/net/url_request/url_request_context.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/net/url_request/url_request_context.h -@@ -90,7 +90,7 @@ class NET_EXPORT URLRequestContext +@@ -83,7 +83,7 @@ class NET_EXPORT URLRequestContext // session. const HttpNetworkSession::Context* GetNetworkSessionContext() const; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_url__request_url__request__context__builder.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_url__request_url__request__context__builder.cc index 4782f8eec2d5..d07c18ce4c24 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_url__request_url__request__context__builder.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_url__request_url__request__context__builder.cc @@ -1,20 +1,20 @@ ---- src/3rdparty/chromium/net/url_request/url_request_context_builder.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/net/url_request/url_request_context_builder.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/net/url_request/url_request_context_builder.cc -@@ -485,7 +485,7 @@ std::unique_ptr URLRequestContextBu +@@ -497,7 +497,7 @@ std::unique_ptr URLRequestContextBu } if (!proxy_resolution_service_) { --#if !defined(OS_LINUX) && !defined(OS_ANDROID) -+#if !defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_BSD) +-#if !defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID) ++#if !defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID) && !defined(OS_BSD) // TODO(willchan): Switch to using this code when // ConfiguredProxyResolutionService::CreateSystemProxyConfigService()'s // signature doesn't suck. -@@ -494,7 +494,7 @@ std::unique_ptr URLRequestContextBu +@@ -506,7 +506,7 @@ std::unique_ptr URLRequestContextBu ConfiguredProxyResolutionService::CreateSystemProxyConfigService( base::ThreadTaskRunnerHandle::Get().get()); } --#endif // !defined(OS_LINUX) && !defined(OS_ANDROID) -+#endif // !defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_BSD) +-#endif // !defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID) ++#endif // !defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID) && !defined(OS_BSD) proxy_resolution_service_ = CreateProxyResolutionService( std::move(proxy_config_service_), context.get(), context->host_resolver(), context->network_delegate(), diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_pdf_pdfium_pdfium__engine.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_pdf_pdfium_pdfium__engine.cc index 2994c665f947..184339c94df9 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_pdf_pdfium_pdfium__engine.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_pdf_pdfium_pdfium__engine.cc @@ -1,56 +1,56 @@ ---- src/3rdparty/chromium/pdf/pdfium/pdfium_engine.cc.orig 2020-03-16 14:04:24 UTC +--- src/3rdparty/chromium/pdf/pdfium/pdfium_engine.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/pdf/pdfium/pdfium_engine.cc -@@ -52,7 +52,7 @@ - #include "ui/gfx/geometry/rect.h" +@@ -69,7 +69,7 @@ + #include "ui/gfx/geometry/vector2d.h" #include "v8/include/v8.h" --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "pdf/pdfium/pdfium_font_linux.h" #endif -@@ -377,7 +377,7 @@ void InitializeSDK(bool enable_v8) { - config.m_v8EmbedderSlot = gin::kEmbedderPDFium; +@@ -416,7 +416,7 @@ void InitializeSDK(bool enable_v8) { + FPDF_InitLibraryWithConfig(&config); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) InitializeLinuxFontMapper(); #endif -@@ -411,7 +411,7 @@ PDFiumEngine::PDFiumEngine(PDFEngine::Client* client, +@@ -475,7 +475,7 @@ PDFiumEngine::PDFiumEngine(PDFEngine::Client* client, IFSDK_PAUSE::user = nullptr; IFSDK_PAUSE::NeedToPauseNow = Pause_NeedToPauseNow; --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // PreviewModeClient does not know its pp::Instance. SetLastInstance(client_->GetPluginInstance()); #endif -@@ -867,7 +867,7 @@ pp::Buffer_Dev PDFiumEngine::PrintPagesAsRasterPdf( +@@ -948,7 +948,7 @@ pp::Buffer_Dev PDFiumEngine::PrintPagesAsRasterPdf( KillFormFocus(); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) SetLastInstance(client_->GetPluginInstance()); #endif -@@ -2798,7 +2798,7 @@ bool PDFiumEngine::ContinuePaint(int progressive_index - DCHECK(image_data); +@@ -3041,7 +3041,7 @@ bool PDFiumEngine::ContinuePaint(int progressive_index + DCHECK_LT(static_cast(progressive_index), progressive_paints_.size()); last_progressive_start_time_ = base::Time::Now(); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) SetLastInstance(client_->GetPluginInstance()); #endif -@@ -3292,7 +3292,7 @@ void PDFiumEngine::SetCurrentPage(int index) { +@@ -3529,7 +3529,7 @@ void PDFiumEngine::SetCurrentPage(int index) { FORM_DoPageAAction(old_page, form(), FPDFPAGE_AACTION_CLOSE); } most_visible_page_ = index; --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) SetLastInstance(client_->GetPluginInstance()); #endif if (most_visible_page_ != -1 && called_do_document_action_) { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_ppapi_proxy_flash__resource.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_ppapi_proxy_flash__resource.cc index 4ae92fb839ff..258733f01265 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_ppapi_proxy_flash__resource.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_ppapi_proxy_flash__resource.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/ppapi/proxy/flash_resource.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/ppapi/proxy/flash_resource.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/ppapi/proxy/flash_resource.cc @@ -136,7 +136,7 @@ double FlashResource::GetLocalTimeZoneOffset(PP_Instan // require filesystem access prohibited by the sandbox. // TODO(shess): Figure out why OSX needs the access, the sandbox warmup should // handle it. http://crbug.com/149006 --#if defined(OS_LINUX) || defined(OS_MACOSX) -+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || defined(OS_BSD) int32_t result = SyncCall( BROWSER, PpapiHostMsg_Flash_GetLocalTimeZoneOffset(PPTimeToTime(t)), diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_BUILD.gn new file mode 100644 index 000000000000..90720ea28f6a --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_BUILD.gn @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/sandbox/BUILD.gn.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/sandbox/BUILD.gn +@@ -27,7 +27,7 @@ group("sandbox") { + "//sandbox/mac:system_services", + "//sandbox/mac/mojom", + ] +- } else if (is_linux || is_chromeos || is_android) { ++ } else if ((is_linux || is_chromeos || is_android) && !is_bsd) { + public_deps = [ "//sandbox/linux:sandbox" ] + } + } diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_features.gni b/www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_features.gni index 7b7aedad63aa..565b8e3dbf54 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_features.gni +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_features.gni @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/sandbox/features.gni.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/sandbox/features.gni.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/sandbox/features.gni @@ -8,7 +8,7 @@ import("//build/config/nacl/config.gni") # currently. # Do not disable seccomp_bpf anywhere without talking to # security@chromium.org! --use_seccomp_bpf = (is_linux || is_android) && -+use_seccomp_bpf = (is_linux || is_android) && !is_bsd && +-use_seccomp_bpf = (is_linux || is_chromeos || is_android) && ++use_seccomp_bpf = (is_linux || is_chromeos || is_android) && !is_bsd && (current_cpu == "x86" || current_cpu == "x64" || current_cpu == "arm" || current_cpu == "arm64" || current_cpu == "mipsel" || current_cpu == "mips64el") diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_linux_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_linux_BUILD.gn index d2ef04ebac8a..317e2c8b1fed 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_linux_BUILD.gn +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_linux_BUILD.gn @@ -1,22 +1,6 @@ ---- src/3rdparty/chromium/sandbox/linux/BUILD.gn.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/sandbox/linux/BUILD.gn.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/sandbox/linux/BUILD.gn -@@ -12,12 +12,12 @@ if (is_android) { - } - - declare_args() { -- compile_suid_client = is_linux -+ compile_suid_client = is_linux && !is_bsd - -- compile_credentials = is_linux -+ compile_credentials = is_linux && !is_bsd - - # On Android, use plain GTest. -- use_base_test_suite = is_linux -+ use_base_test_suite = is_linux && !is_bsd - } - - if (is_nacl_nonsfi) { -@@ -398,7 +398,7 @@ component("sandbox_services") { +@@ -386,7 +386,7 @@ component("sandbox_services") { public_deps += [ ":sandbox_services_headers" ] } @@ -25,7 +9,7 @@ cflags = [ "-fgnu-inline-asm" ] sources -= [ -@@ -406,6 +406,8 @@ component("sandbox_services") { +@@ -394,6 +394,8 @@ component("sandbox_services") { "services/init_process_reaper.h", "services/scoped_process.cc", "services/scoped_process.h", @@ -34,14 +18,3 @@ "services/yama.cc", "services/yama.h", "syscall_broker/broker_channel.cc", -@@ -424,6 +426,10 @@ component("sandbox_services") { - "syscall_broker/broker_process.h", - "syscall_broker/broker_simple_message.cc", - "syscall_broker/broker_simple_message.h", -+ ] -+ sources += [ -+ "services/libc_interceptor.cc", -+ "services/libc_interceptor.h", - ] - } else if (!is_android) { - sources += [ diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_linux_services_libc__interceptor.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_linux_services_libc__interceptor.cc index 7e4c052fc7cd..4b0879072797 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_linux_services_libc__interceptor.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_linux_services_libc__interceptor.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/sandbox/linux/services/libc_interceptor.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/sandbox/linux/services/libc_interceptor.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/sandbox/linux/services/libc_interceptor.cc @@ -11,7 +11,9 @@ #include @@ -10,7 +10,7 @@ #include #include #include -@@ -94,7 +96,7 @@ bool ReadTimeStruct(base::PickleIterator* iter, +@@ -93,7 +95,7 @@ bool ReadTimeStruct(base::PickleIterator* iter, } else { base::AutoLock lock(g_timezones_lock.Get()); auto ret_pair = g_timezones.Get().insert(timezone); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_BUILD.gn new file mode 100644 index 000000000000..806318e14523 --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_BUILD.gn @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/sandbox/policy/BUILD.gn.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/sandbox/policy/BUILD.gn +@@ -27,7 +27,7 @@ component("policy") { + "//sandbox:common", + ] + public_deps = [] +- if (is_linux || is_chromeos) { ++ if ((is_linux || is_chromeos) && !is_bsd) { + sources += [ + "linux/bpf_audio_policy_linux.cc", + "linux/bpf_audio_policy_linux.h", diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_switches.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_switches.cc new file mode 100644 index 000000000000..c045f096d465 --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_switches.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/sandbox/policy/switches.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/sandbox/policy/switches.cc +@@ -81,7 +81,7 @@ const char kNoSandbox[] = "no-sandbox"; + // Meant to be used as a browser-level switch for testing purposes only. + const char kNoSandbox[] = "no-sandbox"; + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + // Instructs the zygote to launch without a sandbox. Processes forked from this + // type of zygote will apply their own custom sandboxes later. + const char kNoZygoteSandbox[] = "no-zygote-sandbox"; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_switches.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_switches.h new file mode 100644 index 000000000000..db9495017bf9 --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_switches.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/sandbox/policy/switches.h.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/sandbox/policy/switches.h +@@ -53,7 +53,7 @@ SANDBOX_POLICY_EXPORT extern const char kNoSandbox[]; + SANDBOX_POLICY_EXPORT extern const char kGpuSandboxAllowSysVShm[]; + SANDBOX_POLICY_EXPORT extern const char kGpuSandboxFailuresFatal[]; + SANDBOX_POLICY_EXPORT extern const char kNoSandbox[]; +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + SANDBOX_POLICY_EXPORT extern const char kNoZygoteSandbox[]; + #endif + #if defined(OS_WIN) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_audio_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_audio_BUILD.gn index 575936c57a98..cfba3e175851 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_audio_BUILD.gn +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_audio_BUILD.gn @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/services/audio/BUILD.gn.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/services/audio/BUILD.gn.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/services/audio/BUILD.gn -@@ -106,7 +106,7 @@ source_set("lib") { - "//services/service_manager/sandbox:sandbox", +@@ -73,7 +73,7 @@ source_set("audio") { + "//services/audio/public/mojom", ] -- if (is_linux) { -+ if ((is_linux) && (!is_bsd)) { +- if (is_linux || is_chromeos) { ++ if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "audio_sandbox_hook_linux.cc", "audio_sandbox_hook_linux.h", diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_geolocation_location__arbitrator.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_geolocation_location__arbitrator.cc index 9f63b2eb7c59..80e0e835590f 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_geolocation_location__arbitrator.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_geolocation_location__arbitrator.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/services/device/geolocation/location_arbitrator.cc.orig 2020-03-16 14:04:24 UTC +--- src/3rdparty/chromium/services/device/geolocation/location_arbitrator.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/services/device/geolocation/location_arbitrator.cc -@@ -159,7 +159,7 @@ LocationArbitrator::NewNetworkLocationProvider( +@@ -159,7 +159,7 @@ LocationArbitrator::NewSystemLocationProvider() { std::unique_ptr LocationArbitrator::NewSystemLocationProvider() { --#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_FUCHSIA) -+#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_FUCHSIA) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_FUCHSIA) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_FUCHSIA) || defined(OS_BSD) return nullptr; #else return device::NewSystemLocationProvider(); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_hid_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_hid_BUILD.gn deleted file mode 100644 index be8dffe51590..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_hid_BUILD.gn +++ /dev/null @@ -1,16 +0,0 @@ ---- src/3rdparty/chromium/services/device/hid/BUILD.gn.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/services/device/hid/BUILD.gn -@@ -51,6 +51,13 @@ source_set("hid") { - deps += [ "//device/udev_linux" ] - } - -+ if (is_bsd) { -+ sources -= [ -+ "hid_connection_linux.cc", -+ "hid_connection_linux.h", -+ ] -+ } -+ - if (is_chromeos) { - deps += [ "//chromeos" ] - } diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_serial_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_serial_BUILD.gn index b19d623a438d..25df2e608a0f 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_serial_BUILD.gn +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_serial_BUILD.gn @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/services/device/serial/BUILD.gn.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/services/device/serial/BUILD.gn.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/services/device/serial/BUILD.gn -@@ -4,7 +4,7 @@ +@@ -11,7 +11,7 @@ set_sources_assignment_filter(deprecated_default_sourc + import("//build/config/deprecated_default_sources_assignment_filter.gni") + set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - import("//build/config/features.gni") - --if (is_win || (is_linux && use_udev) || is_mac) { -+if (is_win || (is_linux && use_udev) || is_mac || is_bsd) { +-if (is_win || ((is_linux || is_chromeos) && use_udev) || is_mac) { ++if (is_win || ((is_linux || is_chromeos) && use_udev) || is_mac || is_bsd) { config("platform_support") { visibility = [ ":serial" ] if (is_win) { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_serial_serial__device__enumerator.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_serial_serial__device__enumerator.cc new file mode 100644 index 000000000000..fd5ff2291222 --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_serial_serial__device__enumerator.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/services/device/serial/serial_device_enumerator.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/services/device/serial/serial_device_enumerator.cc +@@ -10,7 +10,7 @@ + #include "build/build_config.h" + #include "components/device_event_log/device_event_log.h" + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + #include "services/device/serial/serial_device_enumerator_linux.h" + #elif defined(OS_MAC) + #include "services/device/serial/serial_device_enumerator_mac.h" +@@ -23,7 +23,7 @@ std::unique_ptr SerialDeviceEn + // static + std::unique_ptr SerialDeviceEnumerator::Create( + scoped_refptr ui_task_runner) { +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + return SerialDeviceEnumeratorLinux::Create(); + #elif defined(OS_MAC) + return std::make_unique(); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_serial_serial__io__handler__posix.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_serial_serial__io__handler__posix.cc index 3c9408794533..ded5074d180b 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_serial_serial__io__handler__posix.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_serial_serial__io__handler__posix.cc @@ -1,11 +1,22 @@ ---- src/3rdparty/chromium/services/device/serial/serial_io_handler_posix.cc.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/services/device/serial/serial_io_handler_posix.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/services/device/serial/serial_io_handler_posix.cc -@@ -65,7 +65,7 @@ bool BitrateToSpeedConstant(int bitrate, speed_t* spee +@@ -37,6 +37,10 @@ struct termios2 { + + #endif // defined(OS_LINUX) || defined(OS_CHROMEOS) + ++#if defined(OS_BSD) ++#include ++#endif ++ + #if defined(OS_MAC) + #include + #endif +@@ -67,7 +71,7 @@ bool BitrateToSpeedConstant(int bitrate, speed_t* spee BITRATE_TO_SPEED_CASE(9600) BITRATE_TO_SPEED_CASE(19200) BITRATE_TO_SPEED_CASE(38400) --#if !defined(OS_MACOSX) -+#if !defined(OS_MACOSX) && !defined(OS_BSD) +-#if !defined(OS_MAC) ++#if !defined(OS_MAC) && !defined(OS_BSD) BITRATE_TO_SPEED_CASE(57600) BITRATE_TO_SPEED_CASE(115200) BITRATE_TO_SPEED_CASE(230400) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_BUILD.gn index e09ec3d55bb4..a524d78c400d 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_BUILD.gn +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_BUILD.gn @@ -1,10 +1,19 @@ ---- src/3rdparty/chromium/services/network/BUILD.gn.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/services/network/BUILD.gn.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/services/network/BUILD.gn -@@ -160,7 +160,6 @@ component("network_service") { +@@ -262,9 +262,15 @@ jumbo_component("network_service") { + deps += [ "//components/certificate_transparency" ] + } - if (is_linux) { +- if (is_linux || is_chromeos) { ++ if ((is_linux && !is_bsd) || is_chromeos) { deps += [ -- "//sandbox/linux:sandbox_services", - "//services/service_manager/sandbox:sandbox", + "//sandbox/linux:sandbox_services", ++ "//sandbox/policy", ++ ] ++ } ++ ++ if (is_bsd) { ++ deps += [ + "//sandbox/policy", ] } diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__context.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__context.cc index 0fa1d2d55cfa..73bf508de8e9 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__context.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__context.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/services/network/network_context.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/services/network/network_context.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/services/network/network_context.cc -@@ -1810,7 +1810,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestC +@@ -1921,7 +1921,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestC net::CookieCryptoDelegate* crypto_delegate = nullptr; if (params_->enable_encrypted_cookies) { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.cc index 873df87daa09..d160463556b2 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.cc @@ -1,15 +1,15 @@ ---- src/3rdparty/chromium/services/network/network_sandbox_hook_linux.cc.orig 2019-03-01 17:04:22 UTC +--- src/3rdparty/chromium/services/network/network_sandbox_hook_linux.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/services/network/network_sandbox_hook_linux.cc -@@ -14,6 +14,7 @@ using sandbox::syscall_broker::MakeBrokerCommandSet; +@@ -14,6 +14,7 @@ bool NetworkPreSandboxHook(sandbox::policy::SandboxLin namespace network { - bool NetworkPreSandboxHook(service_manager::SandboxLinux::Options options) { + bool NetworkPreSandboxHook(sandbox::policy::SandboxLinux::Options options) { +#if !defined(OS_BSD) - auto* instance = service_manager::SandboxLinux::GetInstance(); + auto* instance = sandbox::policy::SandboxLinux::GetInstance(); // TODO(tsepez): remove universal permission under filesytem root. -@@ -32,6 +33,7 @@ bool NetworkPreSandboxHook(service_manager::SandboxLin - service_manager::SandboxLinux::PreSandboxHook(), options); +@@ -32,6 +33,7 @@ bool NetworkPreSandboxHook(sandbox::policy::SandboxLin + sandbox::policy::SandboxLinux::PreSandboxHook(), options); instance->EngageNamespaceSandboxIfPossible(); +#endif // defined(OS_BSD) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__service.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__service.cc index f0da3d823708..ae903cf5b9b8 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__service.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__service.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/services/network/network_service.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/services/network/network_service.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/services/network/network_service.cc -@@ -67,7 +67,7 @@ +@@ -70,7 +70,7 @@ #include "third_party/boringssl/src/include/openssl/cpu.h" #endif @@ -9,7 +9,7 @@ #include "components/os_crypt/key_storage_config_linux.h" #endif -@@ -636,7 +636,7 @@ void NetworkService::OnCertDBChanged() { +@@ -670,7 +670,7 @@ void NetworkService::OnCertDBChanged() { net::CertDatabase::GetInstance()->NotifyObserversCertDBChanged(); } diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__service.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__service.h index e41e1ff5ced0..3cfb6599d79b 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__service.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__service.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/services/network/network_service.h.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/services/network/network_service.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/services/network/network_service.h -@@ -186,7 +186,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService - #endif // !BUILDFLAG(IS_CT_SUPPORTED) - void UpdateCRLSet(base::span crl_set) override; +@@ -196,7 +196,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService + base::span config, + mojom::NetworkService::UpdateLegacyTLSConfigCallback callback) override; void OnCertDBChanged() override; -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) void SetCryptConfig(mojom::CryptConfigPtr crypt_config) override; #endif - #if defined(OS_MACOSX) && !defined(OS_IOS) + #if defined(OS_WIN) || defined(OS_MAC) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_public_cpp_cert__verifier_cert__verifier__creation.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_public_cpp_cert__verifier_cert__verifier__creation.cc new file mode 100644 index 000000000000..2a13a8f4d942 --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_public_cpp_cert__verifier_cert__verifier__creation.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/services/network/public/cpp/cert_verifier/cert_verifier_creation.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/services/network/public/cpp/cert_verifier/cert_verifier_creation.cc +@@ -70,7 +70,7 @@ bool IsUsingCertNetFetcher() { + + bool IsUsingCertNetFetcher() { + #if defined(OS_ANDROID) || defined(OS_FUCHSIA) || defined(OS_CHROMEOS) || \ +- defined(OS_LINUX) || \ ++ defined(OS_LINUX) || defined(OS_BSD) || \ + BUILDFLAG(TRIAL_COMPARISON_CERT_VERIFIER_SUPPORTED) || \ + BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED) + return true; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc index 4948abbb9c7c..0e35a6f3391e 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc @@ -1,20 +1,20 @@ ---- src/3rdparty/chromium/services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc -@@ -43,7 +43,7 @@ namespace { +@@ -45,7 +45,7 @@ uint32_t CalculatePrivateFootprintKb(const mojom::RawO uint32_t CalculatePrivateFootprintKb(const mojom::RawOSMemDump& os_dump, uint32_t shared_resident_kb) { DCHECK(os_dump.platform_private_footprint); --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) uint64_t rss_anon_bytes = os_dump.platform_private_footprint->rss_anon_bytes; uint64_t vm_swap_bytes = os_dump.platform_private_footprint->vm_swap_bytes; return (rss_anon_bytes + vm_swap_bytes) / 1024; -@@ -82,7 +82,7 @@ memory_instrumentation::mojom::OSMemDumpPtr CreatePubl +@@ -84,7 +84,7 @@ memory_instrumentation::mojom::OSMemDumpPtr CreatePubl os_dump->is_peak_rss_resettable = internal_os_dump.is_peak_rss_resettable; os_dump->private_footprint_kb = CalculatePrivateFootprintKb(internal_os_dump, shared_resident_kb); --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) os_dump->private_footprint_swap_kb = internal_os_dump.platform_private_footprint->vm_swap_bytes / 1024; #endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics.h index d3345382efdf..19be81430d8c 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics.h @@ -1,32 +1,32 @@ ---- src/3rdparty/chromium/services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics.h.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics.h -@@ -28,9 +28,9 @@ class COMPONENT_EXPORT( +@@ -45,9 +45,9 @@ class COMPONENT_EXPORT( mojom::RawOSMemDump*); static std::vector GetProcessMemoryMaps(base::ProcessId); --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) static void SetProcSmapsForTesting(FILE*); --#endif // defined(OS_LINUX) || defined(OS_ANDROID) -+#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) private: FRIEND_TEST_ALL_PREFIXES(OSMetricsTest, ParseProcSmaps); -@@ -44,7 +44,7 @@ class COMPONENT_EXPORT( +@@ -61,7 +61,7 @@ class COMPONENT_EXPORT( static std::vector GetProcessModules(base::ProcessId); #endif --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) - // Provides information on the dump state of resident pages. - enum class MappedAndResidentPagesDumpState { - // Access to /proc//pagemap can be denied for android devices running -@@ -68,7 +68,7 @@ class COMPONENT_EXPORT( +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) + // Provides information on the dump state of resident pages. These values are + // written to logs. New enum values can be added, but existing enums must + // never be renumbered or deleted and reused. +@@ -96,7 +96,7 @@ class COMPONENT_EXPORT( // TODO(chiniforooshan): move to /base/process/process_metrics_linux.cc after // making sure that peak RSS is useful. static size_t GetPeakResidentSetSize(base::ProcessId pid); --#endif // defined(OS_LINUX) || defined(OS_ANDROID) -+#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) }; } // namespace memory_instrumentation diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics__linux.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics__linux.cc index e43a38b1f096..c37bd27d5a9a 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics__linux.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics__linux.cc @@ -1,9 +1,21 @@ ---- src/3rdparty/chromium/services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_linux.cc.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_linux.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_linux.cc -@@ -24,8 +24,10 @@ +@@ -5,7 +5,6 @@ + #include + #include + #include +-#include + + #include + +@@ -27,8 +26,14 @@ #include "build/build_config.h" #include "services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics.h" ++#if !defined(OS_BSD) ++#include ++#endif ++ +#if !defined(OS_BSD) // Symbol with virtual address of the start of ELF header of the current binary. extern char __ehdr_start; @@ -11,7 +23,7 @@ namespace memory_instrumentation { -@@ -88,6 +90,7 @@ struct ModuleData { +@@ -91,6 +96,7 @@ ModuleData GetMainModuleData() { ModuleData GetMainModuleData() { ModuleData module_data; @@ -19,7 +31,7 @@ Dl_info dl_info; if (dladdr(&__ehdr_start, &dl_info)) { base::debug::ElfBuildIdBuffer build_id; -@@ -98,6 +101,7 @@ ModuleData GetMainModuleData() { +@@ -101,6 +107,7 @@ ModuleData GetMainModuleData() { module_data.build_id = std::string(build_id, build_id_length); } } @@ -27,7 +39,7 @@ return module_data; } -@@ -145,14 +149,14 @@ bool ParseSmapsHeader(const char* header_line, +@@ -148,14 +155,14 @@ bool ParseSmapsHeader(const char* header_line, // Build ID is needed to symbolize heap profiles, and is generated only on // official builds. Build ID is only added for the current library (chrome) // since it is racy to read other libraries which can be unmapped any time. @@ -44,7 +56,36 @@ return res; } -@@ -241,6 +245,7 @@ bool OSMetrics::FillOSMemoryDump(base::ProcessId pid, +@@ -238,6 +245,7 @@ class ScopedProcessSetDumpable { + class ScopedProcessSetDumpable { + public: + ScopedProcessSetDumpable() { ++#if !defined(OS_BSD) + int result = prctl(PR_GET_DUMPABLE, 0, 0, 0, 0); + if (result < 0) { + PLOG(ERROR) << "prctl"; +@@ -253,15 +261,20 @@ class ScopedProcessSetDumpable { + AvoidPrctlOnDestruction(); + } + } ++#else ++ was_dumpable_ = true; ++#endif + } + + ScopedProcessSetDumpable(const ScopedProcessSetDumpable&) = delete; + ScopedProcessSetDumpable& operator=(const ScopedProcessSetDumpable&) = delete; + + ~ScopedProcessSetDumpable() { ++#if !defined(OS_BSD) + if (!was_dumpable_) { + PCHECK(prctl(PR_SET_DUMPABLE, 0, 0, 0, 0) == 0) << "prctl"; + } ++#endif + } + + private: +@@ -284,6 +297,7 @@ bool OSMetrics::FillOSMemoryDump(base::ProcessId pid, mojom::RawOSMemDump* dump) { // TODO(chiniforooshan): There is no need to read both /statm and /status // files. Refactor to get everything from /status using ProcessMetric. @@ -52,7 +93,7 @@ auto statm_file = GetProcPidDir(pid).Append("statm"); auto autoclose = base::ScopedFD(open(statm_file.value().c_str(), O_RDONLY)); int statm_fd = autoclose.get(); -@@ -255,6 +260,10 @@ bool OSMetrics::FillOSMemoryDump(base::ProcessId pid, +@@ -298,6 +312,10 @@ bool OSMetrics::FillOSMemoryDump(base::ProcessId pid, if (!success) return false; @@ -63,7 +104,7 @@ auto process_metrics = CreateProcessMetrics(pid); -@@ -295,6 +304,10 @@ bool OSMetrics::FillOSMemoryDump(base::ProcessId pid, +@@ -342,6 +360,10 @@ std::vector OSMetrics::GetProcessMemoryMa // static std::vector OSMetrics::GetProcessMemoryMaps(base::ProcessId pid) { @@ -74,7 +115,7 @@ std::vector maps; uint32_t res = 0; if (g_proc_smaps_for_testing) { -@@ -312,6 +325,7 @@ std::vector OSMetrics::GetProcessMemoryMa +@@ -359,6 +381,7 @@ std::vector OSMetrics::GetProcessMemoryMa return std::vector(); return maps; @@ -82,7 +123,7 @@ } // static -@@ -319,6 +333,10 @@ OSMetrics::MappedAndResidentPagesDumpState OSMetrics:: +@@ -366,6 +389,10 @@ OSMetrics::MappedAndResidentPagesDumpState OSMetrics:: const size_t start_address, const size_t end_address, std::vector* accessed_pages_bitmap) { @@ -93,7 +134,7 @@ const char* kPagemap = "/proc/self/pagemap"; base::ScopedFILE pagemap_file(fopen(kPagemap, "r")); -@@ -360,6 +378,7 @@ OSMetrics::MappedAndResidentPagesDumpState OSMetrics:: +@@ -413,6 +440,7 @@ OSMetrics::MappedAndResidentPagesDumpState OSMetrics:: } } return OSMetrics::MappedAndResidentPagesDumpState::kSuccess; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_BUILD.gn new file mode 100644 index 000000000000..7694a93336b8 --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_BUILD.gn @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/services/service_manager/BUILD.gn.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/services/service_manager/BUILD.gn +@@ -65,7 +65,7 @@ source_set("service_manager") { + ] + } + +- if (is_linux || is_chromeos) { ++ if ((is_linux || is_chromeos) && !is_bsd) { + deps += [ "//sandbox/linux:sandbox_services" ] + } + } diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_embedder_main.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_embedder_main.cc deleted file mode 100644 index 7027a86a0d27..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_embedder_main.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/services/service_manager/embedder/main.cc.orig 2019-05-23 12:39:34 UTC -+++ src/3rdparty/chromium/services/service_manager/embedder/main.cc -@@ -322,7 +322,7 @@ int Main(const MainParams& params) { - base::EnableTerminationOnOutOfMemory(); - #endif - --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - // The various desktop environments set this environment variable that - // allows the dbus client library to connect directly to the bus. When this - // variable is not set (test environments like xvfb-run), the dbus client diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_embedder_set__process__title__linux.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_embedder_set__process__title__linux.h deleted file mode 100644 index 4530efc4d39d..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_embedder_set__process__title__linux.h +++ /dev/null @@ -1,20 +0,0 @@ ---- src/3rdparty/chromium/services/service_manager/embedder/set_process_title_linux.h.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/services/service_manager/embedder/set_process_title_linux.h -@@ -5,6 +5,9 @@ - #ifndef SERVICES_SERVICE_MANAGER_EMBEDDER_SET_PROCESS_TITLE_LINUX_H_ - #define SERVICES_SERVICE_MANAGER_EMBEDDER_SET_PROCESS_TITLE_LINUX_H_ - -+#include "build/build_config.h" -+ -+#if !defined(OS_FREEBSD) - // Set the process title that will show in "ps" and similar tools. Takes - // printf-style format string and arguments. After calling setproctitle() - // the original main() argv[] array should not be used. By default, the -@@ -14,6 +17,7 @@ - // This signature and naming is to be compatible with most other Unix - // implementations of setproctitle(). - void setproctitle(const char* fmt, ...); -+#endif - - // Initialize state needed for setproctitle() on Linux. Pass the argv pointer - // from main() to setproctitle_init() before calling setproctitle(). diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_public_cpp_service__executable_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_public_cpp_service__executable_BUILD.gn index c74846d9a98b..29623bb23cf8 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_public_cpp_service__executable_BUILD.gn +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_public_cpp_service__executable_BUILD.gn @@ -1,14 +1,11 @@ ---- src/3rdparty/chromium/services/service_manager/public/cpp/service_executable/BUILD.gn.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/services/service_manager/public/cpp/service_executable/BUILD.gn.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/services/service_manager/public/cpp/service_executable/BUILD.gn -@@ -30,6 +30,11 @@ source_set("support") { - "//sandbox/linux:seccomp_bpf", - ] - } -+ if (is_bsd) { -+ deps -= [ -+ "//sandbox/linux:seccomp_bpf" -+ ] -+ } - } +@@ -22,7 +22,7 @@ source_set("support") { + "//services/service_manager/public/mojom", + ] - # Service executable targets should link against this to get a boilerplate entry +- if (is_linux || is_chromeos) { ++ if ((is_linux || is_chromeos) && !is_bsd) { + deps += [ + "//sandbox/linux:sandbox", + "//sandbox/linux:sandbox_services", diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_sandbox_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_sandbox_BUILD.gn deleted file mode 100644 index 70f84f513dc2..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_sandbox_BUILD.gn +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/services/service_manager/sandbox/BUILD.gn.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/services/service_manager/sandbox/BUILD.gn -@@ -28,7 +28,7 @@ component("sandbox") { - "//base", - "//sandbox:common", - ] -- if (is_linux) { -+ if (is_linux && !is_bsd) { - sources += [ - "linux/bpf_base_policy_linux.cc", - "linux/bpf_base_policy_linux.h", diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_sandbox_linux_bpf__renderer__policy__linux.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_sandbox_linux_bpf__renderer__policy__linux.cc deleted file mode 100644 index 263746bdd858..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_sandbox_linux_bpf__renderer__policy__linux.cc +++ /dev/null @@ -1,14 +0,0 @@ ---- src/3rdparty/chromium/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc.orig 2019-05-23 12:39:34 UTC -+++ src/3rdparty/chromium/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc -@@ -15,6 +15,11 @@ - #include "sandbox/linux/system_headers/linux_syscalls.h" - #include "services/service_manager/sandbox/linux/sandbox_linux.h" - -+// On PPC64, TCGETS is defined in terms of struct termios, so we must include termios.h -+#ifdef __powerpc64__ -+#include -+#endif -+ - // TODO(vignatti): replace the local definitions below with #include - // once kernel version 4.6 becomes widely used. - #include diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_zygote__linux.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_zygote__linux.cc deleted file mode 100644 index 7ecfc83da609..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_zygote__linux.cc +++ /dev/null @@ -1,15 +0,0 @@ ---- src/3rdparty/chromium/services/service_manager/zygote/zygote_linux.cc.orig 2019-11-27 21:12:25 UTC -+++ src/3rdparty/chromium/services/service_manager/zygote/zygote_linux.cc -@@ -1,6 +1,7 @@ - // Copyright (c) 2012 The Chromium Authors. All rights reserved. - // Use of this source code is governed by a BSD-style license that can be - // found in the LICENSE file. -+#if 0 - - #include "services/service_manager/zygote/zygote_linux.h" - -@@ -657,3 +658,4 @@ bool Zygote::HandleGetSandboxStatus(int fd, base::Pick - } - - } // namespace service_manager -+#endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_video__capture_broadcasting__receiver.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_video__capture_broadcasting__receiver.cc index e8f0d5652fdc..a920e7b26e8f 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_video__capture_broadcasting__receiver.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_video__capture_broadcasting__receiver.cc @@ -1,20 +1,20 @@ ---- src/3rdparty/chromium/services/video_capture/broadcasting_receiver.cc.orig 2020-03-16 14:04:24 UTC +--- src/3rdparty/chromium/services/video_capture/broadcasting_receiver.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/services/video_capture/broadcasting_receiver.cc -@@ -40,7 +40,7 @@ void CloneSharedBufferHandle(const mojo::ScopedSharedB +@@ -39,7 +39,7 @@ void CloneSharedBufferToRawFileDescriptorHandle( void CloneSharedBufferToRawFileDescriptorHandle( const mojo::ScopedSharedBufferHandle& source, media::mojom::VideoBufferHandlePtr* target) { --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // |source| is unwrapped to a |PlatformSharedMemoryRegion|, from whence a file // descriptor can be extracted which is then mojo-wrapped. base::subtle::PlatformSharedMemoryRegion platform_region = -@@ -183,7 +183,7 @@ void BroadcastingReceiver::BufferContext:: +@@ -184,7 +184,7 @@ void BroadcastingReceiver::BufferContext:: ConvertRawFileDescriptorToSharedBuffer() { DCHECK(buffer_handle_->is_shared_memory_via_raw_file_descriptor()); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // The conversion unwraps the descriptor from its mojo handle to the raw file // descriptor (ie, an int). This is used to create a // PlatformSharedMemoryRegion which is then wrapped as a diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_skia_ext_image__operations__unittest.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_skia_ext_image__operations__unittest.cc deleted file mode 100644 index b915e61fddc4..000000000000 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_skia_ext_image__operations__unittest.cc +++ /dev/null @@ -1,59 +0,0 @@ ---- src/3rdparty/chromium/skia/ext/image_operations_unittest.cc.orig 2019-05-23 12:39:34 UTC -+++ src/3rdparty/chromium/skia/ext/image_operations_unittest.cc -@@ -18,9 +18,11 @@ - #include "skia/ext/image_operations.h" - #include "testing/gtest/include/gtest/gtest.h" - #include "third_party/skia/include/core/SkBitmap.h" -+#include "third_party/skia/include/core/SkColorPriv.h" - #include "third_party/skia/include/core/SkColorSpace.h" - #include "third_party/skia/include/core/SkImageInfo.h" - #include "third_party/skia/include/core/SkRect.h" -+#include "third_party/skia/include/core/SkUnPreMultiply.h" - #include "ui/gfx/codec/png_codec.h" - #include "ui/gfx/geometry/size.h" - -@@ -151,7 +153,7 @@ void DrawCheckerToBitmap(int w, int h, - - bool use_color2 = (x_bit != y_bit); // xor - -- *bmp->getAddr32(x, y) = (use_color2 ? color2 : color1); -+ *bmp->getAddr32(x, y) = SkPreMultiplyColor(use_color2 ? color2 : color1); - } - } - } -@@ -273,7 +275,7 @@ void CheckResizeMethodShouldAverageGrid( - std::max(tested_pixel.max_color_distance, - tested_method.max_color_distance_override); - -- const SkColor actual_color = *dest.getAddr32(x, y); -+ const SkColor actual_color = SkUnPreMultiply::PMColorToColor(*dest.getAddr32(x, y)); - - // Check that the pixels away from the border region are very close - // to the expected average color -@@ -528,7 +530,7 @@ TEST(ImageOperations, ScaleUp) { - for (int src_y = 0; src_y < src_h; ++src_y) { - for (int src_x = 0; src_x < src_w; ++src_x) { - *src.getAddr32(src_x, src_y) = -- SkColorSetARGB(255, 10 + src_x * 100, 10 + src_y * 100, 0); -+ SkPackARGB32(255, 10 + src_x * 100, 10 + src_y * 100, 0); - } - } - -@@ -552,7 +554,7 @@ TEST(ImageOperations, ScaleUp) { - lanczos3(src_x + 0.5 - dst_x_in_src) * - lanczos3(src_y + 0.5 - dst_y_in_src); - sum += coeff; -- SkColor tmp = *src.getAddr32(src_x, src_y); -+ SkColor tmp = SkUnPreMultiply::PMColorToColor(*src.getAddr32(src_x, src_y)); - a += coeff * SkColorGetA(tmp); - r += coeff * SkColorGetR(tmp); - g += coeff * SkColorGetG(tmp); -@@ -571,7 +573,7 @@ TEST(ImageOperations, ScaleUp) { - if (r > 255.0f) r = 255.0f; - if (g > 255.0f) g = 255.0f; - if (b > 255.0f) b = 255.0f; -- SkColor dst_color = *dst.getAddr32(dst_x, dst_y); -+ SkColor dst_color = SkUnPreMultiply::PMColorToColor(*dst.getAddr32(dst_x, dst_y)); - EXPECT_LE(fabs(SkColorGetA(dst_color) - a), 1.5f); - EXPECT_LE(fabs(SkColorGetR(dst_color) - r), 1.5f); - EXPECT_LE(fabs(SkColorGetG(dst_color) - g), 1.5f); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_BUILD.gn index 3408ad70c63a..65291775ceca 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_BUILD.gn +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_BUILD.gn @@ -1,16 +1,44 @@ ---- src/3rdparty/chromium/third_party/angle/BUILD.gn.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/third_party/angle/BUILD.gn.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/third_party/angle/BUILD.gn -@@ -354,7 +354,8 @@ angle_static_library("angle_gpu_info_util") { - if (is_linux) { +@@ -141,10 +141,17 @@ config("extra_warnings") { + ] + } + if (is_clang) { ++ if (!is_bsd) { ++ cflags += [ ++ "-Wdeprecated-copy", ++ "-Wsuggest-destructor-override", ++ "-Wsuggest-override", ++ ] ++ } ++ + cflags += [ + "-Wbad-function-cast", + "-Wconditional-uninitialized", +- "-Wdeprecated-copy", + "-Wextra-semi-stmt", + "-Wfloat-conversion", + "-Winconsistent-missing-destructor-override", +@@ -154,8 +161,6 @@ config("extra_warnings") { + "-Wredundant-parens", + "-Wreturn-std-move-in-c++11", + "-Wshadow-field", +- "-Wsuggest-destructor-override", +- "-Wsuggest-override", + "-Wtautological-type-limit-compare", + "-Wundefined-reinterpret-cast", + "-Wunneeded-internal-declaration", +@@ -388,7 +393,8 @@ angle_static_library("angle_gpu_info_util") { + if (is_linux || is_chromeos) { sources += libangle_gpu_info_util_linux_sources -- if (angle_use_x11) { +- if (angle_use_x11 && angle_has_build) { ++ if ((angle_use_x11 && angle_has_build) || is_bsd) { + # Somewhere "angle_use_x11" is set to false, so we need to add is_bsd here -+ if (angle_use_x11 || is_bsd) { sources += libangle_gpu_info_util_x11_sources deps += [ "src/third_party/libXNVCtrl:libXNVCtrl" ] defines += [ "GPU_INFO_USE_X11" ] -@@ -362,6 +363,7 @@ angle_static_library("angle_gpu_info_util") { +@@ -396,6 +402,7 @@ angle_static_library("angle_gpu_info_util") { "X11", "Xi", "Xext", diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__x11.cpp b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__x11.cpp index badcf937c4a8..544f9bb4fa2d 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__x11.cpp +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__x11.cpp @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/third_party/angle/src/gpu_info_util/SystemInfo_x11.cpp.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/third_party/angle/src/gpu_info_util/SystemInfo_x11.cpp.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/third_party/angle/src/gpu_info_util/SystemInfo_x11.cpp @@ -8,6 +8,8 @@ @@ -9,8 +9,8 @@ #include #include "common/debug.h" -@@ -18,8 +20,44 @@ - #error SystemInfo_x11.cpp compiled without GPU_INFO_USE_X11 +@@ -18,8 +20,43 @@ + # error SystemInfo_x11.cpp compiled without GPU_INFO_USE_X11 #endif +#define GLX_RENDERER_VENDOR_ID_MESA 0x8183 @@ -50,7 +50,6 @@ + + return true; +} -+ bool GetNvidiaDriverVersionWithXNVCtrl(std::string *version) { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_Display.cpp b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_Display.cpp index 93ffbe2716f7..bdb9de4cba69 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_Display.cpp +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_Display.cpp @@ -1,47 +1,47 @@ ---- src/3rdparty/chromium/third_party/angle/src/libANGLE/Display.cpp.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/third_party/angle/src/libANGLE/Display.cpp.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/third_party/angle/src/libANGLE/Display.cpp -@@ -54,7 +54,7 @@ +@@ -55,7 +55,7 @@ # include "libANGLE/renderer/gl/cgl/DisplayCGL.h" # elif defined(ANGLE_PLATFORM_IOS) # include "libANGLE/renderer/gl/eagl/DisplayEAGL.h" -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_POSIX) - # if defined(ANGLE_USE_OZONE) - # include "libANGLE/renderer/gl/egl/ozone/DisplayOzone.h" - # else -@@ -252,7 +252,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di + # include "libANGLE/renderer/gl/egl/DisplayEGL.h" + # if defined(ANGLE_USE_GBM) + # include "libANGLE/renderer/gl/egl/gbm/DisplayGbm.h" +@@ -264,7 +264,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di impl = new rx::DisplayCGL(state); # elif defined(ANGLE_PLATFORM_IOS) impl = new rx::DisplayEAGL(state); -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_POSIX) - # if defined(ANGLE_USE_OZONE) - // This might work but has never been tried, so disallow for now. - impl = nullptr; -@@ -284,7 +284,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di + # if defined(ANGLE_USE_GBM) + if (platformType == 0) + { +@@ -305,7 +305,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di #if defined(ANGLE_ENABLE_OPENGL) # if defined(ANGLE_PLATFORM_WINDOWS) impl = new rx::DisplayWGL(state); -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_POSIX) - # if defined(ANGLE_USE_OZONE) - impl = new rx::DisplayOzone(state); - # else -@@ -315,7 +315,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di + # if defined(ANGLE_USE_GBM) + if (platformType == 0) + { +@@ -346,7 +346,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di { impl = rx::CreateVulkanWin32Display(state); } -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_POSIX) - if (rx::IsVulkanXcbDisplayAvailable()) + # if defined(ANGLE_USE_X11) + if (platformType == EGL_PLATFORM_X11_EXT && rx::IsVulkanXcbDisplayAvailable()) { - impl = rx::CreateVulkanXcbDisplay(state); -@@ -1387,7 +1387,7 @@ static ClientExtensions GenerateClientExtensions() +@@ -1612,7 +1612,7 @@ static ClientExtensions GenerateClientExtensions() extensions.x11Visual = true; #endif --#if defined(ANGLE_PLATFORM_LINUX) && !defined(ANGLE_USE_OZONE) -+#if defined(ANGLE_PLATFORM_POSIX) && !defined(ANGLE_USE_OZONE) +-#if defined(ANGLE_PLATFORM_LINUX) ++#if defined(ANGLE_PLATFORM_POSIX) extensions.platformANGLEDeviceTypeEGLANGLE = true; #endif diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_driver__utils.cpp b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_driver__utils.cpp index 75891e2eba3b..a533700fd0d3 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_driver__utils.cpp +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_driver__utils.cpp @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/driver_utils.cpp.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/driver_utils.cpp.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/driver_utils.cpp -@@ -16,7 +16,7 @@ +@@ -17,7 +17,7 @@ # include #endif @@ -9,7 +9,7 @@ # include #endif -@@ -206,7 +206,7 @@ OSVersion GetMacOSVersion() +@@ -207,7 +207,7 @@ OSVersion GetMacOSVersion() } #endif @@ -18,7 +18,7 @@ bool ParseLinuxOSVersion(const char *version, int *major, int *minor, int *patch) { errno = 0; // reset global error flag. -@@ -218,6 +218,14 @@ bool ParseLinuxOSVersion(const char *version, int *maj +@@ -219,6 +219,14 @@ bool ParseLinuxOSVersion(const char *version, int *maj } *minor = static_cast(strtol(next + 1, &next, 10)); @@ -33,7 +33,7 @@ if (next == nullptr || *next != '.' || errno != 0) { return false; -@@ -228,6 +236,7 @@ bool ParseLinuxOSVersion(const char *version, int *maj +@@ -229,6 +237,7 @@ bool ParseLinuxOSVersion(const char *version, int *maj { return false; } @@ -41,7 +41,7 @@ return true; } -@@ -235,7 +244,7 @@ bool ParseLinuxOSVersion(const char *version, int *maj +@@ -236,7 +245,7 @@ OSVersion GetLinuxOSVersion() OSVersion GetLinuxOSVersion() { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_driver__utils.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_driver__utils.h index 71eae3ed3bdd..e05a550f7d98 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_driver__utils.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_driver__utils.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/driver_utils.h.orig 2019-05-23 12:39:34 UTC +--- src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/driver_utils.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/driver_utils.h -@@ -107,7 +107,7 @@ inline bool IsWindows() +@@ -145,7 +145,7 @@ inline bool IsLinux() inline bool IsLinux() { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_vulkan_DisplayVk__api.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_vulkan_DisplayVk__api.h index 1a15bf015cbd..af770e8b5d08 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_vulkan_DisplayVk__api.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_vulkan_DisplayVk__api.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/vulkan/DisplayVk_api.h.orig 2020-04-08 09:41:36 UTC +--- src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/vulkan/DisplayVk_api.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/vulkan/DisplayVk_api.h -@@ -19,7 +19,7 @@ bool IsVulkanWin32DisplayAvailable(); +@@ -19,10 +19,10 @@ DisplayImpl *CreateVulkanWin32Display(const egl::Displ DisplayImpl *CreateVulkanWin32Display(const egl::DisplayState &state); #endif // defined(ANGLE_PLATFORM_WINDOWS) @@ -8,4 +8,8 @@ +#if defined(ANGLE_PLATFORM_POSIX) bool IsVulkanXcbDisplayAvailable(); DisplayImpl *CreateVulkanXcbDisplay(const egl::DisplayState &state); - #endif // defined(ANGLE_PLATFORM_LINUX) +-#endif // defined(ANGLE_PLATFORM_LINUX) ++#endif // defined(ANGLE_PLATFORM_POSIX) + + #if defined(ANGLE_PLATFORM_ANDROID) + bool IsVulkanAndroidDisplayAvailable(); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_third__party_vulkan-loader_src_loader_loader.c b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_third__party_vulkan-loader_src_loader_loader.c index ed18d6ae3f53..df769942712a 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_third__party_vulkan-loader_src_loader_loader.c +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_third__party_vulkan-loader_src_loader_loader.c @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/angle/third_party/vulkan-loader/src/loader/loader.c.orig 2020-03-16 14:04:24 UTC +--- src/3rdparty/chromium/third_party/angle/third_party/vulkan-loader/src/loader/loader.c.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/third_party/angle/third_party/vulkan-loader/src/loader/loader.c -@@ -229,7 +229,7 @@ void *loader_device_heap_realloc(const struct loader_d +@@ -250,7 +250,7 @@ void *loader_device_heap_realloc(const struct loader_d } // Environment variables diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_BUILD.gn b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_BUILD.gn index 2a19ba1afb39..d2fbffbd58ec 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_BUILD.gn +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/BUILD.gn.orig 2019-11-27 21:12:25 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/BUILD.gn.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/BUILD.gn -@@ -45,8 +45,8 @@ config("inside_blink") { +@@ -55,8 +55,8 @@ config("inside_blink") { "-Wconversion", "-Wno-float-conversion", "-Wno-sign-conversion", @@ -9,5 +9,5 @@ +# "-Wno-implicit-float-conversion", +# "-Wno-implicit-int-conversion", ] - } - } + + if (!is_chromeos || default_toolchain != "//build/toolchain/cros:target") { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_blink__initializer.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_blink__initializer.cc index f44d356e1fa9..df41f0dd0493 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_blink__initializer.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_blink__initializer.cc @@ -1,34 +1,34 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/controller/blink_initializer.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/controller/blink_initializer.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/controller/blink_initializer.cc -@@ -65,11 +65,11 @@ +@@ -68,11 +68,11 @@ #include "third_party/blink/renderer/controller/oom_intervention_impl.h" #endif --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "third_party/blink/renderer/controller/memory_usage_monitor_posix.h" #endif --#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_MACOSX) || \ -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_BSD) || \ - defined(OS_WIN) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || \ ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) || \ + defined(OS_MAC) || defined(OS_WIN) #include "third_party/blink/renderer/controller/highest_pmf_reporter.h" #include "third_party/blink/renderer/controller/user_level_memory_pressure_signal_generator.h" -@@ -146,7 +146,7 @@ void InitializeCommon(Platform* platform, mojo::Binder +@@ -154,7 +154,7 @@ void InitializeCommon(Platform* platform, mojo::Binder CrashMemoryMetricsReporterImpl::Instance(); #endif --#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_MACOSX) || \ -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_BSD) || \ - defined(OS_WIN) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || \ ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) || \ + defined(OS_MAC) || defined(OS_WIN) // Initialize UserLevelMemoryPressureSignalGenerator so it starts monitoring. if (UserLevelMemoryPressureSignalGenerator::Enabled()) -@@ -192,7 +192,7 @@ void BlinkInitializer::RegisterInterfaces(mojo::Binder - &CrashMemoryMetricsReporterImpl::Bind)), +@@ -212,7 +212,7 @@ void BlinkInitializer::RegisterInterfaces(mojo::Binder main_thread->GetTaskRunner()); #endif --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) binders.Add(ConvertToBaseRepeatingCallback( CrossThreadBindRepeating(&MemoryUsageMonitorPosix::Bind)), main_thread->GetTaskRunner()); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_memory__usage__monitor__posix.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_memory__usage__monitor__posix.cc index 7755c7d6c409..3f3f783d137d 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_memory__usage__monitor__posix.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_memory__usage__monitor__posix.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/controller/memory_usage_monitor_posix.cc.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/controller/memory_usage_monitor_posix.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/controller/memory_usage_monitor_posix.cc @@ -134,7 +134,7 @@ void MemoryUsageMonitorPosix::SetProcFiles(base::File status_fd_.reset(status_file.TakePlatformFile()); } --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // static void MemoryUsageMonitorPosix::Bind( mojo::PendingReceiver receiver) { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_memory__usage__monitor__posix.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_memory__usage__monitor__posix.h index e26f4d71f894..8856670b717a 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_memory__usage__monitor__posix.h +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_memory__usage__monitor__posix.h @@ -1,20 +1,20 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/controller/memory_usage_monitor_posix.h.orig 2020-11-07 01:22:36 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/controller/memory_usage_monitor_posix.h.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/controller/memory_usage_monitor_posix.h @@ -12,7 +12,7 @@ #include "third_party/blink/renderer/controller/controller_export.h" #include "third_party/blink/renderer/controller/memory_usage_monitor.h" --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "third_party/blink/public/mojom/memory_usage_monitor_linux.mojom-blink.h" #endif -@@ -21,7 +21,7 @@ namespace blink { +@@ -21,7 +21,7 @@ class CONTROLLER_EXPORT MemoryUsageMonitorPosix // MemoryUsageMonitor implementation for Android and Linux. class CONTROLLER_EXPORT MemoryUsageMonitorPosix : public MemoryUsageMonitor --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) , public mojom::blink::MemoryUsageMonitorLinux #endif @@ -22,8 +22,8 @@ public: MemoryUsageMonitorPosix() = default; --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) static void Bind( mojo::PendingReceiver receiver); #endif @@ -31,8 +31,8 @@ uint64_t* vm_size, uint64_t* vm_hwm_size); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // mojom::MemoryUsageMonitorLinux implementations: void SetProcFiles(base::File statm_file, base::File status_file) override; #endif @@ -40,8 +40,8 @@ base::ScopedFD statm_fd_; base::ScopedFD status_fd_; --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) mojo::Receiver receiver_{this}; #endif }; diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_clipboard_system__clipboard.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_clipboard_system__clipboard.cc new file mode 100644 index 000000000000..a7567b319a56 --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_clipboard_system__clipboard.cc @@ -0,0 +1,15 @@ +--- src/3rdparty/chromium/third_party/blink/renderer/core/clipboard/system_clipboard.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/third_party/blink/renderer/core/clipboard/system_clipboard.cc +@@ -41,10 +41,10 @@ SystemClipboard::SystemClipboard(LocalFrame* frame) + frame->GetBrowserInterfaceBroker().GetInterface( + clipboard_.BindNewPipeAndPassReceiver( + frame->GetTaskRunner(TaskType::kUserInteraction))); +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) + is_selection_buffer_available_ = + frame->GetSettings()->GetSelectionClipboardBufferAvailable(); +-#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#endif // (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) + } + + bool SystemClipboard::IsSelectionMode() const { diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_editing_editing__behavior.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_editing_editing__behavior.cc index 9ac3c41c233e..abf891dfebe3 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_editing_editing__behavior.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_editing_editing__behavior.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/core/editing/editing_behavior.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/core/editing/editing_behavior.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/core/editing/editing_behavior.cc -@@ -270,7 +270,7 @@ bool EditingBehavior::ShouldInsertCharacter(const Keyb +@@ -274,7 +274,7 @@ bool EditingBehavior::ShouldInsertCharacter(const Keyb // unexpected behaviour if (ch < ' ') return false; --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // According to XKB map no keyboard combinations with ctrl key are mapped to // printable characters, however we need the filter as the DomKey/text could // contain printable characters. diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_exported_web__frame__test.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_exported_web__frame__test.cc new file mode 100644 index 000000000000..e3d43caa15cd --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_exported_web__frame__test.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/third_party/blink/renderer/core/exported/web_frame_test.cc.orig 2021-12-15 16:12:54 UTC ++++ src/3rdparty/chromium/third_party/blink/renderer/core/exported/web_frame_test.cc +@@ -6054,7 +6054,7 @@ TEST_F(WebFrameTest, DISABLED_PositionForPointTest) { + EXPECT_EQ(64, ComputeOffset(layout_object, 1000, 1000)); + } + +-#if !defined(OS_MAC) && !defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#if !defined(OS_MAC) && !defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_BSD) + TEST_F(WebFrameTest, SelectRangeStaysHorizontallyAlignedWhenMoved) { + RegisterMockedHttpURLLoad("move_caret.html"); + +@@ -6387,7 +6387,7 @@ TEST_F(CompositedSelectionBoundsTest, EditableDiv) { + TEST_F(CompositedSelectionBoundsTest, EditableDiv) { + RunTest("composited_selection_bounds_editable_div.html"); + } +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + #if !defined(OS_ANDROID) + TEST_F(CompositedSelectionBoundsTest, Input) { + RunTest("composited_selection_bounds_input.html"); diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc index 6023a82edc49..3c49a43247fb 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc -@@ -34,7 +34,7 @@ namespace { - constexpr TimeDelta kSlackBeforeDeadline = TimeDelta::FromMilliseconds(1); +@@ -43,7 +43,7 @@ constexpr base::TimeDelta kEncodeRowSlackBeforeDeadlin + base::TimeDelta::FromMicroseconds(100); /* The value is based on user statistics on Nov 2017. */ --#if (defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)) -+#if (defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)) || defined(OS_BSD) +-#if (defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || \ ++#if (defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || defined(OS_BSD) || \ + defined(OS_WIN)) const double kIdleTaskStartTimeoutDelayMs = 1000.0; #else - const double kIdleTaskStartTimeoutDelayMs = 4000.0; // For ChromeOS, Mobile diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_html_forms_internal__popup__menu.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_html_forms_internal__popup__menu.cc index 0b01fa34629f..e3d9d8c07b15 100644 --- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_html_forms_internal__popup__menu.cc +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_html_forms_internal__popup__menu.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/core/html/forms/internal_popup_menu.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/core/html/forms/internal_popup_menu.cc.orig 2021-12-15 16:12:54 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/core/html/forms/internal_popup_menu.cc -@@ -126,7 +126,7 @@ class InternalPopupMenu::ItemIterationContext { +@@ -155,7 +155,7 @@ class InternalPopupMenu::ItemIterationContext { is_in_group_(false), buffer_(buffer) { DCHECK(buffer_); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // On other platforms, the