Update package version to 153.0.8010.52

This commit is contained in:
EnumDev committed 2026-09-25 19:40:47 +03:00
1 parent 24fbd83883
commit a18aa2a3bb
12 files changed
+702 -94

No files matched your search

+15 -7
View File
@@ -1,6 +1,6 @@
name: chromium name: chromium
description: A safe, fast and stable open-source browser project description: A safe, fast and stable open-source browser project
version: 151.0.7922.173 version: 153.0.8010.52
revision: 1 revision: 1
url: https://www.chromium.org/Home/ url: https://www.chromium.org/Home/
license: BSD-3-License license: BSD-3-License
@@ -11,6 +11,7 @@ type: source
depends: depends:
- alsa-lib - alsa-lib
- brotli - brotli
- dav1d
- dbus - dbus
- desktop-file-utils - desktop-file-utils
- flac - flac
@@ -19,7 +20,9 @@ depends:
- gtk3 - gtk3
- harfbuzz - harfbuzz
- hicolor-icon-theme - hicolor-icon-theme
- highway
- libcups - libcups
- libdrm
- libffi - libffi
- libgcrypt - libgcrypt
- libjpeg-turbo - libjpeg-turbo
@@ -31,15 +34,19 @@ depends:
- libxscrnsaver - libxscrnsaver
- minizip - minizip
- nss - nss
- openh264
- opus - opus
- pciutils - pciutils
- xdg-utils - xdg-utils
- zlib
- zstd
optional_depends: optional_depends:
- gtk4 - gtk4:For GTK4 support using --gtk-version=4
- kdialog - kdialog:For native plasma dialogs
- kwallet - secrets:For a password storage backend
- pipewire - pipewire:For WebRTC desktop sharing under Wayland
- upower - qt6-base:For Qt support
- upower:For battery status API support
make_depends: make_depends:
- clang - clang
- compiler-rt - compiler-rt
@@ -55,8 +62,9 @@ make_depends:
- rsync - rsync
- rustc - rustc
- rust-bindgen - rust-bindgen
- typescript
downloads: downloads:
- url: https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${BPM_PKG_VERSION}/chromium-${BPM_PKG_VERSION}-linux.tar.xz - url: https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${BPM_PKG_VERSION}/chromium-${BPM_PKG_VERSION}-linux.tar.xz
extract_to: ${BPM_SOURCE} extract_to: ${BPM_SOURCE}
extract_strip_components: 1 extract_strip_components: 1
checksum: 083eb4a98003f5b34d9fe7b3912478ef14f2ed0a16c7c2d932549b9e62aabcc4 checksum: 3233497c752d44bf1c6ee654bc85ed506d75638e386309439730f62424c29a1b
+48 -17
View File
@@ -2,49 +2,75 @@
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
_patch() {
echo "Patching $1..."
patch -Np1 -i "$BPM_WORKDIR"/"$1"
}
# The prepare function is executed in the root of the temp directory # The prepare function is executed in the root of the temp directory
# This function is used for putting downloaded files to the correct location or applying patches # This function is used for putting downloaded files to the correct location or applying patches
prepare() { prepare() {
cd "$BPM_SOURCE" cd "$BPM_SOURCE"
# Most of these patches and fixes have been borrowed from Arch Linux
# Use the --oauth2-client-id= and --oauth2-client-secret= switches for # Use the --oauth2-client-id= and --oauth2-client-secret= switches for
# setting GOOGLE_DEFAULT_CLIENT_ID and GOOGLE_DEFAULT_CLIENT_SECRET at # setting GOOGLE_DEFAULT_CLIENT_ID and GOOGLE_DEFAULT_CLIENT_SECRET at
# runtime -- this allows signing into Chromium without baked-in values # runtime -- this allows signing into Chromium without baked-in values
patch -Np1 -i "$BPM_WORKDIR"/use-oauth2-client-switches-as-default.patch _patch use-oauth2-client-switches-as-default.patch
# Fixes from Gentoo # Fixes from Gentoo
patch -Np1 -i "$BPM_WORKDIR"/chromium-138-nodejs-version-check.patch _patch chromium-138-nodejs-version-check.patch
# Increase _FORTIFY_SOURCE level # Increase _FORTIFY_SOURCE level
patch -Np1 -i "$BPM_WORKDIR"/increase-fortify-level.patch _patch increase-fortify-level.patch
# Fix issue about missing compiler flag. Can be fixed by upgrading to LLVM 23 # Fix issue about missing compiler flag. Can be fixed by upgrading to LLVM 23
# clang++: error: unknown argument: '-fsanitize-ignore-for-ubsan-feature=array-bounds' # clang++: error: unknown argument: '-fsanitize-ignore-for-ubsan-feature=array-bounds'
patch -Np1 -i "$BPM_WORKDIR"/chromium-149-drop-unknown-clang-flag.patch _patch chromium-149-drop-unknown-clang-flag.patch
patch -Np1 -i "$BPM_WORKDIR"/chromium-147-rust-1.95-bytemuck.patch _patch chromium-147-rust-1.95-bytemuck.patch
# Fixes unknown argument error # Fixes unknown argument error
patch -Np1 -i "$BPM_WORKDIR"/chromium-147-revert-clang-no-lifetime-dse-flag.patch _patch chromium-147-revert-clang-no-lifetime-dse-flag.patch
# https://crbug.com/456218403 # https://crbug.com/456218403
patch -Np1 -i "$BPM_WORKDIR"/chromium-145-fix-SYS_SECCOMP.patch _patch chromium-145-fix-SYS_SECCOMP.patch
patch -Np1 -i "$BPM_WORKDIR"/ungoogled-chromium-145-build-with-wasm-rollup.patch _patch ungoogled-chromium-145-build-with-wasm-rollup.patch
patch -Np1 -i "$BPM_WORKDIR"/dont_require_profiler_builtins.rlib.patch _patch dont_require_profiler_builtins.rlib.patch
# Chromium bundles a patched minizip with extra features. _patch chromium-149-use-of-undeclared-identifier-ERROR.patch
patch -Np1 -i "$BPM_WORKDIR"/chromium-149-unbundle-minizip-undo-unicode.patch
patch -Np1 -i "$BPM_WORKDIR"/chromium-149-use-of-undeclared-identifier-ERROR.patch
# Credit: https://github.com/ungoogled-software/ungoogled-chromium/pull/3883
patch -Np1 -i "$BPM_WORKDIR"/chromium-151-dont-depends-on-histograms.xml-if-it-is-not-git-checkout.patch
# Fix issue about missing AVX functions # Fix issue about missing AVX functions
# Credit: https://github.com/ungoogled-software/ungoogled-chromium/pull/3837 # Credit: https://github.com/ungoogled-software/ungoogled-chromium/pull/3837
patch -Np1 -i "$BPM_WORKDIR"/chromium-150-revert-avx-flag-change.patch _patch chromium-150-revert-avx-flag-change.patch
pushd third_party/devtools-frontend/src
_patch chromium-152-fix-gn-no-public_inputs.patch
popd
_patch chromium-152-unbundle-minizip-undo-unicode.patch
_patch chromium-152-unbundle-opus-devtools.patch
# Use system python3 instead of the hermetic cpython3 interpreter
# https://github.com/ungoogled-software/ungoogled-chromium/pull/3946
_patch chromium-153-hermetic-python.patch
# third_party/iamf_tools includes vendored Opus via relative "include/opus.h"
# paths that only resolve against a real bundled Opus checkout; fix them up
# for the unbundled system Opus build
_patch chromium-153-iamf-tools-unbundled-opus.patch
# Work around TypeScript becoming a build dependency: disable tsgo for the
# WebUI and point devtools at the system tsc binary
# https://github.com/ungoogled-software/ungoogled-chromium/pull/3946
_patch chromium-153-typescript.patch
_patch chromium-153-crubit.patch
# Allow building against system libraries in official builds # Allow building against system libraries in official builds
sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' tools/generate_shim_headers/generate_shim_headers.py sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' tools/generate_shim_headers/generate_shim_headers.py
@@ -66,16 +92,21 @@ prepare() {
local _system_libs=( local _system_libs=(
brotli brotli
dav1d
flac flac
fontconfig fontconfig
freetype freetype
harfbuzz harfbuzz
highway
libdrm
libjpeg libjpeg
libwebp libwebp
libxml libxml
libxslt libxslt
openh264
opus opus
zlib zlib
zstd
) )
# Remove bundled libraries for which we will use the system copies; this # Remove bundled libraries for which we will use the system copies; this
@@ -11,21 +11,20 @@ index 7df3e18c4c..1d253318a6 100644
} else { } else {
# Combine after https://github.com/llvm/llvm-project/pull/192241 # Combine after https://github.com/llvm/llvm-project/pull/192241
cflags += [ "/clang:-fdiagnostics-show-inlining-chain" ] cflags += [ "/clang:-fdiagnostics-show-inlining-chain" ]
@@ -1578,7 +1578,7 @@ config("clang_warning_suppression") { @@ -1590,7 +1590,7 @@ config("clang_warning_suppression") {
# See also: https://crbug.com/40891132#comment10 # See also: https://crbug.com/40891132#comment10
ubsan_hardening("c_array_bounds") { ubsan_hardening("c_array_bounds") {
sanitizer = "array-bounds" sanitizer = "array-bounds"
- condition = !(is_asan && target_cpu == "x86") && !is_wasm - condition = !(is_asan && target_cpu == "x86")
+ condition = false + condition = false
# Because we've enabled array-bounds sanitizing we also want to suppress # Because we've enabled array-bounds sanitizing we also want to suppress
# the related warning about "unsafe-buffer-usage-in-static-sized-array", # the related warning about "unsafe-buffer-usage-in-static-sized-array",
@@ -1592,7 +1592,7 @@ ubsan_hardening("c_array_bounds") { @@ -1604,6 +1604,7 @@ ubsan_hardening("c_array_bounds") {
# `NOTREACHED()` at the end of such functions. # `NOTREACHED()` at the end of such functions.
ubsan_hardening("return") { ubsan_hardening("return") {
sanitizer = "return" sanitizer = "return"
- condition = !is_wasm
+ condition = false + condition = false
} }
config("rustc_revision") { config("rustc_revision") {
@@ -1,27 +0,0 @@
From cb758be9a99d13cfa903432fae0864a1656e2c49 Mon Sep 17 00:00:00 2001
From: LN Liberda <[email protected]>
Date: Thu, 7 May 2026 09:45:32 +0200
Subject: [PATCH] unbundle/minizip: Ignore Unicode Path Extra Field
The fields come from chromium's patches on minizip
---
third_party/zlib/google/zip_reader.cc | 6 ------
1 file changed, 6 deletions(-)
diff --git a/third_party/zlib/google/zip_reader.cc b/third_party/zlib/google/zip_reader.cc
index 002a1e3ed01d3..88f075ec7739a 100644
--- a/third_party/zlib/google/zip_reader.cc
+++ b/third_party/zlib/google/zip_reader.cc
@@ -307,12 +307,6 @@ bool ZipReader::OpenEntry() {
DCHECK(path_in_zip[info.size_filename] == '\0');
entry_.path_in_original_encoding = path_in_zip.data();
- if (info.size_utf8_filename > 0) {
- // Use the Info-ZIP Unicode Path Extra Field if present.
- DCHECK(info.utf8_filename[info.size_utf8_filename] == '\0');
- entry_.path_in_original_encoding = info.utf8_filename;
- }
-
// Convert path from original encoding to Unicode.
std::u16string path_in_utf16;
const char* const encoding = encoding_.empty() ? "UTF-8" : encoding_.c_str();
@@ -1,37 +0,0 @@
From 27f8690db999f6e56f0af7a9ea3d28a019ed72ca Mon Sep 17 00:00:00 2001
From: Fumitoshi Ukai <[email protected]>
Date: Tue, 30 Jun 2026 18:32:03 -0700
Subject: [PATCH] don't depends on histograms.xml if it is not git checkout
histograms.xml is only generated on git checkout.
Bug: 329080012
Change-Id: Iea4484f8af4cf9ef25e25ea1df2c616fbe46ed5c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8019063
Reviewed-by: Jesse McKenna <[email protected]>
Commit-Queue: Fumitoshi Ukai <[email protected]>
Auto-Submit: Fumitoshi Ukai <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1655184}
---
diff --git a/tools/metrics/BUILD.gn b/tools/metrics/BUILD.gn
index c826e97..23799c7 100644
--- a/tools/metrics/BUILD.gn
+++ b/tools/metrics/BUILD.gn
@@ -41,11 +41,11 @@
]
# Only include histograms_xml if we have access to dirmd data, which
- # is used to populate ownership information. This is only set to false
- # for non-git checkouts.
- # TODO(crbug.com/329080012): Remove this once dirmd works in non-git
- # checkouts.
- if (generate_location_tags) {
+ # is used to populate ownership information. This is disabled
+ # for non-git checkouts, as dirmd doesn't work on non-git checkout.
+ # TODO(crbug.com/329080012): Remove this condition once dirmd works
+ # in non-git checkouts.
+ if (path_exists("//.git")) {
deps += [ ":histograms_xml" ]
}
}
@@ -0,0 +1,148 @@
From 8dab8b761385b7946588232e4e2a8c116f9293c3 Mon Sep 17 00:00:00 2001
From: Philip Pfaffe <[email protected]>
Date: Thu, 09 Jul 2026 05:06:16 -0700
Subject: [PATCH] Revert "Expose TypeScript files to dependent targets"
This reverts commit 9482fa06243e2941e1b7797ac9f9773f86500453.
Reason for revert: Getting `copy.gni:29:21: Assignment had no effect` in local builds on tip of tree.
Failure Link: N/A
Original change's description:
> Expose TypeScript files to dependent targets
>
> Use `public_inputs` in GN build templates to propagate `.ts` files to
> dependent targets. This ensures that remote execution environments for
> TypeScript compilations have access to all necessary directly or
> indirectly imported source files.
>
> Specific changes include:
> * Filtering and exposing `*.ts` files in `copy.gni` and
> `devtools_pre_built.gni`.
> * Exposing the entrypoint file in `devtools_entrypoint.gni`.
> * Filtering and exposing `*.ts` and specific legacy `.js` files
> (`ahem.js`, `ARIAProperties.js`, `SupportedCSSProperties.js`) in
> `typescript.gni`.
> * Applying minor formatting fixes to `forward_variables_from` calls.
>
> Ref: https://gn.googlesource.com/gn/+/refs/heads/main/docs/reference.md#var_public_inputs
> Bug: 513105742
> Change-Id: Ibe4e0be27ea0d9d7c3e8309219f0f822a55b9bb5
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/8064364
> Reviewed-by: Simon Zünd <[email protected]>
> Commit-Queue: Takuto Ikuta <[email protected]>
> Reviewed-by: Michael Achenbach <[email protected]>
Bug: 513105742
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Ia4882d1ae1bb5e45aaef4bb831cd2a10eda1ac69
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/8069251
Auto-Submit: Philip Pfaffe <[email protected]>
Commit-Queue: Michael Achenbach <[email protected]>
Reviewed-by: Michael Achenbach <[email protected]>
---
diff --git a/scripts/build/ninja/copy.gni b/scripts/build/ninja/copy.gni
index d6d71a6..a03d647 100644
--- a/scripts/build/ninja/copy.gni
+++ b/scripts/build/ninja/copy.gni
@@ -25,9 +25,6 @@
string_join(",", sources),
]
- # Expose ts files to dependent targets.
- public_inputs = filter_include(sources, [ "*.ts" ])
-
outputs = []
foreach(_input, sources) {
outputs += [ "$target_gen_dir/$_input" ]
diff --git a/scripts/build/ninja/devtools_entrypoint.gni b/scripts/build/ninja/devtools_entrypoint.gni
index 6bee3ef..cedcbb4 100644
--- a/scripts/build/ninja/devtools_entrypoint.gni
+++ b/scripts/build/ninja/devtools_entrypoint.gni
@@ -35,13 +35,7 @@
_ts_library_target_name = _entrypoint_target_name + "-typescript"
ts_library(_ts_library_target_name) {
- forward_variables_from(invoker,
- [
- "deps",
- "es_target",
- "es_libs",
- "inputs",
- ])
+ forward_variables_from(invoker, ["deps", "es_target", "es_libs", "inputs"])
sources = [ invoker.entrypoint ]
}
@@ -110,19 +104,14 @@
}
ts_library(_prebundle_target_name) {
- forward_variables_from(invoker,
- [
- "deps",
- "es_target",
- "es_libs",
- "inputs",
- ])
+ forward_variables_from(invoker, ["deps", "es_target", "es_libs", "inputs"])
sources = [ _copy_output_file_name ]
rootdir = target_gen_dir
public_deps = [ ":$_copy_target_name" ]
+
}
bundle(_bundle_target_name) {
@@ -197,9 +186,6 @@
node_action(target_name) {
script = "scripts/build/ninja/generate-tsconfig.js"
- # Expose ts files to dependent targets.
- public_inputs = [ invoker.entrypoint ]
-
args = [
rebase_path(_generated_tsconfig_location, root_build_dir),
rebase_path(invoker.entrypoint, root_build_dir),
diff --git a/scripts/build/ninja/devtools_pre_built.gni b/scripts/build/ninja/devtools_pre_built.gni
index 1f38b18..3d76a75 100644
--- a/scripts/build/ninja/devtools_pre_built.gni
+++ b/scripts/build/ninja/devtools_pre_built.gni
@@ -17,9 +17,6 @@
public_deps = invoker.deps
- # Expose ts files to dependent targets.
- public_inputs = filter_include(sources, [ "*.ts" ])
-
_copy_src = rebase_path(get_path_info(target_name, "dir"), root_build_dir)
_copy_dest = rebase_path(target_gen_dir, root_build_dir)
diff --git a/scripts/build/typescript/typescript.gni b/scripts/build/typescript/typescript.gni
index b0d1367..a6f4c04 100644
--- a/scripts/build/typescript/typescript.gni
+++ b/scripts/build/typescript/typescript.gni
@@ -207,17 +207,6 @@
output_files = [ "$target_gen_dir/$target_name-tsconfig.json" ]
if (defined(sources)) {
- # Expose ts files to dependent targets.
- public_inputs =
- filter_include(sources,
- [
- "*.ts",
-
- # TODO: Migrate the files below to TypeScript
- # and remove them from this list.
- "*ahem.js",
- ])
-
args += [ "--sources" ] + rebase_path(sources, root_build_dir)
foreach(src, sources) {
@@ -0,0 +1,62 @@
From 5ebe0b53a5f4a33faf138191b254a7d4a5285a5f Mon Sep 17 00:00:00 2001
From: LN Liberda <[email protected]>
Date: Thu, 27 Aug 2026 08:13:35 +0200
Subject: [PATCH] unbundle/minizip: Ignore Unicode Path Extra Field
The fields come from chromium's patches on minizip
---
third_party/zlib/google/zip_reader.cc | 34 +--------------------------
1 file changed, 1 insertion(+), 33 deletions(-)
diff --git a/third_party/zlib/google/zip_reader.cc b/third_party/zlib/google/zip_reader.cc
index 7b5b28967cfbb..2054e3c09e419 100644
--- a/third_party/zlib/google/zip_reader.cc
+++ b/third_party/zlib/google/zip_reader.cc
@@ -314,32 +314,6 @@ bool ZipReader::OpenEntry() {
bool physical_path_is_directory = false;
bool physical_path_is_unsafe = false;
- // If an Info-ZIP Unicode Path Extra Field is present, the physical Central
- // Directory path is about to be overridden. Decode and normalize it now into
- // `entry_.physical_path` so consumers (e.g. Safe Browsing) can still see the
- // name that other tools (e.g. Windows Explorer) would use for extraction.
- if (info.size_utf8_filename > 0) {
- std::u16string physical_path_in_utf16;
- if (!base::CodepageToUTF16(entry_.path_in_original_encoding,
- configured_encoding,
- base::OnStringConversionError::SUBSTITUTE,
- &physical_path_in_utf16)) {
- LOG(ERROR) << "Cannot convert path from encoding " << configured_encoding;
- return false;
- }
- // Normalize() stores the normalized result in entry_.path; copy it before
- // applying the Unicode Path Extra Field below.
- Normalize(physical_path_in_utf16);
- entry_.physical_path = entry_.path;
- physical_path_is_directory = entry_.is_directory;
- physical_path_is_unsafe = entry_.is_unsafe;
-
- // Use the Info-ZIP Unicode Path Extra Field if present.
- DCHECK(info.utf8_filename[info.size_utf8_filename] == '\0');
- entry_.path_in_original_encoding = info.utf8_filename;
- entry_path_encoding = base::kCodepageUTF8;
- }
-
// Convert path from original encoding to Unicode.
std::u16string path_in_utf16;
if (!base::CodepageToUTF16(entry_.path_in_original_encoding,
@@ -353,13 +327,7 @@ bool ZipReader::OpenEntry() {
// Normalize path.
Normalize(path_in_utf16);
- if (info.size_utf8_filename > 0) {
- // Treat an entry as a directory only if both names are directories;
- // otherwise callers that analyze file entries should inspect it as a file.
- entry_.is_directory = entry_.is_directory && physical_path_is_directory;
- // Treat an entry as unsafe if either name is unsafe.
- entry_.is_unsafe = entry_.is_unsafe || physical_path_is_unsafe;
- } else {
+ {
// In the common case (no Unicode Path Extra Field) the physical path
// matches the effective path.
entry_.physical_path = entry_.path;
@@ -0,0 +1,22 @@
From 47459e81cbfc542aca5a4493dba8457fe11f7108 Mon Sep 17 00:00:00 2001
From: LN Liberda <[email protected]>
Date: Thu, 27 Aug 2026 20:27:03 +0200
Subject: [PATCH] unbundle/opus: add missing dep on opus in
devtools_media_encoding_service
---
content/services/devtools_media_encoding_service/BUILD.gn | 1 +
1 file changed, 1 insertion(+)
diff --git a/content/services/devtools_media_encoding_service/BUILD.gn b/content/services/devtools_media_encoding_service/BUILD.gn
index ce2b615256d36..ef222ca3597c2 100644
--- a/content/services/devtools_media_encoding_service/BUILD.gn
+++ b/content/services/devtools_media_encoding_service/BUILD.gn
@@ -18,6 +18,7 @@ source_set("devtools_media_encoding_service") {
"//media/mojo/common",
"//media/mojo/mojom",
"//mojo/public/cpp/bindings",
+ "//third_party/opus",
"//ui/gfx/geometry",
]
+278
View File
@@ -0,0 +1,278 @@
--- a/components/cbor/BUILD.gn
+++ b/components/cbor/BUILD.gn
@@ -12,7 +12,7 @@
# TODO(crbug.com/535682335): Remove `USE_CBOR_RUST` buildflag entirely,
# unconditionally enable Rust CBOR parser, and drop `is_cronet_build` check
# once Cronet supports Crubit dependencies.
- flags = [ "USE_CBOR_RUST=!$is_cronet_build" ]
+ flags = [ "USE_CBOR_RUST=$enable_cpp_api_from_rust" ]
}
component("cbor") {
@@ -37,7 +37,7 @@
"//base",
]
- if (!is_cronet_build) {
+ if (enable_cpp_api_from_rust) {
public_deps = [
"//build/rust/crubit",
"//components/cbor/rust:cbor_rust_bindings",
@@ -63,7 +63,7 @@
"//testing/gtest",
"//third_party/fuzztest",
]
- if (!is_cronet_build) {
+ if (enable_cpp_api_from_rust) {
deps += [ "//components/cbor/rust:cbor_rust_unittests" ]
}
--- b/third_party/blink/renderer/platform/BUILD.gn
+++ a/third_party/blink/renderer/platform/BUILD.gn
@@ -186,6 +186,18 @@
]
}
+rust_static_library("font_format_check") {
+ allow_unsafe = true # Needed for FFI that underpins the `cxx` crate.
+ crate_root = "fonts/opentype/format_check.rs"
+ sources = [ crate_root ]
+ cxx_bindings = [ crate_root ]
+ deps = [
+ "//third_party/rust/font_types/v0_12:lib",
+ "//third_party/rust/read_fonts/v0_41:lib",
+ "//third_party/rust/skrifa/v0_44:lib",
+ ]
+}
+
rust_static_library("rustfft_ffi") {
allow_unsafe = true # Needed for FFI that underpins the `cxx` crate.
crate_root = "audio/rustfft_ffi.rs"
@@ -1794,7 +1806,6 @@
":allow_discouraged_type",
":blink_platform_public_deps",
":platform_export",
- "//build/rust/crubit",
"//gpu/command_buffer/client:raster_interface",
"//media/capture:capture_lib",
"//mojo/public/cpp/base",
@@ -1821,8 +1832,8 @@
"//ui/native_theme/features",
]
deps = [
+ ":font_format_check",
":rustfft_ffi",
- "fonts:font_format_bindings",
"//base:base_static",
"//base/allocator:buildflags",
"//build:chromecast_buildflags",
--- b/third_party/blink/renderer/platform/fonts/BUILD.gn
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright 2026 The Chromium Authors
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import("//build/rust/rust_static_library.gni")
-
-rust_static_library("font_format") {
- crate_root = "opentype/format_check.rs"
- sources = [ crate_root ]
- cpp_api_from_rust = {
- target_name = "font_format_bindings"
- cpp_namespace = "font_format"
- }
- deps = [
- "//third_party/rust/font_types/v0_12:lib",
- "//third_party/rust/read_fonts/v0_41:lib",
- "//third_party/rust/skrifa/v0_44:lib",
- ]
-}
--- b/third_party/blink/renderer/platform/fonts/opentype/font_format_check.cc
+++ a/third_party/blink/renderer/platform/fonts/opentype/font_format_check.cc
@@ -7,6 +7,7 @@
#include "base/containers/span.h"
#include "base/containers/span_rust.h"
#include "base/numerics/byte_conversions.h"
+#include "third_party/blink/renderer/platform/fonts/opentype/format_check.rs.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"
#include "third_party/skia/include/core/SkTypeface.h"
@@ -14,37 +15,35 @@
namespace blink {
FontFormatCheck::FontFormatCheck(sk_sp<SkData> sk_data)
+ : format_info_(font_format_check::get_font_format_info(
- : format_info_(font_format::get_font_format_info(
base::SpanToRustSlice(sk_data->byteSpan()))) {}
-FontFormatCheck::~FontFormatCheck() = default;
-
bool FontFormatCheck::IsVariableFont() const {
+ return font_format_check::is_variable(*format_info_);
- return font_format::is_variable(format_info_);
}
bool FontFormatCheck::IsCbdtCblcColorFont() const {
+ return font_format_check::is_cbdt_cblc(*format_info_);
- return font_format::is_cbdt_cblc(format_info_);
}
bool FontFormatCheck::IsEbdtEblcMonochromeFont() const {
+ return font_format_check::is_ebdt_eblc(*format_info_);
- return font_format::is_ebdt_eblc(format_info_);
}
bool FontFormatCheck::IsColrCpalColorFontV0() const {
+ return font_format_check::is_colrv0(*format_info_);
- return font_format::is_colrv0(format_info_);
}
bool FontFormatCheck::IsColrCpalColorFontV1() const {
+ return font_format_check::is_colrv1(*format_info_);
- return font_format::is_colrv1(format_info_);
}
bool FontFormatCheck::IsSbixColorFont() const {
+ return font_format_check::is_sbix(*format_info_);
- return font_format::is_sbix(format_info_);
}
bool FontFormatCheck::IsCff2OutlineFont() const {
+ return font_format_check::is_cff2(*format_info_);
- return font_format::is_cff2(format_info_);
}
bool FontFormatCheck::IsVariableColrV0Font() const {
@@ -58,7 +57,7 @@
bool FontFormatCheck::IsAvar2Font() const {
return RuntimeEnabledFeatures::FontFormatAvar2Enabled() &&
+ font_format_check::is_avar2(*format_info_);
- font_format::is_avar2(format_info_);
}
FontFormatCheck::VariableFontSubType FontFormatCheck::ProbeVariableFont(
--- b/third_party/blink/renderer/platform/fonts/opentype/font_format_check.h
+++ a/third_party/blink/renderer/platform/fonts/opentype/font_format_check.h
@@ -5,7 +5,7 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_OPENTYPE_FONT_FORMAT_CHECK_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_OPENTYPE_FONT_FORMAT_CHECK_H_
+#include "third_party/blink/renderer/platform/fonts/opentype/format_check.rs.h"
-#include "third_party/blink/renderer/platform/fonts/font_format.h"
#include "third_party/blink/renderer/platform/platform_export.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/skia/include/core/SkData.h"
@@ -19,7 +19,7 @@
public:
explicit FontFormatCheck(sk_sp<SkData>);
+ virtual ~FontFormatCheck() = default;
- virtual ~FontFormatCheck();
virtual bool IsVariableFont() const;
virtual bool IsCbdtCblcColorFont() const;
virtual bool IsEbdtEblcMonochromeFont() const;
@@ -46,7 +46,7 @@
enum class COLRVersion { kCOLRV0, kCOLRV1, kNoCOLR };
private:
+ rust::Box<font_format_check::FontFormatInfo> format_info_;
- font_format::FontFormatInfo format_info_;
};
} // namespace blink
--- b/third_party/blink/renderer/platform/fonts/opentype/format_check.rs
+++ a/third_party/blink/renderer/platform/fonts/opentype/format_check.rs
@@ -23,7 +23,7 @@
format_flags: Option<FontFormatFlags>,
}
+pub fn get_font_format_info(font_bytes: &[u8]) -> Box<FontFormatInfo> {
-pub fn get_font_format_info(font_bytes: &[u8]) -> FontFormatInfo {
let file_ref = make_font_ref_internal(font_bytes, 0);
match file_ref {
@@ -32,11 +32,11 @@
font.table_directory().table_records().iter().map(|e| e.tag()).collect();
let color_version = get_colr_version(&font);
let avar_version = get_avar_version(&font);
+ Box::new(FontFormatInfo {
- FontFormatInfo {
format_flags: Some(FontFormatFlags { table_tags, color_version, avar_version }),
+ })
- }
}
+ _ => Box::new(FontFormatInfo::default()),
- _ => FontFormatInfo::default(),
}
}
@@ -44,10 +44,10 @@
Some(font_ref.colr().ok()?.version())
}
+fn is_colrv1(format_info: &FontFormatInfo) -> bool {
-pub fn is_colrv1(format_info: &FontFormatInfo) -> bool {
matches!(&format_info.format_flags, Some(FontFormatFlags { color_version: Some(1), .. }),)
}
+fn is_colrv0(format_info: &FontFormatInfo) -> bool {
-pub fn is_colrv0(format_info: &FontFormatInfo) -> bool {
matches!(&format_info.format_flags, Some(FontFormatFlags { color_version: Some(0), .. }),)
}
@@ -56,7 +56,7 @@
Some((version.major, version.minor))
}
+fn is_avar2(format_info: &FontFormatInfo) -> bool {
-pub fn is_avar2(format_info: &FontFormatInfo) -> bool {
matches!(&format_info.format_flags, Some(FontFormatFlags { avar_version: Some((2, _)), .. }),)
}
@@ -69,22 +69,39 @@
}
}
+fn is_variable(format_info: &FontFormatInfo) -> bool {
-pub fn is_variable(format_info: &FontFormatInfo) -> bool {
has_tags(format_info, &[Tag::new(b"fvar")])
}
+fn is_sbix(format_info: &FontFormatInfo) -> bool {
-pub fn is_sbix(format_info: &FontFormatInfo) -> bool {
has_tags(format_info, &[Tag::new(b"sbix")])
}
+fn is_cbdt_cblc(format_info: &FontFormatInfo) -> bool {
-pub fn is_cbdt_cblc(format_info: &FontFormatInfo) -> bool {
has_tags(format_info, &[Tag::new(b"CBDT"), Tag::new(b"CBLC")])
}
+fn is_ebdt_eblc(format_info: &FontFormatInfo) -> bool {
-pub fn is_ebdt_eblc(format_info: &FontFormatInfo) -> bool {
has_tags(format_info, &[Tag::new(b"EBDT"), Tag::new(b"EBLC")])
}
+fn is_cff2(format_info: &FontFormatInfo) -> bool {
-pub fn is_cff2(format_info: &FontFormatInfo) -> bool {
has_tags(format_info, &[Tag::new(b"CFF2")])
}
+
+#[cxx::bridge(namespace = "font_format_check")]
+pub mod ffi {
+ extern "Rust" {
+ type FontFormatInfo;
+
+ fn get_font_format_info(font_bytes: &[u8]) -> Box<FontFormatInfo>;
+ fn is_colrv1(format_info: &FontFormatInfo) -> bool;
+ fn is_colrv0(format_info: &FontFormatInfo) -> bool;
+ fn is_cbdt_cblc(format_info: &FontFormatInfo) -> bool;
+ fn is_ebdt_eblc(format_info: &FontFormatInfo) -> bool;
+ fn is_variable(format_info: &FontFormatInfo) -> bool;
+ fn is_sbix(format_info: &FontFormatInfo) -> bool;
+ fn is_cff2(format_info: &FontFormatInfo) -> bool;
+ fn is_avar2(format_info: &FontFormatInfo) -> bool;
+ }
+}
@@ -0,0 +1,17 @@
Use the system python3 instead of the hermetic cpython3 interpreter, which
is not shipped in the tarball and is not needed when building against system
tools.
Credit: https://github.com/ungoogled-software/ungoogled-chromium/pull/3946
--- a/.gn
+++ b/.gn
@@ -9,7 +9,7 @@
buildconfig = "//build/config/BUILDCONFIG.gn"
# The hermetic Python interpreter to use by default.
-script_executable = "//third_party/cpython3/host/bin/python3"
+script_executable = "python3"
# These arguments override the default values for items in a declare_args
# block. "gn args" in turn can override these.
@@ -0,0 +1,76 @@
third_party/iamf_tools (new in 153) includes the vendored copy of Opus via
relative "include/opus.h"-style paths that only resolve when
//third_party/opus/src is the real bundled Opus checkout. With Opus
unbundled (system libopus via build/linux/unbundle/opus.gn's shim_headers
target), that directory doesn't contain a real "include/" subtree, so the
compile fails with:
fatal error: 'include/opus.h' file not found
Use the same full "third_party/opus/src/include/..." style path that other
in-tree consumers (e.g. third_party/opus/tests/opus_benchmark.cc) use, which
resolves correctly against both the shim headers and a real bundled Opus
checkout, since root src is always on the include path.
--- a/third_party/iamf_tools/src/iamf/cli/codec/opus_decoder.cc
+++ b/third_party/iamf_tools/src/iamf/cli/codec/opus_decoder.cc
@@ -30,8 +30,8 @@
#include "iamf/obu/decoder_config/opus_decoder_config.h"
#include "iamf/obu/substream_channel_count.h"
#include "iamf/obu/types.h"
-#include "include/opus.h"
-#include "include/opus_types.h"
+#include "third_party/opus/src/include/opus.h"
+#include "third_party/opus/src/include/opus_types.h"
namespace iamf_tools {
--- a/third_party/iamf_tools/src/iamf/cli/codec/opus_decoder.h
+++ b/third_party/iamf_tools/src/iamf/cli/codec/opus_decoder.h
@@ -23,7 +23,7 @@
#include "iamf/cli/codec/decoder_base.h"
#include "iamf/obu/decoder_config/opus_decoder_config.h"
#include "iamf/obu/substream_channel_count.h"
-#include "include/opus.h"
+#include "third_party/opus/src/include/opus.h"
namespace iamf_tools {
--- a/third_party/iamf_tools/src/iamf/cli/codec/opus_encoder.cc
+++ b/third_party/iamf_tools/src/iamf/cli/codec/opus_encoder.cc
@@ -32,9 +32,9 @@
#include "iamf/common/utils/validation_utils.h"
#include "iamf/obu/decoder_config/opus_decoder_config.h"
#include "iamf/obu/substream_channel_count.h"
-#include "include/opus.h"
-#include "include/opus_defines.h"
-#include "include/opus_types.h"
+#include "third_party/opus/src/include/opus.h"
+#include "third_party/opus/src/include/opus_defines.h"
+#include "third_party/opus/src/include/opus_types.h"
namespace iamf_tools {
--- a/third_party/iamf_tools/src/iamf/cli/codec/opus_encoder.h
+++ b/third_party/iamf_tools/src/iamf/cli/codec/opus_encoder.h
@@ -22,8 +22,8 @@
#include "iamf/obu/codec_config.h"
#include "iamf/obu/decoder_config/opus_decoder_config.h"
#include "iamf/obu/substream_channel_count.h"
-#include "include/opus.h"
-#include "include/opus_defines.h"
+#include "third_party/opus/src/include/opus.h"
+#include "third_party/opus/src/include/opus_defines.h"
namespace iamf_tools {
--- a/third_party/iamf_tools/src/iamf/cli/codec/opus_utils.cc
+++ b/third_party/iamf_tools/src/iamf/cli/codec/opus_utils.cc
@@ -3,7 +3,7 @@
#include "absl/status/status.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
-#include "include/opus_defines.h"
+#include "third_party/opus/src/include/opus_defines.h"
namespace iamf_tools {
@@ -0,0 +1,31 @@
TypeScript became a build dependency (added in crrev.com/c/7861311, enabled in
crrev.com/c/8104602). Work around it for a system build:
* Disable the native TypeScript compiler (tsgo) for the WebUI; the JS-based
compiler bundled with the checkout still works.
* DevTools already removed that flag (crrev.com/c/8193297), so point its
typescript.py helper at the system tsc binary (from the 'typescript' package).
Credit: https://github.com/ungoogled-software/ungoogled-chromium/pull/3946
--- a/ui/webui/webui_features.gni
+++ b/ui/webui/webui_features.gni
@@ -33,7 +33,7 @@
# Enable the native TypeScript compiler (tsgo) instead of the JS-based one.
# TODO(crbug.com/423789047): Remove this flag once fully committed to v7.
- use_typescript_go = true
+ use_typescript_go = false
}
if (enable_cast_receiver || is_cast_android || is_castos) {
--- a/third_party/devtools-frontend/src/third_party/typescript/typescript.py
+++ b/third_party/devtools-frontend/src/third_party/typescript/typescript.py
@@ -10,6 +10,7 @@
def GetBinaryPath():
+ return "/usr/bin/tsc"
if platform.machine() == 'arm64':
darwin_path = 'mac-arm64'
else: