From 7b259750d2b89787b8615979c33c84b1b3730aa66e91c15041c3feeb441df7e1 Mon Sep 17 00:00:00 2001 From: Bruno Pitrus Date: Wed, 13 Sep 2023 04:57:45 +0000 Subject: [PATCH 1/6] Accepting request 1110783 from home:dziobian:gulgul-ultron:19 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update to 25.8.0 * ABI break: NODE_MODULE_VERSION is now 116 * Chromium 114.0.5735.289 * Node 18.15.0 * V8 11.4 * Removed BrowserWindow scroll-touch-* events (since Electron 23) * Removed webContents.{de,in}crementCapturerCount(stayHidden, stayAwake) (since Electron 23) * Removed JXL image format support (since Electron 23) * API Changed: nativeImage.createThumbnailFromPath(path, size) (since Electron 24) - Use bundled vpx on Fedora ≤37 and Leap - Use bundled aom on Fedora and Leap - Drop support for Fedora 36 which is EOL - Drop upstreamed patches * CVE-2022-43548.patch * aggregatable_attribution_utils-do-not-assume-abseil-ABI.patch * angle-ShaderVars-missing-uint32_t.patch * blink-gcc13-missing-headers.patch * bluetooth_uuid-missing-uint8_t.patch * broker_file_permission-missing-uint64_t.patch * chromium-108-abseil-shims.patch * components-gcc13-missing-headers.patch * crashpad-elf_image_reader-ProgramHeaderTableSpecific-expected-unqualified-id.patch * d0aa9ad.patch * document_loader-private-DecodedBodyData.patch * effect_paint_property_node-Wchanges-meaning.patch * electron_serial_delegate-ambiguous-Observer.patch * extensions-gcc13-missing-headers.patch * first_party_set_parser-IssueWithMetadata-no-known-conversion.patch * gpu_feature_info-missing-uint32_t.patch * half_float-Wstrict-aliasing.patch * ipcz-buffer_id-Wnarrowing.patch * ipcz-safe_math-Wuninitialized.patch * net-gcc13-missing-headers.patch * net-third_party-quiche-gcc13-missing-headers.patch * one_writer_seqlock-missing-uintptr_t.patch * openscreen-gcc13-missing-headers.patch * passwords_counter-Wsubobject-linkage.patch * perfetto-uuid-missing-uint8_t.patch * print_dialog_gtk-no-kEnableOopPrintDriversJobPrint.patch * profiler-missing-uintptr_t.patch * reproducible-config.gypi.patch * select_file_dialog_linux_kde-Wodr.patch * shim_headers-fix-ninja.patch * static_constructors-Wstrict-aliasing.patch * string_hasher-type-pun-UB-causes-heap-corruption.patch * swiftshader-Constants-Wstrict-aliasing.patch * swiftshader-Half-Wstrict-aliasing.patch * swiftshader-LRUCache-missing-uint64_t.patch * target_property-missing-uint32_t.patch * ui-gcc13-missing-headers.patch * unzip-Wsubobject-linkage.patch * v8_initializer-PageAllocator-fpermissive.patch * vector_math_impl-Wstrict-aliasing.patch * web_contents_impl-Wsubobject-linkage.patch * webgl_image_conversion-Wstrict-aliasing.patch * webrtc-base64-missing-uint8_t.patch * xr_cube_map-Wstrict-aliasing.patch - Drop no longer relevant patches` * chromium-norar.patch * electron-13-fix-sql-virtualcursor-type.patch * enable-jxl.patch * system-jsoncpp.patch - Add patches to build with system libs * abseil-remove-unused-targets.patch * highway.gn * system-wayland.patch - Add patches to fix build errors * absl-uint128-do-not-assume-abi.patch * cpu-missing-uint8_t.patch * electron-24-components-missing-headers.patch * electron_api_app-GetPathConstant-non-constexpr.patch * electron_browser_context-missing-variant.patch * mojo_ukm_recorder-missing-WrapUnique.patch - Conditionally reverse upstream changes to build against stable avif * avif_image_decoder-repetitionCount-clli.patch - …and harfbuzz 4 * harfbuzz-replace-HbScopedPointer.patch - …and icu 69 * v8-regexp-parser-UCHAR_BASIC_EMOJI.patch - …and wayland 19 * wayland-WL-SINCE-VERSION.patch * wayland_data_drag_controller-WL_SURFACE_OFFSET_SINCE_VERSION.patch - Add backported chrome-gpu-does-not-load.patch OBS-URL: https://build.opensuse.org/request/show/1110783 OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=89 --- 647d3d2.patch | 4 +- CVE-2022-43548.patch | 112 ---- RenderFrameHostImpl-use-after-free.patch | 6 +- abseil-remove-unused-targets.patch | 72 +++ absl-uint128-do-not-assume-abi.patch | 16 + ...ution_utils-do-not-assume-abseil-ABI.patch | 15 - angle-ShaderVars-missing-uint32_t.patch | 10 - angle-system-xxhash.patch | 14 +- ...nse_parsing-do-not-assume-abseil-ABI.patch | 20 - ...mage_decoder-AVIF_PIXEL_FORMAT_COUNT.patch | 11 +- avif_image_decoder-repetitionCount-clli.patch | 60 +++ base-system-nspr.patch | 2 +- blink-gcc13-missing-headers.patch | 22 - bluetooth_uuid-missing-uint8_t.patch | 10 - broker_file_permission-missing-uint64_t.patch | 10 - chrome-gpu-does-not-load.patch | 78 +++ chromium-102-compiler.patch | 28 +- chromium-108-abseil-shims.patch | 59 -- chromium-94.0.4606.71-InkDropHost-crash.patch | 4 +- chromium-ffmpeg-first-dts.patch | 2 +- chromium-gcc11.patch | 78 --- chromium-norar.patch | 97 ---- chromium-remove-bundled-roboto-font.patch | 23 +- chromium-system-libusb.patch | 2 +- chromium-vaapi.patch | 4 +- ...n.gypi-remove-fno-omit-frame-pointer.patch | 5 +- components-gcc13-missing-headers.patch | 70 --- cpu-missing-uint8_t.patch | 10 + ...ableSpecific-expected-unqualified-id.patch | 38 -- create_tarball.sh | 30 +- d0aa9ad.patch | 30 -- disable-catapult.patch | 54 +- disable-webspeech.patch | 61 ++- document_loader-private-DecodedBodyData.patch | 42 -- ...paint_property_node-Wchanges-meaning.patch | 11 - electron-13-fix-sql-virtualcursor-type.patch | 238 --------- ...hird_party-symbolize-missing-include.patch | 4 +- electron-22.3.23.tar.zst | 3 - electron-24-components-missing-headers.patch | 20 + electron-25.8.0.tar.zst | 3 + ...pi_app-GetPathConstant-non-constexpr.patch | 23 + ...tron_browser_context-missing-variant.patch | 10 + ...n_serial_delegate-ambiguous-Observer.patch | 14 - enable-jxl.patch | 13 - extensions-gcc13-missing-headers.patch | 22 - ...ssueWithMetadata-no-known-conversion.patch | 29 - gcc-enable-lto.patch | 6 +- gpu_feature_info-missing-uint32_t.patch | 10 - half_float-Wstrict-aliasing.patch | 22 - harfbuzz-replace-HbScopedPointer.patch | 98 ++++ harfbuzz-replace-chromium-scoped-type.patch | 46 +- highway.gn | 9 + ...-icu71-UNUM_APPROXIMATELY_SIGN_FIELD.patch | 12 - ipcz-buffer_id-Wnarrowing.patch | 11 - ipcz-safe_math-Wuninitialized.patch | 41 -- mojo_ukm_recorder-missing-WrapUnique.patch | 10 + net-gcc13-missing-headers.patch | 21 - ...d_party-quiche-gcc13-missing-headers.patch | 30 -- node-upgrade-llhttp-to-8.patch | 2 +- nodejs-electron.changes | 87 +++ nodejs-electron.spec | 218 ++++---- one_writer_seqlock-missing-uintptr_t.patch | 11 - openscreen-gcc13-missing-headers.patch | 20 - partition_alloc-no-lto.patch | 29 +- passwords_counter-Wsubobject-linkage.patch | 32 -- perfetto-uuid-missing-uint8_t.patch | 10 - ...tk-no-kEnableOopPrintDriversJobPrint.patch | 97 ---- profiler-missing-uintptr_t.patch | 10 - re2-11-StringPiece.patch | 46 +- replace_gn_files-system-libs.patch | 3 +- reproducible-config.gypi.patch | 11 - seccomp_bpf-no-lto.patch | 5 +- select_file_dialog_linux_kde-Wodr.patch | 11 - shim_headers-fix-ninja.patch | 18 - skia-system-vulkan-headers.patch | 2 +- static_constructors-Wstrict-aliasing.patch | 35 -- ...r-type-pun-UB-causes-heap-corruption.patch | 147 ----- swiftshader-Constants-Wstrict-aliasing.patch | 13 - swiftshader-Half-Wstrict-aliasing.patch | 78 --- swiftshader-LRUCache-missing-uint64_t.patch | 10 - system-jsoncpp.patch | 101 ---- system-libdrm.patch | 6 +- system-pydeps.patch | 11 + system-wayland.patch | 90 ++++ target_property-missing-uint32_t.patch | 11 - ui-gcc13-missing-headers.patch | 33 -- unzip-Wsubobject-linkage.patch | 39 -- v8-regexp-parser-UCHAR_BASIC_EMOJI.patch | 503 ++++++++++++++++++ ...nitializer-PageAllocator-fpermissive.patch | 13 - vector_math_impl-Wstrict-aliasing.patch | 27 - wayland-WL-SINCE-VERSION.patch | 292 ++++++++++ ...ller-WL_SURFACE_OFFSET_SINCE_VERSION.patch | 71 +++ web_contents_impl-Wsubobject-linkage.patch | 80 --- webgl_image_conversion-Wstrict-aliasing.patch | 31 -- webrtc-base64-missing-uint8_t.patch | 11 - xr_cube_map-Wstrict-aliasing.patch | 21 - 96 files changed, 1787 insertions(+), 2253 deletions(-) delete mode 100644 CVE-2022-43548.patch create mode 100644 abseil-remove-unused-targets.patch create mode 100644 absl-uint128-do-not-assume-abi.patch delete mode 100644 aggregatable_attribution_utils-do-not-assume-abseil-ABI.patch delete mode 100644 angle-ShaderVars-missing-uint32_t.patch delete mode 100644 attribution_response_parsing-do-not-assume-abseil-ABI.patch create mode 100644 avif_image_decoder-repetitionCount-clli.patch delete mode 100644 blink-gcc13-missing-headers.patch delete mode 100644 bluetooth_uuid-missing-uint8_t.patch delete mode 100644 broker_file_permission-missing-uint64_t.patch create mode 100644 chrome-gpu-does-not-load.patch delete mode 100644 chromium-108-abseil-shims.patch delete mode 100644 chromium-norar.patch delete mode 100644 components-gcc13-missing-headers.patch create mode 100644 cpu-missing-uint8_t.patch delete mode 100644 crashpad-elf_image_reader-ProgramHeaderTableSpecific-expected-unqualified-id.patch delete mode 100644 d0aa9ad.patch delete mode 100644 document_loader-private-DecodedBodyData.patch delete mode 100644 effect_paint_property_node-Wchanges-meaning.patch delete mode 100644 electron-13-fix-sql-virtualcursor-type.patch delete mode 100644 electron-22.3.23.tar.zst create mode 100644 electron-24-components-missing-headers.patch create mode 100644 electron-25.8.0.tar.zst create mode 100644 electron_api_app-GetPathConstant-non-constexpr.patch create mode 100644 electron_browser_context-missing-variant.patch delete mode 100644 electron_serial_delegate-ambiguous-Observer.patch delete mode 100644 enable-jxl.patch delete mode 100644 extensions-gcc13-missing-headers.patch delete mode 100644 first_party_set_parser-IssueWithMetadata-no-known-conversion.patch delete mode 100644 gpu_feature_info-missing-uint32_t.patch delete mode 100644 half_float-Wstrict-aliasing.patch create mode 100644 harfbuzz-replace-HbScopedPointer.patch create mode 100644 highway.gn delete mode 100644 ipcz-buffer_id-Wnarrowing.patch delete mode 100644 ipcz-safe_math-Wuninitialized.patch create mode 100644 mojo_ukm_recorder-missing-WrapUnique.patch delete mode 100644 net-gcc13-missing-headers.patch delete mode 100644 net-third_party-quiche-gcc13-missing-headers.patch delete mode 100644 one_writer_seqlock-missing-uintptr_t.patch delete mode 100644 openscreen-gcc13-missing-headers.patch delete mode 100644 passwords_counter-Wsubobject-linkage.patch delete mode 100644 perfetto-uuid-missing-uint8_t.patch delete mode 100644 print_dialog_gtk-no-kEnableOopPrintDriversJobPrint.patch delete mode 100644 profiler-missing-uintptr_t.patch delete mode 100644 reproducible-config.gypi.patch delete mode 100644 select_file_dialog_linux_kde-Wodr.patch delete mode 100644 shim_headers-fix-ninja.patch delete mode 100644 static_constructors-Wstrict-aliasing.patch delete mode 100644 string_hasher-type-pun-UB-causes-heap-corruption.patch delete mode 100644 swiftshader-Constants-Wstrict-aliasing.patch delete mode 100644 swiftshader-Half-Wstrict-aliasing.patch delete mode 100644 swiftshader-LRUCache-missing-uint64_t.patch delete mode 100644 system-jsoncpp.patch create mode 100644 system-wayland.patch delete mode 100644 target_property-missing-uint32_t.patch delete mode 100644 ui-gcc13-missing-headers.patch delete mode 100644 unzip-Wsubobject-linkage.patch create mode 100644 v8-regexp-parser-UCHAR_BASIC_EMOJI.patch delete mode 100644 v8_initializer-PageAllocator-fpermissive.patch delete mode 100644 vector_math_impl-Wstrict-aliasing.patch create mode 100644 wayland-WL-SINCE-VERSION.patch create mode 100644 wayland_data_drag_controller-WL_SURFACE_OFFSET_SINCE_VERSION.patch delete mode 100644 web_contents_impl-Wsubobject-linkage.patch delete mode 100644 webgl_image_conversion-Wstrict-aliasing.patch delete mode 100644 webrtc-base64-missing-uint8_t.patch delete mode 100644 xr_cube_map-Wstrict-aliasing.patch diff --git a/647d3d2.patch b/647d3d2.patch index 147d492..42b7727 100644 --- a/647d3d2.patch +++ b/647d3d2.patch @@ -25,9 +25,9 @@ index d3dbdb9..fad747a 100644 if(optimizationLevel > 0) { +#if LLVM_VERSION_MAJOR >= 16 -+ fpm.addPass(llvm::SROAPass(llvm::SROAOptions::PreserveCFG)); + fpm.addPass(llvm::SROAPass(llvm::SROAOptions::PreserveCFG)); +#else - fpm.addPass(llvm::SROAPass()); ++ fpm.addPass(llvm::SROAPass()); +#endif fpm.addPass(llvm::InstCombinePass()); } diff --git a/CVE-2022-43548.patch b/CVE-2022-43548.patch deleted file mode 100644 index c6d3e1e..0000000 --- a/CVE-2022-43548.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 165342beac61a5573c8eb422cb5bc7001adbf0c5 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= -Date: Sun, 25 Sep 2022 12:34:05 +0000 -Subject: [PATCH] inspector: harden IP address validation again - -Use inet_pton() to parse IP addresses, which restricts IP addresses -to a small number of well-defined formats. In particular, octal and -hexadecimal number formats are not allowed, and neither are leading -zeros. Also explicitly reject 0.0.0.0/8 and ::/128 as non-routable. - -Refs: https://hackerone.com/reports/1710652 -CVE-ID: CVE-2022-43548 -PR-URL: https://github.com/nodejs-private/node-private/pull/354 -Reviewed-by: Michael Dawson -Reviewed-by: Rafael Gonzaga -Reviewed-by: Rich Trott ---- - src/inspector_socket.cc | 77 ++++++++++++++++++++------ - test/cctest/test_inspector_socket.cc | 80 ++++++++++++++++++++++++++++ - 2 files changed, 141 insertions(+), 16 deletions(-) - -diff --git a/src/inspector_socket.cc b/src/inspector_socket.cc -index ab1cdf1fa5bd..8001d893e1fd 100644 ---- a/third_party/electron_node/src/inspector_socket.cc -+++ b/third_party/electron_node/src/inspector_socket.cc -@@ -162,25 +162,70 @@ static std::string TrimPort(const std::string& host) { - } - - static bool IsIPAddress(const std::string& host) { -- if (host.length() >= 4 && host.front() == '[' && host.back() == ']') -- return true; -- if (host.front() == '0') return false; -- uint_fast16_t accum = 0; -- uint_fast8_t quads = 0; -- bool empty = true; -- auto endOctet = [&accum, &quads, &empty](bool final = false) { -- return !empty && accum <= 0xff && ++quads <= 4 && final == (quads == 4) && -- (empty = true) && !(accum = 0); -- }; -- for (char c : host) { -- if (isdigit(c)) { -- if ((accum = (accum * 10) + (c - '0')) > 0xff) return false; -- empty = false; -- } else if (c != '.' || !endOctet()) { -+ // TODO(tniessen): add CVEs to the following bullet points -+ // To avoid DNS rebinding attacks, we are aware of the following requirements: -+ // * the host name must be an IP address, -+ // * the IP address must be routable, and -+ // * the IP address must be formatted unambiguously. -+ -+ // The logic below assumes that the string is null-terminated, so ensure that -+ // we did not somehow end up with null characters within the string. -+ if (host.find('\0') != std::string::npos) return false; -+ -+ // All IPv6 addresses must be enclosed in square brackets, and anything -+ // enclosed in square brackets must be an IPv6 address. -+ if (host.length() >= 4 && host.front() == '[' && host.back() == ']') { -+ // INET6_ADDRSTRLEN is the maximum length of the dual format (including the -+ // terminating null character), which is the longest possible representation -+ // of an IPv6 address: xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:ddd.ddd.ddd.ddd -+ if (host.length() - 2 >= INET6_ADDRSTRLEN) return false; -+ -+ // Annoyingly, libuv's implementation of inet_pton() deviates from other -+ // implementations of the function in that it allows '%' in IPv6 addresses. -+ if (host.find('%') != std::string::npos) return false; -+ -+ // Parse the IPv6 address to ensure it is syntactically valid. -+ char ipv6_str[INET6_ADDRSTRLEN]; -+ std::copy(host.begin() + 1, host.end() - 1, ipv6_str); -+ ipv6_str[host.length()] = '\0'; -+ unsigned char ipv6[sizeof(struct in6_addr)]; -+ if (uv_inet_pton(AF_INET6, ipv6_str, ipv6) != 0) return false; -+ -+ // The only non-routable IPv6 address is ::/128. It should not be necessary -+ // to explicitly reject it because it will still be enclosed in square -+ // brackets and not even macOS should make DNS requests in that case, but -+ // history has taught us that we cannot be careful enough. -+ // Note that RFC 4291 defines both "IPv4-Compatible IPv6 Addresses" and -+ // "IPv4-Mapped IPv6 Addresses", which means that there are IPv6 addresses -+ // (other than ::/128) that represent non-routable IPv4 addresses. However, -+ // this translation assumes that the host is interpreted as an IPv6 address -+ // in the first place, at which point DNS rebinding should not be an issue. -+ if (std::all_of(ipv6, ipv6 + sizeof(ipv6), [](auto b) { return b == 0; })) { - return false; - } -+ -+ // It is a syntactically valid and routable IPv6 address enclosed in square -+ // brackets. No client should be able to misinterpret this. -+ return true; - } -- return endOctet(true); -+ -+ // Anything not enclosed in square brackets must be an IPv4 address. It is -+ // important here that inet_pton() accepts only the so-called dotted-decimal -+ // notation, which is a strict subset of the so-called numbers-and-dots -+ // notation that is allowed by inet_aton() and inet_addr(). This subset does -+ // not allow hexadecimal or octal number formats. -+ unsigned char ipv4[sizeof(struct in_addr)]; -+ if (uv_inet_pton(AF_INET, host.c_str(), ipv4) != 0) return false; -+ -+ // The only strictly non-routable IPv4 address is 0.0.0.0, and macOS will make -+ // DNS requests for this IP address, so we need to explicitly reject it. In -+ // fact, we can safely reject all of 0.0.0.0/8 (see Section 3.2 of RFC 791 and -+ // Section 3.2.1.3 of RFC 1122). -+ // Note that inet_pton() stores the IPv4 address in network byte order. -+ if (ipv4[0] == 0) return false; -+ -+ // It is a routable IPv4 address in dotted-decimal notation. -+ return true; - } - - // Constants for hybi-10 frame format. diff --git a/RenderFrameHostImpl-use-after-free.patch b/RenderFrameHostImpl-use-after-free.patch index 8bc6e5a..0200c5f 100644 --- a/RenderFrameHostImpl-use-after-free.patch +++ b/RenderFrameHostImpl-use-after-free.patch @@ -1,8 +1,8 @@ --- src/content/browser/renderer_host/render_frame_host_impl.cc.orig 2023-02-08 21:38:09.974003318 +0100 +++ src/content/browser/renderer_host/render_frame_host_impl.cc 2023-02-13 14:13:50.217792624 +0100 @@ -5,6 +5,7 @@ - #include "content/browser/renderer_host/render_frame_host_impl.h" + #include #include +#include #include @@ -20,5 +20,5 @@ + document_associated_data_->~DocumentAssociatedData(); + new(&document_associated_data_) absl::optional(absl::nullopt); - // Ensure that the render process host has been notified that all audio - // streams from this frame have terminated. This is required to ensure the + // If this was the last active frame in the SiteInstanceGroup, the + // DecrementActiveFrameCount call will trigger the deletion of the diff --git a/abseil-remove-unused-targets.patch b/abseil-remove-unused-targets.patch new file mode 100644 index 0000000..a887398 --- /dev/null +++ b/abseil-remove-unused-targets.patch @@ -0,0 +1,72 @@ +These targets are dead code but they aren't available with system abseil + +--- src/third_party/abseil-cpp/BUILD.gn.old ++++ src/third_party/abseil-cpp/BUILD.gn +@@ -61,7 +61,6 @@ + "//third_party/abseil-cpp/absl/base", + "//third_party/abseil-cpp/absl/base:config", + "//third_party/abseil-cpp/absl/base:core_headers", +- "//third_party/abseil-cpp/absl/base:prefetch", + "//third_party/abseil-cpp/absl/cleanup", + "//third_party/abseil-cpp/absl/container:btree", + "//third_party/abseil-cpp/absl/container:fixed_array", +@@ -76,15 +76,11 @@ + "//third_party/abseil-cpp/absl/functional:bind_front", + "//third_party/abseil-cpp/absl/functional:function_ref", + "//third_party/abseil-cpp/absl/hash", +- "//third_party/abseil-cpp/absl/log:absl_check", +- "//third_party/abseil-cpp/absl/log:absl_log", +- "//third_party/abseil-cpp/absl/log:die_if_null", + "//third_party/abseil-cpp/absl/memory", + "//third_party/abseil-cpp/absl/meta:type_traits", + "//third_party/abseil-cpp/absl/numeric:bits", + "//third_party/abseil-cpp/absl/numeric:int128", + "//third_party/abseil-cpp/absl/random", +- "//third_party/abseil-cpp/absl/random:distributions", + "//third_party/abseil-cpp/absl/status", + "//third_party/abseil-cpp/absl/status:statusor", + "//third_party/abseil-cpp/absl/strings", +@@ -194,16 +190,9 @@ + "absl/container:inlined_vector_test", + "absl/container:node_slot_policy_test", + "absl/container:sample_element_size_test", +- "absl/crc:crc32c_test", +- "absl/crc:crc_cord_state_test", +- "absl/crc:crc_memcpy_test", +- "absl/crc:non_temporal_memcpy_test", +- "absl/debugging:stacktrace_test", + "absl/functional:any_invocable_test", + "absl/hash:hash_test", + "absl/hash:low_level_hash_test", +- "absl/log:absl_check_test", +- "absl/log:absl_log_basic_test", + "absl/log:die_if_null_test", + "absl/log:flags_test", + "absl/log:globals_test", +@@ -217,7 +207,6 @@ + "absl/log/internal:stderr_log_sink_test", + "absl/memory:memory_test", + "absl/meta:type_traits_test", +- "absl/numeric:int128_test", + "absl/profiling:exponential_biased_test", + "absl/profiling:periodic_sampler_test", + "absl/status:statusor_test", +@@ -234,7 +223,6 @@ + "absl/strings:cordz_test", + "absl/strings:cordz_update_scope_test", + "absl/strings:cordz_update_tracker_test", +- "absl/strings:damerau_levenshtein_distance_test", + "absl/strings:match_test", + "absl/strings:str_replace_test", + "absl/strings:string_view_test", +@@ -249,9 +237,6 @@ + "absl/strings:match_test", + "absl/strings:str_replace_test", + "absl/strings:string_view_test", +- "absl/synchronization:kernel_timeout_internal_test", +- "absl/synchronization:waiter_test", +- "absl/time:time_test", + "absl/types:optional_test", + "absl/types:variant_test", + "//third_party/googletest:gtest_main", + diff --git a/absl-uint128-do-not-assume-abi.patch b/absl-uint128-do-not-assume-abi.patch new file mode 100644 index 0000000..e7e3156 --- /dev/null +++ b/absl-uint128-do-not-assume-abi.patch @@ -0,0 +1,16 @@ +--- src/components/attribution_reporting/parsing_utils.h.old 2023-08-14 13:59:44.170970500 +0200 ++++ src/components/attribution_reporting/parsing_utils.h 2023-08-14 21:56:24.568044300 +0200 +@@ -12,12 +12,9 @@ + #include "base/component_export.h" + #include "base/strings/string_piece_forward.h" + #include "base/values.h" ++#include "third_party/abseil-cpp/absl/numeric/int128.h" + #include "third_party/abseil-cpp/absl/types/optional.h" + +-namespace absl { +-class uint128; +-} // namespace absl +- + namespace attribution_reporting { + + COMPONENT_EXPORT(ATTRIBUTION_REPORTING) diff --git a/aggregatable_attribution_utils-do-not-assume-abseil-ABI.patch b/aggregatable_attribution_utils-do-not-assume-abseil-ABI.patch deleted file mode 100644 index 32b24e6..0000000 --- a/aggregatable_attribution_utils-do-not-assume-abseil-ABI.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/content/browser/attribution_reporting/aggregatable_attribution_utils.h -+++ b/content/browser/attribution_reporting/aggregatable_attribution_utils.h -@@ -9,11 +9,9 @@ - #include - - #include "content/common/content_export.h" -+#include "third_party/abseil-cpp/absl/numeric/int128.h" - #include "third_party/abseil-cpp/absl/types/optional.h" - --namespace absl { --class uint128; --} // namespace absl - - namespace content { - diff --git a/angle-ShaderVars-missing-uint32_t.patch b/angle-ShaderVars-missing-uint32_t.patch deleted file mode 100644 index 73d2c75..0000000 --- a/angle-ShaderVars-missing-uint32_t.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- src/third_party/angle/include/GLSLANG/ShaderVars.h.old -+++ src/third_party/angle/include/GLSLANG/ShaderVars.h -@@ -12,6 +12,7 @@ - - #include - #include -+#include - #include - #include - diff --git a/angle-system-xxhash.patch b/angle-system-xxhash.patch index 645d780..1fea676 100644 --- a/angle-system-xxhash.patch +++ b/angle-system-xxhash.patch @@ -5,7 +5,15 @@ # Copyright 2019 The ANGLE Project Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -@@ -355,18 +356,12 @@ +@@ -406,7 +406,6 @@ + config("angle_common_config") { + include_dirs = [ + "src/common/base", +- "src/common/third_party/xxhash", + ] + if (is_android) { + libs = [ "log" ] +@@ -431,18 +432,12 @@ } } @@ -27,14 +35,14 @@ + public_configs = [ ":system_xxhash" ] } - angle_static_library("angle_common") { + template("angle_common_lib") { --- a/third_party/angle/src/common/hash_utils.h +++ b/third_party/angle/src/common/hash_utils.h @@ -9,7 +9,7 @@ #define COMMON_HASHUTILS_H_ #include "common/debug.h" --#include "common/third_party/xxhash/xxhash.h" +-#include "xxhash.h" +#include namespace angle diff --git a/attribution_response_parsing-do-not-assume-abseil-ABI.patch b/attribution_response_parsing-do-not-assume-abseil-ABI.patch deleted file mode 100644 index 8f6ded2..0000000 --- a/attribution_response_parsing-do-not-assume-abseil-ABI.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/third_party/blink/renderer/core/frame/attribution_response_parsing.h 2022-09-16 12:44:45.672390800 +0200 -+++ b/third_party/blink/renderer/core/frame/attribution_response_parsing.h 2022-09-17 16:01:55.554818800 +0200 -@@ -7,16 +7,13 @@ - - #include - -+#include "third_party/abseil-cpp/absl/numeric/int128.h" - #include "third_party/blink/public/mojom/conversions/attribution_data_host.mojom-blink-forward.h" - #include "third_party/blink/renderer/core/core_export.h" - #include "third_party/blink/renderer/platform/wtf/forward.h" - #include "third_party/blink/renderer/platform/wtf/hash_map.h" - #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" - --namespace absl { --class uint128; --} // namespace absl -- - namespace blink { - - class JSONValue; diff --git a/avif_image_decoder-AVIF_PIXEL_FORMAT_COUNT.patch b/avif_image_decoder-AVIF_PIXEL_FORMAT_COUNT.patch index f35cf29..a893dd8 100644 --- a/avif_image_decoder-AVIF_PIXEL_FORMAT_COUNT.patch +++ b/avif_image_decoder-AVIF_PIXEL_FORMAT_COUNT.patch @@ -60,11 +60,12 @@ index c24bf8e0446d3..6ccc4bcfe2c36 100644 NOTREACHED(); return media::PIXEL_FORMAT_UNKNOWN; } -@@ -300,6 +301,7 @@ cc::YUVSubsampling AVIFImageDecoder::GetYUVSubsampling() const { - case AVIF_PIXEL_FORMAT_YUV400: +@@ -300,7 +301,7 @@ cc::YUVSubsampling AVIFImageDecoder::GetYUVSubsampling() const { + // AVIF_PIXEL_FORMAT_NONE. + CHECK(!IsDecodedSizeAvailable()); return cc::YUVSubsampling::kUnknown; - case AVIF_PIXEL_FORMAT_NONE: + case AVIF_PIXEL_FORMAT_COUNT: - NOTREACHED(); - return cc::YUVSubsampling::kUnknown; +- default: + break; } + NOTREACHED_NORETURN() << "Invalid YUV format: " << avif_yuv_format_; diff --git a/avif_image_decoder-repetitionCount-clli.patch b/avif_image_decoder-repetitionCount-clli.patch new file mode 100644 index 0000000..63cd994 --- /dev/null +++ b/avif_image_decoder-repetitionCount-clli.patch @@ -0,0 +1,60 @@ +--- src/third_party/blink/renderer/platform/image-decoders/avif/avif_image_decoder.cc.old 2023-09-03 08:00:30.283599000 +0200 ++++ src/third_party/blink/renderer/platform/image-decoders/avif/avif_image_decoder.cc 2023-09-04 22:18:55.656557200 +0200 +@@ -40,6 +40,20 @@ + #error Blink assumes a little-endian target. + #endif + ++#include ++#define define_has_member(member_name) \ ++ template \ ++ class has_member_##member_name \ ++ { \ ++ template static std::true_type test(decltype(&U::member_name)); \ ++ template static std::false_type test(...); \ ++ public: \ ++ static constexpr bool v = decltype(test(0))::value; \ ++ }; ++ ++define_has_member(clli) ++define_has_member(repetitionCount) ++ + namespace { + + // The maximum AVIF file size we are willing to decode. This helps libavif +@@ -463,6 +477,8 @@ void AVIFImageDecoder::DecodeToYUV() { + } + + int AVIFImageDecoder::RepetitionCount() const { ++#ifdef AVIF_REPETITION_COUNT_INFINITE ++[](auto &decoder_, auto &decoded_frame_count_) { if constexpr(has_member_repetitionCount::v) { + if (decoded_frame_count_ > 1) { + switch (decoder_->repetitionCount) { + case AVIF_REPETITION_COUNT_INFINITE: +@@ -477,6 +493,13 @@ int AVIFImageDecoder::RepetitionCount() + } + } + return kAnimationNone; ++} else { ++#endif ++ return decoded_frame_count_ > 1 ? kAnimationLoopInfinite : kAnimationNone; ++#ifdef AVIF_REPETITION_COUNT_INFINITE ++} ++}(decoder_, decoded_frame_count_); ++#endif + } + + bool AVIFImageDecoder::FrameIsReceivedAtIndex(wtf_size_t index) const { +@@ -872,11 +895,13 @@ bool AVIFImageDecoder::UpdateDemuxer() { + chroma_shift_x_ = format_info.chromaShiftX; + chroma_shift_y_ = format_info.chromaShiftY; + ++[](auto &container, auto &hdr_metadata_) { if constexpr(has_member_clli::v) { + if (container->clli.maxCLL || container->clli.maxPALL) { + hdr_metadata_ = gfx::HDRMetadata(); + hdr_metadata_->max_content_light_level = container->clli.maxCLL; + hdr_metadata_->max_frame_average_light_level = container->clli.maxPALL; + } ++}}(container, hdr_metadata_); + + // SetEmbeddedColorProfile() must be called before IsSizeAvailable() becomes + // true. So call SetEmbeddedColorProfile() before calling SetSize(). The color diff --git a/base-system-nspr.patch b/base-system-nspr.patch index 35dcf6b..e7b4406 100644 --- a/base-system-nspr.patch +++ b/base-system-nspr.patch @@ -30,9 +30,9 @@ "thread_annotations.h", "threading/hang_watcher.cc", @@ -1414,6 +1417,7 @@ - "//build/config/compiler:prevent_unsafe_narrowing", "//build/config/compiler:wexit_time_destructors", "//build/config/compiler:wglobal_constructors", + "//electron/build/config:mas_build", + ":system_nspr", ] diff --git a/blink-gcc13-missing-headers.patch b/blink-gcc13-missing-headers.patch deleted file mode 100644 index 40098f6..0000000 --- a/blink-gcc13-missing-headers.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- src/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h.old 2023-03-07 10:51:27.754759600 +0000 -+++ src/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h 2023-03-09 08:25:00.771159100 +0000 -@@ -6,6 +6,9 @@ - #define THIRD_PARTY_BLINK_PUBLIC_COMMON_BLUETOOTH_WEB_BLUETOOTH_DEVICE_ID_H_ - - #include -+#include -+#include -+#include - #include - - #include "third_party/blink/public/common/common_export.h" ---- src/third_party/blink/public/common/origin_trials/origin_trial_public_key.h.old 2023-03-07 11:51:27.758759553 +0100 -+++ src/third_party/blink/public/common/origin_trials/origin_trial_public_key.h 2023-03-09 13:54:11.881700635 +0100 -@@ -6,6 +6,7 @@ - #define THIRD_PARTY_BLINK_PUBLIC_COMMON_ORIGIN_TRIALS_ORIGIN_TRIAL_PUBLIC_KEY_H_ - - #include -+#include - - namespace blink { - diff --git a/bluetooth_uuid-missing-uint8_t.patch b/bluetooth_uuid-missing-uint8_t.patch deleted file mode 100644 index 31d8198..0000000 --- a/bluetooth_uuid-missing-uint8_t.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- src/device/bluetooth/public/cpp/bluetooth_uuid.h.old 2023-03-07 11:51:25.678757600 +0100 -+++ src/device/bluetooth/public/cpp/bluetooth_uuid.h 2023-03-07 21:50:18.367030500 +0100 -@@ -5,6 +5,7 @@ - #ifndef DEVICE_BLUETOOTH_PUBLIC_CPP_BLUETOOTH_UUID_H_ - #define DEVICE_BLUETOOTH_PUBLIC_CPP_BLUETOOTH_UUID_H_ - -+#include - #include - #include - #include diff --git a/broker_file_permission-missing-uint64_t.patch b/broker_file_permission-missing-uint64_t.patch deleted file mode 100644 index c27cf1b..0000000 --- a/broker_file_permission-missing-uint64_t.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- src/sandbox/linux/syscall_broker/broker_file_permission.h.old 2023-03-07 11:51:27.250759100 +0100 -+++ src/sandbox/linux/syscall_broker/broker_file_permission.h 2023-03-07 22:30:50.447848900 +0100 -@@ -6,6 +6,7 @@ - #define SANDBOX_LINUX_SYSCALL_BROKER_BROKER_FILE_PERMISSION_H_ - - #include -+#include - #include - - #include "sandbox/sandbox_export.h" diff --git a/chrome-gpu-does-not-load.patch b/chrome-gpu-does-not-load.patch new file mode 100644 index 0000000..11014fe --- /dev/null +++ b/chrome-gpu-does-not-load.patch @@ -0,0 +1,78 @@ +From ebf9784af691e23f176cfdfb15e9b059fea24e6b Mon Sep 17 00:00:00 2001 +From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> +Date: Mon, 21 Aug 2023 00:41:36 +0000 +Subject: [PATCH] fix: chrome://gpu failing to load + +Co-authored-by: Shelley Vohr +--- + electron_paks.gni | 2 ++ + spec/chromium-spec.ts | 26 ++++++++++++++++++++++++-- + 2 files changed, 26 insertions(+), 2 deletions(-) + +diff --git a/electron_paks.gni b/electron_paks.gni +index c3a257ab0f62f..bc6950bee792a 100644 +--- a/electron/electron_paks.gni ++++ b/electron/electron_paks.gni +@@ -61,6 +61,7 @@ template("electron_extra_paks") { + "$root_gen_dir/content/browser/webrtc/resources/webrtc_internals_resources.pak", + "$root_gen_dir/content/content_resources.pak", + "$root_gen_dir/content/dev_ui_content_resources.pak", ++ "$root_gen_dir/content/gpu_resources.pak", + "$root_gen_dir/mojo/public/js/mojo_bindings_resources.pak", + "$root_gen_dir/net/net_resources.pak", + "$root_gen_dir/third_party/blink/public/resources/blink_resources.pak", +@@ -74,6 +75,7 @@ template("electron_extra_paks") { + "//components/resources", + "//content:content_resources", + "//content:dev_ui_content_resources", ++ "//content/browser/resources/gpu:resources", + "//content/browser/resources/media:resources", + "//content/browser/webrtc/resources", + "//electron:resources", +diff --git a/spec/chromium-spec.ts b/spec/chromium-spec.ts +index 4a0c79bc31958..aa972cc6167f0 100644 +--- a/electron/spec/chromium-spec.ts ++++ b/electron/spec/chromium-spec.ts +@@ -2028,10 +2028,32 @@ describe('chromium features', () => { + }); + }); + ++ describe('chrome://accessibility', () => { ++ it('loads the page successfully', async () => { ++ const w = new BrowserWindow({ show: false }); ++ await w.loadURL('chrome://accessibility'); ++ const pageExists = await w.webContents.executeJavaScript( ++ "window.hasOwnProperty('chrome') && window.chrome.hasOwnProperty('send')" ++ ); ++ expect(pageExists).to.be.true(); ++ }); ++ }); ++ ++ describe('chrome://gpu', () => { ++ it('loads the page successfully', async () => { ++ const w = new BrowserWindow({ show: false }); ++ await w.loadURL('chrome://gpu'); ++ const pageExists = await w.webContents.executeJavaScript( ++ "window.hasOwnProperty('chrome') && window.chrome.hasOwnProperty('send')" ++ ); ++ expect(pageExists).to.be.true(); ++ }); ++ }); ++ + describe('chrome://media-internals', () => { + it('loads the page successfully', async () => { + const w = new BrowserWindow({ show: false }); +- w.loadURL('chrome://media-internals'); ++ await w.loadURL('chrome://media-internals'); + const pageExists = await w.webContents.executeJavaScript( + "window.hasOwnProperty('chrome') && window.chrome.hasOwnProperty('send')" + ); +@@ -2042,7 +2064,7 @@ describe('chromium features', () => { + describe('chrome://webrtc-internals', () => { + it('loads the page successfully', async () => { + const w = new BrowserWindow({ show: false }); +- w.loadURL('chrome://webrtc-internals'); ++ await w.loadURL('chrome://webrtc-internals'); + const pageExists = await w.webContents.executeJavaScript( + "window.hasOwnProperty('chrome') && window.chrome.hasOwnProperty('send')" + ); diff --git a/chromium-102-compiler.patch b/chromium-102-compiler.patch index 88056f5..46667cb 100644 --- a/chromium-102-compiler.patch +++ b/chromium-102-compiler.patch @@ -58,12 +58,18 @@ index d40843b..b92f03b 100644 if (!is_clang) { # Use pipes for communicating between sub-processes. Faster. -@@ -527,31 +527,6 @@ +@@ -527,37 +527,6 @@ ldflags += [ "-Wl,-z,keep-text-section-prefix" ] } - if (is_clang && !is_nacl && current_os != "zos") { - cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ] +- if (save_reproducers_on_lld_crash && use_lld) { +- ldflags += [ +- "-fcrash-diagnostics=all", +- "-fcrash-diagnostics-dir=" + clang_diagnostic_dir, +- ] +- } - - # TODO(hans): Remove this once Clang generates better optimized debug info - # by default. https://crbug.com/765793 @@ -87,9 +93,9 @@ index d40843b..b92f03b 100644 - } - } - - # Rust compiler setup (for either clang or rustc). - if (enable_rust) { - defines += [ "RUST_ENABLED" ] + # C11/C++11 compiler flags setup. + # --------------------------- + if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) || @@ -862,7 +837,8 @@ # without using everything that "compiler" brings in. Options that # tweak code generation for a particular CPU do not belong here! @@ -175,8 +181,8 @@ index d40843b..b92f03b 100644 - cflags += [ "-Wextra" ] - } - # In Chromium code, we define __STDC_foo_MACROS in order to get the - # C99 macros on Mac and Linux. + if (treat_warnings_as_errors) { + # Turn rustc warnings into the "deny" lint level, which produce compiler @@ -1618,16 +1552,6 @@ "__STDC_FORMAT_MACROS", ] @@ -191,9 +197,9 @@ index d40843b..b92f03b 100644 - defines += [ "_FORTIFY_SOURCE=2" ] - } - - if (is_mac) { - cflags_objc = [ "-Wobjc-missing-property-synthesis" ] - cflags_objcc = [ "-Wobjc-missing-property-synthesis" ] + if (is_apple) { + cflags_objc = [ "-Wimplicit-retain-self" ] + cflags_objcc = [ "-Wimplicit-retain-self" ] @@ -1841,7 +1841,6 @@ config("export_dynamic") { # TODO(crbug.com/1052397): Revisit after target_os flip is completed. @@ -219,7 +225,7 @@ index d40843b..b92f03b 100644 -config("default_stack_frames") { +config("default_stack_frames") { } +config("xdefault_stack_frames") { - if (is_posix || is_fuchsia) { + if (!is_win) { if (enable_frame_pointers) { cflags = [ "-fno-omit-frame-pointer" ] @@ -2017,7 +1943,8 @@ @@ -279,9 +285,9 @@ index d40843b..b92f03b 100644 -config("symbols") { +config("symbols") { cflags = ["-g2"] } +config("xsymbols") { + rustflags = [] if (is_win) { if (is_clang) { - cflags = [ "/Z7" ] # Debug information in the .obj files. @@ -2398,7 +2330,8 @@ # Minimal symbols. # This config guarantees to hold symbol for stack trace which are shown to user diff --git a/chromium-108-abseil-shims.patch b/chromium-108-abseil-shims.patch deleted file mode 100644 index dd6f914..0000000 --- a/chromium-108-abseil-shims.patch +++ /dev/null @@ -1,59 +0,0 @@ ---- /dev/null -+++ b/build/linux/unbundle/absl_log.gn -@@ -0,0 +1,13 @@ -+source_set("basic_log_test") {} -+source_set("check_test") {} -+source_set("die_if_null_test") {} -+source_set("flags_test") {} -+source_set("globals_test") {} -+source_set("log_entry_test") {} -+source_set("log_format_test") {} -+source_set("log_macro_hygiene_test") {} -+source_set("log_modifier_methods_test") {} -+source_set("log_sink_test") {} -+source_set("log_streamer_test") {} -+source_set("scoped_mock_log_test") {} -+source_set("stripping_test") {} ---- /dev/null -+++ b/build/linux/unbundle/absl_log_internal.gn -@@ -0,0 +1,1 @@ -+source_set("stderr_log_sink_test") {} ---- a/build/linux/unbundle/replace_gn_files.py -+++ b/build/linux/unbundle/replace_gn_files.py -@@ -15,7 +15,7 @@ - - - REPLACEMENTS = { -- # Use system libabsl_2xxx. These 18 shims MUST be used together. -+ # Use system libabsl_2xxx. These 20 shims MUST be used together. - 'absl_algorithm': 'third_party/abseil-cpp/absl/algorithm/BUILD.gn', - 'absl_base': 'third_party/abseil-cpp/absl/base/BUILD.gn', - 'absl_cleanup': 'third_party/abseil-cpp/absl/cleanup/BUILD.gn', -@@ -24,6 +24,8 @@ - 'absl_flags': 'third_party/abseil-cpp/absl/flags/BUILD.gn', - 'absl_functional': 'third_party/abseil-cpp/absl/functional/BUILD.gn', - 'absl_hash': 'third_party/abseil-cpp/absl/hash/BUILD.gn', -+ 'absl_log': 'third_party/abseil-cpp/absl/log/BUILD.gn', -+ 'absl_log_internal': 'third_party/abseil-cpp/absl/log/internal/BUILD.gn', - 'absl_memory': 'third_party/abseil-cpp/absl/memory/BUILD.gn', - 'absl_meta': 'third_party/abseil-cpp/absl/meta/BUILD.gn', - 'absl_numeric': 'third_party/abseil-cpp/absl/numeric/BUILD.gn', ---- a/build/linux/unbundle/absl_container.gn -+++ b/build/linux/unbundle/absl_container.gn -@@ -109,6 +109,8 @@ - public_configs = [ ":system_absl_node_hash_set" ] - } - -+source_set("common_policy_traits_test") { -+} - source_set("inlined_vector_test") { - } - source_set("node_slot_policy_test") { ---- a/build/linux/unbundle/absl_functional.gn -+++ b/build/linux/unbundle/absl_functional.gn -@@ -45,3 +45,5 @@ - deps = [ ":function_ref_shim" ] - public_configs = [ ":system_absl_function_ref" ] - } -+ -+source_set("any_invocable_test") {} diff --git a/chromium-94.0.4606.71-InkDropHost-crash.patch b/chromium-94.0.4606.71-InkDropHost-crash.patch index 0fd466f..2c1ef91 100644 --- a/chromium-94.0.4606.71-InkDropHost-crash.patch +++ b/chromium-94.0.4606.71-InkDropHost-crash.patch @@ -1,6 +1,6 @@ diff -up chromium-94.0.4606.71/ui/views/animation/ink_drop_host_view.h.InkDropHost-crash chromium-94.0.4606.71/ui/views/animation/ink_drop_host_view.h ---- chromium-94.0.4606.71/ui/views/animation/ink_drop_host_view.h.InkDropHost-crash 2021-10-05 16:04:46.313586509 -0400 -+++ chromium-94.0.4606.71/ui/views/animation/ink_drop_host_view.h 2021-10-05 16:05:12.213732558 -0400 +--- chromium-94.0.4606.71/ui/views/animation/ink_drop_host.h.InkDropHost-crash 2021-10-05 16:04:46.313586509 -0400 ++++ chromium-94.0.4606.71/ui/views/animation/ink_drop_host.h 2021-10-05 16:05:12.213732558 -0400 @@ -228,6 +228,11 @@ class VIEWS_EXPORT InkDropHost { // Used to observe View and inform the InkDrop of host-transform changes. ViewLayerTransformObserver host_view_transform_observer_; diff --git a/chromium-ffmpeg-first-dts.patch b/chromium-ffmpeg-first-dts.patch index fafe5a6..851662d 100644 --- a/chromium-ffmpeg-first-dts.patch +++ b/chromium-ffmpeg-first-dts.patch @@ -114,7 +114,7 @@ index c147309d6f..48a8f6ad8c 100644 + int64_t first_dts_; int64_t last_packet_pos_; int64_t last_packet_dts_; - }; + // Requested buffer count. The actual returned buffer count could be less -- 2.35.1 diff --git a/chromium-gcc11.patch b/chromium-gcc11.patch index b649eee..e9cde91 100644 --- a/chromium-gcc11.patch +++ b/chromium-gcc11.patch @@ -1,18 +1,3 @@ -Index: electron-17.1.0/third_party/perfetto/src/trace_processor/containers/string_pool.cc -=================================================================== ---- electron-17.1.0.orig/third_party/perfetto/src/trace_processor/containers/string_pool.cc 2022-03-07 17:28:24.814737660 +0100 -+++ electron-17.1.0/third_party/perfetto/src/trace_processor/containers/string_pool.cc 2022-03-09 08:25:10.346569313 +0100 -@@ -14,9 +14,9 @@ - * limitations under the License. - */ - -+#include - #include "src/trace_processor/containers/string_pool.h" - --#include - - #include "perfetto/base/logging.h" - #include "perfetto/ext/base/utils.h" Index: electron-17.1.0/third_party/perfetto/src/trace_processor/db/column.cc =================================================================== --- electron-17.1.0.orig/third_party/perfetto/src/trace_processor/db/column.cc 2022-03-07 17:28:24.814737660 +0100 @@ -25,59 +10,8 @@ Index: electron-17.1.0/third_party/perfetto/src/trace_processor/db/column.cc #include "src/trace_processor/db/column.h" #include "src/trace_processor/db/compare.h" -Index: electron-17.1.0/third_party/perfetto/src/trace_processor/types/variadic.cc -=================================================================== ---- electron-17.1.0.orig/third_party/perfetto/src/trace_processor/types/variadic.cc 2022-03-07 17:28:24.838737758 +0100 -+++ electron-17.1.0/third_party/perfetto/src/trace_processor/types/variadic.cc 2022-03-09 08:25:10.346569313 +0100 -@@ -14,6 +14,7 @@ - * limitations under the License. - */ - -+#include - #include "src/trace_processor/types/variadic.h" - - namespace perfetto { -Index: electron-17.1.0/ui/accessibility/platform/ax_platform_atk_hyperlink.cc -=================================================================== ---- electron-17.1.0.orig/ui/accessibility/platform/ax_platform_atk_hyperlink.cc 2022-03-07 17:20:48.460884710 +0100 -+++ electron-17.1.0/ui/accessibility/platform/ax_platform_atk_hyperlink.cc 2022-03-09 08:25:10.346569313 +0100 -@@ -245,7 +245,7 @@ static void AXPlatformAtkHyperlinkInit(A - } - - GType ax_platform_atk_hyperlink_get_type() { -- static volatile gsize type_volatile = 0; -+ static gsize type_volatile = 0; - - AXPlatformNodeAuraLinux::EnsureGTypeInit(); - -Index: electron-17.1.0/ui/accessibility/platform/ax_platform_node_auralinux.cc -=================================================================== ---- electron-17.1.0.orig/ui/accessibility/platform/ax_platform_node_auralinux.cc 2022-03-07 17:20:48.460884710 +0100 -+++ electron-17.1.0/ui/accessibility/platform/ax_platform_node_auralinux.cc 2022-03-09 08:25:10.346569313 +0100 -@@ -2275,7 +2275,7 @@ void ClassInit(gpointer class_pointer, g - GType GetType() { - AXPlatformNodeAuraLinux::EnsureGTypeInit(); - -- static volatile gsize type_volatile = 0; -+ static gsize type_volatile = 0; - if (g_once_init_enter(&type_volatile)) { - static const GTypeInfo type_info = { - sizeof(AXPlatformNodeAuraLinuxClass), // class_size Index: electron-17.1.0/ui/gtk/gtk_key_bindings_handler.cc =================================================================== ---- electron-17.1.0.orig/ui/gtk/gtk_key_bindings_handler.cc 2022-03-07 17:20:48.816886156 +0100 -+++ electron-17.1.0/ui/gtk/gtk_key_bindings_handler.cc 2022-03-09 08:25:10.346569313 +0100 -@@ -120,7 +120,7 @@ void GtkKeyBindingsHandler::HandlerClass - } - - GType GtkKeyBindingsHandler::HandlerGetType() { -- static volatile gsize type_id_volatile = 0; -+ static gsize type_id_volatile = 0; - if (g_once_init_enter(&type_id_volatile)) { - GType type_id = g_type_register_static_simple( - GTK_TYPE_TEXT_VIEW, g_intern_static_string("GtkKeyBindingsHandler"), -Index: electron-17.1.0/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc -=================================================================== --- electron-17.1.0.orig/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc 2022-03-07 17:20:31.788817015 +0100 +++ electron-17.1.0/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc 2022-03-09 08:25:10.346569313 +0100 @@ -2,6 +2,7 @@ @@ -88,18 +22,6 @@ Index: electron-17.1.0/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" #include "base/observer_list.h" -Index: electron-17.1.0/components/bookmarks/browser/bookmark_expanded_state_tracker.cc -=================================================================== ---- electron-17.1.0.orig/components/bookmarks/browser/bookmark_expanded_state_tracker.cc 2022-03-07 17:20:33.308823187 +0100 -+++ electron-17.1.0/components/bookmarks/browser/bookmark_expanded_state_tracker.cc 2022-03-09 08:25:10.346569313 +0100 -@@ -2,6 +2,7 @@ - // Use of this source code is governed by a BSD-style license that can be - // found in the LICENSE file. - -+#include - #include "components/bookmarks/browser/bookmark_expanded_state_tracker.h" - - #include Index: electron-17.1.0/components/bookmarks/browser/base_bookmark_model_observer.cc =================================================================== --- electron-17.1.0.orig/components/bookmarks/browser/base_bookmark_model_observer.cc 2022-03-07 17:20:33.308823187 +0100 diff --git a/chromium-norar.patch b/chromium-norar.patch deleted file mode 100644 index d164b87..0000000 --- a/chromium-norar.patch +++ /dev/null @@ -1,97 +0,0 @@ -Index: electron-17.1.0/chrome/common/safe_browsing/BUILD.gn -=================================================================== ---- electron-17.1.0.orig/chrome/common/safe_browsing/BUILD.gn 2022-03-07 17:20:32.164818543 +0100 -+++ electron-17.1.0/chrome/common/safe_browsing/BUILD.gn 2022-03-09 08:25:16.218473339 +0100 -@@ -58,39 +58,6 @@ if (safe_browsing_mode == 1) { - public_deps = [ "//components/safe_browsing/core/common/proto:csd_proto" ] - } - -- source_set("rar_analyzer") { -- sources = [ -- "rar_analyzer.cc", -- "rar_analyzer.h", -- ] -- -- deps = [ -- ":archive_analyzer_results", -- ":download_type_util", -- "//base", -- "//base:i18n", -- "//components/safe_browsing/content/common:file_type_policies", -- "//components/safe_browsing/core/common", -- "//third_party/unrar:unrar", -- ] -- -- defines = [ -- "_FILE_OFFSET_BITS=64", -- "LARGEFILE_SOURCE", -- "RAR_SMP", -- "SILENT", -- -- # The following is set to disable certain macro definitions in the unrar -- # source code. -- "CHROMIUM_UNRAR", -- -- # Disables exceptions in unrar, replaces them with process termination. -- "UNRAR_NO_EXCEPTIONS", -- ] -- -- public_deps = [ "//components/safe_browsing/core/common/proto:csd_proto" ] -- } -- - if (is_linux || is_win) { - source_set("document_analyzer") { - sources = [ -@@ -189,7 +156,6 @@ source_set("safe_browsing") { - ":archive_analyzer_results", - ":binary_feature_extractor", - ":download_type_util", -- ":rar_analyzer", - "//components/safe_browsing/core/common", - "//third_party/lzma_sdk/google:seven_zip_reader", - ] -Index: electron-17.1.0/chrome/common/safe_browsing/DEPS -=================================================================== ---- electron-17.1.0.orig/chrome/common/safe_browsing/DEPS 2022-03-07 17:20:32.164818543 +0100 -+++ electron-17.1.0/chrome/common/safe_browsing/DEPS 2022-03-09 08:25:16.218473339 +0100 -@@ -3,7 +3,6 @@ include_rules = [ - "+components/safe_browsing/core/common", - "+third_party/maldoca", - "+third_party/protobuf", -- "+third_party/unrar", - "+third_party/zlib", - "+third_party/lzma_sdk/google", - ] -Index: electron-17.1.0/chrome/services/file_util/BUILD.gn -=================================================================== ---- electron-17.1.0.orig/chrome/services/file_util/BUILD.gn 2022-03-07 17:20:32.260818933 +0100 -+++ electron-17.1.0/chrome/services/file_util/BUILD.gn 2022-03-09 08:25:16.218473339 +0100 -@@ -60,7 +60,6 @@ source_set("file_util") { - deps += [ - "//chrome/common/safe_browsing", - "//chrome/common/safe_browsing:archive_analyzer_results", -- "//chrome/common/safe_browsing:rar_analyzer", - ] - - if (is_linux || is_win) { -Index: electron-17.1.0/chrome/services/file_util/safe_archive_analyzer.cc -=================================================================== ---- electron-17.1.0.orig/chrome/services/file_util/safe_archive_analyzer.cc 2022-03-07 17:20:32.264818949 +0100 -+++ electron-17.1.0/chrome/services/file_util/safe_archive_analyzer.cc 2022-03-09 08:25:16.218473339 +0100 -@@ -44,12 +44,16 @@ void SafeArchiveAnalyzer::AnalyzeDmgFile - void SafeArchiveAnalyzer::AnalyzeRarFile(base::File rar_file, - base::File temporary_file, - AnalyzeRarFileCallback callback) { -+#if 0 - DCHECK(rar_file.IsValid()); - - safe_browsing::ArchiveAnalyzerResults results; - safe_browsing::rar_analyzer::AnalyzeRarFile( - std::move(rar_file), std::move(temporary_file), &results); - std::move(callback).Run(results); -+#else -+ NOTREACHED(); -+#endif - } - - void SafeArchiveAnalyzer::AnalyzeSevenZipFile( diff --git a/chromium-remove-bundled-roboto-font.patch b/chromium-remove-bundled-roboto-font.patch index f64b958..f16d16e 100644 --- a/chromium-remove-bundled-roboto-font.patch +++ b/chromium-remove-bundled-roboto-font.patch @@ -2,38 +2,36 @@ This font is already available in opensuse and can be installed systemwide --- a/ui/webui/resources/BUILD.gn 2022-06-15 15:58:23.822426713 +0200 +++ b/ui/webui/resources/BUILD.gn 2022-06-21 15:51:23.647223308 +0200 -@@ -36,17 +36,6 @@ - "$root_gen_dir/third_party/jstemplate/resources.grdp", - ] +@@ -36,16 +36,6 @@ + input_files = [ "test_loader.html" ] + input_files_base_dir = rebase_path(".", "//") - if (!is_chromeos_ash && !is_android) { - # Roboto Font. Roboto-Regular and Roboto-Light is already available on - # Android, and Roboto-Medium is not used on Android. All 6 weights of - # Roboto are available on Chrome OS. -- input_files_base_dir = rebase_path(".", "//") -- input_files = [ +- input_files += [ - "roboto/roboto-bold.woff2", - "roboto/roboto-medium.woff2", - "roboto/roboto-regular.woff2", - ] - } - if (include_polymer) { - public_deps += [ + public_deps = [ + "cr_elements:build_grdp", 'roboto.css' -> 'roboto.css.new' --- a/ui/webui/resources/css/roboto.css 2022-06-15 15:58:23.846426661 +0200 +++ b/ui/webui/resources/css/roboto.css 2022-06-21 15:53:08.931243442 +0200 -@@ -2,28 +2,3 @@ +@@ -2,26 +2,3 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -- -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 400; - src: local('Roboto'), local('Roboto-Regular'), -- url(chrome://resources/roboto/roboto-regular.woff2) format('woff2'); +- url(//resources/roboto/roboto-regular.woff2) format('woff2'); -} - -@font-face { @@ -41,7 +39,7 @@ This font is already available in opensuse and can be installed systemwide - font-style: normal; - font-weight: 500; - src: local('Roboto Medium'), local('Roboto-Medium'), -- url(chrome://resources/roboto/roboto-medium.woff2) format('woff2'); +- url(//resources/roboto/roboto-medium.woff2) format('woff2'); -} - -@font-face { @@ -49,6 +47,5 @@ This font is already available in opensuse and can be installed systemwide - font-style: normal; - font-weight: 700; - src: local('Roboto Bold'), local('Roboto-Bold'), -- url(chrome://resources/roboto/roboto-bold.woff2) format('woff2'); +- url(//resources/roboto/roboto-bold.woff2) format('woff2'); -} -- diff --git a/chromium-system-libusb.patch b/chromium-system-libusb.patch index 224f6ae..29461bb 100644 --- a/chromium-system-libusb.patch +++ b/chromium-system-libusb.patch @@ -32,8 +32,8 @@ Index: electron-16.0.6/build/linux/unbundle/replace_gn_files.py --- electron-16.0.6.orig/build/linux/unbundle/replace_gn_files.py 2022-01-10 16:06:45.861270275 +0100 +++ electron-16.0.6/build/linux/unbundle/replace_gn_files.py 2022-01-13 16:02:37.237389046 +0100 @@ -25,6 +25,7 @@ REPLACEMENTS = { + 'libevent': 'third_party/libevent/BUILD.gn', 'libjpeg': 'third_party/libjpeg.gni', - 'libjxl' : 'third_party/libjxl/BUILD.gn', 'libpng': 'third_party/libpng/BUILD.gn', + 'libusb': 'third_party/libusb/BUILD.gn', 'libvpx': 'third_party/libvpx/BUILD.gn', diff --git a/chromium-vaapi.patch b/chromium-vaapi.patch index d982f4e..0333cf3 100644 --- a/chromium-vaapi.patch +++ b/chromium-vaapi.patch @@ -3,8 +3,8 @@ Index: electron-17.1.0/chrome/browser/about_flags.cc --- electron-17.1.0.orig/chrome/browser/about_flags.cc 2022-03-07 17:20:30.424811477 +0100 +++ electron-17.1.0/chrome/browser/about_flags.cc 2022-03-09 08:25:19.662417046 +0100 @@ -3822,12 +3822,12 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kWebXrForceRuntimeDescription, kOsDesktop, - MULTI_VALUE_TYPE(kWebXrForceRuntimeChoices)}, + FEATURE_VALUE_TYPE(device::features::kWebXrSharedBuffers)}, + #endif // BUILDFLAG(IS_ANDROID) #endif // ENABLE_VR -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS_ASH) || (defined(OS_LINUX) && !defined(OS_ANDROID)) diff --git a/common.gypi-remove-fno-omit-frame-pointer.patch b/common.gypi-remove-fno-omit-frame-pointer.patch index c115658..ffc063c 100644 --- a/common.gypi-remove-fno-omit-frame-pointer.patch +++ b/common.gypi-remove-fno-omit-frame-pointer.patch @@ -4,11 +4,14 @@ since we compile everything with -fasynchronous-unwind-tables anyway. --- src/third_party/electron_node/common.gypi.old 2022-11-09 21:21:10.595238137 +0100 +++ src/third_party/electron_node/common.gypi 2022-11-09 22:07:29.480041964 +0100 -@@ -243,9 +243,6 @@ +@@ -243,12 +243,6 @@ # increase performance, number from experimentation 'cflags': [ '-qINLINE=::150:100000' ] }], - ['OS!="mac" and OS!="win" and OS!="zos"', { +- # -fno-omit-frame-pointer is necessary for the --perf_basic_prof +- # flag to work correctly. perf(1) gets confused about JS stack +- # frames otherwise, even with --call-graph dwarf. - 'cflags': [ '-fno-omit-frame-pointer' ], - }], ['OS=="linux"', { diff --git a/components-gcc13-missing-headers.patch b/components-gcc13-missing-headers.patch deleted file mode 100644 index 59cff9d..0000000 --- a/components-gcc13-missing-headers.patch +++ /dev/null @@ -1,70 +0,0 @@ ---- a/components/crash/core/app/crash_reporter_client.h -+++ b/components/crash/core/app/crash_reporter_client.h -@@ -5,6 +5,7 @@ - #ifndef COMPONENTS_CRASH_CORE_APP_CRASH_REPORTER_CLIENT_H_ - #define COMPONENTS_CRASH_CORE_APP_CRASH_REPORTER_CLIENT_H_ - -+#include - #include - #include - ---- src/components/feature_engagement/internal/event_storage_validator.h.old 2023-03-07 10:51:24.306756300 +0000 -+++ src/components/feature_engagement/internal/event_storage_validator.h 2023-03-08 19:07:07.780289000 +0000 -@@ -5,6 +5,7 @@ - #ifndef COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_EVENT_STORAGE_VALIDATOR_H_ - #define COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_EVENT_STORAGE_VALIDATOR_H_ - -+#include - #include - - namespace feature_engagement { ---- a/components/password_manager/core/browser/generation/password_generator.h -+++ b/components/password_manager/core/browser/generation/password_generator.h -@@ -5,6 +5,7 @@ - #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_GENERATION_PASSWORD_GENERATOR_H_ - #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_GENERATION_PASSWORD_GENERATOR_H_ - -+#include - #include - - ---- src/components/metrics/psi_memory_parser.h.old 2023-03-07 11:51:24.394756322 +0100 -+++ src/components/metrics/psi_memory_parser.h 2023-03-08 14:04:15.470128894 +0100 -@@ -5,6 +5,7 @@ - #ifndef COMPONENTS_METRICS_PSI_MEMORY_PARSER_H_ - #define COMPONENTS_METRICS_PSI_MEMORY_PARSER_H_ - -+#include - #include - - #include "base/gtest_prod_util.h" ---- src/components/soda/constants.h.old 2023-03-07 10:51:24.794756800 +0000 -+++ src/components/soda/constants.h 2023-03-08 20:58:33.789967200 +0000 -@@ -5,6 +5,7 @@ - #ifndef COMPONENTS_SODA_CONSTANTS_H_ - #define COMPONENTS_SODA_CONSTANTS_H_ - -+#include - #include - - #include "base/files/file_path.h" ---- src/components/viz/common/shared_element_resource_id.h.old 2023-03-07 10:51:25.094757000 +0000 -+++ src/components/viz/common/shared_element_resource_id.h 2023-03-08 22:10:33.253309800 +0000 -@@ -5,6 +5,7 @@ - #ifndef COMPONENTS_VIZ_COMMON_SHARED_ELEMENT_RESOURCE_ID_H_ - #define COMPONENTS_VIZ_COMMON_SHARED_ELEMENT_RESOURCE_ID_H_ - -+#include - #include - #include - ---- src/components/autofill/core/browser/autofill_ablation_study.h.old 2023-03-07 11:51:24.058756000 +0100 -+++ src/components/autofill/core/browser/autofill_ablation_study.h 2023-03-09 11:39:59.131542780 +0100 -@@ -5,6 +5,7 @@ - #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_ABLATION_STUDY_H_ - #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_ABLATION_STUDY_H_ - -+#include - #include - - class GURL; diff --git a/cpu-missing-uint8_t.patch b/cpu-missing-uint8_t.patch new file mode 100644 index 0000000..d814c80 --- /dev/null +++ b/cpu-missing-uint8_t.patch @@ -0,0 +1,10 @@ +--- src/base/cpu.h.old 2023-05-14 17:31:50.347217900 +0000 ++++ src/base/cpu.h 2023-05-14 20:13:48.498518900 +0000 +@@ -5,6 +5,7 @@ + #ifndef BASE_CPU_H_ + #define BASE_CPU_H_ + ++#include + #include + + #include "base/base_export.h" diff --git a/crashpad-elf_image_reader-ProgramHeaderTableSpecific-expected-unqualified-id.patch b/crashpad-elf_image_reader-ProgramHeaderTableSpecific-expected-unqualified-id.patch deleted file mode 100644 index 8c33f95..0000000 --- a/crashpad-elf_image_reader-ProgramHeaderTableSpecific-expected-unqualified-id.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 0acdadf032955add4a996332c19e08f7cecd7558 Mon Sep 17 00:00:00 2001 -From: Stephan Hartmann -Date: Fri, 30 Sep 2022 14:07:07 +0200 -Subject: [PATCH] snapshot: remove redundant template parameter - -GCC 12 does not allow it in C++20 mode anymore. - -Bug: chromium:819294 -Change-Id: I025dda8046739fefc4ff449d4496ef496374eff5 -Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3929186 -Commit-Queue: Mark Mentovai -Reviewed-by: Mark Mentovai ---- - snapshot/elf/elf_image_reader.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/snapshot/elf/elf_image_reader.cc b/snapshot/elf/elf_image_reader.cc -index 9d3ba43ab..30e8b987c 100644 ---- a/third_party/crashpad/crashpad/snapshot/elf/elf_image_reader.cc -+++ b/third_party/crashpad/crashpad/snapshot/elf/elf_image_reader.cc -@@ -56,14 +56,14 @@ template - class ElfImageReader::ProgramHeaderTableSpecific - : public ElfImageReader::ProgramHeaderTable { - public: -- ProgramHeaderTableSpecific() {} -+ ProgramHeaderTableSpecific() {} - -- ProgramHeaderTableSpecific( -+ ProgramHeaderTableSpecific( - const ProgramHeaderTableSpecific&) = delete; - ProgramHeaderTableSpecific& operator=( - const ProgramHeaderTableSpecific&) = delete; - -- ~ProgramHeaderTableSpecific() {} -+ ~ProgramHeaderTableSpecific() {} - - bool Initialize(const ProcessMemoryRange& memory, - VMAddress address, diff --git a/create_tarball.sh b/create_tarball.sh index 7d8d6c0..789d3a6 100644 --- a/create_tarball.sh +++ b/create_tarball.sh @@ -117,11 +117,12 @@ python3 src/tools/download_optimization_profile.py \ --output_name=src/chrome/android/profiles/afdo.prof \ --gs_url_base=chromeos-prebuilt/afdo-job/llvm -echo ">>>>>> Download pgo profiles" -python3 src/tools/update_pgo_profiles.py \ - --target=linux \ - update \ - --gs-url-base=chromium-optimization-profiles/pgo_profiles +# it hangs as of electron 23 and we don't use it anyway (needs clang) +#echo ">>>>>> Download pgo profiles" +#python3 src/tools/update_pgo_profiles.py \ +# --target=linux \ +# update \ +# --gs-url-base=chromium-optimization-profiles/pgo_profiles # Needed to get typescript compiler @@ -169,11 +170,10 @@ keeplibs=( net/third_party/uri_template #Derived code, not vendored dependency. third_party/abseil-cpp #15.4 and fc36 too old. third_party/angle # ANGLE is an integral part of chrome and is not available as a shared library. - third_party/angle/src/common/third_party/base #Derived code, not vendored dependency. - third_party/angle/src/common/third_party/smhasher ##Derived code, not vendored dependency. + third_party/angle/src/third_party/ceval #not in any distro third_party/angle/src/third_party/libXNVCtrl #Not in 15.4 - third_party/angle/src/third_party/trace_event #Does not seem to be a separate library. - third_party/angle/src/third_party/volk #Not in Factory or Rawhide. Debian has it as vulkan-volk, CONSIDER UNBUNDLING when we have it + third_party/angle/src/third_party/systeminfo #Derived code, not vendored dep. + third_party/angle/src/third_party/volk #replacement vulkan loader. Drop it when Leap has new enough libvulkan third_party/blink #Integral part of chrome third_party/boringssl #Factory has an ancient version, but upstream seems to have gave up on making it a shared library third_party/boringssl/src/third_party/fiat #Not in any distro @@ -206,7 +206,9 @@ keeplibs=( third_party/dawn/third_party/gn/webgpu-cts #Integral part of chrome, Needed even if you're building chrome without webgpu third_party/devtools-frontend #Javascript code, integral part of chrome third_party/devtools-frontend/src/front_end/third_party #various javascript code compiled into chrome, see README.md + third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/mitt third_party/devtools-frontend/src/test/unittests/front_end/third_party/i18n # javascript + third_party/devtools-frontend/src/third_party/i18n #javascript third_party/devtools-frontend/src/third_party/typescript #Chromium added code third_party/distributed_point_functions #not in any distro third_party/dom_distiller_js #javascript @@ -214,7 +216,7 @@ keeplibs=( third_party/electron_node #Integral part of electron third_party/emoji-segmenter #not available as a shared library third_party/fdlibm #derived code, not vendored dep - third_party/highway #Not in 15.4. Needed by libjxl + third_party/highway #Not in 15.4 third_party/hunspell #heavily forked version third_party/iccjpeg #not in any distro third_party/inspector_protocol #integral part of chrome @@ -231,15 +233,14 @@ keeplibs=( third_party/libaom/source/libaom/third_party/x86inc third_party/libavif #leap too old #third_party/libgav1 #Usage of private headers (ObuFrameHeader from utils/types.h) in VAAPI code only - third_party/libjxl #not in Leap third_party/libphonenumber #Depends on protobuf which cannot be unbundled third_party/libsrtp #Use of private headers. they were public in libsrtp1 third_party/libsync #not yet in any distro third_party/libudev #Headers for a optional delay-loaded dependency third_party/liburlpattern #Derived code, not vendored dep. third_party/libva_protected_content #ChromeOS header not available separately. needed for build. - #third_party/libvpx #Use of private headers in VAAPI code only. - #third_party/libvpx/source/libvpx/third_party/x86inc + third_party/libvpx #15.5/FC37 too old + third_party/libvpx/source/libvpx/third_party/x86inc third_party/libwebm #Usage of private headers (mkvparser/mkvmuxer) third_party/libx11 #Derived code, not vendored dep third_party/libxcb-keysyms #Derived code, not vendored dep @@ -250,10 +251,12 @@ keeplibs=( #third_party/maldoca #integral part of chrome, but not used in electron. #third_party/maldoca/src/third_party third_party/markupsafe #ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/usr/lib64/python3.10/site-packages/markupsafe/__init__.py). CONSIDER UNBUNDLING when jinja is fixed + third_party/material_color_utilities #not in any distro third_party/mesa_headers #ui/gl/gl_bindings.cc depends on GL_KHR_robustness not being defined. third_party/metrics_proto #integral part of chrome third_party/modp_b64 #not in Factory or Rawhide. pkgconfig(stringencoders) Mageia, AltLinux, Debian have it third_party/node #javascript code + third_party/omnibox_proto #integral part of chrome third_party/one_euro_filter #not in any distro third_party/openscreen #Integral part of chrome, needed even if you're building without. third_party/openscreen/src/third_party/mozilla #derived code, not vendored dependency @@ -304,7 +307,6 @@ keeplibs=( third_party/webrtc/rtc_base/third_party/sigslot #derived code, not vendored dep third_party/webrtc_overrides #Integral part of chrome third_party/widevine #Integral part of chrome. Needed. - third_party/wayland/stubs #added chromium code third_party/wayland/wayland_scanner_wrapper.py #wrapper script third_party/wayland-protocols/gtk/gdk/wayland/protocol #Imagine downloading 100MB of gtk source just to get one file. third_party/wayland-protocols/mesa #egl-wayland-devel (Fedora) / libnvidia-egl-wayland1 (Tumbleweed). 15.4 has an old version that misses the file we need. diff --git a/d0aa9ad.patch b/d0aa9ad.patch deleted file mode 100644 index cdc2d4e..0000000 --- a/d0aa9ad.patch +++ /dev/null @@ -1,30 +0,0 @@ -From d0aa9ad9447025a42f17df1b93bd71183e9b2d1f Mon Sep 17 00:00:00 2001 -From: Nicolas Capens -Date: Thu, 22 Dec 2022 01:46:20 -0500 -Subject: [PATCH] Support LLVM 16+ API change - -Bug: b/165000222 -Change-Id: I4a77e7740d0af3b72627db1bec7d3094c2e69d21 -Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/70528 -Tested-by: Nicolas Capens -Reviewed-by: Alexis Hétu -Kokoro-Result: kokoro -Commit-Queue: Alexis Hétu ---- - -diff --git src/third_party/swiftshader/src/Reactor/LLVMReactor.cpp src/third_party/swiftshader/src/Reactor/LLVMReactor.cpp -index 9a2cb0b..6f7e503 100644 ---- src/third_party/swiftshader/src/Reactor/LLVMReactor.cpp -+++ src/third_party/swiftshader/src/Reactor/LLVMReactor.cpp -@@ -621,7 +621,11 @@ - declaration = new llvm::AllocaInst(T(type), 0, (llvm::Value *)nullptr, align); - } - -+#if LLVM_VERSION_MAJOR >= 16 -+ declaration->insertInto(&entryBlock, entryBlock.begin()); -+#else - entryBlock.getInstList().push_front(declaration); -+#endif - - if(getPragmaState(InitializeLocalVariables)) - { diff --git a/disable-catapult.patch b/disable-catapult.patch index 5d37764..4a35a53 100644 --- a/disable-catapult.patch +++ b/disable-catapult.patch @@ -4,24 +4,24 @@ author: Michael Gilbert --- a/BUILD.gn +++ b/BUILD.gn @@ -242,7 +242,6 @@ group("gn_all") { - deps += [ - "//google_apis/gcm:mcs_probe", - "//media/cast:cast_unittests", -- "//third_party/catapult/telemetry:bitmaptools($host_toolchain)", - ] - if (!is_android) { - if (!is_castos) { -@@ -379,7 +378,6 @@ group("gn_all") { - "//services:services_junit_tests", - "//testing/android/junit:junit_unit_tests", - "//third_party/android_build_tools/lint:custom_lint_java", -- "//third_party/catapult/devil", - "//third_party/r8:custom_d8_java", - "//tools/android:android_tools", - "//tools/android:memconsumer", + if (!is_ios) { + deps += [ + "//google_apis/gcm:mcs_probe", +- "//third_party/catapult/telemetry:bitmaptools($host_toolchain)", + ] + if (!is_android) { + if (!is_castos) { +@@ -379,7 +378,6 @@ group("gn_all") { + "//testing/android/junit:junit_unit_tests", + "//third_party/android_build_tools/lint:custom_lint_java", + "//third_party/androidx_javascriptengine", +- "//third_party/catapult/devil", + "//third_party/r8:custom_d8_java", + "//tools/android:android_tools", + "//tools/android:memconsumer", @@ -1104,7 +1101,6 @@ if (!is_ios) { "//chrome:chrome", - "//chrome/test/chromedriver", + "//chrome/test/chromedriver:chromedriver_server", "//testing:test_scripts_shared", - "//third_party/catapult/third_party/typ", ] @@ -44,9 +44,9 @@ author: Michael Gilbert ] } @@ -1521,10 +1515,6 @@ if (!is_ios) { - "//third_party/blink/web_tests/StaleTestExpectations", "//third_party/blink/web_tests/TestExpectations", "//third_party/blink/web_tests/VirtualTestSuites", + "//third_party/blink/web_tests/W3CImportExpectations", - "//third_party/catapult/common/py_utils/", - "//third_party/catapult/devil/", - "//third_party/catapult/dependency_manager/", @@ -104,8 +104,8 @@ author: Michael Gilbert "//tools/grit/", - "//third_party/catapult/third_party/typ/", "//third_party/node/", - "//third_party/six/src/six.py", ] + } --- a/tools/metrics/BUILD.gn +++ b/tools/metrics/BUILD.gn @@ -45,7 +45,6 @@ group("metrics_python_tests") { @@ -158,17 +158,17 @@ author: Michael Gilbert - }, # END content/ section. - # START ios/web/ section. + # START "everything else" section. --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn @@ -2530,7 +2530,6 @@ source_set("browser") { - if (!is_android) { deps += [ + "//components/speech:speech", "//components/vector_icons", - "//content/browser/tracing:resources", ] - sources += [ - # Non-Android platforms that don't presently support + } + --- a/chrome/chrome_paks.gni +++ b/chrome/chrome_paks.gni @@ -168,7 +168,6 @@ template("chrome_extra_paks") { @@ -296,12 +296,12 @@ author: Michael Gilbert } @@ -607,7 +603,6 @@ if (rtc_include_tests && !build_with_chr - if (rtc_enable_protobuf) { - sources += [ "testsupport/perf_test_histogram_writer_unittest.cc" ] -- deps += [ "//third_party/catapult/tracing/tracing:histogram" ] - } + if (rtc_enable_protobuf) { + sources += [ "testsupport/perf_test_histogram_writer_unittest.cc" ] +- deps += [ "//third_party/catapult/tracing/tracing:histogram" ] + } - data = test_support_unittests_resources + data = test_support_unittests_resources --- a/tools/perf/core/perfetto_binary_roller/BUILD.gn +++ b/tools/perf/core/perfetto_binary_roller/BUILD.gn @@ -7,7 +7,6 @@ import("//build/util/generate_wrapper.gn diff --git a/disable-webspeech.patch b/disable-webspeech.patch index 8a0a140..a4f79e4 100644 --- a/disable-webspeech.patch +++ b/disable-webspeech.patch @@ -38,15 +38,11 @@ index 19b45dc1268..67dcd7752d0 100644 "speech/speech_synthesis_impl.cc", "speech/speech_synthesis_impl.h", "speech/tts_controller_impl.cc", -@@ -2956,21 +2951,6 @@ source_set("browser") { +@@ -2956,17 +2951,6 @@ source_set("browser") { "serial/serial_service.cc", "serial/serial_service.h", - # Most speech code is non-Android. -- "speech/audio_buffer.cc", -- "speech/audio_buffer.h", -- "speech/audio_encoder.cc", -- "speech/audio_encoder.h", - "speech/endpointer/endpointer.cc", - "speech/endpointer/endpointer.h", - "speech/endpointer/energy_endpointer.cc", @@ -60,20 +56,16 @@ index 19b45dc1268..67dcd7752d0 100644 "tracing/tracing_ui.cc", "tracing/tracing_ui.h", -@@ -2995,11 +2975,6 @@ source_set("browser") { - "webauth/virtual_fido_discovery_factory.cc", - "webauth/virtual_fido_discovery_factory.h", +@@ -2995,7 +2975,6 @@ source_set("browser") { ] -- -- deps += [ -- "//components/speech", -- "//third_party/flac", -- ] - } - if (is_mac) { + deps += [ +- "//components/speech:speech", + "//components/vector_icons", + ] + } @@ -3108,6 +3083,37 @@ source_set("browser") { - } + deps += [ "//ui/compositor" ] } + if (enable_web_speech) { @@ -125,7 +117,7 @@ index c5a6f0aea88..71d9bf41a71 100644 #include "content/browser/web_contents/file_chooser_impl.h" #include "content/browser/web_contents/web_contents_impl.h" @@ -144,7 +146,9 @@ - #include "third_party/blink/public/mojom/quota/quota_manager_host.mojom.h" + #include "third_party/blink/public/mojom/runtime_feature_state/runtime_feature_state_controller.mojom.h" #include "third_party/blink/public/mojom/sms/webotp_service.mojom.h" #include "third_party/blink/public/mojom/speculation_rules/speculation_rules.mojom.h" +#if BUILDFLAG(ENABLE_WEB_SPEECH) @@ -250,9 +242,9 @@ index 01e0910666e..6ce78127e3f 100644 --- a/media/BUILD.gn +++ b/media/BUILD.gn @@ -47,6 +47,7 @@ buildflag_header("media_buildflags") { - "ENABLE_OPENH264=$media_use_openh264", "ENABLE_PLATFORM_MPEG_H_AUDIO=$enable_platform_mpeg_h_audio", "ENABLE_MSE_MPEG2TS_STREAM_PARSER=$enable_mse_mpeg2ts_stream_parser", + "PLATFORM_HAS_OPTIONAL_HEVC_SUPPORT=$platform_has_optional_hevc_support", + "ENABLE_WEB_SPEECH=$enable_web_speech", "USE_ARC_PROTECTED_MEDIA=$use_arc_protected_media", "USE_CHROMEOS_MEDIA_ACCELERATION=$use_vaapi||$use_v4l2_codec", @@ -262,15 +254,38 @@ index 5667cac61f3..48ea95a99a6 100644 --- a/media/media_options.gni +++ b/media/media_options.gni @@ -66,6 +66,8 @@ declare_args() { - # still not supported. The actual support depends on platform capability. - enable_platform_encrypted_dolby_vision = false + # kAllowClearDolbyVisionInMseWhenPlatformEncryptedDvEnabled. + enable_platform_encrypted_dolby_vision = proprietary_codecs && is_win + enable_web_speech = true + - # Enable HLS with SAMPLE-AES decryption. - # - # TODO(crbug.com/1329657): Remove the `is_fuchsia` condition once fuchsia + # Enable logging override, e.g. enable DVLOGs through level 2 at build time. + # On Cast devices, these are logged as INFO. + # When enabled on Fuchsia, these are logged as VLOGs. -- cgit v1.2.1 +--- src/components/speech/BUILD.gn.old 2023-05-13 15:23:05.850506351 +0200 ++++ src/components/speech/BUILD.gn 2023-05-14 14:39:12.182694489 +0200 +@@ -4,12 +4,6 @@ + + source_set("speech") { + sources = [ +- "audio_buffer.cc", +- "audio_buffer.h", +- "audio_encoder.cc", +- "audio_encoder.h", +- "chunked_byte_buffer.cc", +- "chunked_byte_buffer.h", + "downstream_loader.cc", + "downstream_loader.h", + "downstream_loader_client.h", +@@ -24,7 +18,6 @@ + "//mojo/public/cpp/system", + "//services/network/public/cpp", + "//services/network/public/mojom", +- "//third_party/flac", + ] + } + diff --git a/document_loader-private-DecodedBodyData.patch b/document_loader-private-DecodedBodyData.patch deleted file mode 100644 index 62281ad..0000000 --- a/document_loader-private-DecodedBodyData.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 82827b0a8683c5c9c7285db48cefb7fa8ea92ffe Mon Sep 17 00:00:00 2001 -From: Jose Dapena Paz -Date: Thu, 20 Oct 2022 16:27:27 +0000 -Subject: [PATCH] GCC: declare DocumentLoader::DecodedBodyData as public - -Fix build with GCC as DocumentLoader::DecodedBodyData was not -declaring SameSizeAsDocumentLoader. This works in Clang because -declaring it as friend of DocumentLoader implicitly declares it -as friend of its class members. But GCC does not accept that. - -Bug: 819294 -Change-Id: Iba6a4138fbd90831e7a65fae8445ad4b1736594f -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3963839 -Commit-Queue: José Dapena Paz -Reviewed-by: Nate Chapin -Cr-Commit-Position: refs/heads/main@{#1061645} ---- - -diff --git a/third_party/blink/renderer/core/loader/document_loader.h b/third_party/blink/renderer/core/loader/document_loader.h -index b22fe2a..37a4230 100644 ---- a/third_party/blink/renderer/core/loader/document_loader.h -+++ b/third_party/blink/renderer/core/loader/document_loader.h -@@ -434,6 +434,11 @@ - const KURL& url, - const ResourceResponse& response); - -+ // This needs to be kept as public to be accessible from -+ // SameSizeAsDocumentLoader as GCC will fail to allow access -+ // even if it is friend of DocumentLoader -+ class DecodedBodyData; -+ - protected: - // Based on its MIME type, if the main document's response corresponds to an - // MHTML archive, then every resources will be loaded from this archive. -@@ -465,7 +470,6 @@ - friend struct SameSizeAsDocumentLoader; - class BodyData; - class EncodedBodyData; -- class DecodedBodyData; - - Frame* CalculateOwnerFrame(); - scoped_refptr CalculateOrigin(Document* owner_document); diff --git a/effect_paint_property_node-Wchanges-meaning.patch b/effect_paint_property_node-Wchanges-meaning.patch deleted file mode 100644 index fa85337..0000000 --- a/effect_paint_property_node-Wchanges-meaning.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/third_party/blink/renderer/platform/graphics/paint/effect_paint_property_node.h.old 2023-03-07 11:51:28.326760100 +0100 -+++ src/third_party/blink/renderer/platform/graphics/paint/effect_paint_property_node.h 2023-03-09 21:56:47.418863400 +0100 -@@ -122,7 +122,7 @@ - - // An identifier for a document transition shared element. `id.valid()` - // returns true if this has been set, and false otherwise. -- DocumentTransitionSharedElementId document_transition_shared_element_id; -+ blink::DocumentTransitionSharedElementId document_transition_shared_element_id; - - // An identifier to tag shared element resources generated and cached in the - // Viz process. This generated resource can be used as content for other diff --git a/electron-13-fix-sql-virtualcursor-type.patch b/electron-13-fix-sql-virtualcursor-type.patch deleted file mode 100644 index 86dc583..0000000 --- a/electron-13-fix-sql-virtualcursor-type.patch +++ /dev/null @@ -1,238 +0,0 @@ -From 80368f8ba7a8bab13440463a254888311efe3986 Mon Sep 17 00:00:00 2001 -From: Stephan Hartmann -Date: Tue, 4 May 2021 15:00:19 +0000 -Subject: [PATCH] sql: make VirtualCursor standard layout type - -sql::recover::VirtualCursor needs to be a standard layout type, but -has members of type std::unique_ptr. However, std::unique_ptr is not -guaranteed to be standard layout. Compiling with clang combined with -gcc-11 libstdc++ fails because of this. Replace std::unique_ptr with -raw pointers. - -Bug: 1189788 -Change-Id: Ia6dc388cc5ef1c0f2afc75f8ca45b9f12687ca9c ---- - sql/recover_module/btree.cc | 21 +++++++++++++++------ - sql/recover_module/btree.h | 17 +++++++++++++---- - sql/recover_module/cursor.cc | 24 ++++++++++++------------ - sql/recover_module/cursor.h | 2 +- - sql/recover_module/pager.cc | 7 +++---- - sql/recover_module/pager.h | 5 +++-- - 6 files changed, 47 insertions(+), 29 deletions(-) - -Index: electron-17.1.0/sql/recover_module/btree.cc -=================================================================== ---- electron-17.1.0.orig/sql/recover_module/btree.cc 2022-03-07 17:20:37.440839965 +0100 -+++ electron-17.1.0/sql/recover_module/btree.cc 2022-03-09 08:27:33.744217386 +0100 -@@ -136,16 +136,25 @@ static_assert(std::is_trivially_destruct - "Move the destructor to the .cc file if it's non-trival"); - #endif // !DCHECK_IS_ON() - --LeafPageDecoder::LeafPageDecoder(DatabasePageReader* db_reader) noexcept -- : page_id_(db_reader->page_id()), -- db_reader_(db_reader), -- cell_count_(ComputeCellCount(db_reader)), -- next_read_index_(0), -- last_record_size_(0) { -+void LeafPageDecoder::Initialize(DatabasePageReader* db_reader) { -+ DCHECK(db_reader); - DCHECK(IsOnValidPage(db_reader)); -+ page_id_ = db_reader->page_id(); -+ db_reader_ = db_reader; -+ cell_count_ = ComputeCellCount(db_reader); -+ next_read_index_ = 0; -+ last_record_size_ = 0; - DCHECK(DatabasePageReader::IsValidPageId(page_id_)); - } - -+void LeafPageDecoder::Reset() { -+ db_reader_ = nullptr; -+ page_id_ = 0; -+ cell_count_ = 0; -+ next_read_index_ = 0; -+ last_record_size_ = 0; -+} -+ - bool LeafPageDecoder::TryAdvance() { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - DCHECK(CanAdvance()); -Index: electron-17.1.0/sql/recover_module/btree.h -=================================================================== ---- electron-17.1.0.orig/sql/recover_module/btree.h 2022-03-07 17:20:37.440839965 +0100 -+++ electron-17.1.0/sql/recover_module/btree.h 2022-03-09 08:27:33.744217386 +0100 -@@ -103,7 +103,7 @@ class LeafPageDecoder { - // - // |db_reader| must have been used to read an inner page of a table B-tree. - // |db_reader| must outlive this instance. -- explicit LeafPageDecoder(DatabasePageReader* db_reader) noexcept; -+ explicit LeafPageDecoder() noexcept = default; - ~LeafPageDecoder() noexcept = default; - - LeafPageDecoder(const LeafPageDecoder&) = delete; -@@ -151,6 +151,15 @@ class LeafPageDecoder { - // read as long as CanAdvance() returns true. - bool TryAdvance(); - -+ // Initialize with DatabasePageReader -+ void Initialize(DatabasePageReader* db_reader); -+ -+ // Reset internal DatabasePageReader -+ void Reset(); -+ -+ // True if DatabasePageReader is valid -+ bool IsValid() { return (db_reader_ != nullptr); } -+ - // True if the given reader may point to an inner page in a table B-tree. - // - // The last ReadPage() call on |db_reader| must have succeeded. -@@ -164,14 +173,14 @@ class LeafPageDecoder { - static int ComputeCellCount(DatabasePageReader* db_reader); - - // The number of the B-tree page this reader is reading. -- const int64_t page_id_; -+ int64_t page_id_; - // Used to read the tree page. - // - // Raw pointer usage is acceptable because this instance's owner is expected - // to ensure that the DatabasePageReader outlives this. -- DatabasePageReader* const db_reader_; -+ DatabasePageReader* db_reader_; - // Caches the ComputeCellCount() value for this reader's page. -- const int cell_count_ = ComputeCellCount(db_reader_); -+ int cell_count_; - - // The reader's cursor state. - // -Index: electron-17.1.0/sql/recover_module/cursor.cc -=================================================================== ---- electron-17.1.0.orig/sql/recover_module/cursor.cc 2022-03-07 17:20:37.440839965 +0100 -+++ electron-17.1.0/sql/recover_module/cursor.cc 2022-03-09 08:27:33.744217386 +0100 -@@ -28,7 +28,7 @@ VirtualCursor::~VirtualCursor() { - int VirtualCursor::First() { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - inner_decoders_.clear(); -- leaf_decoder_ = nullptr; -+ leaf_decoder_.Reset(); - - AppendPageDecoder(table_->root_page_id()); - return Next(); -@@ -38,18 +38,18 @@ int VirtualCursor::Next() { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - record_reader_.Reset(); - -- while (!inner_decoders_.empty() || leaf_decoder_.get()) { -- if (leaf_decoder_.get()) { -- if (!leaf_decoder_->CanAdvance()) { -+ while (!inner_decoders_.empty() || leaf_decoder_.IsValid()) { -+ if (leaf_decoder_.IsValid()) { -+ if (!leaf_decoder_.CanAdvance()) { - // The leaf has been exhausted. Remove it from the DFS stack. -- leaf_decoder_ = nullptr; -+ leaf_decoder_.Reset(); - continue; - } -- if (!leaf_decoder_->TryAdvance()) -+ if (!leaf_decoder_.TryAdvance()) - continue; - -- if (!payload_reader_.Initialize(leaf_decoder_->last_record_size(), -- leaf_decoder_->last_record_offset())) { -+ if (!payload_reader_.Initialize(leaf_decoder_.last_record_size(), -+ leaf_decoder_.last_record_offset())) { - continue; - } - if (!record_reader_.Initialize()) -@@ -101,13 +101,13 @@ int VirtualCursor::ReadColumn(int column - int64_t VirtualCursor::RowId() { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - DCHECK(record_reader_.IsInitialized()); -- DCHECK(leaf_decoder_.get()); -- return leaf_decoder_->last_record_rowid(); -+ DCHECK(leaf_decoder_.IsValid()); -+ return leaf_decoder_.last_record_rowid(); - } - - void VirtualCursor::AppendPageDecoder(int page_id) { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); -- DCHECK(leaf_decoder_.get() == nullptr) -+ DCHECK(!leaf_decoder_.IsValid()) - << __func__ - << " must only be called when the current path has no leaf decoder"; - -@@ -115,7 +115,7 @@ void VirtualCursor::AppendPageDecoder(in - return; - - if (LeafPageDecoder::IsOnValidPage(&db_reader_)) { -- leaf_decoder_ = std::make_unique(&db_reader_); -+ leaf_decoder_.Initialize(&db_reader_); - return; - } - -Index: electron-17.1.0/sql/recover_module/cursor.h -=================================================================== ---- electron-17.1.0.orig/sql/recover_module/cursor.h 2022-03-07 17:20:37.440839965 +0100 -+++ electron-17.1.0/sql/recover_module/cursor.h 2022-03-09 08:27:33.744217386 +0100 -@@ -130,7 +130,7 @@ class VirtualCursor { - std::vector> inner_decoders_; - - // Decodes the leaf page containing records. -- std::unique_ptr leaf_decoder_; -+ LeafPageDecoder leaf_decoder_; - - SEQUENCE_CHECKER(sequence_checker_); - }; -Index: electron-17.1.0/sql/recover_module/pager.cc -=================================================================== ---- electron-17.1.0.orig/sql/recover_module/pager.cc 2022-03-07 17:20:37.440839965 +0100 -+++ electron-17.1.0/sql/recover_module/pager.cc 2022-03-09 08:27:33.744217386 +0100 -@@ -23,8 +23,7 @@ static_assert(DatabasePageReader::kMaxPa - "ints are not appropriate for representing page IDs"); - - DatabasePageReader::DatabasePageReader(VirtualTable* table) -- : page_data_(std::make_unique(table->page_size())), -- table_(table) { -+ : page_data_(), table_(table) { - DCHECK(table != nullptr); - DCHECK(IsValidPageSize(table->page_size())); - } -@@ -57,8 +56,8 @@ int DatabasePageReader::ReadPage(int pag - std::numeric_limits::max(), - "The |read_offset| computation above may overflow"); - -- int sqlite_status = -- RawRead(sqlite_file, read_size, read_offset, page_data_.get()); -+ int sqlite_status = RawRead(sqlite_file, read_size, read_offset, -+ const_cast(page_data_.data())); - - // |page_id_| needs to be set to kInvalidPageId if the read failed. - // Otherwise, future ReadPage() calls with the previous |page_id_| value -Index: electron-17.1.0/sql/recover_module/pager.h -=================================================================== ---- electron-17.1.0.orig/sql/recover_module/pager.h 2022-03-07 17:20:37.440839965 +0100 -+++ electron-17.1.0/sql/recover_module/pager.h 2022-03-09 08:27:33.744217386 +0100 -@@ -5,6 +5,7 @@ - #ifndef SQL_RECOVER_MODULE_PAGER_H_ - #define SQL_RECOVER_MODULE_PAGER_H_ - -+#include - #include - #include - #include -@@ -72,7 +73,7 @@ class DatabasePageReader { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - DCHECK_NE(page_id_, kInvalidPageId) - << "Successful ReadPage() required before accessing pager state"; -- return page_data_.get(); -+ return page_data_.data(); - } - - // The number of bytes in the page read by the last ReadPage() call. -@@ -139,7 +140,7 @@ class DatabasePageReader { - int page_id_ = kInvalidPageId; - // Stores the bytes of the last page successfully read by ReadPage(). - // The content is undefined if the last call to ReadPage() did not succeed. -- const std::unique_ptr page_data_; -+ const std::array page_data_; - // Raw pointer usage is acceptable because this instance's owner is expected - // to ensure that the VirtualTable outlives this. - const raw_ptr table_; diff --git a/electron-16-third_party-symbolize-missing-include.patch b/electron-16-third_party-symbolize-missing-include.patch index 9ca23f2..38ac07b 100644 --- a/electron-16-third_party-symbolize-missing-include.patch +++ b/electron-16-third_party-symbolize-missing-include.patch @@ -3,8 +3,8 @@ Index: electron-16.0.9/base/third_party/symbolize/symbolize.h --- electron-16.0.9.orig/base/third_party/symbolize/symbolize.h 2022-02-16 17:58:59.209168086 +0100 +++ electron-16.0.9/base/third_party/symbolize/symbolize.h 2022-02-17 08:39:25.070959581 +0100 @@ -54,6 +54,8 @@ - #ifndef BASE_SYMBOLIZE_H_ - #define BASE_SYMBOLIZE_H_ + + #include // for ssize_t +#include + diff --git a/electron-22.3.23.tar.zst b/electron-22.3.23.tar.zst deleted file mode 100644 index 732b32a..0000000 --- a/electron-22.3.23.tar.zst +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:87e7cb24211d6c18b643c59d6019cbefeb1166332628592eb7ef7cdb397b6c90 -size 530253814 diff --git a/electron-24-components-missing-headers.patch b/electron-24-components-missing-headers.patch new file mode 100644 index 0000000..dc4ae02 --- /dev/null +++ b/electron-24-components-missing-headers.patch @@ -0,0 +1,20 @@ +--- src/components/services/app_service/public/cpp/intent_filter.h.old 2023-05-14 17:31:53.807216000 +0000 ++++ src/components/services/app_service/public/cpp/intent_filter.h 2023-05-14 20:08:25.985533800 +0000 +@@ -5,6 +5,7 @@ + #ifndef COMPONENTS_SERVICES_APP_SERVICE_PUBLIC_CPP_INTENT_FILTER_H_ + #define COMPONENTS_SERVICES_APP_SERVICE_PUBLIC_CPP_INTENT_FILTER_H_ + ++#include + #include + #include + #include +--- src/components/services/app_service/public/cpp/permission.h.old 2023-05-14 17:31:53.811216000 +0000 ++++ src/components/services/app_service/public/cpp/permission.h 2023-05-14 21:03:46.556546200 +0000 +@@ -5,6 +5,7 @@ + #ifndef COMPONENTS_SERVICES_APP_SERVICE_PUBLIC_CPP_PERMISSION_H_ + #define COMPONENTS_SERVICES_APP_SERVICE_PUBLIC_CPP_PERMISSION_H_ + ++#include + #include + #include + diff --git a/electron-25.8.0.tar.zst b/electron-25.8.0.tar.zst new file mode 100644 index 0000000..30b9882 --- /dev/null +++ b/electron-25.8.0.tar.zst @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4716f841febdc38dbd5dff5d7bfa412c93d04aefb78e3eecd41e9dce9f037102 +size 528971074 diff --git a/electron_api_app-GetPathConstant-non-constexpr.patch b/electron_api_app-GetPathConstant-non-constexpr.patch new file mode 100644 index 0000000..bfc6335 --- /dev/null +++ b/electron_api_app-GetPathConstant-non-constexpr.patch @@ -0,0 +1,23 @@ +[ 8128s] ../../electron/shell/browser/api/electron_api_app.cc: In function 'constexpr int electron::api::{anonymous}::GetPathConstant(base::StringPiece)': +[ 8128s] ../../electron/shell/browser/api/electron_api_app.cc:507:33: error: call to non-'constexpr' function 'base::internal::flat_tree::const_iterator base::internal::flat_tree::find(const Key&) const [with Key = base::BasicStringPiece; GetKeyFromValue = base::internal::GetFirst; KeyCompare = std::less; Container = std::array, int>, 18>; const_iterator = const std::pair, int>*]' +[ 8128s] 507 | const auto* iter = Lookup.find(name); +[ 8128s] | ~~~~~~~~~~~^~~~~~ +[ 8128s] In file included from ../../base/containers/flat_set.h:11, +[ 8128s] from ../../base/containers/id_map.h:20, +[ 8128s] from ../../content/public/browser/render_process_host.h:16: +[ 8128s] ../../base/containers/flat_tree.h:984:6: note: 'base::internal::flat_tree::const_iterator base::internal::flat_tree::find(const Key&) const [with Key = base::BasicStringPiece; GetKeyFromValue = base::internal::GetFirst; KeyCompare = std::less; Container = std::array, int>, 18>; const_iterator = const std::pair, int>*]' declared here +[ 8128s] 984 | auto flat_tree::find( +[ 8128s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +--- src/electron/shell/browser/api/electron_api_app.cc.old 2023-08-31 17:37:41.267399900 +0000 ++++ src/electron/shell/browser/api/electron_api_app.cc 2023-09-03 10:12:16.007253000 +0000 +@@ -474,7 +474,7 @@ IconLoader::IconSize GetIconSizeByString + } + + // Return the path constant from string. +-constexpr int GetPathConstant(base::StringPiece name) { ++int GetPathConstant(base::StringPiece name) { + // clang-format off + constexpr auto Lookup = base::MakeFixedFlatMapSorted({ + {"appData", DIR_APP_DATA}, diff --git a/electron_browser_context-missing-variant.patch b/electron_browser_context-missing-variant.patch new file mode 100644 index 0000000..e559060 --- /dev/null +++ b/electron_browser_context-missing-variant.patch @@ -0,0 +1,10 @@ +--- src/electron/shell/browser/electron_browser_context.h.old 2023-08-31 17:37:41.299415900 +0000 ++++ src/electron/shell/browser/electron_browser_context.h 2023-09-03 09:51:24.663398000 +0000 +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + #include + + #include "base/memory/weak_ptr.h" diff --git a/electron_serial_delegate-ambiguous-Observer.patch b/electron_serial_delegate-ambiguous-Observer.patch deleted file mode 100644 index 4e63270..0000000 --- a/electron_serial_delegate-ambiguous-Observer.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/electron/shell/browser/serial/electron_serial_delegate.h 2022-09-16 12:31:19.704082600 +0200 -+++ b/electron/shell/browser/serial/electron_serial_delegate.h 2022-09-16 21:30:57.247975900 +0200 -@@ -38,9 +38,9 @@ - device::mojom::SerialPortManager* GetPortManager( - content::RenderFrameHost* frame) override; - void AddObserver(content::RenderFrameHost* frame, -- Observer* observer) override; -+ content::SerialDelegate::Observer* observer) override; - void RemoveObserver(content::RenderFrameHost* frame, -- Observer* observer) override; -+ content::SerialDelegate::Observer* observer) override; - - void DeleteControllerForFrame(content::RenderFrameHost* render_frame_host); - diff --git a/enable-jxl.patch b/enable-jxl.patch deleted file mode 100644 index 43875a5..0000000 --- a/enable-jxl.patch +++ /dev/null @@ -1,13 +0,0 @@ -Enable JXL imageformat support, it is exposed by element-desktop. - ---- a/third_party/blink/common/features.cc -+++ b/third_party/blink/common/features.cc -@@ -767,7 +767,7 @@ - "delay-in-ms", 0}; - - // Enables the JPEG XL Image File Format (JXL). --BASE_FEATURE(kJXL, "JXL", base::FEATURE_DISABLED_BY_DEFAULT); -+BASE_FEATURE(kJXL, "JXL", base::FEATURE_ENABLED_BY_DEFAULT); - - // Make all pending 'display: auto' web fonts enter the swap or failure period - // immediately before reaching the LCP time limit (~2500ms), so that web fonts diff --git a/extensions-gcc13-missing-headers.patch b/extensions-gcc13-missing-headers.patch deleted file mode 100644 index 27f06da..0000000 --- a/extensions-gcc13-missing-headers.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- src/extensions/common/constants.h.old 2023-03-07 10:51:25.826757700 +0000 -+++ src/extensions/common/constants.h 2023-03-08 16:42:05.632267700 +0000 -@@ -5,6 +5,9 @@ - #ifndef EXTENSIONS_COMMON_CONSTANTS_H_ - #define EXTENSIONS_COMMON_CONSTANTS_H_ - -+#include -+#include -+ - #include "base/files/file_path.h" - #include "base/strings/string_piece_forward.h" - #include "build/chromeos_buildflags.h" ---- src/extensions/renderer/bindings/api_invocation_errors.h.old 2023-03-07 10:51:25.838757800 +0000 -+++ src/extensions/renderer/bindings/api_invocation_errors.h 2023-03-09 17:57:28.682181200 +0000 -@@ -5,6 +5,7 @@ - #ifndef EXTENSIONS_RENDERER_BINDINGS_API_INVOCATION_ERRORS_H_ - #define EXTENSIONS_RENDERER_BINDINGS_API_INVOCATION_ERRORS_H_ - -+#include - #include - #include - diff --git a/first_party_set_parser-IssueWithMetadata-no-known-conversion.patch b/first_party_set_parser-IssueWithMetadata-no-known-conversion.patch deleted file mode 100644 index e9d5dd2..0000000 --- a/first_party_set_parser-IssueWithMetadata-no-known-conversion.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- src/content/browser/first_party_sets/first_party_set_parser.cc.old 2022-11-30 11:28:02.726199100 +0100 -+++ src/content/browser/first_party_sets/first_party_set_parser.cc 2022-12-01 06:53:17.058993800 +0100 -@@ -182,7 +182,7 @@ - ParseSiteAndValidate(item, set_entries, elements, emit_errors); - if (!alias_or_error.has_value()) { - return base::unexpected( -- ParseError(alias_or_error.error(), {kCCTLDsField, site, i})); -+ ParseError(alias_or_error.error(), {kCCTLDsField, site, static_cast(i)})); - } - - const net::SchemefulSite alias = alias_or_error.value(); -@@ -195,7 +195,7 @@ - if (warnings) { - warnings->push_back( - ParseWarning(ParseWarningType::kAliasNotCctldVariant, -- {kCCTLDsField, site, i})); -+ {kCCTLDsField, site, static_cast(i)})); - } - continue; - } -@@ -230,7 +230,7 @@ - base::expected site_or_error = - ParseSiteAndValidate(item, set_entries, other_sets_sites, emit_errors); - if (!site_or_error.has_value()) -- return ParseError(site_or_error.error(), {descriptor.field_name, index}); -+ return ParseError(site_or_error.error(), {descriptor.field_name, static_cast(index)}); - if (exempt_from_limits || !descriptor.size_limit.has_value() || - static_cast(index) < descriptor.size_limit.value()) { - set_entries.emplace_back( diff --git a/gcc-enable-lto.patch b/gcc-enable-lto.patch index 6783ad4..f16ea3e 100644 --- a/gcc-enable-lto.patch +++ b/gcc-enable-lto.patch @@ -12,7 +12,7 @@ Index: electron-17.1.0/build/config/BUILDCONFIG.gn is_clang = current_os != "linux" || (current_cpu != "s390x" && current_cpu != "s390" && @@ -352,6 +354,12 @@ default_compiler_configs = [ - "//electron/build/config:mas_build", + "//build/config/sanitizers:default_sanitizer_flags", ] +if (gcc_lto) { @@ -38,6 +38,4 @@ Index: electron-17.1.0/build/config/compiler/BUILD.gn + config("default_stack_frames") { } config("xdefault_stack_frames") { - if (is_posix || is_fuchsia) { -Index: electron-17.1.0/sandbox/linux/BUILD.gn -=================================================================== + if (!is_win) { diff --git a/gpu_feature_info-missing-uint32_t.patch b/gpu_feature_info-missing-uint32_t.patch deleted file mode 100644 index 94444b5..0000000 --- a/gpu_feature_info-missing-uint32_t.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- src/gpu/config/gpu_feature_info.h.old 2023-03-07 10:51:25.926757800 +0000 -+++ src/gpu/config/gpu_feature_info.h 2023-03-09 05:36:10.635812200 +0000 -@@ -5,6 +5,7 @@ - #ifndef GPU_CONFIG_GPU_FEATURE_INFO_H_ - #define GPU_CONFIG_GPU_FEATURE_INFO_H_ - -+#include - #include - #include - diff --git a/half_float-Wstrict-aliasing.patch b/half_float-Wstrict-aliasing.patch deleted file mode 100644 index 3a03064..0000000 --- a/half_float-Wstrict-aliasing.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- src/ui/gfx/half_float.cc.orig 2022-10-12 18:06:39.635381500 +0200 -+++ src/ui/gfx/half_float.cc 2022-10-19 21:43:26.484063300 +0200 -@@ -2,6 +2,8 @@ - // Use of this source code is governed by a BSD-style license that can be - // found in the LICENSE file. - -+#include -+ - #include "ui/gfx/half_float.h" - - namespace gfx { -@@ -9,7 +11,9 @@ - void FloatToHalfFloat(const float* input, HalfFloat* output, size_t num) { - for (size_t i = 0; i < num; i++) { - float tmp = input[i] * 1.9259299444e-34f; -- uint32_t tmp2 = *reinterpret_cast(&tmp) + (1 << 12); -+ uint32_t tmp2; -+ std::memcpy(&tmp2, &tmp, 4); -+ tmp2 += (1 << 12); - output[i] = (tmp2 & 0x80000000UL) >> 16 | (tmp2 >> 13); - } - } diff --git a/harfbuzz-replace-HbScopedPointer.patch b/harfbuzz-replace-HbScopedPointer.patch new file mode 100644 index 0000000..ade5e6a --- /dev/null +++ b/harfbuzz-replace-HbScopedPointer.patch @@ -0,0 +1,98 @@ +From 5fcaeafcab5460ea65e4a7bdee6589002adf74d2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dominik=20R=C3=B6ttsches?= +Date: Mon, 13 Feb 2023 13:26:16 +0000 +Subject: [PATCH] Use hb::unique_ptr instead of custom HbScopedPointer +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This was an earlier local RAII implementation that we no longer need now +that HarfBuzz provides helpers for this. + +Change-Id: Idc47ce2717c75556acb03e2ccccb50ec87ed3cca +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4239980 +Reviewed-by: Munira Tursunova +Commit-Queue: Dominik Röttsches +Cr-Commit-Position: refs/heads/main@{#1104453} +--- + .../platform/fonts/shaping/harfbuzz_shaper.cc | 39 ++++--------------- + 1 file changed, 7 insertions(+), 32 deletions(-) + +diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc +index c165a1703395a..dc1377a90a9f7 100644 +--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc ++++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc +@@ -35,6 +35,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -190,32 +191,6 @@ struct ReshapeQueueItem { + : action_(action), start_index_(start), num_characters_(num) {} + }; + +-template +-class HarfBuzzScopedPtr { +- STACK_ALLOCATED(); +- +- public: +- typedef void (*DestroyFunction)(T*); +- +- HarfBuzzScopedPtr(T* ptr, DestroyFunction destroy) +- : ptr_(ptr), destroy_(destroy) { +- DCHECK(destroy_); +- } +- HarfBuzzScopedPtr(const HarfBuzzScopedPtr&) = delete; +- HarfBuzzScopedPtr& operator=(const HarfBuzzScopedPtr&) = delete; +- ~HarfBuzzScopedPtr() { +- if (ptr_) +- (*destroy_)(ptr_); +- } +- +- T* Get() { return ptr_; } +- void Set(T* ptr) { ptr_ = ptr; } +- +- private: +- T* ptr_; +- DestroyFunction destroy_; +-}; +- + struct RangeData { + STACK_ALLOCATED(); + +@@ -908,8 +883,8 @@ scoped_refptr HarfBuzzShaper::Shape(const Font* font, + scoped_refptr result = + ShapeResult::Create(font, start, length, direction); + +- HarfBuzzScopedPtr buffer(hb_buffer_create(), hb_buffer_destroy); +- RangeData range_data = CreateRangeData(font, direction, buffer.Get()); ++ hb::unique_ptr buffer(hb_buffer_create()); ++ RangeData range_data = CreateRangeData(font, direction, buffer.get()); + range_data.start = start; + range_data.end = end; + +@@ -965,8 +940,8 @@ scoped_refptr HarfBuzzShaper::Shape( + scoped_refptr result = + ShapeResult::Create(font, start, length, direction); + +- HarfBuzzScopedPtr buffer(hb_buffer_create(), hb_buffer_destroy); +- RangeData range_data = CreateRangeData(font, direction, buffer.Get()); ++ hb::unique_ptr buffer(hb_buffer_create()); ++ RangeData range_data = CreateRangeData(font, direction, buffer.get()); + + for (const RunSegmenter::RunSegmenterRange& segmented_range : ranges) { + DCHECK_GE(segmented_range.end, segmented_range.start); +@@ -1001,8 +976,8 @@ scoped_refptr HarfBuzzShaper::Shape( + scoped_refptr result = + ShapeResult::Create(font, start, length, direction); + +- HarfBuzzScopedPtr buffer(hb_buffer_create(), hb_buffer_destroy); +- RangeData range_data = CreateRangeData(font, direction, buffer.Get()); ++ hb::unique_ptr buffer(hb_buffer_create()); ++ RangeData range_data = CreateRangeData(font, direction, buffer.get()); + range_data.start = start; + range_data.end = end; + diff --git a/harfbuzz-replace-chromium-scoped-type.patch b/harfbuzz-replace-chromium-scoped-type.patch index 5c36a2d..f20c363 100644 --- a/harfbuzz-replace-chromium-scoped-type.patch +++ b/harfbuzz-replace-chromium-scoped-type.patch @@ -257,9 +257,9 @@ index b4bb5a3..b6ee0a8f 100644 // clang-format on @@ -52,7 +53,6 @@ - #include "third_party/blink/renderer/platform/resolution_units.h" #include "third_party/blink/renderer/platform/wtf/hash_map.h" #include "third_party/blink/renderer/platform/wtf/math_extras.h" + #include "third_party/blink/renderer/platform/wtf/text/character_names.h" -#include "third_party/harfbuzz-ng/utils/hb_scoped.h" #include "third_party/skia/include/core/SkPaint.h" #include "third_party/skia/include/core/SkPath.h" @@ -391,7 +391,7 @@ diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cac index 763f3a3..c50910df 100644 --- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.cc +++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.cc -@@ -5,7 +5,6 @@ +@@ -5,12 +5,11 @@ #include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h" #include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h" #include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h" @@ -399,17 +399,35 @@ index 763f3a3..c50910df 100644 namespace blink { + HbFontCacheEntry::HbFontCacheEntry(hb_font_t* font) +- : hb_font_(HbScoped(font)), ++ : hb_font_(hb::unique_ptr(font)), + hb_font_data_(std::make_unique()) {} + + HbFontCacheEntry::~HbFontCacheEntry() = default; diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h index 1b0accf..eaedd0b 100644 --- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h +++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h -@@ -7,7 +7,6 @@ +@@ -7,9 +7,9 @@ #include "third_party/blink/renderer/platform/fonts/font_metrics.h" #include "third_party/blink/renderer/platform/fonts/unicode_range_set.h" -#include "third_party/harfbuzz-ng/utils/hb_scoped.h" - namespace blink { + #include ++#include + + #include + +@@ -39,7 +39,7 @@ class HbFontCacheEntry : public RefCount + private: + explicit HbFontCacheEntry(hb_font_t* font); + +- HbScoped hb_font_; ++ hb::unique_ptr hb_font_; + std::unique_ptr hb_font_data_; + }; diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h index caf5d49..0d4b6f9 100644 @@ -445,7 +463,7 @@ index 522e164d..4b64e1b 100644 "src/src/hb-deprecated.h", "src/src/hb-face.h", "src/src/hb-font.h", -@@ -409,15 +410,9 @@ +@@ -409,11 +410,6 @@ } } @@ -454,21 +472,9 @@ index 522e164d..4b64e1b 100644 - deps = [ "//third_party:freetype_harfbuzz" ] -} - - fuzzer_test("hb_shape_fuzzer") { - sources = [ "fuzz/hb_shape_fuzzer.cc" ] - deps = [ -- ":hb_scoped_util", - "//base", - "//third_party:freetype_harfbuzz", - ] -@@ -427,7 +422,6 @@ - fuzzer_test("hb_subset_fuzzer") { - sources = [ "fuzz/hb_subset_fuzzer.cc" ] - deps = [ -- ":hb_scoped_util", - "//base", - "//third_party:freetype_harfbuzz", - ] + # Not all checkouts have a //base directory. + if (build_with_chromium) { + fuzzer_test("hb_shape_fuzzer") { diff --git a/third_party/harfbuzz-ng/utils/hb_scoped.h b/third_party/harfbuzz-ng/utils/hb_scoped.h deleted file mode 100644 index 887f6b90..0000000 diff --git a/highway.gn b/highway.gn new file mode 100644 index 0000000..c2b0052 --- /dev/null +++ b/highway.gn @@ -0,0 +1,9 @@ +import("//build/config/linux/pkg_config.gni") + +pkg_config("libhwy_external_config") { + packages = [ "libhwy" ] +} + +source_set("libhwy") { + public_configs = [ ":libhwy_external_config" ] +} diff --git a/intl-objects-icu71-UNUM_APPROXIMATELY_SIGN_FIELD.patch b/intl-objects-icu71-UNUM_APPROXIMATELY_SIGN_FIELD.patch index aeee478..9f062c9 100644 --- a/intl-objects-icu71-UNUM_APPROXIMATELY_SIGN_FIELD.patch +++ b/intl-objects-icu71-UNUM_APPROXIMATELY_SIGN_FIELD.patch @@ -28,18 +28,6 @@ Cr-Commit-Position: refs/heads/main@{#81286} diff --git a/src/init/heap-symbols.h b/src/init/heap-symbols.h index da2cdccf1d5..c00e2c45097 100644 ---- a/v8/src/init/heap-symbols.h -+++ b/v8/src/init/heap-symbols.h -@@ -8,6 +8,7 @@ - #ifdef V8_INTL_SUPPORT - #define INTERNALIZED_STRING_LIST_GENERATOR_INTL(V, _) \ - V(_, adoptText_string, "adoptText") \ -+ V(_, approximatelySign_string, "approximatelySign") \ - V(_, baseName_string, "baseName") \ - V(_, accounting_string, "accounting") \ - V(_, breakType_string, "breakType") \ -diff --git a/src/objects/intl-objects.cc b/src/objects/intl-objects.cc -index 93f7000bf5d..25cc4fdd04a 100644 --- a/v8/src/objects/intl-objects.cc +++ b/v8/src/objects/intl-objects.cc @@ -2744,6 +2744,9 @@ Handle Intl::NumberFieldToType(Isolate* isolate, diff --git a/ipcz-buffer_id-Wnarrowing.patch b/ipcz-buffer_id-Wnarrowing.patch deleted file mode 100644 index aae848c..0000000 --- a/ipcz-buffer_id-Wnarrowing.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/third_party/ipcz/src/ipcz/buffer_id.h.old 2022-10-12 18:06:37.711387200 +0200 -+++ src/third_party/ipcz/src/ipcz/buffer_id.h 2022-10-19 20:24:24.333015000 +0200 -@@ -16,7 +16,7 @@ - // either side of the NodeLink. - using BufferId = StrongAlias; - --constexpr BufferId kInvalidBufferId{~0}; -+constexpr BufferId kInvalidBufferId{UINT64_MAX}; - - } // namespace ipcz - diff --git a/ipcz-safe_math-Wuninitialized.patch b/ipcz-safe_math-Wuninitialized.patch deleted file mode 100644 index 1c51ab0..0000000 --- a/ipcz-safe_math-Wuninitialized.patch +++ /dev/null @@ -1,41 +0,0 @@ -Do not put an expression with side effects inside an assert, -as the assert gets entirely removed in an optimized build. - -See it for yourself: https://godbolt.org/z/GeG4zefK9 - -Very safe math, indeed. - ---- src/third_party/ipcz/src/util/safe_math.h.old 2022-10-20 19:00:41.567140300 +0200 -+++ src/third_party/ipcz/src/util/safe_math.h 2022-10-29 22:46:07.312067200 +0200 -@@ -17,8 +17,8 @@ - // This throws a compile-time error on evaluating the constexpr if it can be - // determined at compile-time as failing, otherwise it will fail an - // assertion at runtime. -- ABSL_HARDENING_ASSERT( -- ABSL_PREDICT_TRUE(value <= std::numeric_limits::max())); -+ auto ass=ABSL_PREDICT_TRUE(value <= std::numeric_limits::max()); -+ ABSL_HARDENING_ASSERT(ass); - return static_cast(value); - } - -@@ -38,16 +38,16 @@ - template - constexpr T CheckAdd(T a, T b) { - T result; -- ABSL_HARDENING_ASSERT( -- !ABSL_PREDICT_FALSE(__builtin_add_overflow(a, b, &result))); -+ auto ass=!ABSL_PREDICT_FALSE(__builtin_add_overflow(a, b, &result)); -+ ABSL_HARDENING_ASSERT(ass); - return result; - } - - template - constexpr T CheckMul(T a, T b) { - T result; -- ABSL_HARDENING_ASSERT( -- !ABSL_PREDICT_FALSE(__builtin_mul_overflow(a, b, &result))); -+ auto ass=!ABSL_PREDICT_FALSE(__builtin_mul_overflow(a, b, &result)); -+ ABSL_HARDENING_ASSERT(ass); - return result; - } - diff --git a/mojo_ukm_recorder-missing-WrapUnique.patch b/mojo_ukm_recorder-missing-WrapUnique.patch new file mode 100644 index 0000000..45f0572 --- /dev/null +++ b/mojo_ukm_recorder-missing-WrapUnique.patch @@ -0,0 +1,10 @@ +--- src/services/metrics/public/cpp/mojo_ukm_recorder.cc.old 2023-08-14 13:59:47.674968400 +0200 ++++ src/services/metrics/public/cpp/mojo_ukm_recorder.cc 2023-08-14 22:47:52.938826800 +0200 +@@ -12,6 +12,7 @@ + #include "mojo/public/cpp/bindings/pending_remote.h" + #include "services/metrics/public/mojom/ukm_interface.mojom-forward.h" + #include "services/metrics/public/mojom/ukm_interface.mojom.h" ++#include "third_party/abseil-cpp/absl/memory/memory.h" + + namespace ukm { + diff --git a/net-gcc13-missing-headers.patch b/net-gcc13-missing-headers.patch deleted file mode 100644 index fe300eb..0000000 --- a/net-gcc13-missing-headers.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- src/net/cookies/cookie_inclusion_status.h.old 2023-03-07 11:51:26.874758704 +0100 -+++ src/net/cookies/cookie_inclusion_status.h 2023-03-08 16:26:46.505830726 +0100 -@@ -6,6 +6,7 @@ - #define NET_COOKIES_COOKIE_INCLUSION_STATUS_H_ - - #include -+#include - #include - #include - #include ---- src/net/base/parse_number.h.old 2023-03-07 11:51:26.858758688 +0100 -+++ src/net/base/parse_number.h 2023-03-08 14:54:32.174472371 +0100 -@@ -5,6 +5,8 @@ - #ifndef NET_BASE_PARSE_NUMBER_H_ - #define NET_BASE_PARSE_NUMBER_H_ - -+#include -+ - #include "base/strings/string_piece.h" - #include "net/base/net_export.h" - diff --git a/net-third_party-quiche-gcc13-missing-headers.patch b/net-third_party-quiche-gcc13-missing-headers.patch deleted file mode 100644 index 1b9c7ef..0000000 --- a/net-third_party-quiche-gcc13-missing-headers.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- src/net/third_party/quiche/src/quiche/http2/adapter/header_validator_base.h.old 2023-03-07 11:51:42.050773300 +0100 -+++ src/net/third_party/quiche/src/quiche/http2/adapter/header_validator_base.h 2023-03-07 23:09:36.544902600 +0100 -@@ -1,6 +1,7 @@ - #ifndef QUICHE_HTTP2_ADAPTER_HEADER_VALIDATOR_BASE_H_ - #define QUICHE_HTTP2_ADAPTER_HEADER_VALIDATOR_BASE_H_ - -+#include - #include - - #include "absl/strings/string_view.h" ---- src/net/third_party/quiche/src/quiche/quic/core/quic_connection_id.h.old 2023-03-07 10:51:42.086773400 +0000 -+++ src/net/third_party/quiche/src/quiche/quic/core/quic_connection_id.h 2023-03-08 05:31:08.115134100 +0000 -@@ -5,6 +5,7 @@ - #ifndef QUICHE_QUIC_CORE_QUIC_CONNECTION_ID_H_ - #define QUICHE_QUIC_CORE_QUIC_CONNECTION_ID_H_ - -+#include - #include - #include - ---- src/net/third_party/quiche/src/quiche/quic/core/crypto/quic_hkdf.h.old 2023-03-07 11:51:42.070773300 +0100 -+++ src/net/third_party/quiche/src/quiche/quic/core/crypto/quic_hkdf.h 2023-03-08 00:06:05.139705800 +0100 -@@ -5,6 +5,7 @@ - #ifndef QUICHE_QUIC_CORE_CRYPTO_QUIC_HKDF_H_ - #define QUICHE_QUIC_CORE_CRYPTO_QUIC_HKDF_H_ - -+#include - #include - - #include "absl/strings/string_view.h" diff --git a/node-upgrade-llhttp-to-8.patch b/node-upgrade-llhttp-to-8.patch index cddb59f..1ab1e4f 100644 --- a/node-upgrade-llhttp-to-8.patch +++ b/node-upgrade-llhttp-to-8.patch @@ -27,7 +27,7 @@ index 6dbc8b806dc4..ce658bac6fab 100644 --- a/third_party/electron_node/src/node_http_parser.cc +++ b/third_party/electron_node/src/node_http_parser.cc @@ -1148,28 +1148,51 @@ void ConnectionsList::Expired(const FunctionCallbackInfo& args) { - }; + } const llhttp_settings_t Parser::settings = { - Proxy::Raw, diff --git a/nodejs-electron.changes b/nodejs-electron.changes index 0f772d6..066f931 100644 --- a/nodejs-electron.changes +++ b/nodejs-electron.changes @@ -1,3 +1,90 @@ +------------------------------------------------------------------- +Mon Sep 4 20:30:33 UTC 2023 - Bruno Pitrus + +- Update to 25.8.0 + * ABI break: NODE_MODULE_VERSION is now 116 + * Chromium 114.0.5735.289 + * Node 18.15.0 + * V8 11.4 + * Removed BrowserWindow scroll-touch-* events (since Electron 23) + * Removed webContents.{de,in}crementCapturerCount(stayHidden, stayAwake) (since Electron 23) + * Removed JXL image format support (since Electron 23) + * API Changed: nativeImage.createThumbnailFromPath(path, size) (since Electron 24) +- Use bundled vpx on Fedora ≤37 and Leap +- Use bundled aom on Fedora and Leap +- Drop support for Fedora 36 which is EOL +- Drop upstreamed patches + * CVE-2022-43548.patch + * aggregatable_attribution_utils-do-not-assume-abseil-ABI.patch + * angle-ShaderVars-missing-uint32_t.patch + * blink-gcc13-missing-headers.patch + * bluetooth_uuid-missing-uint8_t.patch + * broker_file_permission-missing-uint64_t.patch + * chromium-108-abseil-shims.patch + * components-gcc13-missing-headers.patch + * crashpad-elf_image_reader-ProgramHeaderTableSpecific-expected-unqualified-id.patch + * d0aa9ad.patch + * document_loader-private-DecodedBodyData.patch + * effect_paint_property_node-Wchanges-meaning.patch + * electron_serial_delegate-ambiguous-Observer.patch + * extensions-gcc13-missing-headers.patch + * first_party_set_parser-IssueWithMetadata-no-known-conversion.patch + * gpu_feature_info-missing-uint32_t.patch + * half_float-Wstrict-aliasing.patch + * ipcz-buffer_id-Wnarrowing.patch + * ipcz-safe_math-Wuninitialized.patch + * net-gcc13-missing-headers.patch + * net-third_party-quiche-gcc13-missing-headers.patch + * one_writer_seqlock-missing-uintptr_t.patch + * openscreen-gcc13-missing-headers.patch + * passwords_counter-Wsubobject-linkage.patch + * perfetto-uuid-missing-uint8_t.patch + * print_dialog_gtk-no-kEnableOopPrintDriversJobPrint.patch + * profiler-missing-uintptr_t.patch + * reproducible-config.gypi.patch + * select_file_dialog_linux_kde-Wodr.patch + * shim_headers-fix-ninja.patch + * static_constructors-Wstrict-aliasing.patch + * string_hasher-type-pun-UB-causes-heap-corruption.patch + * swiftshader-Constants-Wstrict-aliasing.patch + * swiftshader-Half-Wstrict-aliasing.patch + * swiftshader-LRUCache-missing-uint64_t.patch + * target_property-missing-uint32_t.patch + * ui-gcc13-missing-headers.patch + * unzip-Wsubobject-linkage.patch + * v8_initializer-PageAllocator-fpermissive.patch + * vector_math_impl-Wstrict-aliasing.patch + * web_contents_impl-Wsubobject-linkage.patch + * webgl_image_conversion-Wstrict-aliasing.patch + * webrtc-base64-missing-uint8_t.patch + * xr_cube_map-Wstrict-aliasing.patch +- Drop no longer relevant patches` + * chromium-norar.patch + * electron-13-fix-sql-virtualcursor-type.patch + * enable-jxl.patch + * system-jsoncpp.patch +- Add patches to build with system libs + * abseil-remove-unused-targets.patch + * highway.gn + * system-wayland.patch +- Add patches to fix build errors + * absl-uint128-do-not-assume-abi.patch + * cpu-missing-uint8_t.patch + * electron-24-components-missing-headers.patch + * electron_api_app-GetPathConstant-non-constexpr.patch + * electron_browser_context-missing-variant.patch + * mojo_ukm_recorder-missing-WrapUnique.patch +- Conditionally reverse upstream changes to build against stable avif + * avif_image_decoder-repetitionCount-clli.patch +- …and harfbuzz 4 + * harfbuzz-replace-HbScopedPointer.patch +- …and icu 69 + * v8-regexp-parser-UCHAR_BASIC_EMOJI.patch +- …and wayland 19 + * wayland-WL-SINCE-VERSION.patch + * wayland_data_drag_controller-WL_SURFACE_OFFSET_SINCE_VERSION.patch +- Add backported chrome-gpu-does-not-load.patch + ------------------------------------------------------------------- Thu Aug 31 19:31:29 UTC 2023 - Bruno Pitrus diff --git a/nodejs-electron.spec b/nodejs-electron.spec index 423f654..b5d9e72 100644 --- a/nodejs-electron.spec +++ b/nodejs-electron.spec @@ -22,7 +22,7 @@ %define mod_name electron # https://github.com/nodejs/node/blob/main/doc/abi_version_registry.json -%define abi_version 110 +%define abi_version 116 # Do not provide libEGL.so, etc… %define __provides_exclude ^lib.*\\.so.*$ @@ -56,12 +56,7 @@ BuildArch: i686 %bcond_with vaapi -%if %{with vaapi} -#vaapi still requires bundled libvpx -%bcond_with system_vpx -%else -%bcond_without system_vpx -%endif + @@ -112,74 +107,66 @@ BuildArch: i686 %bcond_without system_nghttp2 -%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150500 || 0%{?fedora} >= 37 -%bcond_without system_jxl + + + +%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150500 || 0%{?fedora} +%bcond_without system_crc32c %bcond_without system_dav1d +%bcond_without system_highway +%bcond_without system_nvctrl +%bcond_without wayland_21 %else -%bcond_with system_jxl +%bcond_with system_crc32c %bcond_with system_dav1d +%bcond_with system_highway +%bcond_with system_nvctrl +%bcond_with wayland_21 %endif -%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150600 || 0%{?fedora} >= 37 +%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150600 || 0%{?fedora} %bcond_without harfbuzz_5 -%bcond_without system_aom +%bcond_without link_vulkan %bcond_without system_avif %bcond_without icu_71 %bcond_without ffmpeg_5 %bcond_without system_spirv %else %bcond_with harfbuzz_5 -%bcond_with system_aom +%bcond_with link_vulkan %bcond_with system_avif %bcond_with icu_71 %bcond_with ffmpeg_5 %bcond_with system_spirv %endif -%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150500 || 0%{?fedora_version} -%bcond_without system_crc32c -%bcond_without system_nvctrl +%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150600 || 0%{?fedora} >= 38 +%bcond_without system_vpx %else -%bcond_with system_crc32c -%bcond_with system_nvctrl +%bcond_with system_vpx %endif -%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150600 || 0%{?fedora_version} -%bcond_without link_vulkan -%else -%bcond_with link_vulkan -%endif - - - - - -%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150500 +%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150600 +%bcond_without system_aom %bcond_without system_yuv %else +%bcond_with system_aom %bcond_with system_yuv %endif - - - %if 0%{?fedora} - %bcond_without system_llhttp +%bcond_without llhttp_8 %bcond_without system_histogram %else - %bcond_with system_llhttp +%bcond_with llhttp_8 %bcond_with system_histogram %endif -%if 0%{?fedora} >= 37 -%bcond_without llhttp_8 -%else -%bcond_with llhttp_8 -%endif + # Abseil is broken in Leap # enable this when boo#1203378 and boo#1203379 get fixed @@ -217,7 +204,7 @@ BuildArch: i686 Name: nodejs-electron -Version: 22.3.23 +Version: 25.8.0 Release: 0 Summary: Build cross platform desktop apps with JavaScript, HTML, and CSS License: AFL-2.0 AND Apache-2.0 AND blessing AND BSD-2-Clause AND BSD-3-Clause AND BSD-Protection AND BSD-Source-Code AND bzip2-1.0.6 AND IJG AND ISC AND LGPL-2.0-or-later AND LGPL-2.1-or-later AND MIT AND MIT-CMU AND MIT-open-group AND (MPL-1.1 OR GPL-2.0-or-later OR LGPL-2.1-or-later) AND MPL-2.0 AND OpenSSL AND SGI-B-2.0 AND SUSE-Public-Domain AND X11 @@ -231,6 +218,7 @@ Source12: electron-logo-symbolic.svg # Shim generators for unbundling libraries Source50: flatbuffers.gn Source51: libsecret.gn +Source52: highway.gn # Reverse upstream changes to be able to build against ffmpeg-4 @@ -239,8 +227,13 @@ Source401: audio_file_reader-ffmpeg-AVFrame-duration.patch # …and against icu-69 Source410: NumberFormat-icu71-incrementExact.patch Source411: intl-objects-icu71-UNUM_APPROXIMATELY_SIGN_FIELD.patch +Source412: v8-regexp-parser-UCHAR_BASIC_EMOJI.patch # and against harfbuzz 4 Source415: harfbuzz-replace-chromium-scoped-type.patch +Source416: harfbuzz-replace-HbScopedPointer.patch +# and against Wayland 1.19 +Source418: wayland-WL-SINCE-VERSION.patch +Source419: wayland_data_drag_controller-WL_SURFACE_OFFSET_SINCE_VERSION.patch #Reverse upstream changes to build against system libavif. @@ -248,11 +241,11 @@ Source415: harfbuzz-replace-chromium-scoped-type.patch Source420: avif_image_decoder-AVIF_PIXEL_FORMAT_COUNT.patch + # PATCHES for openSUSE-specific things Patch0: chromium-102-compiler.patch Patch1: fpic.patch Patch3: gcc-enable-lto.patch -Patch5: chromium-norar.patch Patch6: chromium-vaapi.patch Patch7: chromium-91-java-only-allowed-in-android-builds.patch Patch9: chromium-86-fix-vaapi-on-intel.patch @@ -266,7 +259,6 @@ Patch39: support-i386.patch Patch67: disable-catapult.patch Patch69: nasm-generate-debuginfo.patch Patch70: disable-fuses.patch -Patch71: enable-jxl.patch Patch72: electron-version-from-env.patch # https://code.qt.io/cgit/qt/qtwebengine-chromium.git/commit/?h=102-based&id=d617766b236a93749ddbb50b75573dd35238ffc9 Patch73: disable-webspeech.patch @@ -283,8 +275,6 @@ Patch1002: chromium-system-libusb.patch Patch1017: system-libdrm.patch # http://svnweb.mageia.org/packages/updates/7/chromium-browser-stable/current/SOURCES/chromium-74-pdfium-system-libopenjpeg2.patch?view=markup Patch1038: pdfium-fix-system-libs.patch -# https://sources.debian.org/patches/chromium/102.0.5005.115-1/system/jsoncpp.patch/ -Patch1040: system-jsoncpp.patch # https://sources.debian.org/patches/chromium/102.0.5005.115-1/system/zlib.patch/ Patch1041: system-zlib.patch Patch1044: replace_gn_files-system-libs.patch @@ -304,14 +294,12 @@ Patch1072: node-system-icu.patch Patch1073: system-nasm.patch Patch1074: no-zlib-headers.patch Patch1076: crashpad-use-system-abseil.patch -Patch1077: chromium-108-abseil-shims.patch +Patch1077: system-wayland.patch # PATCHES to fix interaction with third-party software Patch2004: chromium-gcc11.patch Patch2010: chromium-93-ffmpeg-4.4.patch Patch2011: chromium-ffmpeg-first-dts.patch -# Fix building sql recover_module -Patch2020: electron-13-fix-sql-virtualcursor-type.patch # Fixe builds with older clang versions that do not allow # nomerge attributes on declaration. Otherwise, the following error # is produced: @@ -333,6 +321,8 @@ Source2033: node-upgrade-llhttp-to-8.patch Patch2034: swiftshader-LLVMJIT-AddressSanitizerPass-dead-code-remove.patch Patch2035: RenderFrameHostImpl-use-after-free.patch Patch2036: avif_image_decoder-libavif-1-mode.patch +Patch2037: abseil-remove-unused-targets.patch +Patch2038: avif_image_decoder-repetitionCount-clli.patch # PATCHES that should be submitted upstream verbatim or near-verbatim Patch3016: chromium-98-EnumTable-crash.patch @@ -345,61 +335,23 @@ Patch3033: chromium-94.0.4606.71-InkDropHost-crash.patch Patch3056: async_shared_storage_database_impl-missing-absl-WrapUnique.patch # https://salsa.debian.org/chromium-team/chromium/-/blob/456851fc808b2a5b5c762921699994e957645917/debian/patches/upstream/nested-nested-nested-nested-nested-nested-regex-patterns.patch Patch3064: nested-nested-nested-nested-nested-nested-regex-patterns.patch -Patch3067: reproducible-config.gypi.patch -Patch3069: aggregatable_attribution_utils-do-not-assume-abseil-ABI.patch -Patch3071: electron_serial_delegate-ambiguous-Observer.patch -Patch3072: attribution_response_parsing-do-not-assume-abseil-ABI.patch -Patch3078: select_file_dialog_linux_kde-Wodr.patch -Patch3079: web_contents_impl-Wsubobject-linkage.patch Patch3080: compact_enc_det_generated_tables-Wnarrowing.patch -Patch3081: string_hasher-type-pun-UB-causes-heap-corruption.patch -Patch3082: ipcz-buffer_id-Wnarrowing.patch -Patch3083: swiftshader-Half-Wstrict-aliasing.patch -Patch3084: swiftshader-Constants-Wstrict-aliasing.patch -Patch3085: half_float-Wstrict-aliasing.patch -Patch3086: unzip-Wsubobject-linkage.patch -Patch3087: v8_initializer-PageAllocator-fpermissive.patch -Patch3089: ipcz-safe_math-Wuninitialized.patch -Patch3090: passwords_counter-Wsubobject-linkage.patch -Patch3091: vector_math_impl-Wstrict-aliasing.patch -Patch3092: webgl_image_conversion-Wstrict-aliasing.patch -Patch3093: xr_cube_map-Wstrict-aliasing.patch -Patch3094: static_constructors-Wstrict-aliasing.patch -Patch3095: CVE-2022-43548.patch Patch3096: remove-date-reproducible-builds.patch -Patch3097: shim_headers-fix-ninja.patch -Patch3098: document_loader-private-DecodedBodyData.patch -Patch3099: crashpad-elf_image_reader-ProgramHeaderTableSpecific-expected-unqualified-id.patch -Patch3100: first_party_set_parser-IssueWithMetadata-no-known-conversion.patch -Patch3101: print_dialog_gtk-no-kEnableOopPrintDriversJobPrint.patch -Patch3102: angle-ShaderVars-missing-uint32_t.patch -Patch3103: openscreen-gcc13-missing-headers.patch -Patch3104: perfetto-uuid-missing-uint8_t.patch -Patch3105: swiftshader-LRUCache-missing-uint64_t.patch Patch3106: vulkan_memory_allocator-vk_mem_alloc-missing-snprintf.patch -Patch3107: profiler-missing-uintptr_t.patch -Patch3108: components-gcc13-missing-headers.patch -Patch3109: one_writer_seqlock-missing-uintptr_t.patch -Patch3110: bluetooth_uuid-missing-uint8_t.patch -Patch3111: broker_file_permission-missing-uint64_t.patch -Patch3112: net-third_party-quiche-gcc13-missing-headers.patch -Patch3113: webrtc-base64-missing-uint8_t.patch -Patch3114: ui-gcc13-missing-headers.patch -Patch3115: net-gcc13-missing-headers.patch -Patch3116: extensions-gcc13-missing-headers.patch -Patch3117: target_property-missing-uint32_t.patch -Patch3118: gpu_feature_info-missing-uint32_t.patch -Patch3119: blink-gcc13-missing-headers.patch -Patch3120: effect_paint_property_node-Wchanges-meaning.patch Patch3121: services-network-optional-explicit-constructor.patch -# PATCH-FIX-UPSTREAM - https://swiftshader-review.googlesource.com/c/SwiftShader/+/70528 -Patch3200: d0aa9ad.patch # PATCH-FIX-UPSTREAM - https://swiftshader-review.googlesource.com/c/SwiftShader/+/70328 Patch3201: 647d3d2.patch Patch3202: mojom-python3.12-imp.patch # https://src.fedoraproject.org/rpms/qt6-qtwebengine/blob/rawhide/f/Partial-migration-from-imp-to-importlib.patch Patch3203: Partial-migration-from-imp-to-importlib.patch Patch3204: re2-11-StringPiece.patch +Patch3205: electron-24-components-missing-headers.patch +Patch3206: cpu-missing-uint8_t.patch +Patch3207: absl-uint128-do-not-assume-abi.patch +Patch3208: mojo_ukm_recorder-missing-WrapUnique.patch +Patch3209: electron_browser_context-missing-variant.patch +Patch3210: electron_api_app-GetPathConstant-non-constexpr.patch +Patch3211: chrome-gpu-does-not-load.patch %if %{with clang} BuildRequires: clang @@ -437,7 +389,8 @@ BuildRequires: hwdata BuildRequires: libatomic %endif %if %{with system_aom} -BuildRequires: libaom-devel >= 3.4 +# requires AV1E_SET_QUANTIZER_ONE_PASS +BuildRequires: libaom-devel >= 3.7~ %endif BuildRequires: libbsd-devel BuildRequires: libpng-devel @@ -478,9 +431,13 @@ BuildRequires: npm %endif BuildRequires: pkgconfig BuildRequires: plasma-wayland-protocols +%if 0%{?suse_version} && 0%{?suse_version} < 1550 +BuildRequires: python3-dataclasses +%endif BuildRequires: python3-json5 BuildRequires: python3-mako BuildRequires: python3-ply +BuildRequires: python3-PyYAML BuildRequires: python3-six BuildRequires: snappy-devel %if 0%{?suse_version} @@ -488,7 +445,11 @@ BuildRequires: update-desktop-files %endif BuildRequires: util-linux BuildRequires: vulkan-headers +%if %{with wayland_21} +BuildRequires: wayland-devel >= 1.20 +%else BuildRequires: wayland-devel +%endif BuildRequires: zstd %if %{with system_abseil} BuildRequires: pkgconfig(absl_algorithm_container) >= 20211000 @@ -539,6 +500,7 @@ BuildRequires: pkgconfig(dav1d) >= 1 BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(dri) BuildRequires: pkgconfig(expat) +BuildRequires: pkgconfig(flac) BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(gbm) BuildRequires: pkgconfig(glib-2.0) @@ -583,8 +545,8 @@ BuildRequires: pkgconfig(libcares) BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(libevent) -%if %{with system_jxl} -BuildRequires: pkgconfig(libjxl) >= 0.7 +%if %{with system_highway} +BuildRequires: pkgconfig(libhwy) >= 1 %endif %if 0%{?fedora} >= 38 #Work around https://bugzilla.redhat.com/show_bug.cgi?id=2148612 @@ -606,7 +568,8 @@ BuildRequires: pkgconfig(libxml-2.0) >= 2.9.5 BuildRequires: pkgconfig(libxslt) BuildRequires: pkgconfig(libxxhash) %if %{with system_yuv} -BuildRequires: pkgconfig(libyuv) +# needs I410ToI420 +BuildRequires: pkgconfig(libyuv) >= 1855 %endif %if 0%{?fedora} BuildRequires: minizip-compat-devel @@ -642,7 +605,8 @@ BuildRequires: libjpeg-devel >= 8.1 BuildRequires: libjpeg-turbo-devel %endif %if %{with system_vpx} -BuildRequires: pkgconfig(vpx) >= 1.8.2 +# requires VP9E_SET_QUANTIZER_ONE_PASS +BuildRequires: pkgconfig(vpx) >= 1.13~ %endif %if %{without clang} %if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150600 || 0%{?fedora} @@ -717,7 +681,6 @@ clang -v %autosetup -n src -p1 - # Sanity check if macro corresponds to the actual ABI test $(grep ^node_module_version electron/build/args/all.gn | sed 's/.* = //') = %abi_version @@ -736,21 +699,30 @@ patch -R -p1 < %SOURCE400 %if %{without harfbuzz_5} patch -R -p1 < %SOURCE415 +patch -R -p1 < %SOURCE416 %endif %if %{without icu_71} patch -R -p1 < %SOURCE410 patch -R -p1 < %SOURCE411 +patch -R -p1 < %SOURCE412 %else patch -R -p1 < %PATCH2030 %endif + +%if %{without wayland_21} +patch -R -p1 < %SOURCE418 +patch -R -p1 < %SOURCE419 +%endif + # This one depends on an ffmpeg nightly, reverting unconditionally. patch -R -p1 < %SOURCE401 # This one is dead code, we cen revert it even when using bundled avif. patch -R -p1 < %SOURCE420 + # Link system wayland-protocols-devel into where chrome expects them mkdir -p third_party/wayland/src mkdir -p third_party/wayland-protocols/kde/src @@ -901,7 +873,7 @@ export LDFLAGS="${LDFLAGS} -Wl,--as-needed -fuse-ld=mold" %ifarch %ix86 %arm %limit_build -m 1200 %else -%limit_build -m 2600 +%limit_build -m 3500 %endif @@ -929,6 +901,7 @@ gn_system_libraries=( freetype harfbuzz-ng icu + jsoncpp libdrm libevent libjpeg @@ -987,11 +960,6 @@ find third_party/crc32c -type f ! -name "*.gn" -a ! -name "*.gni" -delete gn_system_libraries+=( crc32c ) %endif -%if %{with system_jxl} -find third_party/highway -type f ! -name "*.gn" -a ! -name "*.gni" -delete -find third_party/libjxl -type f ! -name "*.gn" -a ! -name "*.gni" -delete -gn_system_libraries+=( libjxl ) -%endif %if %{with system_dav1d} @@ -999,6 +967,12 @@ find third_party/dav1d -type f ! -name "*.gn" -a ! -name "*.gni" -delete gn_system_libraries+=( dav1d ) %endif +%if %{with system_highway} +find third_party/highway -type f ! -name "*.gn" -a ! -name "*.gni" -delete +gn_system_libraries+=( highway ) +%endif + + %if %{with system_nvctrl} find third_party/angle/src/third_party/libXNVCtrl/ -type f ! -name "*.gn" -a ! -name "*.gni" -delete gn_system_libraries+=( libXNVCtrl ) @@ -1011,7 +985,7 @@ find third_party/swiftshader/third_party/SPIRV-Tools/ -type f ! -name "*.gn" -a rm -rf third_party/vulkan-deps/spirv-headers/src/include find third_party/vulkan-deps/spirv-tools/ -type f ! -name "*.gn" -a ! -name "*.gni" -delete -gn_system_libraries+=( +gn_system_libraries+=( swiftshader-SPIRV-Headers swiftshader-SPIRV-Tools #The following can only be unbundled if you don't build DAWN (WebGPU) @@ -1124,6 +1098,7 @@ myconf_gn+=' angle_enable_abseil=true' myconf_gn+=" enable_pdf=false" myconf_gn+=" enable_pdf_viewer=false" myconf_gn+=" enable_print_preview=false" +myconf_gn+=" enable_printing=false" myconf_gn+=" enable_basic_printing=false" #we don't build PDF support, so disabling the below: #myconf_gn+=" use_system_lcms2=true" @@ -1134,10 +1109,7 @@ myconf_gn+=" enable_basic_printing=false" myconf_gn+=" enable_plugins=false" myconf_gn+=" enable_ppapi=false" -# This requires the non-free closure_compiler.jar. If we ever need to build chrome with JS typecheck, -# we would need to package it separately and compile it from sources, since the chrome git repo -# provides only a compiled binary. -myconf_gn+=" enable_js_type_check=false" + # The option below get overriden by whatever is in CFLAGS/CXXFLAGS, so they affect only C++ code. # symbol_level=2 is full debug @@ -1155,7 +1127,7 @@ myconf_gn+=" v8_symbol_level=1" %endif %ifarch %ix86 %arm #Sorry, no debug on 32bit. -myconf_gn+=" symbol_level=1" +myconf_gn+=" symbol_level=1" myconf_gn+=" blink_symbol_level=0" myconf_gn+=" v8_symbol_level=0" %endif @@ -1173,6 +1145,7 @@ myconf_gn+=" enable_reading_list=false" myconf_gn+=" enable_reporting=false" myconf_gn+=" build_with_tflite_lib=false" myconf_gn+=" build_tflite_with_xnnpack=false" +myconf_gn+=" build_webnn_with_xnnpack=false" myconf_gn+=" safe_browsing_mode=0" myconf_gn+=" enable_maldoca=false" myconf_gn+=" enable_captive_portal_detection=false" @@ -1187,12 +1160,25 @@ myconf_gn+=" enable_click_to_call=false" myconf_gn+=" enable_webui_tab_strip=false" myconf_gn+=" enable_webui_certificate_viewer=false" myconf_gn+=" enable_background_contents=false" -myconf_gn+=" enable_xz_extractor=false" +myconf_gn+=" enable_extractors=false" myconf_gn+=" enable_feed_v2=false" myconf_gn+=" ozone_platform_headless=false" myconf_gn+=" angle_enable_gl_null=false" myconf_gn+=" enable_paint_preview=false" +myconf_gn+=" use_bundled_weston=false" +myconf_gn+=" enable_component_updater=false" +myconf_gn+=" enable_lens_desktop=false" +myconf_gn+=' chrome_root_store_supported=false' +myconf_gn+=' chrome_root_store_optional=false' +myconf_gn+=' chrome_root_store_policy_supported=false' +myconf_gn+=' trial_comparison_cert_verifier_supported=false' + +myconf_gn+=' disable_histogram_support=true' + +#disable some tracing hooks, they increase size and we do not build chrome://tracing anyway (see disable-catapult.patch) +myconf_gn+=" enable_trace_logging=false" +myconf_gn+=" optional_trace_events_enabled=false" #Do not build Chromecast @@ -1215,7 +1201,6 @@ myconf_gn+=" use_pulseaudio=true link_pulseaudio=true" myconf_gn+=" is_component_build=false" myconf_gn+=" use_sysroot=false" myconf_gn+=" fatal_linker_warnings=false" -myconf_gn+=" use_allocator=\"partition\"" myconf_gn+=" use_allocator_shim=true" myconf_gn+=" use_partition_alloc=true" @@ -1246,8 +1231,11 @@ myconf_gn+=" v8_use_external_startup_data=true" myconf_gn+=" use_system_zlib=true" myconf_gn+=" use_system_libjpeg=true" myconf_gn+=" use_system_libpng=true" -myconf_gn+=" use_system_wayland_scanner=true" -myconf_gn+=" use_system_libwayland=true" + +#we don't build PDF support, so disabling the below: +#myconf_gn+=" use_system_lcms2=true" +#myconf_gn+=" use_system_libopenjpeg2=true" + myconf_gn+=" use_system_harfbuzz=true" myconf_gn+=" use_system_freetype=true" myconf_gn+=" use_system_cares=true" @@ -1289,7 +1277,7 @@ myconf_gn+=" use_thin_lto=true" %ifarch %arm # Bundled libaom is broken on ARMv7 %if %{without system_aom} -# [74796s] FAILED: v8_context_snapshot_generator +# [74796s] FAILED: v8_context_snapshot_generator # [74796s] python3 "../../build/toolchain/gcc_link_wrapper.py" --output="./v8_context_snapshot_generator" -- g++ -Wl,--build-id=sha1 -fPIC -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -rdynamic -Wl,-z,defs -Wl,--as-needed -pie -Wl,--disable-new-dtags -Wl,-rpath=\$ORIGIN -Wl,--as-needed -fuse-ld=lld -o "./v8_context_snapshot_generator" -Wl,--start-group @"./v8_context_snapshot_generator.rsp" -Wl,--end-group -latomic -ldl -lpthread -lrt -lgmodule-2.0 -lglib-2.0 -lgobject-2.0 -lgthread-2.0 -ljsoncpp -labsl_base -labsl_raw_logging_internal -labsl_log_severity -labsl_spinlock_wait -labsl_cord -labsl_cordz_info -labsl_cord_internal -labsl_cordz_functions -labsl_exponential_biased -labsl_cordz_handle -labsl_synchronization -labsl_graphcycles_internal -labsl_stacktrace -labsl_symbolize -labsl_debugging_internal -labsl_demangle_internal -labsl_malloc_internal -labsl_time -labsl_civil_time -labsl_time_zone -labsl_bad_optional_access -labsl_strings -labsl_strings_internal -labsl_int128 -labsl_throw_delegate -labsl_hash -labsl_city -labsl_bad_variant_access -labsl_low_level_hash -labsl_raw_hash_set -labsl_hashtablez_sampler -labsl_failure_signal_handler -labsl_examine_stack -labsl_random_distributions -labsl_random_seed_sequences -labsl_random_internal_pool_urbg -labsl_random_internal_randen -labsl_random_internal_randen_hwaes -labsl_random_internal_randen_hwaes_impl -labsl_random_internal_randen_slow -labsl_random_internal_platform -labsl_random_internal_seed_material -labsl_random_seed_gen_exception -labsl_status -labsl_str_format_internal -labsl_strerror -labsl_statusor -licui18n -licuuc -licudata -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -ldouble-conversion -levent -lz -ljpeg -lpng16 -lxml2 -lxslt -lresolv -lgio-2.0 -lbrotlidec -lwebpdemux -lwebpmux -lwebp -lfreetype -lexpat -lfontconfig -lharfbuzz-subset -lharfbuzz -lyuv -lopus -lvpx -lm -ldav1d -lX11 -lXcomposite -lXdamage -lXext -lXfixes -lXrender -lXrandr -lXtst -lpipewire-0.3 -lgbm -lEGL -ldrm -lcrc32c -lbsd -lxcb -lxkbcommon -lwayland-client -ldbus-1 -lre2 -lpangocairo-1.0 -lpango-1.0 -lcairo -latk-1.0 -latk-bridge-2.0 -lasound -lpulse -lavcodec -lavformat -lavutil -lXi -lpci -lxxhash -lXNVCtrl -lsnappy -lavif -ljxl -lwoff2dec -latspi # [74796s] ld.lld: error: undefined symbol: aom_arm_cpu_caps # [74796s] >>> referenced by av1_rtcd.h:1079 (../../third_party/libaom/source/config/linux/arm/config/av1_rtcd.h:1079) diff --git a/one_writer_seqlock-missing-uintptr_t.patch b/one_writer_seqlock-missing-uintptr_t.patch deleted file mode 100644 index 70578f3..0000000 --- a/one_writer_seqlock-missing-uintptr_t.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/device/base/synchronization/one_writer_seqlock.h.old 2023-03-07 10:51:25.662757600 +0000 -+++ src/device/base/synchronization/one_writer_seqlock.h 2023-03-07 18:51:45.647766600 +0000 -@@ -6,6 +6,8 @@ - #define DEVICE_BASE_SYNCHRONIZATION_ONE_WRITER_SEQLOCK_H_ - - #include -+#include -+#include - #include - - #include "base/atomicops.h" diff --git a/openscreen-gcc13-missing-headers.patch b/openscreen-gcc13-missing-headers.patch deleted file mode 100644 index 4d94ab9..0000000 --- a/openscreen-gcc13-missing-headers.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- src/third_party/openscreen/src/util/base64.h.old 2023-03-07 11:52:10.906800987 +0100 -+++ src/third_party/openscreen/src/util/base64.h 2023-03-07 13:52:52.310335841 +0100 -@@ -5,6 +5,7 @@ - #ifndef UTIL_BASE64_H_ - #define UTIL_BASE64_H_ - -+#include - #include - #include - ---- src/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h.old -+++ src/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h -@@ -5,6 +5,7 @@ - #ifndef DISCOVERY_DNSSD_PUBLIC_DNS_SD_TXT_RECORD_H_ - #define DISCOVERY_DNSSD_PUBLIC_DNS_SD_TXT_RECORD_H_ - -+#include - #include - #include - #include diff --git a/partition_alloc-no-lto.patch b/partition_alloc-no-lto.patch index 285d4f2..9b96e74 100644 --- a/partition_alloc-no-lto.patch +++ b/partition_alloc-no-lto.patch @@ -2,51 +2,58 @@ Compile files which declare functions in inline assembly without LTO due to http --- src/base/allocator/partition_allocator/BUILD.gn.old 2022-10-01 13:53:03.367797474 +0200 +++ src/base/allocator/partition_allocator/BUILD.gn 2022-10-05 14:23:53.999860356 +0200 -@@ -51,6 +51,24 @@ +@@ -51,6 +51,30 @@ } } -+static_library("partition_alloc_asm") { -+ defines = [ "PA_PCSCAN_STACK_SUPPORTED" ] ++if (use_starscan) { ++ static_library("partition_alloc_asm") { + if (gcc_lto) { + configs -= [ "//build/config/compiler:gcc_lto" ] + } + if (current_cpu == "x64") { ++ assert(pcscan_stack_supported) + sources = [ "starscan/stack/asm/x64/push_registers_asm.cc" ] + } else if (current_cpu == "x86") { ++ assert(pcscan_stack_supported) + sources = [ "starscan/stack/asm/x86/push_registers_asm.cc" ] + } else if (current_cpu == "arm") { ++ assert(pcscan_stack_supported) + sources = [ "starscan/stack/asm/arm/push_registers_asm.cc" ] + } else if (current_cpu == "arm64") { ++ assert(pcscan_stack_supported) + sources = [ "starscan/stack/asm/arm64/push_registers_asm.cc" ] + } else { ++ assert(!pcscan_stack_supported) + # To support a trampoline for another arch, please refer to v8/src/heap/base. + } ++ } +} + component("partition_alloc") { sources = [ "address_pool_manager.cc", -@@ -262,20 +278,10 @@ +@@ -262,21 +278,9 @@ } } - if (build_with_chromium) { + if (use_starscan) { - if (current_cpu == "x64") { -- defines += [ "PA_PCSCAN_STACK_SUPPORTED" ] +- assert(pcscan_stack_supported) - sources += [ "starscan/stack/asm/x64/push_registers_asm.cc" ] - } else if (current_cpu == "x86") { -- defines += [ "PA_PCSCAN_STACK_SUPPORTED" ] +- assert(pcscan_stack_supported) - sources += [ "starscan/stack/asm/x86/push_registers_asm.cc" ] - } else if (current_cpu == "arm") { -- defines += [ "PA_PCSCAN_STACK_SUPPORTED" ] +- assert(pcscan_stack_supported) - sources += [ "starscan/stack/asm/arm/push_registers_asm.cc" ] - } else if (current_cpu == "arm64") { -+ deps = [] -+ if (current_cpu == "x64" || current_cpu == "x86" || current_cpu == "arm" || current_cpu == "arm64") { - defines += [ "PA_PCSCAN_STACK_SUPPORTED" ] +- assert(pcscan_stack_supported) - sources += [ "starscan/stack/asm/arm64/push_registers_asm.cc" ] - } else { - # To support a trampoline for another arch, please refer to v8/src/heap/base. +- assert(!pcscan_stack_supported) ++ deps = [] ++ if (current_cpu == "x64" || current_cpu == "x86" || current_cpu == "arm" || current_cpu == "arm64") { + deps += [ ":partition_alloc_asm" ] } } diff --git a/passwords_counter-Wsubobject-linkage.patch b/passwords_counter-Wsubobject-linkage.patch deleted file mode 100644 index 5fc201f..0000000 --- a/passwords_counter-Wsubobject-linkage.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- src/components/browsing_data/core/counters/passwords_counter.cc.old 2022-10-20 19:00:23.009865700 +0200 -+++ src/components/browsing_data/core/counters/passwords_counter.cc 2022-10-29 22:29:38.660589600 +0200 -@@ -34,6 +34,8 @@ - } - } - -+} // namespace -+ - // PasswordStoreFetcher ---------------------------------- - - // Fetches passswords and observes a PasswordStoreInterface. -@@ -168,8 +170,6 @@ - weak_ptr_factory_.InvalidateWeakPtrs(); - } - --} // namespace -- - // PasswordsCounter::PasswordsResult ---------------------------------- - PasswordsCounter::PasswordsResult::PasswordsResult( - const BrowsingDataCounter* source, ---- src/components/browsing_data/core/counters/passwords_counter.h.old 2022-10-20 19:00:23.009865700 +0200 -+++ src/components/browsing_data/core/counters/passwords_counter.h 2022-10-29 22:28:42.288402800 +0200 -@@ -18,9 +18,7 @@ - } - - namespace browsing_data { --namespace { - class PasswordStoreFetcher; --} - class PasswordsCounter : public browsing_data::BrowsingDataCounter { - public: - // A subclass of SyncResult that stores the result value, a boolean diff --git a/perfetto-uuid-missing-uint8_t.patch b/perfetto-uuid-missing-uint8_t.patch deleted file mode 100644 index 0538566..0000000 --- a/perfetto-uuid-missing-uint8_t.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/third_party/perfetto/include/perfetto/ext/base/uuid.h -+++ b/third_party/perfetto/include/perfetto/ext/base/uuid.h -@@ -18,6 +18,7 @@ - #define INCLUDE_PERFETTO_EXT_BASE_UUID_H_ - - #include -+#include - #include - - #include "perfetto/ext/base/optional.h" diff --git a/print_dialog_gtk-no-kEnableOopPrintDriversJobPrint.patch b/print_dialog_gtk-no-kEnableOopPrintDriversJobPrint.patch deleted file mode 100644 index 40eb75d..0000000 --- a/print_dialog_gtk-no-kEnableOopPrintDriversJobPrint.patch +++ /dev/null @@ -1,97 +0,0 @@ -From e3fcdb9c67501e7e4b86ea904e154ea615b5187e Mon Sep 17 00:00:00 2001 -From: Lei Zhang -Date: Tue, 18 Oct 2022 17:51:09 +0000 -Subject: [PATCH] Fix build when enable_oop_printing=false. - -https://crrev.com/1050907 changed print_dialog_gtk.cc to start checking -`kEnableOopPrintDriversJobPrint`, assuming it is unconditionally -defined. - -Similarly, various CLs like https://crrev.com/992136 changed -print_browsertest.cc without the proper conditionals. - -Change-Id: Ie7efe976bba4b7583be104fad37984bea07f8773 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3962532 -Reviewed-by: Alan Screen -Commit-Queue: Lei Zhang -Cr-Commit-Position: refs/heads/main@{#1060540} ---- - -diff --git a/chrome/browser/printing/print_browsertest.cc b/chrome/browser/printing/print_browsertest.cc -index a70cd643..c66456f 100644 ---- a/chrome/browser/printing/print_browsertest.cc -+++ b/chrome/browser/printing/print_browsertest.cc -@@ -2733,6 +2733,7 @@ - - void PrimeAsRepeatingErrorGenerator() { reset_errors_after_check_ = false; } - -+#if BUILDFLAG(ENABLE_OOP_PRINTING) - void PrimeForSpoolingSharedMemoryErrors() { - simulate_spooling_memory_errors_ = true; - } -@@ -2784,6 +2785,7 @@ - bool print_backend_service_use_detected() const { - return print_backend_service_use_detected_; - } -+#endif // BUILDFLAG(ENABLE_OOP_PRINTING) - - mojom::ResultCode use_default_settings_result() const { - return use_default_settings_result_; -@@ -2838,7 +2840,6 @@ - return std::make_unique( - rfh_id, &test_print_job_worker_callbacks_); - } --#endif // BUILDFLAG(ENABLE_OOP_PRINTING) - - void OnUseDefaultSettings() { - did_use_default_settings_ = true; -@@ -2861,6 +2862,7 @@ - print_backend_service_use_detected_ = true; - } - } -+#endif // BUILDFLAG(ENABLE_OOP_PRINTING) - - void ErrorCheck(mojom::ResultCode result) { - // Interested to reset any trigger for causing access-denied errors, so -diff --git a/ui/gtk/printing/print_dialog_gtk.cc b/ui/gtk/printing/print_dialog_gtk.cc -index 98985bc..0596691 100644 ---- a/ui/gtk/printing/print_dialog_gtk.cc -+++ b/ui/gtk/printing/print_dialog_gtk.cc -@@ -13,6 +13,7 @@ - - #include "base/bind.h" - #include "base/check_op.h" -+#include "base/dcheck_is_on.h" - #include "base/files/file_util.h" - #include "base/logging.h" - #include "base/memory/raw_ptr.h" -@@ -22,6 +23,7 @@ - #include "base/task/thread_pool.h" - #include "base/threading/sequenced_task_runner_handle.h" - #include "base/values.h" -+#include "printing/buildflags/buildflags.h" - #include "printing/metafile.h" - #include "printing/mojom/print.mojom.h" - #include "printing/print_job_constants.h" -@@ -419,11 +421,19 @@ - - void PrintDialogGtk::PrintDocument(const printing::MetafilePlayer& metafile, - const std::u16string& document_name) { -+#if DCHECK_IS_ON() -+#if BUILDFLAG(ENABLE_OOP_PRINTING) -+ const bool kOopPrinting = -+ printing::features::kEnableOopPrintDriversJobPrint.Get(); -+#else -+ const bool kOopPrinting = false; -+#endif // BUILDFLAG(ENABLE_OOP_PRINTING) -+ - // For in-browser printing, this runs on the print worker thread, so it does - // not block the UI thread. For OOP it runs on the service document task - // runner. -- DCHECK_EQ(owning_task_runner()->RunsTasksInCurrentSequence(), -- printing::features::kEnableOopPrintDriversJobPrint.Get()); -+ DCHECK_EQ(owning_task_runner()->RunsTasksInCurrentSequence(), kOopPrinting); -+#endif // DCHECK_IS_ON() - - // The document printing tasks can outlive the PrintingContext that created - // this dialog. diff --git a/profiler-missing-uintptr_t.patch b/profiler-missing-uintptr_t.patch deleted file mode 100644 index 68aa39b..0000000 --- a/profiler-missing-uintptr_t.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/base/debug/profiler.h -+++ b/base/debug/profiler.h -@@ -6,6 +6,7 @@ - #define BASE_DEBUG_PROFILER_H_ - - #include -+#include - - #include - diff --git a/re2-11-StringPiece.patch b/re2-11-StringPiece.patch index 81e5d8b..056e8c0 100644 --- a/re2-11-StringPiece.patch +++ b/re2-11-StringPiece.patch @@ -38,8 +38,8 @@ index b2f7cd8ed0788f..272b933bab9625 100644 while (re->Match(*arg, start, arg->size(), re2::RE2::Anchor::UNANCHORED, diff --git a/components/feedback/redaction_tool/redaction_tool.cc b/components/feedback/redaction_tool/redaction_tool.cc index 876e8da509aa74..c81806e0fb029f 100644 ---- a/components/feedback/redaction_tool.cc -+++ b/components/feedback/redaction_tool.cc +--- a/components/feedback/redaction_tool/redaction_tool.cc ++++ b/components/feedback/redaction_tool/redaction_tool.cc @@ -1081,7 +1081,7 @@ std::string RedactionTool::RedactCustomPatternWithContext( // Keep consuming, building up a result string as we go. re2::StringPiece text(input); @@ -54,7 +54,7 @@ index 6d516e86c9f1ed..cf73709add6d68 100644 --- a/extensions/browser/api/web_request/form_data_parser.cc +++ b/extensions/browser/api/web_request/form_data_parser.cc @@ -372,8 +372,7 @@ std::unique_ptr FormDataParser::CreateFromContentTypeHeader( - FormDataParser::FormDataParser() {} + FormDataParser::FormDataParser() = default; FormDataParserUrlEncoded::FormDataParserUrlEncoded() - : source_(nullptr), @@ -86,8 +86,8 @@ Cr-Commit-Position: refs/heads/main@{#1146625} diff --git a/components/feedback/redaction_tool/redaction_tool.cc b/components/feedback/redaction_tool/redaction_tool.cc index f130fe7013a002..a623db131d2f48 100644 ---- a/components/feedback/redaction_tool.cc -+++ b/components/feedback/redaction_tool.cc +--- a/components/feedback/redaction_tool/redaction_tool.cc ++++ b/components/feedback/redaction_tool/redaction_tool.cc @@ -815,7 +815,8 @@ std::string RedactionTool::RedactAndroidAppStoragePaths( // - Otherwise, remove all the characters in the component but the first // one. @@ -151,8 +151,8 @@ index 3bb5af9c1c56c6..3012f275be4793 100644 diff --git a/components/feedback/redaction_tool/redaction_tool.cc b/components/feedback/redaction_tool/redaction_tool.cc index a623db131d2f48..07d19502f8d23b 100644 ---- a/components/feedback/redaction_tool.cc -+++ b/components/feedback/redaction_tool.cc +--- a/components/feedback/redaction_tool/redaction_tool.cc ++++ b/components/feedback/redaction_tool/redaction_tool.cc @@ -703,11 +703,11 @@ std::string RedactionTool::RedactMACAddresses( if (detected != nullptr) { (*detected)[PIIType::kMACAddress].insert(mac); @@ -164,9 +164,9 @@ index a623db131d2f48..07d19502f8d23b 100644 - text.AppendToString(&result); + result.append(text.data(), text.size()); - return result; - } + UMA_HISTOGRAM_ENUMERATION(kFeedbackRedactionToolHistogramName, + PIIType::kMACAddress); @@ -733,8 +733,8 @@ std::string RedactionTool::RedactHashes( re2::StringPiece skipped, pre_whitespace, hash_prefix, hash_suffix; while (FindAndConsumeAndGetSkipped(&text, *hash_re, &skipped, &pre_whitespace, @@ -195,9 +195,9 @@ index a623db131d2f48..07d19502f8d23b 100644 - text.AppendToString(&result); + result.append(text.data(), text.size()); - return result; - } + UMA_HISTOGRAM_ENUMERATION(kFeedbackRedactionToolHistogramName, + PIIType::kStableIdentifier); @@ -806,8 +806,8 @@ std::string RedactionTool::RedactAndroidAppStoragePaths( while (FindAndConsumeAndGetSkipped(&text, *path_re, &skipped, &path_prefix, &pre_data, &post_data, &app_specific)) { @@ -215,9 +215,9 @@ index a623db131d2f48..07d19502f8d23b 100644 - text.AppendToString(&result); + result.append(text.data(), text.size()); - return result; - #else - return input; + + UMA_HISTOGRAM_ENUMERATION(kFeedbackRedactionToolHistogramName, + PIIType::kAndroidAppStoragePath); @@ -1089,12 +1089,12 @@ std::string RedactionTool::RedactCustomPatternWithContext( if (detected != nullptr) { (*detected)[pattern.pii_type].insert(matched_id_as_string); @@ -232,9 +232,9 @@ index a623db131d2f48..07d19502f8d23b 100644 } - text.AppendToString(&result); + result.append(text.data(), text.size()); - return result; - } + UMA_HISTOGRAM_ENUMERATION(kFeedbackRedactionToolHistogramName, + pattern.pii_type); @@ -1176,8 +1176,8 @@ std::string RedactionTool::RedactCustomPatternWithoutContext( re2::StringPiece matched_id; while (FindAndConsumeAndGetSkipped(&text, *re, &skipped, &matched_id)) { @@ -267,9 +267,9 @@ index a623db131d2f48..07d19502f8d23b 100644 } - text.AppendToString(&result); + result.append(text.data(), text.size()); - return result; - } + UMA_HISTOGRAM_ENUMERATION(kFeedbackRedactionToolHistogramName, + pattern.pii_type); From eee5a88144edad47597163db8f26687a5bd24915 Mon Sep 17 00:00:00 2001 From: Paul Wankadia Date: Tue, 23 May 2023 18:42:42 +0000 @@ -292,17 +292,17 @@ Cr-Commit-Position: refs/heads/main@{#1148060} diff --git a/components/feedback/redaction_tool/redaction_tool.cc b/components/feedback/redaction_tool/redaction_tool.cc index 07d19502f8d23b..814ac96d80a5a5 100644 ---- a/components/feedback/redaction_tool.cc -+++ b/components/feedback/redaction_tool.cc +--- a/components/feedback/redaction_tool/redaction_tool.cc ++++ b/components/feedback/redaction_tool/redaction_tool.cc @@ -1105,7 +1105,7 @@ std::string RedactionTool::RedactCustomPatternWithContext( bool IsUrlExempt(re2::StringPiece url, const char* const* first_party_extension_ids) { // We do not exempt anything with a query parameter. -- if (url.contains("?")) -+ if (url.find("?") != re2::StringPiece::npos) +- if (url.contains("?")) { ++ if (url.find("?") != re2::StringPiece::npos) { return false; + } - // Last part of an SELinux context is misdetected as a URL. From bbe41e215c64baf22faf257e7a9f8ce7bf7bc337 Mon Sep 17 00:00:00 2001 From: Paul Wankadia Date: Fri, 19 May 2023 19:13:27 +0000 diff --git a/replace_gn_files-system-libs.patch b/replace_gn_files-system-libs.patch index 74448bc..a639270 100644 --- a/replace_gn_files-system-libs.patch +++ b/replace_gn_files-system-libs.patch @@ -1,11 +1,12 @@ --- chromium-79.0.3945.29/build/linux/unbundle/replace_gn_files.py.system-dav1d 2019-11-09 14:30:17.297016975 +0100 +++ chromium-79.0.3945.29/build/linux/unbundle/replace_gn_files.py 2019-11-10 09:40:19.694662891 +0100 -@@ -40,6 +40,8 @@ import sys +@@ -40,6 +40,9 @@ import sys 'double-conversion': 'base/third_party/double_conversion/BUILD.gn', 'ffmpeg': 'third_party/ffmpeg/BUILD.gn', 'flac': 'third_party/flac/BUILD.gn', + 'flatbuffers': 'third_party/flatbuffers/BUILD.gn', + 'libsecret' : 'third_party/libsecret/BUILD.gn', ++ 'highway' : 'third_party/highway/BUILD.gn', 'fontconfig': 'third_party/fontconfig/BUILD.gn', 'freetype': 'build/config/freetype/freetype.gni', 'harfbuzz-ng': 'third_party/harfbuzz-ng/harfbuzz.gni', diff --git a/reproducible-config.gypi.patch b/reproducible-config.gypi.patch deleted file mode 100644 index a68dd78..0000000 --- a/reproducible-config.gypi.patch +++ /dev/null @@ -1,11 +0,0 @@ -Fix filesystem readdir order leaking into node_library_files list in /usr/include/electron/config.gypi -and a similar list compiled into the electron binary. - ---- src/third_party/electron_node/tools/utils.py.old 2022-08-31 22:24:25.422512158 +0200 -+++ src/third_party/electron_node/tools/utils.py 2022-09-02 08:52:51.061892033 +0200 -@@ -112,4 +112,4 @@ - list = glob.glob(dir+ '/**/*.' + ext, recursive=True) - if sys.platform == 'win32': - list = [ x.replace('\\', '/')for x in list] -- return list -+ return sorted(list) diff --git a/seccomp_bpf-no-lto.patch b/seccomp_bpf-no-lto.patch index 5ac86f2..d8e6abe 100644 --- a/seccomp_bpf-no-lto.patch +++ b/seccomp_bpf-no-lto.patch @@ -1,6 +1,6 @@ --- src/sandbox/linux/BUILD.gn.old 2022-10-12 18:06:31.399406000 +0200 +++ src/sandbox/linux/BUILD.gn 2022-10-22 11:55:59.621396300 +0200 -@@ -196,6 +196,28 @@ +@@ -196,6 +196,27 @@ } } @@ -17,7 +17,6 @@ + deps = [ + ":sandbox_services", + "//base", -+ "//base/third_party/dynamic_annotations", + "//build:chromeos_buildflags", + "//sandbox:sandbox_buildflags", + ] @@ -44,5 +43,5 @@ ":sandbox_services", + ":seccomp_bpf_asm", "//base", - "//base/third_party/dynamic_annotations", "//build:chromeos_buildflags", + "//sandbox:sandbox_buildflags", diff --git a/select_file_dialog_linux_kde-Wodr.patch b/select_file_dialog_linux_kde-Wodr.patch deleted file mode 100644 index ac14296..0000000 --- a/select_file_dialog_linux_kde-Wodr.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/ui/shell_dialogs/select_file_dialog_linux_kde.cc.orig 2022-10-12 18:06:39.715381291 +0200 -+++ src/ui/shell_dialogs/select_file_dialog_linux_kde.cc 2022-10-15 10:35:05.417119106 +0200 -@@ -198,7 +198,7 @@ - return base::GetAppOutput(command_line, &kdialog_version); - } - --SelectFileDialogLinuxKde* NewSelectFileDialogLinuxKde( -+SelectFileDialog* NewSelectFileDialogLinuxKde( - SelectFileDialog::Listener* listener, - std::unique_ptr policy, - base::nix::DesktopEnvironment desktop, diff --git a/shim_headers-fix-ninja.patch b/shim_headers-fix-ninja.patch deleted file mode 100644 index c083065..0000000 --- a/shim_headers-fix-ninja.patch +++ /dev/null @@ -1,18 +0,0 @@ -Correct output path of ninja shim_headers rule -This is not needed for a succesful build on OBS but makes building it manually way easier - ---- src/build/shim_headers.gni.orig -+++ src/build/shim_headers.gni -@@ -28,8 +28,10 @@ - } - args += invoker.headers - -- outputs = process_file_template(invoker.headers, -- "${shim_headers_path}/{{source_file_part}}") -+ outputs = [] -+ foreach(h, invoker.headers) { -+ outputs += [ shim_headers_path + "/" + rebase_path(invoker.root_path,"//") + "/" + h ] -+ } - } - - group(target_name) { diff --git a/skia-system-vulkan-headers.patch b/skia-system-vulkan-headers.patch index 7e54589..3b830ae 100644 --- a/skia-system-vulkan-headers.patch +++ b/skia-system-vulkan-headers.patch @@ -3,7 +3,7 @@ Unbundle only Skia's vulkan headers. ANGLE needs the bleeding-edge ones in vulka --- a/third_party/skia/include/private/gpu/vk/SkiaVulkan.h +++ b/third_party/skia/include/private/gpu/vk/SkiaVulkan.h @@ -11,7 +11,7 @@ - #include "include/core/SkTypes.h" + // IWYU pragma: begin_exports #if SKIA_IMPLEMENTATION || !defined(SK_VULKAN) -#include "include/third_party/vulkan/vulkan/vulkan_core.h" diff --git a/static_constructors-Wstrict-aliasing.patch b/static_constructors-Wstrict-aliasing.patch deleted file mode 100644 index 917ad88..0000000 --- a/static_constructors-Wstrict-aliasing.patch +++ /dev/null @@ -1,35 +0,0 @@ -Make DEFINE_GLOBAL C++17 compliant. - -The pointer to an object is not interconvertible with the pointer to its underlying storage, -and GCC raises a Wstrict-aliasing warning about UB resulting from the dereference. -(This is really a pointer provenance issue, not a type aliasing issue, as the underlying -void*[] is never actually directly used) -Additionally, void* potentially has a too-small alignment for some types (eg. long double). - -We fix the fist issue by memory laundering, and the second by switching to aligned_storage_t. - ---- src/third_party/blink/renderer/platform/wtf/static_constructors.h.old 2022-10-20 19:00:30.237477900 +0200 -+++ src/third_party/blink/renderer/platform/wtf/static_constructors.h 2022-10-29 21:48:44.336995700 +0200 -@@ -21,8 +21,11 @@ - #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_WTF_STATIC_CONSTRUCTORS_H_ - #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_WTF_STATIC_CONSTRUCTORS_H_ - -+#include -+#include -+ - // We need to avoid having static constructors. This is accomplished by defining --// a static array of the appropriate size and alignment, and defining a const -+// a buffer of the appropriate size and alignment, and defining a const - // reference that points to the buffer. During initialization, the object will - // be constructed with placement new into the buffer. This works with MSVC, GCC, - // and Clang without producing dynamic initialization code even at -O0. The only -@@ -33,7 +36,7 @@ - // Use an array of pointers instead of an array of char in case there is some - // alignment issue. - #define DEFINE_GLOBAL(type, name) \ -- void* name##Storage[(sizeof(type) + sizeof(void*) - 1) / sizeof(void*)]; \ -- const type& name = *reinterpret_cast(&name##Storage) -+ std::aligned_storage_t name##Storage; \ -+ const type& name = *std::launder(reinterpret_cast(&name##Storage)) - - #endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_WTF_STATIC_CONSTRUCTORS_H_ diff --git a/string_hasher-type-pun-UB-causes-heap-corruption.patch b/string_hasher-type-pun-UB-causes-heap-corruption.patch deleted file mode 100644 index 3336ddf..0000000 --- a/string_hasher-type-pun-UB-causes-heap-corruption.patch +++ /dev/null @@ -1,147 +0,0 @@ ---- src/third_party/blink/renderer/platform/wtf/text/string_hasher.h.orig 2022-10-12 18:06:32.355403100 +0200 -+++ src/third_party/blink/renderer/platform/wtf/text/string_hasher.h 2022-10-19 18:34:04.317886800 +0200 -@@ -22,6 +22,9 @@ - #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_WTF_TEXT_STRING_HASHER_H_ - #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_WTF_TEXT_STRING_HASHER_H_ - -+#include -+#include -+ - #include "base/dcheck_is_on.h" - #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" - #include "third_party/blink/renderer/platform/wtf/text/wtf_uchar.h" -@@ -92,38 +95,22 @@ - - template - void AddCharactersAssumingAligned(const T* data, unsigned length) { -- DCHECK(!has_pending_character_); -- -- bool remainder = length & 1; -- length >>= 1; -- -- while (length--) { -- AddCharactersAssumingAligned(Converter(data[0]), Converter(data[1])); -- data += 2; -- } -- -- if (remainder) -- AddCharacter(Converter(*data)); -+ AddCharactersAssumingAligned_internal(reinterpret_cast(data),length); - } - - template - void AddCharactersAssumingAligned(const T* data, unsigned length) { -- AddCharactersAssumingAligned(data, length); -+ AddCharactersAssumingAligned_internal(reinterpret_cast(data),length); - } - - template - void AddCharacters(const T* data, unsigned length) { -- if (has_pending_character_ && length) { -- has_pending_character_ = false; -- AddCharactersAssumingAligned(pending_character_, Converter(*data++)); -- --length; -- } -- AddCharactersAssumingAligned(data, length); -+ AddCharacters_internal(reinterpret_cast(data),length); - } - - template - void AddCharacters(const T* data, unsigned length) { -- AddCharacters(data, length); -+ AddCharacters_internal(reinterpret_cast(data),length); - } - - unsigned HashWithTop8BitsMasked() const { -@@ -158,14 +145,12 @@ - - template - static unsigned ComputeHashAndMaskTop8Bits(const T* data, unsigned length) { -- StringHasher hasher; -- hasher.AddCharactersAssumingAligned(data, length); -- return hasher.HashWithTop8BitsMasked(); -+ return ComputeHashAndMaskTop8Bits_internal(reinterpret_cast(data), length); - } - - template - static unsigned ComputeHashAndMaskTop8Bits(const T* data, unsigned length) { -- return ComputeHashAndMaskTop8Bits(data, length); -+ return ComputeHashAndMaskTop8Bits_internal(reinterpret_cast(data), length); - } - - template -@@ -186,7 +171,7 @@ - // bits in StringImpl and hash strings consistently, but I don't see why - // we'd want that for general memory hashing. - DCHECK(!(length % 2)); -- return ComputeHashAndMaskTop8Bits(static_cast(data), -+ return ComputeHashAndMaskTop8Bits_internal(static_cast(data), - length / sizeof(UChar)); - } - -@@ -202,6 +187,65 @@ - static UChar DefaultConverter(UChar character) { return character; } - static UChar DefaultConverter(LChar character) { return character; } - -+ template -+ void AddCharactersAssumingAligned_internal(const unsigned char* data, unsigned length) { -+ DCHECK(!has_pending_character_); -+ -+ static_assert(std::is_pod::value, "we only support hashing POD types"); -+ bool remainder = length & 1; -+ length >>= 1; -+ -+ while (length--) { -+ T data_converted[2]; -+ std::memcpy(data_converted, data, sizeof(T)*2); -+ AddCharactersAssumingAligned(Converter(data_converted[0]), Converter(data_converted[1])); -+ data += sizeof(T)*2; -+ } -+ -+ if (remainder) { -+ T data_converted; -+ std::memcpy(&data_converted, data, sizeof(T)); -+ AddCharacter(Converter(data_converted)); -+ } -+ } -+ -+ template -+ void AddCharactersAssumingAligned_internal(const unsigned char* data, unsigned length) { -+ AddCharactersAssumingAligned_internal(data, length); -+ } -+ -+ template -+ void AddCharacters_internal(const unsigned char* data, unsigned length) { -+ static_assert(std::is_pod::value, "we only support hashing POD types"); -+ -+ if (has_pending_character_ && length) { -+ has_pending_character_ = false; -+ T data_converted; -+ std::memcpy(&data_converted, data, sizeof(T)); -+ AddCharactersAssumingAligned(pending_character_, Converter(data_converted)); -+ data += sizeof(T); -+ --length; -+ } -+ AddCharactersAssumingAligned_internal(data, length); -+ } -+ -+ template -+ void AddCharacters_internal(const unsigned char* data, unsigned length) { -+ AddCharacters_internal(data, length); -+ } -+ -+ template -+ static unsigned ComputeHashAndMaskTop8Bits_internal(const unsigned char* data, unsigned length) { -+ StringHasher hasher; -+ hasher.AddCharactersAssumingAligned_internal(data, length); -+ return hasher.HashWithTop8BitsMasked(); -+ } -+ -+ template -+ static unsigned ComputeHashAndMaskTop8Bits_internal(const unsigned char* data, unsigned length) { -+ return ComputeHashAndMaskTop8Bits_internal(data, length); -+ } -+ - unsigned AvalancheBits() const { - unsigned result = hash_; - diff --git a/swiftshader-Constants-Wstrict-aliasing.patch b/swiftshader-Constants-Wstrict-aliasing.patch deleted file mode 100644 index 80b08e9..0000000 --- a/swiftshader-Constants-Wstrict-aliasing.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- src/third_party/swiftshader/src/Pipeline/Constants.cpp.orig 2022-10-12 18:07:57.855149000 +0200 -+++ src/third_party/swiftshader/src/Pipeline/Constants.cpp 2022-10-19 21:36:18.341533500 +0200 -@@ -306,7 +306,9 @@ - - for(int i = 0; i <= 0xFFFF; i++) - { -- half2float[i] = (float)reinterpret_cast(i); -+ half i_float; -+ std::memcpy(&i_float, &i, sizeof(half)); -+ half2float[i] = static_cast(i_float); - } - } - diff --git a/swiftshader-Half-Wstrict-aliasing.patch b/swiftshader-Half-Wstrict-aliasing.patch deleted file mode 100644 index 113c9b7..0000000 --- a/swiftshader-Half-Wstrict-aliasing.patch +++ /dev/null @@ -1,78 +0,0 @@ ---- src/third_party/swiftshader/src/System/Half.hpp.orig 2022-10-12 18:07:57.859149000 +0200 -+++ src/third_party/swiftshader/src/System/Half.hpp 2022-10-19 21:30:33.133940800 +0200 -@@ -19,6 +19,7 @@ - - #include - #include -+#include - - namespace sw { - -@@ -194,7 +195,8 @@ - const unsigned int float32MinNormfloat11 = 0x38800000; - const unsigned int float32MinDenormfloat11 = 0x35000080; - -- const unsigned int float32Bits = *reinterpret_cast(&fp32); -+ unsigned int float32Bits; -+ std::memcpy(&float32Bits, &fp32, 4); - const bool float32Sign = (float32Bits & float32SignMask) == float32SignMask; - - unsigned int float32Val = float32Bits & float32ValueMask; -@@ -273,7 +275,8 @@ - const unsigned int float32MinNormfloat10 = 0x38800000; - const unsigned int float32MinDenormfloat10 = 0x35800040; - -- const unsigned int float32Bits = *reinterpret_cast(&fp32); -+ unsigned int float32Bits; -+ std::memcpy(&float32Bits, &fp32, 4); - const bool float32Sign = (float32Bits & float32SignMask) == float32SignMask; - - unsigned int float32Val = float32Bits & float32ValueMask; ---- src/third_party/swiftshader/src/System/Half.cpp.orig 2022-10-12 18:07:57.859149000 +0200 -+++ src/third_party/swiftshader/src/System/Half.cpp 2022-10-19 22:47:18.573634800 +0200 -@@ -14,11 +14,14 @@ - - #include "Half.hpp" - -+#include -+ - namespace sw { - - half::half(float fp32) - { -- unsigned int fp32i = *(unsigned int *)&fp32; -+ unsigned int fp32i; -+ std::memcpy(&fp32i, &fp32, 4); - unsigned int sign = (fp32i & 0x80000000) >> 16; - unsigned int abs = fp32i & 0x7FFFFFFF; - -@@ -51,7 +54,7 @@ - half::operator float() const - { - unsigned int fp32i; -- -+ float ret; - int s = (fp16i >> 15) & 0x00000001; - int e = (fp16i >> 10) & 0x0000001F; - int m = fp16i & 0x000003FF; -@@ -61,8 +64,8 @@ - if(m == 0) - { - fp32i = s << 31; -- -- return (float &)fp32i; -+ std::memcpy(&ret, &fp32i, 4); -+ return ret; - } - else - { -@@ -82,7 +85,8 @@ - - fp32i = (s << 31) | (e << 23) | m; - -- return (float &)fp32i; -+ std::memcpy(&ret, &fp32i, 4); -+ return ret; - } - - half &half::operator=(float f) diff --git a/swiftshader-LRUCache-missing-uint64_t.patch b/swiftshader-LRUCache-missing-uint64_t.patch deleted file mode 100644 index 6b64014..0000000 --- a/swiftshader-LRUCache-missing-uint64_t.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/third_party/swiftshader/src/System/LRUCache.hpp -+++ b/third_party/swiftshader/src/System/LRUCache.hpp -@@ -18,6 +18,7 @@ - #include "System/Debug.hpp" - - #include -+#include - #include - #include - #include diff --git a/system-jsoncpp.patch b/system-jsoncpp.patch deleted file mode 100644 index 1db8290..0000000 --- a/system-jsoncpp.patch +++ /dev/null @@ -1,101 +0,0 @@ -description: use system jsoncpp -author: Michael Gilbert - ---- a/third_party/jsoncpp/BUILD.gn -+++ b/third_party/jsoncpp/BUILD.gn -@@ -3,6 +3,7 @@ - # found in the LICENSE file. - - import("//testing/libfuzzer/fuzzer_test.gni") -+import("//build/config/linux/pkg_config.gni") - - declare_args() { - # Allow individual projects to remove the warning suppression -@@ -11,49 +12,12 @@ declare_args() { - jsoncpp_no_deprecated_declarations = true - } - --config("jsoncpp_config") { -- include_dirs = [ "source/include" ] -- -- # TODO(crbug.com/983223): Update JsonCpp BUILD.gn to remove deprecated -- # declaration flag. -- # This temporary flag allowing clients to update to the new version, and then -- # update to the new StreamWriter and CharReader classes. -- if (jsoncpp_no_deprecated_declarations && -- (!is_win || (is_clang && !is_ios))) { -- cflags_cc = [ "-Wno-deprecated-declarations" ] -- } -+pkg_config("jsoncpp_config") { -+ packages = [ "jsoncpp" ] - } - --source_set("jsoncpp") { -- sources = [ -- "source/include/json/allocator.h", -- "source/include/json/assertions.h", -- "source/include/json/config.h", -- "source/include/json/forwards.h", -- "source/include/json/json.h", -- "source/include/json/json_features.h", -- "source/include/json/reader.h", -- "source/include/json/value.h", -- "source/include/json/version.h", -- "source/include/json/writer.h", -- "source/src/lib_json/json_reader.cpp", -- "source/src/lib_json/json_tool.h", -- "source/src/lib_json/json_value.cpp", -- "source/src/lib_json/json_writer.cpp", -- ] -- -+group("jsoncpp") { - public_configs = [ ":jsoncpp_config" ] -- -- defines = [ -- "JSON_USE_EXCEPTION=0", -- "JSON_USE_NULLREF=0", -- ] -- -- include_dirs = [ "source/src/lib_json" ] -- -- if (!is_win || is_clang) { -- cflags_cc = [ "-Wno-implicit-fallthrough" ] -- } - } - - if (build_with_chromium) { ---- a/components/mirroring/service/receiver_response.cc -+++ b/components/mirroring/service/receiver_response.cc -@@ -10,8 +10,8 @@ - #include "base/logging.h" - #include "base/strings/string_util.h" - #include "components/mirroring/service/value_util.h" --#include "third_party/jsoncpp/source/include/json/reader.h" --#include "third_party/jsoncpp/source/include/json/writer.h" -+#include -+#include - - namespace mirroring { - namespace { ---- a/components/mirroring/service/receiver_response.h -+++ b/components/mirroring/service/receiver_response.h -@@ -11,7 +11,7 @@ - - #include "base/check.h" - #include "base/component_export.h" --#include "third_party/jsoncpp/source/include/json/value.h" -+#include - #include "third_party/openscreen/src/cast/streaming/answer_messages.h" - - namespace mirroring { ---- a/third_party/openscreen/src/cast/streaming/answer_messages.h -+++ b/third_party/openscreen/src/cast/streaming/answer_messages.h -@@ -17,7 +17,7 @@ - #include "absl/types/optional.h" - #include "cast/streaming/resolution.h" - #include "cast/streaming/ssrc.h" --#include "json/value.h" -+#include - #include "platform/base/error.h" - #include "util/simple_fraction.h" - diff --git a/system-libdrm.patch b/system-libdrm.patch index b6990c8..f5fed9d 100644 --- a/system-libdrm.patch +++ b/system-libdrm.patch @@ -19,8 +19,8 @@ Index: chromium-98.0.4758.80/ui/ozone/platform/drm/gpu/crtc_controller.h --- chromium-98.0.4758.80.orig/ui/ozone/platform/drm/gpu/crtc_controller.h +++ chromium-98.0.4758.80/ui/ozone/platform/drm/gpu/crtc_controller.h @@ -11,7 +11,7 @@ - #include + #include "base/memory/raw_ref.h" #include "base/memory/weak_ptr.h" -#include "third_party/libdrm/src/include/drm/drm_fourcc.h" +#include @@ -32,8 +32,8 @@ Index: chromium-98.0.4758.80/ui/ozone/platform/drm/gpu/hardware_display_controll --- chromium-98.0.4758.80.orig/ui/ozone/platform/drm/gpu/hardware_display_controller.cc +++ chromium-98.0.4758.80/ui/ozone/platform/drm/gpu/hardware_display_controller.cc @@ -20,7 +20,7 @@ + #include "base/metrics/histogram_macros.h" #include "base/ranges/algorithm.h" - #include "base/strings/stringprintf.h" #include "base/trace_event/typed_macros.h" -#include "third_party/libdrm/src/include/drm/drm_fourcc.h" +#include @@ -45,7 +45,7 @@ Index: chromium-98.0.4758.80/media/gpu/chromeos/video_decoder_pipeline_unittest. --- chromium-98.0.4758.80.orig/media/gpu/chromeos/video_decoder_pipeline_unittest.cc +++ chromium-98.0.4758.80/media/gpu/chromeos/video_decoder_pipeline_unittest.cc @@ -23,7 +23,7 @@ - #include "media/gpu/chromeos/mailbox_video_frame_converter.h" + #include "media/gpu/chromeos/dmabuf_video_frame_pool.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" -#include "third_party/libdrm/src/include/drm/drm_fourcc.h" diff --git a/system-pydeps.patch b/system-pydeps.patch index 4738a59..d9bdad2 100644 --- a/system-pydeps.patch +++ b/system-pydeps.patch @@ -125,3 +125,14 @@ Also excluding markupsafe, because jinja2 needs an ancient version. “ImportErr ../../build/scripts/blinkbuild/__init__.py ../../build/scripts/blinkbuild/name_style_converter.py validate_web_idl.py +--- a/mojo/public/tools/bindings/mojom.gni ++++ b/mojo/public/tools/bindings/mojom.gni +@@ -699,7 +699,7 @@ + allow_remote = true + custom_processor = "mojom_parser" + script = mojom_parser_script +- inputs = mojom_parser_sources + ply_sources + [ build_metadata_filename ] ++ inputs = mojom_parser_sources + [ build_metadata_filename ] + sources = sources_list + public_deps = parser_deps + outputs = [] diff --git a/system-wayland.patch b/system-wayland.patch new file mode 100644 index 0000000..866c199 --- /dev/null +++ b/system-wayland.patch @@ -0,0 +1,90 @@ +--- src/third_party/wayland/BUILD.gn.old ++++ src/third_party/wayland/BUILD.gn +@@ -45,7 +45,14 @@ + generator_type = "protocol-client" + } + ++pkg_config("system_wayland_client") { ++ packages = [ "wayland-client" ] ++} ++ + source_set("wayland_util") { ++ public_configs = [":system_wayland_client"] ++} ++source_set("xwayland_util") { + sources = [ + "src/src/wayland-private.h", + "src/src/wayland-util.c", +@@ -77,7 +84,14 @@ + public_configs = [ ":wayland_config" ] + } + +-static_library("wayland_server") { ++pkg_config("system_wayland_server") { ++ packages = [ "wayland-server" ] ++} ++ ++source_set("wayland_server") { ++ public_configs = [":system_wayland_server"] ++} ++static_library("xwayland_server") { + sources = [ + "src/src/event-loop.c", + "src/src/wayland-server.c", +@@ -104,7 +118,10 @@ + public_configs = [ ":wayland_config" ] + } + +-static_library("wayland_client") { ++source_set("wayland_client") { ++ public_configs = [":system_wayland_client"] ++} ++static_library("xwayland_client") { + sources = [ "src/src/wayland-client.c" ] + + deps = [ +@@ -124,7 +141,14 @@ + public_configs = [ ":wayland_config" ] + } + +-static_library("wayland_egl") { ++pkg_config("system_wayland_egl") { ++ packages = [ "wayland-egl" ] ++} ++ ++source_set("wayland_egl") { ++ public_configs = [":system_wayland_egl"] ++} ++static_library("xwayland_egl") { + sources = [ + "src/egl/wayland-egl-backend.h", + "src/egl/wayland-egl-core.h", +@@ -143,7 +167,14 @@ + public_configs = [ ":wayland_config" ] + } + +-static_library("wayland_cursor") { ++pkg_config("system_wayland_cursor") { ++ packages = [ "wayland-cursor" ] ++} ++ ++source_set("wayland_cursor") { ++ public_configs = [":system_wayland_cursor"] ++} ++static_library("xwayland_cursor") { + sources = [ + "src/cursor/cursor-data.h", + "src/cursor/os-compatibility.c", +@@ -173,7 +204,11 @@ + include_dirs = [ "include/" ] + } + +-executable("wayland_scanner") { ++copy("wayland_scanner") { ++ sources = [ "/usr/bin/wayland-scanner" ] ++ outputs = [ "$root_out_dir/wayland_scanner" ] ++} ++executable("xwayland_scanner") { + sources = [ "src/src/scanner.c" ] + + deps = [ diff --git a/target_property-missing-uint32_t.patch b/target_property-missing-uint32_t.patch deleted file mode 100644 index b72f8c5..0000000 --- a/target_property-missing-uint32_t.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/cc/trees/target_property.cc.old 2023-03-07 10:51:21.466753600 +0000 -+++ src/cc/trees/target_property.cc 2023-03-08 17:47:48.197294200 +0000 -@@ -4,6 +4,8 @@ - - #include "cc/trees/target_property.h" - -+#include -+ - #include "ui/gfx/animation/keyframe/target_property.h" - - namespace cc { diff --git a/ui-gcc13-missing-headers.patch b/ui-gcc13-missing-headers.patch deleted file mode 100644 index b8a7168..0000000 --- a/ui-gcc13-missing-headers.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- src/ui/base/prediction/kalman_filter.h.old 2023-03-07 10:51:36.714768200 +0000 -+++ src/ui/base/prediction/kalman_filter.h 2023-03-08 08:32:35.533343500 +0000 -@@ -5,6 +5,8 @@ - #ifndef UI_BASE_PREDICTION_KALMAN_FILTER_H_ - #define UI_BASE_PREDICTION_KALMAN_FILTER_H_ - -+#include -+ - #include "base/component_export.h" - #include "ui/gfx/geometry/matrix3_f.h" - ---- src/ui/gfx/geometry/linear_gradient.h.old 2023-03-07 11:51:36.862768295 +0100 -+++ src/ui/gfx/geometry/linear_gradient.h 2023-03-08 13:03:18.500668734 +0100 -@@ -6,6 +6,8 @@ - #define UI_GFX_LINEAR_GRADIENT_H_ - - #include -+#include -+#include - #include - - #include "ui/gfx/geometry/geometry_skia_export.h" ---- src/ui/events/types/scroll_types.h.old 2023-03-07 11:51:36.834768269 +0100 -+++ src/ui/events/types/scroll_types.h 2023-03-08 11:07:48.696799233 +0100 -@@ -5,6 +5,8 @@ - #ifndef UI_EVENTS_TYPES_SCROLL_TYPES_H_ - #define UI_EVENTS_TYPES_SCROLL_TYPES_H_ - -+#include -+ - namespace ui { - - enum class ScrollGranularity : uint8_t { diff --git a/unzip-Wsubobject-linkage.patch b/unzip-Wsubobject-linkage.patch deleted file mode 100644 index 9097076..0000000 --- a/unzip-Wsubobject-linkage.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- src/components/services/unzip/public/cpp/unzip.cc.old 2022-10-12 18:06:29.371412000 +0200 -+++ src/components/services/unzip/public/cpp/unzip.cc 2022-10-19 21:52:31.365276500 +0200 -@@ -29,11 +29,6 @@ - #include "mojo/public/cpp/bindings/self_owned_receiver.h" - - namespace unzip { --namespace { -- --std::string Redact(const base::FilePath& path) { -- return LOG_IS_ON(INFO) ? "'" + path.AsUTF8Unsafe() + "'" : "(redacted)"; --} - - class UnzipParams : public base::RefCounted, - public unzip::mojom::UnzipFilter, -@@ -100,6 +95,12 @@ - UnzipCallback callback_; - }; - -+namespace { -+ -+std::string Redact(const base::FilePath& path) { -+ return LOG_IS_ON(INFO) ? "'" + path.AsUTF8Unsafe() + "'" : "(redacted)"; -+} -+ - class DetectEncodingParams : public base::RefCounted { - public: - DetectEncodingParams(mojo::PendingRemote unzipper, ---- src/components/services/unzip/public/cpp/unzip.h.old 2022-10-12 18:06:29.371412000 +0200 -+++ src/components/services/unzip/public/cpp/unzip.h 2022-10-19 21:50:20.576045300 +0200 -@@ -52,9 +52,7 @@ - const base::FilePath& zip_file, - GetExtractedInfoCallback result_callback); - --namespace { - class UnzipParams; --} - - // Class that wraps the unzip service to manage the lifetime of its - // mojo conncections to enable cancellation, etc. diff --git a/v8-regexp-parser-UCHAR_BASIC_EMOJI.patch b/v8-regexp-parser-UCHAR_BASIC_EMOJI.patch new file mode 100644 index 0000000..9e0856b --- /dev/null +++ b/v8-regexp-parser-UCHAR_BASIC_EMOJI.patch @@ -0,0 +1,503 @@ +From 0fec70aeb15c286cb696420616e2aeb3bc0eb03a Mon Sep 17 00:00:00 2001 +From: pthier +Date: Fri, 25 Nov 2022 11:27:06 +0100 +Subject: [PATCH] [regexp] Support properties of strings in unicode sets mode + +Add support for properties of strings in unicode sets mode (/v). + +Bug: v8:11935 +Change-Id: Iae2f0182b1c42bb900c524ca406784b7b1b52842 +Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4051247 +Commit-Queue: Patrick Thier +Reviewed-by: Mathias Bynens +Cr-Commit-Position: refs/heads/main@{#84481} +--- + src/regexp/regexp-parser.cc | 162 ++++++++++++++++---- + test/mjsunit/harmony/regexp-unicode-sets.js | 36 +++++ + test/test262/test262.status | 153 ++++++++---------- + 3 files changed, 227 insertions(+), 124 deletions(-) + +diff --git a/src/regexp/regexp-parser.cc b/src/regexp/regexp-parser.cc +index b5ead7c0054..f420b2eec42 100644 +--- a/v8/src/regexp/regexp-parser.cc ++++ b/v8/src/regexp/regexp-parser.cc +@@ -450,7 +450,8 @@ class RegExpParserImpl final { + + bool ParsePropertyClassName(ZoneVector* name_1, + ZoneVector* name_2); +- bool AddPropertyClassRange(ZoneList* add_to, bool negate, ++ bool AddPropertyClassRange(ZoneList* add_to_range, ++ CharacterClassStrings* add_to_strings, bool negate, + const ZoneVector& name_1, + const ZoneVector& name_2); + +@@ -465,7 +466,7 @@ class RegExpParserImpl final { + bool TryParseCharacterClassEscape(base::uc32 next, + InClassEscapeState in_class_escape_state, + ZoneList* ranges, +- Zone* zone, ++ CharacterClassStrings* strings, Zone* zone, + bool add_unicode_case_equivalents); + RegExpTree* ParseClassStringDisjunction(ZoneList* ranges, + CharacterClassStrings* strings); +@@ -1094,16 +1095,14 @@ RegExpTree* RegExpParserImpl::ParseDisjunction() { + case 's': + case 'S': + case 'w': +- case 'W': +- case 'p': +- case 'P': { ++ case 'W': { + base::uc32 next = Next(); + ZoneList* ranges = + zone()->template New>(2, zone()); + bool add_unicode_case_equivalents = + IsUnicodeMode() && ignore_case(); + bool parsed_character_class_escape = TryParseCharacterClassEscape( +- next, InClassEscapeState::kNotInClass, ranges, zone(), ++ next, InClassEscapeState::kNotInClass, ranges, nullptr, zone(), + add_unicode_case_equivalents CHECK_FAILED); + + if (parsed_character_class_escape) { +@@ -1117,6 +1116,38 @@ RegExpTree* RegExpParserImpl::ParseDisjunction() { + } + break; + } ++ case 'p': ++ case 'P': { ++ base::uc32 next = Next(); ++ ZoneList* ranges = ++ zone()->template New>(2, zone()); ++ CharacterClassStrings* strings = nullptr; ++ if (unicode_sets()) { ++ strings = zone()->template New(zone()); ++ } ++ bool add_unicode_case_equivalents = ignore_case(); ++ bool parsed_character_class_escape = TryParseCharacterClassEscape( ++ next, InClassEscapeState::kNotInClass, ranges, strings, zone(), ++ add_unicode_case_equivalents CHECK_FAILED); ++ ++ if (parsed_character_class_escape) { ++ if (unicode_sets()) { ++ RegExpClassSetOperand* op = ++ zone()->template New(ranges, ++ strings); ++ builder->AddTerm(op); ++ } else { ++ RegExpClassRanges* cc = ++ zone()->template New(zone(), ranges); ++ builder->AddClassRanges(cc); ++ } ++ } else { ++ CHECK(!IsUnicodeMode()); ++ Advance(2); ++ builder->AddCharacter(next); // IdentityEscape. ++ } ++ break; ++ } + // AtomEscape :: + // k GroupName + case 'k': { +@@ -1827,10 +1858,44 @@ bool IsExactPropertyValueAlias(const char* property_value_name, + return false; + } + ++void ExtractStringsFromUnicodeSet(const icu::UnicodeSet& set, ++ CharacterClassStrings* strings, ++ RegExpFlags flags, Zone* zone) { ++ DCHECK(set.hasStrings()); ++ DCHECK(IsUnicodeSets(flags)); ++ DCHECK_NOT_NULL(strings); ++ ++ RegExpTextBuilder::SmallRegExpTreeVector string_storage( ++ ZoneAllocator{zone}); ++ RegExpTextBuilder string_builder(zone, &string_storage, flags); ++ const bool needs_case_folding = IsIgnoreCase(flags); ++ icu::UnicodeSetIterator iter(set); ++ iter.skipToStrings(); ++ while (iter.next()) { ++ const icu::UnicodeString& s = iter.getString(); ++ const char16_t* p = s.getBuffer(); ++ int32_t length = s.length(); ++ ZoneList* string = ++ zone->template New>(length, zone); ++ for (int32_t i = 0; i < length;) { ++ UChar32 c; ++ U16_NEXT(p, i, length, c); ++ string_builder.AddUnicodeCharacter(c); ++ if (needs_case_folding) { ++ c = u_foldCase(c, U_FOLD_CASE_DEFAULT); ++ } ++ string->Add(c, zone); ++ } ++ strings->emplace(string->ToVector(), string_builder.ToRegExp()); ++ string_storage.clear(); ++ } ++} ++ + bool LookupPropertyValueName(UProperty property, + const char* property_value_name, bool negate, +- bool needs_case_folding, +- ZoneList* result, Zone* zone) { ++ ZoneList* result_ranges, ++ CharacterClassStrings* result_strings, ++ RegExpFlags flags, Zone* zone) { + UProperty property_for_lookup = property; + if (property_for_lookup == UCHAR_SCRIPT_EXTENSIONS) { + // For the property Script_Extensions, we have to do the property value +@@ -1854,11 +1919,15 @@ bool LookupPropertyValueName(UProperty property, + bool success = ec == U_ZERO_ERROR && !set.isEmpty(); + + if (success) { ++ if (set.hasStrings()) { ++ ExtractStringsFromUnicodeSet(set, result_strings, flags, zone); ++ } ++ const bool needs_case_folding = IsUnicodeSets(flags) && IsIgnoreCase(flags); + if (needs_case_folding) CharacterRange::UnicodeSimpleCloseOver(set); + set.removeAllStrings(); + if (negate) set.complement(); + for (int i = 0; i < set.getRangeCount(); i++) { +- result->Add( ++ result_ranges->Add( + CharacterRange::Range(set.getRangeStart(i), set.getRangeEnd(i)), + zone); + } +@@ -1873,7 +1942,7 @@ inline bool NameEquals(const char* name, const char (&literal)[N]) { + + bool LookupSpecialPropertyValueName(const char* name, + ZoneList* result, +- bool negate, bool needs_case_folding, ++ bool negate, RegExpFlags flags, + Zone* zone) { + if (NameEquals(name, "Any")) { + if (negate) { +@@ -1888,7 +1957,7 @@ bool LookupSpecialPropertyValueName(const char* name, + zone); + } else if (NameEquals(name, "Assigned")) { + return LookupPropertyValueName(UCHAR_GENERAL_CATEGORY, "Unassigned", +- !negate, needs_case_folding, result, zone); ++ !negate, result, nullptr, flags, zone); + } else { + return false; + } +@@ -1897,7 +1966,7 @@ bool LookupSpecialPropertyValueName(const char* name, + + // Explicitly allowlist supported binary properties. The spec forbids supporting + // properties outside of this set to ensure interoperability. +-bool IsSupportedBinaryProperty(UProperty property) { ++bool IsSupportedBinaryProperty(UProperty property, bool unicode_sets) { + switch (property) { + case UCHAR_ALPHABETIC: + // 'Any' is not supported by ICU. See LookupSpecialPropertyValueName. +@@ -1953,6 +2022,30 @@ bool IsSupportedBinaryProperty(UProperty property) { + case UCHAR_XID_CONTINUE: + case UCHAR_XID_START: + return true; ++ case UCHAR_BASIC_EMOJI: ++ case UCHAR_EMOJI_KEYCAP_SEQUENCE: ++ case UCHAR_RGI_EMOJI_MODIFIER_SEQUENCE: ++ case UCHAR_RGI_EMOJI_FLAG_SEQUENCE: ++ case UCHAR_RGI_EMOJI_TAG_SEQUENCE: ++ case UCHAR_RGI_EMOJI_ZWJ_SEQUENCE: ++ case UCHAR_RGI_EMOJI: ++ return unicode_sets; ++ default: ++ break; ++ } ++ return false; ++} ++ ++bool IsBinaryPropertyOfStrings(UProperty property) { ++ switch (property) { ++ case UCHAR_BASIC_EMOJI: ++ case UCHAR_EMOJI_KEYCAP_SEQUENCE: ++ case UCHAR_RGI_EMOJI_MODIFIER_SEQUENCE: ++ case UCHAR_RGI_EMOJI_FLAG_SEQUENCE: ++ case UCHAR_RGI_EMOJI_TAG_SEQUENCE: ++ case UCHAR_RGI_EMOJI_ZWJ_SEQUENCE: ++ case UCHAR_RGI_EMOJI: ++ return true; + default: + break; + } +@@ -2015,31 +2108,34 @@ bool RegExpParserImpl::ParsePropertyClassName(ZoneVector* name_1, + + template + bool RegExpParserImpl::AddPropertyClassRange( +- ZoneList* add_to, bool negate, ++ ZoneList* add_to_ranges, ++ CharacterClassStrings* add_to_strings, bool negate, + const ZoneVector& name_1, const ZoneVector& name_2) { +- // With /vi, we need to apply case folding to property values. +- // TODO(v8:11935): Change permalink once proposal is in stage 4. +- // See +- // https://arai-a.github.io/ecma262-compare/snapshot.html?pr=2418#prod-maybesimplecasefolding +- const bool needs_case_folding = unicode_sets() && ignore_case(); + if (name_2.empty()) { + // First attempt to interpret as general category property value name. + const char* name = name_1.data(); + if (LookupPropertyValueName(UCHAR_GENERAL_CATEGORY_MASK, name, negate, +- needs_case_folding, add_to, zone())) { ++ add_to_ranges, add_to_strings, flags(), ++ zone())) { + return true; + } + // Interpret "Any", "ASCII", and "Assigned". +- if (LookupSpecialPropertyValueName(name, add_to, negate, needs_case_folding, ++ if (LookupSpecialPropertyValueName(name, add_to_ranges, negate, flags(), + zone())) { + return true; + } + // Then attempt to interpret as binary property name with value name 'Y'. + UProperty property = u_getPropertyEnum(name); +- if (!IsSupportedBinaryProperty(property)) return false; ++ if (!IsSupportedBinaryProperty(property, unicode_sets())) return false; + if (!IsExactPropertyAlias(name, property)) return false; ++ // Negation of properties with strings is not allowed. ++ // TODO(v8:11935): Change permalink once proposal is in stage 4. ++ // See ++ // https://arai-a.github.io/ecma262-compare/snapshot.html?pr=2418#sec-static-semantics-maycontainstrings ++ if (negate && IsBinaryPropertyOfStrings(property)) return false; + return LookupPropertyValueName(property, negate ? "N" : "Y", false, +- needs_case_folding, add_to, zone()); ++ add_to_ranges, add_to_strings, flags(), ++ zone()); + } else { + // Both property name and value name are specified. Attempt to interpret + // the property name as enumerated property. +@@ -2054,8 +2150,8 @@ bool RegExpParserImpl::AddPropertyClassRange( + property != UCHAR_SCRIPT_EXTENSIONS) { + return false; + } +- return LookupPropertyValueName(property, value_name, negate, +- needs_case_folding, add_to, zone()); ++ return LookupPropertyValueName(property, value_name, negate, add_to_ranges, ++ add_to_strings, flags(), zone()); + } + } + +@@ -2069,7 +2165,8 @@ bool RegExpParserImpl::ParsePropertyClassName(ZoneVector* name_1, + + template + bool RegExpParserImpl::AddPropertyClassRange( +- ZoneList* add_to, bool negate, ++ ZoneList* add_to_ranges, ++ CharacterClassStrings* add_to_strings, bool negate, + const ZoneVector& name_1, const ZoneVector& name_2) { + return false; + } +@@ -2345,8 +2442,9 @@ void RegExpParserImpl::ParseClassEscape( + + static constexpr InClassEscapeState kInClassEscape = + InClassEscapeState::kInClass; +- *is_class_escape = TryParseCharacterClassEscape( +- next, kInClassEscape, ranges, zone, add_unicode_case_equivalents); ++ *is_class_escape = ++ TryParseCharacterClassEscape(next, kInClassEscape, ranges, nullptr, zone, ++ add_unicode_case_equivalents); + if (*is_class_escape) return; + + bool dummy = false; // Unused. +@@ -2357,8 +2455,8 @@ void RegExpParserImpl::ParseClassEscape( + template + bool RegExpParserImpl::TryParseCharacterClassEscape( + base::uc32 next, InClassEscapeState in_class_escape_state, +- ZoneList* ranges, Zone* zone, +- bool add_unicode_case_equivalents) { ++ ZoneList* ranges, CharacterClassStrings* strings, ++ Zone* zone, bool add_unicode_case_equivalents) { + DCHECK_EQ(current(), '\\'); + DCHECK_EQ(Next(), next); + +@@ -2382,7 +2480,7 @@ bool RegExpParserImpl::TryParseCharacterClassEscape( + ZoneVector name_1(zone); + ZoneVector name_2(zone); + if (!ParsePropertyClassName(&name_1, &name_2) || +- !AddPropertyClassRange(ranges, negate, name_1, name_2)) { ++ !AddPropertyClassRange(ranges, strings, negate, name_1, name_2)) { + ReportError(in_class_escape_state == InClassEscapeState::kInClass + ? RegExpError::kInvalidClassPropertyName + : RegExpError::kInvalidPropertyName); +@@ -2521,8 +2619,8 @@ RegExpTree* RegExpParserImpl::ParseClassSetOperand( + static constexpr InClassEscapeState kInClassEscape = + InClassEscapeState::kInClass; + const bool add_unicode_case_equivalents = ignore_case(); +- if (TryParseCharacterClassEscape(next, kInClassEscape, ranges, zone(), +- add_unicode_case_equivalents)) { ++ if (TryParseCharacterClassEscape(next, kInClassEscape, ranges, strings, ++ zone(), add_unicode_case_equivalents)) { + *type_out = ClassSetOperandType::kCharacterClassEscape; + return nullptr; + } +diff --git a/test/test262/test262.status b/test/test262/test262.status +index be60b2f8e46..48d24548df4 100644 +--- a/v8/test/test262/test262.status ++++ b/v8/test/test262/test262.status +@@ -294,70 +294,6 @@ + # See also https://github.com/tc39/test262/issues/3380 + 'built-ins/TypedArray/prototype/map/callbackfn-resize': [FAIL], + +- # https://bugs.chromium.org/p/v8/issues/detail?id=11935 +- # regexp-v-flag not yet fully implemented. +- 'built-ins/RegExp/property-escapes/generated/strings/Basic_Emoji': [SKIP], +- 'built-ins/RegExp/property-escapes/generated/strings/Basic_Emoji-negative-CharacterClass': [SKIP], +- 'built-ins/RegExp/property-escapes/generated/strings/Basic_Emoji-negative-P': [SKIP], +- 'built-ins/RegExp/property-escapes/generated/strings/Basic_Emoji-negative-u': [SKIP], +- 'built-ins/RegExp/property-escapes/generated/strings/Emoji_Keycap_Sequence': [SKIP], +- 'built-ins/RegExp/property-escapes/generated/strings/Emoji_Keycap_Sequence-negative-CharacterClass': [SKIP], +- 'built-ins/RegExp/property-escapes/generated/strings/Emoji_Keycap_Sequence-negative-P': [SKIP], +- 'built-ins/RegExp/property-escapes/generated/strings/Emoji_Keycap_Sequence-negative-u': [SKIP], +- 'built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji': [SKIP], +- 'built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji-negative-CharacterClass': [SKIP], +- 'built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji-negative-P': [SKIP], +- 'built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji-negative-u': [SKIP], +- 'built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Flag_Sequence': [SKIP], +- 'built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Flag_Sequence-negative-CharacterClass': [SKIP], +- 'built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Flag_Sequence-negative-P': [SKIP], +- 'built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Flag_Sequence-negative-u': [SKIP], +- 'built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Modifier_Sequence': [SKIP], +- 'built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Modifier_Sequence-negative-CharacterClass': [SKIP], +- 'built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Modifier_Sequence-negative-P': [SKIP], +- 'built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Modifier_Sequence-negative-u': [SKIP], +- 'built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Tag_Sequence': [SKIP], +- 'built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Tag_Sequence-negative-CharacterClass': [SKIP], +- 'built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Tag_Sequence-negative-P': [SKIP], +- 'built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Tag_Sequence-negative-u': [SKIP], +- 'built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_ZWJ_Sequence': [SKIP], +- 'built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_ZWJ_Sequence-negative-CharacterClass': [SKIP], +- 'built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_ZWJ_Sequence-negative-P': [SKIP], +- 'built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_ZWJ_Sequence-negative-u': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/character-class-difference-property-of-strings-escape': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/character-class-escape-difference-property-of-strings-escape': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/character-class-escape-intersection-property-of-strings-escape': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/character-class-escape-union-property-of-strings-escape': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/character-class-intersection-property-of-strings-escape': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/character-class-union-property-of-strings-escape': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/character-difference-property-of-strings-escape': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/character-intersection-property-of-strings-escape': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-property-of-strings-escape': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-property-of-strings-escape': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/character-property-escape-union-property-of-strings-escape': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/character-union-property-of-strings-escape': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-character-class-escape': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-character-class': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-character': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-character-property-escape': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-property-of-strings-escape': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-string-literal': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-character-class-escape': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-character-class': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-character': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-character-property-escape': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-property-of-strings-escape': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-string-literal': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-character-class-escape': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-character-class': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-character': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-character-property-escape': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-property-of-strings-escape': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-string-literal': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/string-literal-difference-property-of-strings-escape': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/string-literal-intersection-property-of-strings-escape': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/string-literal-union-property-of-strings-escape': [SKIP], +- + # https://bugs.chromium.org/p/v8/issues/detail?id=13173 + 'built-ins/RegExp/duplicate-named-capturing-groups-syntax': [FAIL], + 'built-ins/RegExp/named-groups/duplicate-names-group-property-enumeration-order': [FAIL], +@@ -1011,35 +947,68 @@ + 'built-ins/RegExp/property-escapes/*': [SKIP], + 'built-ins/RegExp/named-groups/unicode-property-names': [SKIP], + 'built-ins/RegExp/named-groups/unicode-property-names-valid': [SKIP], +- 'built-ins/RegExp/named-groups/non-unicode-property-names-valid': [FAIL], ++ 'built-ins/RegExp/named-groups/non-unicode-property-names-valid': [SKIP], + 'built-ins/RegExp/match-indices/indices-array-unicode-property-names': [SKIP], +- 'built-ins/RegExp/unicodeSets/generated/character-class-difference-character-property-escape': [PASS,FAIL], +- 'built-ins/RegExp/unicodeSets/generated/character-class-escape-difference-character-property-escape': [PASS,FAIL], +- 'built-ins/RegExp/unicodeSets/generated/character-class-escape-union-character-property-escape': [PASS,FAIL], +- 'built-ins/RegExp/unicodeSets/generated/character-class-escape-intersection-character-property-escape': [PASS,FAIL], +- 'built-ins/RegExp/unicodeSets/generated/character-class-intersection-character-property-escape': [PASS,FAIL], +- 'built-ins/RegExp/unicodeSets/generated/character-class-union-character-property-escape': [PASS,FAIL], +- 'built-ins/RegExp/unicodeSets/generated/character-difference-character-property-escape': [PASS,FAIL], +- 'built-ins/RegExp/unicodeSets/generated/character-intersection-character-property-escape': [PASS,FAIL], +- 'built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-character-class-escape': [PASS,FAIL], +- 'built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-character-class': [PASS,FAIL], +- 'built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-character-property-escape': [PASS,FAIL], +- 'built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-character': [PASS,FAIL], +- 'built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-string-literal': [PASS,FAIL], +- 'built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-character-class-escape': [PASS,FAIL], +- 'built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-character-class': [PASS,FAIL], +- 'built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-character-property-escape': [PASS,FAIL], +- 'built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-character': [PASS,FAIL], +- 'built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-string-literal': [PASS,FAIL], +- 'built-ins/RegExp/unicodeSets/generated/character-property-escape-union-character-class-escape': [PASS,FAIL], +- 'built-ins/RegExp/unicodeSets/generated/character-property-escape-union-character-class': [PASS,FAIL], +- 'built-ins/RegExp/unicodeSets/generated/character-property-escape-union-character-property-escape': [PASS,FAIL], +- 'built-ins/RegExp/unicodeSets/generated/character-property-escape-union-character': [PASS,FAIL], +- 'built-ins/RegExp/unicodeSets/generated/character-property-escape-union-string-literal': [PASS,FAIL], +- 'built-ins/RegExp/unicodeSets/generated/character-union-character-property-escape': [PASS,FAIL], +- 'built-ins/RegExp/unicodeSets/generated/string-literal-difference-character-property-escape': [PASS,FAIL], +- 'built-ins/RegExp/unicodeSets/generated/string-literal-intersection-character-property-escape': [PASS,FAIL], +- 'built-ins/RegExp/unicodeSets/generated/string-literal-union-character-property-escape': [PASS,FAIL], ++ 'built-ins/RegExp/unicodeSets/generated/character-class-difference-character-property-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-class-difference-property-of-strings-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-class-escape-difference-character-property-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-class-escape-difference-property-of-strings-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-class-escape-intersection-character-property-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-class-escape-intersection-property-of-strings-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-class-escape-union-character-property-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-class-escape-union-property-of-strings-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-class-intersection-character-property-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-class-intersection-property-of-strings-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-class-union-character-property-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-class-union-property-of-strings-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-difference-character-property-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-difference-property-of-strings-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-intersection-character-property-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-intersection-property-of-strings-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-character-class-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-character-class': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-character-property-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-character': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-property-of-strings-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-string-literal': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-character-class-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-character-class': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-character-property-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-character': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-property-of-strings-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-string-literal': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-property-escape-union-character-class-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-property-escape-union-character-class': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-property-escape-union-character-property-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-property-escape-union-character': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-property-escape-union-property-of-strings-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-property-escape-union-string-literal': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-union-character-property-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/character-union-property-of-strings-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-character-class-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-character-class': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-character': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-character-property-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-property-of-strings-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-string-literal': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-character-class-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-character-class': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-character': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-character-property-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-property-of-strings-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-string-literal': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-character-class-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-character-class': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-character': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-character-property-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-property-of-strings-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-string-literal': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/string-literal-difference-character-property-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/string-literal-difference-property-of-strings-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/string-literal-intersection-character-property-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/string-literal-intersection-property-of-strings-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/string-literal-union-character-property-escape': [SKIP], ++ 'built-ins/RegExp/unicodeSets/generated/string-literal-union-property-of-strings-escape': [SKIP], + + # Unicode in identifiers. + 'language/identifiers/part-unicode-*': [FAIL], diff --git a/v8_initializer-PageAllocator-fpermissive.patch b/v8_initializer-PageAllocator-fpermissive.patch deleted file mode 100644 index 66b6d84..0000000 --- a/v8_initializer-PageAllocator-fpermissive.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/gin/public/v8_platform.h -+++ b/gin/public/v8_platform.h -@@ -29,8 +29,8 @@ - // so we can be sure that the allocator used employs security features such as - // enabling Arm's Branch Target Instructions for executable pages. This is - // verified in the tests for gin::PageAllocator. -- PageAllocator* GetPageAllocator() override; -- static PageAllocator* PageAllocator(); -+ gin::PageAllocator* GetPageAllocator() override; -+ static gin::PageAllocator* PageAllocator(); - void OnCriticalMemoryPressure() override; - v8::ZoneBackingAllocator* GetZoneBackingAllocator() override; - #endif diff --git a/vector_math_impl-Wstrict-aliasing.patch b/vector_math_impl-Wstrict-aliasing.patch deleted file mode 100644 index 0b3931d..0000000 --- a/vector_math_impl-Wstrict-aliasing.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- src/third_party/blink/renderer/platform/audio/cpu/x86/vector_math_impl.h.old 2022-10-20 19:00:30.057387900 +0200 -+++ src/third_party/blink/renderer/platform/audio/cpu/x86/vector_math_impl.h 2022-10-29 23:03:21.785150600 +0200 -@@ -13,6 +13,7 @@ - - #include - #include -+#include - - #include "base/check_op.h" - #include "third_party/blink/renderer/platform/audio/audio_array.h" -@@ -208,13 +209,14 @@ - // source_max = max(abs(source[k])) for all k - void Vmaxmgv(const float* source_p, float* max_p, uint32_t frames_to_process) { - constexpr uint32_t kMask = 0x7FFFFFFFu; -- -+ float kMask_float; -+ std::memcpy(&kMask_float, &kMask, 4); - const float* const source_end_p = source_p + frames_to_process; - - DCHECK(IsAligned(source_p)); - DCHECK_EQ(0u, frames_to_process % kPackedFloatsPerRegister); - -- MType m_mask = MM_PS(set1)(*reinterpret_cast(&kMask)); -+ MType m_mask = MM_PS(set1)(kMask_float); - MType m_max = MM_PS(setzero)(); - - while (source_p < source_end_p) { diff --git a/wayland-WL-SINCE-VERSION.patch b/wayland-WL-SINCE-VERSION.patch new file mode 100644 index 0000000..98f1c9e --- /dev/null +++ b/wayland-WL-SINCE-VERSION.patch @@ -0,0 +1,292 @@ +From ce85cd0009fc01aa463db9919c66c5c91eb648ac Mon Sep 17 00:00:00 2001 +From: Max Ihlenfeldt +Date: Mon, 21 Nov 2022 19:24:45 +0000 +Subject: [PATCH] ozone/wayland: remove obsolete `#ifdef ..._SINCE_VERSION` + guards + +Since dropping support for building with `use_system_libwayland=true`, +we always build with the Wayland headers from //third_party. This means +we can remove the #ifdef guards that ensured support for building with +older Wayland header versions (and running these builds without +crashing). + +Fixed: 1385736 +Change-Id: I8083f5e849a6b52233e907e865d3d1766e903c3a +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4043143 +Reviewed-by: Alexander Dunaev +Commit-Queue: Max Ihlenfeldt +Cr-Commit-Position: refs/heads/main@{#1074142} +--- + .../platform/wayland/host/wayland_output.cc | 14 ++----------- + .../platform/wayland/host/wayland_output.h | 4 ---- + .../platform/wayland/host/wayland_pointer.cc | 9 ++------- + .../platform/wayland/host/wayland_pointer.h | 2 -- + .../platform/wayland/host/wayland_touch.cc | 12 +---------- + .../platform/wayland/host/wayland_touch.h | 4 ---- + .../wayland/host/xdg_toplevel_wrapper_impl.cc | 20 ++++++------------- + .../wayland/host/xdg_toplevel_wrapper_impl.h | 6 ------ + 8 files changed, 11 insertions(+), 60 deletions(-) + +diff --git a/ui/ozone/platform/wayland/host/wayland_output.cc b/ui/ozone/platform/wayland/host/wayland_output.cc +index 715a1da7d962b..6f87fde5fddb1 100644 +--- a/ui/ozone/platform/wayland/host/wayland_output.cc ++++ b/ui/ozone/platform/wayland/host/wayland_output.cc +@@ -118,14 +118,8 @@ void WaylandOutput::Initialize(Delegate* delegate) { + DCHECK(!delegate_); + delegate_ = delegate; + static constexpr wl_output_listener output_listener = { +- &OutputHandleGeometry, &OutputHandleMode, +- &OutputHandleDone, &OutputHandleScale, +-#ifdef WL_OUTPUT_NAME_SINCE_VERSION +- &OutputHandleName, +-#endif +-#ifdef WL_OUTPUT_DESCRIPTION_SINCE_VERSION +- &OutputHandleDescription, +-#endif ++ &OutputHandleGeometry, &OutputHandleMode, &OutputHandleDone, ++ &OutputHandleScale, &OutputHandleName, &OutputHandleDescription, + + }; + wl_output_add_listener(output_.get(), &output_listener, this); +@@ -266,7 +260,6 @@ void WaylandOutput::OutputHandleScale(void* data, + wayland_output->scale_factor_ = factor; + } + +-#ifdef WL_OUTPUT_NAME_SINCE_VERSION + // static + void WaylandOutput::OutputHandleName(void* data, + struct wl_output* wl_output, +@@ -274,9 +267,7 @@ void WaylandOutput::OutputHandleName(void* data, + if (WaylandOutput* wayland_output = static_cast(data)) + wayland_output->name_ = name ? std::string(name) : std::string{}; + } +-#endif + +-#ifdef WL_OUTPUT_DESCRIPTION_SINCE_VERSION + // static + void WaylandOutput::OutputHandleDescription(void* data, + struct wl_output* wl_output, +@@ -286,6 +277,5 @@ void WaylandOutput::OutputHandleDescription(void* data, + description ? std::string(description) : std::string{}; + } + } +-#endif + + } // namespace ui +diff --git a/ui/ozone/platform/wayland/host/wayland_output.h b/ui/ozone/platform/wayland/host/wayland_output.h +index 8f052fa0e5859..e1b1beec9ddf9 100644 +--- a/ui/ozone/platform/wayland/host/wayland_output.h ++++ b/ui/ozone/platform/wayland/host/wayland_output.h +@@ -154,16 +154,12 @@ class WaylandOutput : public wl::GlobalObjectRegistrar { + static void OutputHandleScale(void* data, + struct wl_output* wl_output, + int32_t factor); +-#ifdef WL_OUTPUT_NAME_SINCE_VERSION + static void OutputHandleName(void* data, + struct wl_output* wl_output, + const char* name); +-#endif +-#ifdef WL_OUTPUT_DESCRIPTION_SINCE_VERSION + static void OutputHandleDescription(void* data, + struct wl_output* wl_output, + const char* description); +-#endif + + const Id output_id_ = 0; + wl::Object output_; +diff --git a/ui/ozone/platform/wayland/host/wayland_pointer.cc b/ui/ozone/platform/wayland/host/wayland_pointer.cc +index c8271487beea3..ba9832cd52324 100644 +--- a/ui/ozone/platform/wayland/host/wayland_pointer.cc ++++ b/ui/ozone/platform/wayland/host/wayland_pointer.cc +@@ -37,11 +37,8 @@ WaylandPointer::WaylandPointer(wl_pointer* pointer, + Delegate* delegate) + : obj_(pointer), connection_(connection), delegate_(delegate) { + static constexpr wl_pointer_listener listener = { +- &Enter, &Leave, &Motion, &Button, &Axis, +- &Frame, &AxisSource, &AxisStop, &AxisDiscrete, +-#ifdef WL_POINTER_AXIS_VALUE120_SINCE_VERSION +- &AxisValue120, +-#endif ++ &Enter, &Leave, &Motion, &Button, &Axis, ++ &Frame, &AxisSource, &AxisStop, &AxisDiscrete, &AxisValue120, + }; + + wl_pointer_add_listener(obj_.get(), &listener, this); +@@ -225,7 +222,6 @@ void WaylandPointer::AxisDiscrete(void* data, + NOTIMPLEMENTED_LOG_ONCE(); + } + +-#ifdef WL_POINTER_AXIS_VALUE120_SINCE_VERSION + // --- Version 8 --- + + // static +@@ -237,7 +233,6 @@ void WaylandPointer::AxisValue120(void* data, + // events. + NOTIMPLEMENTED_LOG_ONCE(); + } +-#endif + + void WaylandPointer::SetupStylus() { + auto* stylus_v2 = connection_->stylus_v2(); +diff --git a/ui/ozone/platform/wayland/host/wayland_pointer.h b/ui/ozone/platform/wayland/host/wayland_pointer.h +index ec80f29908724..9448d2159662c 100644 +--- a/ui/ozone/platform/wayland/host/wayland_pointer.h ++++ b/ui/ozone/platform/wayland/host/wayland_pointer.h +@@ -82,12 +82,10 @@ class WaylandPointer { + wl_pointer* obj, + uint32_t axis, + int32_t discrete); +-#ifdef WL_POINTER_AXIS_VALUE120_SINCE_VERSION + static void AxisValue120(void* data, + wl_pointer* obj, + uint32_t axis, + int32_t value120); +-#endif + + void SetupStylus(); + +diff --git a/ui/ozone/platform/wayland/host/wayland_touch.cc b/ui/ozone/platform/wayland/host/wayland_touch.cc +index b3b3664043925..503ef90695405 100644 +--- a/ui/ozone/platform/wayland/host/wayland_touch.cc ++++ b/ui/ozone/platform/wayland/host/wayland_touch.cc +@@ -42,13 +42,7 @@ WaylandTouch::WaylandTouch(wl_touch* touch, + Delegate* delegate) + : obj_(touch), connection_(connection), delegate_(delegate) { + static constexpr wl_touch_listener listener = { +- &Down, &Up, &Motion, &Frame, &Cancel, +-#ifdef WL_TOUCH_SHAPE_SINCE_VERSION +- &Shape, +-#endif +-#ifdef WL_TOUCH_ORIENTATION_SINCE_VERSION +- &Orientation, +-#endif ++ &Down, &Up, &Motion, &Frame, &Cancel, &Shape, &Orientation, + }; + + wl_touch_add_listener(obj_.get(), &listener, this); +@@ -122,7 +116,6 @@ void WaylandTouch::Motion(void* data, + EventDispatchPolicyForPlatform()); + } + +-#ifdef WL_TOUCH_SHAPE_SINCE_VERSION + // static + void WaylandTouch::Shape(void* data, + wl_touch* obj, +@@ -131,9 +124,7 @@ void WaylandTouch::Shape(void* data, + wl_fixed_t minor) { + NOTIMPLEMENTED_LOG_ONCE(); + } +-#endif + +-#ifdef WL_TOUCH_ORIENTATION_SINCE_VERSION + // static + void WaylandTouch::Orientation(void* data, + wl_touch* obj, +@@ -141,7 +132,6 @@ void WaylandTouch::Orientation(void* data, + wl_fixed_t orientation) { + NOTIMPLEMENTED_LOG_ONCE(); + } +-#endif + + // static + void WaylandTouch::Cancel(void* data, wl_touch* obj) { +diff --git a/ui/ozone/platform/wayland/host/wayland_touch.h b/ui/ozone/platform/wayland/host/wayland_touch.h +index fda7076a0610e..4b8c4b0a5ccba 100644 +--- a/ui/ozone/platform/wayland/host/wayland_touch.h ++++ b/ui/ozone/platform/wayland/host/wayland_touch.h +@@ -59,19 +59,15 @@ class WaylandTouch { + int32_t id, + wl_fixed_t x, + wl_fixed_t y); +-#ifdef WL_TOUCH_SHAPE_SINCE_VERSION + static void Shape(void* data, + wl_touch* obj, + int32_t id, + wl_fixed_t major, + wl_fixed_t minor); +-#endif +-#ifdef WL_TOUCH_ORIENTATION_SINCE_VERSION + static void Orientation(void* data, + wl_touch* obj, + int32_t id, + wl_fixed_t orientation); +-#endif + static void Cancel(void* data, wl_touch* obj); + static void Frame(void* data, wl_touch* obj); + +diff --git a/ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.cc b/ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.cc +index e604780b93f9c..9116980aa068a 100644 +--- a/ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.cc ++++ b/ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.cc +@@ -98,16 +98,12 @@ bool XDGToplevelWrapperImpl::Initialize() { + } + + static constexpr xdg_toplevel_listener xdg_toplevel_listener = { +- &ConfigureTopLevel, +- &CloseTopLevel, +-#if defined(XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION) +- // Since v4 +- &ConfigureBounds, +-#endif +-#if defined(XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION) +- // Since v5 +- &WmCapabilities, +-#endif ++ &ConfigureTopLevel, ++ &CloseTopLevel, ++ // Since v4 ++ &ConfigureBounds, ++ // Since v5 ++ &WmCapabilities, + }; + + if (!xdg_surface_wrapper_) +@@ -324,7 +320,6 @@ void XDGToplevelWrapperImpl::CloseTopLevel(void* data, + surface->wayland_window_->OnCloseRequest(); + } + +-#if defined(XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION) + // static + void XDGToplevelWrapperImpl::ConfigureBounds(void* data, + struct xdg_toplevel* xdg_toplevel, +@@ -332,16 +327,13 @@ void XDGToplevelWrapperImpl::ConfigureBounds(void* data, + int32_t height) { + NOTIMPLEMENTED_LOG_ONCE(); + } +-#endif + +-#if defined(XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION) + // static + void XDGToplevelWrapperImpl::WmCapabilities(void* data, + struct xdg_toplevel* xdg_toplevel, + struct wl_array* capabilities) { + NOTIMPLEMENTED_LOG_ONCE(); + } +-#endif + + void XDGToplevelWrapperImpl::SetTopLevelDecorationMode( + DecorationMode requested_mode) { +diff --git a/ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.h b/ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.h +index 03cbeba08a0f9..a9a0bc1cb6bf7 100644 +--- a/ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.h ++++ b/ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.h +@@ -69,19 +69,13 @@ class XDGToplevelWrapperImpl : public ShellToplevelWrapper { + int32_t height, + struct wl_array* states); + static void CloseTopLevel(void* data, struct xdg_toplevel* xdg_toplevel); +- +-#if defined(XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION) + static void ConfigureBounds(void* data, + struct xdg_toplevel* xdg_toplevel, + int32_t width, + int32_t height); +-#endif +- +-#if defined(XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION) + static void WmCapabilities(void* data, + struct xdg_toplevel* xdg_toplevel, + struct wl_array* capabilities); +-#endif + + // zxdg_decoration_listener + static void ConfigureDecoration( diff --git a/wayland_data_drag_controller-WL_SURFACE_OFFSET_SINCE_VERSION.patch b/wayland_data_drag_controller-WL_SURFACE_OFFSET_SINCE_VERSION.patch new file mode 100644 index 0000000..bbfbf5d --- /dev/null +++ b/wayland_data_drag_controller-WL_SURFACE_OFFSET_SINCE_VERSION.patch @@ -0,0 +1,71 @@ +From 758dd0a34bec51430123c25a52a2dc14183e5c6a Mon Sep 17 00:00:00 2001 +From: Alexander Dunaev +Date: Wed, 30 Nov 2022 09:26:03 +0000 +Subject: [PATCH] [linux/wayland] Adopted the new way of setting the buffer + offset. + +Since version 5, the Wayland compositor wants the client to use the +dedicated method to set the offset for the buffer when attaching it to +the surface. + +This patch fixes the logic in one place where Chromium uses non-zero +offset, and adds appropriate notes in other places where the offset is +currently zero. + +Bug: 1382126 +Change-Id: Ide0fa3c1cbc9326d6fb25cf177da65a590aafa1c +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4061548 +Commit-Queue: Alexander Dunaev +Reviewed-by: Maksim Sisov +Cr-Commit-Position: refs/heads/main@{#1077345} +--- + ui/ozone/platform/wayland/host/wayland_cursor.cc | 1 + + .../wayland/host/wayland_data_drag_controller.cc | 9 +++++++-- + ui/ozone/platform/wayland/host/wayland_surface.cc | 1 + + 3 files changed, 9 insertions(+), 2 deletions(-) + +diff --git a/ui/ozone/platform/wayland/host/wayland_cursor.cc b/ui/ozone/platform/wayland/host/wayland_cursor.cc +index 891ca2e5e1f3c..ae10e43d93bfa 100644 +--- a/ui/ozone/platform/wayland/host/wayland_cursor.cc ++++ b/ui/ozone/platform/wayland/host/wayland_cursor.cc +@@ -157,6 +157,7 @@ void WaylandCursor::AttachAndCommit(wl_buffer* buffer, + pointer_surface_.get(), hotspot_x_dip, hotspot_y_dip); + + wl_surface_damage(pointer_surface_.get(), 0, 0, buffer_width, buffer_height); ++ // Note: should the offset be non-zero, use wl_surface_offset() to set it. + wl_surface_attach(pointer_surface_.get(), buffer, 0, 0); + wl_surface_commit(pointer_surface_.get()); + +diff --git a/ui/ozone/platform/wayland/host/wayland_data_drag_controller.cc b/ui/ozone/platform/wayland/host/wayland_data_drag_controller.cc +index 9fe196023dc18..40b1acd4aab3e 100644 +--- a/ui/ozone/platform/wayland/host/wayland_data_drag_controller.cc ++++ b/ui/ozone/platform/wayland/host/wayland_data_drag_controller.cc +@@ -265,9 +265,16 @@ void WaylandDataDragController::DrawIconInternal() { + DVLOG(3) << "Drawing drag icon. size_px=" << size_px.ToString(); + wl::DrawBitmap(*icon_bitmap_, icon_buffer_.get()); + auto* const surface = icon_surface_->surface(); ++ if (wl::get_version_of_object(surface) < WL_SURFACE_OFFSET_SINCE_VERSION) { + wl_surface_attach(surface, icon_buffer_->get(), + pending_icon_offset_.x() - current_icon_offset_.x(), + pending_icon_offset_.y() - current_icon_offset_.y()); ++ } else { ++ wl_surface_attach(surface, icon_buffer_->get(), 0, 0); ++ wl_surface_offset(surface, ++ pending_icon_offset_.x() - current_icon_offset_.x(), ++ pending_icon_offset_.y() - current_icon_offset_.y()); ++ } + if (connection_->UseViewporterSurfaceScaling() && icon_surface_->viewport()) { + wp_viewport_set_destination(icon_surface_->viewport(), size_dip.width(), + size_dip.height()); +diff --git a/ui/ozone/platform/wayland/host/wayland_surface.cc b/ui/ozone/platform/wayland/host/wayland_surface.cc +index c94f30d2f57a0..b0b2701214da3 100644 +--- a/ui/ozone/platform/wayland/host/wayland_surface.cc ++++ b/ui/ozone/platform/wayland/host/wayland_surface.cc +@@ -387,6 +387,7 @@ void WaylandSurface::ApplyPendingState() { + // The logic in DamageBuffer currently relies on attachment coordinates of + // (0, 0). If this changes, then the calculation in DamageBuffer will also + // need to be updated. ++ // Note: should the offset be non-zero, use wl_surface_offset() to set it. + wl_surface_attach(surface_.get(), pending_state_.buffer, 0, 0); + + // Do not call GetOrCreateSurfaceSync() if the buffer management doesn't diff --git a/web_contents_impl-Wsubobject-linkage.patch b/web_contents_impl-Wsubobject-linkage.patch deleted file mode 100644 index e4753ca..0000000 --- a/web_contents_impl-Wsubobject-linkage.patch +++ /dev/null @@ -1,80 +0,0 @@ ---- src/content/browser/web_contents/web_contents_impl.h.orig 2022-10-12 18:11:24.194407371 +0200 -+++ src/content/browser/web_contents/web_contents_impl.h 2022-10-15 11:00:48.215200372 +0200 -@@ -103,9 +103,7 @@ - } // namespace service_manager - - namespace content { --namespace { - class JavaScriptDialogDismissNotifier; --} - enum class PictureInPictureResult; - class BeforeUnloadBlockingDelegate; // content_browser_test_utils_internal.h - class BrowserPluginEmbedder; ---- src/content/browser/web_contents/web_contents_impl.cc.orig 2022-10-12 18:11:52.102315425 +0200 -+++ src/content/browser/web_contents/web_contents_impl.cc 2022-10-15 14:52:19.403874437 +0200 -@@ -284,32 +284,6 @@ - CloseCallback callback_; - }; - --// This is a small helper class created while a JavaScript dialog is showing --// and destroyed when it's dismissed. Clients can register callbacks to receive --// a notification when the dialog is dismissed. --class JavaScriptDialogDismissNotifier { -- public: -- JavaScriptDialogDismissNotifier() = default; -- -- JavaScriptDialogDismissNotifier(const JavaScriptDialogDismissNotifier&) = -- delete; -- JavaScriptDialogDismissNotifier& operator=( -- const JavaScriptDialogDismissNotifier&) = delete; -- -- ~JavaScriptDialogDismissNotifier() { -- for (auto& callback : callbacks_) { -- std::move(callback).Run(); -- } -- } -- -- void NotifyOnDismiss(base::OnceClosure callback) { -- callbacks_.push_back(std::move(callback)); -- } -- -- private: -- std::vector callbacks_; --}; -- - bool FrameCompareDepth(RenderFrameHostImpl* a, RenderFrameHostImpl* b) { - return a->GetFrameDepth() < b->GetFrameDepth(); - } -@@ -551,6 +525,32 @@ - - } // namespace - -+// This is a small helper class created while a JavaScript dialog is showing -+// and destroyed when it's dismissed. Clients can register callbacks to receive -+// a notification when the dialog is dismissed. -+class JavaScriptDialogDismissNotifier { -+ public: -+ JavaScriptDialogDismissNotifier() = default; -+ -+ JavaScriptDialogDismissNotifier(const JavaScriptDialogDismissNotifier&) = -+ delete; -+ JavaScriptDialogDismissNotifier& operator=( -+ const JavaScriptDialogDismissNotifier&) = delete; -+ -+ ~JavaScriptDialogDismissNotifier() { -+ for (auto& callback : callbacks_) { -+ std::move(callback).Run(); -+ } -+ } -+ -+ void NotifyOnDismiss(base::OnceClosure callback) { -+ callbacks_.push_back(std::move(callback)); -+ } -+ -+ private: -+ std::vector callbacks_; -+}; -+ - CreatedWindow::CreatedWindow() = default; - CreatedWindow::CreatedWindow(std::unique_ptr contents, - GURL target_url) diff --git a/webgl_image_conversion-Wstrict-aliasing.patch b/webgl_image_conversion-Wstrict-aliasing.patch deleted file mode 100644 index 95a6246..0000000 --- a/webgl_image_conversion-Wstrict-aliasing.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- src/third_party/blink/renderer/platform/graphics/gpu/webgl_image_conversion.cc.old 2022-10-20 19:00:30.113415900 +0200 -+++ src/third_party/blink/renderer/platform/graphics/gpu/webgl_image_conversion.cc 2022-10-29 22:19:57.652611900 +0200 -@@ -4,6 +4,7 @@ - - #include "third_party/blink/renderer/platform/graphics/gpu/webgl_image_conversion.h" - -+#include - #include - #include - -@@ -416,7 +417,8 @@ - 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 13}; - - uint16_t ConvertFloatToHalfFloat(float f) { -- unsigned temp = *(reinterpret_cast(&f)); -+ unsigned temp; -+ std::memcpy(&temp, &f, 4); - uint16_t signexp = (temp >> 23) & 0x1ff; - return g_base_table[signexp] + - ((temp & 0x007fffff) >> g_shift_table[signexp]); -@@ -834,7 +836,9 @@ - uint32_t temp = - g_mantissa_table[g_offset_table[half >> 10] + (half & 0x3ff)] + - g_exponent_table[half >> 10]; -- return *(reinterpret_cast(&temp)); -+ float ret; -+ std::memcpy(&ret, &temp, 4); -+ return ret; - } - - /* BEGIN CODE SHARED WITH MOZILLA FIREFOX */ diff --git a/webrtc-base64-missing-uint8_t.patch b/webrtc-base64-missing-uint8_t.patch deleted file mode 100644 index 5041399..0000000 --- a/webrtc-base64-missing-uint8_t.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/third_party/webrtc/rtc_base/third_party/base64/base64.h.old 2023-03-07 10:52:34.754823900 +0000 -+++ src/third_party/webrtc/rtc_base/third_party/base64/base64.h 2023-03-08 06:56:05.662101900 +0000 -@@ -12,6 +12,8 @@ - #ifndef RTC_BASE_THIRD_PARTY_BASE64_BASE64_H_ - #define RTC_BASE_THIRD_PARTY_BASE64_BASE64_H_ - -+#include -+#include - #include - #include - diff --git a/xr_cube_map-Wstrict-aliasing.patch b/xr_cube_map-Wstrict-aliasing.patch deleted file mode 100644 index 08d5bc4..0000000 --- a/xr_cube_map-Wstrict-aliasing.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- src/third_party/blink/renderer/modules/xr/xr_cube_map.cc.old 2022-10-20 19:00:30.045381900 +0200 -+++ src/third_party/blink/renderer/modules/xr/xr_cube_map.cc 2022-10-29 22:07:43.236052800 +0200 -@@ -4,6 +4,8 @@ - - #include "third_party/blink/renderer/modules/xr/xr_cube_map.h" - -+#include -+ - #include "base/cxx17_backports.h" - #include "device/vr/public/mojom/vr_service.mojom-blink.h" - #include "third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h" -@@ -19,7 +21,8 @@ - // This is an inversion of FloatToHalfFloat in ui/gfx/half_float.cc - float HalfFloatToFloat(const uint16_t input) { - uint32_t tmp = (input & 0x7fff) << 13 | (input & 0x8000) << 16; -- float tmp2 = *reinterpret_cast(&tmp); -+ float tmp2; -+ std::memcpy(&tmp2, &tmp, 4); - return tmp2 / 1.9259299444e-34f; - } - From 46ead24b74511d6e4d68b9b9fe5e01d354e002b682f145d2fa9d73fe9a8db588 Mon Sep 17 00:00:00 2001 From: Bruno Pitrus Date: Wed, 13 Sep 2023 05:00:47 +0000 Subject: [PATCH 2/6] system libaom on fedora 38 OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=90 --- nodejs-electron.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nodejs-electron.spec b/nodejs-electron.spec index b5d9e72..ccd7edb 100644 --- a/nodejs-electron.spec +++ b/nodejs-electron.spec @@ -142,16 +142,16 @@ BuildArch: i686 %endif %if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150600 || 0%{?fedora} >= 38 +%bcond_without system_aom %bcond_without system_vpx %else +%bcond_with system_aom %bcond_with system_vpx %endif %if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150600 -%bcond_without system_aom %bcond_without system_yuv %else -%bcond_with system_aom %bcond_with system_yuv %endif From 4f8915679be2e4decc7f0d66d999a51dd1bd7f6fc9923221ed90ee652dc932b2 Mon Sep 17 00:00:00 2001 From: Bruno Pitrus Date: Wed, 13 Sep 2023 05:01:39 +0000 Subject: [PATCH 3/6] OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=91 --- nodejs-electron.changes | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nodejs-electron.changes b/nodejs-electron.changes index 066f931..f35ce27 100644 --- a/nodejs-electron.changes +++ b/nodejs-electron.changes @@ -10,8 +10,7 @@ Mon Sep 4 20:30:33 UTC 2023 - Bruno Pitrus * Removed webContents.{de,in}crementCapturerCount(stayHidden, stayAwake) (since Electron 23) * Removed JXL image format support (since Electron 23) * API Changed: nativeImage.createThumbnailFromPath(path, size) (since Electron 24) -- Use bundled vpx on Fedora ≤37 and Leap -- Use bundled aom on Fedora and Leap +- Use bundled aom and vpx on Fedora ≤37 and Leap - Drop support for Fedora 36 which is EOL - Drop upstreamed patches * CVE-2022-43548.patch From b3a99a75c74c63ff454a57834980e080a5b45866a9f2de14cdb5482e91183baa Mon Sep 17 00:00:00 2001 From: Bruno Pitrus Date: Wed, 13 Sep 2023 05:16:40 +0000 Subject: [PATCH 4/6] OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=92 --- nodejs-electron.changes | 1 + 1 file changed, 1 insertion(+) diff --git a/nodejs-electron.changes b/nodejs-electron.changes index f35ce27..73a0bf5 100644 --- a/nodejs-electron.changes +++ b/nodejs-electron.changes @@ -16,6 +16,7 @@ Mon Sep 4 20:30:33 UTC 2023 - Bruno Pitrus * CVE-2022-43548.patch * aggregatable_attribution_utils-do-not-assume-abseil-ABI.patch * angle-ShaderVars-missing-uint32_t.patch + * attribution_response_parsing-do-not-assume-abseil-ABI.patch * blink-gcc13-missing-headers.patch * bluetooth_uuid-missing-uint8_t.patch * broker_file_permission-missing-uint64_t.patch From afe34894545cfdcfc4e24a706bc7d9a812b2f3484468c9e843f5b5aa56c7d778 Mon Sep 17 00:00:00 2001 From: Bruno Pitrus Date: Thu, 14 Sep 2023 12:39:03 +0000 Subject: [PATCH 5/6] Accepting request 1111333 from home:dziobian:gulgul-ultron:19 - New upstream release 25.8.1 * Fixed an error where listening to certain chrome.tabs events would throw incorrectly. * Fixed problem with promise resolved to early when browser initiated in-page navigation. * Security fixes for Networks (CVE-2023-4763), V8 (CVE-2023-4762) and FedCM (CVE-2023-4761) OBS-URL: https://build.opensuse.org/request/show/1111333 OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=93 --- electron-25.8.0.tar.zst | 3 --- electron-25.8.1.tar.zst | 3 +++ nodejs-electron.changes | 8 ++++++++ nodejs-electron.spec | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) delete mode 100644 electron-25.8.0.tar.zst create mode 100644 electron-25.8.1.tar.zst diff --git a/electron-25.8.0.tar.zst b/electron-25.8.0.tar.zst deleted file mode 100644 index 30b9882..0000000 --- a/electron-25.8.0.tar.zst +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4716f841febdc38dbd5dff5d7bfa412c93d04aefb78e3eecd41e9dce9f037102 -size 528971074 diff --git a/electron-25.8.1.tar.zst b/electron-25.8.1.tar.zst new file mode 100644 index 0000000..fabe612 --- /dev/null +++ b/electron-25.8.1.tar.zst @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31a34ff82b061d05684ca62247c75950c7accaadc891f7339a57c2e690dd2fb1 +size 529571600 diff --git a/nodejs-electron.changes b/nodejs-electron.changes index 73a0bf5..c9d00e3 100644 --- a/nodejs-electron.changes +++ b/nodejs-electron.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Sep 13 20:17:56 UTC 2023 - Bruno Pitrus + +- New upstream release 25.8.1 + * Fixed an error where listening to certain chrome.tabs events would throw incorrectly. + * Fixed problem with promise resolved to early when browser initiated in-page navigation. + * Security fixes for Networks (CVE-2023-4763), V8 (CVE-2023-4762) and FedCM (CVE-2023-4761) + ------------------------------------------------------------------- Mon Sep 4 20:30:33 UTC 2023 - Bruno Pitrus diff --git a/nodejs-electron.spec b/nodejs-electron.spec index ccd7edb..6a5e615 100644 --- a/nodejs-electron.spec +++ b/nodejs-electron.spec @@ -204,7 +204,7 @@ BuildArch: i686 Name: nodejs-electron -Version: 25.8.0 +Version: 25.8.1 Release: 0 Summary: Build cross platform desktop apps with JavaScript, HTML, and CSS License: AFL-2.0 AND Apache-2.0 AND blessing AND BSD-2-Clause AND BSD-3-Clause AND BSD-Protection AND BSD-Source-Code AND bzip2-1.0.6 AND IJG AND ISC AND LGPL-2.0-or-later AND LGPL-2.1-or-later AND MIT AND MIT-CMU AND MIT-open-group AND (MPL-1.1 OR GPL-2.0-or-later OR LGPL-2.1-or-later) AND MPL-2.0 AND OpenSSL AND SGI-B-2.0 AND SUSE-Public-Domain AND X11 From 4553380709f8e4f643b5b4a260a032ca438beecadef02461ed3e3fe5915310b2 Mon Sep 17 00:00:00 2001 From: Bruno Pitrus Date: Thu, 21 Sep 2023 17:52:37 +0000 Subject: [PATCH 6/6] Accepting request 1112892 from home:dziobian:gulgul-ultron:19 - New upstream release 25.8.2 * Fixed an issue where chrome://gpu failed to load. * Fixed an issue where accelerators representing DOM keys were not correctly converted in webContents.sendInputEvent(). - Drop chrome-gpu-does-not-load.patch applied upstream OBS-URL: https://build.opensuse.org/request/show/1112892 OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=94 --- chrome-gpu-does-not-load.patch | 78 ---------------------------------- disable-catapult.patch | 2 +- electron-25.8.1.tar.zst | 3 -- electron-25.8.2.tar.zst | 3 ++ nodejs-electron.changes | 8 ++++ nodejs-electron.spec | 3 +- 6 files changed, 13 insertions(+), 84 deletions(-) delete mode 100644 chrome-gpu-does-not-load.patch delete mode 100644 electron-25.8.1.tar.zst create mode 100644 electron-25.8.2.tar.zst diff --git a/chrome-gpu-does-not-load.patch b/chrome-gpu-does-not-load.patch deleted file mode 100644 index 11014fe..0000000 --- a/chrome-gpu-does-not-load.patch +++ /dev/null @@ -1,78 +0,0 @@ -From ebf9784af691e23f176cfdfb15e9b059fea24e6b Mon Sep 17 00:00:00 2001 -From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> -Date: Mon, 21 Aug 2023 00:41:36 +0000 -Subject: [PATCH] fix: chrome://gpu failing to load - -Co-authored-by: Shelley Vohr ---- - electron_paks.gni | 2 ++ - spec/chromium-spec.ts | 26 ++++++++++++++++++++++++-- - 2 files changed, 26 insertions(+), 2 deletions(-) - -diff --git a/electron_paks.gni b/electron_paks.gni -index c3a257ab0f62f..bc6950bee792a 100644 ---- a/electron/electron_paks.gni -+++ b/electron/electron_paks.gni -@@ -61,6 +61,7 @@ template("electron_extra_paks") { - "$root_gen_dir/content/browser/webrtc/resources/webrtc_internals_resources.pak", - "$root_gen_dir/content/content_resources.pak", - "$root_gen_dir/content/dev_ui_content_resources.pak", -+ "$root_gen_dir/content/gpu_resources.pak", - "$root_gen_dir/mojo/public/js/mojo_bindings_resources.pak", - "$root_gen_dir/net/net_resources.pak", - "$root_gen_dir/third_party/blink/public/resources/blink_resources.pak", -@@ -74,6 +75,7 @@ template("electron_extra_paks") { - "//components/resources", - "//content:content_resources", - "//content:dev_ui_content_resources", -+ "//content/browser/resources/gpu:resources", - "//content/browser/resources/media:resources", - "//content/browser/webrtc/resources", - "//electron:resources", -diff --git a/spec/chromium-spec.ts b/spec/chromium-spec.ts -index 4a0c79bc31958..aa972cc6167f0 100644 ---- a/electron/spec/chromium-spec.ts -+++ b/electron/spec/chromium-spec.ts -@@ -2028,10 +2028,32 @@ describe('chromium features', () => { - }); - }); - -+ describe('chrome://accessibility', () => { -+ it('loads the page successfully', async () => { -+ const w = new BrowserWindow({ show: false }); -+ await w.loadURL('chrome://accessibility'); -+ const pageExists = await w.webContents.executeJavaScript( -+ "window.hasOwnProperty('chrome') && window.chrome.hasOwnProperty('send')" -+ ); -+ expect(pageExists).to.be.true(); -+ }); -+ }); -+ -+ describe('chrome://gpu', () => { -+ it('loads the page successfully', async () => { -+ const w = new BrowserWindow({ show: false }); -+ await w.loadURL('chrome://gpu'); -+ const pageExists = await w.webContents.executeJavaScript( -+ "window.hasOwnProperty('chrome') && window.chrome.hasOwnProperty('send')" -+ ); -+ expect(pageExists).to.be.true(); -+ }); -+ }); -+ - describe('chrome://media-internals', () => { - it('loads the page successfully', async () => { - const w = new BrowserWindow({ show: false }); -- w.loadURL('chrome://media-internals'); -+ await w.loadURL('chrome://media-internals'); - const pageExists = await w.webContents.executeJavaScript( - "window.hasOwnProperty('chrome') && window.chrome.hasOwnProperty('send')" - ); -@@ -2042,7 +2064,7 @@ describe('chromium features', () => { - describe('chrome://webrtc-internals', () => { - it('loads the page successfully', async () => { - const w = new BrowserWindow({ show: false }); -- w.loadURL('chrome://webrtc-internals'); -+ await w.loadURL('chrome://webrtc-internals'); - const pageExists = await w.webContents.executeJavaScript( - "window.hasOwnProperty('chrome') && window.chrome.hasOwnProperty('send')" - ); diff --git a/disable-catapult.patch b/disable-catapult.patch index 4a35a53..81f591f 100644 --- a/disable-catapult.patch +++ b/disable-catapult.patch @@ -335,8 +335,8 @@ author: Michael Gilbert "$root_gen_dir/content/content_resources.pak", "$root_gen_dir/content/dev_ui_content_resources.pak", @@ -73,7 +72,6 @@ - "//content:content_resources", "//content:dev_ui_content_resources", + "//content/browser/resources/gpu:resources", "//content/browser/resources/media:resources", - "//content/browser/tracing:resources", "//content/browser/webrtc/resources", diff --git a/electron-25.8.1.tar.zst b/electron-25.8.1.tar.zst deleted file mode 100644 index fabe612..0000000 --- a/electron-25.8.1.tar.zst +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:31a34ff82b061d05684ca62247c75950c7accaadc891f7339a57c2e690dd2fb1 -size 529571600 diff --git a/electron-25.8.2.tar.zst b/electron-25.8.2.tar.zst new file mode 100644 index 0000000..0ec191e --- /dev/null +++ b/electron-25.8.2.tar.zst @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f0308e588b858a4ee5c8231edace90d76a033468e9955feb402296972122cd1 +size 530609353 diff --git a/nodejs-electron.changes b/nodejs-electron.changes index c9d00e3..a06f581 100644 --- a/nodejs-electron.changes +++ b/nodejs-electron.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Sep 21 17:34:33 UTC 2023 - Bruno Pitrus + +- New upstream release 25.8.2 + * Fixed an issue where chrome://gpu failed to load. + * Fixed an issue where accelerators representing DOM keys were not correctly converted in webContents.sendInputEvent(). +- Drop chrome-gpu-does-not-load.patch applied upstream + ------------------------------------------------------------------- Wed Sep 13 20:17:56 UTC 2023 - Bruno Pitrus diff --git a/nodejs-electron.spec b/nodejs-electron.spec index 6a5e615..2e16ae7 100644 --- a/nodejs-electron.spec +++ b/nodejs-electron.spec @@ -204,7 +204,7 @@ BuildArch: i686 Name: nodejs-electron -Version: 25.8.1 +Version: 25.8.2 Release: 0 Summary: Build cross platform desktop apps with JavaScript, HTML, and CSS License: AFL-2.0 AND Apache-2.0 AND blessing AND BSD-2-Clause AND BSD-3-Clause AND BSD-Protection AND BSD-Source-Code AND bzip2-1.0.6 AND IJG AND ISC AND LGPL-2.0-or-later AND LGPL-2.1-or-later AND MIT AND MIT-CMU AND MIT-open-group AND (MPL-1.1 OR GPL-2.0-or-later OR LGPL-2.1-or-later) AND MPL-2.0 AND OpenSSL AND SGI-B-2.0 AND SUSE-Public-Domain AND X11 @@ -351,7 +351,6 @@ Patch3207: absl-uint128-do-not-assume-abi.patch Patch3208: mojo_ukm_recorder-missing-WrapUnique.patch Patch3209: electron_browser_context-missing-variant.patch Patch3210: electron_api_app-GetPathConstant-non-constexpr.patch -Patch3211: chrome-gpu-does-not-load.patch %if %{with clang} BuildRequires: clang