Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package nodejs-electron for openSUSE:Factory checked in at 2023-09-22 21:47:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nodejs-electron (Old) and /work/SRC/openSUSE:Factory/.nodejs-electron.new.1770 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nodejs-electron" Fri Sep 22 21:47:24 2023 rev:78 rq:1112893 version:25.8.2 Changes: -------- --- /work/SRC/openSUSE:Factory/nodejs-electron/nodejs-electron.changes 2023-09-01 14:20:07.134176588 +0200 +++ /work/SRC/openSUSE:Factory/.nodejs-electron.new.1770/nodejs-electron.changes 2023-09-22 21:49:01.224359125 +0200 @@ -1,0 +2,103 @@ +Thu Sep 21 17:34:33 UTC 2023 - Bruno Pitrus <brunopit...@hotmail.com> + +- 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 <brunopit...@hotmail.com> + +- 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 <brunopit...@hotmail.com> + +- 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 aom and vpx on Fedora â¤37 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 + * 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 + * 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 + +------------------------------------------------------------------- Old: ---- 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 chromium-108-abseil-shims.patch chromium-norar.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-13-fix-sql-virtualcursor-type.patch electron-22.3.23.tar.zst electron_serial_delegate-ambiguous-Observer.patch enable-jxl.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 system-jsoncpp.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 New: ---- abseil-remove-unused-targets.patch absl-uint128-do-not-assume-abi.patch avif_image_decoder-repetitionCount-clli.patch cpu-missing-uint8_t.patch electron-24-components-missing-headers.patch electron-25.8.2.tar.zst electron_api_app-GetPathConstant-non-constexpr.patch electron_browser_context-missing-variant.patch harfbuzz-replace-HbScopedPointer.patch highway.gn mojo_ukm_recorder-missing-WrapUnique.patch system-wayland.patch v8-regexp-parser-UCHAR_BASIC_EMOJI.patch wayland-WL-SINCE-VERSION.patch wayland_data_drag_controller-WL_SURFACE_OFFSET_SINCE_VERSION.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nodejs-electron.spec ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.056788675 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.060788820 +0200 @@ -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 @@ %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 @@ %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 -%else -%bcond_with system_crc32c -%bcond_with system_nvctrl -%endif - -%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150600 || 0%{?fedora_version} -%bcond_without link_vulkan +%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150600 || 0%{?fedora} >= 38 +%bcond_without system_aom +%bcond_without system_vpx %else -%bcond_with link_vulkan +%bcond_with system_aom +%bcond_with system_vpx %endif - - - - -%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150500 +%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150600 %bcond_without system_yuv %else %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 @@ Name: nodejs-electron -Version: 22.3.23 +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 @@ -231,6 +218,7 @@ # 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 @@ # â¦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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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,22 @@ 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 %if %{with clang} BuildRequires: clang @@ -437,7 +388,8 @@ 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 +430,13 @@ %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 +444,11 @@ %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 +499,7 @@ 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 +544,8 @@ 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 +567,8 @@ 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 +604,8 @@ 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 +680,6 @@ %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 +698,30 @@ %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 +872,7 @@ %ifarch %ix86 %arm %limit_build -m 1200 %else -%limit_build -m 2600 +%limit_build -m 3500 %endif @@ -929,6 +900,7 @@ freetype harfbuzz-ng icu + jsoncpp libdrm libevent libjpeg @@ -987,11 +959,6 @@ 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 +966,12 @@ 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 ) @@ -1124,6 +1097,7 @@ 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 +1108,7 @@ 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 @@ -1173,6 +1144,7 @@ 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 +1159,25 @@ 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 +1200,6 @@ 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 +1230,11 @@ 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" ++++++ 647d3d2.patch ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.116790853 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.120790999 +0200 @@ -25,9 +25,9 @@ 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()); } ++++++ RenderFrameHostImpl-use-after-free.patch ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.136791579 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.140791724 +0200 @@ -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 <cstdint> #include <memory> +#include <new> #include <tuple> @@ -20,6 +20,6 @@ + document_associated_data_->~DocumentAssociatedData(); + new(&document_associated_data_) absl::optional<DocumentAssociatedData>(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 ++++++ abseil-remove-unused-targets.patch ++++++ 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", ++++++ absl-uint128-do-not-assume-abi.patch ++++++ --- 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) ++++++ angle-system-xxhash.patch ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.176793031 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.176793031 +0200 @@ -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 <xxhash.h> namespace angle ++++++ avif_image_decoder-AVIF_PIXEL_FORMAT_COUNT.patch ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.196793758 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.196793758 +0200 @@ -60,12 +60,13 @@ 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_; ++++++ avif_image_decoder-repetitionCount-clli.patch ++++++ --- 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 <type_traits> +#define define_has_member(member_name) \ + template <typename T> \ + class has_member_##member_name \ + { \ + template <typename U> static std::true_type test(decltype(&U::member_name)); \ + template <typename U> static std::false_type test(...); \ + public: \ + static constexpr bool v = decltype(test<T>(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<avifDecoder>::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<avifImage>::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 ++++++ base-system-nspr.patch ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.220794629 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.220794629 +0200 @@ -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", ] ++++++ chromium-102-compiler.patch ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.236795209 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.236795209 +0200 @@ -58,12 +58,18 @@ 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 @@ - } - } - - # 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 @@ - 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 @@ - 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 @@ -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 @@ -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 ++++++ chromium-94.0.4606.71-InkDropHost-crash.patch ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.256795936 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.260796081 +0200 @@ -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_; ++++++ chromium-ffmpeg-first-dts.patch ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.272796516 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.276796662 +0200 @@ -114,7 +114,7 @@ + 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 ++++++ chromium-gcc11.patch ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.308797823 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.312797969 +0200 @@ -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 <limits> - #include "src/trace_processor/containers/string_pool.h" - --#include <limits> - - #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 @@ #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 <limits> - #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 @@ #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 <cstddef> - #include "components/bookmarks/browser/bookmark_expanded_state_tracker.h" - - #include <stdint.h> 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 ++++++ chromium-remove-bundled-roboto-font.patch ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.324798404 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.324798404 +0200 @@ -2,38 +2,36 @@ --- 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. */ --<if expr="not chromeos_ash and not is_android"> -@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 @@ - 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,7 +47,6 @@ - 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'); -} --</if> ++++++ chromium-system-libusb.patch ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.336798840 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.340798985 +0200 @@ -32,8 +32,8 @@ --- 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', ++++++ chromium-vaapi.patch ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.352799421 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.352799421 +0200 @@ -3,8 +3,8 @@ --- 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)) ++++++ common.gypi-remove-fno-omit-frame-pointer.patch ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.364799857 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.368800002 +0200 @@ -4,11 +4,14 @@ --- 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"', { ++++++ cpu-missing-uint8_t.patch ++++++ --- 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 <cstdint> #include <string> #include "base/base_export.h" ++++++ create_tarball.sh ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.396801018 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.400801163 +0200 @@ -117,11 +117,12 @@ --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 @@ 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 @@ 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 @@ 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 @@ 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 @@ #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 @@ 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. ++++++ disable-catapult.patch ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.412801599 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.416801745 +0200 @@ -4,24 +4,24 @@ --- 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 @@ ] } @@ -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 @@ "//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 @@ - }, # 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 @@ } @@ -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 @@ -335,8 +335,8 @@ "$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", ++++++ disable-webspeech.patch ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.432802325 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.432802325 +0200 @@ -38,15 +38,11 @@ "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 @@ "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 @@ #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 @@ --- 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,16 +254,39 @@ --- 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", + ] + } + ++++++ electron-16-third_party-symbolize-missing-include.patch ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.460803342 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.464803487 +0200 @@ -3,8 +3,8 @@ --- 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 <sys/types.h> // for ssize_t +#include <utility> + ++++++ electron-24-components-missing-headers.patch ++++++ --- 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 <memory> #include <set> #include <string> #include <utility> --- 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 <memory> #include <utility> #include <vector> ++++++ electron_api_app-GetPathConstant-non-constexpr.patch ++++++ [ 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<Key, GetKeyFromValue, KeyCompare, Container>::const_iterator base::internal::flat_tree<Key, GetKeyFromValue, KeyCompare, Container>::find(const Key&) const [with Key = base::BasicStringPiece<char>; GetKeyFromValue = base::internal::GetFirst; KeyCompare = std::less<void>; Container = std::array<std::pair<const base::BasicStringPiece<char>, int>, 18>; const_iterator = const std::pair<const base::BasicStringPiece<char>, 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<Key, GetKeyFromValue, KeyCompare, Container>::const_iterator base::internal::flat_tree<Key, GetKeyFromValue, KeyCompare, Container>::find(const Key&) const [with Key = base::BasicStringPiece<char>; GetKeyFromValue = base::internal::GetFirst; KeyCompare = std::less<void>; Container = std::array<std::pair<const base::BasicStringPiece<char>, int>, 18>; const_iterator = const std::pair<const base::BasicStringPiece<char>, int>*]' declared here [ 8128s] 984 | auto flat_tree<Key, GetKeyFromValue, KeyCompare, Container>::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<base::StringPiece, int>({ {"appData", DIR_APP_DATA}, ++++++ electron_browser_context-missing-variant.patch ++++++ --- 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 <map> #include <memory> #include <string> +#include <variant> #include <vector> #include "base/memory/weak_ptr.h" ++++++ gcc-enable-lto.patch ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.548806536 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.552806682 +0200 @@ -12,7 +12,7 @@ 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,7 +38,5 @@ + 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) { ++++++ harfbuzz-replace-HbScopedPointer.patch ++++++ >From 5fcaeafcab5460ea65e4a7bdee6589002adf74d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20R=C3=B6ttsches?= <dr...@chromium.org> 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 <moon...@google.com> Commit-Queue: Dominik Röttsches <dr...@chromium.org> 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 <unicode/uchar.h> #include <unicode/uscript.h> #include <algorithm> +#include <hb-cplusplus.hh> #include <memory> #include <utility> @@ -190,32 +191,6 @@ struct ReshapeQueueItem { : action_(action), start_index_(start), num_characters_(num) {} }; -template <typename T> -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<ShapeResult> HarfBuzzShaper::Shape(const Font* font, scoped_refptr<ShapeResult> result = ShapeResult::Create(font, start, length, direction); - HarfBuzzScopedPtr<hb_buffer_t> buffer(hb_buffer_create(), hb_buffer_destroy); - RangeData range_data = CreateRangeData(font, direction, buffer.Get()); + hb::unique_ptr<hb_buffer_t> 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<ShapeResult> HarfBuzzShaper::Shape( scoped_refptr<ShapeResult> result = ShapeResult::Create(font, start, length, direction); - HarfBuzzScopedPtr<hb_buffer_t> buffer(hb_buffer_create(), hb_buffer_destroy); - RangeData range_data = CreateRangeData(font, direction, buffer.Get()); + hb::unique_ptr<hb_buffer_t> 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<ShapeResult> HarfBuzzShaper::Shape( scoped_refptr<ShapeResult> result = ShapeResult::Create(font, start, length, direction); - HarfBuzzScopedPtr<hb_buffer_t> buffer(hb_buffer_create(), hb_buffer_destroy); - RangeData range_data = CreateRangeData(font, direction, buffer.Get()); + hb::unique_ptr<hb_buffer_t> buffer(hb_buffer_create()); + RangeData range_data = CreateRangeData(font, direction, buffer.get()); range_data.start = start; range_data.end = end; ++++++ harfbuzz-replace-chromium-scoped-type.patch ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.572807408 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.572807408 +0200 @@ -257,9 +257,9 @@ // 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 @@ 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 @@ namespace blink { + HbFontCacheEntry::HbFontCacheEntry(hb_font_t* font) +- : hb_font_(HbScoped<hb_font_t>(font)), ++ : hb_font_(hb::unique_ptr<hb_font_t>(font)), + hb_font_data_(std::make_unique<HarfBuzzFontData>()) {} + + 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 <hb.h> ++#include <hb-cplusplus.hh> + + #include <memory> + +@@ -39,7 +39,7 @@ class HbFontCacheEntry : public RefCount + private: + explicit HbFontCacheEntry(hb_font_t* font); + +- HbScoped<hb_font_t> hb_font_; ++ hb::unique_ptr<hb_font_t> hb_font_; + std::unique_ptr<HarfBuzzFontData> 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 @@ "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 @@ - 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 ++++++ highway.gn ++++++ import("//build/config/linux/pkg_config.gni") pkg_config("libhwy_external_config") { packages = [ "libhwy" ] } source_set("libhwy") { public_configs = [ ":libhwy_external_config" ] } ++++++ intl-objects-icu71-UNUM_APPROXIMATELY_SIGN_FIELD.patch ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.600808424 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.604808569 +0200 @@ -28,18 +28,6 @@ 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<String> Intl::NumberFieldToType(Isolate* isolate, ++++++ mojo_ukm_recorder-missing-WrapUnique.patch ++++++ --- 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 { ++++++ node-upgrade-llhttp-to-8.patch ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.644810021 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.648810167 +0200 @@ -27,7 +27,7 @@ --- 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<Value>& args) { - }; + } const llhttp_settings_t Parser::settings = { - Proxy<Call, &Parser::on_message_begin>::Raw, ++++++ partition_alloc-no-lto.patch ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.660810603 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.664810748 +0200 @@ -2,51 +2,58 @@ --- 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" ] } } ++++++ re2-11-StringPiece.patch ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.676811184 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.680811328 +0200 @@ -38,8 +38,8 @@ 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 @@ --- 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> FormDataParser::CreateFromContentTypeHeader( - FormDataParser::FormDataParser() {} + FormDataParser::FormDataParser() = default; FormDataParserUrlEncoded::FormDataParserUrlEncoded() - : source_(nullptr), @@ -86,8 +86,8 @@ 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 @@ 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 @@ - 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 @@ - 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 @@ - 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 @@ } - 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 @@ } - 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 <jun...@chromium.org> Date: Tue, 23 May 2023 18:42:42 +0000 @@ -292,17 +292,17 @@ 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 <jun...@chromium.org> Date: Fri, 19 May 2023 19:13:27 +0000 ++++++ replace_gn_files-system-libs.patch ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.692811764 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.696811909 +0200 @@ -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', ++++++ seccomp_bpf-no-lto.patch ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.708812345 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.708812345 +0200 @@ -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,6 +43,6 @@ ":sandbox_services", + ":seccomp_bpf_asm", "//base", - "//base/third_party/dynamic_annotations", "//build:chromeos_buildflags", + "//sandbox:sandbox_buildflags", ++++++ skia-system-vulkan-headers.patch ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.724812926 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.724812926 +0200 @@ -3,7 +3,7 @@ --- 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" ++++++ system-libdrm.patch ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.748813798 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.752813942 +0200 @@ -19,8 +19,8 @@ --- 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 <xf86drmMode.h> + #include "base/memory/raw_ref.h" #include "base/memory/weak_ptr.h" -#include "third_party/libdrm/src/include/drm/drm_fourcc.h" +#include <drm_fourcc.h> @@ -32,8 +32,8 @@ --- 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 <drm_fourcc.h> @@ -45,7 +45,7 @@ --- 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" ++++++ system-pydeps.patch ++++++ --- /var/tmp/diff_new_pack.Wi20JA/_old 2023-09-22 21:49:13.764814378 +0200 +++ /var/tmp/diff_new_pack.Wi20JA/_new 2023-09-22 21:49:13.768814523 +0200 @@ -125,4 +125,15 @@ ../../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 = [] ++++++ system-wayland.patch ++++++ --- 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 = [ ++++++ v8-regexp-parser-UCHAR_BASIC_EMOJI.patch ++++++ >From 0fec70aeb15c286cb696420616e2aeb3bc0eb03a Mon Sep 17 00:00:00 2001 From: pthier <pth...@chromium.org> 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 <pth...@chromium.org> Reviewed-by: Mathias Bynens <math...@chromium.org> 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<char>* name_1, ZoneVector<char>* name_2); - bool AddPropertyClassRange(ZoneList<CharacterRange>* add_to, bool negate, + bool AddPropertyClassRange(ZoneList<CharacterRange>* add_to_range, + CharacterClassStrings* add_to_strings, bool negate, const ZoneVector<char>& name_1, const ZoneVector<char>& name_2); @@ -465,7 +466,7 @@ class RegExpParserImpl final { bool TryParseCharacterClassEscape(base::uc32 next, InClassEscapeState in_class_escape_state, ZoneList<CharacterRange>* ranges, - Zone* zone, + CharacterClassStrings* strings, Zone* zone, bool add_unicode_case_equivalents); RegExpTree* ParseClassStringDisjunction(ZoneList<CharacterRange>* ranges, CharacterClassStrings* strings); @@ -1094,16 +1095,14 @@ RegExpTree* RegExpParserImpl<CharT>::ParseDisjunction() { case 's': case 'S': case 'w': - case 'W': - case 'p': - case 'P': { + case 'W': { base::uc32 next = Next(); ZoneList<CharacterRange>* ranges = zone()->template New<ZoneList<CharacterRange>>(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<CharT>::ParseDisjunction() { } break; } + case 'p': + case 'P': { + base::uc32 next = Next(); + ZoneList<CharacterRange>* ranges = + zone()->template New<ZoneList<CharacterRange>>(2, zone()); + CharacterClassStrings* strings = nullptr; + if (unicode_sets()) { + strings = zone()->template New<CharacterClassStrings>(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<RegExpClassSetOperand>(ranges, + strings); + builder->AddTerm(op); + } else { + RegExpClassRanges* cc = + zone()->template New<RegExpClassRanges>(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<RegExpTree*>{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<base::uc32>* string = + zone->template New<ZoneList<base::uc32>>(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<CharacterRange>* result, Zone* zone) { + ZoneList<CharacterRange>* 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<CharacterRange>* 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<CharT>::ParsePropertyClassName(ZoneVector<char>* name_1, template <class CharT> bool RegExpParserImpl<CharT>::AddPropertyClassRange( - ZoneList<CharacterRange>* add_to, bool negate, + ZoneList<CharacterRange>* add_to_ranges, + CharacterClassStrings* add_to_strings, bool negate, const ZoneVector<char>& name_1, const ZoneVector<char>& 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<CharT>::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<CharT>::ParsePropertyClassName(ZoneVector<char>* name_1, template <class CharT> bool RegExpParserImpl<CharT>::AddPropertyClassRange( - ZoneList<CharacterRange>* add_to, bool negate, + ZoneList<CharacterRange>* add_to_ranges, + CharacterClassStrings* add_to_strings, bool negate, const ZoneVector<char>& name_1, const ZoneVector<char>& name_2) { return false; } @@ -2345,8 +2442,9 @@ void RegExpParserImpl<CharT>::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<CharT>::ParseClassEscape( template <class CharT> bool RegExpParserImpl<CharT>::TryParseCharacterClassEscape( base::uc32 next, InClassEscapeState in_class_escape_state, - ZoneList<CharacterRange>* ranges, Zone* zone, - bool add_unicode_case_equivalents) { + ZoneList<CharacterRange>* ranges, CharacterClassStrings* strings, + Zone* zone, bool add_unicode_case_equivalents) { DCHECK_EQ(current(), '\\'); DCHECK_EQ(Next(), next); @@ -2382,7 +2480,7 @@ bool RegExpParserImpl<CharT>::TryParseCharacterClassEscape( ZoneVector<char> name_1(zone); ZoneVector<char> 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<CharT>::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], ++++++ wayland-WL-SINCE-VERSION.patch ++++++ >From ce85cd0009fc01aa463db9919c66c5c91eb648ac Mon Sep 17 00:00:00 2001 From: Max Ihlenfeldt <m...@igalia.com> 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 <adun...@igalia.com> Commit-Queue: Max Ihlenfeldt <m...@igalia.com> 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<WaylandOutput*>(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<WaylandOutput> { 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<wl_output> 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( ++++++ wayland_data_drag_controller-WL_SURFACE_OFFSET_SINCE_VERSION.patch ++++++ >From 758dd0a34bec51430123c25a52a2dc14183e5c6a Mon Sep 17 00:00:00 2001 From: Alexander Dunaev <adun...@igalia.com> 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 <adun...@igalia.com> Reviewed-by: Maksim Sisov <msi...@igalia.com> 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