From 264f9258ec5cf7315fadf8b6382549fe86e6aac46e1fb389c86628a42c30f6a8 Mon Sep 17 00:00:00 2001 From: Ruediger Oertel Date: Fri, 20 Sep 2024 14:46:48 +0000 Subject: [PATCH 001/209] osc copypac from project:home:oertel:branches:network:chromium package:chromium-beta revision:19, using expand OBS-URL: https://build.opensuse.org/package/show/home:oertel:branches:network:chromium/chromium-dev?expand=0&rev=2 --- .gitattributes | 23 + .gitignore | 1 + Cr122-ffmpeg-new-channel-layout.patch | 350 + INSTALL.sh | 153 + README.SUSE | 9 + _constraints | 24 + chrome-wrapper | 34 + chromium-102-regex_pattern-array.patch | 16 + chromium-106-ffmpeg-duration.patch | 17 + chromium-117-string-convert.patch | 21 + chromium-119-assert.patch | 12 + chromium-120-make_unique-struct.patch | 12 + chromium-121-rust-clang_lib.patch | 41 + chromium-123-missing-QtGui.patch | 12 + chromium-124-system-libxml.patch | 24 + chromium-125-compiler.patch | 277 + chromium-125-disable-FFmpegAllowLists.patch | 12 + ...mium-125-ffmpeg-5.x-reordered_opaque.patch | 105 + chromium-125-lp155-typename.patch | 310 + chromium-126-quiche-interator.patch | 12 + chromium-127-bindgen.patch | 110 + chromium-127-clang17-traitors.patch | 285 + chromium-127-constexpr.patch | 93 + chromium-127-rust-clanglib.patch | 22 + ...um-129-revert-AVFMT_FLAG_NOH264PARSE.patch | 24 + chromium-130-missing-include.patch | 11 + ...rdware_destructive_interference_size.patch | 22 + chromium-130.0.6723.6.tar.xz | 3 + ...-java-only-allowed-in-android-builds.patch | 16 + chromium-93-ffmpeg-4.4.patch | 67 + chromium-94-ffmpeg-roll.patch | 12 + chromium-buildname.patch | 13 + chromium-libusb_interrupt_event_handler.patch | 15 + chromium-master-prefs-path.patch | 16 + chromium-norar.patch | 12 + chromium-prop-codecs.patch | 17 + chromium-symbolic.svg | 30 + chromium.changes | 9127 +++++++++++++++++ chromium.spec | 1084 ++ esbuild.tar.gz | 3 + exclude_ymp.patch | 10 + ffmpeg-new-channel-layout.patch | 304 + fix_building_widevinecdm_with_chromium.patch | 23 + gcc-enable-lto.patch | 70 + master_preferences | 31 + system-libdrm.patch | 42 + 46 files changed, 12927 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 Cr122-ffmpeg-new-channel-layout.patch create mode 100644 INSTALL.sh create mode 100644 README.SUSE create mode 100644 _constraints create mode 100644 chrome-wrapper create mode 100644 chromium-102-regex_pattern-array.patch create mode 100644 chromium-106-ffmpeg-duration.patch create mode 100644 chromium-117-string-convert.patch create mode 100644 chromium-119-assert.patch create mode 100644 chromium-120-make_unique-struct.patch create mode 100644 chromium-121-rust-clang_lib.patch create mode 100644 chromium-123-missing-QtGui.patch create mode 100644 chromium-124-system-libxml.patch create mode 100644 chromium-125-compiler.patch create mode 100644 chromium-125-disable-FFmpegAllowLists.patch create mode 100644 chromium-125-ffmpeg-5.x-reordered_opaque.patch create mode 100644 chromium-125-lp155-typename.patch create mode 100644 chromium-126-quiche-interator.patch create mode 100644 chromium-127-bindgen.patch create mode 100644 chromium-127-clang17-traitors.patch create mode 100644 chromium-127-constexpr.patch create mode 100644 chromium-127-rust-clanglib.patch create mode 100644 chromium-129-revert-AVFMT_FLAG_NOH264PARSE.patch create mode 100644 chromium-130-missing-include.patch create mode 100644 chromium-130-no-hardware_destructive_interference_size.patch create mode 100644 chromium-130.0.6723.6.tar.xz create mode 100644 chromium-91-java-only-allowed-in-android-builds.patch create mode 100644 chromium-93-ffmpeg-4.4.patch create mode 100644 chromium-94-ffmpeg-roll.patch create mode 100644 chromium-buildname.patch create mode 100644 chromium-libusb_interrupt_event_handler.patch create mode 100644 chromium-master-prefs-path.patch create mode 100644 chromium-norar.patch create mode 100644 chromium-prop-codecs.patch create mode 100644 chromium-symbolic.svg create mode 100644 chromium.changes create mode 100644 chromium.spec create mode 100644 esbuild.tar.gz create mode 100644 exclude_ymp.patch create mode 100644 ffmpeg-new-channel-layout.patch create mode 100644 fix_building_widevinecdm_with_chromium.patch create mode 100644 gcc-enable-lto.patch create mode 100644 master_preferences create mode 100644 system-libdrm.patch diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/Cr122-ffmpeg-new-channel-layout.patch b/Cr122-ffmpeg-new-channel-layout.patch new file mode 100644 index 0000000..4b450d6 --- /dev/null +++ b/Cr122-ffmpeg-new-channel-layout.patch @@ -0,0 +1,350 @@ +From 84d1d7adcd1697348e3f821811179c525d3b5717 Mon Sep 17 00:00:00 2001 +From: Dale Curtis +Date: Tue, 28 Nov 2023 00:41:42 +0000 +Subject: [PATCH] Roll src/third_party/ffmpeg/ c1d0dc413..866768f35 (492 + commits) + +https://chromium.googlesource.com/chromium/third_party/ffmpeg.git/+log/c1d0dc4135ec..866768f35c22 + +$ git log c1d0dc413..866768f35 --date=short --no-merges --format='%ad %ae %s' +2023-11-22 dalecurtis README.chromium file +2023-11-22 dalecurtis Chromium patches file +2023-11-22 dalecurtis GN Configuration +2023-11-21 dalecurtis Switch to remoteexec for robosushi +2023-11-12 mypopydev vulkan_decode: fix the print format of VkDeviceSize +2023-08-28 mypopydev avdevice/decklink_dec: add explicit specifier +2023-11-20 jamrial avcodec: bump version after EVC additions +2023-09-19 d.kozinski avcodec/evc_decoder: Provided support for EVC decoder +2023-09-19 d.kozinski avcodec/evc_encoder: Provided support for EVC encoder +2023-10-17 michael avcodec/h264dec: Support skipping frames that used gray gap frames +2023-10-17 michael avcodec/h264: Avoid using gray gap frames as references +2023-10-17 michael avcodec/h264: keep track of which frames used gray references +2023-10-02 michael avcodec/h264dec: More elaborate documentation for frame_recovered +2023-10-02 michael avcodec/h264: Use FRAME_RECOVERED_HEURISTIC instead of IDR/SEI +2023-10-02 michael avcodec/h264: Seperate SEI and IDR recovery handling +2023-11-19 onemda avfilter/af_afir: remove flag that is not needed +2023-11-19 onemda avfilter/af_afir: no need to dynamically add outpad +2023-11-19 onemda avfilter/af_afir: refactor crossfade code +2023-11-19 onemda avfilter/af_afir: add timeline support +2023-11-16 remi riscv: set fast half-precision conversion +2023-11-19 onemda avfilter/af_afir: remove IR response video rendering support +2023-11-19 onemda doc/filters: add one more example for afir filter usage +2023-11-14 anton tools/general_assembly: update to conform to new rules +2023-11-14 anton tools/general_assembly: make the script executable +2023-11-18 onemda avfilter/avf_showvolume: improve step for vertical orientation +2023-11-18 onemda avfilter/avf_showvolume: draw channel names directly into output frame +2023-11-15 remi lavc/llviddsp: R-V V add_bytes +2023-11-15 remi lavc/flacdsp: R-V V LPC16 function +2023-11-15 remi lavc/flacdsp: R-V V LPC32 +2023-11-15 remi checkasm/flacdsp: add LPC test +2023-11-15 remi riscv: fix builds without Zbb support +2023-11-18 mypopydev lavfi/Makefile: fix vf_cropdetect missed edge_common +2023-11-10 ffmpeg-devel apply spelling fixes +2023-11-18 onemda avfilter/af_afir: add irnorm and irlink options +2023-11-14 remi lavc/flacdsp: R-V V decorrelate_indep 16-bit packed +2023-11-14 remi lavc/flacdsp: R-V V decorrelate_indep 32-bit packed +2023-11-13 remi lavc/flacdsp: R-V V decorrelate_ms packed +2023-08-16 remi lavc/flacdsp: R-V V packed decorrelate_{l,r}s +2023-11-13 remi checkasm/flacdsp: fix ls/rs/ms tests +2023-11-08 onemda avfilter/af_adynamicequalizer: add adaptive detection mode +2023-11-06 onemda avfilter/af_adynamicequalizer: do gain calculations in log domain +2023-11-03 sunyuechi af_afir: RISC-V V fcmul_add +2023-11-12 remi lavc/llauddsp: R-V V scalarproduct_and_madd_int32 +2023-11-12 remi lavc/llauddsp: R-V V scalarproduct_and_madd_int16 +2023-11-12 remi checkasm: add lossless audio DSP +2023-11-15 jamrial x86/flacds: clear the high bits from pred_order in lpc_32 functions +2023-11-13 jianhui.j.dai-at-intel.com avcodec/cbs_vp8: Add support for VP8 codec bitstream +2023-11-13 jianhui.j.dai-at-intel.com avcodec/vp8: Export `vp8_token_update_probs` variable +2023-11-12 remi lavc/huffyuvdsp: basic R-V V add_hfyu_left_pred_bgr32 +2023-11-12 remi checkasm/huffyuvdsp: test for add_hfyu_left_pred_bgr32 +(...) +2022-08-04 andreas.rheinhardt avcodec/cbs: Use RefStruct-API for unit content +2022-08-04 andreas.rheinhardt avcodec/refstruct: Allow checking for exclusive ownership +2022-08-04 andreas.rheinhardt avcodec/dovi_rpu: Use RefStruct API for Vdr data +2022-08-04 andreas.rheinhardt avcodec/wavpack: Use RefStruct API for DSD context +2023-07-17 andreas.rheinhardt avcodec/vp8: Use RefStruct API for seg_map +2022-08-04 andreas.rheinhardt avcodec/hevc_ps: Use RefStruct API for parameter sets +2022-08-04 andreas.rheinhardt avcodec/h264_ps: Use RefStruct API for SPS/PPS +2022-08-04 andreas.rheinhardt avcodec/get_buffer: Use RefStruct API for FramePool +2022-08-04 andreas.rheinhardt avcodec/refstruct: Add simple API for refcounted objects +2023-10-03 remi lavu/fixed_dsp: R-V V scalarproduct +2023-10-07 onemda avformat/wavdec: w64: do not error out for broken files if data start is found +2023-10-06 onemda avcodec/mlpenc: rename some variables related to thd +2023-10-03 andreas.rheinhardt avcodec/mpegvideo: Move allocating new_picture to the encoder +2023-07-17 jamrial fftools/ffplay: stop injecting stream side data in packets +2023-07-17 jamrial fftools/ffmpeg: stop injecting stream side data in packets +2023-07-17 jamrial avcodec/decode: propagate global side data to frames +2023-07-17 jamrial avcodec/hevcdec: check for DOVI configuration record in AVCodecContext side data +2023-07-16 jamrial fftools/ffprobe: stop using AVStream.side_data +2023-07-16 jamrial fftools/ffplay: stop using AVStream.side_data +2023-07-16 jamrial fftools/ffmpeg: stop using AVStream.side_data +2023-09-26 jamrial avcodec/packet: add some documentation for AVPacketSideData +2023-07-16 jamrial avformat/avformat: use the side data from AVStream.codecpar +2023-07-16 jamrial avcodec/codec_par: add side data to AVCodecParameters +2023-07-16 jamrial avcodec/packet: add generic side data helpers +2023-10-06 andreas.rheinhardt avfilter/vulkan_filter: Remove unused label +2023-10-06 onemda avcodec/mlpdec: set extended_substream_info from header +2023-08-26 stefasab doc/encoders/libopus: clarify lowdelay and cutoff options +2023-08-26 stefasab doc/encoders/libxvid: fix references for me_quality option +2023-08-26 stefasab doc/encoders/libx264: clarify meaning of level option +2023-08-26 stefasab lavc: clarify meaning of avctx.level option +2023-10-03 leo.izen avcodec/jpegxl_parser: fix various memory issues +2023-10-03 leo.izen avcodec/jpegxl_parser: add some icc profile checks +2023-09-01 stefasab ffprobe: introduce section type, use for the compact output +2023-09-01 stefasab ffprobe: correct section name for side data piece +2023-08-31 stefasab ffprobe: factorize side data printing to dedicated function +2023-10-03 onemda avcodec/mlpenc: restructure code and resolve several bugs +2023-10-05 dev hwcontext_vulkan: properly support STORAGE usage for mutliplane images +2023-09-30 ben vulkan_hevc: handle non-contiguous SPS/PPS/VPS ids +2023-10-03 ffmpeg-devel avcodec/svt-av1: Set force_key_frames only when gop_size == 1 +2023-10-03 andreas.rheinhardt avcodec/h261dec, mpeg12dec, vc1dec: Remove setting write-only flags +2023-10-03 andreas.rheinhardt avcodec/rv10: Replace switch by LUT +2023-10-03 andreas.rheinhardt avcodec/rv10: Remove dead code +2023-10-02 andreas.rheinhardt avcodec/h263dec, mpeg4videodec: Parse extradata during init +2023-10-01 andreas.rheinhardt avcodec/mpegvideo_dec: Always initialize IDCTDSPContext during init +2023-10-01 andreas.rheinhardt avcodec/mpegvideo_dec: Don't zero context on init failure +2023-10-01 andreas.rheinhardt avcodec/mpeg12dec: Don't initialize IDCT more than once +2023-10-02 remi lavc/ac3: add R-V Zbb extract_exponents +2023-10-04 jamrial avcodec/hcadec: add a flush callback +2023-10-01 remi swscale/rgb2rgb: R-V V deinterleaveBytes +2023-10-01 remi swscale/rgb2rgb: fix extra iteration in R-V V interleave + +Created with: + roll-dep src/third_party/ffmpeg + +R=jrummell + +Bug: 1504603 +Change-Id: Ia40313bc2abcb0594543019bc8d1c22fbf7bde82 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5055586 +Reviewed-by: John Rummell +Auto-Submit: Dale Curtis +Commit-Queue: Dale Curtis +Cr-Commit-Position: refs/heads/main@{#1229653} +--- + DEPS | 2 +- + media/ffmpeg/ffmpeg_common.cc | 169 +++++++++--------- + .../filters/audio_video_metadata_extractor.cc | 17 +- + media/filters/ffmpeg_demuxer_unittest.cc | 4 +- + third_party/ffmpeg | 2 +- + 5 files changed, 97 insertions(+), 97 deletions(-) + +diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc +index 3c97e4a6cf4c7..a55e4ab51d5b3 100644 +--- a/media/ffmpeg/ffmpeg_common.cc ++++ b/media/ffmpeg/ffmpeg_common.cc +@@ -653,15 +653,6 @@ bool AVStreamToVideoDecoderConfig(const AVStream* stream, + profile = ProfileIDToVideoCodecProfile(codec_context->profile); + } + +- void* display_matrix = +- av_stream_get_side_data(stream, AV_PKT_DATA_DISPLAYMATRIX, nullptr); +- +- VideoTransformation video_transformation = VideoTransformation(); +- if (display_matrix) { +- video_transformation = VideoTransformation::FromFFmpegDisplayMatrix( +- static_cast(display_matrix)); +- } +- + if (!color_space.IsSpecified()) { + // VP9 frames may have color information, but that information cannot + // express new color spaces, like HDR. For that reason, color space +@@ -718,91 +709,92 @@ + codec_context->extradata + codec_context->extradata_size); + } + +- if (stream->nb_side_data) { +- for (int i = 0; i < stream->nb_side_data; ++i) { +- AVPacketSideData side_data = stream->side_data[i]; +- switch (side_data.type) { +- case AV_PKT_DATA_MASTERING_DISPLAY_METADATA: { +- AVMasteringDisplayMetadata* mdcv = +- reinterpret_cast(side_data.data); +- gfx::HdrMetadataSmpteSt2086 smpte_st_2086; +- if (mdcv->has_primaries) { +- smpte_st_2086.primaries = { +- static_cast(av_q2d(mdcv->display_primaries[0][0])), +- static_cast(av_q2d(mdcv->display_primaries[0][1])), +- static_cast(av_q2d(mdcv->display_primaries[1][0])), +- static_cast(av_q2d(mdcv->display_primaries[1][1])), +- static_cast(av_q2d(mdcv->display_primaries[2][0])), +- static_cast(av_q2d(mdcv->display_primaries[2][1])), +- static_cast(av_q2d(mdcv->white_point[0])), +- static_cast(av_q2d(mdcv->white_point[1])), +- }; +- } +- if (mdcv->has_luminance) { +- smpte_st_2086.luminance_max = av_q2d(mdcv->max_luminance); +- smpte_st_2086.luminance_min = av_q2d(mdcv->min_luminance); +- } +- +- // TODO(crbug.com/40268540): Consider rejecting metadata that +- // does not specify all values. +- if (mdcv->has_primaries || mdcv->has_luminance) { +- hdr_metadata.smpte_st_2086 = smpte_st_2086; +- } +- break; ++ VideoTransformation video_transformation = VideoTransformation(); ++ for (int i = 0; i < stream->codecpar->nb_coded_side_data; ++i) { ++ const auto& side_data = stream->codecpar->coded_side_data[i]; ++ switch (side_data.type) { ++ case AV_PKT_DATA_DISPLAYMATRIX: { ++ CHECK_EQ(side_data.size, sizeof(int32_t) * 3 * 3); ++ video_transformation = VideoTransformation::FromFFmpegDisplayMatrix( ++ reinterpret_cast(side_data.data)); ++ break; ++ } ++ case AV_PKT_DATA_MASTERING_DISPLAY_METADATA: { ++ AVMasteringDisplayMetadata* mdcv = ++ reinterpret_cast(side_data.data); ++ gfx::HdrMetadataSmpteSt2086 smpte_st_2086; ++ if (mdcv->has_primaries) { ++ smpte_st_2086.primaries = { ++ static_cast(av_q2d(mdcv->display_primaries[0][0])), ++ static_cast(av_q2d(mdcv->display_primaries[0][1])), ++ static_cast(av_q2d(mdcv->display_primaries[1][0])), ++ static_cast(av_q2d(mdcv->display_primaries[1][1])), ++ static_cast(av_q2d(mdcv->display_primaries[2][0])), ++ static_cast(av_q2d(mdcv->display_primaries[2][1])), ++ static_cast(av_q2d(mdcv->white_point[0])), ++ static_cast(av_q2d(mdcv->white_point[1])), ++ }; + } +- case AV_PKT_DATA_CONTENT_LIGHT_LEVEL: { +- AVContentLightMetadata* clli = +- reinterpret_cast(side_data.data); +- hdr_metadata.cta_861_3 = +- gfx::HdrMetadataCta861_3(clli->MaxCLL, clli->MaxFALL); +- break; ++ if (mdcv->has_luminance) { ++ smpte_st_2086.luminance_max = av_q2d(mdcv->max_luminance); ++ smpte_st_2086.luminance_min = av_q2d(mdcv->min_luminance); ++ } ++ ++ // TODO(crbug.com/40268540): Consider rejecting metadata that ++ // does not specify all values. ++ if (mdcv->has_primaries || mdcv->has_luminance) { ++ hdr_metadata.smpte_st_2086 = smpte_st_2086; + } ++ break; ++ } ++ case AV_PKT_DATA_CONTENT_LIGHT_LEVEL: { ++ AVContentLightMetadata* clli = ++ reinterpret_cast(side_data.data); ++ hdr_metadata.cta_861_3 = ++ gfx::HdrMetadataCta861_3(clli->MaxCLL, clli->MaxFALL); ++ break; ++ } + #if BUILDFLAG(ENABLE_PLATFORM_DOLBY_VISION) +- case AV_PKT_DATA_DOVI_CONF: { +- AVDOVIDecoderConfigurationRecord* dovi = +- reinterpret_cast( +- side_data.data); +- VideoType type; +- type.codec = VideoCodec::kDolbyVision; +- type.level = dovi->dv_level; +- type.color_space = color_space; +- type.hdr_metadata_type = gfx::HdrMetadataType::kNone; +- switch (dovi->dv_profile) { +- case 0: +- type.profile = VideoCodecProfile::DOLBYVISION_PROFILE0; +- break; +- case 4: +- type.profile = VideoCodecProfile::DOLBYVISION_PROFILE4; +- break; +- case 5: +- type.profile = VideoCodecProfile::DOLBYVISION_PROFILE5; +- break; +- case 7: +- type.profile = VideoCodecProfile::DOLBYVISION_PROFILE7; +- break; +- case 8: +- type.profile = VideoCodecProfile::DOLBYVISION_PROFILE8; +- break; +- case 9: +- type.profile = VideoCodecProfile::DOLBYVISION_PROFILE9; +- break; +- default: +- type.profile = VideoCodecProfile::VIDEO_CODEC_PROFILE_UNKNOWN; +- break; +- } +- // Treat dolby vision contents as dolby vision codec only if the +- // device support clear DV decoding, otherwise use the original +- // HEVC or AVC codec and profile. +- if (media::IsSupportedVideoType(type)) { +- codec = type.codec; +- profile = type.profile; +- } +- break; ++ case AV_PKT_DATA_DOVI_CONF: { ++ AVDOVIDecoderConfigurationRecord* dovi = ++ reinterpret_cast(side_data.data); ++ VideoType type; ++ type.codec = VideoCodec::kDolbyVision; ++ type.level = dovi->dv_level; ++ type.color_space = color_space; ++ type.hdr_metadata_type = gfx::HdrMetadataType::kNone; ++ switch (dovi->dv_profile) { ++ case 0: ++ type.profile = VideoCodecProfile::DOLBYVISION_PROFILE0; ++ break; ++ case 5: ++ type.profile = VideoCodecProfile::DOLBYVISION_PROFILE5; ++ break; ++ case 7: ++ type.profile = VideoCodecProfile::DOLBYVISION_PROFILE7; ++ break; ++ case 8: ++ type.profile = VideoCodecProfile::DOLBYVISION_PROFILE8; ++ break; ++ case 9: ++ type.profile = VideoCodecProfile::DOLBYVISION_PROFILE9; ++ break; ++ default: ++ type.profile = VideoCodecProfile::VIDEO_CODEC_PROFILE_UNKNOWN; ++ break; + } ++ // Treat dolby vision contents as dolby vision codec only if the ++ // device support clear DV decoding, otherwise use the original ++ // HEVC or AVC codec and profile. ++ if (media::IsSupportedVideoType(type)) { ++ codec = type.codec; ++ profile = type.profile; ++ } ++ break; ++ } + #endif // BUILDFLAG(ENABLE_PLATFORM_DOLBY_VISION) + default: + break; +- } + } + } + +diff --git a/media/filters/audio_video_metadata_extractor.cc b/media/filters/audio_video_metadata_extractor.cc +index cb002490a6322..e841b4ad13383 100644 +--- a/media/filters/audio_video_metadata_extractor.cc ++++ b/media/filters/audio_video_metadata_extractor.cc +@@ -113,13 +113,16 @@ bool AudioVideoMetadataExtractor::Extract(DataSource* source, + if (!stream) + continue; + +- void* display_matrix = +- av_stream_get_side_data(stream, AV_PKT_DATA_DISPLAYMATRIX, nullptr); +- if (display_matrix) { +- rotation_ = VideoTransformation::FromFFmpegDisplayMatrix( +- static_cast(display_matrix)) +- .rotation; +- info.tags["rotate"] = base::NumberToString(rotation_); ++ for (int j = 0; j < stream->codecpar->nb_coded_side_data; j++) { ++ const AVPacketSideData& sd = stream->codecpar->coded_side_data[j]; ++ if (sd.type == AV_PKT_DATA_DISPLAYMATRIX) { ++ CHECK_EQ(sd.size, sizeof(int32_t) * 3 * 3); ++ rotation_ = VideoTransformation::FromFFmpegDisplayMatrix( ++ reinterpret_cast(sd.data)) ++ .rotation; ++ info.tags["rotate"] = base::NumberToString(rotation_); ++ break; ++ } + } + + // Extract dictionary from streams also. Needed for containers that attach diff --git a/INSTALL.sh b/INSTALL.sh new file mode 100644 index 0000000..bcf52d7 --- /dev/null +++ b/INSTALL.sh @@ -0,0 +1,153 @@ +#!/bin/bash +set -x +while getopts s:o:l:i: option +do +case "${option}" in +s) STAGEDIR=${OPTARG};; +o) OUTPUTDIR=${OPTARG};; +l) LIBDIR=${OPTARG};; +i) ICUDATAFILE=${OPTARG};; +esac +done +SHLIB_PERMS="755" +PROGNAME="chrome" +PACKAGE="chromium-browser" +MENUNAME="Chromium Web Browser (Beta)" +CHANNEL="beta" +INSTALLDIR="${LIBDIR}/chromium" + +install -m 755 -d \ + "${STAGEDIR}/${INSTALLDIR}" \ + "${STAGEDIR}/usr/bin" \ + "${STAGEDIR}/usr/share/applications" \ + "${STAGEDIR}/usr/share/metainfo" \ + "${STAGEDIR}/usr/share/man/man1" + +# app +buildfile="${OUTPUTDIR}/${PROGNAME}" +install -m 755 "${buildfile}" "${STAGEDIR}/${INSTALLDIR}/${PROGNAME}" + +# crashpad +buildfile="${OUTPUTDIR}/chrome_crashpad_handler" +install -m 755 "${buildfile}" "${STAGEDIR}/${INSTALLDIR}/chrome_crashpad_handler" + +# resources +install -m 644 "${OUTPUTDIR}/resources.pak" "${STAGEDIR}/${INSTALLDIR}/" +install -m 644 "${OUTPUTDIR}/chrome_100_percent.pak" "${STAGEDIR}/${INSTALLDIR}/" +install -m 644 "${OUTPUTDIR}/chrome_200_percent.pak" "${STAGEDIR}/${INSTALLDIR}/" + +# ICU data file; Necessary when the GN icu_use_data_file flag is true. +if [ "x$ICUDATAFILE" == "xtrue" ]; then + install -m 644 "${OUTPUTDIR}/icudtl.dat" "${STAGEDIR}/${INSTALLDIR}/" +fi + +# V8 snapshot files; Necessary when the GN v8_use_external_startup_data flag + # is true. + # Use v8_context_snapshot.bin instead of snapshot_blob.bin if it is available. + # TODO(crbug.com/764576): Unship snapshot_blob.bin on ChromeOS and drop this branch +install -m 644 "${OUTPUTDIR}/v8_context_snapshot.bin" "${STAGEDIR}/${INSTALLDIR}/" + +# l10n paks +install -m 755 -d "${STAGEDIR}/${INSTALLDIR}/locales/" +find "${OUTPUTDIR}/locales" -type f -name '*.pak' -print -exec \ + cp -a {} "${STAGEDIR}/${INSTALLDIR}/locales/" \; +find "${STAGEDIR}/${INSTALLDIR}/locales" -type f -print -exec chmod 644 {} \; + +# ANGLE +if [ -f "${OUTPUTDIR}/libEGL.so" ]; then + for file in libEGL.so libGLESv2.so; + do + buildfile="${OUTPUTDIR}/${file}" + install -m ${SHLIB_PERMS} "${buildfile}" "${STAGEDIR}/${INSTALLDIR}/${file}" + done +fi + +# ANGLE's libvulkan library +if [ -f "${OUTPUTDIR}/libvulkan.so.1" ]; then + file="libvulkan.so.1" + buildfile="${OUTPUTDIR}/${file}" + install -m 755 "${buildfile}" "${STAGEDIR}/${INSTALLDIR}/${file}" +fi + +# SwiftShader ES +if [ -f "${OUTPUTDIR}/swiftshader/libEGL.so" ]; then + install -m 755 -d "${STAGEDIR}/${INSTALLDIR}/swiftshader/" + for file in libEGL.so libGLESv2.so; + do + buildfile="${OUTPUTDIR}/swiftshader/${file}" + install -m ${SHLIB_PERMS} "${buildfile}" "${STAGEDIR}/${INSTALLDIR}/swiftshader/${file}" + done +fi + +# SwiftShader VK +if [ -f "${OUTPUTDIR}/libvk_swiftshader.so" ]; then + install -m 755 -d "${STAGEDIR}/${INSTALLDIR}/" + file="libvk_swiftshader.so" + buildfile="${OUTPUTDIR}/${file}" + install -m ${SHLIB_PERMS} "${buildfile}" "${STAGEDIR}/${INSTALLDIR}/${file}" +fi +sed -e 's|${ICD_LIBRARY_PATH}|./libvk_swiftshader.so|g' third_party/swiftshader/src/Vulkan/vk_swiftshader_icd.json.tmpl > ${OUTPUTDIR}/vk_swiftshader_icd.json +# Install the ICD json file to point ANGLE to libvk_swiftshader.so +install -m 644 "${OUTPUTDIR}/vk_swiftshader_icd.json" "${STAGEDIR}/${INSTALLDIR}/" + +# QT shim +if [ -f "${OUTPUTDIR}/libqt5_shim.so" ]; then + file="libqt5_shim.so" + buildfile="${OUTPUTDIR}/${file}" + install -m ${SHLIB_PERMS} "${buildfile}" "${STAGEDIR}/${INSTALLDIR}/${file}" +fi +if [ -f "${OUTPUTDIR}/libqt6_shim.so" ]; then + file="libqt6_shim.so" + buildfile="${OUTPUTDIR}/${file}" + install -m ${SHLIB_PERMS} "${buildfile}" "${STAGEDIR}/${INSTALLDIR}/${file}" +fi + +# default apps +if [ -d "${OUTPUTDIR}/default_apps" ]; then + cp -a "${OUTPUTDIR}/default_apps" "${STAGEDIR}/${INSTALLDIR}/" + find "${STAGEDIR}/${INSTALLDIR}/default_apps" -type d -exec chmod 755 '{}' \; + find "${STAGEDIR}/${INSTALLDIR}/default_apps" -type f -exec chmod 644 '{}' \; +fi + +# launcher script and symlink +sed \ + -e "s#@@PROGNAME@@#${PROGNAME}#g" \ + -e "s#@@CHANNEL@@#${CHANNEL}#g" \ + "chrome/installer/linux/common/wrapper" > "${STAGEDIR}/${INSTALLDIR}/chrome-wrapper" +chmod 755 "${STAGEDIR}/${INSTALLDIR}/chrome-wrapper" +ln -s "${INSTALLDIR}/chrome-wrapper" "${STAGEDIR}/usr/bin/${PACKAGE}" + +# app icons +for size in 16 32; +do + icon="chrome/app/theme/default_100_percent/chromium/product_logo_${size}.png" + installpath="${STAGEDIR}/usr/share/icons/hicolor/${size}x${size}/apps/chromium-browser.png" + install -D -m 644 ${icon} ${installpath} +done +for size in 24 48 64 128 256; +do + icon="chrome/app/theme/chromium/product_logo_${size}.png" + installpath="${STAGEDIR}/usr/share/icons/hicolor/${size}x${size}/apps/chromium-browser.png" + install -D -m 644 ${icon} ${installpath} +done + +# desktop integration +## AppData +install -m 644 "chrome/installer/linux/common/chromium-browser/chromium-browser.appdata.xml" \ +"${STAGEDIR}/usr/share/metainfo/${PACKAGE}.appdata.xml" + +## Desktop file +sed \ + -e "s#@@MENUNAME@@#${MENUNAME}#g" \ + -e "s#@@USR_BIN_SYMLINK_NAME@@#${PACKAGE}#g" \ + -e "s#@@PACKAGE@@#${PACKAGE}#g" \ + "chrome/installer/linux/common/desktop.template" > "${STAGEDIR}/usr/share/applications/${PACKAGE}.desktop" +chmod 644 "${STAGEDIR}/usr/share/applications/${PACKAGE}.desktop" + +# documentation +sed \ + -e "s#@@MENUNAME@@#${MENUNAME}#g" \ + -e "s#@@PACKAGE@@#${PACKAGE}#g" \ + "chrome/app/resources/manpage.1.in" > "${STAGEDIR}/usr/share/man/man1/${PACKAGE}.1" +gzip -9n "${STAGEDIR}/usr/share/man/man1/${PACKAGE}.1" +chmod 644 "${STAGEDIR}/usr/share/man/man1/${PACKAGE}.1.gz" diff --git a/README.SUSE b/README.SUSE new file mode 100644 index 0000000..7fd2b87 --- /dev/null +++ b/README.SUSE @@ -0,0 +1,9 @@ +README for SUSE packagers +========================= +Patches for chromium can typically be found in the following places: + +Stephan Hartmann - https://github.com/stha09/chromium-patches/releases +Gentoo - https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/chromium/files +Fedora - https://src.fedoraproject.org/rpms/chromium/tree/rawhide +Arch - https://github.com/archlinux/svntogit-packages/tree/packages/chromium/trunk +Arch: https://gitlab.com/Matt.Jolly/chromium-patches/ diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..1c5642b --- /dev/null +++ b/_constraints @@ -0,0 +1,24 @@ + + + + + 30 + + + 14 + + + + + aarch64 + + + + asimdrdm + + + 11 + + + + diff --git a/chrome-wrapper b/chrome-wrapper new file mode 100644 index 0000000..22772d9 --- /dev/null +++ b/chrome-wrapper @@ -0,0 +1,34 @@ +#!/bin/bash +# +# Copyright (c) 2011 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Let the wrapped binary know that it has been run through the wrapper. +export CHROME_WRAPPER="`readlink -f "$0"`" + +HERE="`dirname "$CHROME_WRAPPER"`" + +# Always use our versions of ffmpeg libs. +# This also makes RPMs find the compatibly-named library symlinks. +export LD_LIBRARY_PATH="$HERE${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" + +export CHROME_VERSION_EXTRA="@@CHANNEL@@" + +# We don't want bug-buddy intercepting our crashes. http://crbug.com/24120 +export GNOME_DISABLE_CRASH_DIALOG=SET_BY_GOOGLE_CHROME + +# Allow root usage +no_sandbox= +if [ "`id -u`" == "0" ]; then + no_sandbox=--no-sandbox +fi + +# Sanitize std{in,out,err} because they'll be shared with untrusted child +# processes (http://crbug.com/376567). +exec < /dev/null +exec > >(exec cat) +exec 2> >(exec cat >&2) + +# Note: exec -a below is a bashism. +exec -a "$0" "$HERE/chrome" $no_sandbox "$@" diff --git a/chromium-102-regex_pattern-array.patch b/chromium-102-regex_pattern-array.patch new file mode 100644 index 0000000..28b9856 --- /dev/null +++ b/chromium-102-regex_pattern-array.patch @@ -0,0 +1,16 @@ +Index: chromium-123.0.6312.46/components/autofill/core/browser/BUILD.gn +=================================================================== +--- chromium-123.0.6312.46.orig/components/autofill/core/browser/BUILD.gn ++++ chromium-123.0.6312.46/components/autofill/core/browser/BUILD.gn +@@ -58,6 +58,11 @@ action("regex_patterns_inl_h") { + } + + static_library("browser") { ++ if (is_clang) { ++ cflags = [ ++ "-fbracket-depth=1000", ++ ] ++ } + sources = [ + "address_data_cleaner.cc", + "address_data_cleaner.h", diff --git a/chromium-106-ffmpeg-duration.patch b/chromium-106-ffmpeg-duration.patch new file mode 100644 index 0000000..8bdb934 --- /dev/null +++ b/chromium-106-ffmpeg-duration.patch @@ -0,0 +1,17 @@ +Index: chromium-106.0.5249.91/media/filters/audio_file_reader.cc +=================================================================== +--- chromium-106.0.5249.91.orig/media/filters/audio_file_reader.cc ++++ chromium-106.0.5249.91/media/filters/audio_file_reader.cc +@@ -243,10 +243,10 @@ bool AudioFileReader::OnNewFrame( + // silence from being output. In the case where we are also discarding some + // portion of the packet (as indicated by a negative pts), we further want to + // adjust the duration downward by however much exists before zero. +- if (audio_codec_ == AudioCodec::kAAC && frame->duration) { ++ if (audio_codec_ == AudioCodec::kAAC && frame->pkt_duration) { + const base::TimeDelta pkt_duration = ConvertFromTimeBase( + glue_->format_context()->streams[stream_index_]->time_base, +- frame->duration + std::min(static_cast(0), frame->pts)); ++ frame->pkt_duration + std::min(static_cast(0), frame->pts)); + const base::TimeDelta frame_duration = + base::Seconds(frames_read / static_cast(sample_rate_)); + diff --git a/chromium-117-string-convert.patch b/chromium-117-string-convert.patch new file mode 100644 index 0000000..ccf82b9 --- /dev/null +++ b/chromium-117-string-convert.patch @@ -0,0 +1,21 @@ +diff -up chromium-117.0.5938.62/net/dns/host_resolver_cache.cc.me chromium-117.0.5938.62/net/dns/host_resolver_cache.cc +diff -up chromium-117.0.5938.62/net/dns/host_resolver_cache.h.me chromium-117.0.5938.62/net/dns/host_resolver_cache.h +--- chromium-117.0.5938.62/net/dns/host_resolver_cache.h.me 2023-09-14 15:21:24.632965004 +0200 ++++ chromium-117.0.5938.62/net/dns/host_resolver_cache.h 2023-09-15 09:15:48.511300845 +0200 +@@ -143,12 +143,14 @@ class NET_EXPORT HostResolverCache final + } + + bool operator()(const Key& lhs, const KeyRef& rhs) const { ++ const std::string rhs_domain_name{rhs.domain_name}; + return std::tie(lhs.domain_name, lhs.network_anonymization_key) < +- std::tie(rhs.domain_name, *rhs.network_anonymization_key); ++ std::tie(rhs_domain_name, *rhs.network_anonymization_key); + } + + bool operator()(const KeyRef& lhs, const Key& rhs) const { +- return std::tie(lhs.domain_name, *lhs.network_anonymization_key) < ++ const std::string lhs_domain_name{lhs.domain_name}; ++ return std::tie(lhs_domain_name, *lhs.network_anonymization_key) < + std::tie(rhs.domain_name, rhs.network_anonymization_key); + } + }; diff --git a/chromium-119-assert.patch b/chromium-119-assert.patch new file mode 100644 index 0000000..04fe47a --- /dev/null +++ b/chromium-119-assert.patch @@ -0,0 +1,12 @@ +diff -up chromium-119.0.6045.59/v8/src/base/small-vector.h.than chromium-119.0.6045.59/v8/src/base/small-vector.h +--- chromium-119.0.6045.59/v8/src/base/small-vector.h.than 2023-11-01 16:13:12.645301345 +0100 ++++ chromium-119.0.6045.59/v8/src/base/small-vector.h 2023-11-01 16:13:29.660610182 +0100 +@@ -22,7 +22,7 @@ template ::value); + + public: diff --git a/chromium-120-make_unique-struct.patch b/chromium-120-make_unique-struct.patch new file mode 100644 index 0000000..fd6bed8 --- /dev/null +++ b/chromium-120-make_unique-struct.patch @@ -0,0 +1,12 @@ +diff --git a/service_worker_global_scope.h b/service_worker_global_scope.h.new +index ac4cac0..8c7d744 100644 +--- a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h ++++ b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h +@@ -777,6 +777,7 @@ class MODULES_EXPORT ServiceWorkerGlobalScope final + blink::BlinkStorageKey storage_key_; + + struct RaceNetworkRequestInfo { ++ RaceNetworkRequestInfo(int _fetch_event_id, String _token, mojo::PendingRemote _url_loader_factory) : fetch_event_id{_fetch_event_id}, token{_token}, url_loader_factory{std::move(_url_loader_factory)} {} + int fetch_event_id; + String token; + mojo::PendingRemote diff --git a/chromium-121-rust-clang_lib.patch b/chromium-121-rust-clang_lib.patch new file mode 100644 index 0000000..e919275 --- /dev/null +++ b/chromium-121-rust-clang_lib.patch @@ -0,0 +1,41 @@ +diff -up chromium-121.0.6167.57/build/config/clang/BUILD.gn.rust-clang_lib chromium-121.0.6167.57/build/config/clang/BUILD.gn +--- chromium-121.0.6167.57/build/config/clang/BUILD.gn.rust-clang_lib 2024-01-10 16:43:01.000000000 +0100 ++++ chromium-121.0.6167.57/build/config/clang/BUILD.gn 2024-01-20 19:51:38.481992799 +0100 +@@ -112,6 +112,7 @@ template("clang_lib") { + _prefix = "lib" + _suffix = "" + _ext = "a" ++ _libprefix = "" + if (is_win) { + _dir = "windows" + _prefix = "" +@@ -127,7 +128,19 @@ template("clang_lib") { + } + } else if (is_apple) { + _dir = "darwin" +- } else if (is_linux || is_chromeos) { ++ } else if (is_linux) { ++ _libprefix = "64" ++ _dir = "linux" ++ if (current_cpu == "x64") { ++ _suffix ="-x86_64" ++ } else if (current_cpu == "arm64") { ++ _suffix = "-aarch64" ++ } else if (current_cpu == "riscv64") { ++ _suffix = "-riscv64" ++ } else { ++ assert(false) # Unhandled cpu type ++ } ++ } else if (is_chromeos) { + if (current_cpu == "x64") { + _dir = "x86_64-unknown-linux-gnu" + } else if (current_cpu == "x86") { +@@ -166,7 +193,7 @@ template("clang_lib") { + assert(false) # Unhandled target platform + } + +- _clang_lib_dir = "$clang_base_path/lib/clang/$clang_version/lib" ++ _clang_lib_dir = "$clang_base_path/lib${_libprefix}/clang/$clang_version/lib" + _lib_file = "${_prefix}clang_rt.${_libname}${_suffix}.${_ext}" + libs = [ "$_clang_lib_dir/$_dir/$_lib_file" ] + } diff --git a/chromium-123-missing-QtGui.patch b/chromium-123-missing-QtGui.patch new file mode 100644 index 0000000..46917c5 --- /dev/null +++ b/chromium-123-missing-QtGui.patch @@ -0,0 +1,12 @@ +diff --git a/ui/qt/BUILD.gn b/ui/qt/BUILD.gn.new +index 2da7845..02ae3c8 100644 +--- a/ui/qt/BUILD.gn ++++ b/ui/qt/BUILD.gn +@@ -61,6 +61,7 @@ template("qt_shim") { + packages = [ + "Qt" + invoker.qt_version + "Core", + "Qt" + invoker.qt_version + "Widgets", ++ "Qt" + invoker.qt_version + "Gui", + ] + } + diff --git a/chromium-124-system-libxml.patch b/chromium-124-system-libxml.patch new file mode 100644 index 0000000..eff9de1 --- /dev/null +++ b/chromium-124-system-libxml.patch @@ -0,0 +1,24 @@ +diff -up chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor.h.me chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor.h +--- chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor.h.me 2024-02-06 08:22:36.013021582 +0100 ++++ chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor.h 2024-02-06 08:23:08.281607499 +0100 +@@ -77,7 +77,7 @@ class XSLTProcessor final : public Scrip + + void reset(); + +- static void ParseErrorFunc(void* user_data, const xmlError*); ++ static void ParseErrorFunc(void* user_data, xmlError*); + static void GenericErrorFunc(void* user_data, const char* msg, ...); + + // Only for libXSLT callbacks +diff -up chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc.me chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc +--- chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc.me 2024-02-06 08:14:32.368066214 +0100 ++++ chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc 2024-02-06 08:23:08.282607518 +0100 +@@ -66,7 +66,7 @@ void XSLTProcessor::GenericErrorFunc(voi + // It would be nice to do something with this error message. + } + +-void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) { ++void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) { + FrameConsole* console = static_cast(user_data); + if (!console) + return; diff --git a/chromium-125-compiler.patch b/chromium-125-compiler.patch new file mode 100644 index 0000000..af78e76 --- /dev/null +++ b/chromium-125-compiler.patch @@ -0,0 +1,277 @@ +From 307a0f63dd9b118f4b8470ed3d7567e81fdb7a6d Mon Sep 17 00:00:00 2001 +From: Mike Gilbert +Date: Tue, 15 Nov 2022 10:27:58 +0000 +Subject: [PATCH] Disable various compiler configs + +--- + build/config/compiler/BUILD.gn | 134 +++++---------------------------- + 1 file changed, 17 insertions(+), 117 deletions(-) + +Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn +=================================================================== +--- chromium-126.0.6478.8.orig/build/config/compiler/BUILD.gn ++++ chromium-126.0.6478.8/build/config/compiler/BUILD.gn +@@ -305,9 +305,7 @@ config("compiler") { + + configs += [ + # See the definitions below. +- ":clang_revision", + ":rustc_revision", +- ":compiler_cpu_abi", + ":compiler_codegen", + ":compiler_deterministic", + ] +@@ -554,55 +554,6 @@ config("compiler") { + ldflags += [ "-Wl,-z,keep-text-section-prefix" ] + } + +- if (is_clang && !is_nacl) { +- 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 +- cflags += [ +- "-mllvm", +- "-instcombine-lower-dbg-declare=0", +- ] +- if (!is_debug && use_thin_lto && is_a_target_toolchain) { +- if (is_win) { +- ldflags += [ "-mllvm:-instcombine-lower-dbg-declare=0" ] +- } else { +- ldflags += [ "-Wl,-mllvm,-instcombine-lower-dbg-declare=0" ] +- } +- } +- +- # TODO(crbug.com/40283598): This causes binary size growth and potentially +- # other problems. +- # TODO(crbug.com/40284925): This isn't supported by Cronet's mainline llvm version. +- if (default_toolchain != "//build/toolchain/cros:target" && +- !llvm_android_mainline) { +- cflags += [ +- "-mllvm", +- "-split-threshold-for-reg-with-hint=0", +- ] +- if (use_thin_lto && is_a_target_toolchain) { +- if (is_win) { +- ldflags += [ "-mllvm:-split-threshold-for-reg-with-hint=0" ] +- } else { +- ldflags += [ "-Wl,-mllvm,-split-threshold-for-reg-with-hint=0" ] +- } +- } +- } +- +- # TODO(crbug.com/40192287): Investigate why/if this should be needed. +- if (is_win) { +- cflags += [ "/clang:-ffp-contract=off" ] +- } else { +- cflags += [ "-ffp-contract=off" ] +- } +- } +- + # C11/C++11 compiler flags setup. + # --------------------------- + if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) || +@@ -1538,52 +1489,6 @@ config("compiler_deterministic") { + } + } + +- # Makes builds independent of absolute file path. +- if (is_clang && strip_absolute_paths_from_debug_symbols) { +- # If debug option is given, clang includes $cwd in debug info by default. +- # For such build, this flag generates reproducible obj files even we use +- # different build directory like "out/feature_a" and "out/feature_b" if +- # we build same files with same compile flag. +- # Other paths are already given in relative, no need to normalize them. +- if (is_nacl) { +- # TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here. +- cflags += [ +- "-Xclang", +- "-fdebug-compilation-dir", +- "-Xclang", +- ".", +- ] +- } else { +- # -ffile-compilation-dir is an alias for both -fdebug-compilation-dir= +- # and -fcoverage-compilation-dir=. +- cflags += [ "-ffile-compilation-dir=." ] +- +- # Convert absolute paths to relative paths. Expands to, for example: +- # -file-prefix-map /path/to/chromium/src=../.. +- swiftflags += [ +- "-file-prefix-map", +- rebase_path("//.", "") + "=" + rebase_path("//.", root_build_dir), +- ] +- } +- if (!is_win) { +- # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167) +- asmflags = [ "-Wa,-fdebug-compilation-dir,." ] +- } +- +- if (is_win && use_lld) { +- if (symbol_level == 2 || (is_clang && using_sanitizer)) { +- # Absolutize source file paths for PDB. Pass the real build directory +- # if the pdb contains source-level debug information and if linker +- # reproducibility is not critical. +- ldflags += [ "/PDBSourcePath:" + rebase_path(root_build_dir) ] +- } else { +- # Use a fake fixed base directory for paths in the pdb to make the pdb +- # output fully deterministic and independent of the build directory. +- ldflags += [ "/PDBSourcePath:o:\fake\prefix" ] +- } +- } +- } +- + # Tells the compiler not to use absolute paths when passing the default + # paths to the tools it invokes. We don't want this because we don't + # really need it and it can mess up the RBE cache entries. +@@ -1602,28 +1507,6 @@ config("compiler_deterministic") { + } + } + +-config("clang_revision") { +- if (is_clang && clang_base_path == default_clang_base_path && +- current_os != "zos") { +- update_args = [ +- "--print-revision", +- "--verify-version=$clang_version", +- ] +- if (llvm_force_head_revision) { +- update_args += [ "--llvm-force-head-revision" ] +- } +- clang_revision = exec_script("//tools/clang/scripts/update.py", +- update_args, +- "trim string") +- +- # This is here so that all files get recompiled after a clang roll and +- # when turning clang on or off. (defines are passed via the command line, +- # and build system rebuild things when their commandline changes). Nothing +- # should ever read this define. +- defines = [ "CR_CLANG_REVISION=\"$clang_revision\"" ] +- } +-} +- + config("rustc_revision") { + if (rustc_revision != "") { + # Similar to the above config, this is here so that all files get recompiled +@@ -1983,10 +1871,6 @@ config("chromium_code") { + } + } else { + cflags = [ "-Wall" ] +- if (is_clang) { +- # Enable extra warnings for chromium_code when we control the compiler. +- cflags += [ "-Wextra" ] +- } + + # In Chromium code, we define __STDC_foo_MACROS in order to get the + # C99 macros on Mac and Linux. +@@ -1995,24 +1879,6 @@ config("chromium_code") { + "__STDC_FORMAT_MACROS", + ] + +- if (!is_debug && !using_sanitizer && current_cpu != "s390x" && +- current_cpu != "s390" && current_cpu != "ppc64" && +- current_cpu != "mips" && current_cpu != "mips64" && +- current_cpu != "riscv64" && current_cpu != "loong64") { +- # Non-chromium code is not guaranteed to compile cleanly with +- # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are +- # disabled, so only do that for Release build. +- fortify_level = "2" +- +- # ChromeOS's toolchain supports a high-quality _FORTIFY_SOURCE=3 +- # implementation with a few custom glibc patches. Use that if it's +- # available. +- if (is_chromeos_device && !lacros_use_chromium_toolchain) { +- fortify_level = "3" +- } +- defines += [ "_FORTIFY_SOURCE=" + fortify_level ] +- } +- + if (is_apple) { + cflags_objc = [ "-Wimplicit-retain-self" ] + cflags_objcc = [ "-Wimplicit-retain-self" ] +@@ -2442,7 +2325,8 @@ config("default_stack_frames") { + # [0]: https://pinpoint-dot-chromeperf.appspot.com/job/147634a8be0000 + # [1]: https://pinpoint-dot-chromeperf.appspot.com/job/132bc772be0000 + # [2]: https://crrev.com/c/5447532 +-config("optimize") { ++config("optimize") { } ++config("xoptimize") { + if (is_win) { + # clang-cl's /O2 corresponds to clang's -O3, and really want -O2 for + # consistency with the other platforms. +@@ -2450,7 +2317,8 @@ config("optimize") { + } + + # Turn off optimizations. +-config("no_optimize") { ++config("no_optimize") { } ++config("xno_optimize") { + if (is_win) { + cflags = [ + "/Od", # Disable optimization. +@@ -2490,7 +2358,8 @@ config("no_optimize") { + # Turns up the optimization level. Used to explicitly enable -O2 instead of + # -Os for select targets on platforms that use optimize_for_size. No-op + # elsewhere. +-config("optimize_max") { ++config("optimize_max") { } ++config("xoptimize_max") { + if (is_nacl && is_nacl_irt) { + # The NaCl IRT is a special case and always wants its own config. + # Various components do: +@@ -2523,7 +2392,8 @@ config("optimize_max") { + # + # TODO(crbug.com/41259697) - rework how all of these configs are related + # so that we don't need this disclaimer. +-config("optimize_speed") { ++config("optimize_speed") { } ++config("xoptimize_speed") { + if (is_nacl && is_nacl_irt) { + # The NaCl IRT is a special case and always wants its own config. + # Various components do: +@@ -2552,7 +2422,8 @@ config("optimize_speed") { + } + } + +-config("optimize_fuzzing") { ++config("optimize_fuzzing") { } ++config("xoptimize_fuzzing") { + cflags = [ "-O1" ] + common_optimize_on_cflags + rustflags = [ "-Copt-level=1" ] + ldflags = common_optimize_on_ldflags +@@ -2685,7 +2556,8 @@ config("win_pdbaltpath") { + } + + # Full symbols. +-config("symbols") { ++config("symbols") { } ++config("xsymbols") { + rustflags = [] + configs = [] + if (is_win) { +@@ -2835,7 +2707,8 @@ config("symbols") { + # Minimal symbols. + # This config guarantees to hold symbol for stack trace which are shown to user + # when crash happens in unittests running on buildbot. +-config("minimal_symbols") { ++config("minimal_symbols") { } ++config("xminimal_symbols") { + rustflags = [] + if (is_win) { + # Functions, files, and line tables only. +@@ -2920,7 +2793,8 @@ config("minimal_symbols") { + # This configuration contains function names only. That is, the compiler is + # told to not generate debug information and the linker then just puts function + # names in the final debug information. +-config("no_symbols") { ++config("no_symbols") { } ++config("xno_symbols") { + if (is_win) { + ldflags = [ "/DEBUG" ] + diff --git a/chromium-125-disable-FFmpegAllowLists.patch b/chromium-125-disable-FFmpegAllowLists.patch new file mode 100644 index 0000000..0b90f9f --- /dev/null +++ b/chromium-125-disable-FFmpegAllowLists.patch @@ -0,0 +1,12 @@ +diff -up chromium-122.0.6261.29/media/base/media_switches.cc.disable-FFmpegAllowLists chromium-122.0.6261.29/media/base/media_switches.cc +--- chromium-122.0.6261.29/media/base/media_switches.cc.disable-FFmpegAllowLists 2024-02-12 15:56:50.703196471 +0100 ++++ chromium-122.0.6261.29/media/base/media_switches.cc 2024-02-12 17:08:42.266076401 +0100 +@@ -1753,7 +1753,7 @@ + // Enables FFmpeg allow lists for supported codecs / containers. + BASE_FEATURE(kFFmpegAllowLists, + "FFmpegAllowLists", +- base::FEATURE_ENABLED_BY_DEFAULT); ++ base::FEATURE_DISABLED_BY_DEFAULT); + + #if BUILDFLAG(IS_WIN) + // Enables audio offload when supported by endpoints. diff --git a/chromium-125-ffmpeg-5.x-reordered_opaque.patch b/chromium-125-ffmpeg-5.x-reordered_opaque.patch new file mode 100644 index 0000000..846bcaf --- /dev/null +++ b/chromium-125-ffmpeg-5.x-reordered_opaque.patch @@ -0,0 +1,105 @@ +commit 62274859104bd828373ae406aa9309e610449ac5 +Author: Ted Meyer +Date: Fri Mar 22 19:56:55 2024 +0000 + + Replace deprecated use of AVCodecContext::reordered_opaque + + We can use the AV_CODEC_FLAG_COPY_OPAQUE flag on the codec context + now to trigger timestamp propagation. + + Bug: 330573128 + Change-Id: I6bc57241a35ab5283742aad8d42acb4dc5e85858 + Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5384308 + Commit-Queue: Ted (Chromium) Meyer + Reviewed-by: Dan Sanders + Cr-Commit-Position: refs/heads/main@{#1277051} + +diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc +index bd75477feeabb..8a658a58caac5 100644 +--- a/media/filters/ffmpeg_video_decoder.cc ++++ b/media/filters/ffmpeg_video_decoder.cc +@@ -134,7 +134,7 @@ bool FFmpegVideoDecoder::IsCodecSupported(VideoCodec codec) { + } + + FFmpegVideoDecoder::FFmpegVideoDecoder(MediaLog* media_log) +- : media_log_(media_log) { ++ : media_log_(media_log), timestamp_map_(128) { + DVLOG(1) << __func__; + DETACH_FROM_SEQUENCE(sequence_checker_); + } +@@ -363,8 +363,10 @@ bool FFmpegVideoDecoder::FFmpegDecode(const DecoderBuffer& buffer) { + DCHECK(packet->data); + DCHECK_GT(packet->size, 0); + +- // Let FFmpeg handle presentation timestamp reordering. +- codec_context_->reordered_opaque = buffer.timestamp().InMicroseconds(); ++ const int64_t timestamp = buffer.timestamp().InMicroseconds(); ++ const TimestampId timestamp_id = timestamp_id_generator_.GenerateNextId(); ++ timestamp_map_.Put(std::make_pair(timestamp_id, timestamp)); ++ packet->opaque = reinterpret_cast(timestamp_id.GetUnsafeValue()); + } + FFmpegDecodingLoop::DecodeStatus decode_status = decoding_loop_->DecodePacket( + packet, base::BindRepeating(&FFmpegVideoDecoder::OnNewFrame, +@@ -423,7 +425,12 @@ bool FFmpegVideoDecoder::OnNewFrame(AVFrame* frame) { + } + gfx::Size natural_size = aspect_ratio.GetNaturalSize(visible_rect); + +- const auto pts = base::Microseconds(frame->reordered_opaque); ++ const auto ts_id = TimestampId(reinterpret_cast(frame->opaque)); ++ const auto ts_lookup = timestamp_map_.Get(ts_id); ++ if (ts_lookup == timestamp_map_.end()) { ++ return false; ++ } ++ const auto pts = base::Microseconds(std::get<1>(*ts_lookup)); + auto video_frame = VideoFrame::WrapExternalDataWithLayout( + opaque->layout, visible_rect, natural_size, opaque->data, opaque->size, + pts); +@@ -498,8 +505,10 @@ bool FFmpegVideoDecoder::ConfigureDecoder(const VideoDecoderConfig& config, + codec_context_->thread_count = GetFFmpegVideoDecoderThreadCount(config); + codec_context_->thread_type = + FF_THREAD_SLICE | (low_delay ? 0 : FF_THREAD_FRAME); ++ + codec_context_->opaque = this; + codec_context_->get_buffer2 = GetVideoBufferImpl; ++ codec_context_->flags |= AV_CODEC_FLAG_COPY_OPAQUE; + + if (base::FeatureList::IsEnabled(kFFmpegAllowLists)) { + // Note: FFmpeg will try to free this string, so we must duplicate it. +diff --git a/media/filters/ffmpeg_video_decoder.h b/media/filters/ffmpeg_video_decoder.h +index d02cb89c3ddf7..0a2de1c623fff 100644 +--- a/media/filters/ffmpeg_video_decoder.h ++++ b/media/filters/ffmpeg_video_decoder.h +@@ -7,10 +7,12 @@ + + #include + ++#include "base/containers/lru_cache.h" + #include "base/functional/callback.h" + #include "base/memory/raw_ptr.h" + #include "base/memory/scoped_refptr.h" + #include "base/sequence_checker.h" ++#include "base/types/id_type.h" + #include "media/base/frame_buffer_pool.h" + #include "media/base/supported_video_decoder_config.h" + #include "media/base/video_decoder.h" +@@ -87,6 +89,20 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder { + // FFmpeg structures owned by this object. + std::unique_ptr codec_context_; + ++ // The gist here is that timestamps need to be 64 bits to store microsecond ++ // precision. A 32 bit integer would overflow at ~35 minutes at this level of ++ // precision. We can't cast the timestamp to the void ptr object used by the ++ // opaque field in ffmpeg then, because it would lose data on a 32 bit build. ++ // However, we don't actually have 2^31 timestamped frames in a single ++ // playback, so it's fine to use the 32 bit value as a key in a map which ++ // contains the actual timestamps. Additionally, we've in the past set 128 ++ // outstanding frames for re-ordering as a limit for cross-thread decoding ++ // tasks, so we'll do that here too with the LRU cache. ++ using TimestampId = base::IdType; ++ ++ TimestampId::Generator timestamp_id_generator_; ++ base::LRUCache timestamp_map_; ++ + VideoDecoderConfig config_; + + scoped_refptr frame_pool_; diff --git a/chromium-125-lp155-typename.patch b/chromium-125-lp155-typename.patch new file mode 100644 index 0000000..5217295 --- /dev/null +++ b/chromium-125-lp155-typename.patch @@ -0,0 +1,310 @@ + +fixed error: missing 'typename' prior to dependent type name + +Index: chromium-123.0.6312.46/base/containers/map_util.h +=================================================================== +--- chromium-123.0.6312.46.orig/base/containers/map_util.h ++++ chromium-123.0.6312.46/base/containers/map_util.h +@@ -42,7 +42,7 @@ constexpr internal::MappedType* Fin + template >::element_type> ++ typename std::pointer_traits>::element_type> + constexpr const MappedElementType* FindPtrOrNull(const Map& map, + const Key& key) { + auto it = map.find(key); +@@ -60,7 +60,7 @@ + template >::element_type> ++ typename std::pointer_traits>::element_type> + constexpr MappedElementType* FindPtrOrNull(Map& map, const Key& key) { + auto it = map.find(key); + return it != map.end() ? base::to_address(it->second) : nullptr; +Index: chromium-123.0.6312.46/base/functional/bind_internal.h +=================================================================== +--- chromium-123.0.6312.46.orig/base/functional/bind_internal.h ++++ chromium-123.0.6312.46/base/functional/bind_internal.h +@@ -1497,11 +1497,11 @@ template + struct ParamCanBeBound { + private: +- using UnwrappedParam = BindArgument::template ForwardedAs< ++ using UnwrappedParam = typename BindArgument::template ForwardedAs< + Unwrapped>::template ToParamWithType; +- using ParamStorage = BindArgument::template ToParamWithType< ++ using ParamStorage = typename BindArgument::template ToParamWithType< + Param>::template StoredAs; +- using BoundStorage = ++ using BoundStorage = typename + BindArgument::template BoundAs::template StoredAs; + + template +-SortedItems::const_iterator GetLastIter(const SortedItems& cache) { ++typename SortedItems::const_iterator GetLastIter(const SortedItems& cache) { + CHECK(!cache.empty()); + auto it = cache.end(); + return std::prev(it); +@@ -1090,9 +1090,9 @@ bool DownloadBubbleUpdateService::CacheM + } + + template +-SortedItems::iterator ++typename SortedItems::iterator + DownloadBubbleUpdateService::CacheManager::RemoveItemFromCacheByIter( +- SortedItems::iterator iter, ++ typename SortedItems::iterator iter, + SortedItems& cache, + IterMap& iter_map) { + CHECK(iter != cache.end()); +Index: chromium-123.0.6312.46/components/optimization_guide/core/tflite_model_executor.h +=================================================================== +--- chromium-123.0.6312.46.orig/components/optimization_guide/core/tflite_model_executor.h ++++ chromium-123.0.6312.46/components/optimization_guide/core/tflite_model_executor.h +@@ -242,7 +242,7 @@ class TFLiteModelExecutor : public Model + void SendForBatchExecution( + BatchExecutionCallback callback_on_complete, + base::TimeTicks start_time, +- ModelExecutor::ConstRefInputVector inputs) ++ typename ModelExecutor::ConstRefInputVector inputs) + override { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +@@ -264,7 +264,7 @@ class TFLiteModelExecutor : public Model + // Starts the synchronous execution of the model. Returns model outputs. + // Model needs to be loaded. Synchronous calls do not load or unload model. + std::vector> SendForBatchExecutionSync( +- ModelExecutor::ConstRefInputVector inputs) ++ typename ModelExecutor::ConstRefInputVector inputs) + override { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +@@ -422,7 +422,7 @@ class TFLiteModelExecutor : public Model + // executes it on the model execution thread. + void LoadModelFileAndBatchExecute( + BatchExecutionCallback callback_on_complete, +- ModelExecutor::ConstRefInputVector inputs) { ++ typename ModelExecutor::ConstRefInputVector inputs) { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + +@@ -439,7 +439,7 @@ class TFLiteModelExecutor : public Model + + // Batch executes the loaded model for inputs. + void BatchExecuteLoadedModel( +- ModelExecutor::ConstRefInputVector inputs, ++ typename ModelExecutor::ConstRefInputVector inputs, + std::vector>* outputs) { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +@@ -499,7 +499,7 @@ class TFLiteModelExecutor : public Model + // Unloads the model if needed. + void BatchExecuteLoadedModelAndRunCallback( + BatchExecutionCallback callback_on_complete, +- ModelExecutor::ConstRefInputVector inputs, ++ typename ModelExecutor::ConstRefInputVector inputs, + ExecutionStatus execution_status) { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +Index: chromium-123.0.6312.46/mojo/public/cpp/bindings/array_traits.h +=================================================================== +--- chromium-123.0.6312.46.orig/mojo/public/cpp/bindings/array_traits.h ++++ chromium-123.0.6312.46/mojo/public/cpp/bindings/array_traits.h +@@ -90,7 +90,7 @@ template + { c[i] } -> std::same_as; + } + struct ArrayTraits { +- using Element = Container::value_type; ++ using Element = typename Container::value_type; + + // vector-like containers have no built-in null. + static bool IsNull(const Container& c) { return false; } +Index: chromium-123.0.6312.46/third_party/blink/renderer/bindings/core/v8/async_iterable.h +=================================================================== +--- chromium-123.0.6312.46.orig/third_party/blink/renderer/bindings/core/v8/async_iterable.h ++++ chromium-123.0.6312.46/third_party/blink/renderer/bindings/core/v8/async_iterable.h +@@ -245,7 +245,7 @@ + private: + virtual IterationSource* CreateIterationSource( + ScriptState* script_state, +- IterationSource::Kind kind, ++ typename IterationSource::Kind kind, + InitArgs... args, + ExceptionState& exception_state) = 0; + }; +@@ -291,7 +291,7 @@ + private: + virtual IterationSource* CreateIterationSource( + ScriptState* script_state, +- IterationSource::Kind kind, ++ typename IterationSource::Kind kind, + InitArgs... args, + ExceptionState& exception_state) = 0; + }; +Index: chromium-123.0.6312.46/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc +=================================================================== +--- chromium-123.0.6312.46.orig/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc ++++ chromium-123.0.6312.46/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc +@@ -210,7 +210,7 @@ class HTMLFastPathParser { + using Span = base::span; + using USpan = base::span; + // 32 matches that used by HTMLToken::Attribute. +- typedef std::conditional, ++ typedef typename std::conditional, + UCharLiteralBuffer<32>, + LCharLiteralBuffer<32>>::type LiteralBufferType; + static_assert(std::is_same_v || std::is_same_v); +Index: chromium-123.0.6312.46/base/functional/function_ref.h +=================================================================== +--- chromium-123.0.6312.46.orig/base/functional/function_ref.h ++++ chromium-123.0.6312.46/base/functional/function_ref.h +@@ -64,7 +64,7 @@ class FunctionRef; + template + class FunctionRef { + template ::RunType> ++ typename RunType = typename internal::FunctorTraits::RunType> + static constexpr bool kCompatibleFunctor = + std::convertible_to, R> && + std::same_as, internal::TypeList>; +Index: chromium-123.0.6312.46/base/containers/heap_array.h +=================================================================== +--- chromium-123.0.6312.46.orig/base/containers/heap_array.h ++++ chromium-123.0.6312.46/base/containers/heap_array.h +@@ -32,8 +32,8 @@ + static_assert(!std::is_reference_v, + "HeapArray cannot hold reference types"); + +- using iterator = base::span::iterator; +- using const_iterator = base::span::iterator; ++ using iterator = typename base::span::iterator; ++ using const_iterator = typename base::span::iterator; + // We don't put this default value in the template parameter list to allow the + // static_assert on is_reference_v to give a nicer error message. + using deleter_type = std:: +Index: chromium-123.0.6312.46/mojo/public/cpp/bindings/type_converter.h +=================================================================== +--- chromium-123.0.6312.46.orig/mojo/public/cpp/bindings/type_converter.h ++++ chromium-123.0.6312.46/mojo/public/cpp/bindings/type_converter.h +@@ -127,7 +127,7 @@ using VecValueType = typename Vec::value + + template + using VecPtrLikeUnderlyingValueType = +- std::pointer_traits>::element_type; ++ typename std::pointer_traits>::element_type; + + } // namespace internal + +Index: chromium-123.0.6312.46/third_party/blink/renderer/platform/wtf/hash_table.h +=================================================================== +--- chromium-123.0.6312.46.orig/third_party/blink/renderer/platform/wtf/hash_table.h ++++ chromium-123.0.6312.46/third_party/blink/renderer/platform/wtf/hash_table.h +@@ -2004,7 +2004,7 @@ struct HashTableConstIteratorAdapter { + static_assert(!IsTraceable::value); + + using iterator_category = std::bidirectional_iterator_tag; +- using value_type = HashTableType::ValueType; ++ using value_type = typename HashTableType::ValueType; + using difference_type = ptrdiff_t; + using pointer = value_type*; + using reference = value_type&; +@@ -2056,7 +2056,7 @@ struct HashTableConstIteratorAdapter< + + public: + using iterator_category = std::bidirectional_iterator_tag; +- using value_type = HashTableType::ValueType; ++ using value_type = typename HashTableType::ValueType; + using difference_type = ptrdiff_t; + using pointer = value_type*; + using reference = value_type&; +@@ -2110,7 +2110,7 @@ struct HashTableIteratorAdapter { + static_assert(!IsTraceable::value); + + using iterator_category = std::bidirectional_iterator_tag; +- using value_type = HashTableType::ValueType; ++ using value_type = typename HashTableType::ValueType; + using difference_type = ptrdiff_t; + using pointer = value_type*; + using reference = value_type&; +@@ -2158,7 +2158,7 @@ struct HashTableIteratorAdapter< + + public: + using iterator_category = std::bidirectional_iterator_tag; +- using value_type = HashTableType::ValueType; ++ using value_type = typename HashTableType::ValueType; + using difference_type = ptrdiff_t; + using pointer = value_type*; + using reference = value_type&; +Index: chromium-123.0.6312.46/base/types/fixed_array.h +=================================================================== +--- chromium-123.0.6312.46.orig/base/types/fixed_array.h ++++ chromium-123.0.6312.46/base/types/fixed_array.h +@@ -27,8 +27,8 @@ template { + public: + using absl::FixedArray::FixedArray; +- explicit FixedArray(absl::FixedArray::size_type n, +- const absl::FixedArray::allocator_type& a = ++ explicit FixedArray(typename absl::FixedArray::size_type n, ++ const typename absl::FixedArray::allocator_type& a = + typename absl::FixedArray::allocator_type()) + : FixedArray(n, T(), a) {} + }; +Index: chromium-123.0.6312.46/chrome/browser/web_applications/commands/internal/command_internal.h +=================================================================== +--- chromium-123.0.6312.46.orig/chrome/browser/web_applications/commands/internal/command_internal.h ++++ chromium-123.0.6312.46/chrome/browser/web_applications/commands/internal/command_internal.h +@@ -121,7 +121,7 @@ class CommandBase { + template + class CommandWithLock : public CommandBase { + public: +- using LockDescription = LockType::LockDescription; ++ using LockDescription = typename LockType::LockDescription; + explicit CommandWithLock(const std::string& name, + LockDescription initial_lock_request); + +Index: chromium-123.0.6312.46/chrome/browser/web_applications/commands/web_app_command.h +=================================================================== +--- chromium-123.0.6312.46.orig/chrome/browser/web_applications/commands/web_app_command.h ++++ chromium-123.0.6312.46/chrome/browser/web_applications/commands/web_app_command.h +@@ -106,7 +106,7 @@ class WebAppLockManager; + template + class WebAppCommand : public internal::CommandWithLock { + public: +- using LockDescription = LockType::LockDescription; ++ using LockDescription = typename LockType::LockDescription; + using CallbackType = base::OnceCallback; + using ShutdownArgumentsTuple = std::tuple...>; + +Index: chromium-123.0.6312.46/chrome/browser/web_applications/web_app_command_scheduler.h +=================================================================== +--- chromium-123.0.6312.46.orig/chrome/browser/web_applications/web_app_command_scheduler.h ++++ chromium-123.0.6312.46/chrome/browser/web_applications/web_app_command_scheduler.h +@@ -363,7 +363,7 @@ class WebAppCommandScheduler { + // command system. + template + void ScheduleCallback(const std::string& operation_name, +- LockType::LockDescription lock_description, ++ typename LockType::LockDescription lock_description, + CallbackCommand callback, + base::OnceClosure on_complete, + const base::Location& location = FROM_HERE) { +@@ -381,7 +381,7 @@ class WebAppCommandScheduler { + typename CallbackReturnValue = std::decay_t> + void ScheduleCallbackWithResult( + const std::string& operation_name, +- LockType::LockDescription lock_description, ++ typename LockType::LockDescription lock_description, + CallbackCommand callback, + base::OnceCallback on_complete, + CallbackReturnValue arg_for_shutdown, diff --git a/chromium-126-quiche-interator.patch b/chromium-126-quiche-interator.patch new file mode 100644 index 0000000..60a9e98 --- /dev/null +++ b/chromium-126-quiche-interator.patch @@ -0,0 +1,12 @@ +diff -up chromium-126.0.6478.26/net/third_party/quiche/src/quiche/quic/core/quic_interval_deque.h.me chromium-126.0.6478.26/net/third_party/quiche/src/quiche/quic/core/quic_interval_deque.h +--- chromium-126.0.6478.26/net/third_party/quiche/src/quiche/quic/core/quic_interval_deque.h.me 2024-06-03 15:01:54.724207324 +0200 ++++ chromium-126.0.6478.26/net/third_party/quiche/src/quiche/quic/core/quic_interval_deque.h 2024-06-03 14:58:16.244189794 +0200 +@@ -144,7 +144,7 @@ class QUICHE_NO_EXPORT QuicIntervalDeque + // for efficient std::lower_bound() calls. + class QUICHE_NO_EXPORT Iterator { + public: +- using iterator_category = std::random_access_iterator_tag; ++ using iterator_category = std::forward_iterator_tag; + using value_type = T; + using difference_type = std::ptrdiff_t; + using pointer = T*; diff --git a/chromium-127-bindgen.patch b/chromium-127-bindgen.patch new file mode 100644 index 0000000..3d732fb --- /dev/null +++ b/chromium-127-bindgen.patch @@ -0,0 +1,110 @@ +author: Andres Salomon +description: fix bindgen-related stuff + +Two separate but related fixes: + +Crabbyav1f is calling bindgen features which are not currently in +bookworm or sid; --allowlist-item was added in bindgen 0.68. As far +as I can tell the build.rs stuff calls allowlist_item from there as +well, so these arguments may just be redundant? Hopefully I'm not +breaking stuff.. Drop this for sid once bindgen gets upgraded. + + +Also, the call to bindgen sets the path for libclang to +rust_bindgen_root, which is wrong. We're already passing +clang_base_path with the path to libclang, there's no reason that +we'd expect libclang to be in the same directory as bindgen. That +fix should probably go upstream. + + +--- a/third_party/crabbyavif/BUILD.gn ++++ b/third_party/crabbyavif/BUILD.gn +@@ -12,15 +12,6 @@ rust_bindgen("crabbyavif_dav1d_bindings" + bindgen_flags = [ + "no-doc-comments", + "generate=functions,types,vars,methods,constructors,destructors", +- "allowlist-item=dav1d_close", +- "allowlist-item=dav1d_data_unref", +- "allowlist-item=dav1d_data_wrap", +- "allowlist-item=dav1d_default_settings", +- "allowlist-item=dav1d_error", +- "allowlist-item=dav1d_get_picture", +- "allowlist-item=dav1d_open", +- "allowlist-item=dav1d_picture_unref", +- "allowlist-item=dav1d_send_data", + ] + } + +@@ -39,61 +39,6 @@ + bindgen_flags = [ + "no-doc-comments", + "generate=functions,types,vars,methods,constructors,destructors", +- "allowlist-item=AR30ToAB30", +- "allowlist-item=ARGBAttenuate", +- "allowlist-item=ARGBUnattenuate", +- "allowlist-item=Convert16To8Plane", +- "allowlist-item=FilterMode", +- "allowlist-item=FilterMode_kFilterBilinear", +- "allowlist-item=FilterMode_kFilterBox", +- "allowlist-item=FilterMode_kFilterNone", +- "allowlist-item=HalfFloatPlane", +- "allowlist-item=I010AlphaToARGBMatrix", +- "allowlist-item=I010AlphaToARGBMatrixFilter", +- "allowlist-item=I010ToARGBMatrix", +- "allowlist-item=I010ToARGBMatrixFilter", +- "allowlist-item=I012ToARGBMatrix", +- "allowlist-item=I210AlphaToARGBMatrix", +- "allowlist-item=I210AlphaToARGBMatrixFilter", +- "allowlist-item=I210ToARGBMatrix", +- "allowlist-item=I210ToARGBMatrixFilter", +- "allowlist-item=I400ToARGBMatrix", +- "allowlist-item=I410AlphaToARGBMatrix", +- "allowlist-item=I410ToARGBMatrix", +- "allowlist-item=I420AlphaToARGBMatrix", +- "allowlist-item=I420AlphaToARGBMatrixFilter", +- "allowlist-item=I420ToARGBMatrix", +- "allowlist-item=I420ToARGBMatrixFilter", +- "allowlist-item=I420ToRGB24Matrix", +- "allowlist-item=I420ToRGB24MatrixFilter", +- "allowlist-item=I420ToRGB565Matrix", +- "allowlist-item=I420ToRGBAMatrix", +- "allowlist-item=I422AlphaToARGBMatrix", +- "allowlist-item=I422AlphaToARGBMatrixFilter", +- "allowlist-item=I422ToARGBMatrix", +- "allowlist-item=I422ToARGBMatrixFilter", +- "allowlist-item=I422ToRGB24MatrixFilter", +- "allowlist-item=I422ToRGB565Matrix", +- "allowlist-item=I422ToRGBAMatrix", +- "allowlist-item=I444AlphaToARGBMatrix", +- "allowlist-item=I444ToARGBMatrix", +- "allowlist-item=I444ToRGB24Matrix", +- "allowlist-item=P010ToAR30Matrix", +- "allowlist-item=ScalePlane", +- "allowlist-item=ScalePlane_12", +- "allowlist-item=YuvConstants", +- "allowlist-item=kYuv2020Constants", +- "allowlist-item=kYuvF709Constants", +- "allowlist-item=kYuvH709Constants", +- "allowlist-item=kYuvI601Constants", +- "allowlist-item=kYuvJPEGConstants", +- "allowlist-item=kYuvV2020Constants", +- "allowlist-item=kYvu2020Constants", +- "allowlist-item=kYvuF709Constants", +- "allowlist-item=kYvuH709Constants", +- "allowlist-item=kYvuI601Constants", +- "allowlist-item=kYvuJPEGConstants", +- "allowlist-item=kYvuV2020Constants", + ] + } + +--- a/build/rust/rust_bindgen.gni ++++ b/build/rust/rust_bindgen.gni +@@ -18,7 +18,7 @@ if (host_os == "win") { + + # On Windows, the libclang.dll is beside the bindgen.exe, otherwise it is in + # ../lib. +-_libclang_path = rust_bindgen_root ++_libclang_path = clang_base_path + if (host_os == "win") { + _libclang_path += "/bin" + } else { diff --git a/chromium-127-clang17-traitors.patch b/chromium-127-clang17-traitors.patch new file mode 100644 index 0000000..f736fc7 --- /dev/null +++ b/chromium-127-clang17-traitors.patch @@ -0,0 +1,285 @@ +author: Andres Salomon + +Work around the following: + +In file included from ../../mojo/public/cpp/bindings/lib/native_s:32 +truct_serialization.cc:5: +In file included from ../../mojo/public/cpp/bindings/lib/native_struct_serialization.h:13: +In file included from ../../base/check_op.h:9: +In file included from /usr/bin/../include/c++/v1/string:545: +In file included from /usr/bin/../include/c++/v1/__functional/hash.h:24: +In file included from /usr/bin/../include/c++/v1/__utility/pair.h:16: +In file included from /usr/bin/../include/c++/v1/__fwd/get.h:16: +In file included from /usr/bin/../include/c++/v1/__fwd/subrange.h:20: +In file included from /usr/bin/../include/c++/v1/__iterator/concepts.h:34: +/usr/bin/../include/c++/v1/__memory/pointer_traits.h:118:22: error: implicit instantiation of undefined template 'std::__pointer_traits_element_type' + typedef typename __pointer_traits_element_type::type element_type; + ^ +../../base/types/to_address.h:32:40: note: in instantiation of template class 'std::pointer_traits' requested here + requires requires(const P& p) { std::pointer_traits

::to_address(p); } || + ^ +../../base/types/to_address.h:32:35: note: in instantiation of requirement here +../../mojo/public/cpp/bindings/lib/native_struct_serialization.cc requires requires(const P& p) { std::pointer_traits

::to_address(p); } || + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +../../base/types/to_address.h:32:12: note: while substituting template arguments into constraint expression here + requires requires(const P& p) { std::pointer_traits

::to_address(p); } || + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +../../mojo/public/cpp/bindings/type_converter.h:103:26: note: while checking constraint satisfaction for template 'to_address' required here + { mojo::ConvertTo(base::to_address(obj)) } -> std::same_as; + ^~~~ + + +This turns out to be a clang-16 bug, fixed in clang-18: +https://github.com/llvm/llvm-project/issues/67449 + +This is just the pointer_traits.h header from libc++-18-dev, +with a minor tweak to get things building. + +--- /dev/null ++++ b/__memory/pointer_traits.h +@@ -0,0 +1,245 @@ ++// -*- C++ -*- ++//===----------------------------------------------------------------------===// ++// ++// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. ++// See https://llvm.org/LICENSE.txt for license information. ++// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception ++// ++//===----------------------------------------------------------------------===// ++ ++#ifndef _LIBCPP___MEMORY_POINTER_TRAITS_H ++#define _LIBCPP___MEMORY_POINTER_TRAITS_H ++ ++#include <__config> ++#include <__memory/addressof.h> ++#include <__type_traits/conditional.h> ++#include <__type_traits/conjunction.h> ++#include <__type_traits/decay.h> ++#include <__type_traits/is_class.h> ++#include <__type_traits/is_function.h> ++#include <__type_traits/is_void.h> ++#include <__type_traits/void_t.h> ++#include <__utility/declval.h> ++#include ++ ++#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) ++# pragma GCC system_header ++#endif ++ ++_LIBCPP_BEGIN_NAMESPACE_STD ++ ++template ++struct __has_element_type : false_type {}; ++ ++template ++struct __has_element_type<_Tp, __void_t > : true_type {}; ++ ++template ::value> ++struct __pointer_traits_element_type {}; ++ ++template ++struct __pointer_traits_element_type<_Ptr, true> { ++ typedef _LIBCPP_NODEBUG typename _Ptr::element_type type; ++}; ++ ++template