Browse Source

upgpkg: ungoogled-chromium 93.0.4577.82-1

upstream release
jk 3 years ago
parent
commit
19df2824f9

+ 15 - 12
.SRCINFO

@@ -1,6 +1,6 @@
 pkgbase = ungoogled-chromium
 	pkgdesc = A lightweight approach to removing Google web service dependency
-	pkgver = 92.0.4515.159
+	pkgver = 93.0.4577.82
 	pkgrel = 1
 	url = https://github.com/Eloston/ungoogled-chromium
 	arch = x86_64
@@ -14,7 +14,6 @@ pkgbase = ungoogled-chromium
 	makedepends = nodejs
 	makedepends = pipewire
 	makedepends = java-runtime-headless
-	makedepends = python2
 	depends = gtk3
 	depends = nss
 	depends = alsa-lib
@@ -51,28 +50,32 @@ pkgbase = ungoogled-chromium
 	optdepends = kwallet: support for storing passwords in KWallet on Plasma
 	provides = chromium
 	conflicts = chromium
-	source = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-92.0.4515.159.tar.xz
+	source = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-93.0.4577.82.tar.xz
 	source = https://github.com/foutrelis/chromium-launcher/archive/v8/chromium-launcher-8.tar.gz
-	source = https://github.com/stha09/chromium-patches/releases/download/chromium-92-patchset-7/chromium-92-patchset-7.tar.xz
-	source = extend-enable-accelerated-video-decode-flag.patch
+	source = https://github.com/stha09/chromium-patches/releases/download/chromium-93-patchset-6/chromium-93-patchset-6.tar.xz
 	source = linux-sandbox-syscall-broker-use-struct-kernel_stat.patch
 	source = linux-sandbox-fix-fstatat-crash.patch
+	source = replace-blacklist-with-ignorelist.patch
 	source = sql-make-VirtualCursor-standard-layout-type.patch
-	source = chromium-freetype-2.11.patch
+	source = chromium-93-ffmpeg-4.4.patch
+	source = chromium-harfbuzz-3.0.0.patch
+	source = skia-harfbuzz-3.0.0.patch
 	source = use-oauth2-client-switches-as-default.patch
-	source = ungoogled-chromium-92.0.4515.159-1.tar.gz::https://github.com/Eloston/ungoogled-chromium/archive/92.0.4515.159-1.tar.gz
+	source = ungoogled-chromium-93.0.4577.82-1.tar.gz::https://github.com/Eloston/ungoogled-chromium/archive/93.0.4577.82-1.tar.gz
 	source = chromium-drirc-disable-10bpc-color-configs.conf
 	source = wayland-egl.patch
-	sha256sums = d97d337d0d70e959a75f1f510f5d78d2b57b5bf24573b7ade9fff9f26a7cfd11
+	sha256sums = 5d66214858fcba11a8f733d7a6fab61ed10e13e7df4ed37e63b66a0370fb2853
 	sha256sums = 213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a
-	sha256sums = 53a2cbb1b58d652d5424ff9040b6a51b9dc6348ce3edc68344cd0d25f1f4beb2
-	sha256sums = 66db9132d6f5e06aa26e5de0924f814224a76a9bdf4b61afce161fb1d7643b22
+	sha256sums = a44ffd9e25fcbd8b3cc778871890e4da6fe12600ad549c807e1d03f61f0cdf73
 	sha256sums = 268e18ad56e5970157b51ec9fc8eb58ba93e313ea1e49c842a1ed0820d9c1fa3
 	sha256sums = 253348550d54b8ae317fd250f772f506d2bae49fb5dc75fe15d872ea3d0e04a5
+	sha256sums = d3344ba39b8c6ed202334ba7f441c70d81ddf8cdb15af1aa8c16e9a3a75fbb35
 	sha256sums = dd317f85e5abfdcfc89c6f23f4c8edbcdebdd5e083dcec770e5da49ee647d150
-	sha256sums = 7ef689cd6b2f85f2b76b2a10ecede003cfa0c2da15acc998ecbc445f2c95ced6
+	sha256sums = 1a9e074f417f8ffd78bcd6874d8e2e74a239905bf662f76a7755fa40dc476b57
+	sha256sums = 7ce947944a139e66774dfc7249bf7c3069f07f83a0f1b2c1a1b14287a7e15928
+	sha256sums = dae11dec5088eb1b14045d8c9862801a342609c15701d7c371e1caccf46e1ffd
 	sha256sums = e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711
-	sha256sums = 452d52be91d6183ea2f1728b83f5973fc480591b9a3625742c108cfbf6357588
+	sha256sums = ac6ff40201f389ca43a07563f7fefc2b33f956f7867d7fa8ff65312019496640
 	sha256sums = babda4f5c1179825797496898d77334ac067149cac03d797ab27ac69671a7feb
 	sha256sums = 34d08ea93cb4762cb33c7cffe931358008af32265fc720f2762f0179c3973574
 

+ 30 - 12
PKGBUILD

@@ -9,10 +9,10 @@
 # Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
 
 pkgname=ungoogled-chromium
-pkgver=92.0.4515.159
+pkgver=93.0.4577.82
 pkgrel=1
 _launcher_ver=8
-_gcc_patchset=7
+_gcc_patchset=6
 pkgdesc="A lightweight approach to removing Google web service dependency"
 arch=('x86_64')
 url="https://github.com/Eloston/ungoogled-chromium"
@@ -21,7 +21,7 @@ depends=('gtk3' 'nss' 'alsa-lib' 'xdg-utils' 'libxss' 'libcups' 'libgcrypt'
          'ttf-liberation' 'systemd' 'dbus' 'libpulse' 'pciutils' 'libva'
          'desktop-file-utils' 'hicolor-icon-theme')
 makedepends=('python' 'gn' 'ninja' 'clang' 'lld' 'gperf' 'nodejs' 'pipewire'
-             'java-runtime-headless' 'python2')
+             'java-runtime-headless')
 optdepends=('pipewire: WebRTC desktop sharing under Wayland'
             'kdialog: support for native dialogs in Plasma'
             'org.freedesktop.secrets: password storage backend on GNOME / Xfce'
@@ -29,20 +29,24 @@ optdepends=('pipewire: WebRTC desktop sharing under Wayland'
 source=(https://commondatastorage.googleapis.com/chromium-browser-official/chromium-$pkgver.tar.xz
         https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver/chromium-launcher-$_launcher_ver.tar.gz
         https://github.com/stha09/chromium-patches/releases/download/chromium-${pkgver%%.*}-patchset-$_gcc_patchset/chromium-${pkgver%%.*}-patchset-$_gcc_patchset.tar.xz
-        extend-enable-accelerated-video-decode-flag.patch
         linux-sandbox-syscall-broker-use-struct-kernel_stat.patch
         linux-sandbox-fix-fstatat-crash.patch
+        replace-blacklist-with-ignorelist.patch
         sql-make-VirtualCursor-standard-layout-type.patch
-        chromium-freetype-2.11.patch
+        chromium-93-ffmpeg-4.4.patch
+        chromium-harfbuzz-3.0.0.patch
+        skia-harfbuzz-3.0.0.patch
         use-oauth2-client-switches-as-default.patch)
-sha256sums=('d97d337d0d70e959a75f1f510f5d78d2b57b5bf24573b7ade9fff9f26a7cfd11'
+sha256sums=('5d66214858fcba11a8f733d7a6fab61ed10e13e7df4ed37e63b66a0370fb2853'
             '213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a'
-            '53a2cbb1b58d652d5424ff9040b6a51b9dc6348ce3edc68344cd0d25f1f4beb2'
-            '66db9132d6f5e06aa26e5de0924f814224a76a9bdf4b61afce161fb1d7643b22'
+            'a44ffd9e25fcbd8b3cc778871890e4da6fe12600ad549c807e1d03f61f0cdf73'
             '268e18ad56e5970157b51ec9fc8eb58ba93e313ea1e49c842a1ed0820d9c1fa3'
             '253348550d54b8ae317fd250f772f506d2bae49fb5dc75fe15d872ea3d0e04a5'
+            'd3344ba39b8c6ed202334ba7f441c70d81ddf8cdb15af1aa8c16e9a3a75fbb35'
             'dd317f85e5abfdcfc89c6f23f4c8edbcdebdd5e083dcec770e5da49ee647d150'
-            '7ef689cd6b2f85f2b76b2a10ecede003cfa0c2da15acc998ecbc445f2c95ced6'
+            '1a9e074f417f8ffd78bcd6874d8e2e74a239905bf662f76a7755fa40dc476b57'
+            '7ce947944a139e66774dfc7249bf7c3069f07f83a0f1b2c1a1b14287a7e15928'
+            'dae11dec5088eb1b14045d8c9862801a342609c15701d7c371e1caccf46e1ffd'
             'e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711')
 provides=('chromium')
 conflicts=('chromium')
@@ -51,7 +55,7 @@ source=(${source[@]}
         chromium-drirc-disable-10bpc-color-configs.conf
         wayland-egl.patch)
 sha256sums=(${sha256sums[@]}
-            '452d52be91d6183ea2f1728b83f5973fc480591b9a3625742c108cfbf6357588'
+            'ac6ff40201f389ca43a07563f7fefc2b33f956f7867d7fa8ff65312019496640'
             'babda4f5c1179825797496898d77334ac067149cac03d797ab27ac69671a7feb'
             '34d08ea93cb4762cb33c7cffe931358008af32265fc720f2762f0179c3973574')
 
@@ -99,8 +103,15 @@ prepare() {
   # runtime -- this allows signing into Chromium without baked-in values
   patch -Np1 -i ../use-oauth2-client-switches-as-default.patch
 
-  # Fix build with FreeType 2.11 (patch from Gentoo)
-  patch -Np1 -i ../chromium-freetype-2.11.patch
+  # Fix build with older ffmpeg
+  patch -Np1 -i ../chromium-93-ffmpeg-4.4.patch
+
+  # Fix build with harfbuzz 3.0.0
+  patch -Np1 -i ../chromium-harfbuzz-3.0.0.patch
+  patch -Np1 -d third_party/skia <../skia-harfbuzz-3.0.0.patch
+
+  # Revert transition to -fsanitize-ignorelist (needs newer clang)
+  patch -Rp1 -i ../replace-blacklist-with-ignorelist.patch
 
   # Upstream fixes
   patch -Np1 -i ../extend-enable-accelerated-video-decode-flag.patch
@@ -111,7 +122,13 @@ prepare() {
   patch -Np1 -i ../sql-make-VirtualCursor-standard-layout-type.patch
 
   # Fixes for building with libstdc++ instead of libc++
+  patch -Np1 -i ../patches/chromium-93-pdfium-include.patch
   patch -Np1 -i ../patches/chromium-90-ruy-include.patch
+  patch -Np1 -i ../patches/chromium-93-HashPasswordManager-include.patch
+  patch -Np1 -i ../patches/chromium-93-BluetoothLowEnergyScanFilter-include.patch
+  patch -Np1 -i ../patches/chromium-93-ClassProperty-include.patch
+  patch -Np1 -i ../patches/chromium-93-DevToolsEmbedderMessageDispatcher-include.patch
+  patch -Np1 -i ../patches/chromium-93-ScopedTestDialogAutoConfirm-include.patch
 
   # Wayland/EGL regression (crbug #1071528 #1071550)
   patch -Np1 -i ../wayland-egl.patch
@@ -160,6 +177,7 @@ build() {
     'custom_toolchain="//build/toolchain/linux/unbundle:default"'
     'host_toolchain="//build/toolchain/linux/unbundle:default"'
     'is_official_build=true' # implies is_cfi=true on x86_64
+    'blink_enable_generated_code_formatting=false'
     'ffmpeg_branding="Chrome"'
     'proprietary_codecs=true'
     'rtc_use_pipewire=true'

+ 36 - 0
chromium-93-ffmpeg-4.4.patch

@@ -0,0 +1,36 @@
+diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
+index ac4713b07268..492a9a37d096 100644
+--- a/media/filters/ffmpeg_demuxer.cc
++++ b/media/filters/ffmpeg_demuxer.cc
+@@ -427,11 +427,11 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
+   scoped_refptr<DecoderBuffer> buffer;
+ 
+   if (type() == DemuxerStream::TEXT) {
+-    size_t id_size = 0;
++    int id_size = 0;
+     uint8_t* id_data = av_packet_get_side_data(
+         packet.get(), AV_PKT_DATA_WEBVTT_IDENTIFIER, &id_size);
+ 
+-    size_t settings_size = 0;
++    int settings_size = 0;
+     uint8_t* settings_data = av_packet_get_side_data(
+         packet.get(), AV_PKT_DATA_WEBVTT_SETTINGS, &settings_size);
+ 
+@@ -443,7 +443,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
+     buffer = DecoderBuffer::CopyFrom(packet->data, packet->size,
+                                      side_data.data(), side_data.size());
+   } else {
+-    size_t side_data_size = 0;
++    int side_data_size = 0;
+     uint8_t* side_data = av_packet_get_side_data(
+         packet.get(), AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, &side_data_size);
+ 
+@@ -504,7 +504,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
+                                        packet->size - data_offset);
+     }
+ 
+-    size_t skip_samples_size = 0;
++    int skip_samples_size = 0;
+     const uint32_t* skip_samples_ptr =
+         reinterpret_cast<const uint32_t*>(av_packet_get_side_data(
+             packet.get(), AV_PKT_DATA_SKIP_SAMPLES, &skip_samples_size));

+ 0 - 50
chromium-freetype-2.11.patch

@@ -1,50 +0,0 @@
---- a/third_party/skia/src/ports/SkFontHost_FreeType_common.cpp
-+++ b/third_party/skia/src/ports/SkFontHost_FreeType_common.cpp
-@@ -712,7 +712,11 @@ void colrv1_draw_paint(SkCanvas* canvas,
-             canvas->drawPaint(colrPaint);
-             break;
-         }
-+#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 11
-+        case FT_COLR_PAINTFORMAT_TRANSFORM:
-+#else
-         case FT_COLR_PAINTFORMAT_TRANSFORMED:
-+#endif
-         case FT_COLR_PAINTFORMAT_TRANSLATE:
-         case FT_COLR_PAINTFORMAT_ROTATE:
-         case FT_COLR_PAINTFORMAT_SKEW:
-@@ -759,10 +763,17 @@ void colrv1_transform(SkCanvas* canvas, FT_Face face, FT_COLR_Paint colrv1_paint
-     SkMatrix transform;
- 
-     switch (colrv1_paint.format) {
-+#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 11
-+        case FT_COLR_PAINTFORMAT_TRANSFORM: {
-+            transform = ToSkMatrix(colrv1_paint.u.transform.affine);
-+            break;
-+        }
-+#else
-         case FT_COLR_PAINTFORMAT_TRANSFORMED: {
-             transform = ToSkMatrix(colrv1_paint.u.transformed.affine);
-             break;
-         }
-+#endif
-         case FT_COLR_PAINTFORMAT_TRANSLATE: {
-             transform = SkMatrix::Translate(
-                 SkFixedToScalar(colrv1_paint.u.translate.dx),
-@@ -880,10 +891,17 @@ bool colrv1_traverse_paint(SkCanvas* canvas,
-             traverse_result = colrv1_start_glyph(canvas, palette, face, paint.u.colr_glyph.glyphID,
-                                                  FT_COLOR_NO_ROOT_TRANSFORM);
-             break;
-+#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 11
-+        case FT_COLR_PAINTFORMAT_TRANSFORM:
-+            colrv1_transform(canvas, face, paint);
-+            traverse_result = colrv1_traverse_paint(canvas, palette, face,
-+                                                    paint.u.transform.paint, visited_set);
-+#else
-         case FT_COLR_PAINTFORMAT_TRANSFORMED:
-             colrv1_transform(canvas, face, paint);
-             traverse_result = colrv1_traverse_paint(canvas, palette, face,
-                                                     paint.u.transformed.paint, visited_set);
-+#endif
-             break;
-         case FT_COLR_PAINTFORMAT_TRANSLATE:
-             colrv1_transform(canvas, face, paint);

+ 20 - 0
chromium-harfbuzz-3.0.0.patch

@@ -0,0 +1,20 @@
+# https://github.com/chromium/chromium/commit/b289f6f3fcbc
+
+diff --git a/components/paint_preview/common/subset_font.cc b/components/paint_preview/common/subset_font.cc
+index 8ff0540d9a..20a7d37474 100644
+--- a/components/paint_preview/common/subset_font.cc
++++ b/components/paint_preview/common/subset_font.cc
+@@ -72,9 +72,11 @@ sk_sp<SkData> SubsetFont(SkTypeface* typeface, const GlyphUsage& usage) {
+   hb_set_t* glyphs =
+       hb_subset_input_glyph_set(input.get());  // Owned by |input|.
+   usage.ForEach(base::BindRepeating(&AddGlyphs, base::Unretained(glyphs)));
+-  hb_subset_input_set_retain_gids(input.get(), true);
++  hb_subset_input_set_flags(input.get(), HB_SUBSET_FLAGS_RETAIN_GIDS);
+ 
+-  HbScoped<hb_face_t> subset_face(hb_subset(face.get(), input.get()));
++  HbScoped<hb_face_t> subset_face(hb_subset_or_fail(face.get(), input.get()));
++  if (!subset_face)
++    return nullptr;
+   HbScoped<hb_blob_t> subset_blob(hb_face_reference_blob(subset_face.get()));
+   if (!subset_blob)
+     return nullptr;

+ 0 - 35
extend-enable-accelerated-video-decode-flag.patch

@@ -1,35 +0,0 @@
-From e48f18eba0eae199ba7bc8a6a09ebf39799447c1 Mon Sep 17 00:00:00 2001
-From: Ted Meyer <tmathmeyer@chromium.org>
-Date: Wed, 2 Jun 2021 05:35:22 +0000
-Subject: [PATCH] Extend enable-accelerated-video-decode flag for linux to m93
-
-It appears that there is insistence that the flag be totally removed or
-have its end-milestone increased, I can't just let it wait until the
-feature is working again and then re-enable it. So i've moved it to 93.
-
-R=dalecurtis
-
-Fixed: 1207478
-Change-Id: I26a5e790cd390825516b4a4b6af88e89b2d4f4eb
-Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2918478
-Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
-Reviewed-by: Ted Meyer <tmathmeyer@chromium.org>
-Commit-Queue: Ted Meyer <tmathmeyer@chromium.org>
-Cr-Commit-Position: refs/heads/master@{#888312}
----
- chrome/browser/flag-metadata.json | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
-index 67e0330436..34542671f2 100644
---- a/chrome/browser/flag-metadata.json
-+++ b/chrome/browser/flag-metadata.json
-@@ -1193,7 +1193,7 @@
-   {
-     "name": "enable-accelerated-video-decode",
-     "owners": [ "media-dev@chromium.org" ],
--    "expiry_milestone": 90
-+    "expiry_milestone": 93
-   },
-   {
-     "name": "enable-accessibility-live-caption",

+ 196 - 0
replace-blacklist-with-ignorelist.patch

@@ -0,0 +1,196 @@
+From 9d080c0934b848ee4a05013c78641e612fcc1e03 Mon Sep 17 00:00:00 2001
+From: Dylan Cutler <dylancutler@google.com>
+Date: Wed, 26 May 2021 16:39:52 +0000
+Subject: [PATCH] Reland "Replace 'blacklist' with 'ignorelist' in
+ ./tools/msan/."
+
+This is a reland of 3b6263f2eece1264b052dfdcbc03b851d5abfb48
+
+Relanding now that https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/2897974 is merged
+
+Original change's description:
+> Replace 'blacklist' with 'ignorelist' in ./tools/msan/.
+>
+> Bug: 1097272, 1097268
+> Change-Id: Id5c8227a5bfb1ffaec82d3168b609085b10c8297
+> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2867730
+> Commit-Queue: Dylan Cutler <dylancutler@google.com>
+> Reviewed-by: Nico Weber <thakis@chromium.org>
+> Reviewed-by: Jonathan Metzman <metzman@chromium.org>
+> Cr-Commit-Position: refs/heads/master@{#883035}
+
+Bug: 1097272
+Bug: 1097268
+Change-Id: I11a5bc8972680c95fb1dab95ed3b707ed76f4667
+Cq-Include-Trybots: luci.chromium.try:chromeos-amd64-generic-cfi-thin-lto-rel
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2911096
+Commit-Queue: Dylan Cutler <dylancutler@google.com>
+Reviewed-by: Nico Weber <thakis@chromium.org>
+Cr-Commit-Position: refs/heads/master@{#886773}
+---
+ build/config/sanitizers/BUILD.gn             | 44 ++++++++++----------
+ build_overrides/build.gni                    | 14 +++----
+ tools/msan/{blacklist.txt => ignorelist.txt} |  0
+ 3 files changed, 29 insertions(+), 29 deletions(-)
+ rename tools/msan/{blacklist.txt => ignorelist.txt} (100%)
+
+diff --git a/build/config/sanitizers/BUILD.gn b/build/config/sanitizers/BUILD.gn
+index aaaad023474d..55b388a43743 100644
+--- a/build/config/sanitizers/BUILD.gn
++++ b/build/config/sanitizers/BUILD.gn
+@@ -272,11 +272,11 @@ config("asan_flags") {
+   if (is_asan) {
+     cflags += [ "-fsanitize=address" ]
+     if (is_win) {
+-      if (!defined(asan_win_blacklist_path)) {
+-        asan_win_blacklist_path =
++      if (!defined(asan_win_blocklist_path)) {
++        asan_win_blocklist_path =
+             rebase_path("//tools/memory/asan/blocklist_win.txt", root_build_dir)
+       }
+-      cflags += [ "-fsanitize-blacklist=$asan_win_blacklist_path" ]
++      cflags += [ "-fsanitize-ignorelist=$asan_win_blocklist_path" ]
+     }
+   }
+ }
+@@ -306,13 +306,13 @@ config("link_shared_library") {
+ config("cfi_flags") {
+   cflags = []
+   if (is_cfi && current_toolchain == default_toolchain) {
+-    if (!defined(cfi_blacklist_path)) {
+-      cfi_blacklist_path =
++    if (!defined(cfi_ignorelist_path)) {
++      cfi_ignorelist_path =
+           rebase_path("//tools/cfi/ignores.txt", root_build_dir)
+     }
+     cflags += [
+       "-fsanitize=cfi-vcall",
+-      "-fsanitize-blacklist=$cfi_blacklist_path",
++      "-fsanitize-ignorelist=$cfi_ignorelist_path",
+     ]
+ 
+     if (use_cfi_cast) {
+@@ -409,14 +409,14 @@ config("msan_flags") {
+   if (is_msan) {
+     assert(is_linux || is_chromeos,
+            "msan only supported on linux x86_64/ChromeOS")
+-    if (!defined(msan_blacklist_path)) {
+-      msan_blacklist_path =
+-          rebase_path("//tools/msan/blacklist.txt", root_build_dir)
++    if (!defined(msan_ignorelist_path)) {
++      msan_ignorelist_path =
++          rebase_path("//tools/msan/ignorelist.txt", root_build_dir)
+     }
+     cflags = [
+       "-fsanitize=memory",
+       "-fsanitize-memory-track-origins=$msan_track_origins",
+-      "-fsanitize-blacklist=$msan_blacklist_path",
++      "-fsanitize-ignorelist=$msan_ignorelist_path",
+     ]
+   }
+ }
+@@ -424,13 +424,13 @@ config("msan_flags") {
+ config("tsan_flags") {
+   if (is_tsan) {
+     assert(is_linux || is_chromeos, "tsan only supported on linux x86_64")
+-    if (!defined(tsan_blacklist_path)) {
+-      tsan_blacklist_path =
++    if (!defined(tsan_ignorelist_path)) {
++      tsan_ignorelist_path =
+           rebase_path("//tools/memory/tsan_v2/ignores.txt", root_build_dir)
+     }
+     cflags = [
+       "-fsanitize=thread",
+-      "-fsanitize-blacklist=$tsan_blacklist_path",
++      "-fsanitize-ignorelist=$tsan_ignorelist_path",
+     ]
+   }
+ }
+@@ -438,8 +438,8 @@ config("tsan_flags") {
+ config("ubsan_flags") {
+   cflags = []
+   if (is_ubsan) {
+-    if (!defined(ubsan_blacklist_path)) {
+-      ubsan_blacklist_path =
++    if (!defined(ubsan_ignorelist_path)) {
++      ubsan_ignorelist_path =
+           rebase_path("//tools/ubsan/ignorelist.txt", root_build_dir)
+     }
+     cflags += [
+@@ -456,7 +456,7 @@ config("ubsan_flags") {
+       "-fsanitize=signed-integer-overflow",
+       "-fsanitize=unreachable",
+       "-fsanitize=vla-bound",
+-      "-fsanitize-blacklist=$ubsan_blacklist_path",
++      "-fsanitize-ignorelist=$ubsan_ignorelist_path",
+     ]
+ 
+     # Chromecast ubsan builds fail to compile with these
+@@ -486,8 +486,8 @@ config("ubsan_no_recover") {
+ 
+ config("ubsan_security_flags") {
+   if (is_ubsan_security) {
+-    if (!defined(ubsan_security_blacklist_path)) {
+-      ubsan_security_blacklist_path =
++    if (!defined(ubsan_security_ignorelist_path)) {
++      ubsan_security_ignorelist_path =
+           rebase_path("//tools/ubsan/security_ignorelist.txt", root_build_dir)
+     }
+     cflags = [
+@@ -495,7 +495,7 @@ config("ubsan_security_flags") {
+       "-fsanitize=shift",
+       "-fsanitize=signed-integer-overflow",
+       "-fsanitize=vla-bound",
+-      "-fsanitize-blacklist=$ubsan_security_blacklist_path",
++      "-fsanitize-ignorelist=$ubsan_security_ignorelist_path",
+     ]
+   }
+ }
+@@ -508,13 +508,13 @@ config("ubsan_null_flags") {
+ 
+ config("ubsan_vptr_flags") {
+   if (is_ubsan_vptr) {
+-    if (!defined(ubsan_vptr_blacklist_path)) {
+-      ubsan_vptr_blacklist_path =
++    if (!defined(ubsan_vptr_ignorelist_path)) {
++      ubsan_vptr_ignorelist_path =
+           rebase_path("//tools/ubsan/vptr_ignorelist.txt", root_build_dir)
+     }
+     cflags = [
+       "-fsanitize=vptr",
+-      "-fsanitize-blacklist=$ubsan_vptr_blacklist_path",
++      "-fsanitize-ignorelist=$ubsan_vptr_ignorelist_path",
+     ]
+   }
+ }
+diff --git a/build_overrides/build.gni b/build_overrides/build.gni
+index 82627b03653f..f3e563ab701b 100644
+--- a/build_overrides/build.gni
++++ b/build_overrides/build.gni
+@@ -42,15 +42,15 @@ declare_args() {
+ # Allows different projects to specify their own suppression/ignore lists for
+ # sanitizer tools.
+ # asan_suppressions_file = "path/to/asan_suppressions.cc"
+-# asan_win_blacklist_path = "path/to/asan/blocklist_win.txt"
++# asan_win_ignorelist_path = "path/to/asan/blocklist_win.txt"
+ # lsan_suppressions_file = "path/to/lsan_suppressions.cc"
+ # tsan_suppressions_file = "path/to/tsan_suppressions.cc"
+-# tsan_blacklist_path = "path/to/tsan/ignores.txt"
+-# msan_blacklist_path = "path/to/msan/blacklist.txt"
+-# ubsan_blacklist_path = "path/to/ubsan/blacklist.txt"
+-# ubsan_vptr_blacklist_path = "path/to/ubsan/vptr_blacklist.txt"
+-# ubsan_security_blacklist_path = "path/to/ubsan/security_blacklist.txt"
+-# cfi_blacklist_path = "path/to/cfi/ignores.txt"
++# tsan_ignorelist_path = "path/to/tsan/ignores.txt"
++# msan_ignorelist_path = "path/to/msan/ignorelist.txt"
++# ubsan_ignorelist_path = "path/to/ubsan/ignorelist.txt"
++# ubsan_vptr_ignorelist_path = "path/to/ubsan/vptr_ignorelist.txt"
++# ubsan_security_ignorelist_path = "path/to/ubsan/security_ignorelist.txt"
++# cfi_ignorelist_path = "path/to/cfi/ignores.txt"
+ 
+ declare_args() {
+   # Android 32-bit non-component, non-clang builds cannot have symbol_level=2
+diff --git a/tools/msan/blacklist.txt b/tools/msan/ignorelist.txt
+similarity index 100%
+rename from tools/msan/blacklist.txt
+rename to tools/msan/ignorelist.txt

+ 100 - 0
skia-harfbuzz-3.0.0.patch

@@ -0,0 +1,100 @@
+# Minimal diff for harfbuzz 3.0.0 support; based on:
+# https://github.com/google/skia/commit/66684b17b382
+# https://github.com/google/skia/commit/51d83abcd24a
+
+diff --git a/gn/skia.gni b/gn/skia.gni
+index d98fdc19ee..199335d5c4 100644
+--- a/gn/skia.gni
++++ b/gn/skia.gni
+@@ -34,8 +34,6 @@ declare_args() {
+   skia_include_multiframe_procs = false
+   skia_lex = false
+   skia_libgifcodec_path = "third_party/externals/libgifcodec"
+-  skia_pdf_subset_harfbuzz =
+-      false  # TODO: set skia_pdf_subset_harfbuzz to skia_use_harfbuzz.
+   skia_qt_path = getenv("QT_PATH")
+   skia_skqp_global_error_tolerance = 0
+   skia_tools_require_resources = false
+@@ -99,6 +97,10 @@ declare_args() {
+   skia_use_libfuzzer_defaults = true
+ }
+ 
++declare_args() {
++  skia_pdf_subset_harfbuzz = skia_use_harfbuzz
++}
++
+ declare_args() {
+   skia_compile_sksl_tests = skia_compile_processors
+   skia_enable_fontmgr_android = skia_use_expat && skia_use_freetype
+diff --git a/src/pdf/SkPDFSubsetFont.cpp b/src/pdf/SkPDFSubsetFont.cpp
+index 81c37eef3a..2340a7937b 100644
+--- a/src/pdf/SkPDFSubsetFont.cpp
++++ b/src/pdf/SkPDFSubsetFont.cpp
+@@ -49,6 +49,37 @@ static sk_sp<SkData> to_data(HBBlob blob) {
+                                 blob.release());
+ }
+ 
++template<typename...> using void_t = void;
++template<typename T, typename = void>
++struct SkPDFHarfBuzzSubset {
++    // This is the HarfBuzz 3.0 interface.
++    // hb_subset_flags_t does not exist in 2.0. It isn't dependent on T, so inline the value of
++    // HB_SUBSET_FLAGS_RETAIN_GIDS until 2.0 is no longer supported.
++    static HBFace Make(T input, hb_face_t* face) {
++        // TODO: When possible, check if a font is 'tricky' with FT_IS_TRICKY.
++        // If it isn't known if a font is 'tricky', retain the hints.
++        hb_subset_input_set_flags(input, 2/*HB_SUBSET_FLAGS_RETAIN_GIDS*/);
++        return HBFace(hb_subset_or_fail(face, input));
++    }
++};
++template<typename T>
++struct SkPDFHarfBuzzSubset<T, void_t<
++    decltype(hb_subset_input_set_retain_gids(std::declval<T>(), std::declval<bool>())),
++    decltype(hb_subset_input_set_drop_hints(std::declval<T>(), std::declval<bool>())),
++    decltype(hb_subset(std::declval<hb_face_t*>(), std::declval<T>()))
++    >>
++{
++    // This is the HarfBuzz 2.0 (non-public) interface, used if it exists.
++    // This code should be removed as soon as all users are migrated to the newer API.
++    static HBFace Make(T input, hb_face_t* face) {
++        hb_subset_input_set_retain_gids(input, true);
++        // TODO: When possible, check if a font is 'tricky' with FT_IS_TRICKY.
++        // If it isn't known if a font is 'tricky', retain the hints.
++        hb_subset_input_set_drop_hints(input, false);
++        return HBFace(hb_subset(face, input));
++    }
++};
++
+ static sk_sp<SkData> subset_harfbuzz(sk_sp<SkData> fontData,
+                                      const SkPDFGlyphUse& glyphUsage,
+                                      int ttcIndex) {
+@@ -71,11 +102,10 @@ static sk_sp<SkData> subset_harfbuzz(sk_sp<SkData> fontData,
+     hb_set_t* glyphs = hb_subset_input_glyph_set(input.get());
+     glyphUsage.getSetValues([&glyphs](unsigned gid) { hb_set_add(glyphs, gid);});
+ 
+-    hb_subset_input_set_retain_gids(input.get(), true);
+-    // TODO: When possible, check if a font is 'tricky' with FT_IS_TRICKY.
+-    // If it isn't known if a font is 'tricky', retain the hints.
+-    hb_subset_input_set_drop_hints(input.get(), false);
+-    HBFace subset(hb_subset(face.get(), input.get()));
++    HBFace subset = SkPDFHarfBuzzSubset<hb_subset_input_t*>::Make(input.get(), face.get());
++    if (!subset) {
++        return nullptr;
++    }
+     HBBlob result(hb_face_reference_blob(subset.get()));
+     return to_data(std::move(result));
+ }
+diff --git a/third_party/harfbuzz/BUILD.gn b/third_party/harfbuzz/BUILD.gn
+index 173830de62..4156607ef9 100644
+--- a/third_party/harfbuzz/BUILD.gn
++++ b/third_party/harfbuzz/BUILD.gn
+@@ -14,6 +14,9 @@ if (skia_use_system_harfbuzz) {
+   system("harfbuzz") {
+     include_dirs = [ "/usr/include/harfbuzz" ]
+     libs = [ "harfbuzz" ]
++    if (skia_pdf_subset_harfbuzz) {
++      libs += [ "harfbuzz-subset" ]
++    }
+   }
+ } else {
+   third_party("harfbuzz") {