Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package chromium for openSUSE:Factory checked in at 2026-10-22 15:50:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/chromium (Old) and /work/SRC/openSUSE:Factory/.chromium.new.2252680 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "chromium" Thu Oct 22 15:50:22 2026 rev:556 rq:1386953 version:156.0.8078.47 Changes: -------- --- /work/SRC/openSUSE:Factory/chromium/chromium.changes 2026-10-18 19:23:51.531087792 +0200 +++ /work/SRC/openSUSE:Factory/.chromium.new.2252680/chromium.changes 2026-10-22 15:53:54.270178263 +0200 @@ -1,0 +2,386 @@ +Tue Oct 20 20:28:41 UTC 2026 - Andreas Stieger <[email protected]> + +- Chromium 156 (156.0.8078.47) promoted to stable (boo#1286350): + * CVE-2026-113341: Memory corruption in Skia + * CVE-2026-113279: Memory corruption in Accessibility + * CVE-2026-113072: Memory corruption in CSS + * CVE-2026-113280: Memory corruption in Paint + * CVE-2026-113271: Use after free in Accessibility + * CVE-2026-113303: Memory corruption in WebRTC + * CVE-2026-113101: Use after free in SiteIsolation + * CVE-2026-113097: Use after free in FileSystem + * CVE-2026-113098: Memory corruption in CacheStorage + * CVE-2026-113242: Memory corruption in ANGLE + * CVE-2026-113058: Use after free in WebUI + * CVE-2026-113082: Memory corruption in ANGLE + * CVE-2026-113119: Use after free in Network + * CVE-2026-113092: Use after free in Passwords + * CVE-2026-113134: Memory corruption in ANGLE + * CVE-2026-113339: Use after free in SVG + * CVE-2026-113317: Memory corruption in Accessibility + * CVE-2026-113193: Memory corruption in V8 + * CVE-2026-113117: Improper input validation in ANGLE + * CVE-2026-113188: Memory corruption in GPU + * CVE-2026-113104: Memory corruption in Frames + * CVE-2026-113322: Memory corruption in Dawn + * CVE-2026-113163: Use after free in WebGL + * CVE-2026-113253: Use after free in Canvas + * CVE-2026-113298: Use after free in Transactions Platform + * CVE-2026-113315: Memory corruption in ANGLE + * CVE-2026-113236: Use after free in Navigation + * CVE-2026-113284: Memory corruption in XML + * CVE-2026-113141: Use after free in Transactions Platform + * CVE-2026-113316: Improper input validation in Views + * CVE-2026-113234: Memory corruption in ANGLE + * CVE-2026-113252: Improper input validation in ANGLE + * CVE-2026-113305: Use after free in Privacy + * CVE-2026-113044: Use after free in V8 + * CVE-2026-113135: Memory corruption in PictureInPicture + * CVE-2026-113266: Memory corruption in ANGLE + * CVE-2026-113273: Memory corruption in ANGLE + * CVE-2026-113293: Use after free in ANGLE + * CVE-2026-113225: Memory corruption in Browser + * CVE-2026-113210: Use after free in ANGLE + * CVE-2026-113285: Memory corruption in ANGLE + * CVE-2026-113324: Use after free in GPU + * CVE-2026-113334: Improper input validation in ANGLE + * CVE-2026-113020: Improper input validation in Date + * CVE-2026-113222: Use after free in V8 + * CVE-2026-113318: Memory corruption in ServiceWorker + * CVE-2026-113310: Out of bounds read in Bluetooth + * CVE-2026-113338: Use after free in Turbolev + * CVE-2026-113093: Memory corruption in DisplayLocking + * CVE-2026-113012: Improper input validation in GPU + * CVE-2026-113175: Improper input validation in FileSystem + * CVE-2026-113192: Memory corruption in V8 + * CVE-2026-113309: Out of bounds read in Media + * CVE-2026-113295: Out of bounds read in ANGLE + * CVE-2026-113217: Use after free in WebAppInstalls + * CVE-2026-113040: Improper input validation in Proxy + * CVE-2026-113161: Use after free in WebRTC + * CVE-2026-113154: Memory corruption in Canvas + * CVE-2026-113336: Memory corruption in Compositing + * CVE-2026-113181: Use after free in Navigation + * CVE-2026-113019: Use after free in Turbolev + * CVE-2026-113095: Out of bounds read in Focus + * CVE-2026-113160: Use after free in Turbolev + * CVE-2026-113212: Memory corruption in PDF + * CVE-2026-113000: Memory corruption in Paint + * CVE-2026-113179: Use after free in Paint + * CVE-2026-112993: Use after free in Input + * CVE-2026-113055: Type confusion in FullScreen + * CVE-2026-113068: Use after free in Input + * CVE-2026-113320: Memory corruption in Navigation + * CVE-2026-113231: Improper input validation in Extensions + * CVE-2026-113174: Use after free in Extensions + * CVE-2026-113022: Memory corruption in PDFium + * CVE-2026-113079: Use after free in SiteIsolation + * CVE-2026-113191: Use after free in Internals + * CVE-2026-113250: Use after free in ANGLE + * CVE-2026-113109: Memory corruption in API + * CVE-2026-113113: Use after free in Extensions + * CVE-2026-113069: Memory corruption in Compositing + * CVE-2026-113006: Out of bounds read in Navigation + * CVE-2026-113263: Use after free in Core + * CVE-2026-113018: Memory corruption in IME + * CVE-2026-113301: Memory corruption in WebAppInstalls + * CVE-2026-113034: Memory corruption in FileSystem + * CVE-2026-113094: Memory corruption in API + * CVE-2026-113240: Use after free in Chromecast + * CVE-2026-113102: Out of bounds read in FileSystem + * CVE-2026-113142: Memory corruption in Extensions + * CVE-2026-113281: Memory corruption in SiteIsolation + * CVE-2026-113035: Out of bounds read in API + * CVE-2026-113211: Memory corruption in ServiceWorker + * CVE-2026-113011: Use after free in CredentialProvider + * CVE-2026-113198: Use after free in Extensions + * CVE-2026-113257: Memory corruption in Media + * CVE-2026-113070: Out of bounds read in GetUserMedia + * CVE-2026-113176: Memory corruption in Omnibox + * CVE-2026-113150: Memory corruption in Bindings + * CVE-2026-113311: Use after free in ServiceWorker + * CVE-2026-113078: Improper input validation in Compositing + * CVE-2026-113033: Use after free in Streaming + * CVE-2026-113026: Memory corruption in PDF + * CVE-2026-113302: Use after free in Extensions + * CVE-2026-113164: Memory corruption in Voice + * CVE-2026-113239: Range error in SiteIsolation + * CVE-2026-113131: Memory corruption in Bluetooth + * CVE-2026-113333: Memory corruption in Extensions + * CVE-2026-113147: Improper input validation in WebShare + * CVE-2026-113337: Memory corruption in Scroll + * CVE-2026-113127: Memory corruption in Browser + * CVE-2026-113129: Improper access control in Extensions + * CVE-2026-113264: Improper input validation in Extensions + * CVE-2026-113105: Use after free in Extensions + * CVE-2026-113220: Memory corruption in Extensions + * CVE-2026-113275: Use after free in API + * CVE-2026-113283: Memory corruption in CredentialProvider + * CVE-2026-113014: Use after free in PerformanceAPIs + * CVE-2026-113108: Use after free in Script + * CVE-2026-113343: Memory corruption in Sandbox + * CVE-2026-113319: Use after free in Accessibility + * CVE-2026-113057: Improper access control in ComputePressure + * CVE-2026-113219: Memory corruption in Contacts + * CVE-2026-113005: Memory corruption in Bluetooth + * CVE-2026-113209: Memory corruption in Navigation + * CVE-2026-113166: Memory corruption in History + * CVE-2026-113051: Memory corruption in CSS + * CVE-2026-113196: Improper access control in Mobile + * CVE-2026-113003: Memory corruption in HID + * CVE-2026-113155: Use after free in Glic + * CVE-2026-113290: Use after free in Input + * CVE-2026-113183: Memory corruption in FedCM + * CVE-2026-113289: Improper input validation in PerformanceAPIs + * CVE-2026-113146: Memory corruption in PerformanceAPIs + * CVE-2026-113207: Use after free in SiteIsolation + * CVE-2026-113205: Use after free in Variations + * CVE-2026-113162: Improper input validation in Actor + * CVE-2026-113118: Memory corruption in Extensions + * CVE-2026-113232: Memory corruption in Search + * CVE-2026-113327: Use after free in Chromecast + * CVE-2026-112999: Use after free in API + * CVE-2026-113249: Improper input validation in Mobile + * CVE-2026-113272: Memory corruption in Extensions + * CVE-2026-113112: Use after free in Extensions + * CVE-2026-113321: Use after free in Extensions + * CVE-2026-113059: Memory corruption in Sensor + * CVE-2026-113137: Memory corruption in Extensions + * CVE-2026-113208: Use after free in ContextualSearch + * CVE-2026-113238: Memory corruption in CustomTabs + * CVE-2026-113194: Memory corruption in Core + * CVE-2026-113189: Use after free in Core + * CVE-2026-113060: Improper input validation in Bluetooth + * CVE-2026-113115: Use after free in Transactions Platform + * CVE-2026-113045: Out of bounds read in Offline + * CVE-2026-113307: Memory corruption in Extensions + * CVE-2026-113009: Use after free in WindowControlsOverlay + * CVE-2026-113071: Use after free in Notifications + * CVE-2026-113278: Use after free in Extensions + * CVE-2026-113190: Use after free in ServiceWorker + * CVE-2026-112992: Memory corruption in Canvas + * CVE-2026-112995: Use after free in Animation + * CVE-2026-113261: Use after free in WebAppInstalls + * CVE-2026-113172: Memory corruption in ServiceWorker + * CVE-2026-113332: Memory corruption in GPU + * CVE-2026-113262: Use after free in Extensions + * CVE-2026-113149: Memory corruption in FullScreen + * CVE-2026-113206: Memory corruption in Omnibox + * CVE-2026-113185: Memory corruption in Extensions + * CVE-2026-113171: Memory corruption in Prompts + * CVE-2026-113042: Use after free in Extensions + * CVE-2026-113276: Memory corruption in Passwords + * CVE-2026-113218: Use after free in DataTransfer + * CVE-2026-113195: Improper input validation in Downloads + * CVE-2026-113328: Improper input validation in Privacy + * CVE-2026-113335: Memory corruption in Extensions + * CVE-2026-113255: Use after free in CustomTabs + * CVE-2026-113076: Use after free in Toolbar + * CVE-2026-113325: Memory corruption in SignIn + * CVE-2026-113084: Improper input validation in Permissions + * CVE-2026-113308: Use after free in Core + * CVE-2026-113224: Memory corruption in WebAppInstalls + * CVE-2026-113148: Memory corruption in WebUI + * CVE-2026-113010: Out of bounds read in Extensions + * CVE-2026-113073: Use after free in Browser + * CVE-2026-113265: Memory corruption in BFCache + * CVE-2026-113329: Out of bounds read in Installer + * CVE-2026-113043: Use after free in iOSWeb + * CVE-2026-113202: Use after free in BrowserTag + * CVE-2026-113016: Improper input validation in Extensions + * CVE-2026-113246: Memory corruption in iOSWebView + * CVE-2026-113041: Use after free in Actor + * CVE-2026-113126: Memory corruption in PolicyContainer + * CVE-2026-113031: Memory corruption in Media + * CVE-2026-113081: Use after free in Compositing + * CVE-2026-113139: Memory corruption in Autofill + * CVE-2026-113128: Missing authorization in Animation + * CVE-2026-113049: Memory corruption in Core + * CVE-2026-113032: Memory corruption in Omnibox + * CVE-2026-113204: Use after free in TrustedWebActivities + * CVE-2026-113144: Memory corruption in Speech + * CVE-2026-113054: Out of bounds read in SiteIsolation + * CVE-2026-113123: Use after free in GPU + * CVE-2026-113277: Out of bounds read in CustomTabs + * CVE-2026-113136: Memory corruption in DevTools + * CVE-2026-113106: Memory corruption in Skia + * CVE-2026-113001: Use after free in Workers + * CVE-2026-113064: Memory corruption in OptimizationGuide + * CVE-2026-113243: Memory corruption in DOM + * CVE-2026-113326: Memory corruption in Core + * CVE-2026-113124: Memory corruption in DataTransfer + * CVE-2026-113230: Improper input validation in Browser + * CVE-2026-113090: Memory corruption in Interstitials + * CVE-2026-113158: Use after free in Streaming + * CVE-2026-113077: Memory corruption in Core + * CVE-2026-113282: Use after free in Views + * CVE-2026-113165: Use after free in Core + * CVE-2026-113178: Memory corruption in Views + * CVE-2026-113110: Memory corruption in ShadowDOM + * CVE-2026-113007: Memory corruption in Permissions + * CVE-2026-113187: Use after free in DOM + * CVE-2026-113075: Use after free in DevTools + * CVE-2026-113259: Use after free in Frames + * CVE-2026-113228: Use after free in Network + * CVE-2026-113099: Improper input validation in Omnibox + * CVE-2026-113216: Use after free in Navigation + * CVE-2026-113270: Use after free in Internals + * CVE-2026-113087: Use after free in Actor + * CVE-2026-113267: Memory corruption in Video + * CVE-2026-113304: Memory corruption in GPU + * CVE-2026-113177: Use after free in FileSystem + * CVE-2026-113151: Out of bounds read in Actor + * CVE-2026-113028: Use after free in Media + * CVE-2026-113120: Improper input validation in Media + * CVE-2026-112997: Memory corruption in CSS + * CVE-2026-113037: Use after free in WebSockets + * CVE-2026-113153: Memory corruption in SiteIsolation + * CVE-2026-113138: Memory corruption in WebAppInstalls + * CVE-2026-113030: Improper access control in V8 + * CVE-2026-113100: Memory corruption in Audio + * CVE-2026-113221: Use after free in Google Lens + * CVE-2026-113344: Use after free in Performance + * CVE-2026-113342: Memory corruption in Network + * CVE-2026-113159: Improper access control in DevTools + * CVE-2026-113233: Out of bounds read in Core + * CVE-2026-113065: Use after free in Media + * CVE-2026-113002: Memory corruption in Transactions Platform + * CVE-2026-113199: Out of bounds read in Payments + * CVE-2026-113197: Use after free in Forms + * CVE-2026-113203: Use after free in CSS + * CVE-2026-113170: Use after free in Autofill + * CVE-2026-113258: Memory corruption in Chromoting + * CVE-2026-113297: Improper access control in Ozone + * CVE-2026-113062: Improper input validation in API + * CVE-2026-113096: Memory corruption in Text + * CVE-2026-113050: Out of bounds read in HID + * CVE-2026-113008: Memory corruption in Transactions Platform + * CVE-2026-113111: Use after free in Compositing + * CVE-2026-113200: Use after free in ANGLE + * CVE-2026-113143: Memory corruption in ANGLE + * CVE-2026-113157: Information leak in ANGLE + * CVE-2026-113235: Improper input validation in Passwords + * CVE-2026-113089: Improper input validation in PrintPreview + * CVE-2026-113340: Memory corruption in ANGLE + * CVE-2026-113052: Memory corruption in V8 + * CVE-2026-113133: Memory corruption in PlatformIntegration + * CVE-2026-113086: Improper input validation in Input + * CVE-2026-113251: Use after free in PDF + * CVE-2026-113215: Use after free in Extensions + * CVE-2026-113053: Use after free in Cookies + * CVE-2026-113312: Memory corruption in Autofill + * CVE-2026-113323: Use after free in Chrome for iOS + * CVE-2026-113114: Use after free in SignIn + * CVE-2026-113015: Use after free in Workers + * CVE-2026-113091: Use after free in PerformanceAPIs + * CVE-2026-113168: Use after free in Permissions + * CVE-2026-113229: Use after free in Loader + * CVE-2026-113256: Use after free in Permissions + * CVE-2026-113103: Use after free in WebProtect + * CVE-2026-113056: Memory corruption in PerformanceAPIs + * CVE-2026-113201: Memory corruption in Google Lens + * CVE-2026-113027: Memory corruption in WebFonts + * CVE-2026-113214: Improper input validation in FullScreen + * CVE-2026-113004: Memory corruption in Sync + * CVE-2026-113300: Out of bounds write in Forms + * CVE-2026-113213: Memory corruption in DevTools + * CVE-2026-113167: Memory corruption in Network + * CVE-2026-113223: Memory corruption in DevTools + * CVE-2026-113291: Memory corruption in FullScreen + * CVE-2026-113241: Memory corruption in Toolbar + * CVE-2026-113244: Improper input validation in UI + * CVE-2026-113048: Memory corruption in DevTools + * CVE-2026-113247: Memory corruption in DevTools + * CVE-2026-113023: Improper input validation in Extensions + * CVE-2026-113330: Memory corruption in CustomTabs + * CVE-2026-113226: Memory corruption in Model + * CVE-2026-113152: Memory corruption in SignIn ++++ 89 more lines (skipped) ++++ between /work/SRC/openSUSE:Factory/chromium/chromium.changes ++++ and /work/SRC/openSUSE:Factory/.chromium.new.2252680/chromium.changes Old: ---- chromium-154-revert-crubit_private_verification_tokens.patch chromium-155-consistently-cxx23.patch chromium-155.0.8059.84-linux.tar.xz chromium-493e6c3911e33cc356856bafbffc6cf95521266b.patch New: ---- chromium-154-verification-tokens.patch chromium-156-blink_static_cast.patch chromium-156-revert_ift_patcher.patch chromium-156-verification-tokens.patch chromium-156.0.8078.47-linux.tar.xz chromium-162dc276a85b4f7d353adbe312d05d8e7a4c28e3.patch ----------(Old B)---------- Old:- removed patches: * chromium-154-revert-crubit_private_verification_tokens.patch (replaced by chromium-154-verification-tokens.patch) Old: * chromium-493e6c3911e33cc356856bafbffc6cf95521266b.patch * chromium-155-consistently-cxx23.patch Old: * chromium-156-revert_ift_patcher.patch * chromium-493e6c3911e33cc356856bafbffc6cf95521266b.patch * ppc-fedora-0001-sandbox-Enable-seccomp_bpf-for-ppc64.patch ----------(Old E)---------- ----------(New B)---------- New:- added patches: * chromium-154-verification-tokens.patch * chromium-156-blink_static_cast.patch New: * chromium-154-verification-tokens.patch * chromium-156-blink_static_cast.patch * chromium-156-revert_ift_patcher.patch New: (redone based on patch from ungoogled-chromium pr conversation) * chromium-156-revert_ift_patcher.patch * chromium-493e6c3911e33cc356856bafbffc6cf95521266b.patch New: * chromium-156-revert_ift_patcher.patch * chromium-156-verification-tokens.patch * chromium-162dc276a85b4f7d353adbe312d05d8e7a4c28e3.patch New: * chromium-156-verification-tokens.patch * chromium-162dc276a85b4f7d353adbe312d05d8e7a4c28e3.patch - removed patches: ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ chromium.spec ++++++ --- /var/tmp/diff_new_pack.J5YDaj/_old 2026-10-22 15:54:05.631654503 +0200 +++ /var/tmp/diff_new_pack.J5YDaj/_new 2026-10-22 15:54:05.633654587 +0200 @@ -81,7 +81,7 @@ # minimal esbuild version %define esbuild_version 0.28.2 # minimal gn version -%define gn_version 0.20260831 +%define gn_version 0.20260928 # local rollup override to run without binaries %define rollup_version 3.29.5 %if 0%{?suse_version} <= 1699 @@ -139,7 +139,7 @@ %global official_build 1 Name: chromium%{n_suffix} -Version: 155.0.8059.84 +Version: 156.0.8078.47 Release: 0 Summary: Google's open source browser project License: BSD-3-Clause AND LGPL-2.1-or-later @@ -219,11 +219,14 @@ Patch406: chromium-153-opus_includes.patch Patch407: chromium-153-ignore-typescript-deps.patch Patch408: chromium-154-revert-crubit_web_package.patch -Patch409: chromium-154-revert-crubit_private_verification_tokens.patch +Patch409: chromium-154-verification-tokens.patch Patch410: chromium-155-v8-clang-path.patch Patch411: chromium-153-ftbfs-pipewire-api.patch Patch412: chromium-155-older-clang-bindings.patch Patch413: chromium-155-v8-cxx-include.patch +Patch414: chromium-156-revert_ift_patcher.patch +Patch415: chromium-156-verification-tokens.patch +Patch416: chromium-156-blink_static_cast.patch # conditionally applied patches ppc64le only # where applicable patch numbers from fedora specfile + 100 Patch452: ppc-fedora-memory-allocator-dcheck-assert-fix.patch @@ -303,6 +306,7 @@ Patch1050: chromium-140-old-flac.patch # only in ffmpeg avutil >= 60.31 Patch1051: chromium-150-ffmpeg_no_agtm.patch +Patch1052: chromium-162dc276a85b4f7d353adbe312d05d8e7a4c28e3.patch Patch1061: chromium-146-static-assert.patch # llvm19 segfaults in # ../services/network/public/cpp/permissions_policy/origin_with_possible_wildcards.cc:99:1: current parser token 'std' @@ -323,13 +327,6 @@ Patch1074: chromium-152-no-lifetime-checks.patch Patch1075: chromium-152-no-warning-suppression-map.patch Patch1080: rollup.patch -# more crubit fallout -Patch1082: chromium-493e6c3911e33cc356856bafbffc6cf95521266b.patch -Patch1083: chromium-155-consistently-cxx23.patch -# get v8 to build on code15 -# c++ include limits is found by chance on newer versions, -# try to force the needed include dir into code15 - # end conditionally applied patches BuildRequires: SDL-devel BuildRequires: bison @@ -614,6 +611,7 @@ # GetAgtmSideData is only in libavutil >= 60.31, ffmpeg > 8.1 %if %{with system_ffmpeg} +%patch -p1 -R -P 1052 %patch -p1 -P 1051 %endif @@ -637,15 +635,6 @@ %patch -p1 -P 1074 fi -# revert another crubit patch until we get a proper building crubit -%patch -p1 -R -P 1082 - -%if 0%{?suse_version} < 1600 -%ifarch ppc64le -%patch -p1 -P 1083 -%endif -%endif - ## ROLLUP_HACK rm -rf third_party/devtools-frontend/src/node_modules/rollup rm -rf third_party/devtools-frontend/src/node_modules/@rollup/rollup-linux-* @@ -677,6 +666,13 @@ %endif %build + +ccache --show-config +# Zero out the hit/miss stats from previous runs to have data from this build +ccache --zero-stats +# show how much cache we are starting with +ccache --show-stats + # esbuild rm third_party/devtools-frontend/src/third_party/esbuild/esbuild tar -xf %{SOURCE1} @@ -1384,11 +1380,12 @@ %fdupes -s %{buildroot} +# show the ccache hit/miss stats +ccache --show-stats + %files %license LICENSE %doc AUTHORS -# hack to keep the generated file -%doc out/gen/v8/builtins-generated/bytecodes-builtins-list.h %{_datadir}/chromium %dir %{_sysconfdir}/chromium %dir %{_sysconfdir}/chromium/policies ++++++ _scmsync.obsinfo ++++++ --- /var/tmp/diff_new_pack.J5YDaj/_old 2026-10-22 15:54:05.792661252 +0200 +++ /var/tmp/diff_new_pack.J5YDaj/_new 2026-10-22 15:54:05.794661336 +0200 @@ -1,7 +1,7 @@ -mtime: 1792234647 -commit: 80cd9ffc2237035589e613169085f390311b35bc4308c913ff22abec57222bad +mtime: 1792602735 +commit: 416d9307c41437b43b6976fbe7bf509f46c6e254ccb010ed8e3dde8f77820d54 url: https://src.opensuse.org/chromium/chromium -revision: 80cd9ffc2237035589e613169085f390311b35bc4308c913ff22abec57222bad +revision: 416d9307c41437b43b6976fbe7bf509f46c6e254ccb010ed8e3dde8f77820d54 trackingbranch: main projectscmsync: https://src.opensuse.org/chromium/_ObsPrj.git ++++++ build.specials.obscpio ++++++ ++++++ build.specials.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.gitignore new/.gitignore --- old/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/.gitignore 2026-10-21 19:12:15.000000000 +0200 @@ -0,0 +1,4 @@ +.osc +*.patch~ +*-build/ +.*.swp ++++++ chromium-125-compiler.patch ++++++ --- /var/tmp/diff_new_pack.J5YDaj/_old 2026-10-22 15:54:05.976668965 +0200 +++ /var/tmp/diff_new_pack.J5YDaj/_new 2026-10-22 15:54:05.980669133 +0200 @@ -125,7 +125,7 @@ # Tells the compiler not to use absolute paths when passing the default # paths to the tools it invokes. We don't want this because we don't # really need it and it can mess up the RBE cache entries. -@@ -1457,88 +1356,6 @@ config("compiler_deterministic") { +@@ -1376,121 +1376,6 @@ } } @@ -185,22 +185,55 @@ - - if (toolchain_has_rust && _perform_consistency_checks && - !rust_force_head_revision) { -- # Ensure that the synced rust version matches what's in git. -- _rust_revision_lines = -- filter_include(read_file("//tools/rust/update_rust.py", "list lines"), -- [ "RUST_*REVISION = *" ]) -- _py_revision = -- string_replace(_rust_revision_lines[0], "RUST_REVISION = '", "") -- _py_revision = string_replace(_py_revision, "'", "") -- _py_subrevision = -- string_replace(_rust_revision_lines[1], "RUST_SUB_REVISION = ", "") -- _expected_rust_revision = "$_py_revision-$_py_subrevision" -- -- # Ensure the rust version matches the clang version. -- assert( -- filter_include([ rustc_revision ], -- [ "*-$_expected_rust_revision-*" ]) != [], -- "rustc_revision=\"$rustc_revision\" but update_rust.py expected \"$_expected_rust_revision\". Run \"gclient sync\"?") +- # Ensure that synced rust, crubit, and bindgen versions match what's in +- # git. +- _rust_update_lines = +- read_file("//tools/rust/update_rust.py", "list lines") +- _version_lines = +- read_file("//third_party/rust-toolchain/VERSION", "list lines") +- +- # The rust revision combines two lines of the file, so we need to do +- # some preprocessing to combine them. +- _lines = filter_include(_rust_update_lines, [ "RUST_*REVISION = *" ]) +- _rust_rev = +- string_replace(string_replace(_lines[0], "RUST_REVISION = '", ""), +- "'", +- "") +- _rust_subrev = string_replace(_lines[1], "RUST_SUB_REVISION = ", "") +- +- _tools = [ +- { +- name = "rustc" +- expected_pattern = "rustc *$_rust_rev-$_rust_subrev-*" +- }, +- { +- name = "crubit" +- update_variable = "CRUBIT_REVISION" +- }, +- { +- name = "bindgen" +- update_variable = "BINDGEN_REVISION" +- }, +- ] +- +- foreach(_tool, _tools) { +- if (defined(_tool.expected_pattern)) { +- _expected = _tool.expected_pattern +- } else { +- _lines = [] +- _lines = filter_include(_rust_update_lines, +- [ "${_tool.update_variable} = *" ]) +- _expected = +- string_replace(string_replace(_lines[0], +- "${_tool.update_variable} = '", +- "${_tool.name}: "), +- "'", +- "") +- } +- assert( +- filter_include(_version_lines, [ _expected ]) != [], +- "${_tool.name} revision in //third_party/rust-toolchain/VERSION does not match update_rust.py. Run \"gclient sync\"?") +- } - } - - # This is here so that all files get recompiled after a clang roll and ++++++ chromium-146-value_or.patch ++++++ --- /var/tmp/diff_new_pack.J5YDaj/_old 2026-10-22 15:54:06.084673492 +0200 +++ /var/tmp/diff_new_pack.J5YDaj/_new 2026-10-22 15:54:06.088673660 +0200 @@ -74,8 +74,8 @@ +++ chromium-152.0.7977.8/gpu/command_buffer/service/raster_decoder.cc @@ -2973,7 +2973,7 @@ void RasterDecoderImpl::DoRasterCHROMIUM - auto paint_buffer_opt = - GetSharedMemoryAsSpan(raster_shm_id, raster_shm_offset, raster_shm_size); + auto paint_buffer_opt = GetSharedMemoryAsSpan<volatile uint8_t>( + raster_shm_id, raster_shm_offset, raster_shm_size); - if (paint_buffer_opt.value_or({}).empty()) { + if (paint_buffer_opt.value_or(std::span<uint8_t>{}).empty()) { LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glRasterCHROMIUM", ++++++ chromium-148-only_address_sanitizer.patch ++++++ --- /var/tmp/diff_new_pack.J5YDaj/_old 2026-10-22 15:54:06.120675001 +0200 +++ /var/tmp/diff_new_pack.J5YDaj/_new 2026-10-22 15:54:06.126675253 +0200 @@ -1,21 +1,41 @@ --- chromium-148.0.7743.0/v8/src/sandbox/testing.cc 2026/03/25 23:17:45 1.1 +++ chromium-148.0.7743.0/v8/src/sandbox/testing.cc 2026/03/25 23:19:18 -@@ -854,7 +854,7 @@ +@@ -1100,9 +1100,9 @@ // We should also uninstall the sanitizer death callback as our crash filter - // may hand a crash over to sanitizers, which should then not enter our crash - // filtering logic a second time. + // may hand a crash over to sanitizers, which should then not print the + // sandbox violation message a second time. -#ifdef V8_USE_ANY_SANITIZER +#ifdef V8_USE_ADDRESS_SANITIZER __sanitizer_set_death_callback(nullptr); - #endif // V8_USE_ANY_SANITIZER +-#endif // V8_USE_ANY_SANITIZER ++#endif // V8_USE_ADDRESS_SANITIZER } -@@ -1134,7 +1134,7 @@ + + void ForwardToOldHandler(int signal, siginfo_t* info, void* context) { +@@ -1457,7 +1457,7 @@ + // violation that needs to be investigated. + PrintToStderr("\n## V8 sandbox violation detected!\n\n"); + } +-#endif // V8_USE_ANY_SANITIZER ++#endif // V8_USE_ADDRESS_SANITIZER + + void InstallCrashFilter() { + // Register an alternate stack for signal delivery so that signal handlers +@@ -1480,14 +1480,14 @@ } CHECK(success); -#ifdef V8_USE_ANY_SANITIZER +#ifdef V8_USE_ADDRESS_SANITIZER - // We install sanitizer specific crash handlers. These can only check for - // in-sandbox crashes on certain configurations. + // We install a sanitizer death callback. For ASan, this will check the flag + // set by __asan_on_error to determine if the fault was harmless. // + // The crash handler also resets the signal handler as sanitizer may use + // `abort()` via `abort_on_error=1` option to signal problems. + __sanitizer_set_death_callback(&SanitizerFaultHandler); +-#endif // V8_USE_ANY_SANITIZER ++#endif // V8_USE_ADDRESS_SANITIZER + } + + #endif // V8_OS_LINUX ++++++ chromium-152-rust-cbor.patch ++++++ --- /var/tmp/diff_new_pack.J5YDaj/_old 2026-10-22 15:54:06.190677936 +0200 +++ /var/tmp/diff_new_pack.J5YDaj/_new 2026-10-22 15:54:06.193678061 +0200 @@ -16,14 +16,14 @@ + flags = [ "USE_CBOR_RUST=$enable_cpp_api_from_rust" ] } - component("cbor") { + source_set("cbor_headers") { @@ -35,7 +35,7 @@ "//base", ] - if (!is_cronet_build) { + if (enable_cpp_api_from_rust) { - public_deps = [ + deps += [ "//build/rust/crubit", "//components/cbor/rust:cbor_rust_bindings", @@ -62,7 +62,7 @@ ++++++ chromium-154-revert-crubit_web_package.patch ++++++ ++++ 2656 lines (skipped) ++++ between /work/SRC/openSUSE:Factory/chromium/chromium-154-revert-crubit_web_package.patch ++++ and /work/SRC/openSUSE:Factory/.chromium.new.2252680/chromium-154-revert-crubit_web_package.patch ++++++ chromium-154-verification-tokens.patch ++++++ Pulled from https://github.com/ungoogled-software/ungoogled-chromium/pull/3966 "The private verification tokens haven't launched yet" --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn @@ -1022,7 +1022,6 @@ source_set("core") { "//chrome/browser/preloading/search_preload:feature", "//chrome/browser/privacy_sandbox:headers", "//chrome/browser/private_ai", - "//chrome/browser/private_verification_tokens", "//chrome/browser/profiles:misc", "//chrome/browser/profiles:profile_io_data", "//chrome/browser/profiles:profiles_extra_parts", @@ -2215,7 +2214,6 @@ source_set("browser") { "//chrome/browser/preloading/search_preload", "//chrome/browser/privacy", "//chrome/browser/privacy_sandbox:impl", - "//chrome/browser/private_verification_tokens", "//chrome/browser/profiles:misc", "//chrome/browser/profiles:profile_util_impl", "//chrome/browser/profiles:profiles_extra_parts_impl", --- a/chrome/browser/browsing_data/BUILD.gn +++ b/chrome/browser/browsing_data/BUILD.gn @@ -125,7 +125,6 @@ source_set("impl") { "//chrome/browser/preloading/prefetch/no_state_prefetch", "//chrome/browser/preloading/prefetch/search_prefetch", "//chrome/browser/privacy_sandbox:headers", - "//chrome/browser/private_verification_tokens", "//chrome/browser/profiles/keep_alive", "//chrome/browser/reading_list", "//chrome/browser/safe_browsing", @@ -268,7 +267,6 @@ source_set("unit_tests") { "//chrome/browser/payments/browser_binding:browser_bound_key_deleter", "//chrome/browser/payments/browser_binding:test_support", "//chrome/browser/permissions", - "//chrome/browser/private_verification_tokens", "//chrome/browser/reading_list", "//chrome/browser/safe_browsing:verdict_cache_manager_factory", "//chrome/browser/segmentation_platform", @@ -296,7 +294,6 @@ source_set("unit_tests") { "//components/privacy_sandbox:privacy_sandbox_settings_headers", "//components/privacy_sandbox/privacy_sandbox_attestations", "//components/privacy_sandbox/privacy_sandbox_attestations:test_support", - "//components/private_verification_tokens/common:private_verification_tokens_database", "//components/reading_list/core:test_support", "//components/safe_browsing/core/browser:suspicious_site_warning_allowlist", "//components/safe_browsing/core/browser:verdict_cache_manager", --- a/chrome/browser/browsing_data/chrome_browsing_data_model_delegate.cc +++ b/chrome/browser/browsing_data/chrome_browsing_data_model_delegate.cc @@ -127,15 +127,6 @@ void ChromeBrowsingDataModelDelegate::Ge GetAllMediaDeviceSaltDataKeys(concurrent.CreateCallback(), {}); - if (base::FeatureList::IsEnabled( - net::features::kEnablePrivateVerificationTokens)) { - if (auto* pvt_service = - PrivateVerificationTokensServiceFactory::GetForProfile(profile_)) { - pvt_service->GetTokenIssuers( - base::BindOnce(&PrivateVerificationTokenBrowsingDataToDelegateEntries) - .Then(concurrent.CreateCallback())); - } - } // TODO(crbug.com/40205603): Implement data retrieval for remaining data // types. @@ -180,20 +171,6 @@ void ChromeBrowsingDataModelDelegate::Re } #endif // !BUILDFLAG(IS_ANDROID) - if (base::FeatureList::IsEnabled( - net::features::kEnablePrivateVerificationTokens) && - storage_types.Has(static_cast<BrowsingDataModel::StorageType>( - StorageType::kPrivateVerificationTokens))) { - if (const url::Origin* origin = std::get_if<url::Origin>(&data_key)) { - if (auto* pvt_service = - PrivateVerificationTokensServiceFactory::GetForProfile( - profile_)) { - pvt_service->DeleteTokens(base::Time(), base::Time::Max(), - concurrent.CreateClosure(), - std::vector<url::Origin>{*origin}); - } - } - } std::move(concurrent).Done(std::move(callback)); } --- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc +++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc @@ -720,29 +720,6 @@ void ChromeBrowsingDataRemoverDelegate:: #endif // BUILDFLAG(IS_CHROMEOS) } - ////////////////////////////////////////////////////////////////////////////// - // DATA_TYPE_PRIVATE_VERIFICATION_TOKENS - if (remove_mask & constants::DATA_TYPE_PRIVATE_VERIFICATION_TOKENS) { - if (base::FeatureList::IsEnabled( - net::features::kEnablePrivateVerificationTokens)) { - if (auto* pvt_service = - PrivateVerificationTokensServiceFactory::GetForProfile( - profile_)) { - auto done_closure = CreateTaskCompletionClosure( - TracingDataType::kPrivateVerificationTokens); - - if (filter_builder->MatchesAllOriginsAndDomains()) { - pvt_service->DeleteTokens(delete_begin_, delete_end_, - std::move(done_closure), - /*issuers=*/std::nullopt); - } else { - pvt_service->DeleteTokensByFilter( - delete_begin_, delete_end_, - filter_builder->BuildStorageKeyFilter(), std::move(done_closure)); - } - } - } - } ////////////////////////////////////////////////////////////////////////////// // DATA_TYPE_CONTENT_SETTINGS --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc @@ -6152,22 +6152,6 @@ result.push_back(std::move(signin_throttle)); } - if (base::FeatureList::IsEnabled( - net::features::kEnablePrivateVerificationTokens) && - request.is_outermost_main_frame) { - if (auto* pvt_service = - PrivateVerificationTokensServiceFactory::GetForProfile(profile)) { - auto url_loader_factory = profile->GetDefaultStoragePartition() - ->GetURLLoaderFactoryForBrowserProcess(); - if (auto pvt_throttle = - PrivateVerificationTokensURLLoaderThrottle::Create( - pvt_service, profile->GetWeakPtr(), - std::move(url_loader_factory))) { - result.push_back(std::move(pvt_throttle)); - } - } - } - if (auto contextual_tasks_throttle = contextual_tasks::ContextualTasksURLLoaderThrottle::MaybeCreate( profile, wc_getter)) { --- a/chrome/browser/component_updater/BUILD.gn +++ b/chrome/browser/component_updater/BUILD.gn @@ -147,7 +147,6 @@ source_set("impl") { "//chrome/browser/net", "//chrome/browser/page_load_metrics", "//chrome/browser/permissions", - "//chrome/browser/private_verification_tokens", "//chrome/browser/profiles:profile", "//chrome/browser/update_client", "//chrome/common", @@ -163,7 +162,6 @@ source_set("impl") { "//components/permissions", "//components/privacy_sandbox:features", "//components/privacy_sandbox/privacy_sandbox_attestations", - "//components/private_verification_tokens/common:private_verification_tokens_issuer_config", "//components/safe_browsing/core/common:features", "//components/search", "//components/security_interstitials/content:security_interstitial_page", --- a/chrome/browser/component_updater/private_verification_tokens_installer.cc +++ b/chrome/browser/component_updater/private_verification_tokens_installer.cc @@ -25,32 +25,6 @@ namespace component_updater { void RegisterPrivateVerificationTokensComponentIfEnabled( ComponentUpdateService* cus) { - if (!base::FeatureList::IsEnabled( - net::features::kEnablePrivateVerificationTokens)) { - return; - } - - auto installer = base::MakeRefCounted<ComponentInstaller>( - std::make_unique<PrivateVerificationTokensInstallerPolicy>( - base::BindRepeating( - [](scoped_refptr<private_verification_tokens:: - PrivateVerificationTokensIssuerConfig> - issuer_config) { - PrivateVerificationTokensServiceFactory::SetGlobalIssuerConfig( - issuer_config); - if (g_browser_process && g_browser_process->profile_manager()) { - for (Profile* profile : g_browser_process->profile_manager() - ->GetLoadedProfiles()) { - if (PrivateVerificationTokensService* service = - PrivateVerificationTokensServiceFactory:: - GetForProfileIfExists(profile)) { - service->SetIssuerConfig(issuer_config); - } - } - } - }))); - - installer->Register(cus, base::OnceClosure()); } } // namespace component_updater --- a/chrome/browser/private_verification_tokens/BUILD.gn +++ b/chrome/browser/private_verification_tokens/BUILD.gn @@ -28,12 +28,6 @@ "//chrome/browser/profiles:profile", "//components/content_settings/core/browser", "//components/keyed_service/core", - "//components/private_verification_tokens/common:privacy_pass_athm_batch_request", - "//components/private_verification_tokens/common:private_verification_tokens_fetcher", - "//components/private_verification_tokens/common:private_verification_tokens_issuer_config", - "//components/private_verification_tokens/common:private_verification_tokens_metrics", - "//components/private_verification_tokens/common:private_verification_tokens_parameters", - "//components/private_verification_tokens/common:private_verification_tokens_store", "//content/public/browser", "//net", "//services/network/public/cpp", @@ -53,10 +47,6 @@ "//chrome/test:test_support", "//chrome/test/base:chrome_test_utils", "//components/content_settings/core/common", - "//components/private_verification_tokens/common:private_verification_tokens_database", - "//components/private_verification_tokens/common:private_verification_tokens_issuer_config", - "//components/private_verification_tokens/common:test_support", - "//components/private_verification_tokens/common/athm_ffi:athm_ffi_bindings", "//net:test_support", "//services/network:test_support", "//url", @@ -77,13 +67,7 @@ "//chrome/test:test_support", "//components/content_settings/core/browser", "//components/content_settings/core/common", - "//components/private_verification_tokens/common:privacy_pass_athm_batch_request", - "//components/private_verification_tokens/common:private_verification_tokens_database", - "//components/private_verification_tokens/common:private_verification_tokens_issuer_config", - "//components/private_verification_tokens/common:private_verification_tokens_metrics", - "//components/private_verification_tokens/common:private_verification_tokens_parameters", "//components/private_verification_tokens/common:test_support", - "//components/private_verification_tokens/common/athm_ffi:athm_ffi_bindings", "//content/test:test_support", "//net", "//services/network:test_support", --- a/chrome/browser/profiles/BUILD.gn +++ b/chrome/browser/profiles/BUILD.gn @@ -809,7 +809,6 @@ source_set("profiles_extra_parts_impl") "//chrome/browser/privacy_sandbox:headers", "//chrome/browser/private_ai", "//chrome/browser/private_insights", - "//chrome/browser/private_verification_tokens", "//chrome/browser/push_messaging", "//chrome/browser/reading_list", "//chrome/browser/reduce_accept_language", --- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc +++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc @@ -1364,7 +1364,6 @@ void ChromeBrowserMainExtraPartsProfiles PrivacyMetricsServiceFactory::GetInstance(); PrivacySandboxServiceFactory::GetInstance(); PrivacySandboxSettingsFactory::GetInstance(); - PrivateVerificationTokensServiceFactory::GetInstance(); private_ai::PrivateAiServiceFactory::GetInstance(); ProfileNetworkContextServiceFactory::GetInstance(); ProfilePasswordStoreFactory::GetInstance(); --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn @@ -1867,8 +1867,6 @@ "//chrome/browser/privacy_sandbox:headers", "//chrome/browser/privacy_sandbox:test_support", "//chrome/browser/private_ai", - "//chrome/browser/private_verification_tokens", - "//chrome/browser/private_verification_tokens:browser_tests", "//chrome/browser/profile_resetter", "//chrome/browser/profile_resetter:browser_tests", "//chrome/browser/profiles", @@ -5396,7 +5395,6 @@ test("unit_tests") { "//chrome/browser/preloading/prerender:unit_tests", "//chrome/browser/privacy_sandbox:unit_tests", "//chrome/browser/private_ai:unit_tests", - "//chrome/browser/private_verification_tokens:unit_tests", "//chrome/browser/profiles", "//chrome/browser/profiles:misc", "//chrome/browser/profiles:profile_downloader", --- a/components/BUILD.gn +++ b/components/BUILD.gn @@ -314,7 +314,6 @@ test("components_unittests") { "//components/power_metrics:unit_tests", "//components/prefs:unit_tests", "//components/privacy_sandbox:unit_tests", - "//components/private_verification_tokens:unit_tests", "//components/profile_metrics:unit_tests", "//components/proto_extras:unit_tests", "//components/proxy_config:unit_tests", --- a/components/component_updater/installer_policies/BUILD.gn +++ b/components/component_updater/installer_policies/BUILD.gn @@ -38,7 +38,6 @@ static_library("installer_policies_no_co "//components/lookalikes/core:proto", "//components/lookalikes/core:safety_tips", "//components/prefs", - "//components/private_verification_tokens/common:private_verification_tokens_issuer_config", "//components/update_client", "//mojo/public/cpp/base:protobuf_support", "//services/network/public/cpp", @@ -106,8 +105,6 @@ source_set("unit_tests") { "//components/history_embeddings/core", "//components/optimization_guide/core", "//components/optimization_guide/proto:optimization_guide_proto", - "//components/private_verification_tokens/common:private_verification_tokens_issuer_config", - "//components/private_verification_tokens/common:test_support", "//mojo/public/cpp/base:protobuf_support", "//services/network/public/cpp", "//testing/gmock", --- chromium-156.0.8072.0/chrome/browser/devtools/BUILD.gn 2026/09/29 21:47:58 1.1 +++ chromium-156.0.8072.0/chrome/browser/devtools/BUILD.gn 2026/09/29 21:48:17 @@ -414,7 +414,6 @@ "//chrome/app:command_ids", "//chrome/browser/badging", "//chrome/browser/custom_handlers", - "//chrome/browser/private_verification_tokens", "//chrome/browser/ui:browser_window_header", "//chrome/browser/ui/media_router", "//chrome/browser/ui/startup", @@ -427,7 +426,6 @@ "//components/origin_gating/core", "//components/payments/content", "//components/privacy_sandbox/privacy_sandbox_attestations", - "//components/private_verification_tokens/common:private_verification_tokens_database", "//components/security_state/content", "//components/subresource_filter/content/browser", "//components/web_package", @@ -652,7 +650,6 @@ "//chrome/browser/prefs:util", "//chrome/browser/preloading:prefs", "//chrome/browser/preloading:test_support", - "//chrome/browser/private_verification_tokens", "//chrome/browser/search_engines", "//chrome/browser/sync/test/integration:sync_integration_test_support", "//chrome/browser/ui/autofill", @@ -663,7 +660,6 @@ "//components/infobars/content", "//components/javascript_dialogs", "//components/language/core/browser", - "//components/private_verification_tokens/common:private_verification_tokens_token", "//components/ukm:test_support", "//content/test:test_support", "//testing/gtest", --- chromium-156.0.8072.0/components/private_verification_tokens/common/BUILD.gn 2026/09/29 21:53:01 1.1 +++ chromium-156.0.8072.0/components/private_verification_tokens/common/BUILD.gn 2026/09/29 21:53:23 @@ -194,7 +194,6 @@ sources = [ "private_verification_tokens_test_util.h" ] public_deps = [ "//base", - "//components/private_verification_tokens/common/athm_ffi:athm_ffi_bindings", ] } @@ -209,7 +208,6 @@ public_deps = [ ":private_verification_tokens_issuer_config", "//base", - "//components/private_verification_tokens/common/athm_ffi:athm_ffi_bindings", ] } @@ -222,7 +220,6 @@ ":private_verification_tokens_parameters", ":private_verification_tokens_public_key", "//base", - "//components/private_verification_tokens/common/athm_ffi:athm_ffi_bindings", "//testing/gmock", "//testing/gtest", "//url", ++++++ chromium-156-blink_static_cast.patch ++++++ --- chromium-156.0.8078.4/third_party/blink/renderer/platform/fonts/shaping/shape_result_run.h 2026/10/03 22:19:39 1.1 +++ chromium-156.0.8078.4/third_party/blink/renderer/platform/fonts/shaping/shape_result_run.h 2026/10/03 22:20:16 @@ -548,7 +548,7 @@ return TryMakeCompactFrom(data_.size(), [this](unsigned i) { const HarfBuzzRunGlyphData& glyph = data_[i]; return CompactableGlyph{ - .glyph = glyph.glyph, + .glyph = static_cast<uint16_t>(glyph.glyph), .advance = glyph.advance, .character_index = glyph.character_index, .has_offset = false, ++++++ chromium-156-revert_ift_patcher.patch ++++++ diff -urN chromium-156.0.8063.3/third_party/blink/renderer/platform/fonts/web_font_decoder.cc chromium-155.0.8059.5/third_party/blink/renderer/platform/fonts/web_font_decoder.cc --- chromium-156.0.8063.3/third_party/blink/renderer/platform/fonts/web_font_decoder.cc 2026-09-17 22:14:02.000000000 +0200 +++ chromium-155.0.8059.5/third_party/blink/renderer/platform/fonts/web_font_decoder.cc 2026-09-16 02:15:15.000000000 +0200 @@ -33,27 +33,19 @@ #include <hb.h> #include <stdarg.h> -#include <string> - #include "base/compiler_specific.h" -#include "base/containers/span.h" -#include "base/numerics/byte_conversions.h" #include "base/numerics/safe_conversions.h" #include "build/build_config.h" #include "third_party/blink/public/platform/platform.h" #include "third_party/blink/renderer/platform/fonts/font_cache.h" -#include "third_party/blink/renderer/platform/fonts/ift/ift_patcher.h" #include "third_party/blink/renderer/platform/fonts/web_font_typeface_factory.h" #include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h" -#include "third_party/blink/renderer/platform/runtime_enabled_features.h" #include "third_party/blink/renderer/platform/wtf/shared_buffer.h" #include "third_party/blink/renderer/platform/wtf/text/format.h" #include "third_party/blink/renderer/platform/wtf/text/string_builder.h" #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" #include "third_party/ots/src/include/ots-memory-stream.h" #include "third_party/skia/include/core/SkStream.h" -#include "third_party/woff2/include/woff2/decode.h" -#include "third_party/woff2/include/woff2/output.h" namespace blink { @@ -65,11 +57,6 @@ const size_t kMaxDecompressedSizeMb = 128; #endif -constexpr size_t kMaxDecompressedSize = kMaxDecompressedSizeMb * 1024 * 1024; - -constexpr uint32_t kWoffTag = OTS_TAG('w', 'O', 'F', 'F'); -constexpr uint32_t kWoff2Tag = OTS_TAG('w', 'O', 'F', '2'); - class BlinkOTSContext final : public ots::OTSContext { DISALLOW_NEW(); @@ -189,94 +176,17 @@ } } -struct FontDecodeResult { - std::unique_ptr<IftPatcher> ift_patcher; -}; - -// Decompresses and sanitizes `font_data` into an output stream using -// `ots_context`, and initializes `ift_patcher` if `font_data` is an IFT-enabled -// font. Returns whether decoding succeeded. On failure, the error string can be -// retrieved from `ots_context`. -bool DecodeFontWithIft(BlinkOTSContext& ots_context, - base::span<const uint8_t> font_data, - ots::ExpandingMemoryStream* output, - std::unique_ptr<IftPatcher>& ift_patcher) { - TRACE_EVENT("blink", "DecodeFont"); - - uint32_t magic = 0; - if (font_data.size() >= 4) { - magic = base::U32FromBigEndian(font_data.first<4u>()); - } - - switch (magic) { - case kWoff2Tag: { - size_t decompressed_size = - woff2::ComputeWOFF2FinalSize(font_data.data(), font_data.size()); - if (decompressed_size == 0) { - ots_context.Message(0, "Size of decompressed WOFF 2.0 is set to 0"); - return false; - } - if (decompressed_size < font_data.size()) { - ots_context.Message( - 0, "Size of decompressed WOFF 2.0 is less than compressed size"); - return false; - } - if (decompressed_size > kMaxDecompressedSize) { - ots_context.Message(0, - "Size of decompressed WOFF 2.0 font exceeds %gMB", - kMaxDecompressedSize / (1024.0 * 1024.0)); - return false; - } - - std::string buf(decompressed_size, 0); - woff2::WOFF2StringOut out(&buf); - if (!woff2::ConvertWOFF2ToTTF(font_data.data(), font_data.size(), &out)) { - ots_context.Message(0, "Failed to convert WOFF 2.0 font to SFNT"); - return false; - } - - base::span<const uint8_t> decompressed_span = - base::as_byte_span(buf).first(out.Size()); - if (!ots_context.Process(output, decompressed_span.data(), - decompressed_span.size())) { - return false; - } - ift_patcher = IftPatcher::Create(decompressed_span); - break; - } - case kWoffTag: { - // The IFT (Incremental Font Transfer) specification recommends using - // WOFF2. OTS handles WOFF decompression directly, so we do not extract - // unsanitized font data or create an IftPatcher for the WOFF format. - if (!ots_context.Process(output, font_data.data(), font_data.size())) { - return false; - } - break; - } - default: { - if (!ots_context.Process(output, font_data.data(), font_data.size())) { - return false; - } - ift_patcher = IftPatcher::Create(font_data); - break; - } - } - - return true; -} - } // namespace -DecodedWebFont::DecodedWebFont() = default; -DecodedWebFont::DecodedWebFont(DecodedWebFont&&) noexcept = default; -DecodedWebFont& DecodedWebFont::operator=(DecodedWebFont&&) noexcept = default; -DecodedWebFont::~DecodedWebFont() = default; - -base::expected<DecodedWebFont, String> DecodeWebFont(SegmentedBuffer* buffer) { +base::expected<DecodedWebFont, String> DecodedWebFont::Create( + SegmentedBuffer* buffer) { if (!buffer) { return base::unexpected("Empty Buffer"); } + // This is the largest web font size which we'll try to transcode. + static const size_t kMaxDecompressedSize = + kMaxDecompressedSizeMb * 1024 * 1024; if (buffer->size() > kMaxDecompressedSize) { return base::unexpected( Format("Web font size more than {}MB", kMaxDecompressedSizeMb)); @@ -291,11 +201,7 @@ SegmentedBuffer::DeprecatedFlatData flattened_buffer(buffer); bool ok; - std::unique_ptr<IftPatcher> ift_patcher; - if (RuntimeEnabledFeatures::IncrementalFontTransferEnabled()) { - ok = DecodeFontWithIft(ots_context, base::as_byte_span(flattened_buffer), - output.get(), ift_patcher); - } else { + { TRACE_EVENT("blink", "DecodeFont"); ok = ots_context.Process( output.get(), reinterpret_cast<const uint8_t*>(flattened_buffer.data()), @@ -307,9 +213,9 @@ } const void* decoded_data = output->get(); - DecodedWebFont result; - result.ift_patcher = std::move(ift_patcher); - result.decoded_size = base::checked_cast<size_t>(output->Tell()); + DecodedWebFont result{ + .decoded_size = base::checked_cast<size_t>(output->Tell()), + }; sk_sp<SkData> sk_data = SkData::MakeWithProc( decoded_data, result.decoded_size, [](const void*, void* output) { diff -urN chromium-156.0.8063.3/third_party/blink/renderer/platform/fonts/web_font_decoder.h chromium-155.0.8059.5/third_party/blink/renderer/platform/fonts/web_font_decoder.h --- chromium-156.0.8063.3/third_party/blink/renderer/platform/fonts/web_font_decoder.h 2026-09-17 22:14:02.000000000 +0200 +++ chromium-155.0.8059.5/third_party/blink/renderer/platform/fonts/web_font_decoder.h 2026-09-16 02:15:15.000000000 +0200 @@ -31,8 +31,6 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_WEB_FONT_DECODER_H_ #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_WEB_FONT_DECODER_H_ -#include <memory> - #include "base/types/expected.h" #include "third_party/blink/renderer/platform/platform_export.h" #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" @@ -42,7 +40,6 @@ namespace blink { -class IftPatcher; class SegmentedBuffer; // Represents a font that has been successfully decoded and sanitized. @@ -56,32 +53,18 @@ // The size of the font after decoding and sanitizing. size_t decoded_size = 0; - // Used to discover and apply patches to fonts. `nullptr` if the font is not - // IFT-encoded or if Incremental Font Transfer is disabled. - std::unique_ptr<IftPatcher> ift_patcher; - - // Defined out of line so that `IftPatcher` only needs to be forward declared - // here. - DecodedWebFont(); - DecodedWebFont(DecodedWebFont&&) noexcept; - DecodedWebFont& operator=(DecodedWebFont&&) noexcept; - DecodedWebFont(const DecodedWebFont&) = delete; - DecodedWebFont& operator=(const DecodedWebFont&) = delete; - ~DecodedWebFont(); + // Decodes, decompresses, and sanitizes the raw font data from the provided + // `buffer` (which typically contains WOFF, WOFF2, or TTF data). + // + // Returns: + // - On success: A `DecodedWebFont` containing the successfully created + // font. + // - On failure: A `String` containing a descriptive error message (e.g., if + // the buffer is empty, the decompressed size exceeds limits, or OTS + // validation fails). + static base::expected<DecodedWebFont, String> Create(SegmentedBuffer*); }; -// Decodes, decompresses, and sanitizes the raw font data from the provided -// `buffer` (which typically contains WOFF, WOFF2, or TTF data). -// -// Returns: -// - On success: A `DecodedWebFont` containing the successfully created -// font. -// - On failure: A `String` containing a descriptive error message (e.g., if -// the buffer is empty, the decompressed size exceeds limits, or OTS -// validation fails). -PLATFORM_EXPORT base::expected<DecodedWebFont, String> DecodeWebFont( - SegmentedBuffer* buffer); - } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_WEB_FONT_DECODER_H_ diff -urN chromium-156.0.8063.3/third_party/blink/renderer/platform/fonts/web_font_decoder_test.cc chromium-155.0.8059.5/third_party/blink/renderer/platform/fonts/web_font_decoder_test.cc --- chromium-156.0.8063.3/third_party/blink/renderer/platform/fonts/web_font_decoder_test.cc 2026-09-17 22:14:02.000000000 +0200 +++ chromium-155.0.8059.5/third_party/blink/renderer/platform/fonts/web_font_decoder_test.cc 2026-09-16 02:15:15.000000000 +0200 @@ -8,8 +8,6 @@ #include <utility> #include "testing/gtest/include/gtest/gtest.h" -#include "third_party/blink/renderer/platform/fonts/ift/ift_patcher.h" -#include "third_party/blink/renderer/platform/testing/runtime_enabled_features_test_helpers.h" #include "third_party/blink/renderer/platform/testing/unit_test_helpers.h" #include "third_party/blink/renderer/platform/wtf/shared_buffer.h" #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" @@ -18,26 +16,18 @@ namespace blink { -namespace { - -scoped_refptr<SharedBuffer> LoadFont(const String& path) { - std::optional<Vector<char>> font_data = - test::ReadFromFile(test::PlatformTestDataPath(path)); - CHECK(font_data.has_value()); - return SharedBuffer::Create(std::move(*font_data)); -} - -} // namespace - // Regression test for a font that triggers a large number of OTS warnings // during decoding. Without a bound on the accumulated error string, processing // these warnings dominated decode time and made the OpenType math fuzzer time // out. Verify that the reported error string stays within the budget. TEST(WebFontDecoderTest, ErrorStringIsBoundedOnPathologicalFont) { - scoped_refptr<SharedBuffer> font_buffer = - LoadFont("open_type_math_support_fuzzer_timeout.ttf"); + std::optional<Vector<char>> font_data = test::ReadFromFile( + test::PlatformTestDataPath("open_type_math_support_fuzzer_timeout.ttf")); + ASSERT_TRUE(font_data); + + auto font_buffer = SharedBuffer::Create(std::move(*font_data)); base::expected<DecodedWebFont, String> decoded_result = - DecodeWebFont(font_buffer.get()); + DecodedWebFont::Create(font_buffer.get()); // Messages are accepted until the accumulated string reaches the ~4096 byte // budget, so the result may overshoot by at most one final message. The @@ -49,71 +39,10 @@ } TEST(WebFontDecoderTest, EmptyBufferIsError) { - scoped_refptr<SharedBuffer> font_buffer = SharedBuffer::Create(); + auto font_buffer = SharedBuffer::Create(); base::expected<DecodedWebFont, String> decoded_result = - DecodeWebFont(font_buffer.get()); + DecodedWebFont::Create(font_buffer.get()); ASSERT_FALSE(decoded_result.has_value()); } -TEST(WebFontDecoderTest, IftWoff2WithFeatureEnabledThenCreatesIftPatcher) { - ScopedIncrementalFontTransferForTest scoped_ift(true); - scoped_refptr<SharedBuffer> font_buffer = LoadFont("roboto-ift.woff2"); - base::expected<DecodedWebFont, String> decoded_result = - DecodeWebFont(font_buffer.get()); - - ASSERT_TRUE(decoded_result.has_value()); - EXPECT_NE(decoded_result->sk_typeface, nullptr); - EXPECT_NE(decoded_result->ift_patcher, nullptr); - EXPECT_GT(decoded_result->decoded_size, 0u); -} - -TEST(WebFontDecoderTest, IftTtfWithFeatureEnabledThenCreatesIftPatcher) { - ScopedIncrementalFontTransferForTest scoped_ift(true); - scoped_refptr<SharedBuffer> font_buffer = LoadFont("roboto-ift.ttf"); - base::expected<DecodedWebFont, String> decoded_result = - DecodeWebFont(font_buffer.get()); - - ASSERT_TRUE(decoded_result.has_value()); - EXPECT_NE(decoded_result->sk_typeface, nullptr); - EXPECT_NE(decoded_result->ift_patcher, nullptr); - EXPECT_GT(decoded_result->decoded_size, 0u); -} - -TEST(WebFontDecoderTest, IftFontWithFeatureDisabledThenIftPatcherIsNull) { - ScopedIncrementalFontTransferForTest scoped_ift(false); - scoped_refptr<SharedBuffer> font_buffer = LoadFont("roboto-ift.woff2"); - base::expected<DecodedWebFont, String> decoded_result = - DecodeWebFont(font_buffer.get()); - - ASSERT_TRUE(decoded_result.has_value()); - EXPECT_NE(decoded_result->sk_typeface, nullptr); - EXPECT_EQ(decoded_result->ift_patcher, nullptr); - EXPECT_GT(decoded_result->decoded_size, 0u); -} - -TEST(WebFontDecoderTest, NonIftFontWithFeatureEnabledThenIftPatcherIsNull) { - ScopedIncrementalFontTransferForTest scoped_ift(true); - scoped_refptr<SharedBuffer> font_buffer = - LoadFont("third_party/Roboto/roboto-regular.woff2"); - base::expected<DecodedWebFont, String> decoded_result = - DecodeWebFont(font_buffer.get()); - - ASSERT_TRUE(decoded_result.has_value()); - EXPECT_NE(decoded_result->sk_typeface, nullptr); - EXPECT_EQ(decoded_result->ift_patcher, nullptr); - EXPECT_GT(decoded_result->decoded_size, 0u); -} - -TEST(WebFontDecoderTest, WoffFontWithFeatureEnabledThenIftPatcherIsNull) { - ScopedIncrementalFontTransferForTest scoped_ift(true); - scoped_refptr<SharedBuffer> font_buffer = LoadFont("Ahem.woff"); - base::expected<DecodedWebFont, String> decoded_result = - DecodeWebFont(font_buffer.get()); - - ASSERT_TRUE(decoded_result.has_value()); - EXPECT_NE(decoded_result->sk_typeface, nullptr); - EXPECT_EQ(decoded_result->ift_patcher, nullptr); - EXPECT_GT(decoded_result->decoded_size, 0u); -} - } // namespace blink --- chromium-156.0.8063.3/third_party/blink/renderer/platform/fonts/font_custom_platform_data.cc 2026-09-17 22:14:02.000000000 +0200 +++ chromium-155.0.8059.5/third_party/blink/renderer/platform/fonts/font_custom_platform_data.cc 2026-09-16 02:15:15.000000000 +0200 @@ -328,7 +328,8 @@ SharedBuffer* buffer, String& ots_parse_message) { DCHECK(buffer); - base::expected<DecodedWebFont, String> decode_result = DecodeWebFont(buffer); + base::expected<DecodedWebFont, String> decode_result = + DecodedWebFont::Create(buffer); if (!decode_result.has_value()) { ots_parse_message = std::move(decode_result).error(); return nullptr; diff -urN chromium-156.0.8078.4.orig/third_party/blink/renderer/platform/BUILD.gn chromium-156.0.8078.4/third_party/blink/renderer/platform/BUILD.gn --- chromium-156.0.8078.4.orig/third_party/blink/renderer/platform/BUILD.gn 2026-09-30 01:57:21.000000000 +0200 +++ chromium-156.0.8078.4/third_party/blink/renderer/platform/BUILD.gn 2026-10-03 15:56:10.679294692 +0200 @@ -713,8 +725,6 @@ "fonts/generic_font_family_settings.cc", "fonts/generic_font_family_settings.h", "fonts/glyph_metrics_map.h", - "fonts/ift/ift_patcher.cc", - "fonts/ift/ift_patcher.h", "fonts/opentype/color_table_lookup.cc", "fonts/opentype/color_table_lookup.h", "fonts/opentype/font_format_check.cc", @@ -1845,7 +1845,6 @@ deps = [ ":font_format_check", ":rustfft_ffi", - "fonts:ift_patcher_bindings", "//base:base_static", "//base/allocator:buildflags", "//build:chromecast_buildflags", @@ -2245,7 +2253,6 @@ "fonts/font_test.cc", "fonts/font_test_utilities.cc", "fonts/generic_font_family_settings_test.cc", - "fonts/ift/ift_patcher_test.cc", "fonts/opentype/color_table_lookup_test.cc", "fonts/opentype/font_format_check_test.cc", "fonts/opentype/font_settings_test.cc", --- chromium-156.0.8078.4/third_party/blink/renderer/core/loader/resource/font_resource.h 2026-09-30 01:57:21.000000000 +0200 +++ chromium-155.0.8059.5/third_party/blink/renderer/core/loader/resource/font_resource.h 2026-09-16 02:15:15.000000000 +0200 @@ -47,7 +47,6 @@ class ResourceFetcher; class FontCustomPlatformData; class FontResourceClient; -class IftPatcher; // An observer that will be notified when original data is cleared // from the resource. Inspector may collect this data and store it for @@ -78,7 +77,6 @@ String OtsParsingMessage() const { return ots_parsing_message_; } const FontCustomPlatformData* GetCustomFontData(); - std::unique_ptr<IftPatcher> TakeIftPatcher(); // Returns true if the loading priority of the remote font resource can be // lowered. The loading priority of the font can be lowered only if the @@ -127,7 +125,6 @@ }; Member<FontCustomPlatformData> font_data_; - std::unique_ptr<IftPatcher> ift_patcher_; String ots_parsing_message_; LoadLimitState load_limit_state_; bool cors_failed_; --- chromium-156.0.8078.4/third_party/blink/renderer/core/loader/resource/font_resource.cc 2026-09-30 01:57:21.000000000 +0200 +++ chromium-155.0.8059.5/third_party/blink/renderer/core/loader/resource/font_resource.cc 2026-09-16 02:15:15.000000000 +0200 @@ -44,7 +44,6 @@ #include "third_party/blink/public/mojom/loader/request_context_frame_type.mojom-blink.h" #include "third_party/blink/renderer/platform/fonts/font_custom_platform_data.h" #include "third_party/blink/renderer/platform/fonts/font_platform_data.h" -#include "third_party/blink/renderer/platform/fonts/ift/ift_patcher.h" #include "third_party/blink/renderer/platform/fonts/web_font_decoder.h" #include "third_party/blink/renderer/platform/heap/cross_thread_handle.h" #include "third_party/blink/renderer/platform/loader/fetch/fetch_parameters.h" @@ -85,7 +84,8 @@ return base::unexpected(""); } auto decode_start_time = base::TimeTicks::Now(); - base::expected<DecodedWebFont, String> result = DecodeWebFont(buffer); + base::expected<DecodedWebFont, String> result = + DecodedWebFont::Create(buffer); base::UmaHistogramMicrosecondsTimes( "Blink.Fonts.BackgroundDecodeTime", base::TimeTicks::Now() - decode_start_time); @@ -316,22 +316,13 @@ font_data_ = FontCustomPlatformData::Create( std::move(background_decode_result_->sk_typeface), background_decode_result_->decoded_size); - ift_patcher_ = std::move(background_decode_result_->ift_patcher); } else { auto decode_start_time = base::TimeTicks::Now(); - base::expected<DecodedWebFont, String> decode_result = - DecodeWebFont(Data()); + font_data_ = + FontCustomPlatformData::Create(Data(), ots_parsing_message_); base::UmaHistogramMicrosecondsTimes( "Blink.Fonts.DecodeTime", base::TimeTicks::Now() - decode_start_time); - if (decode_result.has_value()) { - font_data_ = FontCustomPlatformData::Create( - std::move(decode_result->sk_typeface), - decode_result->decoded_size); - ift_patcher_ = std::move(decode_result->ift_patcher); - } else { - ots_parsing_message_ = std::move(decode_result).error(); - } } } else { ots_parsing_message_ = background_decode_result_.error(); @@ -340,7 +331,6 @@ if (!font_data_) { SetStatus(ResourceStatus::kDecodeError); - ift_patcher_.reset(); } else { // Call observers once and remove them. HeapHashSet<WeakMember<FontResourceClearDataObserver>> observers; @@ -353,10 +343,6 @@ return font_data_; } -std::unique_ptr<IftPatcher> FontResource::TakeIftPatcher() { - return std::move(ift_patcher_); -} - void FontResource::WillReloadAfterDiskCacheMiss() { DCHECK(IsLoading()); DCHECK(Loader()->IsCacheAwareLoadingActivated()); ++++++ chromium-156-verification-tokens.patch ++++++ --- chromium-156.0.8072.0/chrome/browser/devtools/protocol/devtools_protocol_browsertest.cc 2026/09/30 22:53:03 1.1 +++ chromium-156.0.8072.0/chrome/browser/devtools/protocol/devtools_protocol_browsertest.cc 2026/09/30 22:54:02 @@ -2432,51 +2432,6 @@ EXPECT_TRUE(first_token->FindDouble("creationTime").has_value()); } - // 3. Verify getPrivateVerificationTokensIssuerConfigs. - { - SendCommandSync("Storage.getPrivateVerificationTokensIssuerConfigs"); - ASSERT_TRUE(result()); - EXPECT_THAT(result()->FindList("configs"), - testing::Pointee(testing::IsEmpty())); - - base::DictValue custom_issuer; - custom_issuer.Set("issuerRequestUrl", "https://issuer.example.com/issue"); - custom_issuer.Set("version", 1); - custom_issuer.Set("publicKey", - base::Base64Encode(std::vector<uint8_t>{1, 2, 3, 4})); - custom_issuer.Set("publicKeyProof", - base::Base64Encode(std::vector<uint8_t>{5, 6, 7})); - custom_issuer.Set("batchSize", 7); - custom_issuer.Set("expiration", "2147483647"); - base::ListValue redeemers; - redeemers.Append("https://redeemer1.example.com"); - redeemers.Append("https://redeemer2.example.com"); - custom_issuer.Set("redeemers", std::move(redeemers)); - custom_issuer.Set("deploymentId", "test-deployment-id"); - - pvt_service_->SetIssuerConfig( - private_verification_tokens::PrivateVerificationTokensIssuerConfig:: - CreateWithCustomIssuer(/*base_config=*/nullptr, - std::move(custom_issuer))); - - SendCommandSync("Storage.getPrivateVerificationTokensIssuerConfigs"); - ASSERT_TRUE(result()); - const base::ListValue* configs_list = result()->FindList("configs"); - ASSERT_THAT(configs_list, testing::Pointee(testing::SizeIs(1))); - - const base::DictValue* first_config = configs_list->front().GetIfDict(); - ASSERT_TRUE(first_config); - EXPECT_THAT(first_config->FindString("issuerOrigin"), - testing::Pointee(testing::Eq(issuer_origin.Serialize()))); - const base::ListValue* redeemer_origins = - first_config->FindList("redeemerOrigins"); - ASSERT_TRUE(redeemer_origins); - EXPECT_EQ(*redeemer_origins, base::ListValue() - .Append("https://redeemer1.example.com") - .Append("https://redeemer2.example.com")); - } - - // 4. Delete one token by ID. { base::DictValue params; params.Set("tokenId", first_token_id); @@ -2491,7 +2446,7 @@ testing::Pointee(testing::SizeIs(2))); } - // 5. Clear all tokens for the issuer. + // 4. Clear all tokens for the issuer. { base::DictValue params; params.Set("issuerOrigin", issuer_origin.Serialize()); --- chromium-156.0.8078.4/chrome/browser/devtools/inspector_protocol_config.json 2026-09-30 01:57:21.000000000 +0200 +++ chromium-156.0.8078.4/chrome/browser/devtools/inspector_protocol_config.json 2026-10-05 16:40:55.428167014 +0200 @@ -49,9 +49,8 @@ }, { "domain": "Storage", - "include": ["runBounceTrackingMitigations", "getPrivateVerificationTokens", "getPrivateVerificationTokensIssuerConfigs", "clearPrivateVerificationTokens", "deletePrivateVerificationToken", "setPrivateVerificationTokensTracking"], - "include_events": ["privateVerificationTokensUpdated"], - "async": ["runBounceTrackingMitigations", "getPrivateVerificationTokens", "clearPrivateVerificationTokens", "deletePrivateVerificationToken"] + "include": ["runBounceTrackingMitigations"], + "async": ["runBounceTrackingMitigations"] }, { "domain": "SystemInfo", --- chromium-156.0.8072.0/components/private_verification_tokens/BUILD.gn 2026/09/29 21:51:11 1.1 +++ chromium-156.0.8072.0/components/private_verification_tokens/BUILD.gn 2026/09/29 21:52:42 @@ -22,7 +22,6 @@ if (enable_rust) { deps += [ "//components/private_verification_tokens/common:privacy_pass_athm_batch_request_unittest", - "//components/private_verification_tokens/common/athm_ffi:privacy_pass_unittests", ] } } --- chromium-156.0.8072.0/content/browser/devtools/protocol_config.json 2026/09/30 22:55:00 1.1 +++ chromium-156.0.8072.0/content/browser/devtools/protocol_config.json 2026/09/30 22:55:21 @@ -188,7 +188,7 @@ }, { "domain": "Storage", - "exclude": ["runBounceTrackingMitigations", "getPrivateVerificationTokens", "getPrivateVerificationTokensIssuerConfigs", "clearPrivateVerificationTokens", "deletePrivateVerificationToken", "setPrivateVerificationTokensTracking"], + "exclude": ["runBounceTrackingMitigations", "getPrivateVerificationTokens", "clearPrivateVerificationTokens", "deletePrivateVerificationToken", "setPrivateVerificationTokensTracking"], "async": ["getUsageAndQuota", "clearDataForOrigin", "clearDataForStorageKey", "getCookies", "setCookies", "clearCookies", "overrideQuotaForOrigin", "getTrustTokens", "clearTrustTokens", "getStorageBucketList"] }, { --- chromium-156.0.8072.0/third_party/blink/public/devtools_protocol/domains/Storage.pdl 2026/09/30 22:55:47 1.1 +++ chromium-156.0.8072.0/third_party/blink/public/devtools_protocol/domains/Storage.pdl 2026/09/30 22:56:50 @@ -58,14 +58,6 @@ # Base64-encoded serialized token. string token - # Configuration for a Private Verification Tokens issuer. - experimental type PrivateVerificationTokensIssuerConfig extends object - properties - # Origin of the token issuer. - string issuerOrigin - # Origins authorized to redeem tokens from this issuer. - array of string redeemerOrigins - type StorageBucketsDurability extends string @@ -242,12 +234,6 @@ returns array of PrivateVerificationToken tokens - # Returns the configured Private Verification Tokens issuers and their redeemer - # origins. - experimental command getPrivateVerificationTokensIssuerConfigs - returns - array of PrivateVerificationTokensIssuerConfig configs - # Removes all Private Verification Tokens issued by the provided issuerOrigin. experimental command clearPrivateVerificationTokens parameters --- chromium-156.0.8072.0/chrome/browser/devtools/protocol/storage_handler.h 2026-09-24 05:05:03.000000000 +0200 +++ chromium-156.0.8063.3/chrome/browser/devtools/protocol/storage_handler.h 2026-09-17 22:14:02.000000000 +0200 @@ -5,22 +5,15 @@ #ifndef CHROME_BROWSER_DEVTOOLS_PROTOCOL_STORAGE_HANDLER_H_ #define CHROME_BROWSER_DEVTOOLS_PROTOCOL_STORAGE_HANDLER_H_ -#include <memory> -#include <string> -#include <vector> - #include "base/memory/weak_ptr.h" -#include "base/scoped_observation.h" #include "chrome/browser/devtools/protocol/protocol.h" #include "chrome/browser/devtools/protocol/storage.h" -#include "chrome/browser/private_verification_tokens/private_verification_tokens_service.h" namespace content { class WebContents; } // namespace content -class StorageHandler : public protocol::Storage::Backend, - public PrivateVerificationTokensService::Observer { +class StorageHandler : public protocol::Storage::Backend { public: StorageHandler(content::WebContents* web_contents, protocol::UberDispatcher* dispatcher); @@ -31,41 +24,19 @@ ~StorageHandler() override; private: - protocol::Response Disable() override; - void RunBounceTrackingMitigations( std::unique_ptr<RunBounceTrackingMitigationsCallback> callback) override; - void GetPrivateVerificationTokens( - std::unique_ptr<GetPrivateVerificationTokensCallback> callback) override; - protocol::Response GetPrivateVerificationTokensIssuerConfigs( - std::unique_ptr<protocol::Array< - protocol::Storage::PrivateVerificationTokensIssuerConfig>>* - out_configs) override; - void ClearPrivateVerificationTokens( - const std::string& in_issuerOrigin, - std::unique_ptr<ClearPrivateVerificationTokensCallback> callback) - override; - void DeletePrivateVerificationToken( - const std::string& in_tokenId, - std::unique_ptr<DeletePrivateVerificationTokenCallback> callback) - override; - protocol::Response SetPrivateVerificationTokensTracking(bool enable) override; - - // PrivateVerificationTokensService::Observer: - void OnTokensStored() override; - void OnTokensDeleted() override; - void OnShutdown() override; + + + + static void GotDeletedSites( std::unique_ptr<RunBounceTrackingMitigationsCallback> callback, const std::vector<std::string>& sites); base::WeakPtr<content::WebContents> web_contents_; - std::unique_ptr<protocol::Storage::Frontend> frontend_; - base::ScopedObservation<PrivateVerificationTokensService, - PrivateVerificationTokensService::Observer> - pvt_observation_{this}; }; #endif // CHROME_BROWSER_DEVTOOLS_PROTOCOL_STORAGE_HANDLER_H_ --- chromium-156.0.8078.4/chrome/browser/devtools/protocol/storage_handler.cc.orig 2026-10-07 01:01:25.947108466 +0200 +++ chromium-156.0.8078.4/chrome/browser/devtools/protocol/storage_handler.cc 2026-10-07 01:05:02.208186004 +0200 @@ -7,56 +7,26 @@ #include <memory> #include <string> #include <utility> -#include <vector> -#include "base/base64.h" #include "base/check.h" -#include "base/strings/string_number_conversions.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/devtools/protocol/protocol.h" #include "chrome/browser/devtools/protocol/storage.h" -#include "chrome/browser/private_verification_tokens/private_verification_tokens_service.h" -#include "chrome/browser/private_verification_tokens/private_verification_tokens_service_factory.h" -#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/first_party_sets/first_party_sets_policy_service.h" +#include "chrome/browser/first_party_sets/first_party_sets_policy_service_factory.h" #include "chrome/browser/profiles/profile_manager.h" -#include "components/private_verification_tokens/common/private_verification_tokens_database.h" #include "content/public/browser/btm_service.h" #include "content/public/browser/web_contents.h" -#include "url/gurl.h" -#include "url/origin.h" - -namespace { - -PrivateVerificationTokensService* GetPrivateVerificationTokensService( - content::WebContents* web_contents) { - if (!web_contents) { - return nullptr; - } - Profile* profile = - Profile::FromBrowserContext(web_contents->GetBrowserContext()); - if (!profile) { - return nullptr; - } - return PrivateVerificationTokensServiceFactory::GetForProfile(profile); -} - -} // namespace +#include "net/first_party_sets/first_party_set_entry.h" StorageHandler::StorageHandler(content::WebContents* web_contents, protocol::UberDispatcher* dispatcher) : web_contents_(web_contents->GetWeakPtr()) { - frontend_ = - std::make_unique<protocol::Storage::Frontend>(dispatcher->channel()); protocol::Storage::Dispatcher::wire(dispatcher, this); } StorageHandler::~StorageHandler() = default; -protocol::Response StorageHandler::Disable() { - pvt_observation_.Reset(); - return protocol::Response::FallThrough(); -} - // TODO: crbug.com/380896828 - move CDP support for BTM to //content. void StorageHandler::RunBounceTrackingMitigations( std::unique_ptr<RunBounceTrackingMitigationsCallback> callback) { @@ -82,152 +52,3 @@ std::make_unique<protocol::Array<protocol::String>>(sites); callback->sendSuccess(std::move(deleted_sites)); } - -void StorageHandler::GetPrivateVerificationTokens( - std::unique_ptr<GetPrivateVerificationTokensCallback> callback) { - PrivateVerificationTokensService* pvt_service = - GetPrivateVerificationTokensService(web_contents_.get()); - if (!pvt_service) { - callback->sendFailure(protocol::Response::ServerError( - "Private Verification Tokens service is not available")); - return; - } - - pvt_service->GetAllTokens(base::BindOnce( - [](std::unique_ptr<GetPrivateVerificationTokensCallback> callback, - std::vector<private_verification_tokens::TokenWithId> tokens) { - auto result = std::make_unique< - protocol::Array<protocol::Storage::PrivateVerificationToken>>(); - for (const auto& item : tokens) { - result->push_back( - protocol::Storage::PrivateVerificationToken::Create() - .SetId(base::NumberToString(item.id)) - .SetIssuerOrigin(item.token.issuer().Serialize()) - .SetKeyId(static_cast<int>(item.token.key_id())) - .SetExpiration( - item.token.expiration().InSecondsFSinceUnixEpoch()) - .SetCreationTime( - item.token.creation_time().InSecondsFSinceUnixEpoch()) - .SetVersion(static_cast<int>(item.token.version())) - .SetToken(base::Base64Encode(item.token.token())) - .Build()); - } - callback->sendSuccess(std::move(result)); - }, - std::move(callback))); -} - -protocol::Response StorageHandler::GetPrivateVerificationTokensIssuerConfigs( - std::unique_ptr<protocol::Array< - protocol::Storage::PrivateVerificationTokensIssuerConfig>>* - out_configs) { - PrivateVerificationTokensService* pvt_service = - GetPrivateVerificationTokensService(web_contents_.get()); - if (!pvt_service) { - return protocol::Response::ServerError( - "Private Verification Tokens service is not available"); - } - - auto configs = std::make_unique<protocol::Array< - protocol::Storage::PrivateVerificationTokensIssuerConfig>>(); - scoped_refptr< - const private_verification_tokens::PrivateVerificationTokensIssuerConfig> - issuer_config = pvt_service->issuer_config(); - if (issuer_config) { - for (const auto& [issuer_origin, config] : issuer_config->config()) { - auto redeemer_origins = - std::make_unique<protocol::Array<protocol::String>>(); - for (const url::Origin& redeemer : config.redeemers) { - redeemer_origins->push_back(redeemer.Serialize()); - } - configs->push_back( - protocol::Storage::PrivateVerificationTokensIssuerConfig::Create() - .SetIssuerOrigin(issuer_origin.Serialize()) - .SetRedeemerOrigins(std::move(redeemer_origins)) - .Build()); - } - } - - *out_configs = std::move(configs); - return protocol::Response::Success(); -} - -void StorageHandler::ClearPrivateVerificationTokens( - const std::string& in_issuerOrigin, - std::unique_ptr<ClearPrivateVerificationTokensCallback> callback) { - PrivateVerificationTokensService* pvt_service = - GetPrivateVerificationTokensService(web_contents_.get()); - if (!pvt_service) { - callback->sendFailure(protocol::Response::ServerError( - "Private Verification Tokens service is not available")); - return; - } - - url::Origin issuer_origin = url::Origin::Create(GURL(in_issuerOrigin)); - if (issuer_origin.opaque()) { - callback->sendFailure( - protocol::Response::InvalidParams("Invalid issuer origin")); - return; - } - - pvt_service->DeleteTokens( - base::Time::Min(), base::Time::Max(), - base::BindOnce(&ClearPrivateVerificationTokensCallback::sendSuccess, - std::move(callback)), - std::vector<url::Origin>{issuer_origin}); -} - -void StorageHandler::DeletePrivateVerificationToken( - const std::string& in_tokenId, - std::unique_ptr<DeletePrivateVerificationTokenCallback> callback) { - PrivateVerificationTokensService* pvt_service = - GetPrivateVerificationTokensService(web_contents_.get()); - if (!pvt_service) { - callback->sendFailure(protocol::Response::ServerError( - "Private Verification Tokens service is not available")); - return; - } - - int64_t token_id = 0; - if (!base::StringToInt64(in_tokenId, &token_id)) { - callback->sendFailure( - protocol::Response::InvalidParams("Invalid token ID")); - return; - } - - pvt_service->DeleteToken( - token_id, - base::BindOnce(&DeletePrivateVerificationTokenCallback::sendSuccess, - std::move(callback))); -} - -protocol::Response StorageHandler::SetPrivateVerificationTokensTracking( - bool enable) { - PrivateVerificationTokensService* pvt_service = - GetPrivateVerificationTokensService(web_contents_.get()); - if (!pvt_service) { - return protocol::Response::ServerError( - "Private Verification Tokens service is not available"); - } - - if (enable) { - if (!pvt_observation_.IsObserving()) { - pvt_observation_.Observe(pvt_service); - } - } else { - pvt_observation_.Reset(); - } - return protocol::Response::Success(); -} - -void StorageHandler::OnTokensStored() { - frontend_->PrivateVerificationTokensUpdated(); -} - -void StorageHandler::OnTokensDeleted() { - frontend_->PrivateVerificationTokensUpdated(); -} - -void StorageHandler::OnShutdown() { - pvt_observation_.Reset(); -} --- chromium-156.0.8078.4.orig/chrome/browser/devtools/protocol/DEPS 2026-09-30 01:57:21.000000000 +0200 +++ chromium-156.0.8078.4/chrome/browser/devtools/protocol/DEPS 2026-10-05 16:41:51.445510531 +0200 @@ -15,10 +15,4 @@ "devtools_iwa_browsertest\\.cc": [ "+components/web_package/signed_web_bundles" ], - "storage_handler\\.cc": [ - "+components/private_verification_tokens/common", - ], - "devtools_protocol_browsertest\\.cc": [ - "+components/private_verification_tokens/common", - ], } ++++++ chromium-155.0.8059.84-linux.tar.xz -> chromium-156.0.8078.47-linux.tar.xz ++++++ /work/SRC/openSUSE:Factory/chromium/chromium-155.0.8059.84-linux.tar.xz /work/SRC/openSUSE:Factory/.chromium.new.2252680/chromium-156.0.8078.47-linux.tar.xz differ: char 15, line 1 ++++++ chromium-162dc276a85b4f7d353adbe312d05d8e7a4c28e3.patch ++++++ commit 162dc276a85b4f7d353adbe312d05d8e7a4c28e3 Author: Christopher Cameron <[email protected]> Date: Tue Sep 22 11:33:45 2026 -0700 media: Support IT35 metadata tracks in FFmpegDemuxer Add the kFFmpegDemuxerIT35MetadataTrack feature flag to control this behavior (disabled by default), and add unit tests for MP4 files with cdsc and rndr track references. Add a structure MetadataTrackEntry for each metadata track (created using the static function BuildMetadataTracks). When metadata samples arrive, route them using CacheMetadataPacket. In FFmpegDemuxerStream::SatisfyPendingRead, before passing the DecoderBuffers on, first ensure that their metadata has been attached using the function PrepareFrontBufferForRead, which calls back into the demuxer to attach the metadata. This will not submit buffers until they are ready or until we have already read too far (2 seconds) ahead without finding the metadata. Leave handling of seeking for a future patch (as a TODO). Bug: 480162031 Change-Id: I5c4c1e43745b7bcd91373101fa446f60389d781d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8277328 Reviewed-by: Dale Curtis <[email protected]> Commit-Queue: ccameron chromium <[email protected]> Cr-Commit-Position: refs/heads/main@{#1702809} diff --git a/media/base/decoder_buffer.cc b/media/base/decoder_buffer.cc index fdbd940e6f472..896ee45a29281 100644 --- a/media/base/decoder_buffer.cc +++ b/media/base/decoder_buffer.cc @@ -288,7 +288,9 @@ size_t DecoderBuffer::GetMemoryUsage() const { memory_usage += size(); - // Side data and decrypt config would not change after construction. + // Side data may be added after construction (e.g, timed metadata attached by + // FFmpegDemuxer), so only fields that do not change are counted here. Callers + // that cache this value rely on it. if (side_data()) { memory_usage += sizeof(decltype(side_data_->spatial_layers)::value_type) * side_data_->spatial_layers.capacity(); diff --git a/media/base/decoder_buffer_queue.cc b/media/base/decoder_buffer_queue.cc index b761c53280f6f..c171c1b43f0ca 100644 --- a/media/base/decoder_buffer_queue.cc +++ b/media/base/decoder_buffer_queue.cc @@ -45,6 +45,11 @@ void DecoderBufferQueue::Push(scoped_refptr<DecoderBuffer> buffer) { in_order_queue_.emplace_back(std::move(buffer)); } +DecoderBuffer& DecoderBufferQueue::Front() { + DCHECK(!queue_.empty()); + return *queue_.front(); +} + scoped_refptr<DecoderBuffer> DecoderBufferQueue::Pop() { scoped_refptr<DecoderBuffer> buffer = std::move(queue_.front()); queue_.pop_front(); diff --git a/media/base/decoder_buffer_queue.h b/media/base/decoder_buffer_queue.h index 3804d23f33e76..203f5b29278d3 100644 --- a/media/base/decoder_buffer_queue.h +++ b/media/base/decoder_buffer_queue.h @@ -38,6 +38,12 @@ class MEDIA_EXPORT DecoderBufferQueue { // It is invalid to push an end-of-stream |buffer|. void Push(scoped_refptr<DecoderBuffer> buffer); + // Returns the buffer at the front of the queue, which may be modified in + // place by the caller. + // + // It is invalid to call Front() on an empty queue. + DecoderBuffer& Front(); + // Pops a DecoderBuffer from the front of the queue. // // It is invalid to call Pop() on an empty queue. diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc index 0da6def76bdc0..6aa56f08ef635 100644 --- a/media/base/media_switches.cc +++ b/media/base/media_switches.cc @@ -599,6 +599,11 @@ BASE_FEATURE(kFallbackAfterDecodeError, base::FEATURE_ENABLED_BY_DEFAULT); BASE_FEATURE(kFeatureManagementLiveTranslateCrOS, base::FEATURE_DISABLED_BY_DEFAULT); +// Controls whether FFmpegDemuxer attaches the HDR metadata carried by ITU-T +// T.35 timed metadata tracks to the video tracks that reference them. +BASE_FEATURE(kFFmpegDemuxerIT35MetadataTrack, + base::FEATURE_DISABLED_BY_DEFAULT); + // Forces software video encoders to be used for low resolutions. // Enabled-by-default, except for Android where SW encoder for H26x and AV1 are // (sometimes) not available. diff --git a/media/base/media_switches.h b/media/base/media_switches.h index c2199009921db..e4ffc508fd0a9 100644 --- a/media/base/media_switches.h +++ b/media/base/media_switches.h @@ -195,6 +195,7 @@ MEDIA_EXPORT extern const base::FeatureParam<std::string> MEDIA_EXPORT BASE_DECLARE_FEATURE(kFailUrlProvisionFetcherForTesting); MEDIA_EXPORT BASE_DECLARE_FEATURE(kFallbackAfterDecodeError); MEDIA_EXPORT BASE_DECLARE_FEATURE(kFeatureManagementLiveTranslateCrOS); +MEDIA_EXPORT BASE_DECLARE_FEATURE(kFFmpegDemuxerIT35MetadataTrack); MEDIA_EXPORT BASE_DECLARE_FEATURE(kForceSoftwareForRtcLowResolutions); MEDIA_EXPORT BASE_DECLARE_FEATURE(kGetDisplayMediaConfersActivation); MEDIA_EXPORT BASE_DECLARE_FEATURE(kGlobalMediaControlsAutoDismiss); diff --git a/media/ffmpeg/ffmpeg_common.h b/media/ffmpeg/ffmpeg_common.h index f731b4d2fd21e..c8760c378efcc 100644 --- a/media/ffmpeg/ffmpeg_common.h +++ b/media/ffmpeg/ffmpeg_common.h @@ -101,6 +101,30 @@ inline base::span<AVStream*> AVFormatContextToSpan( base::checked_cast<size_t>(codec_context->nb_streams))); } +inline base::span<AVStreamGroup*> AVFormatContextStreamGroupsToSpan( + const AVFormatContext* format_context) { + // SAFETY: + // https://ffmpeg.org/doxygen/trunk/structAVFormatContext.html#ac2a7709bc15daf6165f68a5a88648aaa + // ffmpeg documentation: `nb_stream_groups` is the number of elements in + // `AVFormatContext.stream_groups`. + return UNSAFE_BUFFERS( + base::span(format_context->stream_groups, + base::checked_cast<size_t>(format_context->nb_stream_groups))); +} + +// Returns the streams that make up `stream_group`, which are a subset of the +// streams of the `AVFormatContext` that the group belongs to. +inline base::span<AVStream*> AVStreamGroupToSpan( + const AVStreamGroup* stream_group) { + // SAFETY: + // https://ffmpeg.org/doxygen/trunk/structAVStreamGroup.html#a75c06164e99a41e514dcb5c222b2bdaa + // ffmpeg documentation: `nb_streams` is the number of elements in + // `AVStreamGroup.streams`. + return UNSAFE_BUFFERS( + base::span(stream_group->streams, + base::checked_cast<size_t>(stream_group->nb_streams))); +} + inline base::span<uint8_t> AVCodecContextExtraDataToSpan( const AVCodecContext* codec_context) { // SAFETY: diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc index b82ff7e55087f..f9e132f98b0f6 100644 --- a/media/filters/ffmpeg_demuxer.cc +++ b/media/filters/ffmpeg_demuxer.cc @@ -623,6 +623,13 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) { SatisfyPendingRead(); } +void FFmpegDemuxerStream::OnMetadataAvailable() { + DCHECK(task_runner_->RunsTasksInCurrentSequence()); + + // Buffers that were waiting on metadata might now be ready to be emitted. + SatisfyPendingRead(); +} + void FFmpegDemuxerStream::SetEndOfStream() { DCHECK(task_runner_->RunsTasksInCurrentSequence()); end_of_stream_ = true; @@ -649,6 +656,10 @@ void FFmpegDemuxerStream::FlushBuffers(bool preserve_packet_position) { last_packet_timestamp_ = kNoTimestamp; last_packet_duration_ = kNoTimestamp; aborted_ = false; + + // The demuxer's timed metadata is deliberately not reset. Seeking does not + // re-demux the metadata samples that were skipped over, so the only metadata + // available after seeking backwards is what was cached before. } void FFmpegDemuxerStream::Abort() { @@ -821,14 +832,12 @@ Ranges<base::TimeDelta> FFmpegDemuxerStream::GetBufferedRanges() const { void FFmpegDemuxerStream::SatisfyPendingRead() { DCHECK(task_runner_->RunsTasksInCurrentSequence()); if (read_cb_) { - if (!buffer_queue_.IsEmpty()) { - DemuxerStream::DecoderBufferVector output_buffers; - - for (size_t i = 0; - i < std::min(requested_buffer_count_, buffer_queue_.queue_size()); - ++i) { - output_buffers.emplace_back(buffer_queue_.Pop()); - } + DemuxerStream::DecoderBufferVector output_buffers; + while (output_buffers.size() < requested_buffer_count_ && + PrepareFrontBufferForRead()) { + output_buffers.emplace_back(buffer_queue_.Pop()); + } + if (!output_buffers.empty()) { DVLOG(3) << __func__ << " Status:kOk, return output_buffers.size = " << output_buffers.size(); std::move(read_cb_).Run(DemuxerStream::kOk, std::move(output_buffers)); @@ -843,6 +852,30 @@ void FFmpegDemuxerStream::SatisfyPendingRead() { } } +bool FFmpegDemuxerStream::PrepareFrontBufferForRead() { + if (buffer_queue_.IsEmpty()) { + return false; + } + // This may re-attach the same metadata multiple times (which is okay). + if (demuxer_->TryAttachMetadata(buffer_queue_.Front(), stream_->index)) { + return true; + } + // Metadata that applies to this buffer has not been demuxed yet. Keep the + // buffer queued until it has been, unless there is no capacity to buffer + // more, or the stream has ended and there will be no more metadata. + if (!end_of_stream_ && HasAvailableCapacity()) { + return false; + } + // The buffer is emitted with incomplete metadata, and so may be rendered + // incorrectly. + LIMITED_MEDIA_LOG(WARNING, media_log_, num_missing_metadata_warnings_, 5) + << "Timed metadata for the buffer at " + << buffer_queue_.Front().timestamp() << " " + << (end_of_stream_ ? "was never demuxed" : "has not been demuxed yet") + << "; emitting the buffer without it."; + return true; +} + bool FFmpegDemuxerStream::HasAvailableCapacity() { // Try to have two second's worth of encoded data per stream. const base::TimeDelta kCapacity = base::Seconds(2); @@ -1107,12 +1140,16 @@ void FFmpegDemuxer::SeekInternal(base::TimeDelta time, DCHECK(demux_stream); const AVStream* seeking_stream = demux_stream->av_stream(); DCHECK(seeking_stream); + const int64_t seek_timestamp = + ConvertToTimeBase(demux_stream->stream_time_base(), seek_time); + // TODO(https://crbug.com/480162031): Seeking to `seek_timestamp` in + // `seeking_stream` may skip over the corresponding metadata samples. Collect + // these samples and cache them before seeking. blocking_task_runner_->PostTaskAndReplyWithResult( FROM_HERE, - base::BindOnce( - &AVSeekFrame, glue_->format_context(), seeking_stream->index, - ConvertToTimeBase(demux_stream->stream_time_base(), seek_time)), + base::BindOnce(&AVSeekFrame, glue_->format_context(), + seeking_stream->index, seek_timestamp), std::move(seek_cb)); } @@ -1258,6 +1295,45 @@ void FFmpegDemuxer::OnOpenContextDone(bool result) { weak_factory_.GetWeakPtr())); } +// static +FFmpegDemuxer::MetadataTrackMap FFmpegDemuxer::BuildMetadataTracks( + const AVFormatContext* format_context) { + MetadataTrackMap result; + if (!base::FeatureList::IsEnabled(kFFmpegDemuxerIT35MetadataTrack)) { + return result; + } + + for (const AVStreamGroup* stream_group : + AVFormatContextStreamGroupsToSpan(format_context)) { + if (stream_group->type != AV_STREAM_GROUP_PARAMS_TREF) { + continue; + } + auto streams = AVStreamGroupToSpan(stream_group); + const AVStream* metadata_stream = + streams[stream_group->params.tref->metadata_index]; + // Map only IT35 metadata tracks. + if (metadata_stream->codecpar->codec_id != AV_CODEC_ID_ITUT_T35) { + continue; + } + // Only AGTM metadata tracks are supported. + if (!MatchesAgtmT35( + AVCodecParametersExtraDataToSpan(metadata_stream->codecpar))) { + continue; + } + MetadataTrackEntry& entry = result[metadata_stream->index]; + entry.track = std::make_unique<MetadataTrack>( + MetadataTrack::IT35PrefixType::kSmpteSt2094App5); + for (const AVStream* stream : streams) { + if (stream == metadata_stream || + stream->codecpar->codec_type != AVMEDIA_TYPE_VIDEO) { + continue; + } + entry.render_stream_indices.insert(stream->index); + } + } + return result; +} + void FFmpegDemuxer::OnFindStreamInfoDone(int result) { DCHECK(task_runner_->RunsTasksInCurrentSequence()); if (stopped_ || !data_source_) { @@ -1315,6 +1391,9 @@ void FFmpegDemuxer::OnFindStreamInfoDone(int result) { << ": no tracks are enabled, track enabled flag will be ignored"; } + // Create MetadataTrackEntrys for each metadata track that we support. + metadata_tracks_ = BuildMetadataTracks(format_context); + // Create an FFmpegDemuxerStreams for each enabled audio/video stream. base::TimeDelta max_duration; int supported_audio_track_count = 0; @@ -1369,6 +1448,11 @@ void FFmpegDemuxer::OnFindStreamInfoDone(int result) { } else if (codec_type == AVMEDIA_TYPE_SUBTITLE) { stream->discard = AVDISCARD_ALL; continue; + } else if (codec_id == AV_CODEC_ID_ITUT_T35) { + if (!metadata_tracks_.contains(stream->index)) { + stream->discard = AVDISCARD_ALL; + } + continue; } else { stream->discard = AVDISCARD_ALL; continue; @@ -1780,6 +1864,59 @@ void FFmpegDemuxer::ReadFrameIfNeeded() { weak_factory_.GetWeakPtr(), std::move(packet))); } +bool FFmpegDemuxer::TryAttachMetadata(DecoderBuffer& buffer, + int render_stream_index) { + DCHECK(task_runner_->RunsTasksInCurrentSequence()); + + bool all_attached = true; + for (const auto& [metadata_stream_index, entry] : metadata_tracks_) { + if (entry.render_stream_indices.contains(render_stream_index)) { + // This may re-attach the same metadata multiple times (which is okay). + all_attached &= entry.track->TryAttachMetadata(buffer); + } + } + return all_attached; +} + +bool FFmpegDemuxer::CacheMetadataPacket(const AVPacket& packet) { + DCHECK(task_runner_->RunsTasksInCurrentSequence()); + + const auto metadata_tracks_it = metadata_tracks_.find(packet.stream_index); + if (metadata_tracks_it == metadata_tracks_.end()) { + return false; + } + + // Create a DecoderBuffer for the packet. + const AVStream* packet_stream = + AVFormatContextToSpan(glue_->format_context())[packet.stream_index]; + auto buffer = DecoderBuffer::CopyFrom(AVPacketData(packet)); + buffer->set_timestamp( + ConvertStreamTimestamp(packet_stream->time_base, packet.pts)); + buffer->set_duration( + ConvertStreamTimestamp(packet_stream->time_base, packet.duration)); + + // Cache the metadata buffer. + metadata_tracks_it->second.track->InsertMetadataBuffer(*buffer); + return true; +} + +void FFmpegDemuxer::NotifyMetadataAvailable(int metadata_stream_index) { + DCHECK(task_runner_->RunsTasksInCurrentSequence()); + + const auto metadata_tracks_it = metadata_tracks_.find(metadata_stream_index); + CHECK(metadata_tracks_it != metadata_tracks_.end()); + + // Notify referenced streams that the metadata is ready, so they can submit + // any now-read buffers. Only enabled streams can have a pending read. + for (int render_stream_index : + metadata_tracks_it->second.render_stream_indices) { + auto& render_stream = streams_[render_stream_index]; + if (render_stream && render_stream->IsEnabled()) { + render_stream->OnMetadataAvailable(); + } + } +} + void FFmpegDemuxer::OnReadFrameDone(ScopedAVPacket packet, int result) { DCHECK(task_runner_->RunsTasksInCurrentSequence()); DCHECK(pending_read_); @@ -1844,6 +1981,8 @@ void FFmpegDemuxer::OnReadFrameDone(ScopedAVPacket packet, int result) { host_->SetDuration(duration_); } } + } else if (CacheMetadataPacket(*packet)) { + NotifyMetadataAvailable(packet->stream_index); } } diff --git a/media/filters/ffmpeg_demuxer.h b/media/filters/ffmpeg_demuxer.h index d4bf0bdbf9274..f2586f54de7f7 100644 --- a/media/filters/ffmpeg_demuxer.h +++ b/media/filters/ffmpeg_demuxer.h @@ -31,6 +31,7 @@ #include <vector> #include "base/containers/flat_map.h" +#include "base/containers/flat_set.h" #include "base/functional/callback.h" #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" @@ -40,6 +41,7 @@ #include "media/base/decoder_buffer_queue.h" #include "media/base/demuxer.h" #include "media/base/media_log.h" +#include "media/base/metadata_track.h" #include "media/base/pipeline_status.h" #include "media/base/timestamp_constants.h" #include "media/base/video_decoder_config.h" @@ -80,6 +82,10 @@ class MEDIA_EXPORT FFmpegDemuxerStream : public DemuxerStream { // SetEndOfStream() has been called. void EnqueuePacket(ScopedAVPacket packet); + // Called when new metadata has been added to one of the timed metadata + // tracks feeding this stream. Emits any buffers that were waiting for it. + void OnMetadataAvailable(); + // Enters the end of stream state. After delivering remaining queued buffers // only end of stream buffers will be delivered. void SetEndOfStream(); @@ -147,6 +153,11 @@ class MEDIA_EXPORT FFmpegDemuxerStream : public DemuxerStream { // NotifyCapacityAvailable() if capacity is still available. void SatisfyPendingRead(); + // Returns true if the buffer at the front of `buffer_queue_` may be emitted. + // (either has all timed metadata attached, or the stream is out of space or + // has ended). + bool PrepareFrontBufferForRead(); + // Resets any currently active bitstream converter. void ResetBitstreamConverter(); @@ -184,6 +195,7 @@ class MEDIA_EXPORT FFmpegDemuxerStream : public DemuxerStream { bool fixup_chained_ogg_ = false; int num_discarded_packet_warnings_ = 0; + int num_missing_metadata_warnings_ = 0; int64_t last_packet_pos_; int64_t last_packet_dts_; // Requested buffer count. The actual returned buffer count could be less @@ -232,6 +244,11 @@ class MEDIA_EXPORT FFmpegDemuxer : public Demuxer { void NotifyCapacityAvailable(); void NotifyBufferingChanged(); + // Attaches to `buffer` the metadata that applies to it from every timed + // metadata track that references it. Returns false if any of that metadata + // has not been demuxed yet. + bool TryAttachMetadata(DecoderBuffer& buffer, int render_stream_index); + // Allow FFmpegDemxuerStream to notify us about an error. void NotifyDemuxerError(PipelineStatus error); @@ -258,6 +275,19 @@ class MEDIA_EXPORT FFmpegDemuxer : public Demuxer { // To allow tests access to privates. friend class FFmpegDemuxerTest; + // A timed metadata track, and the indices of the render streams that its + // metadata is to be attached to. + struct MetadataTrackEntry { + std::unique_ptr<MetadataTrack> track; + base::flat_set<int> render_stream_indices; + }; + using MetadataTrackMap = base::flat_map<int, MetadataTrackEntry>; + + // Returns the timed metadata tracks declared by `format_context`. Returns an + // empty map if timed metadata tracks are not enabled. + static MetadataTrackMap BuildMetadataTracks( + const AVFormatContext* format_context); + // FFmpeg callbacks during initialization. void OnOpenContextDone(bool result); void OnFindStreamInfoDone(int result); @@ -304,6 +334,15 @@ class MEDIA_EXPORT FFmpegDemuxer : public Demuxer { void SeekInternal(base::TimeDelta time, base::OnceCallback<void(int)> seek_cb); + + // If `packet` is for a timed metadata track, cache it in `metadata_tracks_` + // and return true. Otherwise return false. + bool CacheMetadataPacket(const AVPacket& packet); + + // Tells the streams that reference the timed metadata track carried by the + // AVStream at `metadata_stream_index` that it has new metadata. + void NotifyMetadataAvailable(int metadata_stream_index); + void OnTrackChangeSeekComplete(base::OnceClosure seek_completed_cb, FFmpegDemuxerStream* needs_flush, int result); @@ -337,6 +376,13 @@ class MEDIA_EXPORT FFmpegDemuxer : public Demuxer { // results of pre-seek av_read_frame() operations. PipelineStatusCallback pending_seek_cb_; + // The timed metadata tracks and the render streams that reference them. + // + // Nothing prunes the metadata that these accumulate, so they grow for the + // duration of playback, and are invisible to IsMaxMemoryUsageReached(), + // however adjacent samples are deduped. + MetadataTrackMap metadata_tracks_; + // |streams_| mirrors the AVStream array in AVFormatContext. It contains // FFmpegDemuxerStreams encapsluating AVStream objects at the same index. // diff --git a/media/filters/ffmpeg_demuxer_unittest.cc b/media/filters/ffmpeg_demuxer_unittest.cc index d92e7906a6bc1..358a8c4ec8b42 100644 --- a/media/filters/ffmpeg_demuxer_unittest.cc +++ b/media/filters/ffmpeg_demuxer_unittest.cc @@ -1939,7 +1939,7 @@ TEST_F(FFmpegDemuxerTest, MultitrackMemoryUsage) { EXPECT_EQ(GetExpectedMemoryUsage(896, 156011), demuxer_->GetMemoryUsage()); } -TEST_F(FFmpegDemuxerTest, AgtmMetadata) { +TEST_F(FFmpegDemuxerTest, AgtmMetadataWebM) { base::test::ScopedFeatureList scoped_feature_list(features::kHdrAgtm); CreateDemuxer("vp9-agtm.webm"); InitializeDemuxer(); @@ -1949,4 +1949,35 @@ TEST_F(FFmpegDemuxerTest, AgtmMetadata) { base::TimeDelta(), true); } +#if BUILDFLAG(ENABLE_AV1_DECODER) +// The metadata track is attached to the video track by a `cdsc` track +// reference, which points from the metadata track to the video track. +TEST_F(FFmpegDemuxerTest, AgtmMetadataMp4CdscTrack) { + base::test::ScopedFeatureList scoped_feature_list; + scoped_feature_list.InitWithFeatures( + {features::kHdrAgtm, kFFmpegDemuxerIT35MetadataTrack}, {}); + CreateDemuxer("agtm-metadata-cdsc-track.mp4"); + InitializeDemuxer(); + + DemuxerStream* video = GetStream(DemuxerStream::VIDEO); + Read(video, FROM_HERE, 40, 100000, true, DemuxerStream::Status::kOk, + base::TimeDelta(), true); +} + +// The metadata track is attached to the video track by a `rndr` track +// reference, which points from the video track to the metadata track. +TEST_F(FFmpegDemuxerTest, AgtmMetadataMp4RndrTrack) { + base::test::ScopedFeatureList scoped_feature_list; + scoped_feature_list.InitWithFeatures( + {features::kHdrAgtm, kFFmpegDemuxerIT35MetadataTrack}, {}); + CreateDemuxer("agtm-metadata-rndr-track.mp4"); + InitializeDemuxer(); + + DemuxerStream* video = GetStream(DemuxerStream::VIDEO); + Read(video, FROM_HERE, 40, 100000, true, DemuxerStream::Status::kOk, + base::TimeDelta(), true); +} + +#endif // BUILDFLAG(ENABLE_AV1_DECODER) + } // namespace media ++++++ ppc-fedora-0001-sandbox-Enable-seccomp_bpf-for-ppc64.patch ++++++ --- /var/tmp/diff_new_pack.J5YDaj/_old 2026-10-22 15:54:06.455689044 +0200 +++ /var/tmp/diff_new_pack.J5YDaj/_new 2026-10-22 15:54:06.458689170 +0200 @@ -180,15 +180,6 @@ SyscallSets::IsSocketCall(sysno) || #endif #if defined(__arm__) -@@ -259,7 +260,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de - - // TODO(crbug.com/40528912): should i386 really be in this list? - #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ -- defined(__aarch64__) -+ defined(__aarch64__) || defined(__powerpc64__) - if (sysno == __NR_mmap) - return RestrictMmapFlags(); - #endif @@ -342,7 +343,8 @@ ResultExpr EvaluateSyscallImpl(int fs_de } ++++++ ppc-fedora-0002-regenerate-xnn-buildgn.patch ++++++ ++++ 25948 lines (skipped) ++++ between /work/SRC/openSUSE:Factory/chromium/ppc-fedora-0002-regenerate-xnn-buildgn.patch ++++ and /work/SRC/openSUSE:Factory/.chromium.new.2252680/ppc-fedora-0002-regenerate-xnn-buildgn.patch
