diff options
Diffstat (limited to 'www/qt6-webengine')
728 files changed, 14624 insertions, 2814 deletions
diff --git a/www/qt6-webengine/Makefile b/www/qt6-webengine/Makefile index e78bd490a6a5..b6f2d157f127 100644 --- a/www/qt6-webengine/Makefile +++ b/www/qt6-webengine/Makefile @@ -101,10 +101,11 @@ DO_MAKE_BUILD= ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} -j1 $ BINARY_ALIAS= python3=${PYTHON_CMD} .if !defined(BUILD_QTPDF) -OPTIONS_DEFINE= CUPS -OPTIONS_DEFAULT= ALSA CUPS +OPTIONS_DEFINE= CUPS DRIVER +OPTIONS_DEFAULT= ALSA CUPS DRIVER OPTIONS_SINGLE= AUDIO OPTIONS_SINGLE_AUDIO= ALSA PULSEAUDIO SNDIO +OPTIONS_SUB= yes AUDIO_DESC= Audio backend @@ -122,6 +123,10 @@ CUPS_LIB_DEPENDS= libcups.so:print/cups \ CUPS_CMAKE_ON= -DQT_FEATURE_webengine_printing_and_pdf:BOOL=ON CUPS_CMAKE_OFF= -DQT_FEATURE_webengine_printing_and_pdf:BOOL=OFF +DRIVER_DESC= Install WebEngineDriver +DRIVER_CMAKE_ON= -DQT_FEATURE_webenginedriver:BOOL=ON +DRIVER_CMAKE_OFF= -DQT_FEATURE_webenginedriver:BOOL=OFF + PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio PULSEAUDIO_CMAKE_ON= -DQT_FEATURE_webengine_system_pulseaudio:BOOL=ON PULSEAUDIO_CMAKE_OFF= -DQT_FEATURE_webengine_system_pulseaudio:BOOL=OFF @@ -165,4 +170,15 @@ pre-configure: ./build/linux/unbundle/replace_gn_files.py --system-libraries \ ${SYS_LIBS} || ${FALSE} +.if !defined(BUILD_QTPDF) +post-install: +# Fix for deskutils/calibre, perhaps others, where this empty directory +# is created during build causing a fs-violation. + ${MKDIR} ${STAGEDIR}${QT_DATADIR}/resources/locales + +post-install-DRIVER-on: + ${STRIP_CMD} ${STAGEDIR}${QT_TOOLDIR}/webenginedriver + +.endif + .include <bsd.port.post.mk> diff --git a/www/qt6-webengine/distinfo b/www/qt6-webengine/distinfo index f963466e7f5c..a6a5a71622f1 100644 --- a/www/qt6-webengine/distinfo +++ b/www/qt6-webengine/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1711664649 -SHA256 (KDE/Qt/6.6.3/qtwebengine-everywhere-src-6.6.3.tar.xz) = 7c2bdc83b21b82a179a7bf098df47ebf66ba7693d67ebda55a4a28d9eadad804 -SIZE (KDE/Qt/6.6.3/qtwebengine-everywhere-src-6.6.3.tar.xz) = 421076320 +TIMESTAMP = 1712115499 +SHA256 (KDE/Qt/6.7.0/qtwebengine-everywhere-src-6.7.0.tar.xz) = 1a5ba443635dc1f439ab802ac6d761b8def5ebb24e5219bb7289288e72c147de +SIZE (KDE/Qt/6.7.0/qtwebengine-everywhere-src-6.7.0.tar.xz) = 550907592 diff --git a/www/qt6-webengine/files/patch-cmake_Functions.cmake b/www/qt6-webengine/files/patch-cmake_Functions.cmake index 7dcc0eee40f7..e4c938996ef3 100644 --- a/www/qt6-webengine/files/patch-cmake_Functions.cmake +++ b/www/qt6-webengine/files/patch-cmake_Functions.cmake @@ -1,4 +1,4 @@ ---- cmake/Functions.cmake.orig 2024-02-10 00:23:21 UTC +--- cmake/Functions.cmake.orig 2024-02-10 00:27:53 UTC +++ cmake/Functions.cmake @@ -416,7 +416,7 @@ function(add_linker_options target buildDir completeSt set(libs_rsp "${buildDir}/${ninjaTarget}_libs.rsp") @@ -9,7 +9,7 @@ get_gn_arch(cpu ${TEST_architecture_arch}) if(CMAKE_CROSSCOMPILING AND cpu STREQUAL "arm" AND ${config} STREQUAL "Debug") target_link_options(${cmakeTarget} PRIVATE "LINKER:--long-plt") -@@ -673,6 +673,8 @@ function(get_gn_os result) +@@ -675,6 +675,8 @@ function(get_gn_os result) set(${result} "mac" PARENT_SCOPE) elseif(IOS) set(${result} "ios" PARENT_SCOPE) @@ -18,7 +18,7 @@ else() message(DEBUG "Unrecognized OS") endif() -@@ -865,7 +867,7 @@ macro(append_build_type_setup) +@@ -878,7 +880,7 @@ macro(append_build_type_setup) extend_gn_list(gnArgArg ARGS enable_precompiled_headers @@ -27,7 +27,7 @@ ) extend_gn_list(gnArgArg ARGS dcheck_always_on -@@ -917,7 +919,7 @@ macro(append_compiler_linker_sdk_setup) +@@ -932,7 +934,7 @@ macro(append_compiler_linker_sdk_setup) use_libcxx=true ) endif() @@ -36,7 +36,7 @@ extend_gn_list(gnArgArg ARGS use_libcxx CONDITION QT_FEATURE_stdlib_libcpp ) -@@ -955,7 +957,7 @@ macro(append_compiler_linker_sdk_setup) +@@ -970,7 +972,7 @@ macro(append_compiler_linker_sdk_setup) ) endif() get_gn_arch(cpu ${TEST_architecture_arch}) @@ -45,7 +45,7 @@ extend_gn_list_cflag(gnArgArg ARG arm_tune -@@ -1040,7 +1042,7 @@ macro(append_toolchain_setup) +@@ -1060,7 +1062,7 @@ macro(append_toolchain_setup) host_cpu="${cpu}" ) endif() @@ -54,16 +54,7 @@ get_gn_arch(cpu ${TEST_architecture_arch}) list(APPEND gnArgArg custom_toolchain="${buildDir}/target_toolchain:target" -@@ -1073,7 +1075,7 @@ macro(append_pkg_config_setup) - - - macro(append_pkg_config_setup) -- if(LINUX) -+ if(LINUX OR FREEBSD) - list(APPEND gnArgArg - pkg_config="${PKG_CONFIG_EXECUTABLE}" - host_pkg_config="${PKG_CONFIG_HOST_EXECUTABLE}" -@@ -1166,6 +1168,20 @@ function(add_gn_build_artifacts_to_target) +@@ -1198,6 +1200,20 @@ function(add_gn_build_artifacts_to_target) set_target_properties(${arg_CMAKE_TARGET} PROPERTIES LINK_DEPENDS ${arg_BUILDDIR}/${config}/${arch}/${arg_NINJA_STAMP} ) @@ -84,7 +75,7 @@ if(QT_IS_MACOS_UNIVERSAL) add_intermediate_archive(${target} ${arg_BUILDDIR}/${config}/${arch} ${arg_COMPLETE_STATIC}) elseif(IOS) -@@ -1283,7 +1299,7 @@ function(check_for_ulimit) +@@ -1313,7 +1329,7 @@ function(check_for_ulimit) function(check_for_ulimit) message("-- Checking 'ulimit -n'") @@ -93,7 +84,7 @@ OUTPUT_VARIABLE ulimitOutput ) string(REGEX MATCHALL "[0-9]+" limit "${ulimitOutput}") -@@ -1292,7 +1308,7 @@ function(check_for_ulimit) +@@ -1322,7 +1338,7 @@ function(check_for_ulimit) if(NOT ${CMAKE_VERSION} VERSION_LESS "3.21.0") message(" -- Creating linker launcher") file(GENERATE OUTPUT ${PROJECT_BINARY_DIR}/linker_ulimit.sh diff --git a/www/qt6-webengine/files/patch-configure.cmake b/www/qt6-webengine/files/patch-configure.cmake index ff2e426fbc47..7fdd8b60d800 100644 --- a/www/qt6-webengine/files/patch-configure.cmake +++ b/www/qt6-webengine/files/patch-configure.cmake @@ -1,6 +1,6 @@ ---- configure.cmake.orig 2024-02-10 00:23:21 UTC +--- configure.cmake.orig 2023-12-12 22:08:45 UTC +++ configure.cmake -@@ -67,7 +67,7 @@ endif() +@@ -68,7 +68,7 @@ endif() endif() #### Tests @@ -9,7 +9,7 @@ check_for_ulimit() endif() -@@ -427,7 +427,7 @@ qt_feature("webengine-ozone-x11" PRIVATE +@@ -428,7 +428,7 @@ qt_feature("webengine-ozone-x11" PRIVATE qt_feature("webengine-ozone-x11" PRIVATE LABEL "Support GLX on qpa-xcb" @@ -18,7 +18,7 @@ AND TARGET Qt::Gui AND QT_FEATURE_xcb AND X11_FOUND -@@ -464,12 +464,12 @@ add_check_for_support( +@@ -465,12 +465,12 @@ add_check_for_support( ) add_check_for_support( MODULES QtWebEngine @@ -28,9 +28,9 @@ ) add_check_for_support( MODULES QtPdf -- CONDITION LINUX OR (WIN32 AND NOT WIN_ARM_64) OR MACOS OR IOS OR (ANDROID AND NOT CMAKE_HOST_WIN32) -+ CONDITION LINUX OR (WIN32 AND NOT WIN_ARM_64) OR MACOS OR IOS OR (ANDROID AND NOT CMAKE_HOST_WIN32) OR FREEBSD - MESSAGE "Build can be done only on Linux, Windows, macO, iOS and Android(on non-Windows hosts only)." +- CONDITION LINUX OR (WIN32 AND NOT WIN_ARM_64) OR MACOS OR IOS OR ANDROID ++ CONDITION LINUX OR (WIN32 AND NOT WIN_ARM_64) OR MACOS OR IOS OR ANDROID OR FREEBSD + MESSAGE "Build can be done only on Linux, Windows, macO, iOS and Android." ) if(LINUX AND CMAKE_CROSSCOMPILING) @@ -492,13 +492,6 @@ add_check_for_support( diff --git a/www/qt6-webengine/files/patch-security-rollup b/www/qt6-webengine/files/patch-security-rollup index cc5eefd44e79..a3d1a6bc69d2 100644 --- a/www/qt6-webengine/files/patch-security-rollup +++ b/www/qt6-webengine/files/patch-security-rollup @@ -3,6 +3,34 @@ Add security patches to this file. Addresses the following security issues: - CVE-2023-7104 +- CVE-2024-2625 +- CVE-2024-2626 +- Security bug 40066823 +- Security bug 41495984 +- CVE-2024-2885 +- CVE-2024-2887 +- Security bug 329674887 +- Security bug 327183408 +- CVE-2024-3159 +- Security bug 326349405 +- CVE-2024-3157 +- CVE-2024-3516 +- Security bug 326521449 +- CVE-2024-3839 +- CVE-2024-3837 +- Security bug 327698060 +- Security bug 40940917 +- CVE-2024-3914 +- Security bug 326498393 +- CVE-2024-3840 +- Security bug 323898565 +- CVE-2024-4058 +- CVE-2024-4060 +- Security bug 332724843 +- CVE-2024-4331 +- CVE-2024-4368 +- CVE-2024-4671 +- Security bug 339458194 From b8c9622b71d032a48412e342cff91fc0f3f5e3d9 Mon Sep 17 00:00:00 2001 From: Michal Klocek <michal.klocek@qt.io> @@ -56,3 +84,6008 @@ index b353aa88348..a0feb5d200c 100644 } } } +From a907a6cbc18a04d791b0c97918a558d49f696cd4 Mon Sep 17 00:00:00 2001 +From: Shu-yu Guo <syg@chromium.org> +Date: Thu, 7 Mar 2024 14:55:28 -0800 +Subject: [PATCH] [Backport] CVE-2024-2625: Object lifecycle issue in V8 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Manual cherry-pick of patch originally reviewed on +https://chromium-review.googlesource.com/c/v8/v8/+/5350482: +Fix home object proxy to work off-thread + +Because the home object has special scope lookup rules due to class +heritage position, VariableProxies of the home object are currently +directly created on the correct scope during parsing. However, during +off-thread parsing the main thread is parked, and the correct scope +may try to dereference a main-thread Handle. + +This CL moves the logic into ResolveVariable instead, which happens +during postprocessing, with the main thread unparked. + +Fixed: chromium:327740539 +Change-Id: I3a123d5e37b6764067e58255dd5a67c07e648d02 +Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5350482 +Reviewed-by: Marja Hölttä <marja@chromium.org> +Commit-Queue: Marja Hölttä <marja@chromium.org> +Auto-Submit: Shu-yu Guo <syg@chromium.org> +Cr-Commit-Position: refs/heads/main@{#92722} +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/551089 +Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> +--- + chromium/v8/src/ast/ast.h | 10 +++- + chromium/v8/src/ast/scopes.cc | 78 ++++++++++++--------------- + chromium/v8/src/ast/scopes.h | 7 +-- + chromium/v8/src/parsing/parser-base.h | 4 +- + chromium/v8/src/parsing/parser.cc | 11 ++-- + chromium/v8/src/parsing/parser.h | 2 +- + chromium/v8/src/parsing/preparser.h | 3 +- + 7 files changed, 52 insertions(+), 63 deletions(-) + +diff --git a/chromium/v8/src/ast/ast.h b/chromium/v8/src/ast/ast.h +index cf9d52eeed6..7bb30723607 100644 +--- src/3rdparty/chromium/v8/src/ast/ast.h ++++ src/3rdparty/chromium/v8/src/ast/ast.h +@@ -1534,6 +1534,12 @@ class VariableProxy final : public Expression { + bit_field_ = IsRemovedFromUnresolvedField::update(bit_field_, true); + } + ++ bool is_home_object() const { return IsHomeObjectField::decode(bit_field_); } ++ ++ void set_is_home_object() { ++ bit_field_ = IsHomeObjectField::update(bit_field_, true); ++ } ++ + // Provides filtered access to the unresolved variable proxy threaded list. + struct UnresolvedNext { + static VariableProxy** filter(VariableProxy** t) { +@@ -1565,6 +1571,7 @@ class VariableProxy final : public Expression { + bit_field_ |= IsAssignedField::encode(false) | + IsResolvedField::encode(false) | + IsRemovedFromUnresolvedField::encode(false) | ++ IsHomeObjectField::encode(false) | + HoleCheckModeField::encode(HoleCheckMode::kElided); + } + +@@ -1574,7 +1581,8 @@ class VariableProxy final : public Expression { + using IsResolvedField = IsAssignedField::Next<bool, 1>; + using IsRemovedFromUnresolvedField = IsResolvedField::Next<bool, 1>; + using IsNewTargetField = IsRemovedFromUnresolvedField::Next<bool, 1>; +- using HoleCheckModeField = IsNewTargetField::Next<HoleCheckMode, 1>; ++ using IsHomeObjectField = IsNewTargetField::Next<bool, 1>; ++ using HoleCheckModeField = IsHomeObjectField::Next<HoleCheckMode, 1>; + + union { + const AstRawString* raw_name_; // if !is_resolved_ +diff --git a/chromium/v8/src/ast/scopes.cc b/chromium/v8/src/ast/scopes.cc +index 003bd0f2736..34415941556 100644 +--- src/3rdparty/chromium/v8/src/ast/scopes.cc ++++ src/3rdparty/chromium/v8/src/ast/scopes.cc +@@ -491,7 +491,6 @@ Scope* Scope::DeserializeScopeChain(IsolateT* isolate, Zone* zone, + if (cache_scope_found) { + outer_scope->set_deserialized_scope_uses_external_cache(); + } else { +- DCHECK(!cache_scope_found); + cache_scope_found = + outer_scope->is_declaration_scope() && !outer_scope->is_eval_scope(); + } +@@ -970,9 +969,14 @@ Variable* Scope::LookupInScopeInfo(const AstRawString* name, Scope* cache) { + DCHECK(!cache->deserialized_scope_uses_external_cache()); + // The case where where the cache can be another scope is when the cache scope + // is the last scope that doesn't use an external cache. ++ // ++ // The one exception to this is when looking up the home object, which may ++ // skip multiple scopes that don't use an external cache (e.g., several arrow ++ // functions). + DCHECK_IMPLIES( + cache != this, +- cache->outer_scope()->deserialized_scope_uses_external_cache()); ++ cache->outer_scope()->deserialized_scope_uses_external_cache() || ++ cache->GetHomeObjectScope() == this); + DCHECK_NULL(cache->variables_.Lookup(name)); + DisallowGarbageCollection no_gc; + +@@ -2282,7 +2286,33 @@ Variable* Scope::LookupSloppyEval(VariableProxy* proxy, Scope* scope, + + void Scope::ResolveVariable(VariableProxy* proxy) { + DCHECK(!proxy->is_resolved()); +- Variable* var = Lookup<kParsedScope>(proxy, this, nullptr); ++ Variable* var; ++ if (V8_UNLIKELY(proxy->is_home_object())) { ++ // VariableProxies of the home object cannot be resolved like a normal ++ // variable. Consider the case of a super.property usage in heritage ++ // position: ++ // ++ // class C extends super.foo { m() { super.bar(); } } ++ // ++ // The super.foo property access is logically nested under C's class scope, ++ // which also has a home object due to its own method m's usage of ++ // super.bar(). However, super.foo must resolve super in C's outer scope. ++ // ++ // Because of the above, start resolving home objects directly at the home ++ // object scope instead of the current scope. ++ Scope* scope = GetDeclarationScope()->GetHomeObjectScope(); ++ DCHECK_NOT_NULL(scope); ++ if (scope->scope_info_.is_null()) { ++ var = Lookup<kParsedScope>(proxy, scope, nullptr); ++ } else { ++ Scope* entry_cache = scope->deserialized_scope_uses_external_cache() ++ ? GetNonEvalDeclarationScope() ++ : scope; ++ var = Lookup<kDeserializedScope>(proxy, scope, nullptr, entry_cache); ++ } ++ } else { ++ var = Lookup<kParsedScope>(proxy, this, nullptr); ++ } + DCHECK_NOT_NULL(var); + ResolveTo(proxy, var); + } +@@ -2752,48 +2782,6 @@ int Scope::ContextLocalCount() const { + (is_function_var_in_context ? 1 : 0); + } + +-VariableProxy* Scope::NewHomeObjectVariableProxy(AstNodeFactory* factory, +- const AstRawString* name, +- int start_pos) { +- // VariableProxies of the home object cannot be resolved like a normal +- // variable. Consider the case of a super.property usage in heritage position: +- // +- // class C extends super.foo { m() { super.bar(); } } +- // +- // The super.foo property access is logically nested under C's class scope, +- // which also has a home object due to its own method m's usage of +- // super.bar(). However, super.foo must resolve super in C's outer scope. +- // +- // Because of the above, home object VariableProxies are always made directly +- // on the Scope that needs the home object instead of the innermost scope. +- DCHECK(needs_home_object()); +- if (!scope_info_.is_null()) { +- // This is a lazy compile, so the home object's context slot is already +- // known. +- Variable* home_object = variables_.Lookup(name); +- if (home_object == nullptr) { +- VariableLookupResult lookup_result; +- int index = scope_info_->ContextSlotIndex(name->string(), &lookup_result); +- DCHECK_GE(index, 0); +- bool was_added; +- home_object = variables_.Declare(zone(), this, name, lookup_result.mode, +- NORMAL_VARIABLE, lookup_result.init_flag, +- lookup_result.maybe_assigned_flag, +- IsStaticFlag::kNotStatic, &was_added); +- DCHECK(was_added); +- home_object->AllocateTo(VariableLocation::CONTEXT, index); +- } +- return factory->NewVariableProxy(home_object, start_pos); +- } +- // This is not a lazy compile. Add the unresolved home object VariableProxy to +- // the unresolved list of the home object scope, which is not necessarily the +- // innermost scope. +- VariableProxy* proxy = +- factory->NewVariableProxy(name, NORMAL_VARIABLE, start_pos); +- AddUnresolved(proxy); +- return proxy; +-} +- + bool IsComplementaryAccessorPair(VariableMode a, VariableMode b) { + switch (a) { + case VariableMode::kPrivateGetterOnly: +diff --git a/chromium/v8/src/ast/scopes.h b/chromium/v8/src/ast/scopes.h +index b4c2e8b2136..751aaee3d11 100644 +--- src/3rdparty/chromium/v8/src/ast/scopes.h ++++ src/3rdparty/chromium/v8/src/ast/scopes.h +@@ -603,10 +603,6 @@ class V8_EXPORT_PRIVATE Scope : public NON_EXPORTED_BASE(ZoneObject) { + needs_home_object_ = true; + } + +- VariableProxy* NewHomeObjectVariableProxy(AstNodeFactory* factory, +- const AstRawString* name, +- int start_pos); +- + bool RemoveInnerScope(Scope* inner_scope) { + DCHECK_NOT_NULL(inner_scope); + if (inner_scope == inner_scope_) { +@@ -865,7 +861,7 @@ class V8_EXPORT_PRIVATE DeclarationScope : public Scope { + FunctionKind function_kind() const { return function_kind_; } + + // Inform the scope that the corresponding code uses "super". +- Scope* RecordSuperPropertyUsage() { ++ void RecordSuperPropertyUsage() { + DCHECK(IsConciseMethod(function_kind()) || + IsAccessorFunction(function_kind()) || + IsClassConstructor(function_kind())); +@@ -873,7 +869,6 @@ class V8_EXPORT_PRIVATE DeclarationScope : public Scope { + Scope* home_object_scope = GetHomeObjectScope(); + DCHECK_NOT_NULL(home_object_scope); + home_object_scope->set_needs_home_object(); +- return home_object_scope; + } + + bool uses_super_property() const { return uses_super_property_; } +diff --git a/chromium/v8/src/parsing/parser-base.h b/chromium/v8/src/parsing/parser-base.h +index 66e531dfe78..714406f6aa5 100644 +--- src/3rdparty/chromium/v8/src/parsing/parser-base.h ++++ src/3rdparty/chromium/v8/src/parsing/parser-base.h +@@ -3800,9 +3800,9 @@ ParserBase<Impl>::ParseSuperExpression() { + impl()->ReportMessage(MessageTemplate::kOptionalChainingNoSuper); + return impl()->FailureExpression(); + } +- Scope* home_object_scope = scope->RecordSuperPropertyUsage(); ++ scope->RecordSuperPropertyUsage(); + UseThis(); +- return impl()->NewSuperPropertyReference(home_object_scope, pos); ++ return impl()->NewSuperPropertyReference(pos); + } + // super() is only allowed in derived constructor. new super() is never + // allowed; it's reported as an error by +diff --git a/chromium/v8/src/parsing/parser.cc b/chromium/v8/src/parsing/parser.cc +index da16f85234d..5e4b2d0461a 100644 +--- src/3rdparty/chromium/v8/src/parsing/parser.cc ++++ src/3rdparty/chromium/v8/src/parsing/parser.cc +@@ -300,18 +300,17 @@ Expression* Parser::NewThrowError(Runtime::FunctionId id, + return factory()->NewThrow(call_constructor, pos); + } + +-Expression* Parser::NewSuperPropertyReference(Scope* home_object_scope, +- int pos) { ++Expression* Parser::NewSuperPropertyReference(int pos) { + const AstRawString* home_object_name; + if (IsStatic(scope()->GetReceiverScope()->function_kind())) { + home_object_name = ast_value_factory_->dot_static_home_object_string(); + } else { + home_object_name = ast_value_factory_->dot_home_object_string(); + } +- return factory()->NewSuperPropertyReference( +- home_object_scope->NewHomeObjectVariableProxy(factory(), home_object_name, +- pos), +- pos); ++ ++ VariableProxy* proxy = NewUnresolved(home_object_name, pos); ++ proxy->set_is_home_object(); ++ return factory()->NewSuperPropertyReference(proxy, pos); + } + + Expression* Parser::NewSuperCallReference(int pos) { +diff --git a/chromium/v8/src/parsing/parser.h b/chromium/v8/src/parsing/parser.h +index 8aede5d6a2c..0e92f0350b5 100644 +--- src/3rdparty/chromium/v8/src/parsing/parser.h ++++ src/3rdparty/chromium/v8/src/parsing/parser.h +@@ -798,7 +798,7 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) { + return factory()->NewThisExpression(pos); + } + +- Expression* NewSuperPropertyReference(Scope* home_object_scope, int pos); ++ Expression* NewSuperPropertyReference(int pos); + Expression* NewSuperCallReference(int pos); + Expression* NewTargetExpression(int pos); + Expression* ImportMetaExpression(int pos); +diff --git a/chromium/v8/src/parsing/preparser.h b/chromium/v8/src/parsing/preparser.h +index 6c4996bd06b..2ca6b9ac407 100644 +--- src/3rdparty/chromium/v8/src/parsing/preparser.h ++++ src/3rdparty/chromium/v8/src/parsing/preparser.h +@@ -1536,8 +1536,7 @@ class PreParser : public ParserBase<PreParser> { + return PreParserExpression::This(); + } + +- V8_INLINE PreParserExpression +- NewSuperPropertyReference(Scope* home_object_scope, int pos) { ++ V8_INLINE PreParserExpression NewSuperPropertyReference(int pos) { + return PreParserExpression::Default(); + } + +From c4661dc646e45d06961cda71d00814ce878dbd97 Mon Sep 17 00:00:00 2001 +From: Shahbaz Youssefi <syoussefi@google.com> +Date: Fri, 19 Jan 2024 15:36:25 -0500 +Subject: [PATCH] [Backport] CVE-2024-2626: Out of bounds read in Swiftshader + (1/2) + +Cherry-pick of patch originally reviewed on +https://swiftshader-review.googlesource.com/c/SwiftShader/+/72948: +Clamp LOD during image Fetch for robustness + +Bug: chromium:1504556 +Change-Id: Ie110fe4e1b065a815c09986ab91b1336ef4761ad +Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/72948 +Presubmit-Ready: Shahbaz Youssefi <syoussefi@google.com> +Kokoro-Result: kokoro <noreply+kokoro@google.com> +Reviewed-by: Ben Clayton <bclayton@google.com> +Commit-Queue: Ben Clayton <bclayton@google.com> +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/551090 +Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> +--- + .../third_party/swiftshader/src/Pipeline/SamplerCore.cpp | 1 + + .../swiftshader/src/Pipeline/SpirvShaderSampling.cpp | 5 +++++ + chromium/third_party/swiftshader/src/Vulkan/VkImageView.cpp | 6 ++++-- + chromium/third_party/swiftshader/src/Vulkan/VkImageView.hpp | 3 +++ + 4 files changed, 13 insertions(+), 2 deletions(-) + +diff --git a/chromium/third_party/swiftshader/src/Pipeline/SamplerCore.cpp b/chromium/third_party/swiftshader/src/Pipeline/SamplerCore.cpp +index 403ed3bdd560..d62936273fa3 100644 +--- src/3rdparty/chromium/third_party/swiftshader/src/Pipeline/SamplerCore.cpp ++++ src/3rdparty/chromium/third_party/swiftshader/src/Pipeline/SamplerCore.cpp +@@ -133,6 +133,7 @@ Vector4f SamplerCore::sampleTexture128(Pointer<Byte> &texture, Float4 uvwa[4], c + { + // TODO: Eliminate int-float-int conversion. + lod = Float(As<Int>(lodOrBias)); ++ lod = Min(lod, state.maxLod); + } + else if(function == Base || function == Gather) + { +diff --git a/chromium/third_party/swiftshader/src/Pipeline/SpirvShaderSampling.cpp b/chromium/third_party/swiftshader/src/Pipeline/SpirvShaderSampling.cpp +index 5225a79f3ba6..777f73e43786 100644 +--- src/3rdparty/chromium/third_party/swiftshader/src/Pipeline/SpirvShaderSampling.cpp ++++ src/3rdparty/chromium/third_party/swiftshader/src/Pipeline/SpirvShaderSampling.cpp +@@ -108,6 +108,11 @@ SpirvEmitter::ImageSampler *SpirvEmitter::getImageSampler(const vk::Device *devi + samplerState.minLod = 0.0f; + samplerState.maxLod = 0.0f; + } ++ // Otherwise make sure LOD is clamped for robustness ++ else ++ { ++ samplerState.maxLod = imageViewState.maxLod; ++ } + } + else if(samplerMethod == Write) + { +diff --git a/chromium/third_party/swiftshader/src/Vulkan/VkImageView.cpp b/chromium/third_party/swiftshader/src/Vulkan/VkImageView.cpp +index 511c02cbbed9..26b69aef79b3 100644 +--- src/3rdparty/chromium/third_party/swiftshader/src/Vulkan/VkImageView.cpp ++++ src/3rdparty/chromium/third_party/swiftshader/src/Vulkan/VkImageView.cpp +@@ -89,13 +89,13 @@ Identifier::Identifier(const VkImageViewCreateInfo *pCreateInfo) + const Image *sampledImage = image->getSampledImage(viewFormat); + + vk::Format samplingFormat = (image == sampledImage) ? viewFormat : sampledImage->getFormat().getAspectFormat(subresource.aspectMask); +- pack({ pCreateInfo->viewType, samplingFormat, ResolveComponentMapping(pCreateInfo->components, viewFormat), subresource.levelCount <= 1u }); ++ pack({ pCreateInfo->viewType, samplingFormat, ResolveComponentMapping(pCreateInfo->components, viewFormat), static_cast<uint8_t>(subresource.baseMipLevel + subresource.levelCount), subresource.levelCount <= 1u }); + } + + Identifier::Identifier(VkFormat bufferFormat) + { + constexpr VkComponentMapping identityMapping = { VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_G, VK_COMPONENT_SWIZZLE_B, VK_COMPONENT_SWIZZLE_A }; +- pack({ VK_IMAGE_VIEW_TYPE_1D, bufferFormat, ResolveComponentMapping(identityMapping, bufferFormat), true }); ++ pack({ VK_IMAGE_VIEW_TYPE_1D, bufferFormat, ResolveComponentMapping(identityMapping, bufferFormat), 1, true }); + } + + void Identifier::pack(const State &state) +@@ -106,6 +106,7 @@ void Identifier::pack(const State &state) + g = static_cast<uint32_t>(state.mapping.g); + b = static_cast<uint32_t>(state.mapping.b); + a = static_cast<uint32_t>(state.mapping.a); ++ maxLod = state.maxLod; + singleMipLevel = state.singleMipLevel; + } + +@@ -117,6 +118,7 @@ Identifier::State Identifier::getState() const + static_cast<VkComponentSwizzle>(g), + static_cast<VkComponentSwizzle>(b), + static_cast<VkComponentSwizzle>(a) }, ++ static_cast<uint8_t>(maxLod), + static_cast<bool>(singleMipLevel) }; + } + +diff --git a/chromium/third_party/swiftshader/src/Vulkan/VkImageView.hpp b/chromium/third_party/swiftshader/src/Vulkan/VkImageView.hpp +index bf4d666a425d..5acb89639c12 100644 +--- src/3rdparty/chromium/third_party/swiftshader/src/Vulkan/VkImageView.hpp ++++ src/3rdparty/chromium/third_party/swiftshader/src/Vulkan/VkImageView.hpp +@@ -53,6 +53,7 @@ union Identifier + VkImageViewType imageViewType; + VkFormat format; + VkComponentMapping mapping; ++ uint8_t maxLod; + bool singleMipLevel; + }; + State getState() const; +@@ -61,6 +62,7 @@ union Identifier + void pack(const State &data); + + // Identifier is a union of this struct and the integer below. ++ static_assert(sw::MIPMAP_LEVELS <= 15); + struct + { + uint32_t imageViewType : 3; +@@ -69,6 +71,7 @@ union Identifier + uint32_t g : 3; + uint32_t b : 3; + uint32_t a : 3; ++ uint32_t maxLod : 4; + uint32_t singleMipLevel : 1; + }; + +From a58826b55d30045bed8793dbcd20dc32a73716e2 Mon Sep 17 00:00:00 2001 +From: Shahbaz Youssefi <syoussefi@google.com> +Date: Mon, 22 Jan 2024 09:49:16 -0500 +Subject: [PATCH] [Backport] CVE-2024-2626: Out of bounds read in Swiftshader + (2/2) + +Cherry-pick of patch originally reviewed on +https://swiftshader-review.googlesource.com/c/SwiftShader/+/72968: +Clamp min LOD during image Fetch for robustness + +The previous change clamped max LOD only, but min LOD also needs +clamping because texelFetch takes an `int` as LOD instead of `uint`. + +Bug: chromium:1504556 +Change-Id: Ibae8250a877b3e04b71fac45a40b77c78756d6c8 +Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/72968 +Kokoro-Result: kokoro <noreply+kokoro@google.com> +Reviewed-by: Ben Clayton <bclayton@google.com> +Commit-Queue: Shahbaz Youssefi <syoussefi@google.com> +Presubmit-Ready: Shahbaz Youssefi <syoussefi@google.com> +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/551091 +Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> +--- + .../third_party/swiftshader/src/Pipeline/SamplerCore.cpp | 1 + + .../swiftshader/src/Pipeline/SpirvShaderSampling.cpp | 1 + + .../third_party/swiftshader/src/Vulkan/VkImageView.cpp | 8 ++++++-- + .../third_party/swiftshader/src/Vulkan/VkImageView.hpp | 2 ++ + 4 files changed, 10 insertions(+), 2 deletions(-) + +diff --git a/chromium/third_party/swiftshader/src/Pipeline/SamplerCore.cpp b/chromium/third_party/swiftshader/src/Pipeline/SamplerCore.cpp +index d62936273fa..ab55c036a3f 100644 +--- src/3rdparty/chromium/third_party/swiftshader/src/Pipeline/SamplerCore.cpp ++++ src/3rdparty/chromium/third_party/swiftshader/src/Pipeline/SamplerCore.cpp +@@ -133,6 +133,7 @@ Vector4f SamplerCore::sampleTexture128(Pointer<Byte> &texture, Float4 uvwa[4], c + { + // TODO: Eliminate int-float-int conversion. + lod = Float(As<Int>(lodOrBias)); ++ lod = Max(lod, state.minLod); + lod = Min(lod, state.maxLod); + } + else if(function == Base || function == Gather) +diff --git a/chromium/third_party/swiftshader/src/Pipeline/SpirvShaderSampling.cpp b/chromium/third_party/swiftshader/src/Pipeline/SpirvShaderSampling.cpp +index 777f73e4378..fa88a192ab5 100644 +--- src/3rdparty/chromium/third_party/swiftshader/src/Pipeline/SpirvShaderSampling.cpp ++++ src/3rdparty/chromium/third_party/swiftshader/src/Pipeline/SpirvShaderSampling.cpp +@@ -111,6 +111,7 @@ SpirvEmitter::ImageSampler *SpirvEmitter::getImageSampler(const vk::Device *devi + // Otherwise make sure LOD is clamped for robustness + else + { ++ samplerState.minLod = imageViewState.minLod; + samplerState.maxLod = imageViewState.maxLod; + } + } +diff --git a/chromium/third_party/swiftshader/src/Vulkan/VkImageView.cpp b/chromium/third_party/swiftshader/src/Vulkan/VkImageView.cpp +index 26b69aef79b..1b25544a57b 100644 +--- src/3rdparty/chromium/third_party/swiftshader/src/Vulkan/VkImageView.cpp ++++ src/3rdparty/chromium/third_party/swiftshader/src/Vulkan/VkImageView.cpp +@@ -89,13 +89,15 @@ Identifier::Identifier(const VkImageViewCreateInfo *pCreateInfo) + const Image *sampledImage = image->getSampledImage(viewFormat); + + vk::Format samplingFormat = (image == sampledImage) ? viewFormat : sampledImage->getFormat().getAspectFormat(subresource.aspectMask); +- pack({ pCreateInfo->viewType, samplingFormat, ResolveComponentMapping(pCreateInfo->components, viewFormat), static_cast<uint8_t>(subresource.baseMipLevel + subresource.levelCount), subresource.levelCount <= 1u }); ++ pack({ pCreateInfo->viewType, samplingFormat, ResolveComponentMapping(pCreateInfo->components, viewFormat), ++ static_cast<uint8_t>(subresource.baseMipLevel), ++ static_cast<uint8_t>(subresource.baseMipLevel + subresource.levelCount), subresource.levelCount <= 1u }); + } + + Identifier::Identifier(VkFormat bufferFormat) + { + constexpr VkComponentMapping identityMapping = { VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_G, VK_COMPONENT_SWIZZLE_B, VK_COMPONENT_SWIZZLE_A }; +- pack({ VK_IMAGE_VIEW_TYPE_1D, bufferFormat, ResolveComponentMapping(identityMapping, bufferFormat), 1, true }); ++ pack({ VK_IMAGE_VIEW_TYPE_1D, bufferFormat, ResolveComponentMapping(identityMapping, bufferFormat), 0, 1, true }); + } + + void Identifier::pack(const State &state) +@@ -106,6 +108,7 @@ void Identifier::pack(const State &state) + g = static_cast<uint32_t>(state.mapping.g); + b = static_cast<uint32_t>(state.mapping.b); + a = static_cast<uint32_t>(state.mapping.a); ++ minLod = state.minLod; + maxLod = state.maxLod; + singleMipLevel = state.singleMipLevel; + } +@@ -118,6 +121,7 @@ Identifier::State Identifier::getState() const + static_cast<VkComponentSwizzle>(g), + static_cast<VkComponentSwizzle>(b), + static_cast<VkComponentSwizzle>(a) }, ++ static_cast<uint8_t>(minLod), + static_cast<uint8_t>(maxLod), + static_cast<bool>(singleMipLevel) }; + } +diff --git a/chromium/third_party/swiftshader/src/Vulkan/VkImageView.hpp b/chromium/third_party/swiftshader/src/Vulkan/VkImageView.hpp +index 5acb89639c1..25feebc9e7e 100644 +--- src/3rdparty/chromium/third_party/swiftshader/src/Vulkan/VkImageView.hpp ++++ src/3rdparty/chromium/third_party/swiftshader/src/Vulkan/VkImageView.hpp +@@ -53,6 +53,7 @@ union Identifier + VkImageViewType imageViewType; + VkFormat format; + VkComponentMapping mapping; ++ uint8_t minLod; + uint8_t maxLod; + bool singleMipLevel; + }; +@@ -71,6 +72,7 @@ union Identifier + uint32_t g : 3; + uint32_t b : 3; + uint32_t a : 3; ++ uint32_t minLod : 4; + uint32_t maxLod : 4; + uint32_t singleMipLevel : 1; + }; +From 336b5c4a31f9f976434adb2ecf1697c764f097cf Mon Sep 17 00:00:00 2001 +From: rajendrant <rajendrant@chromium.org> +Date: Fri, 9 Feb 2024 17:29:51 +0000 +Subject: [PATCH] [Backport] Security bug 40066823 + +Manual partial backport of patch originally reviewed on +https://chromium-review.googlesource.com/c/chromium/src/+/5279279: +Remove holding local_state in model store + +Avoids holding on to local_state in model store, by getting the local state when needed from chrome/. This delinks model store lifetime with local state lifetime. + +Change-Id: Ifb036b43b8394202683d4ae1131ff1eae780fc17 +Fixed: 40066823 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5279279 +Reviewed-by: Sophie Chang <sophiechang@chromium.org> +Commit-Queue: Raj T <rajendrant@chromium.org> +Reviewed-by: Trevor Perrier <perrier@chromium.org> +Cr-Commit-Position: refs/heads/main@{#1258580} +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/551092 +Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> +--- + .../core/prediction_model_store.cc | 61 ++++++------------- + .../core/prediction_model_store.h | 28 +++------ + 2 files changed, 28 insertions(+), 61 deletions(-) + +diff --git a/chromium/components/optimization_guide/core/prediction_model_store.cc b/chromium/components/optimization_guide/core/prediction_model_store.cc +index d2252ea5cc4..a399ac06d7f 100644 +--- src/3rdparty/chromium/components/optimization_guide/core/prediction_model_store.cc ++++ src/3rdparty/chromium/components/optimization_guide/core/prediction_model_store.cc +@@ -155,12 +155,6 @@ void RecordModelStorageMetrics(const base::FilePath& base_store_dir) { + + } // namespace + +-// static +-PredictionModelStore* PredictionModelStore::GetInstance() { +- static base::NoDestructor<PredictionModelStore> model_store; +- return model_store.get(); +-} +- + PredictionModelStore::PredictionModelStore() + : background_task_runner_(base::ThreadPool::CreateSequencedTaskRunner( + {base::MayBlock(), base::TaskPriority::BEST_EFFORT})) { +@@ -169,19 +163,14 @@ PredictionModelStore::PredictionModelStore() + + PredictionModelStore::~PredictionModelStore() = default; + +-void PredictionModelStore::Initialize(PrefService* local_state, +- const base::FilePath& base_store_dir) { ++void PredictionModelStore::Initialize(const base::FilePath& base_store_dir) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +- DCHECK(local_state); + DCHECK(!base_store_dir.empty()); + + // Should not be initialized already. +- DCHECK(!local_state_); + DCHECK(base_store_dir_.empty()); + +- local_state_ = local_state; + base_store_dir_ = base_store_dir; +- + PurgeInactiveModels(); + + // Clean up any model files that were slated for deletion in previous +@@ -189,29 +178,19 @@ void PredictionModelStore::Initialize(PrefService* local_state, + CleanUpOldModelFiles(); + + background_task_runner_->PostTask( +- FROM_HERE, +- base::BindOnce(&RemoveInvalidModelDirs, base_store_dir_, +- ModelStoreMetadataEntry::GetValidModelDirs(local_state_))); ++ FROM_HERE, base::BindOnce(&RemoveInvalidModelDirs, base_store_dir_, ++ ModelStoreMetadataEntry::GetValidModelDirs( ++ GetLocalState()))); + background_task_runner_->PostTask( + FROM_HERE, base::BindOnce(&RecordModelStorageMetrics, base_store_dir_)); + } + +-// static +-std::unique_ptr<PredictionModelStore> +-PredictionModelStore::CreatePredictionModelStoreForTesting( +- PrefService* local_state, +- const base::FilePath& base_store_dir) { +- auto store = base::WrapUnique(new PredictionModelStore()); +- store->Initialize(local_state, base_store_dir); +- return store; +-} +- + bool PredictionModelStore::HasModel( + proto::OptimizationTarget optimization_target, + const proto::ModelCacheKey& model_cache_key) const { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + auto metadata = ModelStoreMetadataEntry::GetModelMetadataEntryIfExists( +- local_state_, optimization_target, model_cache_key); ++ GetLocalState(), optimization_target, model_cache_key); + if (!metadata) { + return false; + } +@@ -226,7 +205,7 @@ bool PredictionModelStore::HasModelWithVersion( + int64_t version) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + auto metadata = ModelStoreMetadataEntry::GetModelMetadataEntryIfExists( +- local_state_, optimization_target, model_cache_key); ++ GetLocalState(), optimization_target, model_cache_key); + if (!metadata) { + return false; + } +@@ -251,7 +230,7 @@ void PredictionModelStore::LoadModel( + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + + auto metadata = ModelStoreMetadataEntry::GetModelMetadataEntryIfExists( +- local_state_, optimization_target, model_cache_key); ++ GetLocalState(), optimization_target, model_cache_key); + if (!metadata) { + std::move(callback).Run(nullptr); + return; +@@ -334,7 +313,7 @@ void PredictionModelStore::UpdateMetadataForExistingModel( + if (!HasModel(optimization_target, model_cache_key)) + return; + +- ModelStoreMetadataEntryUpdater metadata(local_state_, optimization_target, ++ ModelStoreMetadataEntryUpdater metadata(GetLocalState(), optimization_target, + model_cache_key); + DCHECK(!metadata.GetModelBaseDir()->IsAbsolute()); + metadata.SetVersion(model_info.version()); +@@ -357,7 +336,7 @@ void PredictionModelStore::UpdateModel( + DCHECK_EQ(optimization_target, model_info.optimization_target()); + DCHECK(base_store_dir_.IsParent(base_model_dir)); + +- ModelStoreMetadataEntryUpdater metadata(local_state_, optimization_target, ++ ModelStoreMetadataEntryUpdater metadata(GetLocalState(), optimization_target, + model_cache_key); + metadata.SetVersion(model_info.version()); + metadata.SetExpiryTime( +@@ -420,7 +399,7 @@ void PredictionModelStore::UpdateModelCacheKeyMapping( + const proto::ModelCacheKey& server_model_cache_key) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + ModelStoreMetadataEntryUpdater::UpdateModelCacheKeyMapping( +- local_state_, optimization_target, client_model_cache_key, ++ GetLocalState(), optimization_target, client_model_cache_key, + server_model_cache_key); + } + +@@ -429,13 +408,13 @@ void PredictionModelStore::RemoveModel( + const proto::ModelCacheKey& model_cache_key, + PredictionModelStoreModelRemovalReason model_remove_reason) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +- if (!local_state_) { ++ if (!GetLocalState()) { + return; + } + + RecordPredictionModelStoreModelRemovalVersionHistogram(optimization_target, + model_remove_reason); +- ModelStoreMetadataEntryUpdater metadata(local_state_, optimization_target, ++ ModelStoreMetadataEntryUpdater metadata(GetLocalState(), optimization_target, + model_cache_key); + auto base_model_dir = metadata.GetModelBaseDir(); + if (base_model_dir) { +@@ -458,16 +437,17 @@ void PredictionModelStore::ScheduleModelDirRemoval( + base_model_dir.IsAbsolute() + ? ConvertToRelativePath(base_store_dir_, base_model_dir) + : base_model_dir; +- ScopedDictPrefUpdate pref_update(local_state_, ++ ScopedDictPrefUpdate pref_update(GetLocalState(), + prefs::localstate::kStoreFilePathsToDelete); + pref_update->Set(FilePathToString(relative_model_dir), true); + } + + void PredictionModelStore::PurgeInactiveModels() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +- DCHECK(local_state_); ++ DCHECK(GetLocalState()); + for (const auto& expired_model_dir : +- ModelStoreMetadataEntryUpdater::PurgeAllInactiveMetadata(local_state_)) { ++ ModelStoreMetadataEntryUpdater::PurgeAllInactiveMetadata( ++ GetLocalState())) { + // Backward compatibility: Model dirs were absolute in the earlier versions, + // and it was only in experiment. The latest versions use relative paths. + DCHECK(!expired_model_dir.IsAbsolute() || +@@ -485,9 +465,9 @@ void PredictionModelStore::PurgeInactiveModels() { + + void PredictionModelStore::CleanUpOldModelFiles() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +- DCHECK(local_state_); ++ DCHECK(GetLocalState()); + for (const auto entry : +- local_state_->GetDict(prefs::localstate::kStoreFilePathsToDelete)) { ++ GetLocalState()->GetDict(prefs::localstate::kStoreFilePathsToDelete)) { + // Backward compatibility: Model dirs were absolute in the earlier versions. + // The latest versions use relative paths. + auto path_to_delete = StringToFilePath(entry.first); +@@ -508,13 +488,13 @@ void PredictionModelStore::CleanUpOldModelFiles() { + void PredictionModelStore::OnFilePathDeleted(const std::string& path_to_delete, + bool success) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +- DCHECK(local_state_); ++ DCHECK(GetLocalState()); + if (!success) { + // Try to delete again later. + return; + } + +- ScopedDictPrefUpdate pref_update(local_state_, ++ ScopedDictPrefUpdate pref_update(GetLocalState(), + prefs::localstate::kStoreFilePathsToDelete); + pref_update->Remove(path_to_delete); + } +@@ -527,7 +507,6 @@ base::FilePath PredictionModelStore::GetBaseStoreDirForTesting() const { + void PredictionModelStore::ResetForTesting() { + DETACH_FROM_SEQUENCE(sequence_checker_); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +- local_state_ = nullptr; + base_store_dir_ = base::FilePath(); + background_task_runner_ = base::ThreadPool::CreateSequencedTaskRunner( + {base::MayBlock(), base::TaskPriority::BEST_EFFORT}); +diff --git a/chromium/components/optimization_guide/core/prediction_model_store.h b/chromium/components/optimization_guide/core/prediction_model_store.h +index eb39780fd37..720e50dc128 100644 +--- src/3rdparty/chromium/components/optimization_guide/core/prediction_model_store.h ++++ src/3rdparty/chromium/components/optimization_guide/core/prediction_model_store.h +@@ -8,7 +8,6 @@ + #include "base/files/file_path.h" + #include "base/memory/scoped_refptr.h" + #include "base/memory/weak_ptr.h" +-#include "base/no_destructor.h" + #include "base/sequence_checker.h" + #include "base/task/sequenced_task_runner.h" + #include "base/values.h" +@@ -34,21 +33,15 @@ class PredictionModelStore { + using PredictionModelLoadedCallback = + base::OnceCallback<void(std::unique_ptr<proto::PredictionModel>)>; + +- // Returns the singleton model store. +- static PredictionModelStore* GetInstance(); +- +- static std::unique_ptr<PredictionModelStore> +- CreatePredictionModelStoreForTesting(PrefService* local_state, +- const base::FilePath& base_store_dir); ++ PredictionModelStore(); + +- // Initializes the model store with |local_state| and the |base_store_dir|. +- // Model store will be usable only after it is initialized. +- void Initialize(PrefService* local_state, +- const base::FilePath& base_store_dir); ++ // Initializes the model store with |base_store_dir|. Model store will be ++ // usable only after it is initialized. ++ void Initialize(const base::FilePath& base_store_dir); + + PredictionModelStore(const PredictionModelStore&) = delete; + PredictionModelStore& operator=(const PredictionModelStore&) = delete; +- ~PredictionModelStore(); ++ virtual ~PredictionModelStore(); + + // Initializes the model store with |local_state| and the |base_store_dir|, if + // initialization hasn't happened already. Model store will be usable only +@@ -111,6 +104,9 @@ class PredictionModelStore { + const proto::ModelCacheKey& model_cache_key, + PredictionModelStoreModelRemovalReason model_removal_reason); + ++ // Returns the local state that stores the prefs across all profiles. ++ virtual PrefService* GetLocalState() const = 0; ++ + base::FilePath GetBaseStoreDirForTesting() const; + + // Allows tests to reset the store for subsequent tests since the store is a +@@ -118,11 +114,8 @@ class PredictionModelStore { + void ResetForTesting(); + + private: +- friend base::NoDestructor<PredictionModelStore>; + friend class PredictionModelStoreBrowserTestBase; + +- PredictionModelStore(); +- + // Loads the model and verifies if the model files exist and returns the + // model. Otherwise nullptr is returned on any failures. + static std::unique_ptr<proto::PredictionModel> +@@ -159,11 +152,6 @@ class PredictionModelStore { + // Invoked when model files gets deleted. + void OnFilePathDeleted(const std::string& path_to_delete, bool success); + +- // Local state that stores the prefs across all profiles. Not owned and +- // outlives |this|. +- raw_ptr<PrefService, LeakedDanglingUntriaged> local_state_ +- GUARDED_BY_CONTEXT(sequence_checker_) = nullptr; +- + // The base dir where the prediction model dirs are saved. + base::FilePath base_store_dir_ GUARDED_BY_CONTEXT(sequence_checker_); + +From ce8633a185cd8c2e819898d3a6cba63d1e8089c4 Mon Sep 17 00:00:00 2001 +From: John Stiles <johnstiles@google.com> +Date: Wed, 31 Jan 2024 14:28:47 +0000 +Subject: [PATCH] [Backport] Security bug 41495984 + +Cherry-pick of patch originally reviewed on: +https://chromium-review.googlesource.com/c/chromium/src/+/5249171 +Improve handling of malformed BMP palettes. + +Add CHECKs to guarantee that clr_used is reasonably sized when +ProcessColorTable() is called. Out-of-bounds values are capped +by ProcessInfoHeader() already, but since this happens at a +distance, it's better to be sure. + +Additionally, we would previously add padding elements to a +palette if it was shorter than expected. We already had bounds +checks at the places where the palette was accessed, so we now +rely on those checks instead. + +Bug: 1523030 +Change-Id: I579c67d1029e1effba2036e9ec0c871418b140e2 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5249171 +Commit-Queue: John Stiles <johnstiles@google.com> +Reviewed-by: Peter Kasting <pkasting@chromium.org> +Auto-Submit: John Stiles <johnstiles@google.com> +Cr-Commit-Position: refs/heads/main@{#1254490} +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/551093 +Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> +--- + .../image-decoders/bmp/bmp_image_reader.cc | 25 ++++++++++--------- + 1 file changed, 13 insertions(+), 12 deletions(-) + +diff --git a/chromium/third_party/blink/renderer/platform/image-decoders/bmp/bmp_image_reader.cc b/chromium/third_party/blink/renderer/platform/image-decoders/bmp/bmp_image_reader.cc +index b7bbbf51a1b..9c319b4be01 100644 +--- src/3rdparty/chromium/third_party/blink/renderer/platform/image-decoders/bmp/bmp_image_reader.cc ++++ src/3rdparty/chromium/third_party/blink/renderer/platform/image-decoders/bmp/bmp_image_reader.cc +@@ -774,24 +774,31 @@ bool BMPImageReader::ProcessColorTable() { + + const wtf_size_t header_end = header_offset_ + info_header_.size; + wtf_size_t colors_in_palette = info_header_.clr_used; ++ CHECK_LE(colors_in_palette, 256u); // Enforced by ProcessInfoHeader(). + wtf_size_t table_size_in_bytes = colors_in_palette * bytes_per_color; + const wtf_size_t table_end = header_end + table_size_in_bytes; + if (table_end < header_end) { + return parent_->SetFailed(); + } + +- // Some BMPs don't contain a complete palette. Avoid reading off the end. ++ // Some BMPs don't contain a complete palette. Truncate it instead of reading ++ // off the end of the palette. + if (img_data_offset_ && (img_data_offset_ < table_end)) { +- colors_in_palette = (img_data_offset_ - header_end) / bytes_per_color; ++ wtf_size_t colors_in_truncated_palette = ++ (img_data_offset_ - header_end) / bytes_per_color; ++ CHECK_LE(colors_in_truncated_palette, colors_in_palette); ++ colors_in_palette = colors_in_truncated_palette; + table_size_in_bytes = colors_in_palette * bytes_per_color; + } + +- // Read color table. ++ // If we don't have enough data to read in the whole palette yet, stop here. + if ((decoded_offset_ > data_->size()) || + ((data_->size() - decoded_offset_) < table_size_in_bytes)) { + return false; + } +- color_table_.resize(info_header_.clr_used); ++ ++ // Read the color table. ++ color_table_.resize(colors_in_palette); + + for (wtf_size_t i = 0; i < colors_in_palette; ++i) { + color_table_[i].rgb_blue = ReadUint8(0); +@@ -799,12 +806,6 @@ bool BMPImageReader::ProcessColorTable() { + color_table_[i].rgb_red = ReadUint8(2); + decoded_offset_ += bytes_per_color; + } +- // Explicitly zero any colors past the end of a truncated palette. +- for (wtf_size_t i = colors_in_palette; i < info_header_.clr_used; ++i) { +- color_table_[i].rgb_blue = 0; +- color_table_[i].rgb_green = 0; +- color_table_[i].rgb_red = 0; +- } + + // We've now decoded all the non-image data we care about. Skip anything + // else before the actual raster data. +@@ -992,7 +993,7 @@ BMPImageReader::ProcessingResult BMPImageReader::ProcessRLEData() { + for (wtf_size_t which = 0; coord_.x() < end_x;) { + // Some images specify color values past the end of the + // color table; set these pixels to black. +- if (color_indexes[which] < info_header_.clr_used) { ++ if (color_indexes[which] < color_table_.size()) { + SetI(color_indexes[which]); + } else { + SetRGBA(0, 0, 0, 255); +@@ -1071,7 +1072,7 @@ BMPImageReader::ProcessingResult BMPImageReader::ProcessNonRLEData( + } + } else { + // See comments near the end of ProcessRLEData(). +- if (color_index < info_header_.clr_used) { ++ if (color_index < color_table_.size()) { + SetI(color_index); + } else { + SetRGBA(0, 0, 0, 255); +From 4349868d9af8ef7175125f53e441b12df5a22927 Mon Sep 17 00:00:00 2001 +From: Antonio Maiorano <amaiorano@google.com> +Date: Wed, 20 Mar 2024 17:15:40 -0400 +Subject: [PATCH] [Backport] CVE-2024-2885: Use after free in Dawn + +Manual cherry-pick of patch originally reviewed on +https://chromium-review.googlesource.com/c/external/github.com/microsoft/DirectXShaderCompiler/+/5383595: +Fix HLMatrixLowerPass leaving call to dangling FunctionVal + +When lowering an hl.cast, when the operand was an undef matrix, the pass would insert a call to a mat2vec stub, but since the undef value is not +an alloca, it never gets handled, and the call to the temporary stub +remains. Since the stub FunctionVal gets deleted, when the instruction +is accessed in a future pass, it reads a dangling pointer. + +The fix is to handle undef similarly to how constant 0 is handled, and +to return an undef vector from lowerHLCast. + +Bug: chromium:328958020 +Change-Id: Id31e3aa326d9cb9f03ea97139f14dc5292cd6f7b +Reviewed-on: https://chromium-review.googlesource.com/c/external/github.com/microsoft/DirectXShaderCompiler/+/5383595 +Reviewed-by: Ben Clayton <bclayton@chromium.org> +Reviewed-by: David Neto <dneto@google.com> +Reviewed-by: Kenneth Russell <kbr@chromium.org> +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/553291 +Reviewed-by: Michal Klocek <michal.klocek@qt.io> +--- + .../dawn/third_party/dxc/lib/HLSL/HLMatrixLowerPass.cpp | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/chromium/third_party/dawn/third_party/dxc/lib/HLSL/HLMatrixLowerPass.cpp b/chromium/third_party/dawn/third_party/dxc/lib/HLSL/HLMatrixLowerPass.cpp +index e35ff832ecf..c3a7254ef2b 100644 +--- src/3rdparty/chromium/third_party/dawn/third_party/dxc/lib/HLSL/HLMatrixLowerPass.cpp ++++ src/3rdparty/chromium/third_party/dawn/third_party/dxc/lib/HLSL/HLMatrixLowerPass.cpp +@@ -381,6 +381,11 @@ Value* HLMatrixLowerPass::getLoweredByValOperand(Value *Val, IRBuilder<> &Builde + if (isa<ConstantAggregateZero>(Val)) + return ConstantAggregateZero::get(LoweredTy); + ++ // Lower undef mat as undef vec ++ if (isa<UndefValue>(Val)) { ++ return UndefValue::get(LoweredTy); ++ } ++ + // Return a mat-to-vec translation stub + FunctionType *TranslationStubTy = FunctionType::get(LoweredTy, { Ty }, /* isVarArg */ false); + Function *TranslationStub = m_matToVecStubs->get(TranslationStubTy); +From 0c7f8cd69b6065fbc9a2af8927182ffe529e052e Mon Sep 17 00:00:00 2001 +From: Manos Koukoutos <manoskouk@chromium.org> +Date: Thu, 21 Mar 2024 11:38:08 +0100 +Subject: [PATCH] [Backport] CVE-2024-2887: Type Confusion in WebAssembly + +Cherry-pick of patch originally reviewed on +https://chromium-review.googlesource.com/c/v8/v8/+/5380190: +Merged: [wasm] Check for type-definition count limit + +(cherry picked from commit b852ad701db21d6db5b34e66f4ec1cdccd2ec4d4) + +Bug: chromium:330575498 +Change-Id: I395f0ed6d823b7d1e139da6551486e3627d65724 +Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5378419 +Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> +Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> +Auto-Submit: Manos Koukoutos <manoskouk@chromium.org> +Cr-Original-Commit-Position: refs/heads/main@{#92941} +Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5380190 +Reviewed-by: Francis McCabe <fgm@chromium.org> +Commit-Queue: Adam Klein <adamk@chromium.org> +Reviewed-by: Adam Klein <adamk@chromium.org> +Cr-Commit-Position: refs/branch-heads/12.2@{#50} +Cr-Branched-From: 6eb5a9616aa6f8c705217aeb7c7ab8c037a2f676-refs/heads/12.2.281@{#1} +Cr-Branched-From: 44cf56d850167c6988522f8981730462abc04bcc-refs/heads/main@{#91934} +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/553292 +Reviewed-by: Michal Klocek <michal.klocek@qt.io> +--- + chromium/v8/src/wasm/module-decoder-impl.h | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/chromium/v8/src/wasm/module-decoder-impl.h b/chromium/v8/src/wasm/module-decoder-impl.h +index 97554288b55..75ca3a630a2 100644 +--- src/3rdparty/chromium/v8/src/wasm/module-decoder-impl.h ++++ src/3rdparty/chromium/v8/src/wasm/module-decoder-impl.h +@@ -687,6 +687,11 @@ class ModuleDecoderImpl : public Decoder { + } + } else { + if (tracer_) tracer_->TypeOffset(pc_offset()); ++ if (initial_size + 1 > kV8MaxWasmTypes) { ++ errorf(pc(), "Type definition count exceeds maximum %zu", ++ kV8MaxWasmTypes); ++ return; ++ } + // Similarly to above, we need to resize types for a group of size 1. + module_->types.resize(initial_size + 1); + module_->isorecursive_canonical_type_ids.resize(initial_size + 1); +From d414fd5b22455b7fcbddfdee22cf2b1f446ce3c4 Mon Sep 17 00:00:00 2001 +From: Marco Paniconi <marpan@google.com> +Date: Wed, 13 Mar 2024 10:58:17 -0700 +Subject: [PATCH] [Backport] Security bug 329674887 (1/2) + +Cherry-pick of patch orignally reviewed on +https://chromium-review.googlesource.com/c/webm/libvpx/+/5370376: +Fix to buffer alloc for vp9_bitstream_worker_data + +The code was using the bitstream_worker_data when it +wasn't allocated for big enough size. This is because +the existing condition was to only re-alloc the +bitstream_worker_data when current dest_size was larger +than the current frame_size. But under resolution change +where frame_size is increased, beyond the current dest_size, +we need to allow re-alloc to the new size. + +The existing condition to re-alloc when dest_size is +larger than frame_size (which is not required) is kept +for now. + +Also increase the dest_size to account for image format. + +Added tests, for both ROW_MT=0 and 1, that reproduce +the failures in the bugs below. + +Note: this issue only affects the REALTIME encoding path. + +Bug: b/329088759, b/329674887, b/329179808 + +Change-Id: Icd65dbc5317120304d803f648d4bd9405710db6f +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/553293 +Reviewed-by: Michal Klocek <michal.klocek@qt.io> +--- + .../source/libvpx/vp9/encoder/vp9_bitstream.c | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +diff --git a/chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_bitstream.c b/chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_bitstream.c +index ca56d14aa1e..88a031e5fc1 100644 +--- src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_bitstream.c ++++ src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_bitstream.c +@@ -962,6 +962,14 @@ void vp9_bitstream_encode_tiles_buffer_dealloc(VP9_COMP *const cpi) { + } + } + ++static int encode_tiles_buffer_alloc_size(VP9_COMP *const cpi) { ++ VP9_COMMON *const cm = &cpi->common; ++ const int image_bps = ++ (8 + 2 * (8 >> (cm->subsampling_x + cm->subsampling_y))) * ++ (1 + (cm->bit_depth > 8)); ++ return cpi->oxcf.width * cpi->oxcf.height * image_bps / 8; ++} ++ + static void encode_tiles_buffer_alloc(VP9_COMP *const cpi) { + VP9_COMMON *const cm = &cpi->common; + int i; +@@ -972,7 +980,7 @@ static void encode_tiles_buffer_alloc(VP9_COMP *const cpi) { + memset(cpi->vp9_bitstream_worker_data, 0, worker_data_size); + for (i = 1; i < cpi->num_workers; ++i) { + cpi->vp9_bitstream_worker_data[i].dest_size = +- cpi->oxcf.width * cpi->oxcf.height; ++ encode_tiles_buffer_alloc_size(cpi); + CHECK_MEM_ERROR(&cm->error, cpi->vp9_bitstream_worker_data[i].dest, + vpx_malloc(cpi->vp9_bitstream_worker_data[i].dest_size)); + } +@@ -987,8 +995,8 @@ static size_t encode_tiles_mt(VP9_COMP *cpi, uint8_t *data_ptr) { + int tile_col = 0; + + if (!cpi->vp9_bitstream_worker_data || +- cpi->vp9_bitstream_worker_data[1].dest_size > +- (cpi->oxcf.width * cpi->oxcf.height)) { ++ cpi->vp9_bitstream_worker_data[1].dest_size != ++ encode_tiles_buffer_alloc_size(cpi)) { + vp9_bitstream_encode_tiles_buffer_dealloc(cpi); + encode_tiles_buffer_alloc(cpi); + } +From 4f90911c049d0278e900b94947fd0055b26d646e Mon Sep 17 00:00:00 2001 +From: Marco Paniconi <marpan@google.com> +Date: Sat, 16 Mar 2024 10:39:28 -0700 +Subject: [PATCH] [Backport] Security bug 329674887 (2/2) + +Cherry-pick of patch originally reviewed on +https://chromium-review.googlesource.com/c/webm/libvpx/+/5375794:vp9: fix to integer overflow test + +failure for the 16k test: issue introduced +in: c29e637283 + +Bug: b/329088759, b/329674887, b/329179808 + +Change-Id: I88e8a36b7f13223997c3006c84aec9cfa48c0bcf +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/553294 +Reviewed-by: Michal Klocek <michal.klocek@qt.io> +--- + .../libvpx/source/libvpx/vp9/encoder/vp9_bitstream.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_bitstream.c b/chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_bitstream.c +index 88a031e5fc1..d3c029da4ba 100644 +--- src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_bitstream.c ++++ src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_bitstream.c +@@ -967,7 +967,9 @@ static int encode_tiles_buffer_alloc_size(VP9_COMP *const cpi) { + const int image_bps = + (8 + 2 * (8 >> (cm->subsampling_x + cm->subsampling_y))) * + (1 + (cm->bit_depth > 8)); +- return cpi->oxcf.width * cpi->oxcf.height * image_bps / 8; ++ const int64_t size = ++ (int64_t)cpi->oxcf.width * cpi->oxcf.height * image_bps / 8; ++ return (int)size; + } + + static void encode_tiles_buffer_alloc(VP9_COMP *const cpi) { +From 5af5e96fba0c40d3ddef2720de9117b6a4d6c267 Mon Sep 17 00:00:00 2001 +From: Peng Huang <penghuang@chromium.org> +Date: Wed, 20 Mar 2024 16:22:16 +0000 +Subject: [PATCH] [Backport] Security bug 327183408 + +Cherry-pick of patch originally reviewed on +https://chromium-review.googlesource.com/c/chromium/src/+/5382202: +Fix PaintImage deserialization arbitrary-read issue + +(cherry picked from commit 47e8386c97ac7a84a96866fbd35422b99a01de5a) + +Bug: 327183408 +Change-Id: I09927fbae60b666aaa370e3aba01607cdb977a25 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5370455 +Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org> +Commit-Queue: Peng Huang <penghuang@chromium.org> +Cr-Original-Commit-Position: refs/heads/main@{#1272930} +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5382202 +Auto-Submit: Peng Huang <penghuang@chromium.org> +Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org> +Cr-Commit-Position: refs/branch-heads/6261@{#1106} +Cr-Branched-From: 9755d9d81e4a8cb5b4f76b23b761457479dbb06b-refs/heads/main@{#1250580} +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/553295 +Reviewed-by: Michal Klocek <michal.klocek@qt.io> +--- + chromium/cc/paint/paint_op_reader.cc | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/chromium/cc/paint/paint_op_reader.cc b/chromium/cc/paint/paint_op_reader.cc +index 935dbb05a50..6d920c33562 100644 +--- src/3rdparty/chromium/cc/paint/paint_op_reader.cc ++++ src/3rdparty/chromium/cc/paint/paint_op_reader.cc +@@ -1532,9 +1532,10 @@ inline void PaintOpReader::DidRead(size_t bytes_read) { + // All data are aligned with PaintOpWriter::kDefaultAlignment at least. + size_t aligned_bytes = + base::bits::AlignUp(bytes_read, PaintOpWriter::kDefaultAlignment); +- memory_ += aligned_bytes; + DCHECK_LE(aligned_bytes, remaining_bytes_); +- remaining_bytes_ -= aligned_bytes; ++ bytes_read = std::min(aligned_bytes, remaining_bytes_); ++ memory_ += bytes_read; ++ remaining_bytes_ -= bytes_read; + } + + } // namespace cc +From 0a17b9024c84404e4693718bbbd056517a2874a3 Mon Sep 17 00:00:00 2001 +From: Darius Mercadier <dmercadier@chromium.org> +Date: Fri, 22 Mar 2024 17:55:04 +0100 +Subject: [PATCH] [Backport] CVE-2024-3159: Out of bounds memory access in V8 + +Cherry-pick of patch originally reviewed on +https://chromium-review.googlesource.com/c/v8/v8/+/5401859: +Merged: [runtime] Recreate enum cache on map update if any previous map had one + +If any previous map in the transition tree had an enum cache, then we +recreate one when updating the map. + +Bug: 330760873 +(cherry picked from commit 807cf7d0b7d96212c98ed2119e07f9b2c6a23f61) + +Change-Id: Ia9ea4cf17fef60166a0c037318eb539866aac37a +Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5401859 +Reviewed-by: Igor Sheludko <ishell@chromium.org> +Commit-Queue: Igor Sheludko <ishell@chromium.org> +Auto-Submit: Darius Mercadier <dmercadier@chromium.org> +Cr-Commit-Position: refs/branch-heads/12.2@{#52} +Cr-Branched-From: 6eb5a9616aa6f8c705217aeb7c7ab8c037a2f676-refs/heads/12.2.281@{#1} +Cr-Branched-From: 44cf56d850167c6988522f8981730462abc04bcc-refs/heads/main@{#91934} +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/553296 +Reviewed-by: Michal Klocek <michal.klocek@qt.io> +--- + chromium/v8/src/objects/map-updater.cc | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +diff --git a/chromium/v8/src/objects/map-updater.cc b/chromium/v8/src/objects/map-updater.cc +index 613a4921637..1d649373274 100644 +--- src/3rdparty/chromium/v8/src/objects/map-updater.cc ++++ src/3rdparty/chromium/v8/src/objects/map-updater.cc +@@ -1038,14 +1038,21 @@ MapUpdater::State MapUpdater::ConstructNewMap() { + Handle<Map> new_map = + Map::AddMissingTransitions(isolate_, split_map, new_descriptors); + ++ bool had_any_enum_cache = ++ split_map->instance_descriptors(isolate_) ++ ->enum_cache() ++ ->keys() ++ ->length() > 0 || ++ old_descriptors_->enum_cache()->keys()->length() > 0; ++ + // Deprecated part of the transition tree is no longer reachable, so replace + // current instance descriptors in the "survived" part of the tree with + // the new descriptors to maintain descriptors sharing invariant. + split_map->ReplaceDescriptors(isolate_, *new_descriptors); + +- // If the old descriptors had an enum cache, make sure the new ones do too. +- if (old_descriptors_->enum_cache()->keys()->length() > 0 && +- new_map->NumberOfEnumerableProperties() > 0) { ++ // If the old descriptors had an enum cache (or if {split_map}'s descriptors ++ // had one), make sure the new ones do too. ++ if (had_any_enum_cache && new_map->NumberOfEnumerableProperties() > 0) { + FastKeyAccumulator::InitializeFastPropertyEnumCache( + isolate_, new_map, new_map->NumberOfEnumerableProperties()); + } +From e76cac29493b1cb4b055f8944ea1e4e1284a12e6 Mon Sep 17 00:00:00 2001 +From: Raphael Kubo Da Costa <raphael.kubo.da.costa@intel.com> +Date: Thu, 21 Mar 2024 16:50:44 +0000 +Subject: [PATCH] [Backport] Security bug 326349405 + +Cherry-pick of patch originally reviewed on +https://chromium-review.googlesource.com/c/chromium/src/+/5383440: +Reland "sensors WinRT: Call OnReadingChangedCallback() via PostTask()" + +This reverts commit 745ca2de005c052f58097ef9cb7aa2deff095cf4. + +Reason for revert: Reapproved by pgrace@ in the bug. + +Original change's description: +> Revert "sensors WinRT: Call OnReadingChangedCallback() via PostTask()" +> +> This reverts commit 7e93b6a926ab65cc7ff1293bdcf0099c6e6e4e4e. +> +> Reason for revert: Requested in the bug by pgrace@ +> +> Original change's description: +> > sensors WinRT: Call OnReadingChangedCallback() via PostTask() +> > +> > While here, also add checks to make sure each method is running on the +> > right sequence and make |minimum_report_interval_| guarded by |lock_| +> > since it is accessed by the main task runner just like |client_|. +> > +> > There is a significant amount of changes in the unit tests for two +> > reasons: +> > 1. We now use multiple task runners and create Reader objects in a COM +> > STA task runner to better simulate what happens in production. +> > 2. Doing so has uncovered bugs in the exist tests that had to be fixed. +> > Namely: +> > - One of the biggest offenders was the use of EXPECT_CALL() with +> > WillRepeatedly() for expecting calls to OnReadingUpdated(). Using +> > only WillRepeatedly() meant the control over the cardinality of the +> > expectations was not very strict, and sometimes callbacks were +> > simply not being run. +> > Now that TriggerFakeSensorReading() is asynchronous and we need to +> > use a base::RunLoop to ensure, we are also using WillOnce() a lot +> > more than WillRepeatedly() so that we set one expectation, call +> > TriggerFakeSensorReading() and consume it immediately. +> > - The *Thresholding tests were affected by the problem above, and +> > fixing them showed that several callbacks were not being invoked. +> > Many checks where values were increased by the exact threshold +> > amount were broken because the manipulated values are floats and +> > doubles, and the math operations on them in the +> > OnReadingChangedCallback() implementations caused the comparisons +> > with exact values to fail. In this case, it was simpler to just +> > remove those specific tests, as the "values bigger than the +> > threshold" case are already covered by other checks. +> > - Also as a consequence of the above, *Thresholding tests with +> > multi-axis values were also broken when they went from testing that +> > values did not pass the threshold checks to the first test that +> > verifies that an axis passes the threshold check. This caused all +> > previous |last_sent_*| variables to be stored in the Reader, and +> > other calls to threshold_helper(true) would fail. The fix here was +> > to reorder the calls so that each axis is tested entirely before +> > the next. +> > +> > (cherry picked from commit 2aafa000795519b5153125673f87c734f7b8ae9f) +> > +> > Bug: 326349405 +> > Change-Id: Ief67720e8c449af1ce4f450002103a20ca1830ee +> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5340216 +> > Auto-Submit: Raphael Kubo Da Costa <raphael.kubo.da.costa@intel.com> +> > Commit-Queue: Raphael Kubo Da Costa <raphael.kubo.da.costa@intel.com> +> > Reviewed-by: Reilly Grant <reillyg@chromium.org> +> > Cr-Original-Commit-Position: refs/heads/main@{#1268797} +> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5372846 +> > Reviewed-by: Colin Blundell <blundell@chromium.org> +> > Cr-Commit-Position: refs/branch-heads/6261@{#1079} +> > Cr-Branched-From: 9755d9d81e4a8cb5b4f76b23b761457479dbb06b-refs/heads/main@{#1250580} +> +> Bug: 326349405 +> Change-Id: I49d61cf7bdf2a00004aa565a5439ad813b1c379e +> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5378404 +> Commit-Queue: Raphael Kubo Da Costa <raphael.kubo.da.costa@intel.com> +> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> +> Cr-Commit-Position: refs/branch-heads/6261@{#1090} +> Cr-Branched-From: 9755d9d81e4a8cb5b4f76b23b761457479dbb06b-refs/heads/main@{#1250580} + +Bug: 326349405 +Change-Id: I3bcba8840a3a10cd4660ec287fa24623bcf87657 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5383440 +Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> +Commit-Queue: Raphael Kubo Da Costa <raphael.kubo.da.costa@intel.com> +Cr-Commit-Position: refs/branch-heads/6261@{#1111} +Cr-Branched-From: 9755d9d81e4a8cb5b4f76b23b761457479dbb06b-refs/heads/main@{#1250580} +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/553297 +Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> +--- + .../platform_sensor_reader_winrt.cc | 79 +- + .../platform_sensor_reader_winrt.h | 32 +- + .../platform_sensor_reader_winrt_unittests.cc | 787 ++++++++++-------- + .../generic_sensor/platform_sensor_win.cc | 3 + + 4 files changed, 549 insertions(+), 352 deletions(-) + +diff --git a/chromium/services/device/generic_sensor/platform_sensor_reader_winrt.cc b/chromium/services/device/generic_sensor/platform_sensor_reader_winrt.cc +index 6c778b7edf0c..673225e398a2 100644 +--- src/3rdparty/chromium/services/device/generic_sensor/platform_sensor_reader_winrt.cc ++++ src/3rdparty/chromium/services/device/generic_sensor/platform_sensor_reader_winrt.cc +@@ -8,6 +8,7 @@ + + #include "base/numerics/math_constants.h" + #include "base/time/time.h" ++#include "base/win/com_init_util.h" + #include "base/win/core_winrt_util.h" + #include "services/device/generic_sensor/generic_sensor_consts.h" + #include "services/device/public/mojom/sensor.mojom.h" +@@ -99,7 +100,11 @@ PlatformSensorReaderWinrtBase< + ISensorWinrtStatics, + ISensorWinrtClass, + ISensorReadingChangedHandler, +- ISensorReadingChangedEventArgs>::PlatformSensorReaderWinrtBase() { ++ ISensorReadingChangedEventArgs>::PlatformSensorReaderWinrtBase() ++ : com_sta_task_runner_(base::SingleThreadTaskRunner::GetCurrentDefault()) { ++ DCHECK_CALLED_ON_VALID_SEQUENCE(com_sta_sequence_checker_); ++ DETACH_FROM_SEQUENCE(main_sequence_checker_); ++ + get_sensor_factory_callback_ = + base::BindRepeating([](ISensorWinrtStatics** sensor_factory) -> HRESULT { + return base::win::GetActivationFactory<ISensorWinrtStatics, +@@ -119,6 +124,8 @@ void PlatformSensorReaderWinrtBase< + ISensorWinrtClass, + ISensorReadingChangedHandler, + ISensorReadingChangedEventArgs>::SetClient(Client* client) { ++ DCHECK_CALLED_ON_VALID_SEQUENCE(main_sequence_checker_); ++ + base::AutoLock autolock(lock_); + client_ = client; + } +@@ -136,6 +143,8 @@ HRESULT PlatformSensorReaderWinrtBase<runtime_class_id, + ISensorReadingChangedEventArgs>:: + ConvertSensorReadingTimeStamp(ComPtr<ISensorReading> sensor_reading, + base::TimeDelta* timestamp_delta) { ++ DCHECK_CALLED_ON_VALID_SEQUENCE(com_sta_sequence_checker_); ++ + DateTime timestamp; + HRESULT hr = sensor_reading->get_Timestamp(×tamp); + if (FAILED(hr)) +@@ -157,6 +166,8 @@ bool PlatformSensorReaderWinrtBase< + ISensorWinrtClass, + ISensorReadingChangedHandler, + ISensorReadingChangedEventArgs>::Initialize() { ++ DCHECK_CALLED_ON_VALID_SEQUENCE(com_sta_sequence_checker_); ++ + ComPtr<ISensorWinrtStatics> sensor_statics; + + HRESULT hr = get_sensor_factory_callback_.Run(&sensor_statics); +@@ -180,10 +191,14 @@ bool PlatformSensorReaderWinrtBase< + return false; + } + +- minimum_report_interval_ = GetMinimumReportIntervalFromSensor(); ++ { ++ base::AutoLock autolock(lock_); ++ minimum_report_interval_ = GetMinimumReportIntervalFromSensor(); + +- if (minimum_report_interval_.is_zero()) +- DLOG(WARNING) << "Failed to get sensor minimum report interval"; ++ if (minimum_report_interval_.is_zero()) { ++ DLOG(WARNING) << "Failed to get sensor minimum report interval"; ++ } ++ } + + return true; + } +@@ -199,6 +214,8 @@ base::TimeDelta PlatformSensorReaderWinrtBase< + ISensorWinrtClass, + ISensorReadingChangedHandler, + ISensorReadingChangedEventArgs>::GetMinimumReportIntervalFromSensor() { ++ DCHECK_CALLED_ON_VALID_SEQUENCE(com_sta_sequence_checker_); ++ + UINT32 minimum_report_interval_ms = 0; + HRESULT hr = sensor_->get_MinimumReportInterval(&minimum_report_interval_ms); + +@@ -225,6 +242,9 @@ base::TimeDelta PlatformSensorReaderWinrtBase< + ISensorWinrtClass, + ISensorReadingChangedHandler, + ISensorReadingChangedEventArgs>::GetMinimalReportingInterval() const { ++ DCHECK_CALLED_ON_VALID_SEQUENCE(main_sequence_checker_); ++ ++ base::AutoLock autolock(lock_); + return minimum_report_interval_; + } + +@@ -239,6 +259,8 @@ bool PlatformSensorReaderWinrtBase<runtime_class_id, + ISensorReadingChangedHandler, + ISensorReadingChangedEventArgs>:: + StartSensor(const PlatformSensorConfiguration& configuration) { ++ DCHECK_CALLED_ON_VALID_SEQUENCE(main_sequence_checker_); ++ + base::AutoLock autolock(lock_); + + if (!reading_callback_token_) { +@@ -256,7 +278,39 @@ bool PlatformSensorReaderWinrtBase<runtime_class_id, + } + + auto reading_changed_handler = Callback<ISensorReadingChangedHandler>( +- this, &PlatformSensorReaderWinrtBase::OnReadingChangedCallback); ++ [weak_ptr(weak_ptr_factory_.GetWeakPtr()), ++ com_sta_task_runner(com_sta_task_runner_)]( ++ ISensorWinrtClass* sender, ISensorReadingChangedEventArgs* args) { ++ // We cannot invoke OnReadingChangedCallback() directly because this ++ // callback is run on a COM MTA thread spawned by Windows (on tests, ++ // we mimic the behavior by using base::ThreadPool, as the task ++ // scheduler threads live in the MTA). ++ // ++ // This callback is invoked on an MTA thread because the ++ // ISensorReadingChangedHandler declarations explicitly inherit from ++ // Microsoft::WRL::FtmBase, which makes them agile, free-threaded ++ // objects. ++ // ++ // We could CHECK() this behavior here, but ::CoGetApartmentType() ++ // depends on ole32.dll and base::win::GetComApartmentTypeForThread() ++ // returns NONE in the non-test code path even though ++ // ::GoGetApartmentType() returns MTA, so the best we can do is just ++ // double-check that this is not running on an STA. ++ DCHECK_NE(base::win::GetComApartmentTypeForThread(), ++ base::win::ComApartmentType::STA); ++ com_sta_task_runner->PostTask( ++ FROM_HERE, ++ base::BindOnce( ++ // TODO(crbug.com/326349405): base::IgnoreResult is being used ++ // temporarily to reduce the amount of changes required for ++ // this bug. OnReadingChangedCallback() must be changed to ++ // have a void return type. ++ base::IgnoreResult( ++ &PlatformSensorReaderWinrtBase::OnReadingChangedCallback), ++ weak_ptr, ComPtr<ISensorWinrtClass>(sender), ++ ComPtr<ISensorReadingChangedEventArgs>(args))); ++ return S_OK; ++ }); + + EventRegistrationToken event_token; + hr = sensor_->add_ReadingChanged(reading_changed_handler.Get(), +@@ -285,6 +339,9 @@ void PlatformSensorReaderWinrtBase< + ISensorWinrtClass, + ISensorReadingChangedHandler, + ISensorReadingChangedEventArgs>::StopSensor() { ++ // This function is called in the main task runner by PlatformSensorWin as ++ // well as in the com_sta_task_runner_ by the destructor. ++ + base::AutoLock autolock(lock_); + + if (reading_callback_token_) { +@@ -316,6 +373,8 @@ PlatformSensorReaderWinrtLightSensor::PlatformSensorReaderWinrtLightSensor() = + HRESULT PlatformSensorReaderWinrtLightSensor::OnReadingChangedCallback( + ILightSensor* light_sensor, + ILightSensorReadingChangedEventArgs* reading_changed_args) { ++ DCHECK_CALLED_ON_VALID_SEQUENCE(com_sta_sequence_checker_); ++ + ComPtr<ILightSensorReading> light_sensor_reading; + HRESULT hr = reading_changed_args->get_Reading(&light_sensor_reading); + if (FAILED(hr)) { +@@ -379,6 +438,8 @@ PlatformSensorReaderWinrtAccelerometer:: + HRESULT PlatformSensorReaderWinrtAccelerometer::OnReadingChangedCallback( + IAccelerometer* accelerometer, + IAccelerometerReadingChangedEventArgs* reading_changed_args) { ++ DCHECK_CALLED_ON_VALID_SEQUENCE(com_sta_sequence_checker_); ++ + ComPtr<IAccelerometerReading> accelerometer_reading; + HRESULT hr = reading_changed_args->get_Reading(&accelerometer_reading); + if (FAILED(hr)) { +@@ -464,6 +525,8 @@ PlatformSensorReaderWinrtGyrometer::PlatformSensorReaderWinrtGyrometer() = + HRESULT PlatformSensorReaderWinrtGyrometer::OnReadingChangedCallback( + IGyrometer* gyrometer, + IGyrometerReadingChangedEventArgs* reading_changed_args) { ++ DCHECK_CALLED_ON_VALID_SEQUENCE(com_sta_sequence_checker_); ++ + ComPtr<IGyrometerReading> gyrometer_reading; + HRESULT hr = reading_changed_args->get_Reading(&gyrometer_reading); + if (FAILED(hr)) { +@@ -548,6 +611,8 @@ PlatformSensorReaderWinrtMagnetometer::PlatformSensorReaderWinrtMagnetometer() = + HRESULT PlatformSensorReaderWinrtMagnetometer::OnReadingChangedCallback( + IMagnetometer* magnetometer, + IMagnetometerReadingChangedEventArgs* reading_changed_args) { ++ DCHECK_CALLED_ON_VALID_SEQUENCE(com_sta_sequence_checker_); ++ + ComPtr<IMagnetometerReading> magnetometer_reading; + HRESULT hr = reading_changed_args->get_Reading(&magnetometer_reading); + if (FAILED(hr)) { +@@ -631,6 +696,8 @@ HRESULT + PlatformSensorReaderWinrtAbsOrientationEulerAngles::OnReadingChangedCallback( + IInclinometer* inclinometer, + IInclinometerReadingChangedEventArgs* reading_changed_args) { ++ DCHECK_CALLED_ON_VALID_SEQUENCE(com_sta_sequence_checker_); ++ + ComPtr<IInclinometerReading> inclinometer_reading; + HRESULT hr = reading_changed_args->get_Reading(&inclinometer_reading); + if (FAILED(hr)) { +@@ -717,6 +784,8 @@ HRESULT + PlatformSensorReaderWinrtAbsOrientationQuaternion::OnReadingChangedCallback( + IOrientationSensor* orientation_sensor, + IOrientationSensorReadingChangedEventArgs* reading_changed_args) { ++ DCHECK_CALLED_ON_VALID_SEQUENCE(com_sta_sequence_checker_); ++ + ComPtr<IOrientationSensorReading> orientation_sensor_reading; + HRESULT hr = reading_changed_args->get_Reading(&orientation_sensor_reading); + if (FAILED(hr)) { +diff --git a/chromium/services/device/generic_sensor/platform_sensor_reader_winrt.h b/chromium/services/device/generic_sensor/platform_sensor_reader_winrt.h +index 66c40adc59e8..e4521a7816fa 100644 +--- src/3rdparty/chromium/services/device/generic_sensor/platform_sensor_reader_winrt.h ++++ src/3rdparty/chromium/services/device/generic_sensor/platform_sensor_reader_winrt.h +@@ -14,7 +14,10 @@ + + #include "base/functional/callback.h" + #include "base/memory/raw_ptr.h" ++#include "base/memory/weak_ptr.h" ++#include "base/sequence_checker.h" + #include "base/synchronization/lock.h" ++#include "base/task/single_thread_task_runner.h" + #include "base/thread_annotations.h" + #include "base/time/time.h" + #include "services/device/generic_sensor/platform_sensor_reader_win_base.h" +@@ -77,7 +80,10 @@ class PlatformSensorReaderWinrtBase : public PlatformSensorReaderWinBase { + + protected: + PlatformSensorReaderWinrtBase(); +- virtual ~PlatformSensorReaderWinrtBase() { StopSensor(); } ++ virtual ~PlatformSensorReaderWinrtBase() { ++ DCHECK_CALLED_ON_VALID_SEQUENCE(com_sta_sequence_checker_); ++ StopSensor(); ++ } + + // Derived classes should implement this function to handle sensor specific + // parsing of the sensor reading. +@@ -93,11 +99,15 @@ class PlatformSensorReaderWinrtBase : public PlatformSensorReaderWinBase { + Microsoft::WRL::ComPtr<ISensorReading> sensor_reading, + base::TimeDelta* timestamp_delta); + +- // Following class member is protected by lock since SetClient, +- // StartSensor, and StopSensor can all be called from different +- // threads by PlatformSensorWin. +- base::Lock lock_; +- // Null if there is no client to notify, non-null otherwise. ++ SEQUENCE_CHECKER(com_sta_sequence_checker_); ++ SEQUENCE_CHECKER(main_sequence_checker_); ++ ++ mutable base::Lock lock_; ++ ++ // Null if there is no client to notify, non-null otherwise. Protected by ++ // |lock_| because SetClient() and StartSensor() are called from the main ++ // task runner rather than the thread where this object is created, and ++ // StopSensor() may be called from the main task runner too. + raw_ptr<Client, DanglingUntriaged> client_ GUARDED_BY(lock_); + + // Always report the first sample received after starting the sensor. +@@ -106,13 +116,21 @@ class PlatformSensorReaderWinrtBase : public PlatformSensorReaderWinBase { + private: + base::TimeDelta GetMinimumReportIntervalFromSensor(); + ++ // Task runner where this object was created. ++ scoped_refptr<base::SingleThreadTaskRunner> com_sta_task_runner_; ++ + GetSensorFactoryFunctor get_sensor_factory_callback_; + + // absl::nullopt if the sensor has not been started, non-empty otherwise. + absl::optional<EventRegistrationToken> reading_callback_token_; + +- base::TimeDelta minimum_report_interval_; ++ // Protected by |lock_| because GetMinimalReportingInterval() is called from ++ // the main task runner. ++ base::TimeDelta minimum_report_interval_ GUARDED_BY(lock_); ++ + Microsoft::WRL::ComPtr<ISensorWinrtClass> sensor_; ++ ++ base::WeakPtrFactory<PlatformSensorReaderWinrtBase> weak_ptr_factory_{this}; + }; + + class PlatformSensorReaderWinrtLightSensor final +diff --git a/chromium/services/device/generic_sensor/platform_sensor_reader_winrt_unittests.cc b/chromium/services/device/generic_sensor/platform_sensor_reader_winrt_unittests.cc +index 2283de90c75d..f6add828b496 100644 +--- src/3rdparty/chromium/services/device/generic_sensor/platform_sensor_reader_winrt_unittests.cc ++++ src/3rdparty/chromium/services/device/generic_sensor/platform_sensor_reader_winrt_unittests.cc +@@ -6,8 +6,13 @@ + + #include <objbase.h> + ++#include "base/notreached.h" + #include "base/numerics/math_constants.h" ++#include "base/run_loop.h" ++#include "base/task/task_traits.h" ++#include "base/task/thread_pool.h" + #include "base/test/bind.h" ++#include "base/test/gmock_callback_support.h" + #include "base/test/task_environment.h" + #include "base/win/core_winrt_util.h" + #include "base/win/scoped_com_initializer.h" +@@ -428,15 +433,26 @@ class FakeSensorWinrt + return remove_reading_changed_return_code_; + } + +- // Makes any clients registered via add_ReadingChanged() to trigger with +- // the given sensor reading. ++ // Invokes the handler added via add_ReadingChanged() with the reading ++ // described by |reading|. ++ // ++ // The invocation is asynchronous to better simulate real behavior, where ++ // Windows delivers the reading notifications in a separate MTA thread. + void TriggerFakeSensorReading( + Microsoft::WRL::ComPtr<ISensorReading> reading) { +- EXPECT_TRUE(handler_); + Microsoft::WRL::ComPtr<ISensorReadingChangedEventArgs> reading_event_args = + Microsoft::WRL::Make<FakeSensorReadingChangedEventArgsWinrt< + ISensorReading, ISensorReadingChangedEventArgs>>(reading); +- EXPECT_HRESULT_SUCCEEDED(handler_->Invoke(this, reading_event_args.Get())); ++ base::ThreadPool::PostTask( ++ FROM_HERE, {base::MayBlock()}, ++ base::BindLambdaForTesting( ++ // Copy |handler_| and |reading_event_args| to ensure they do not ++ // lose their values when TriggerFakeSensorReading() exits. ++ [this, handler = handler_, reading_event_args]() { ++ ASSERT_TRUE(handler); ++ EXPECT_HRESULT_SUCCEEDED( ++ handler->Invoke(this, reading_event_args.Get())); ++ })); + } + + // Returns true if any clients are registered for readings via +@@ -547,7 +563,47 @@ class FakeSensorFactoryWinrt + }; + + class PlatformSensorReaderTestWinrt : public testing::Test { +- private: ++ public: ++ void SetUp() override { ++ // Ensure each test starts with a fresh task runner. ++ com_sta_task_runner_ = ++ base::ThreadPool::CreateCOMSTATaskRunner({base::MayBlock()}); ++ } ++ ++ // Synchronously creates a new PlatformSensorReaderWinrtBase-derived class on ++ // |com_sta_task_runner_| and returns it. ++ // ++ // This better simulates real behavior, as PlatformSensorProviderWinrt ++ // creates readers on a COM STA task runner. ++ template <typename SensorReader, ++ typename ISensorStatics, ++ typename... OtherFactoryTypes> ++ auto CreateAndInitializeSensor( ++ const Microsoft::WRL::ComPtr< ++ FakeSensorFactoryWinrt<ISensorStatics, OtherFactoryTypes...>>& ++ fake_sensor_factory) { ++ std::unique_ptr<SensorReader, base::OnTaskRunnerDeleter> reader( ++ nullptr, base::OnTaskRunnerDeleter(com_sta_task_runner_)); ++ ++ base::RunLoop run_loop; ++ com_sta_task_runner_->PostTaskAndReply( ++ FROM_HERE, base::BindLambdaForTesting([&]() { ++ reader.reset(new SensorReader); ++ reader->InitForTesting(base::BindLambdaForTesting( ++ [&](ISensorStatics** sensor_factory) -> HRESULT { ++ return fake_sensor_factory.CopyTo(sensor_factory); ++ })); ++ ASSERT_TRUE(reader->Initialize()); ++ }), ++ run_loop.QuitClosure()); ++ run_loop.Run(); ++ ++ return reader; ++ } ++ ++ protected: ++ scoped_refptr<base::SingleThreadTaskRunner> com_sta_task_runner_; ++ + base::test::TaskEnvironment task_environment_; + base::win::ScopedCOMInitializer scoped_com_initializer_; + }; +@@ -602,11 +658,9 @@ TEST_F(PlatformSensorReaderTestWinrt, SensorMinimumReportInterval) { + ABI::Windows::Devices::Sensors::LightSensorReadingChangedEventArgs>>(); + auto fake_sensor = fake_sensor_factory->fake_sensor_; + +- auto sensor = std::make_unique<PlatformSensorReaderWinrtLightSensor>(); +- sensor->InitForTesting(base::BindLambdaForTesting( +- [&](ABI::Windows::Devices::Sensors::ILightSensorStatics** sensor_factory) +- -> HRESULT { return fake_sensor_factory.CopyTo(sensor_factory); })); +- EXPECT_TRUE(sensor->Initialize()); ++ auto sensor = CreateAndInitializeSensor<PlatformSensorReaderWinrtLightSensor>( ++ fake_sensor_factory); ++ ASSERT_TRUE(sensor); + + EXPECT_EQ(sensor->GetMinimalReportingInterval().InMilliseconds(), + kExpectedMinimumReportInterval); +@@ -623,20 +677,42 @@ TEST_F(PlatformSensorReaderTestWinrt, FailedSensorMinimumReportInterval) { + ABI::Windows::Devices::Sensors::ILightSensorReadingChangedEventArgs, + ABI::Windows::Devices::Sensors::LightSensorReadingChangedEventArgs>>(); + auto fake_sensor = fake_sensor_factory->fake_sensor_; +- +- auto sensor = std::make_unique<PlatformSensorReaderWinrtLightSensor>(); + fake_sensor->SetGetMinimumReportIntervalReturnCode(E_FAIL); +- sensor->InitForTesting(base::BindLambdaForTesting( +- [&](ABI::Windows::Devices::Sensors::ILightSensorStatics** sensor_factory) +- -> HRESULT { return fake_sensor_factory.CopyTo(sensor_factory); })); +- EXPECT_TRUE(sensor->Initialize()); ++ ++ auto sensor = CreateAndInitializeSensor<PlatformSensorReaderWinrtLightSensor>( ++ fake_sensor_factory); ++ ASSERT_TRUE(sensor); + + EXPECT_EQ(sensor->GetMinimalReportingInterval().InMilliseconds(), 0); + } + +-// Tests that PlatformSensorReaderWinrtBase converts the timestamp correctly +-TEST_F(PlatformSensorReaderTestWinrt, SensorTimestampConversion) { +- static constexpr double expectedTimestampDeltaSecs = 19.0; ++TEST_F(PlatformSensorReaderTestWinrt, ReadingChangedCallbackAndPostTask) { ++ // Instead of using PlatformSensorReaderWinrtLightSensor, declare a custom ++ // implementation that does less and whose sole purpose is to assert that its ++ // OnReadingChangedCallback() implementation is never called. ++ struct CustomLightSensor ++ : public PlatformSensorReaderWinrtBase< ++ RuntimeClass_Windows_Devices_Sensors_LightSensor, ++ ABI::Windows::Devices::Sensors::ILightSensorStatics, ++ ABI::Windows::Devices::Sensors::ILightSensor, ++ Microsoft::WRL::Implements< ++ Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>, ++ ABI::Windows::Foundation::ITypedEventHandler< ++ ABI::Windows::Devices::Sensors::LightSensor*, ++ ABI::Windows::Devices::Sensors:: ++ LightSensorReadingChangedEventArgs*>, ++ Microsoft::WRL::FtmBase>, ++ ABI::Windows::Devices::Sensors:: ++ ILightSensorReadingChangedEventArgs> { ++ ~CustomLightSensor() override = default; ++ ++ HRESULT OnReadingChangedCallback( ++ ABI::Windows::Devices::Sensors::ILightSensor*, ++ ABI::Windows::Devices::Sensors::ILightSensorReadingChangedEventArgs*) ++ override { ++ NOTREACHED_NORETURN() << "This function should not have been reached"; ++ } ++ }; + + auto fake_sensor_factory = Microsoft::WRL::Make<FakeSensorFactoryWinrt< + ABI::Windows::Devices::Sensors::ILightSensorStatics, +@@ -647,21 +723,57 @@ TEST_F(PlatformSensorReaderTestWinrt, SensorTimestampConversion) { + ABI::Windows::Devices::Sensors::LightSensorReadingChangedEventArgs>>(); + auto fake_sensor = fake_sensor_factory->fake_sensor_; + +- auto sensor = std::make_unique<PlatformSensorReaderWinrtLightSensor>(); +- sensor->InitForTesting(base::BindLambdaForTesting( ++ // Instead of using CreateAndInitializeSensor(), for simplicity and for ++ // better control over |light_sensor|'s lifetime we invert things and create ++ // the object in the main task runner and invoke StartSensor() from another ++ // one. The effect on the Reader is the same -- the calls are still made from ++ // different task runners. ++ auto light_sensor = std::make_unique<CustomLightSensor>(); ++ light_sensor->InitForTesting(base::BindLambdaForTesting( + [&](ABI::Windows::Devices::Sensors::ILightSensorStatics** sensor_factory) + -> HRESULT { return fake_sensor_factory.CopyTo(sensor_factory); })); +- EXPECT_TRUE(sensor->Initialize()); ++ ASSERT_TRUE(light_sensor->Initialize()); ++ ++ base::RunLoop run_loop; ++ base::ThreadPool::PostTaskAndReply( ++ FROM_HERE, base::BindLambdaForTesting([&]() { ++ ASSERT_TRUE(light_sensor->StartSensor( ++ PlatformSensorConfiguration(kExpectedReportFrequencySet))); ++ }), ++ run_loop.QuitClosure()); ++ run_loop.Run(); ++ ++ // The idea here is to rely on the fact that TriggerFakeSensorReading() is ++ // asynchronous: we call it while it has a valid handler, it schedules a ++ // task, we destroy the handler object synchronoustly and then it Invoke()s ++ // the callback, which should never reach ++ // CustomLightSensor::OnReadingChangedCallback(). ++ Microsoft::WRL::ComPtr<ABI::Windows::Devices::Sensors::ILightSensorReading> ++ reading = Microsoft::WRL::Make<FakeLightSensorReadingWinrt>( ++ ABI::Windows::Foundation::DateTime{}, 0.0f); ++ fake_sensor->TriggerFakeSensorReading(reading); ++ light_sensor.reset(); ++ task_environment_.RunUntilIdle(); ++} + +- auto mock_client = std::make_unique<testing::NiceMock<MockClient>>(); ++// Tests that PlatformSensorReaderWinrtBase converts the timestamp correctly ++TEST_F(PlatformSensorReaderTestWinrt, SensorTimestampConversion) { ++ static constexpr double expectedTimestampDeltaSecs = 19.0; + +- double lastReportedTimestamp = 0.0; +- EXPECT_CALL(*mock_client, OnReadingUpdated(::testing::_)) +- .WillRepeatedly(testing::Invoke([&](const SensorReading& reading) { +- lastReportedTimestamp = reading.als.timestamp; +- EXPECT_EQ(reading.als.value, 0.0f); +- })); ++ auto fake_sensor_factory = Microsoft::WRL::Make<FakeSensorFactoryWinrt< ++ ABI::Windows::Devices::Sensors::ILightSensorStatics, ++ ABI::Windows::Devices::Sensors::ILightSensor, ++ ABI::Windows::Devices::Sensors::LightSensor, ++ ABI::Windows::Devices::Sensors::ILightSensorReading, ++ ABI::Windows::Devices::Sensors::ILightSensorReadingChangedEventArgs, ++ ABI::Windows::Devices::Sensors::LightSensorReadingChangedEventArgs>>(); ++ auto fake_sensor = fake_sensor_factory->fake_sensor_; ++ ++ auto sensor = CreateAndInitializeSensor<PlatformSensorReaderWinrtLightSensor>( ++ fake_sensor_factory); ++ ASSERT_TRUE(sensor); + ++ auto mock_client = std::make_unique<testing::NiceMock<MockClient>>(); + sensor->SetClient(mock_client.get()); + + PlatformSensorConfiguration sensor_config(kExpectedReportFrequencySet); +@@ -672,18 +784,35 @@ TEST_F(PlatformSensorReaderTestWinrt, SensorTimestampConversion) { + Microsoft::WRL::ComPtr<ABI::Windows::Devices::Sensors::ILightSensorReading> + reading = Microsoft::WRL::Make<FakeLightSensorReadingWinrt>( + ABI::Windows::Foundation::DateTime{}, 0.0f); +- fake_sensor->TriggerFakeSensorReading(reading); +- EXPECT_EQ(lastReportedTimestamp, 0); ++ { ++ base::RunLoop run_loop; ++ EXPECT_CALL(*mock_client, OnReadingUpdated(::testing::_)) ++ .WillOnce(testing::Invoke([&](const SensorReading& reading) { ++ EXPECT_EQ(reading.als.timestamp, 0.0); ++ EXPECT_EQ(reading.als.value, 0.0f); ++ run_loop.Quit(); ++ })); ++ fake_sensor->TriggerFakeSensorReading(reading); ++ run_loop.Run(); ++ } + ++ // Verify the reported time stamp has ticked forward ++ // expectedTimestampDeltaSecs + auto second_timestamp = + base::Seconds(expectedTimestampDeltaSecs).ToWinrtDateTime(); + reading = + Microsoft::WRL::Make<FakeLightSensorReadingWinrt>(second_timestamp, 0.0f); +- fake_sensor->TriggerFakeSensorReading(reading); +- +- // Verify the reported time stamp has ticked forward +- // expectedTimestampDeltaSecs +- EXPECT_EQ(lastReportedTimestamp, expectedTimestampDeltaSecs); ++ { ++ base::RunLoop run_loop; ++ EXPECT_CALL(*mock_client, OnReadingUpdated(::testing::_)) ++ .WillOnce(testing::Invoke([&](const SensorReading& reading) { ++ EXPECT_EQ(reading.als.timestamp, expectedTimestampDeltaSecs); ++ EXPECT_EQ(reading.als.value, 0.0f); ++ run_loop.Quit(); ++ })); ++ fake_sensor->TriggerFakeSensorReading(reading); ++ run_loop.Run(); ++ } + } + + // Tests that PlatformSensorReaderWinrtBase starts and stops the +@@ -698,11 +827,9 @@ TEST_F(PlatformSensorReaderTestWinrt, StartStopSensorCallbacks) { + ABI::Windows::Devices::Sensors::LightSensorReadingChangedEventArgs>>(); + auto fake_sensor = fake_sensor_factory->fake_sensor_; + +- auto sensor = std::make_unique<PlatformSensorReaderWinrtLightSensor>(); +- sensor->InitForTesting(base::BindLambdaForTesting( +- [&](ABI::Windows::Devices::Sensors::ILightSensorStatics** sensor_factory) +- -> HRESULT { return fake_sensor_factory.CopyTo(sensor_factory); })); +- EXPECT_TRUE(sensor->Initialize()); ++ auto sensor = CreateAndInitializeSensor<PlatformSensorReaderWinrtLightSensor>( ++ fake_sensor_factory); ++ ASSERT_TRUE(sensor); + + PlatformSensorConfiguration sensor_config(kExpectedReportFrequencySet); + EXPECT_TRUE(sensor->StartSensor(sensor_config)); +@@ -732,17 +859,19 @@ TEST_F(PlatformSensorReaderTestWinrt, StartWithoutStopSensorCallbacks) { + ABI::Windows::Devices::Sensors::LightSensorReadingChangedEventArgs>>(); + auto fake_sensor = fake_sensor_factory->fake_sensor_; + +- auto sensor = std::make_unique<PlatformSensorReaderWinrtLightSensor>(); +- sensor->InitForTesting(base::BindLambdaForTesting( +- [&](ABI::Windows::Devices::Sensors::ILightSensorStatics** sensor_factory) +- -> HRESULT { return fake_sensor_factory.CopyTo(sensor_factory); })); +- EXPECT_TRUE(sensor->Initialize()); ++ auto sensor = CreateAndInitializeSensor<PlatformSensorReaderWinrtLightSensor>( ++ fake_sensor_factory); ++ ASSERT_TRUE(sensor); + + PlatformSensorConfiguration sensor_config(kExpectedReportFrequencySet); + EXPECT_TRUE(sensor->StartSensor(sensor_config)); + EXPECT_TRUE(fake_sensor->IsSensorStarted()); + ++ // *sensor is deleted in |com_sta_task_runner_|, so we need to wait for it to ++ // happen asynchronously. + sensor.reset(); ++ task_environment_.RunUntilIdle(); ++ + EXPECT_FALSE(fake_sensor->IsSensorStarted()); + } + +@@ -758,11 +887,9 @@ TEST_F(PlatformSensorReaderTestWinrt, FailedSensorStart) { + ABI::Windows::Devices::Sensors::LightSensorReadingChangedEventArgs>>(); + auto fake_sensor = fake_sensor_factory->fake_sensor_; + +- auto sensor = std::make_unique<PlatformSensorReaderWinrtLightSensor>(); +- sensor->InitForTesting(base::BindLambdaForTesting( +- [&](ABI::Windows::Devices::Sensors::ILightSensorStatics** sensor_factory) +- -> HRESULT { return fake_sensor_factory.CopyTo(sensor_factory); })); +- EXPECT_TRUE(sensor->Initialize()); ++ auto sensor = CreateAndInitializeSensor<PlatformSensorReaderWinrtLightSensor>( ++ fake_sensor_factory); ++ ASSERT_TRUE(sensor); + + fake_sensor->SetPutReportIntervalReturnCode(E_FAIL); + +@@ -787,11 +914,9 @@ TEST_F(PlatformSensorReaderTestWinrt, FailedSensorStop) { + ABI::Windows::Devices::Sensors::LightSensorReadingChangedEventArgs>>(); + auto fake_sensor = fake_sensor_factory->fake_sensor_; + +- auto sensor = std::make_unique<PlatformSensorReaderWinrtLightSensor>(); +- sensor->InitForTesting(base::BindLambdaForTesting( +- [&](ABI::Windows::Devices::Sensors::ILightSensorStatics** sensor_factory) +- -> HRESULT { return fake_sensor_factory.CopyTo(sensor_factory); })); +- EXPECT_TRUE(sensor->Initialize()); ++ auto sensor = CreateAndInitializeSensor<PlatformSensorReaderWinrtLightSensor>( ++ fake_sensor_factory); ++ ASSERT_TRUE(sensor); + + PlatformSensorConfiguration sensor_config(kExpectedReportFrequencySet); + EXPECT_TRUE(sensor->StartSensor(sensor_config)); +@@ -813,11 +938,9 @@ TEST_F(PlatformSensorReaderTestWinrt, FailedLightSensorSampleParse) { + ABI::Windows::Devices::Sensors::LightSensorReadingChangedEventArgs>>(); + auto fake_sensor = fake_sensor_factory->fake_sensor_; + +- auto sensor = std::make_unique<PlatformSensorReaderWinrtLightSensor>(); +- sensor->InitForTesting(base::BindLambdaForTesting( +- [&](ABI::Windows::Devices::Sensors::ILightSensorStatics** sensor_factory) +- -> HRESULT { return fake_sensor_factory.CopyTo(sensor_factory); })); +- EXPECT_TRUE(sensor->Initialize()); ++ auto sensor = CreateAndInitializeSensor<PlatformSensorReaderWinrtLightSensor>( ++ fake_sensor_factory); ++ ASSERT_TRUE(sensor); + + auto mock_client = std::make_unique<testing::NiceMock<MockClient>>(); + +@@ -832,12 +955,17 @@ TEST_F(PlatformSensorReaderTestWinrt, FailedLightSensorSampleParse) { + auto reading = Microsoft::WRL::Make<FakeLightSensorReadingWinrt>( + ABI::Windows::Foundation::DateTime{}, 0.0f); + ++ // We cannot use a base::RunLoop in the checks below because we are expecting ++ // that MockClient::OnReadingUpdate() does _not_ get called. ++ + reading->SetGetTimestampReturnCode(E_FAIL); + fake_sensor->TriggerFakeSensorReading(reading); + + reading->SetGetTimestampReturnCode(S_OK); + reading->SetGetIlluminanceInLuxReturnCode(E_FAIL); + fake_sensor->TriggerFakeSensorReading(reading); ++ ++ task_environment_.RunUntilIdle(); + } + + // Tests that PlatformSensorReaderWinrtLightSensor notifies the client +@@ -854,19 +982,11 @@ TEST_F(PlatformSensorReaderTestWinrt, SensorClientNotification) { + ABI::Windows::Devices::Sensors::LightSensorReadingChangedEventArgs>>(); + auto fake_sensor = fake_sensor_factory->fake_sensor_; + +- auto sensor = std::make_unique<PlatformSensorReaderWinrtLightSensor>(); +- sensor->InitForTesting(base::BindLambdaForTesting( +- [&](ABI::Windows::Devices::Sensors::ILightSensorStatics** sensor_factory) +- -> HRESULT { return fake_sensor_factory.CopyTo(sensor_factory); })); +- EXPECT_TRUE(sensor->Initialize()); ++ auto sensor = CreateAndInitializeSensor<PlatformSensorReaderWinrtLightSensor>( ++ fake_sensor_factory); ++ ASSERT_TRUE(sensor); + + auto mock_client = std::make_unique<testing::NiceMock<MockClient>>(); +- +- EXPECT_CALL(*mock_client, OnReadingUpdated(::testing::_)) +- .WillOnce(testing::Invoke([&](const SensorReading& reading) { +- EXPECT_EQ(expected_lux, reading.als.value); +- })); +- + sensor->SetClient(mock_client.get()); + + PlatformSensorConfiguration sensor_config(kExpectedReportFrequencySet); +@@ -874,8 +994,16 @@ TEST_F(PlatformSensorReaderTestWinrt, SensorClientNotification) { + + auto reading = Microsoft::WRL::Make<FakeLightSensorReadingWinrt>( + ABI::Windows::Foundation::DateTime{}, expected_lux); +- fake_sensor->TriggerFakeSensorReading(reading); +- ++ { ++ base::RunLoop run_loop; ++ EXPECT_CALL(*mock_client, OnReadingUpdated(::testing::_)) ++ .WillOnce(testing::Invoke([&](const SensorReading& reading) { ++ EXPECT_EQ(expected_lux, reading.als.value); ++ run_loop.Quit(); ++ })); ++ fake_sensor->TriggerFakeSensorReading(reading); ++ run_loop.Run(); ++ } + sensor->StopSensor(); + } + +@@ -896,30 +1024,31 @@ TEST_F(PlatformSensorReaderTestWinrt, CheckAccelerometerReadingConversion) { + Microsoft::WRL::Make<FakeAccelerometerSensorWinrt>()); + auto fake_sensor = fake_sensor_factory->fake_sensor_; + +- auto sensor = std::make_unique<PlatformSensorReaderWinrtAccelerometer>(); +- sensor->InitForTesting(base::BindLambdaForTesting( +- [&](ABI::Windows::Devices::Sensors::IAccelerometerStatics** +- sensor_factory) -> HRESULT { +- return fake_sensor_factory.CopyTo(sensor_factory); +- })); +- EXPECT_TRUE(sensor->Initialize()); ++ auto sensor = ++ CreateAndInitializeSensor<PlatformSensorReaderWinrtAccelerometer>( ++ fake_sensor_factory); ++ ASSERT_TRUE(sensor); + + auto mock_client = std::make_unique<testing::NiceMock<MockClient>>(); +- EXPECT_CALL(*mock_client, OnReadingUpdated(::testing::_)) +- .WillOnce(testing::Invoke([&](const SensorReading& reading) { +- EXPECT_EQ(-expected_x * base::kMeanGravityDouble, reading.accel.x); +- EXPECT_EQ(-expected_y * base::kMeanGravityDouble, reading.accel.y); +- EXPECT_EQ(-expected_z * base::kMeanGravityDouble, reading.accel.z); +- })); +- + sensor->SetClient(mock_client.get()); + + PlatformSensorConfiguration sensor_config(kExpectedReportFrequencySet); +- + EXPECT_TRUE(sensor->StartSensor(sensor_config)); ++ + auto reading = Microsoft::WRL::Make<FakeAccelerometerReadingWinrt>( + ABI::Windows::Foundation::DateTime{}, expected_x, expected_y, expected_z); +- fake_sensor->TriggerFakeSensorReading(reading); ++ { ++ base::RunLoop run_loop; ++ EXPECT_CALL(*mock_client, OnReadingUpdated(::testing::_)) ++ .WillOnce(testing::Invoke([&](const SensorReading& reading) { ++ EXPECT_EQ(-expected_x * base::kMeanGravityDouble, reading.accel.x); ++ EXPECT_EQ(-expected_y * base::kMeanGravityDouble, reading.accel.y); ++ EXPECT_EQ(-expected_z * base::kMeanGravityDouble, reading.accel.z); ++ run_loop.Quit(); ++ })); ++ fake_sensor->TriggerFakeSensorReading(reading); ++ run_loop.Run(); ++ } + + sensor->StopSensor(); + } +@@ -937,13 +1066,10 @@ TEST_F(PlatformSensorReaderTestWinrt, FailedAccelerometerSampleParse) { + Microsoft::WRL::Make<FakeAccelerometerSensorWinrt>()); + auto fake_sensor = fake_sensor_factory->fake_sensor_; + +- auto sensor = std::make_unique<PlatformSensorReaderWinrtAccelerometer>(); +- sensor->InitForTesting(base::BindLambdaForTesting( +- [&](ABI::Windows::Devices::Sensors::IAccelerometerStatics** +- sensor_factory) -> HRESULT { +- return fake_sensor_factory.CopyTo(sensor_factory); +- })); +- EXPECT_TRUE(sensor->Initialize()); ++ auto sensor = ++ CreateAndInitializeSensor<PlatformSensorReaderWinrtAccelerometer>( ++ fake_sensor_factory); ++ ASSERT_TRUE(sensor); + + auto mock_client = std::make_unique<testing::NiceMock<MockClient>>(); + sensor->SetClient(mock_client.get()); +@@ -954,6 +1080,9 @@ TEST_F(PlatformSensorReaderTestWinrt, FailedAccelerometerSampleParse) { + auto reading = Microsoft::WRL::Make<FakeAccelerometerReadingWinrt>( + ABI::Windows::Foundation::DateTime{}, 0, 0, 0); + ++ // We cannot use a base::RunLoop in the checks below because we are expecting ++ // that MockClient::OnReadingUpdate() does _not_ get called. ++ + reading->SetGetTimestampReturnCode(E_FAIL); + fake_sensor->TriggerFakeSensorReading(reading); + +@@ -968,6 +1097,8 @@ TEST_F(PlatformSensorReaderTestWinrt, FailedAccelerometerSampleParse) { + reading->SetGetYReturnCode(S_OK); + reading->SetGetZReturnCode(E_FAIL); + fake_sensor->TriggerFakeSensorReading(reading); ++ ++ task_environment_.RunUntilIdle(); + } + + // Tests if PlatformSensorReaderWinrtGyrometer correctly converts sensor +@@ -986,27 +1117,30 @@ TEST_F(PlatformSensorReaderTestWinrt, CheckGyrometerReadingConversion) { + ABI::Windows::Devices::Sensors::GyrometerReadingChangedEventArgs>>(); + auto fake_sensor = fake_sensor_factory->fake_sensor_; + +- auto sensor = std::make_unique<PlatformSensorReaderWinrtGyrometer>(); +- sensor->InitForTesting(base::BindLambdaForTesting( +- [&](ABI::Windows::Devices::Sensors::IGyrometerStatics** sensor_factory) +- -> HRESULT { return fake_sensor_factory.CopyTo(sensor_factory); })); +- EXPECT_TRUE(sensor->Initialize()); ++ auto sensor = CreateAndInitializeSensor<PlatformSensorReaderWinrtGyrometer>( ++ fake_sensor_factory); ++ ASSERT_TRUE(sensor); + + auto mock_client = std::make_unique<testing::NiceMock<MockClient>>(); +- EXPECT_CALL(*mock_client, OnReadingUpdated(::testing::_)) +- .WillOnce(testing::Invoke([&](const SensorReading& reading) { +- EXPECT_EQ(gfx::DegToRad(expected_x), reading.gyro.x); +- EXPECT_EQ(gfx::DegToRad(expected_y), reading.gyro.y); +- EXPECT_EQ(gfx::DegToRad(expected_z), reading.gyro.z); +- })); +- + sensor->SetClient(mock_client.get()); ++ + PlatformSensorConfiguration sensor_config(kExpectedReportFrequencySet); + EXPECT_TRUE(sensor->StartSensor(sensor_config)); + + auto reading = Microsoft::WRL::Make<FakeGyrometerReadingWinrt>( + ABI::Windows::Foundation::DateTime{}, expected_x, expected_y, expected_z); +- fake_sensor->TriggerFakeSensorReading(reading); ++ { ++ base::RunLoop run_loop; ++ EXPECT_CALL(*mock_client, OnReadingUpdated(::testing::_)) ++ .WillOnce(testing::Invoke([&](const SensorReading& reading) { ++ EXPECT_EQ(gfx::DegToRad(expected_x), reading.gyro.x); ++ EXPECT_EQ(gfx::DegToRad(expected_y), reading.gyro.y); ++ EXPECT_EQ(gfx::DegToRad(expected_z), reading.gyro.z); ++ run_loop.Quit(); ++ })); ++ fake_sensor->TriggerFakeSensorReading(reading); ++ run_loop.Run(); ++ } + + sensor->StopSensor(); + } +@@ -1023,11 +1157,9 @@ TEST_F(PlatformSensorReaderTestWinrt, FailedGyrometerSampleParse) { + ABI::Windows::Devices::Sensors::GyrometerReadingChangedEventArgs>>(); + auto fake_sensor = fake_sensor_factory->fake_sensor_; + +- auto sensor = std::make_unique<PlatformSensorReaderWinrtGyrometer>(); +- sensor->InitForTesting(base::BindLambdaForTesting( +- [&](ABI::Windows::Devices::Sensors::IGyrometerStatics** sensor_factory) +- -> HRESULT { return fake_sensor_factory.CopyTo(sensor_factory); })); +- EXPECT_TRUE(sensor->Initialize()); ++ auto sensor = CreateAndInitializeSensor<PlatformSensorReaderWinrtGyrometer>( ++ fake_sensor_factory); ++ ASSERT_TRUE(sensor); + + auto mock_client = std::make_unique<testing::NiceMock<MockClient>>(); + sensor->SetClient(mock_client.get()); +@@ -1038,6 +1170,9 @@ TEST_F(PlatformSensorReaderTestWinrt, FailedGyrometerSampleParse) { + auto reading = Microsoft::WRL::Make<FakeGyrometerReadingWinrt>( + ABI::Windows::Foundation::DateTime{}, 0, 0, 0); + ++ // We cannot use a base::RunLoop in the checks below because we are expecting ++ // that MockClient::OnReadingUpdate() does _not_ get called. ++ + reading->SetGetTimestampReturnCode(E_FAIL); + fake_sensor->TriggerFakeSensorReading(reading); + +@@ -1052,6 +1187,8 @@ TEST_F(PlatformSensorReaderTestWinrt, FailedGyrometerSampleParse) { + reading->SetGetYReturnCode(S_OK); + reading->SetGetZReturnCode(E_FAIL); + fake_sensor->TriggerFakeSensorReading(reading); ++ ++ task_environment_.RunUntilIdle(); + } + + // Tests if PlatformSensorReaderWinrtMagnetometer correctly converts sensor +@@ -1070,27 +1207,31 @@ TEST_F(PlatformSensorReaderTestWinrt, CheckMagnetometerReadingConversion) { + ABI::Windows::Devices::Sensors::MagnetometerReadingChangedEventArgs>>(); + auto fake_sensor = fake_sensor_factory->fake_sensor_; + +- auto sensor = std::make_unique<PlatformSensorReaderWinrtMagnetometer>(); +- sensor->InitForTesting(base::BindLambdaForTesting( +- [&](ABI::Windows::Devices::Sensors::IMagnetometerStatics** sensor_factory) +- -> HRESULT { return fake_sensor_factory.CopyTo(sensor_factory); })); +- EXPECT_TRUE(sensor->Initialize()); ++ auto sensor = ++ CreateAndInitializeSensor<PlatformSensorReaderWinrtMagnetometer>( ++ fake_sensor_factory); ++ ASSERT_TRUE(sensor); + + auto mock_client = std::make_unique<testing::NiceMock<MockClient>>(); +- EXPECT_CALL(*mock_client, OnReadingUpdated(::testing::_)) +- .WillOnce(testing::Invoke([&](const SensorReading& reading) { +- EXPECT_EQ(expected_x, reading.magn.x); +- EXPECT_EQ(expected_y, reading.magn.y); +- EXPECT_EQ(expected_z, reading.magn.z); +- })); +- + sensor->SetClient(mock_client.get()); ++ + PlatformSensorConfiguration sensor_config(kExpectedReportFrequencySet); + EXPECT_TRUE(sensor->StartSensor(sensor_config)); + + auto reading = Microsoft::WRL::Make<FakeMagnetometerReadingWinrt>( + ABI::Windows::Foundation::DateTime{}, expected_x, expected_y, expected_z); +- fake_sensor->TriggerFakeSensorReading(reading); ++ { ++ base::RunLoop run_loop; ++ EXPECT_CALL(*mock_client, OnReadingUpdated(::testing::_)) ++ .WillOnce(testing::Invoke([&](const SensorReading& reading) { ++ EXPECT_EQ(expected_x, reading.magn.x); ++ EXPECT_EQ(expected_y, reading.magn.y); ++ EXPECT_EQ(expected_z, reading.magn.z); ++ run_loop.Quit(); ++ })); ++ fake_sensor->TriggerFakeSensorReading(reading); ++ run_loop.Run(); ++ } + + sensor->StopSensor(); + } +@@ -1107,11 +1248,10 @@ TEST_F(PlatformSensorReaderTestWinrt, FailedMagnetometerSampleParse) { + ABI::Windows::Devices::Sensors::MagnetometerReadingChangedEventArgs>>(); + auto fake_sensor = fake_sensor_factory->fake_sensor_; + +- auto sensor = std::make_unique<PlatformSensorReaderWinrtMagnetometer>(); +- sensor->InitForTesting(base::BindLambdaForTesting( +- [&](ABI::Windows::Devices::Sensors::IMagnetometerStatics** sensor_factory) +- -> HRESULT { return fake_sensor_factory.CopyTo(sensor_factory); })); +- EXPECT_TRUE(sensor->Initialize()); ++ auto sensor = ++ CreateAndInitializeSensor<PlatformSensorReaderWinrtMagnetometer>( ++ fake_sensor_factory); ++ ASSERT_TRUE(sensor); + + auto mock_client = std::make_unique<testing::NiceMock<MockClient>>(); + sensor->SetClient(mock_client.get()); +@@ -1122,6 +1262,9 @@ TEST_F(PlatformSensorReaderTestWinrt, FailedMagnetometerSampleParse) { + auto reading = Microsoft::WRL::Make<FakeMagnetometerReadingWinrt>( + ABI::Windows::Foundation::DateTime{}, 0, 0, 0); + ++ // We cannot use a base::RunLoop in the checks below because we are expecting ++ // that MockClient::OnReadingUpdate() does _not_ get called. ++ + reading->SetGetTimestampReturnCode(E_FAIL); + fake_sensor->TriggerFakeSensorReading(reading); + +@@ -1136,6 +1279,8 @@ TEST_F(PlatformSensorReaderTestWinrt, FailedMagnetometerSampleParse) { + reading->SetGetYReturnCode(S_OK); + reading->SetGetZReturnCode(E_FAIL); + fake_sensor->TriggerFakeSensorReading(reading); ++ ++ task_environment_.RunUntilIdle(); + } + + // Tests if PlatformSensorReaderWinrtAbsOrientationEulerAngles correctly +@@ -1154,28 +1299,30 @@ TEST_F(PlatformSensorReaderTestWinrt, CheckInclinometerReadingConversion) { + ABI::Windows::Devices::Sensors::InclinometerReadingChangedEventArgs>>(); + auto fake_sensor = fake_sensor_factory->fake_sensor_; + +- auto sensor = +- std::make_unique<PlatformSensorReaderWinrtAbsOrientationEulerAngles>(); +- sensor->InitForTesting(base::BindLambdaForTesting( +- [&](ABI::Windows::Devices::Sensors::IInclinometerStatics** sensor_factory) +- -> HRESULT { return fake_sensor_factory.CopyTo(sensor_factory); })); +- EXPECT_TRUE(sensor->Initialize()); ++ auto sensor = CreateAndInitializeSensor< ++ PlatformSensorReaderWinrtAbsOrientationEulerAngles>(fake_sensor_factory); ++ ASSERT_TRUE(sensor); + + auto mock_client = std::make_unique<testing::NiceMock<MockClient>>(); +- EXPECT_CALL(*mock_client, OnReadingUpdated(::testing::_)) +- .WillOnce(testing::Invoke([&](const SensorReading& reading) { +- EXPECT_EQ(expected_x, reading.orientation_euler.x); +- EXPECT_EQ(expected_y, reading.orientation_euler.y); +- EXPECT_EQ(expected_z, reading.orientation_euler.z); +- })); +- + sensor->SetClient(mock_client.get()); ++ + PlatformSensorConfiguration sensor_config(kExpectedReportFrequencySet); + EXPECT_TRUE(sensor->StartSensor(sensor_config)); + + auto reading = Microsoft::WRL::Make<FakeInclinometerReadingWinrt>( + ABI::Windows::Foundation::DateTime{}, expected_x, expected_y, expected_z); +- fake_sensor->TriggerFakeSensorReading(reading); ++ { ++ base::RunLoop run_loop; ++ EXPECT_CALL(*mock_client, OnReadingUpdated(::testing::_)) ++ .WillOnce(testing::Invoke([&](const SensorReading& reading) { ++ EXPECT_EQ(expected_x, reading.orientation_euler.x); ++ EXPECT_EQ(expected_y, reading.orientation_euler.y); ++ EXPECT_EQ(expected_z, reading.orientation_euler.z); ++ run_loop.Quit(); ++ })); ++ fake_sensor->TriggerFakeSensorReading(reading); ++ run_loop.Run(); ++ } + + sensor->StopSensor(); + } +@@ -1192,12 +1339,9 @@ TEST_F(PlatformSensorReaderTestWinrt, FailedInclinometerSampleParse) { + ABI::Windows::Devices::Sensors::InclinometerReadingChangedEventArgs>>(); + auto fake_sensor = fake_sensor_factory->fake_sensor_; + +- auto sensor = +- std::make_unique<PlatformSensorReaderWinrtAbsOrientationEulerAngles>(); +- sensor->InitForTesting(base::BindLambdaForTesting( +- [&](ABI::Windows::Devices::Sensors::IInclinometerStatics** sensor_factory) +- -> HRESULT { return fake_sensor_factory.CopyTo(sensor_factory); })); +- EXPECT_TRUE(sensor->Initialize()); ++ auto sensor = CreateAndInitializeSensor< ++ PlatformSensorReaderWinrtAbsOrientationEulerAngles>(fake_sensor_factory); ++ ASSERT_TRUE(sensor); + + auto mock_client = std::make_unique<testing::NiceMock<MockClient>>(); + sensor->SetClient(mock_client.get()); +@@ -1208,6 +1352,9 @@ TEST_F(PlatformSensorReaderTestWinrt, FailedInclinometerSampleParse) { + auto reading = Microsoft::WRL::Make<FakeInclinometerReadingWinrt>( + ABI::Windows::Foundation::DateTime{}, 0, 0, 0); + ++ // We cannot use a base::RunLoop in the checks below because we are expecting ++ // that MockClient::OnReadingUpdate() does _not_ get called. ++ + reading->SetGetTimestampReturnCode(E_FAIL); + fake_sensor->TriggerFakeSensorReading(reading); + +@@ -1222,6 +1369,8 @@ TEST_F(PlatformSensorReaderTestWinrt, FailedInclinometerSampleParse) { + reading->SetGetYReturnCode(S_OK); + reading->SetGetZReturnCode(E_FAIL); + fake_sensor->TriggerFakeSensorReading(reading); ++ ++ task_environment_.RunUntilIdle(); + } + + // Tests if PlatformSensorReaderWinrtAbsOrientationQuaternion correctly +@@ -1242,32 +1391,32 @@ TEST_F(PlatformSensorReaderTestWinrt, CheckOrientationSensorReadingConversion) { + OrientationSensorReadingChangedEventArgs>>(); + auto fake_sensor = fake_sensor_factory->fake_sensor_; + +- auto sensor = +- std::make_unique<PlatformSensorReaderWinrtAbsOrientationQuaternion>(); +- sensor->InitForTesting(base::BindLambdaForTesting( +- [&](ABI::Windows::Devices::Sensors::IOrientationSensorStatics** +- sensor_factory) -> HRESULT { +- return fake_sensor_factory.CopyTo(sensor_factory); +- })); +- EXPECT_TRUE(sensor->Initialize()); ++ auto sensor = CreateAndInitializeSensor< ++ PlatformSensorReaderWinrtAbsOrientationQuaternion>(fake_sensor_factory); ++ ASSERT_TRUE(sensor); + + auto mock_client = std::make_unique<testing::NiceMock<MockClient>>(); +- EXPECT_CALL(*mock_client, OnReadingUpdated(::testing::_)) +- .WillOnce(testing::Invoke([&](const SensorReading& reading) { +- EXPECT_EQ(expected_w, reading.orientation_quat.w); +- EXPECT_EQ(expected_x, reading.orientation_quat.x); +- EXPECT_EQ(expected_y, reading.orientation_quat.y); +- EXPECT_EQ(expected_z, reading.orientation_quat.z); +- })); +- + sensor->SetClient(mock_client.get()); ++ + PlatformSensorConfiguration sensor_config(kExpectedReportFrequencySet); + EXPECT_TRUE(sensor->StartSensor(sensor_config)); + + auto reading = Microsoft::WRL::Make<FakeOrientationSensorReadingWinrt>( + ABI::Windows::Foundation::DateTime{}, expected_w, expected_x, expected_y, + expected_z); +- fake_sensor->TriggerFakeSensorReading(reading); ++ { ++ base::RunLoop run_loop; ++ EXPECT_CALL(*mock_client, OnReadingUpdated(::testing::_)) ++ .WillOnce(testing::Invoke([&](const SensorReading& reading) { ++ EXPECT_EQ(expected_w, reading.orientation_quat.w); ++ EXPECT_EQ(expected_x, reading.orientation_quat.x); ++ EXPECT_EQ(expected_y, reading.orientation_quat.y); ++ EXPECT_EQ(expected_z, reading.orientation_quat.z); ++ run_loop.Quit(); ++ })); ++ fake_sensor->TriggerFakeSensorReading(reading); ++ run_loop.Run(); ++ } + + sensor->StopSensor(); + } +@@ -1285,14 +1434,9 @@ TEST_F(PlatformSensorReaderTestWinrt, FailedOrientationSampleParse) { + OrientationSensorReadingChangedEventArgs>>(); + auto fake_sensor = fake_sensor_factory->fake_sensor_; + +- auto sensor = +- std::make_unique<PlatformSensorReaderWinrtAbsOrientationQuaternion>(); +- sensor->InitForTesting(base::BindLambdaForTesting( +- [&](ABI::Windows::Devices::Sensors::IOrientationSensorStatics** +- sensor_factory) -> HRESULT { +- return fake_sensor_factory.CopyTo(sensor_factory); +- })); +- EXPECT_TRUE(sensor->Initialize()); ++ auto sensor = CreateAndInitializeSensor< ++ PlatformSensorReaderWinrtAbsOrientationQuaternion>(fake_sensor_factory); ++ ASSERT_TRUE(sensor); + + auto mock_client = std::make_unique<testing::NiceMock<MockClient>>(); + sensor->SetClient(mock_client.get()); +@@ -1303,12 +1447,17 @@ TEST_F(PlatformSensorReaderTestWinrt, FailedOrientationSampleParse) { + auto reading = Microsoft::WRL::Make<FakeOrientationSensorReadingWinrt>( + ABI::Windows::Foundation::DateTime{}, 0, 0, 0, 0); + ++ // We cannot use a base::RunLoop in the checks below because we are expecting ++ // that MockClient::OnReadingUpdate() does _not_ get called. ++ + reading->SetGetTimestampReturnCode(E_FAIL); + fake_sensor->TriggerFakeSensorReading(reading); + + reading->SetGetTimestampReturnCode(S_OK); + reading->SetGetQuaternionReturnCode(E_FAIL); + fake_sensor->TriggerFakeSensorReading(reading); ++ ++ task_environment_.RunUntilIdle(); + } + + TEST_F(PlatformSensorReaderTestWinrt, LightSensorThresholding) { +@@ -1321,29 +1470,30 @@ TEST_F(PlatformSensorReaderTestWinrt, LightSensorThresholding) { + ABI::Windows::Devices::Sensors::LightSensorReadingChangedEventArgs>>(); + auto fake_sensor = fake_sensor_factory->fake_sensor_; + +- auto sensor = std::make_unique<PlatformSensorReaderWinrtLightSensor>(); +- sensor->InitForTesting(base::BindLambdaForTesting( +- [&](ABI::Windows::Devices::Sensors::ILightSensorStatics** sensor_factory) +- -> HRESULT { return fake_sensor_factory.CopyTo(sensor_factory); })); +- EXPECT_TRUE(sensor->Initialize()); ++ auto sensor = CreateAndInitializeSensor<PlatformSensorReaderWinrtLightSensor>( ++ fake_sensor_factory); ++ ASSERT_TRUE(sensor); + + auto mock_client = std::make_unique<testing::NiceMock<MockClient>>(); +- +- bool expected_callback = false; +- EXPECT_CALL(*mock_client, OnReadingUpdated(::testing::_)) +- .WillRepeatedly(testing::Invoke( +- [&](const SensorReading&) { EXPECT_TRUE(expected_callback); })); +- + sensor->SetClient(mock_client.get()); ++ + PlatformSensorConfiguration sensor_config(kExpectedReportFrequencySet); + EXPECT_TRUE(sensor->StartSensor(sensor_config)); + + float last_sent_lux = 1.0f; + auto threshold_helper = [&](bool expect_callback) { +- expected_callback = expect_callback; + auto reading = Microsoft::WRL::Make<FakeLightSensorReadingWinrt>( + ABI::Windows::Foundation::DateTime{}, last_sent_lux); +- fake_sensor->TriggerFakeSensorReading(reading); ++ if (expect_callback) { ++ base::RunLoop run_loop; ++ EXPECT_CALL(*mock_client, OnReadingUpdated(::testing::_)) ++ .WillOnce(base::test::RunClosure(run_loop.QuitClosure())); ++ fake_sensor->TriggerFakeSensorReading(reading); ++ run_loop.Run(); ++ } else { ++ fake_sensor->TriggerFakeSensorReading(reading); ++ task_environment_.RunUntilIdle(); ++ } + }; + + // Expect callback, first sample +@@ -1359,10 +1509,6 @@ TEST_F(PlatformSensorReaderTestWinrt, LightSensorThresholding) { + PlatformSensorReaderWinrtLightSensor::kLuxPercentThreshold * 0.6f; + threshold_helper(true); + +- // Expect callback, threshold has been met exactly +- last_sent_lux += PlatformSensorReaderWinrtLightSensor::kLuxPercentThreshold; +- threshold_helper(true); +- + sensor->StopSensor(); + } + +@@ -1377,22 +1523,14 @@ TEST_F(PlatformSensorReaderTestWinrt, AccelerometerThresholding) { + Microsoft::WRL::Make<FakeAccelerometerSensorWinrt>()); + auto fake_sensor = fake_sensor_factory->fake_sensor_; + +- auto sensor = std::make_unique<PlatformSensorReaderWinrtAccelerometer>(); +- sensor->InitForTesting(base::BindLambdaForTesting( +- [&](ABI::Windows::Devices::Sensors::IAccelerometerStatics** +- sensor_factory) -> HRESULT { +- return fake_sensor_factory.CopyTo(sensor_factory); +- })); +- EXPECT_TRUE(sensor->Initialize()); ++ auto sensor = ++ CreateAndInitializeSensor<PlatformSensorReaderWinrtAccelerometer>( ++ fake_sensor_factory); ++ ASSERT_TRUE(sensor); + + auto mock_client = std::make_unique<testing::NiceMock<MockClient>>(); +- +- bool expected_callback = false; +- EXPECT_CALL(*mock_client, OnReadingUpdated(::testing::_)) +- .WillRepeatedly(testing::Invoke( +- [&](const SensorReading&) { EXPECT_TRUE(expected_callback); })); +- + sensor->SetClient(mock_client.get()); ++ + PlatformSensorConfiguration sensor_config(kExpectedReportFrequencySet); + EXPECT_TRUE(sensor->StartSensor(sensor_config)); + +@@ -1400,40 +1538,40 @@ TEST_F(PlatformSensorReaderTestWinrt, AccelerometerThresholding) { + double last_sent_y = 2.0f; + double last_sent_z = 3.0f; + auto threshold_helper = [&](bool expect_callback) { +- expected_callback = expect_callback; + auto reading = Microsoft::WRL::Make<FakeAccelerometerReadingWinrt>( + ABI::Windows::Foundation::DateTime{}, last_sent_x, last_sent_y, + last_sent_z); +- fake_sensor->TriggerFakeSensorReading(reading); ++ if (expect_callback) { ++ base::RunLoop run_loop; ++ EXPECT_CALL(*mock_client, OnReadingUpdated(::testing::_)) ++ .WillOnce(base::test::RunClosure(run_loop.QuitClosure())); ++ fake_sensor->TriggerFakeSensorReading(reading); ++ run_loop.Run(); ++ } else { ++ fake_sensor->TriggerFakeSensorReading(reading); ++ task_environment_.RunUntilIdle(); ++ } + }; + + // Expect callback, first sample + threshold_helper(true); + +- // No callback, threshold has not been met ++ // For each axis, increase its value by an amount lower than the threshold so ++ // that no callback is invoked, then meet the threshold and do expect a ++ // callback. + last_sent_x += PlatformSensorReaderWinrtAccelerometer::kAxisThreshold * 0.5f; + threshold_helper(false); +- last_sent_y += PlatformSensorReaderWinrtAccelerometer::kAxisThreshold * 0.5f; +- threshold_helper(false); +- last_sent_z += PlatformSensorReaderWinrtAccelerometer::kAxisThreshold * 0.5f; +- threshold_helper(false); +- +- // Expect callback, threshold has been met since last reported sample + last_sent_x += PlatformSensorReaderWinrtAccelerometer::kAxisThreshold * 0.6f; + threshold_helper(true); ++ last_sent_y += PlatformSensorReaderWinrtAccelerometer::kAxisThreshold * 0.5f; ++ threshold_helper(false); + last_sent_y += PlatformSensorReaderWinrtAccelerometer::kAxisThreshold * 0.6f; + threshold_helper(true); ++ last_sent_z += PlatformSensorReaderWinrtAccelerometer::kAxisThreshold * 0.5f; ++ threshold_helper(false); + last_sent_z += PlatformSensorReaderWinrtAccelerometer::kAxisThreshold * 0.6f; + threshold_helper(true); + +- // Expect callback, threshold has been met exactly +- last_sent_x += PlatformSensorReaderWinrtAccelerometer::kAxisThreshold; +- threshold_helper(true); +- last_sent_y += PlatformSensorReaderWinrtAccelerometer::kAxisThreshold; +- threshold_helper(true); +- last_sent_z += PlatformSensorReaderWinrtAccelerometer::kAxisThreshold; +- threshold_helper(true); +- + sensor->StopSensor(); + } + +@@ -1447,20 +1585,13 @@ TEST_F(PlatformSensorReaderTestWinrt, GyrometerThresholding) { + ABI::Windows::Devices::Sensors::GyrometerReadingChangedEventArgs>>(); + auto fake_sensor = fake_sensor_factory->fake_sensor_; + +- auto sensor = std::make_unique<PlatformSensorReaderWinrtGyrometer>(); +- sensor->InitForTesting(base::BindLambdaForTesting( +- [&](ABI::Windows::Devices::Sensors::IGyrometerStatics** sensor_factory) +- -> HRESULT { return fake_sensor_factory.CopyTo(sensor_factory); })); +- EXPECT_TRUE(sensor->Initialize()); ++ auto sensor = CreateAndInitializeSensor<PlatformSensorReaderWinrtGyrometer>( ++ fake_sensor_factory); ++ ASSERT_TRUE(sensor); + + auto mock_client = std::make_unique<testing::NiceMock<MockClient>>(); +- +- bool expected_callback = false; +- EXPECT_CALL(*mock_client, OnReadingUpdated(::testing::_)) +- .WillRepeatedly(testing::Invoke( +- [&](const SensorReading&) { EXPECT_TRUE(expected_callback); })); +- + sensor->SetClient(mock_client.get()); ++ + PlatformSensorConfiguration sensor_config(kExpectedReportFrequencySet); + EXPECT_TRUE(sensor->StartSensor(sensor_config)); + +@@ -1468,40 +1599,40 @@ TEST_F(PlatformSensorReaderTestWinrt, GyrometerThresholding) { + double last_sent_y = 4.0f; + double last_sent_z = 5.0f; + auto threshold_helper = [&](bool expect_callback) { +- expected_callback = expect_callback; + auto reading = Microsoft::WRL::Make<FakeGyrometerReadingWinrt>( + ABI::Windows::Foundation::DateTime{}, last_sent_x, last_sent_y, + last_sent_z); +- fake_sensor->TriggerFakeSensorReading(reading); ++ if (expect_callback) { ++ base::RunLoop run_loop; ++ EXPECT_CALL(*mock_client, OnReadingUpdated(::testing::_)) ++ .WillOnce(base::test::RunClosure(run_loop.QuitClosure())); ++ fake_sensor->TriggerFakeSensorReading(reading); ++ run_loop.Run(); ++ } else { ++ fake_sensor->TriggerFakeSensorReading(reading); ++ task_environment_.RunUntilIdle(); ++ } + }; + + // Expect callback, first sample + threshold_helper(true); + +- // No callback, threshold has not been met ++ // For each axis, increase its value by an amount lower than the threshold so ++ // that no callback is invoked, then meet the threshold and do expect a ++ // callback. + last_sent_x += PlatformSensorReaderWinrtGyrometer::kDegreeThreshold * 0.5f; + threshold_helper(false); +- last_sent_y += PlatformSensorReaderWinrtGyrometer::kDegreeThreshold * 0.5f; +- threshold_helper(false); +- last_sent_z += PlatformSensorReaderWinrtGyrometer::kDegreeThreshold * 0.5f; +- threshold_helper(false); +- +- // Expect callback, threshold has been met since last reported sample + last_sent_x += PlatformSensorReaderWinrtGyrometer::kDegreeThreshold * 0.6f; + threshold_helper(true); ++ last_sent_y += PlatformSensorReaderWinrtGyrometer::kDegreeThreshold * 0.5f; ++ threshold_helper(false); + last_sent_y += PlatformSensorReaderWinrtGyrometer::kDegreeThreshold * 0.6f; + threshold_helper(true); ++ last_sent_z += PlatformSensorReaderWinrtGyrometer::kDegreeThreshold * 0.5f; ++ threshold_helper(false); + last_sent_z += PlatformSensorReaderWinrtGyrometer::kDegreeThreshold * 0.6f; + threshold_helper(true); + +- // Expect callback, threshold has been met exactly +- last_sent_x += PlatformSensorReaderWinrtGyrometer::kDegreeThreshold; +- threshold_helper(true); +- last_sent_y += PlatformSensorReaderWinrtGyrometer::kDegreeThreshold; +- threshold_helper(true); +- last_sent_z += PlatformSensorReaderWinrtGyrometer::kDegreeThreshold; +- threshold_helper(true); +- + sensor->StopSensor(); + } + +@@ -1515,20 +1646,14 @@ TEST_F(PlatformSensorReaderTestWinrt, MagnetometerThresholding) { + ABI::Windows::Devices::Sensors::MagnetometerReadingChangedEventArgs>>(); + auto fake_sensor = fake_sensor_factory->fake_sensor_; + +- auto sensor = std::make_unique<PlatformSensorReaderWinrtMagnetometer>(); +- sensor->InitForTesting(base::BindLambdaForTesting( +- [&](ABI::Windows::Devices::Sensors::IMagnetometerStatics** sensor_factory) +- -> HRESULT { return fake_sensor_factory.CopyTo(sensor_factory); })); +- EXPECT_TRUE(sensor->Initialize()); ++ auto sensor = ++ CreateAndInitializeSensor<PlatformSensorReaderWinrtMagnetometer>( ++ fake_sensor_factory); ++ ASSERT_TRUE(sensor); + + auto mock_client = std::make_unique<testing::NiceMock<MockClient>>(); +- +- bool expected_callback = false; +- EXPECT_CALL(*mock_client, OnReadingUpdated(::testing::_)) +- .WillRepeatedly(testing::Invoke( +- [&](const SensorReading&) { EXPECT_TRUE(expected_callback); })); +- + sensor->SetClient(mock_client.get()); ++ + PlatformSensorConfiguration sensor_config(kExpectedReportFrequencySet); + EXPECT_TRUE(sensor->StartSensor(sensor_config)); + +@@ -1536,46 +1661,46 @@ TEST_F(PlatformSensorReaderTestWinrt, MagnetometerThresholding) { + double last_sent_y = 4.0f; + double last_sent_z = 5.0f; + auto threshold_helper = [&](bool expect_callback) { +- expected_callback = expect_callback; + auto reading = Microsoft::WRL::Make<FakeMagnetometerReadingWinrt>( + ABI::Windows::Foundation::DateTime{}, last_sent_x, last_sent_y, + last_sent_z); +- fake_sensor->TriggerFakeSensorReading(reading); ++ if (expect_callback) { ++ base::RunLoop run_loop; ++ EXPECT_CALL(*mock_client, OnReadingUpdated(::testing::_)) ++ .WillOnce(base::test::RunClosure(run_loop.QuitClosure())); ++ fake_sensor->TriggerFakeSensorReading(reading); ++ run_loop.Run(); ++ } else { ++ fake_sensor->TriggerFakeSensorReading(reading); ++ task_environment_.RunUntilIdle(); ++ } + }; + + // Expect callback, first sample + threshold_helper(true); + +- // No callback, threshold has not been met ++ // For each axis, increase its value by an amount lower than the threshold so ++ // that no callback is invoked, then meet the threshold and do expect a ++ // callback. + last_sent_x += + PlatformSensorReaderWinrtMagnetometer::kMicroteslaThreshold * 0.5f; + threshold_helper(false); +- last_sent_y += +- PlatformSensorReaderWinrtMagnetometer::kMicroteslaThreshold * 0.5f; +- threshold_helper(false); +- last_sent_z += +- PlatformSensorReaderWinrtMagnetometer::kMicroteslaThreshold * 0.5f; +- threshold_helper(false); +- +- // Expect callback, threshold has been met since last reported sample + last_sent_x += + PlatformSensorReaderWinrtMagnetometer::kMicroteslaThreshold * 0.6f; + threshold_helper(true); ++ last_sent_y += ++ PlatformSensorReaderWinrtMagnetometer::kMicroteslaThreshold * 0.5f; ++ threshold_helper(false); + last_sent_y += + PlatformSensorReaderWinrtMagnetometer::kMicroteslaThreshold * 0.6f; + threshold_helper(true); ++ last_sent_z += ++ PlatformSensorReaderWinrtMagnetometer::kMicroteslaThreshold * 0.5f; ++ threshold_helper(false); + last_sent_z += + PlatformSensorReaderWinrtMagnetometer::kMicroteslaThreshold * 0.6f; + threshold_helper(true); + +- // Expect callback, threshold has been met exactly +- last_sent_x += PlatformSensorReaderWinrtMagnetometer::kMicroteslaThreshold; +- threshold_helper(true); +- last_sent_y += PlatformSensorReaderWinrtMagnetometer::kMicroteslaThreshold; +- threshold_helper(true); +- last_sent_z += PlatformSensorReaderWinrtMagnetometer::kMicroteslaThreshold; +- threshold_helper(true); +- + sensor->StopSensor(); + } + +@@ -1589,21 +1714,13 @@ TEST_F(PlatformSensorReaderTestWinrt, AbsOrientationEulerThresholding) { + ABI::Windows::Devices::Sensors::InclinometerReadingChangedEventArgs>>(); + auto fake_sensor = fake_sensor_factory->fake_sensor_; + +- auto sensor = +- std::make_unique<PlatformSensorReaderWinrtAbsOrientationEulerAngles>(); +- sensor->InitForTesting(base::BindLambdaForTesting( +- [&](ABI::Windows::Devices::Sensors::IInclinometerStatics** sensor_factory) +- -> HRESULT { return fake_sensor_factory.CopyTo(sensor_factory); })); +- EXPECT_TRUE(sensor->Initialize()); ++ auto sensor = CreateAndInitializeSensor< ++ PlatformSensorReaderWinrtAbsOrientationEulerAngles>(fake_sensor_factory); ++ ASSERT_TRUE(sensor); + + auto mock_client = std::make_unique<testing::NiceMock<MockClient>>(); +- +- bool expected_callback = false; +- EXPECT_CALL(*mock_client, OnReadingUpdated(::testing::_)) +- .WillRepeatedly(testing::Invoke( +- [&](const SensorReading&) { EXPECT_TRUE(expected_callback); })); +- + sensor->SetClient(mock_client.get()); ++ + PlatformSensorConfiguration sensor_config(kExpectedReportFrequencySet); + EXPECT_TRUE(sensor->StartSensor(sensor_config)); + +@@ -1611,53 +1728,50 @@ TEST_F(PlatformSensorReaderTestWinrt, AbsOrientationEulerThresholding) { + double last_sent_y = 4.0f; + double last_sent_z = 5.0f; + auto threshold_helper = [&](bool expect_callback) { +- expected_callback = expect_callback; + auto reading = Microsoft::WRL::Make<FakeInclinometerReadingWinrt>( + ABI::Windows::Foundation::DateTime{}, last_sent_x, last_sent_y, + last_sent_z); +- fake_sensor->TriggerFakeSensorReading(reading); ++ if (expect_callback) { ++ base::RunLoop run_loop; ++ EXPECT_CALL(*mock_client, OnReadingUpdated(::testing::_)) ++ .WillOnce(base::test::RunClosure(run_loop.QuitClosure())); ++ fake_sensor->TriggerFakeSensorReading(reading); ++ run_loop.Run(); ++ } else { ++ fake_sensor->TriggerFakeSensorReading(reading); ++ task_environment_.RunUntilIdle(); ++ } + }; + + // Expect callback, first sample + threshold_helper(true); + +- // No callback, threshold has not been met ++ // For each axis, increase its value by an amount lower than the threshold so ++ // that no callback is invoked, then meet the threshold and do expect a ++ // callback. + last_sent_x += + PlatformSensorReaderWinrtAbsOrientationEulerAngles::kDegreeThreshold * + 0.5f; + threshold_helper(false); +- last_sent_y += +- PlatformSensorReaderWinrtAbsOrientationEulerAngles::kDegreeThreshold * +- 0.5f; +- threshold_helper(false); +- last_sent_z += +- PlatformSensorReaderWinrtAbsOrientationEulerAngles::kDegreeThreshold * +- 0.5f; +- threshold_helper(false); +- +- // Expect callback, threshold has been met since last reported sample + last_sent_x += + PlatformSensorReaderWinrtAbsOrientationEulerAngles::kDegreeThreshold * + 0.6f; + threshold_helper(true); ++ last_sent_y += ++ PlatformSensorReaderWinrtAbsOrientationEulerAngles::kDegreeThreshold * ++ 0.5f; ++ threshold_helper(false); + last_sent_y += + PlatformSensorReaderWinrtAbsOrientationEulerAngles::kDegreeThreshold * + 0.6f; + threshold_helper(true); + last_sent_z += + PlatformSensorReaderWinrtAbsOrientationEulerAngles::kDegreeThreshold * +- 0.6f; +- threshold_helper(true); +- +- // Expect callback, threshold has been met exactly +- last_sent_x += +- PlatformSensorReaderWinrtAbsOrientationEulerAngles::kDegreeThreshold; +- threshold_helper(true); +- last_sent_y += +- PlatformSensorReaderWinrtAbsOrientationEulerAngles::kDegreeThreshold; +- threshold_helper(true); ++ 0.5f; ++ threshold_helper(false); + last_sent_z += +- PlatformSensorReaderWinrtAbsOrientationEulerAngles::kDegreeThreshold; ++ PlatformSensorReaderWinrtAbsOrientationEulerAngles::kDegreeThreshold * ++ 0.6f; + threshold_helper(true); + + sensor->StopSensor(); +@@ -1674,34 +1788,32 @@ TEST_F(PlatformSensorReaderTestWinrt, AbsOrientationQuatThresholding) { + OrientationSensorReadingChangedEventArgs>>(); + auto fake_sensor = fake_sensor_factory->fake_sensor_; + +- auto sensor = +- std::make_unique<PlatformSensorReaderWinrtAbsOrientationQuaternion>(); +- sensor->InitForTesting(base::BindLambdaForTesting( +- [&](ABI::Windows::Devices::Sensors::IOrientationSensorStatics** +- sensor_factory) -> HRESULT { +- return fake_sensor_factory.CopyTo(sensor_factory); +- })); +- EXPECT_TRUE(sensor->Initialize()); ++ auto sensor = CreateAndInitializeSensor< ++ PlatformSensorReaderWinrtAbsOrientationQuaternion>(fake_sensor_factory); ++ ASSERT_TRUE(sensor); + + auto mock_client = std::make_unique<testing::NiceMock<MockClient>>(); +- +- bool expected_callback = false; +- EXPECT_CALL(*mock_client, OnReadingUpdated(::testing::_)) +- .WillRepeatedly(testing::Invoke( +- [&](const SensorReading&) { EXPECT_TRUE(expected_callback); })); +- + sensor->SetClient(mock_client.get()); ++ + PlatformSensorConfiguration sensor_config(kExpectedReportFrequencySet); + EXPECT_TRUE(sensor->StartSensor(sensor_config)); + + double last_sent_rad = 1.0; + auto threshold_helper = [&](bool expect_callback) { +- expected_callback = expect_callback; + auto quat = gfx::Quaternion(gfx::Vector3dF(1.0, 0, 0), last_sent_rad); + auto reading = Microsoft::WRL::Make<FakeOrientationSensorReadingWinrt>( + ABI::Windows::Foundation::DateTime{}, quat.w(), quat.x(), quat.y(), + quat.z()); +- fake_sensor->TriggerFakeSensorReading(reading); ++ if (expect_callback) { ++ base::RunLoop run_loop; ++ EXPECT_CALL(*mock_client, OnReadingUpdated(::testing::_)) ++ .WillOnce(base::test::RunClosure(run_loop.QuitClosure())); ++ fake_sensor->TriggerFakeSensorReading(reading); ++ run_loop.Run(); ++ } else { ++ fake_sensor->TriggerFakeSensorReading(reading); ++ task_environment_.RunUntilIdle(); ++ } + }; + + // Expect callback, first sample +@@ -1719,11 +1831,6 @@ TEST_F(PlatformSensorReaderTestWinrt, AbsOrientationQuatThresholding) { + 0.6f; + threshold_helper(true); + +- // Expect callback, threshold has been met exactly +- last_sent_rad += +- PlatformSensorReaderWinrtAbsOrientationQuaternion::kRadianThreshold; +- threshold_helper(true); +- + sensor->StopSensor(); + } + +diff --git a/chromium/services/device/generic_sensor/platform_sensor_win.cc b/chromium/services/device/generic_sensor/platform_sensor_win.cc +index 3ee3c1fa86a8..e9a78687250f 100644 +--- src/3rdparty/chromium/services/device/generic_sensor/platform_sensor_win.cc ++++ src/3rdparty/chromium/services/device/generic_sensor/platform_sensor_win.cc +@@ -43,6 +43,8 @@ double PlatformSensorWin::GetMaximumSupportedFrequency() { + } + + void PlatformSensorWin::OnReadingUpdated(const SensorReading& reading) { ++ // This function is normally called from |sensor_thread_runner_|, except on ++ // PlatformSensorAndProviderTestWin. + UpdateSharedBufferAndNotifyClients(reading); + } + +@@ -75,6 +77,7 @@ bool PlatformSensorWin::CheckSensorConfiguration( + } + + PlatformSensorWin::~PlatformSensorWin() { ++ DCHECK(main_task_runner()->RunsTasksInCurrentSequence()); + sensor_reader_->SetClient(nullptr); + sensor_thread_runner_->DeleteSoon(FROM_HERE, sensor_reader_.get()); + } +From dbafaa10eb690d68e0531313663f47c422dc8771 Mon Sep 17 00:00:00 2001 +From: kylechar <kylechar@chromium.org> +Date: Tue, 9 Apr 2024 17:14:26 +0000 +Subject: [PATCH] [Backport] CVE-2024-3157: Out of bounds write in Compositing + +Cherry-pick of patch originally reviewed on +https://chromium-review.googlesource.com/c/chromium/src/+/5420432: +Validate buffer length + +The BitmapInSharedMemory mojo traits were only validating row length and +not total buffer length. + +(cherry picked from commit 1a19ff70bd54847d818566bd7a1e7c384c419746) + +(cherry picked from commit f15315f1cb7897e208947a40d538aac693283d7f) + +Bug: 331237485 +Change-Id: Ia2318899c44e9e7ac72fc7183954e6ce2c702179 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5396796 +Commit-Queue: Kyle Charbonneau <kylechar@chromium.org> +Cr-Original-Original-Commit-Position: refs/heads/main@{#1278417} +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5420432 +Commit-Queue: danakj <danakj@chromium.org> +Cr-Original-Commit-Position: refs/branch-heads/6312@{#786} +Cr-Original-Branched-From: 6711dcdae48edaf98cbc6964f90fac85b7d9986e-refs/heads/main@{#1262506} +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5433678 +Reviewed-by: danakj <danakj@chromium.org> +Reviewed-by: Kyle Charbonneau <kylechar@chromium.org> +Cr-Commit-Position: refs/branch-heads/6099@{#2003} +Cr-Branched-From: e6ee4500f7d6549a9ac1354f8d056da49ef406be-refs/heads/main@{#1217362} +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/554656 +Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> +--- + .../cpp/compositing/bitmap_in_shared_memory_mojom_traits.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/chromium/services/viz/public/cpp/compositing/bitmap_in_shared_memory_mojom_traits.cc b/chromium/services/viz/public/cpp/compositing/bitmap_in_shared_memory_mojom_traits.cc +index a6e5f45d9e72..519d554055e5 100644 +--- src/3rdparty/chromium/services/viz/public/cpp/compositing/bitmap_in_shared_memory_mojom_traits.cc ++++ src/3rdparty/chromium/services/viz/public/cpp/compositing/bitmap_in_shared_memory_mojom_traits.cc +@@ -76,6 +76,10 @@ bool StructTraits<viz::mojom::BitmapInSharedMemoryDataView, SkBitmap>::Read( + if (!mapping_ptr->IsValid()) + return false; + ++ if (mapping_ptr->size() < image_info.computeByteSize(data.row_bytes())) { ++ return false; ++ } ++ + if (!sk_bitmap->installPixels(image_info, mapping_ptr->memory(), + data.row_bytes(), &DeleteSharedMemoryMapping, + mapping_ptr.get())) { +From ac780f41ba9b3eb8329ca8e09b8857a070aed8c1 Mon Sep 17 00:00:00 2001 +From: Shahbaz Youssefi <syoussefi@chromium.org> +Date: Mon, 25 Mar 2024 14:46:56 -0400 +Subject: [PATCH] [Backport] CVE-2024-3516: Heap buffer overflow in ANGLE + +Cherry-pick of patch originally reviewed on +https://chromium-review.googlesource.com/c/angle/angle/+/5391986: +Translator: Disallow samplers in structs in interface blocks + +As disallowed by the spec: + +> Types and declarators are the same as for other uniform variable +> declarations outside blocks, with these exceptions: +> +> * opaque types are not allowed + +Bug: chromium:328859176 +Change-Id: Ib94977860102329e520e635c3757827c93ca2163 +Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5391986 +Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> +Reviewed-by: Geoff Lang <geofflang@chromium.org> +Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/554657 +Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> +--- + .../src/compiler/translator/ParseContext.cpp | 33 ++++++++++++------- + 1 file changed, 21 insertions(+), 12 deletions(-) + +diff --git a/chromium/third_party/angle/src/compiler/translator/ParseContext.cpp b/chromium/third_party/angle/src/compiler/translator/ParseContext.cpp +index e174725beb7..cb9eb3a4a56 100644 +--- src/3rdparty/chromium/third_party/angle/src/compiler/translator/ParseContext.cpp ++++ src/3rdparty/chromium/third_party/angle/src/compiler/translator/ParseContext.cpp +@@ -34,27 +34,39 @@ namespace + + const int kWebGLMaxStructNesting = 4; + +-bool ContainsSampler(const TStructure *structType); ++struct IsSamplerFunc ++{ ++ bool operator()(TBasicType type) { return IsSampler(type); } ++}; ++struct IsOpaqueFunc ++{ ++ bool operator()(TBasicType type) { return IsOpaqueType(type); } ++}; ++ ++template <typename OpaqueFunc> ++bool ContainsOpaque(const TStructure *structType); + +-bool ContainsSampler(const TType &type) ++template <typename OpaqueFunc> ++bool ContainsOpaque(const TType &type) + { +- if (IsSampler(type.getBasicType())) ++ if (OpaqueFunc{}(type.getBasicType())) + { + return true; + } + if (type.getBasicType() == EbtStruct) + { +- return ContainsSampler(type.getStruct()); ++ return ContainsOpaque<OpaqueFunc>(type.getStruct()); + } + + return false; + } + +-bool ContainsSampler(const TStructure *structType) ++template <typename OpaqueFunc> ++bool ContainsOpaque(const TStructure *structType) + { + for (const auto &field : structType->fields()) + { +- if (ContainsSampler(*field->type())) ++ if (ContainsOpaque<OpaqueFunc>(*field->type())) + return true; + } + return false; +@@ -1057,7 +1069,7 @@ bool TParseContext::checkIsNotOpaqueType(const TSourceLoc &line, + { + if (pType.type == EbtStruct) + { +- if (ContainsSampler(pType.userDef)) ++ if (ContainsOpaque<IsSamplerFunc>(pType.userDef)) + { + std::stringstream reasonStream = sh::InitializeStream<std::stringstream>(); + reasonStream << reason << " (structure contains a sampler)"; +@@ -4923,12 +4935,9 @@ TIntermDeclaration *TParseContext::addInterfaceBlock( + { + TField *field = (*fieldList)[memberIndex]; + TType *fieldType = field->type(); +- if (IsOpaqueType(fieldType->getBasicType())) ++ if (ContainsOpaque<IsOpaqueFunc>(*fieldType)) + { +- std::string reason("unsupported type - "); +- reason += fieldType->getBasicString(); +- reason += " types are not allowed in interface blocks"; +- error(field->line(), reason.c_str(), fieldType->getBasicString()); ++ error(field->line(), "Opaque types are not allowed in interface blocks", blockName); + } + + const TQualifier qualifier = fieldType->getQualifier(); +From a766045f65f934df3b5f1aa63bc86fbb3e003a09 Mon Sep 17 00:00:00 2001 +From: Anu Aliyas <anu.aliyas@qt.io> +Date: Wed, 17 Apr 2024 12:35:58 +0200 +Subject: [PATCH] Add missing dependencies to avoid compilation errors + +Missing dependencies are added to resolve the dependencies issues +encountered when compiling with Ninja 1.12.0 + +Fixes:QTBUG-124375 +Change-Id: I0f23ef6c60a6f01ee11bffd46121fd7f98dc022c +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/555586 +Reviewed-by: Michal Klocek <michal.klocek@qt.io> +--- + chromium/content/public/browser/BUILD.gn | 1 + + chromium/extensions/browser/api/declarative_net_request/BUILD.gn | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/chromium/content/public/browser/BUILD.gn b/chromium/content/public/browser/BUILD.gn +index d38fa8d303a..c5813115e88 100644 +--- src/3rdparty/chromium/content/public/browser/BUILD.gn ++++ src/3rdparty/chromium/content/public/browser/BUILD.gn +@@ -539,6 +539,7 @@ jumbo_source_set("browser_sources") { + "//cc", + "//components/services/storage/public/cpp", + "//components/viz/host", ++ "//components/spellcheck:buildflags", + "//content/browser", # Must not be public_deps! + "//device/fido", + "//gpu", +diff --git a/chromium/extensions/browser/api/declarative_net_request/BUILD.gn b/chromium/extensions/browser/api/declarative_net_request/BUILD.gn +index 1fc492f5a0c..13a266e22f1 100644 +--- src/3rdparty/chromium/extensions/browser/api/declarative_net_request/BUILD.gn ++++ src/3rdparty/chromium/extensions/browser/api/declarative_net_request/BUILD.gn +@@ -23,6 +23,7 @@ source_set("declarative_net_request") { + "//extensions/common", + "//extensions/common/api", + "//services/preferences/public/cpp", ++ "//components/web_cache/browser", + ] + + public_deps = [ "//extensions/browser:browser_sources" ] +From d26ab136f38d6bf3311eb04136820b85bc2fc96e Mon Sep 17 00:00:00 2001 +From: Dan Sanders <sandersd@chromium.org> +Date: Mon, 26 Feb 2024 20:53:06 +0000 +Subject: [PATCH] [Backport] Security bug 326521449 + +Cherry-pick of patch originally reviewed on +https://chromium-review.googlesource.com/c/chromium/src/+/5323230: +Validate recovery_frame_cnt_ at time of use. + +Bug: b/326521449 +Change-Id: I778a16553bb3319dddfef6121895a89e0f1938df +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5323230 +Commit-Queue: Dan Sanders <sandersd@chromium.org> +Reviewed-by: Dale Curtis <dalecurtis@chromium.org> +Commit-Queue: Dale Curtis <dalecurtis@chromium.org> +Auto-Submit: Dan Sanders <sandersd@chromium.org> +Cr-Commit-Position: refs/heads/main@{#1265425} +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/556725 +Reviewed-by: Michal Klocek <michal.klocek@qt.io> +--- + chromium/media/gpu/h264_decoder.cc | 21 +++++++++++---------- + 1 file changed, 11 insertions(+), 10 deletions(-) + +diff --git a/chromium/media/gpu/h264_decoder.cc b/chromium/media/gpu/h264_decoder.cc +index 2bfdd28d83a..ef9de709045 100644 +--- src/3rdparty/chromium/media/gpu/h264_decoder.cc ++++ src/3rdparty/chromium/media/gpu/h264_decoder.cc +@@ -769,13 +769,6 @@ H264Decoder::H264Accelerator::Status H264Decoder::StartNewFrame( + return H264Accelerator::Status::kFail; + } + +- if (recovery_frame_cnt_ && *recovery_frame_cnt_ >= max_frame_num_) { +- DVLOG(1) << "Invalid recovery_frame_cnt=" << *recovery_frame_cnt_ +- << " (it must be less or equal to max_frame_num-1=" << max_frame_num_ - 1 +- << ")"; +- return H264Accelerator::Status::kFail; +- } +- + if (!InitCurrPicture(slice_hdr)) + return H264Accelerator::Status::kFail; + +@@ -999,11 +992,19 @@ bool H264Decoder::FinishPicture(scoped_refptr<H264Picture> pic) { + DVLOG(4) << "Finishing picture frame_num: " << pic->frame_num + << ", entries in DPB: " << dpb_.size(); + if (recovery_frame_cnt_) { +- // This is the first picture after the recovery point SEI message. Computes +- // the frame_num of the frame that should be output from (Spec D.2.8). ++ // This is the first picture after the recovery point SEI message. Validate ++ // `recovery_frame_cnt_` now that we are certain to have max_frame_num_. ++ if (*recovery_frame_cnt_ >= max_frame_num_) { ++ DVLOG(1) << "Invalid recovery_frame_cnt=" << *recovery_frame_cnt_ ++ << " (must be less than or equal to max_frame_num-1=" ++ << (max_frame_num_ - 1) << ")"; ++ return false; ++ } ++ ++ // Compute the frame_num of the first frame that should be output (D.2.8). + recovery_frame_num_ = + (*recovery_frame_cnt_ + pic->frame_num) % max_frame_num_; +- DVLOG(3) << "recovery_frame_num_" << *recovery_frame_num_; ++ DVLOG(3) << "recovery_frame_num_=" << *recovery_frame_num_; + recovery_frame_cnt_.reset(); + } + +From 08e69b86a697e265b3e064b06a05fc5e7a4e079b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dominik=20R=C3=B6ttsches?= <drott@chromium.org> +Date: Thu, 14 Mar 2024 12:48:18 +0000 +Subject: [PATCH] [Backport] CVE-2024-3839: Out of bounds read in Fonts +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Cherry-pick of patch originally reviewed on +https://chromium-review.googlesource.com/c/chromium/src/+/5361874: +Disable STAT sanitization/checks through OTS + +Due to issues in upstream, OTS STAT sanitization does not provide an +added security benefit. Pass-through the STAT table. + +Bug: chromium:41491859 +Change-Id: I19dcd87376af553afe242452396b951a74691f3c +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5361874 +Commit-Queue: Dominik Röttsches <drott@chromium.org> +Reviewed-by: Koji Ishii <kojii@chromium.org> +Cr-Commit-Position: refs/heads/main@{#1272710} +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/556726 +Reviewed-by: Michal Klocek <michal.klocek@qt.io> +--- + .../blink/renderer/platform/fonts/web_font_decoder.cc | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/chromium/third_party/blink/renderer/platform/fonts/web_font_decoder.cc b/chromium/third_party/blink/renderer/platform/fonts/web_font_decoder.cc +index 0953dc528dd..1ac9b8c9623 100644 +--- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/web_font_decoder.cc ++++ src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/web_font_decoder.cc +@@ -104,6 +104,7 @@ ots::TableAction BlinkOTSContext::GetTableAction(uint32_t tag) { + const uint32_t kCpalTag = OTS_TAG('C', 'P', 'A', 'L'); + const uint32_t kCff2Tag = OTS_TAG('C', 'F', 'F', '2'); + const uint32_t kSbixTag = OTS_TAG('s', 'b', 'i', 'x'); ++ const uint32_t kStatTag = OTS_TAG('S', 'T', 'A', 'T'); + #if HB_VERSION_ATLEAST(1, 0, 0) + const uint32_t kBaseTag = OTS_TAG('B', 'A', 'S', 'E'); + const uint32_t kGdefTag = OTS_TAG('G', 'D', 'E', 'F'); +@@ -131,6 +132,7 @@ ots::TableAction BlinkOTSContext::GetTableAction(uint32_t tag) { + case kCpalTag: + case kCff2Tag: + case kSbixTag: ++ case kStatTag: + #if HB_VERSION_ATLEAST(1, 0, 0) + // Let HarfBuzz handle how to deal with broken tables. + case kAvarTag: +From 8755f5a5aafae5a0e74839042cd2f65dc86061e8 Mon Sep 17 00:00:00 2001 +From: Liza Burakova <liza@chromium.org> +Date: Wed, 21 Feb 2024 19:02:15 +0000 +Subject: [PATCH] [Backport] CVE-2024-3837: Use after free in QUIC + +Manual cherry-pick of patch originally reviewed on +https://chromium-review.googlesource.com/c/chromium/src/+/5268864: +Check if session is going away in Handle::RequestStream. + +This CL adds an extra check in the QuicChromiumClientSession +handle's RequestSession to make sure the session is not +marked as going away before creating a new StreamRequest. + +Bug: 41491379 +Change-Id: I687dfc23131871cdba345d3cf78dbbbd2e619ce9 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5268864 +Reviewed-by: Kenichi Ishibashi <bashi@chromium.org> +Commit-Queue: Liza Burakova <liza@chromium.org> +Cr-Commit-Position: refs/heads/main@{#1263483} +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/556727 +Reviewed-by: Michal Klocek <michal.klocek@qt.io> +--- + chromium/net/quic/quic_chromium_client_session.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/chromium/net/quic/quic_chromium_client_session.cc b/chromium/net/quic/quic_chromium_client_session.cc +index d039d1ccb94..400006a170f 100644 +--- src/3rdparty/chromium/net/quic/quic_chromium_client_session.cc ++++ src/3rdparty/chromium/net/quic/quic_chromium_client_session.cc +@@ -454,7 +454,8 @@ int QuicChromiumClientSession::Handle::RequestStream( + const NetworkTrafficAnnotationTag& traffic_annotation) { + DCHECK(!stream_request_); + +- if (!session_) ++ // TODO(crbug.com/41491379): Add a regression test. ++ if (!session_ || session_->going_away_) + return ERR_CONNECTION_CLOSED; + + requires_confirmation |= session_->gquic_zero_rtt_disabled(); +From 271e21366ac1826df43119eb7b746019947be1f7 Mon Sep 17 00:00:00 2001 +From: Brendon Tiszka <tiszka@chromium.org> +Date: Sun, 3 Mar 2024 21:30:59 +0000 +Subject: [PATCH] [Backport] Security bug 327698060 + +Cherry-pick of patch originally reviewed on +https://chromium-review.googlesource.com/c/chromium/src/+/5337387: +PaintOpReader: Harden PaintImage deserialization + +Add missing validity check after `Read` + +Bug: 327698060 +Change-Id: I0aa5120296009998af3235a01304a1f597a82a33 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5337387 +Commit-Queue: Khushal Sagar <khushalsagar@chromium.org> +Reviewed-by: Khushal Sagar <khushalsagar@chromium.org> +Cr-Commit-Position: refs/heads/main@{#1267636} +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/556748 +Reviewed-by: Michal Klocek <michal.klocek@qt.io> +--- + chromium/cc/paint/paint_op_reader.cc | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/chromium/cc/paint/paint_op_reader.cc b/chromium/cc/paint/paint_op_reader.cc +index 6d920c33562..7d1eb51441f 100644 +--- src/3rdparty/chromium/cc/paint/paint_op_reader.cc ++++ src/3rdparty/chromium/cc/paint/paint_op_reader.cc +@@ -351,6 +351,9 @@ void PaintOpReader::Read(PaintImage* image) { + case PaintOp::SerializedImageType::kImageData: { + SkColorType color_type; + Read(&color_type); ++ if (!valid_) { ++ return; ++ } + // Color types requiring alignment larger than kDefaultAlignment is not + // supported. + if (static_cast<size_t>(SkColorTypeBytesPerPixel(color_type)) > +From 502983e6adc3db0d12ee8e9ff35d53df0e149870 Mon Sep 17 00:00:00 2001 +From: Pete Williamson <petewil@chromium.org> +Date: Tue, 27 Feb 2024 00:19:05 +0000 +Subject: [PATCH] [Backport] Security bug 40940917 + +Cherry-pick of patch originally reviewed on +https://chromium-review.googlesource.com/c/chromium/src/+/5293726: +Fix misalligned address in hunspell::NodeReader::ReaderForLookupAt + +With the Hunspell spell checking library, we are using a custom wrapper +to read the dictionaries from files. In that custom wrapper, we were +reading by using reinterpret_cast to interpret an offset into a pointer, +and then reading the bytes at that pointer for the child_offset. + +The spell checking code appears to have been working properly in the +field. However, the current code caused fuzzing test failures, and +those failures are blocking other tests, so we need to fix this to +unblock other tests. + +It turns out that we were casting a value to a pointer that did not +have proper alignment (for instance, a pointer to a 32 bit int needs +to be 4 byte allinged, but this pointer was not). While it has often +worked in older compilers, it turns out this is undefined behavior. + +Instead of relying on undefined behavior, the right thing to do is to +use std::memcpy to copy the bytes from the misalligned address into +their final destination (either an int32 or an int16 in this case). + +Bug: 40940917 +Change-Id: I8aeba9ee8000b51e98863813235d8dceb1c41ceb +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5293726 +Commit-Queue: Peter Williamson <petewil@chromium.org> +Reviewed-by: Trevor Perrier <perrier@chromium.org> +Cr-Commit-Position: refs/heads/main@{#1265552} +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/556750 +Reviewed-by: Michal Klocek <michal.klocek@qt.io> +--- + .../hunspell/google/bdict_reader.cc | 26 ++++++++++++++----- + 1 file changed, 20 insertions(+), 6 deletions(-) + +diff --git a/chromium/third_party/hunspell/google/bdict_reader.cc b/chromium/third_party/hunspell/google/bdict_reader.cc +index d51112ea48e7..56abd15dd121 100644 +--- src/3rdparty/chromium/third_party/hunspell/google/bdict_reader.cc ++++ src/3rdparty/chromium/third_party/hunspell/google/bdict_reader.cc +@@ -5,6 +5,7 @@ + #include "third_party/hunspell/google/bdict_reader.h" + + #include <stdint.h> ++#include <cstdint> + + #include "base/check.h" + +@@ -413,19 +414,32 @@ NodeReader::FindResult NodeReader::ReaderForLookupAt( + if (index >= static_cast<size_t>(lookup_num_chars()) || !is_valid_) + return FIND_DONE; + +- size_t child_offset; ++ size_t child_offset = 0; + if (is_lookup_32()) { + // Table contains 32-bit absolute offsets. +- child_offset = +- reinterpret_cast<const unsigned int*>(table_begin)[index]; ++ ++ // We need to use memcpy here instead of just casting the offset into a ++ // pointer to an int because the cast can cause undefined behavior if ++ // the pointer is not alligned, and in this case it is not. ++ int byte_offset = index * sizeof(uint32_t); ++ std::memcpy(&child_offset, ++ reinterpret_cast<const void*>(table_begin + byte_offset), ++ sizeof(uint32_t)); + if (!child_offset) + return FIND_NOTHING; // This entry in the table is empty. + } else { + // Table contains 16-bit offsets relative to the current node. +- child_offset = +- reinterpret_cast<const unsigned short*>(table_begin)[index]; +- if (!child_offset) ++ ++ // We need to use memcpy here instead of just casting the offset into a ++ // pointer to an int because the cast can cause undefined behavior if ++ // the pointer is not alligned, and in this case it is not. ++ int byte_offset = index * sizeof(uint16_t); ++ std::memcpy(&child_offset, ++ reinterpret_cast<const void*>(table_begin + byte_offset), ++ sizeof(uint16_t)); ++ if (!child_offset) { + return FIND_NOTHING; // This entry in the table is empty. ++ } + child_offset += node_offset_; + } + +From 6086d28d3a0dbfac1808ba5767ca1eea4a5acaf9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marja=20H=C3=B6ltt=C3=A4?= <marja@google.com> +Date: Tue, 26 Mar 2024 13:53:21 +0000 +Subject: [PATCH] [Backport] CVE-2024-3914: Use after free in V8 (1/2) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Manual backport of patch originally reviewed on +https://chromium-review.googlesource.com/c/chromium/src/+/5387887: +[M120-LTS] Fix DOMArrayBuffer::IsDetached() + +M120 merge issues: + third_party/blink/renderer/core/typed_arrays/dom_array_buffer.cc: + - Conflicting types for variable worlds + - Conflicting AllWorldsInIsolate() call (M120 doesn't use the last argument) + +A DOMArrayBuffer was maintaining its own "is_detached_" state, and +would consider itself non-detached even if the corresponding +JSArrayBuffer (or, all of them, in case there are several) was +detached. + +Piping in the v8::Isolate would be a too big change for this fix, so this is using v8::Isolate::GetCurrent() for now. + +Bug: 330759272 +Change-Id: I1e98ebd2066d2e59658db12f1bb419b6ebc1d706 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5387887 +Commit-Queue: Marja Hölttä <marja@chromium.org> +Cr-Commit-Position: refs/heads/main@{#1278283} +(cherry picked from commit 04e7550d7aa3bf4ac4e49d7074972d357de139e6) +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/556751 +Reviewed-by: Michal Klocek <michal.klocek@qt.io> +--- + .../core/typed_arrays/dom_array_buffer.cc | 50 +++++++++++++++++++ + .../core/typed_arrays/dom_array_buffer.h | 13 +++++ + .../core/typed_arrays/dom_array_buffer_base.h | 2 +- + 3 files changed, 64 insertions(+), 1 deletion(-) + +diff --git a/chromium/third_party/blink/renderer/core/typed_arrays/dom_array_buffer.cc b/chromium/third_party/blink/renderer/core/typed_arrays/dom_array_buffer.cc +index c195e28b442..197a4aebf5b 100644 +--- src/3rdparty/chromium/third_party/blink/renderer/core/typed_arrays/dom_array_buffer.cc ++++ src/3rdparty/chromium/third_party/blink/renderer/core/typed_arrays/dom_array_buffer.cc +@@ -48,6 +48,15 @@ static void AccumulateArrayBuffersForAllWorlds( + v8::Isolate* isolate, + DOMArrayBuffer* object, + Vector<v8::Local<v8::ArrayBuffer>, 4>& buffers) { ++ if (!object->has_non_main_world_wrappers() && IsMainThread()) { ++ const DOMWrapperWorld& world = DOMWrapperWorld::MainWorld(); ++ v8::Local<v8::Object> wrapper = world.DomDataStore().Get(object, isolate); ++ if (!wrapper.IsEmpty()) { ++ buffers.push_back(v8::Local<v8::ArrayBuffer>::Cast(wrapper)); ++ } ++ return; ++ } ++ + Vector<scoped_refptr<DOMWrapperWorld>> worlds; + DOMWrapperWorld::AllWorldsInCurrentThread(worlds); + for (const auto& world : worlds) { +@@ -256,6 +265,47 @@ v8::MaybeLocal<v8::Value> DOMArrayBuffer::Wrap(ScriptState* script_state) { + wrapper); + } + ++bool DOMArrayBuffer::IsDetached() const { ++ if (contents_.BackingStore() == nullptr) { ++ return is_detached_; ++ } ++ if (is_detached_) { ++ return true; ++ } ++ ++ v8::Isolate* isolate = v8::Isolate::GetCurrent(); ++ v8::HandleScope handle_scope(isolate); ++ Vector<v8::Local<v8::ArrayBuffer>, 4> buffer_handles; ++ AccumulateArrayBuffersForAllWorlds(isolate, const_cast<DOMArrayBuffer*>(this), buffer_handles); ++ ++ // There may be several v8::ArrayBuffers corresponding to the DOMArrayBuffer, ++ // but at most one of them may be non-detached. ++ int nondetached_count = 0; ++ int detached_count = 0; ++ ++ for (const auto& buffer_handle : buffer_handles) { ++ if (buffer_handle->WasDetached()) { ++ ++detached_count; ++ } else { ++ ++nondetached_count; ++ } ++ } ++ CHECK_LE(nondetached_count, 1); ++ ++ return nondetached_count == 0 && detached_count > 0; ++} ++ ++v8::Local<v8::Object> DOMArrayBuffer::AssociateWithWrapper( ++ v8::Isolate* isolate, ++ const WrapperTypeInfo* wrapper_type_info, ++ v8::Local<v8::Object> wrapper) { ++ if (!DOMWrapperWorld::Current(isolate).IsMainWorld()) { ++ has_non_main_world_wrappers_ = true; ++ } ++ return ScriptWrappable::AssociateWithWrapper(isolate, wrapper_type_info, ++ wrapper); ++} ++ + DOMArrayBuffer* DOMArrayBuffer::Slice(size_t begin, size_t end) const { + begin = std::min(begin, ByteLength()); + end = std::min(end, ByteLength()); +diff --git a/chromium/third_party/blink/renderer/core/typed_arrays/dom_array_buffer.h b/chromium/third_party/blink/renderer/core/typed_arrays/dom_array_buffer.h +index 87881af8787..84322ff31fc 100644 +--- src/3rdparty/chromium/third_party/blink/renderer/core/typed_arrays/dom_array_buffer.h ++++ src/3rdparty/chromium/third_party/blink/renderer/core/typed_arrays/dom_array_buffer.h +@@ -87,6 +87,17 @@ class CORE_EXPORT DOMArrayBuffer : public DOMArrayBufferBase { + + void Trace(Visitor*) const override; + ++ bool IsDetached() const override; ++ ++ v8::Local<v8::Object> AssociateWithWrapper( ++ v8::Isolate* isolate, ++ const WrapperTypeInfo* wrapper_type_info, ++ v8::Local<v8::Object> wrapper) override; ++ ++ bool has_non_main_world_wrappers() const { ++ return has_non_main_world_wrappers_; ++ } ++ + private: + v8::Maybe<bool> TransferDetachable(v8::Isolate*, + v8::Local<v8::Value> detach_key, +@@ -97,6 +108,8 @@ class CORE_EXPORT DOMArrayBuffer : public DOMArrayBufferBase { + // support only v8::String as the detach key type. It's also convenient that + // we can write `array_buffer->SetDetachKey(isolate, "my key")`. + TraceWrapperV8Reference<v8::String> detach_key_; ++ ++ bool has_non_main_world_wrappers_ = false; + }; + + } // namespace blink +diff --git a/chromium/third_party/blink/renderer/core/typed_arrays/dom_array_buffer_base.h b/chromium/third_party/blink/renderer/core/typed_arrays/dom_array_buffer_base.h +index 95511438595..c83dc489c97 100644 +--- src/3rdparty/chromium/third_party/blink/renderer/core/typed_arrays/dom_array_buffer_base.h ++++ src/3rdparty/chromium/third_party/blink/renderer/core/typed_arrays/dom_array_buffer_base.h +@@ -27,7 +27,7 @@ class CORE_EXPORT DOMArrayBufferBase : public ScriptWrappable { + + size_t ByteLength() const { return contents_.DataLength(); } + +- bool IsDetached() const { return is_detached_; } ++ virtual bool IsDetached() const { return is_detached_; } + + void Detach() { is_detached_ = true; } + +From 92d5d3c528d5c4b22aa295b6b26303f174c0991b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marja=20H=C3=B6ltt=C3=A4?= <marja@google.com> +Date: Thu, 4 Apr 2024 09:43:42 +0200 +Subject: [PATCH] [Backport] CVE-2024-3914: Use after free in V8 (2/2) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Manual cherry-pick of patch originally reviewed on +https://chromium-review.googlesource.com/c/chromium/src/+/5419329: +[M120-LTS] Comment out a CHECK that a DOMAB has maximally one non-detached JSAB + +Based on crash reports, this assumption is not true and has to be +investigated. + +Removing this newly introduced CHECK to be able to merge fixes in this +area - we still violate this invariant but the fixes are a step into +the right direction. + +Fix in question: +https://chromium-review.googlesource.com/5387887 +which also introduced this CHECK. + +Bug: 330759272 +Change-Id: I4ba52fee7ed8f45e352efd347e87df03d896ac3d +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5419329 +Commit-Queue: Marja Hölttä <marja@chromium.org> +Cr-Commit-Position: refs/heads/main@{#1282379} +(cherry picked from commit 1e1e1bccfb84713fc325025eae43e746abcc115d) +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/556752 +Reviewed-by: Michal Klocek <michal.klocek@qt.io> +--- + .../blink/renderer/core/typed_arrays/dom_array_buffer.cc | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/chromium/third_party/blink/renderer/core/typed_arrays/dom_array_buffer.cc b/chromium/third_party/blink/renderer/core/typed_arrays/dom_array_buffer.cc +index 197a4aebf5b..796f45d7114 100644 +--- src/3rdparty/chromium/third_party/blink/renderer/core/typed_arrays/dom_array_buffer.cc ++++ src/3rdparty/chromium/third_party/blink/renderer/core/typed_arrays/dom_array_buffer.cc +@@ -290,7 +290,11 @@ bool DOMArrayBuffer::IsDetached() const { + ++nondetached_count; + } + } +- CHECK_LE(nondetached_count, 1); ++ // This CHECK fires even though it should not. TODO(330759272): Investigate ++ // under which conditions we end up with multiple non-detached JSABs for the ++ // same DOMAB and potentially restore this check. ++ ++ // CHECK_LE(nondetached_count, 1); + + return nondetached_count == 0 && detached_count > 0; + } +From 7ea70f94879b466b8319a52b786ae2ce3e47b737 Mon Sep 17 00:00:00 2001 +From: Dan McArdle <dmcardle@chromium.org> +Date: Tue, 30 Jan 2024 22:20:43 +0000 +Subject: [PATCH] [Backport] Dependency for security bug 326498393 (1/2) + +Cherry-pick of patch originally reviewed on +https://chromium-review.googlesource.com/c/chromium/src/+/5245970: +Prevent dangling pointer by inlining ScopedBusyTimeout + +Bug: 1522873 +Change-Id: Icd6262eb23404c273fa31021cddf36bea0bb56db +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5245970 +Reviewed-by: Evan Stade <estade@chromium.org> +Reviewed-by: David Benjamin <davidben@chromium.org> +Commit-Queue: Dan McArdle <dmcardle@chromium.org> +Cr-Commit-Position: refs/heads/main@{#1254220} +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/556851 +Reviewed-by: Michal Klocek <michal.klocek@qt.io> +--- + chromium/sql/database.cc | 48 +++++++++++++++------------------------- + 1 file changed, 18 insertions(+), 30 deletions(-) + +diff --git a/chromium/sql/database.cc b/chromium/sql/database.cc +index d5d350e85f4..5825127634a 100644 +--- src/3rdparty/chromium/sql/database.cc ++++ src/3rdparty/chromium/sql/database.cc +@@ -74,21 +74,6 @@ static constexpr char kSqliteOpenInMemoryPath[] = ":memory:"; + // TODO(shess): Better story on this. http://crbug.com/56559 + const int kBusyTimeoutSeconds = 1; + +-class ScopedBusyTimeout { +- public: +- explicit ScopedBusyTimeout(sqlite3* db) : db_(db) {} +- ~ScopedBusyTimeout() { sqlite3_busy_timeout(db_, 0); } +- +- int SetTimeout(base::TimeDelta timeout) { +- DCHECK_LT(timeout.InMilliseconds(), INT_MAX); +- return sqlite3_busy_timeout(db_, +- static_cast<int>(timeout.InMilliseconds())); +- } +- +- private: +- raw_ptr<sqlite3> db_; +-}; +- + // Helper to "safely" enable writable_schema. No error checking + // because it is reasonable to just forge ahead in case of an error. + // If turning it on fails, then most likely nothing will work, whereas +@@ -1405,22 +1390,14 @@ SqliteResultCode Database::ExecuteAndReturnResultCode(const char* sql) { + } + + bool Database::Execute(const char* sql) { +- TRACE_EVENT1("sql", "Database::Execute", "query", TRACE_STR_COPY(sql)); +- +- if (!db_) { +- DCHECK(poisoned_) << "Illegal use of Database without a db"; +- return false; +- } ++ TRACE_EVENT0("sql", "Database::Execute"); + +- SqliteResultCode sqlite_result_code = ExecuteAndReturnResultCode(sql); +- if (sqlite_result_code != SqliteResultCode::kOk) +- OnSqliteError(ToSqliteErrorCode(sqlite_result_code), nullptr, sql); +- +- return sqlite_result_code == SqliteResultCode::kOk; ++ return ExecuteWithTimeout(sql, base::TimeDelta()); + } + + bool Database::ExecuteWithTimeout(const char* sql, base::TimeDelta timeout) { +- TRACE_EVENT0("sql", "Database::ExecuteWithTimeout"); ++ TRACE_EVENT1("sql", "Database::ExecuteWithTimeout", "query", ++ TRACE_STR_COPY(sql)); + + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + if (!db_) { +@@ -1428,9 +1405,20 @@ bool Database::ExecuteWithTimeout(const char* sql, base::TimeDelta timeout) { + return false; + } + +- ScopedBusyTimeout busy_timeout(db_); +- busy_timeout.SetTimeout(timeout); +- return Execute(sql); ++ // Passing zero or a negative value to sqlite3_busy_timeout() would clear any ++ // busy handlers defined prior to this point. ++ if (timeout.is_positive()) { ++ DCHECK_LT(timeout.InMilliseconds(), INT_MAX); ++ sqlite3_busy_timeout(db_, static_cast<int>(timeout.InMilliseconds())); ++ } ++ SqliteResultCode sqlite_result_code = ExecuteAndReturnResultCode(sql); ++ sqlite3_busy_timeout(db_, 0); ++ if (sqlite_result_code != SqliteResultCode::kOk) { ++ OnSqliteError(ToSqliteErrorCode(sqlite_result_code), nullptr, sql); ++ // At this point, `this` may have been modified or even deleted as a result ++ // of the caller-provided error callback. ++ } ++ return sqlite_result_code == SqliteResultCode::kOk; + } + + bool Database::ExecuteScriptForTesting(const char* sql_script) { +From 1e584e2b322c5bc8ff49a7a64375d969662242e1 Mon Sep 17 00:00:00 2001 +From: Dan McArdle <dmcardle@chromium.org> +Date: Tue, 6 Feb 2024 23:15:33 +0000 +Subject: [PATCH] [Backport] Dependency for security bug 326498393 (2/2) + +Manual cherry-pick of patch originally reviewed on +https://chromium-review.googlesource.com/c/chromium/src/+/5245191: +Prevent dangling pointer in ScopedWritableSchema + +Bug: 1522873 +Change-Id: I71d7d178c98f2f2fc880762942fbca608d8cb81c +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5245191 +Reviewed-by: Evan Stade <estade@chromium.org> +Commit-Queue: Dan McArdle <dmcardle@chromium.org> +Cr-Commit-Position: refs/heads/main@{#1257060} +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/556852 +Reviewed-by: Michal Klocek <michal.klocek@qt.io> +--- + chromium/sql/database.cc | 29 +++++++++++++++++++---------- + chromium/sql/database.h | 4 ++++ + 2 files changed, 23 insertions(+), 10 deletions(-) + +diff --git a/chromium/sql/database.cc b/chromium/sql/database.cc +index 5825127634a..54c7c44c7e2 100644 +--- src/3rdparty/chromium/sql/database.cc ++++ src/3rdparty/chromium/sql/database.cc +@@ -74,23 +74,29 @@ static constexpr char kSqliteOpenInMemoryPath[] = ":memory:"; + // TODO(shess): Better story on this. http://crbug.com/56559 + const int kBusyTimeoutSeconds = 1; + +-// Helper to "safely" enable writable_schema. No error checking +-// because it is reasonable to just forge ahead in case of an error. +-// If turning it on fails, then most likely nothing will work, whereas +-// if turning it off fails, it only matters if some code attempts to +-// continue working with the database and tries to modify the ++// RAII-style wrapper that enables `writable_schema` until it goes out of scope. ++// No error checking on the PRAGMA statements because it is reasonable to just ++// forge ahead in case of an error. If turning it on fails, then most likely ++// nothing will work, whereas if turning it off fails, it only matters if some ++// code attempts to continue working with the database and tries to modify the + // sqlite_schema table (none of our code does this). + class ScopedWritableSchema { + public: +- explicit ScopedWritableSchema(sqlite3* db) : db_(db) { +- sqlite3_exec(db_, "PRAGMA writable_schema=1", nullptr, nullptr, nullptr); ++ explicit ScopedWritableSchema(base::WeakPtr<Database> db) ++ : db_(std::move(db)) { ++ CHECK(db_->is_open()); ++ std::ignore = db_->Execute("PRAGMA writable_schema=1"); + } + ~ScopedWritableSchema() { +- sqlite3_exec(db_, "PRAGMA writable_schema=0", nullptr, nullptr, nullptr); ++ // Database invalidates its WeakPtrs before closing the SQLite connection. ++ if (db_) { ++ CHECK(db_->is_open()); ++ std::ignore = db_->Execute("PRAGMA writable_schema=0"); ++ } + } + + private: +- raw_ptr<sqlite3> db_; ++ const base::WeakPtr<Database> db_; + }; + + // Raze() helper that uses SQLite's online backup API. +@@ -386,6 +392,9 @@ void Database::CloseInternal(bool forced) { + std::move(memory_dump_provider_)); + } + ++ // Invalidate any `WeakPtr`s held by scoping helpers. ++ weak_factory_.InvalidateWeakPtrs(); ++ + auto sqlite_result_code = ToSqliteResultCode(sqlite3_close(db_)); + + DCHECK_NE(sqlite_result_code, SqliteResultCode::kBusy) +@@ -1014,7 +1023,7 @@ bool Database::Raze() { + // sqlite3.c lockBtree().] + // TODO(shess): With this, "PRAGMA auto_vacuum" and "PRAGMA + // page_size" can be used to query such a database. +- ScopedWritableSchema writable_schema(db_); ++ ScopedWritableSchema writable_schema(weak_factory_.GetWeakPtr()); + + #if BUILDFLAG(IS_WIN) + // On Windows, truncate silently fails when applied to memory-mapped files. +diff --git a/chromium/sql/database.h b/chromium/sql/database.h +index 79172875fda..71a2f672221 100644 +--- src/3rdparty/chromium/sql/database.h ++++ src/3rdparty/chromium/sql/database.h +@@ -24,6 +24,7 @@ + #include "base/memory/raw_ptr.h" + #include "base/memory/raw_ptr_exclusion.h" + #include "base/memory/ref_counted.h" ++#include "base/memory/weak_ptr.h" + #include "base/sequence_checker.h" + #include "base/strings/string_piece.h" + #include "base/threading/scoped_blocking_call.h" +@@ -1021,6 +1022,9 @@ class COMPONENT_EXPORT(SQL) Database { + + // Stores the dump provider object when db is open. + std::unique_ptr<DatabaseMemoryDumpProvider> memory_dump_provider_; ++ ++ // Vends WeakPtr<Database> for internal scoping helpers. ++ base::WeakPtrFactory<Database> weak_factory_{this}; + }; + + } // namespace sql +From 1ea3a7dc0b8e1f779f0ff047799cce884bb9986a Mon Sep 17 00:00:00 2001 +From: Dan McArdle <dmcardle@chromium.org> +Date: Thu, 29 Feb 2024 17:08:14 +0000 +Subject: [PATCH] [Backport] Security bug 326498393 + +Manual backport of patch originally reviewed on +https://chromium-review.googlesource.com/c/chromium/src/+/5320373: +SQL: Make sql::Transaction hold WeakPtr<Database> + +Now, Transaction checks whether the Database has been destroyed before +using it. + +This CL also adds stricter sequence checking to Database, which found a +few places that Database was passed between sequences: + +(1) storage::DatabaseTracker was using and destroying sql::Database on + different sequences. Now, it simply destroys the Database instance + in storage::DatabaseTracker::Shutdown(), which already runs on the + correct sequence. + +(1) history::InMemoryDatabase was "slurping" data from disk on one + sequence, then querying the data on a different sequence. To support + this use case, we added added sql:Database::DetachFromSequence(). + Now, InMemoryDatabase effectively annotates the cut point where the + Database is handed off to another sequence. + +Bug: 326498393 +Change-Id: I866061feaf08d48607d97731a512bc02ce497f71 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5320373 +Reviewed-by: manuk hovanesian <manukh@chromium.org> +Commit-Queue: Dan McArdle <dmcardle@chromium.org> +Reviewed-by: Evan Stade <estade@chromium.org> +Auto-Submit: Dan McArdle <dmcardle@chromium.org> +Cr-Commit-Position: refs/heads/main@{#1267047} +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/556853 +Reviewed-by: Michal Klocek <michal.klocek@qt.io> +--- + .../history/core/browser/in_memory_database.cc | 3 +++ + chromium/sql/database.cc | 16 ++++++++++++++++ + chromium/sql/database.h | 12 ++++++++++-- + chromium/sql/internal_api_token.h | 1 + + chromium/sql/transaction.cc | 17 ++++++++++++++--- + chromium/sql/transaction.h | 4 ++-- + .../browser/database/database_tracker.cc | 8 ++++++++ + .../storage/browser/database/database_tracker.h | 4 +++- + 8 files changed, 57 insertions(+), 8 deletions(-) + +diff --git a/chromium/components/history/core/browser/in_memory_database.cc b/chromium/components/history/core/browser/in_memory_database.cc +index ad9c02696e3c..d139ddc45112 100644 +--- src/3rdparty/chromium/components/history/core/browser/in_memory_database.cc ++++ src/3rdparty/chromium/components/history/core/browser/in_memory_database.cc +@@ -122,6 +122,9 @@ bool InMemoryDatabase::InitFromDisk(const base::FilePath& history_name) { + // inserting into it. + CreateMainURLIndex(); + ++ // After this point, the database may be accessed from another sequence. ++ db_.DetachFromSequence(); ++ + return true; + } + +diff --git a/chromium/sql/database.cc b/chromium/sql/database.cc +index 54c7c44c7e26..b69e4c968c56 100644 +--- src/3rdparty/chromium/sql/database.cc ++++ src/3rdparty/chromium/sql/database.cc +@@ -45,6 +45,7 @@ + #include "build/build_config.h" + #include "sql/database_memory_dump_provider.h" + #include "sql/initialization.h" ++#include "sql/internal_api_token.h" + #include "sql/meta_table.h" + #include "sql/sql_features.h" + #include "sql/sqlite_result_code.h" +@@ -221,6 +222,11 @@ base::FilePath Database::SharedMemoryFilePath(const base::FilePath& db_path) { + return base::FilePath(db_path.value() + FILE_PATH_LITERAL("-shm")); + } + ++base::WeakPtr<Database> Database::GetWeakPtr(InternalApiToken) { ++ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); ++ return weak_factory_.GetWeakPtr(); ++} ++ + Database::StatementRef::StatementRef(Database* database, + sqlite3_stmt* stmt, + bool was_valid) +@@ -341,6 +347,11 @@ bool Database::OpenInMemory() { + return OpenInternal(kSqliteOpenInMemoryPath, OpenMode::kInMemory); + } + ++void Database::DetachFromSequence() { ++ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); ++ DETACH_FROM_SEQUENCE(sequence_checker_); ++} ++ + bool Database::OpenTemporary(base::PassKey<Recovery>) { + TRACE_EVENT0("sql", "Database::OpenTemporary"); + +@@ -350,6 +361,9 @@ bool Database::OpenTemporary(base::PassKey<Recovery>) { + + void Database::CloseInternal(bool forced) { + TRACE_EVENT0("sql", "Database::CloseInternal"); ++ ++ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); ++ + // TODO(shess): Calling "PRAGMA journal_mode = DELETE" at this point + // will delete the -journal file. For ChromiumOS or other more + // embedded systems, this is probably not appropriate, whereas on +@@ -966,6 +980,8 @@ void Database::TrimMemory() { + bool Database::Raze() { + TRACE_EVENT0("sql", "Database::Raze"); + ++ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); ++ + absl::optional<base::ScopedBlockingCall> scoped_blocking_call; + InitScopedBlockingCall(FROM_HERE, &scoped_blocking_call); + +diff --git a/chromium/sql/database.h b/chromium/sql/database.h +index 71a2f6722219..2570aade0157 100644 +--- src/3rdparty/chromium/sql/database.h ++++ src/3rdparty/chromium/sql/database.h +@@ -27,6 +27,7 @@ + #include "base/memory/weak_ptr.h" + #include "base/sequence_checker.h" + #include "base/strings/string_piece.h" ++#include "base/thread_annotations.h" + #include "base/threading/scoped_blocking_call.h" + #include "base/types/pass_key.h" + #include "sql/internal_api_token.h" +@@ -261,8 +262,10 @@ struct COMPONENT_EXPORT(SQL) DatabaseDiagnostics { + + // Handle to an open SQLite database. + // +-// Instances of this class are not thread-safe. After construction, a Database +-// instance should only be accessed from one sequence. ++// Instances of this class are not thread-safe. With few exceptions, Database ++// instances should only be accessed from one sequence. Database instances may ++// be constructed on one sequence and safely used/destroyed on another. Callers ++// may explicitly use `DetachFromSequence()` before moving to another sequence. + // + // When a Database instance goes out of scope, any uncommitted transactions are + // rolled back. +@@ -394,6 +397,10 @@ class COMPONENT_EXPORT(SQL) Database { + // Returns true if the database has been successfully opened. + bool is_open() const; + ++ // Detach from the currently-attached sequence. If already attached to a ++ // sequence, this method must be called from that sequence. ++ void DetachFromSequence(); ++ + // Closes the database. This is automatically performed on destruction for + // you, but this allows you to close the database early. You must not call + // any other functions after closing it. It is permissable to call Close on +@@ -700,6 +707,7 @@ class COMPONENT_EXPORT(SQL) Database { + static base::FilePath SharedMemoryFilePath(const base::FilePath& db_path); + + // Internal state accessed by other classes in //sql. ++ base::WeakPtr<Database> GetWeakPtr(InternalApiToken); + sqlite3* db(InternalApiToken) const { return db_; } + bool poisoned(InternalApiToken) const { return poisoned_; } + base::FilePath DbPath(InternalApiToken) const { return DbPath(); } +diff --git a/chromium/sql/internal_api_token.h b/chromium/sql/internal_api_token.h +index c71b70309ee9..d9ec0b834f8e 100644 +--- src/3rdparty/chromium/sql/internal_api_token.h ++++ src/3rdparty/chromium/sql/internal_api_token.h +@@ -28,6 +28,7 @@ class InternalApiToken { + friend class BuiltInRecovery; + friend class DatabaseTestPeer; + friend class Recovery; ++ friend class Transaction; + friend struct test::ColumnInfo; + friend bool test::CorruptSizeInHeader(const base::FilePath&); + }; +diff --git a/chromium/sql/transaction.cc b/chromium/sql/transaction.cc +index a8d85b67fbd7..71bc7381b55f 100644 +--- src/3rdparty/chromium/sql/transaction.cc ++++ src/3rdparty/chromium/sql/transaction.cc +@@ -7,11 +7,13 @@ + #include "base/check.h" + #include "base/sequence_checker.h" + #include "sql/database.h" ++#include "sql/internal_api_token.h" + + namespace sql { + +-Transaction::Transaction(Database* database) : database_(*database) { +- DCHECK(database); ++Transaction::Transaction(Database* database) { ++ CHECK(database); ++ database_ = database->GetWeakPtr(InternalApiToken{}); + } + + Transaction::~Transaction() { +@@ -21,7 +23,7 @@ Transaction::~Transaction() { + << "Begin() not called immediately after Transaction creation"; + #endif // DCHECK_IS_ON() + +- if (is_active_) ++ if (is_active_ && database_ && database_->is_open()) + database_->RollbackTransaction(); + } + +@@ -33,6 +35,9 @@ bool Transaction::Begin() { + #endif // DCHECK_IS_ON() + + DCHECK(!is_active_); ++ if (!database_) { ++ return false; ++ } + is_active_ = database_->BeginTransaction(); + return is_active_; + } +@@ -49,6 +54,9 @@ void Transaction::Rollback() { + DCHECK(is_active_) << __func__ << " called after Begin() failed"; + is_active_ = false; + ++ if (!database_) { ++ return; ++ } + database_->RollbackTransaction(); + } + +@@ -63,6 +71,9 @@ bool Transaction::Commit() { + + DCHECK(is_active_) << __func__ << " called after Begin() failed"; + is_active_ = false; ++ if (!database_) { ++ return false; ++ } + return database_->CommitTransaction(); + } + +diff --git a/chromium/sql/transaction.h b/chromium/sql/transaction.h +index 54573bcf98d2..8e20d7fe737a 100644 +--- src/3rdparty/chromium/sql/transaction.h ++++ src/3rdparty/chromium/sql/transaction.h +@@ -7,7 +7,7 @@ + + #include "base/check.h" + #include "base/component_export.h" +-#include "base/memory/raw_ref.h" ++#include "base/memory/weak_ptr.h" + #include "base/sequence_checker.h" + #include "base/thread_annotations.h" + +@@ -91,7 +91,7 @@ class COMPONENT_EXPORT(SQL) Transaction { + private: + SEQUENCE_CHECKER(sequence_checker_); + +- const raw_ref<Database> database_ GUARDED_BY_CONTEXT(sequence_checker_); ++ base::WeakPtr<Database> database_ GUARDED_BY_CONTEXT(sequence_checker_); + + #if DCHECK_IS_ON() + bool begin_called_ GUARDED_BY_CONTEXT(sequence_checker_) = false; +diff --git a/chromium/storage/browser/database/database_tracker.cc b/chromium/storage/browser/database/database_tracker.cc +index 2926db89bac4..5dbfcf2d4227 100644 +--- src/3rdparty/chromium/storage/browser/database/database_tracker.cc ++++ src/3rdparty/chromium/storage/browser/database/database_tracker.cc +@@ -4,6 +4,7 @@ + + #include "storage/browser/database/database_tracker.h" + ++#include <stddef.h> + #include <stdint.h> + + #include <algorithm> +@@ -986,6 +987,13 @@ void DatabaseTracker::Shutdown() { + else if (!force_keep_session_state_) + ClearSessionOnlyOrigins(); + CloseTrackerDatabaseAndClearCaches(); ++ ++ // Explicitly destroy `db_` on the correct sequence rather than waiting for ++ // the destructor, which may run on another sequence. Destroy related fields ++ // first to prevent dangling pointers. Destruction order is important. ++ meta_table_.reset(); ++ databases_table_.reset(); ++ db_.reset(); + } + + void DatabaseTracker::SetForceKeepSessionState() { +diff --git a/chromium/storage/browser/database/database_tracker.h b/chromium/storage/browser/database/database_tracker.h +index 17b6aea42766..57d189e338d3 100644 +--- src/3rdparty/chromium/storage/browser/database/database_tracker.h ++++ src/3rdparty/chromium/storage/browser/database/database_tracker.h +@@ -77,7 +77,9 @@ class COMPONENT_EXPORT(STORAGE_BROWSER) OriginInfo { + // The data in this class is not thread-safe, so all methods of this class + // should be called on the task runner returned by task_runner(). The only + // exceptions are the constructor, the destructor, and the getters explicitly +-// marked as thread-safe. ++// marked as thread-safe. Although the destructor itself may run on any thread, ++// destruction effectively occurs in Shutdown(), which expects to be called on ++// task_runner(). + class COMPONENT_EXPORT(STORAGE_BROWSER) DatabaseTracker + : public base::RefCountedThreadSafe<DatabaseTracker> { + public: +From aea30bc1019793100c4586d499fa7f82ff18613b Mon Sep 17 00:00:00 2001 +From: Liam Brady <lbrady@google.com> +Date: Thu, 7 Mar 2024 22:11:26 +0000 +Subject: [PATCH] [Backport] CVE-2024-3840: Insufficient policy enforcement in + Site Isolation +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Manual cherry-pick of patch originally reviewed on +https://chromium-review.googlesource.com/c/chromium/src/+/5269464: +Clear user activation on cross-site navigations. + +When full site isolation is disabled, renderer processes and +RenderFrameHosts are re-used when performing cross-site navigations. +This includes user activation state, and, more specifically, the sticky +`has_been_active_` bit in `UserActivationState`. + +Currently, the `UserActivationState` on the renderer-side is reset only +if the navigation's associated frame is a main frame. That means that if +an iframe navigates to a cross-site page, its sticky user activation +state will be the leftover state from the previous page. So, if a user +interacted with the previous page in any capacity, the newly loaded page +will think it has received a user gesture, essentially using an +unintentional cache of the user activation state. + +This becomes an issue when dealing with our framebusting interventions. +We only allow an iframe to do a top-level navigation if it received a +user gesture. However, if an iframe's previous document received a user +activation, or worse, if the iframe was not navigated to anything and +got a user activation because its embedder was interacted with, this +allows the current document to circumvent our framebusting +interventions. The latter happens because of same-origin descendant +activation behavior. See: +https://source.chromium.org/chromium/chromium/src/+/main:content/browser/renderer_host/frame_tree_node.cc;l=766-778;drc=30753b1135fa271a3b45bbdbfef6567e46733a7f;bpv=1;bpt=1 + +Note that this problem does not exist if site isolation is enabled +(which is by default on desktop platforms), since a cross-site +navigation will create a whole new process with a fresh +`UserActivationState`. + +To fix this, this CL clears the user activation state on cross-site +subframe navigations in the renderer (user activation is already cleared +for main frames). To ensure that same-site navigations persist user +state even if a cross-origin or same-origin navigation results in a new +process or RenderFrameHost being created, this CL also explicitly +transfers sticky user activation state for all same-site +cross-RenderFrameHost navigations. This takes place in the browser, and +the resulting bit to determine if a frame should have sticky user +activation is passed to the renderer. + +The ultimate end goal is to unconditionally clear the user activation +state for all cross-document navigations. That unfortunately is not +possible today as there are entrenched use cases that rely on sticky +user activation state being cached for same-site navigations. See: +https://crbug.com/40228985. + +This CL also fixes the aforementioned regression when enabling the +RenderDocument feature, since this CL will now preserve the sticky user +activation state regardless of what +process/RenderFrameHost/RenderDocument state the navigation results in. + +This CL adds some tests to the no-auto-wpt-origin-isolation test suite, which requires some additional description: + +* These tests are running on all platforms because site isolation behavior may differ per platform +* All of the tests in the-iframe-element are being added because it would be useful to understand their behavior in all expected process +configurations +* The total time taken for this test suite on linux-rel showed a total time percentage of <0.3% + +Bug: 41493458 +Change-Id: Ibec11437fcd03470571e04a4e0dfaadffddf6c03 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5269464 +Reviewed-by: Mustaq Ahmed <mustaq@chromium.org> +Reviewed-by: Charlie Reis <creis@chromium.org> +Reviewed-by: Jeremy Roman <jbroman@chromium.org> +Reviewed-by: Robert Flack <flackr@chromium.org> +Reviewed-by: Andrew Verge <averge@chromium.org> +Commit-Queue: Liam Brady <lbrady@google.com> +Reviewed-by: Alex Moshchuk <alexmos@chromium.org> +Reviewed-by: danakj <danakj@chromium.org> +Cr-Commit-Position: refs/heads/main@{#1269856} +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/556966 +Reviewed-by: Michael BrĂĽning <michael.bruning@qt.io> +--- + .../browser/renderer_host/frame_tree_node.cc | 30 ++++++++--------- + .../browser/renderer_host/frame_tree_node.h | 15 ++++----- + .../navigation_controller_impl.cc | 4 ++- + .../renderer_host/navigation_entry_impl.cc | 5 +-- + .../renderer_host/navigation_request.cc | 29 ++++++++++++---- + .../browser/renderer_host/navigator.cc | 33 +++++++++++++++---- + .../renderer_host/render_frame_host_impl.cc | 11 +++++-- + .../renderer_host/render_frame_host_impl.h | 3 +- + .../content/renderer/render_frame_impl.cc | 3 ++ + .../common/frame/user_activation_state.cc | 4 +++ + .../common/frame/user_activation_state.h | 4 +++ + .../frame/user_activation_update_types.mojom | 8 +++++ + .../mojom/navigation/navigation_params.mojom | 4 +++ + .../blink/public/web/web_navigation_params.h | 4 +++ + .../blink/renderer/core/frame/frame.cc | 21 ++++++++++-- + .../blink/renderer/core/frame/frame.h | 10 +++++- + .../blink/renderer/core/frame/remote_frame.cc | 3 ++ + .../renderer/core/loader/document_loader.cc | 21 ++++++++++-- + .../renderer/core/loader/document_loader.h | 4 +++ + 19 files changed, 164 insertions(+), 52 deletions(-) + +diff --git a/chromium/content/browser/renderer_host/frame_tree_node.cc b/chromium/content/browser/renderer_host/frame_tree_node.cc +index dd618cfa09e5..1ed5a5e0f004 100644 +--- src/3rdparty/chromium/content/browser/renderer_host/frame_tree_node.cc ++++ src/3rdparty/chromium/content/browser/renderer_host/frame_tree_node.cc +@@ -338,19 +338,6 @@ bool FrameTreeNode::IsOutermostMainFrame() const { + return !GetParentOrOuterDocument(); + } + +-void FrameTreeNode::ResetForNavigation() { +- // This frame has had its user activation bits cleared in the renderer before +- // arriving here. We just need to clear them here and in the other renderer +- // processes that may have a reference to this frame. +- // +- // We do not take user activation into account when calculating +- // |ResetForNavigationResult|, as we are using it to determine bfcache +- // eligibility and the page can get another user gesture after restore. +- UpdateUserActivationState( +- blink::mojom::UserActivationUpdateType::kClearActivation, +- blink::mojom::UserActivationNotificationType::kNone); +-} +- + RenderFrameHostImpl* FrameTreeNode::GetParentOrOuterDocument() const { + return GetParentOrOuterDocumentHelper(/*escape_guest_view=*/false, + /*include_prospective=*/true); +@@ -769,15 +756,22 @@ void FrameTreeNode::BeforeUnloadCanceled() { + } + } + ++bool FrameTreeNode::NotifyUserActivationStickyOnly() { ++ return NotifyUserActivation( ++ blink::mojom::UserActivationNotificationType::kNone, ++ /*sticky_only=*/true); ++} ++ + bool FrameTreeNode::NotifyUserActivation( +- blink::mojom::UserActivationNotificationType notification_type) { ++ blink::mojom::UserActivationNotificationType notification_type, ++ bool sticky_only) { + // User Activation V2 requires activating all ancestor frames in addition to + // the current frame. See + // https://html.spec.whatwg.org/multipage/interaction.html#tracking-user-activation. + for (RenderFrameHostImpl* rfh = current_frame_host(); rfh; + rfh = rfh->GetParent()) { + rfh->DidReceiveUserActivation(); +- rfh->ActivateUserActivation(notification_type); ++ rfh->ActivateUserActivation(notification_type, sticky_only); + } + + current_frame_host()->browsing_context_state()->set_has_active_user_gesture( +@@ -792,7 +786,8 @@ bool FrameTreeNode::NotifyUserActivation( + for (FrameTreeNode* node : frame_tree().Nodes()) { + if (node->current_frame_host()->GetLastCommittedOrigin().IsSameOriginWith( + current_origin)) { +- node->current_frame_host()->ActivateUserActivation(notification_type); ++ node->current_frame_host()->ActivateUserActivation(notification_type, ++ sticky_only); + } + } + } +@@ -860,6 +855,9 @@ bool FrameTreeNode::UpdateUserActivationState( + return false; + } + } break; ++ case blink::mojom::UserActivationUpdateType::kNotifyActivationStickyOnly: ++ update_result = NotifyUserActivationStickyOnly(); ++ break; + case blink::mojom::UserActivationUpdateType::kClearActivation: + update_result = ClearUserActivation(); + break; +diff --git a/chromium/content/browser/renderer_host/frame_tree_node.h b/chromium/content/browser/renderer_host/frame_tree_node.h +index 0edd7b389cc3..284a81e467dd 100644 +--- src/3rdparty/chromium/content/browser/renderer_host/frame_tree_node.h ++++ src/3rdparty/chromium/content/browser/renderer_host/frame_tree_node.h +@@ -122,14 +122,6 @@ class CONTENT_EXPORT FrameTreeNode : public RenderFrameHostOwner { + bool IsMainFrame() const; + bool IsOutermostMainFrame() const; + +- // Clears any state in this node which was set by the document itself (CSP & +- // UserActivationState) and notifies proxies as appropriate. Invoked after +- // committing navigation to a new document (since the new document comes with +- // a fresh set of CSP). +- // TODO(arthursonzogni): Remove this function. The frame/document must not be +- // left temporarily with lax state. +- void ResetForNavigation(); +- + FrameTree& frame_tree() const { return frame_tree_.get(); } + Navigator& navigator(); + +@@ -772,8 +764,13 @@ class CONTENT_EXPORT FrameTreeNode : public RenderFrameHostOwner { + class OpenerDestroyedObserver; + + // The |notification_type| parameter is used for histograms only. ++ // |sticky_only| is set to true when propagating sticky user activation during ++ // cross-document navigations. The transient state remains unchanged. + bool NotifyUserActivation( +- blink::mojom::UserActivationNotificationType notification_type); ++ blink::mojom::UserActivationNotificationType notification_type, ++ bool sticky_only = false); ++ ++ bool NotifyUserActivationStickyOnly(); + + bool ConsumeTransientUserActivation(); + +diff --git a/chromium/content/browser/renderer_host/navigation_controller_impl.cc b/chromium/content/browser/renderer_host/navigation_controller_impl.cc +index 24203784c631..54e064642bdc 100644 +--- src/3rdparty/chromium/content/browser/renderer_host/navigation_controller_impl.cc ++++ src/3rdparty/chromium/content/browser/renderer_host/navigation_controller_impl.cc +@@ -3979,7 +3979,9 @@ NavigationControllerImpl::CreateNavigationRequestFromLoadParams( + /*origin_agent_cluster_left_as_default=*/true, + /*enabled_client_hints=*/ + std::vector<network::mojom::WebClientHintsType>(), +- /*is_cross_browsing_instance=*/false, /*old_page_info=*/nullptr, ++ /*is_cross_site_cross_browsing_context_group=*/false, ++ /*should_have_sticky_user_activation=*/false, ++ /*old_page_info=*/nullptr, + /*http_response_code=*/-1, + blink::mojom::NavigationApiHistoryEntryArrays::New(), + /*early_hints_preloaded_resources=*/std::vector<GURL>(), +diff --git a/chromium/content/browser/renderer_host/navigation_entry_impl.cc b/chromium/content/browser/renderer_host/navigation_entry_impl.cc +index 1c318ac954ed..897fb61b887d 100644 +--- src/3rdparty/chromium/content/browser/renderer_host/navigation_entry_impl.cc ++++ src/3rdparty/chromium/content/browser/renderer_host/navigation_entry_impl.cc +@@ -942,8 +942,9 @@ NavigationEntryImpl::ConstructCommitNavigationParams( + true /* origin_agent_cluster_left_as_default */, + std::vector< + network::mojom::WebClientHintsType>() /* enabled_client_hints */, +- false /* is_cross_browsing_instance */, nullptr /* old_page_info */, +- -1 /* http_response_code */, ++ false /* is_cross_site_cross_browsing_context_group */, ++ false /* should_have_sticky_user_activation */, ++ nullptr /* old_page_info */, -1 /* http_response_code */, + blink::mojom::NavigationApiHistoryEntryArrays::New(), + std::vector<GURL>() /* early_hints_preloaded_resources */, + // This timestamp will be populated when the commit IPC is sent. +diff --git a/chromium/content/browser/renderer_host/navigation_request.cc b/chromium/content/browser/renderer_host/navigation_request.cc +index da6c714c0c04..923354bdafbf 100644 +--- src/3rdparty/chromium/content/browser/renderer_host/navigation_request.cc ++++ src/3rdparty/chromium/content/browser/renderer_host/navigation_request.cc +@@ -1318,7 +1318,8 @@ std::unique_ptr<NavigationRequest> NavigationRequest::CreateRendererInitiated( + /*origin_agent_cluster_left_as_default=*/true, + /*enabled_client_hints=*/ + std::vector<network::mojom::WebClientHintsType>(), +- /*is_cross_browsing_instance=*/false, ++ /*is_cross_site_cross_browsing_context_group=*/false, ++ /*should_have_sticky_user_activation=*/false, + /*old_page_info=*/nullptr, /*http_response_code=*/-1, + blink::mojom::NavigationApiHistoryEntryArrays::New(), + /*early_hints_preloaded_resources=*/std::vector<GURL>(), +@@ -1462,7 +1463,8 @@ NavigationRequest::CreateForSynchronousRendererCommit( + /*origin_agent_cluster_left_as_default=*/true, + /*enabled_client_hints=*/ + std::vector<network::mojom::WebClientHintsType>(), +- /*is_cross_browsing_instance=*/false, ++ /*is_cross_site_cross_browsing_context_group=*/false, ++ /*should_have_sticky_user_activation=*/false, + /*old_page_info=*/nullptr, http_response_code, + blink::mojom::NavigationApiHistoryEntryArrays::New(), + /*early_hints_preloaded_resources=*/std::vector<GURL>(), +@@ -5599,11 +5601,11 @@ void NavigationRequest::CommitNavigation() { + } + } + ++ RenderFrameHostImpl* old_frame_host = ++ frame_tree_node_->render_manager()->current_frame_host(); + if (!NavigationTypeUtils::IsSameDocument(common_params_->navigation_type)) { + // We want to record this for the frame that we are navigating away from. +- frame_tree_node_->render_manager() +- ->current_frame_host() +- ->RecordNavigationSuddenTerminationHandlers(); ++ old_frame_host->RecordNavigationSuddenTerminationHandlers(); + } + if (IsServedFromBackForwardCache() || IsPrerenderedPageActivation()) { + CommitPageActivation(); +@@ -5623,8 +5625,7 @@ void NavigationRequest::CommitNavigation() { + if (!weak_self) + return; + +- DCHECK(GetRenderFrameHost() == +- frame_tree_node_->render_manager()->current_frame_host() || ++ DCHECK(GetRenderFrameHost() == old_frame_host || + GetRenderFrameHost() == + frame_tree_node_->render_manager()->speculative_frame_host()); + +@@ -5699,6 +5700,20 @@ void NavigationRequest::CommitNavigation() { + response(), frame_tree_node_); + } + ++ // Sticky user activation should only be preserved for same-site subframe ++ // navigations. This is done to prevent newly navigated documents from ++ // re-using the sticky user activation state from the previously navigated ++ // document in the frame. We persist user activation across same-site ++ // navigations for compatibility reasons, and this does not need to match the ++ // same-site checks used in the process model. See: crbug.com/736415. ++ // TODO(crbug.com/40228985): Remove this once we find a way to reset ++ // activation unconditionally without breaking sites in practice. ++ commit_params_->should_have_sticky_user_activation = ++ !frame_tree_node_->IsMainFrame() && ++ old_frame_host->HasStickyUserActivation() && ++ net::SchemefulSite(old_frame_host->GetLastCommittedOrigin()) == ++ net::SchemefulSite(origin); ++ + // Generate a UKM source and track it on NavigationRequest. This will be + // passed down to the blink::Document to be created, if any, and used for UKM + // source creation when navigation has successfully committed. +diff --git a/chromium/content/browser/renderer_host/navigator.cc b/chromium/content/browser/renderer_host/navigator.cc +index 1063f29af344..e4cdb82d5598 100644 +--- src/3rdparty/chromium/content/browser/renderer_host/navigator.cc ++++ src/3rdparty/chromium/content/browser/renderer_host/navigator.cc +@@ -47,6 +47,7 @@ + #include "content/public/common/content_constants.h" + #include "content/public/common/url_utils.h" + #include "net/base/net_errors.h" ++#include "net/base/schemeful_site.h" + #include "services/metrics/public/cpp/ukm_builders.h" + #include "services/metrics/public/cpp/ukm_recorder.h" + #include "services/metrics/public/cpp/ukm_source_id.h" +@@ -512,6 +513,9 @@ void Navigator::DidNavigate( + was_within_same_document); + } + ++ // Store this information before DidNavigateFrame() potentially swaps RFHs. ++ url::Origin old_frame_origin = old_frame_host->GetLastCommittedOrigin(); ++ + // DidNavigateFrame() must be called before replicating the new origin and + // other properties to proxies. This is because it destroys the subframes of + // the frame we're navigating from, which might trigger those subframes to +@@ -524,6 +528,29 @@ void Navigator::DidNavigate( + .ShouldClearProxiesOnCommit(), + navigation_request->commit_params().frame_policy); + ++ // The main frame, same site, and cross-site navigation checks for user ++ // activation mirror the checks in DocumentLoader::CommitNavigation() (note: ++ // CommitNavigation() is not called for same-document navigations, which is ++ // why we have the !was_within_same_document check). This is done to prevent ++ // newly navigated pages from re-using the sticky user activation state from ++ // the previously navigated page in the frame. We persist user activation ++ // across same-site navigations for compatibility reasons with user ++ // activation, and does not need to match the same-site checks used in the ++ // process model. See: crbug.com/736415, and crbug.com/40228985 for the ++ // specific regression that resulted in this requirement. ++ if (!was_within_same_document) { ++ if (!navigation_request->commit_params() ++ .should_have_sticky_user_activation) { ++ frame_tree_node->UpdateUserActivationState( ++ blink::mojom::UserActivationUpdateType::kClearActivation, ++ blink::mojom::UserActivationNotificationType::kNone); ++ } else { ++ frame_tree_node->UpdateUserActivationState( ++ blink::mojom::UserActivationUpdateType::kNotifyActivationStickyOnly, ++ blink::mojom::UserActivationNotificationType::kNone); ++ } ++ } ++ + // Save the new page's origin and other properties, and replicate them to + // proxies, including the proxy created in DidNavigateFrame() to replace the + // old frame in cross-process navigation cases. +@@ -534,12 +561,6 @@ void Navigator::DidNavigate( + render_frame_host->browsing_context_state()->SetInsecureNavigationsSet( + params.insecure_navigations_set); + +- if (!was_within_same_document) { +- // Navigating to a new location means a new, fresh set of http headers +- // and/or <meta> elements - we need to reset Permissions Policy. +- frame_tree_node->ResetForNavigation(); +- } +- + // If the committing URL requires the SiteInstance's site to be assigned, + // that site assignment should've already happened at ReadyToCommit time. We + // should never get here with a SiteInstance that doesn't have a site +diff --git a/chromium/content/browser/renderer_host/render_frame_host_impl.cc b/chromium/content/browser/renderer_host/render_frame_host_impl.cc +index c5f90d4965f9..d1d0efb398ba 100644 +--- src/3rdparty/chromium/content/browser/renderer_host/render_frame_host_impl.cc ++++ src/3rdparty/chromium/content/browser/renderer_host/render_frame_host_impl.cc +@@ -6002,9 +6002,14 @@ void RenderFrameHostImpl::ConsumeTransientUserActivation() { + } + + void RenderFrameHostImpl::ActivateUserActivation( +- blink::mojom::UserActivationNotificationType notification_type) { +- user_activation_state_.Activate(notification_type); +- history_user_activation_state_.Activate(); ++ blink::mojom::UserActivationNotificationType notification_type, ++ bool sticky_only) { ++ if (sticky_only) { ++ user_activation_state_.SetHasBeenActive(); ++ } else { ++ user_activation_state_.Activate(notification_type); ++ history_user_activation_state_.Activate(); ++ } + } + + void RenderFrameHostImpl::ActivateFocusSourceUserActivation() { +diff --git a/chromium/content/browser/renderer_host/render_frame_host_impl.h b/chromium/content/browser/renderer_host/render_frame_host_impl.h +index 378657c0a55d..0a001fb828e1 100644 +--- src/3rdparty/chromium/content/browser/renderer_host/render_frame_host_impl.h ++++ src/3rdparty/chromium/content/browser/renderer_host/render_frame_host_impl.h +@@ -2931,7 +2931,8 @@ class CONTENT_EXPORT RenderFrameHostImpl + void ClearUserActivation(); + void ConsumeTransientUserActivation(); + void ActivateUserActivation( +- blink::mojom::UserActivationNotificationType notification_type); ++ blink::mojom::UserActivationNotificationType notification_type, ++ bool sticky_only = false); + + // These are called only when RenderFrameHostOwner is iterating over all + // frames, not directly from the renderer. +diff --git a/chromium/content/renderer/render_frame_impl.cc b/chromium/content/renderer/render_frame_impl.cc +index 5da8ffc96764..13afea50ecba 100644 +--- src/3rdparty/chromium/content/renderer/render_frame_impl.cc ++++ src/3rdparty/chromium/content/renderer/render_frame_impl.cc +@@ -981,6 +981,9 @@ void FillMiscNavigationParams( + navigation_params->is_cross_site_cross_browsing_context_group = + commit_params.is_cross_site_cross_browsing_context_group; + ++ navigation_params->should_have_sticky_user_activation = ++ commit_params.should_have_sticky_user_activation; ++ + #if BUILDFLAG(IS_ANDROID) || defined(TOOLKIT_QT) + // Only android webview uses this. + navigation_params->grant_load_local_resources = +diff --git a/chromium/third_party/blink/common/frame/user_activation_state.cc b/chromium/third_party/blink/common/frame/user_activation_state.cc +index 5804fa8049be..ad85a074d10b 100644 +--- src/3rdparty/chromium/third_party/blink/common/frame/user_activation_state.cc ++++ src/3rdparty/chromium/third_party/blink/common/frame/user_activation_state.cc +@@ -47,6 +47,10 @@ void UserActivationState::Activate( + transient_state_expiry_time_for_interaction_ = transient_state_expiry_time_; + } + ++void UserActivationState::SetHasBeenActive() { ++ has_been_active_ = true; ++} ++ + void UserActivationState::Clear() { + has_been_active_ = false; + last_activation_was_restricted_ = false; +diff --git a/chromium/third_party/blink/public/common/frame/user_activation_state.h b/chromium/third_party/blink/public/common/frame/user_activation_state.h +index fe530372caa0..6e143d2e9795 100644 +--- src/3rdparty/chromium/third_party/blink/public/common/frame/user_activation_state.h ++++ src/3rdparty/chromium/third_party/blink/public/common/frame/user_activation_state.h +@@ -111,6 +111,10 @@ class BLINK_COMMON_EXPORT UserActivationState { + // |is_restricted| as a parameter here. + void Activate(mojom::UserActivationNotificationType notification_type); + ++ // Used when propagating user activation state across cross-process ++ // navigations. ++ void SetHasBeenActive(); ++ + void Clear(); + + // Returns the sticky activation state, which is |true| if the frame has ever +diff --git a/chromium/third_party/blink/public/mojom/frame/user_activation_update_types.mojom b/chromium/third_party/blink/public/mojom/frame/user_activation_update_types.mojom +index 6db97b4a695c..5acd66856df0 100644 +--- src/3rdparty/chromium/third_party/blink/public/mojom/frame/user_activation_update_types.mojom ++++ src/3rdparty/chromium/third_party/blink/public/mojom/frame/user_activation_update_types.mojom +@@ -7,8 +7,16 @@ module blink.mojom; + // Types of UserActivationV2 state updates sent between the browser and the + // renderer processes. + enum UserActivationUpdateType { ++ // Used to give a document sticky and transient user activation as a result of ++ // a user gesture. + kNotifyActivation, + kNotifyActivationPendingBrowserVerification, ++ // Used to propagate the sticky user activation state during cross-document ++ // navigations. ++ kNotifyActivationStickyOnly, ++ // Used after a sensitive API is called to prevent abuse of the API. + kConsumeTransientActivation, ++ // Used during cross-document navigations when the user activation state ++ // shouldn't be propagated. + kClearActivation + }; +diff --git a/chromium/third_party/blink/public/mojom/navigation/navigation_params.mojom b/chromium/third_party/blink/public/mojom/navigation/navigation_params.mojom +index b568f7442142..3947e8dcaeb3 100644 +--- src/3rdparty/chromium/third_party/blink/public/mojom/navigation/navigation_params.mojom ++++ src/3rdparty/chromium/third_party/blink/public/mojom/navigation/navigation_params.mojom +@@ -510,6 +510,10 @@ struct CommitNavigationParams { + // Whether this is a cross-site navigation that swaps BrowsingContextGroups. + bool is_cross_site_cross_browsing_context_group = false; + ++ // Whether the new document should start with sticky user activation, because ++ // the previously committed document did, and the navigation was same-site. ++ bool should_have_sticky_user_activation = false; ++ + // Should only be set to a valid value for main-frame same-site navigations + // where we did a proactive BrowsingInstance swap and we're reusing the old + // page's process. +diff --git a/chromium/third_party/blink/public/web/web_navigation_params.h b/chromium/third_party/blink/public/web/web_navigation_params.h +index 560c4e985497..206bff0b0042 100644 +--- src/3rdparty/chromium/third_party/blink/public/web/web_navigation_params.h ++++ src/3rdparty/chromium/third_party/blink/public/web/web_navigation_params.h +@@ -466,6 +466,10 @@ struct BLINK_EXPORT WebNavigationParams { + // (BrowsingInstances). + bool is_cross_site_cross_browsing_context_group = false; + ++ // Whether the new document should start with sticky user activation, because ++ // the previously committed document did, and the navigation was same-site. ++ bool should_have_sticky_user_activation = false; ++ + // Blink's copy of the policy container containing security policies to be + // enforced on the document created by this navigation. + std::unique_ptr<WebPolicyContainer> policy_container; +diff --git a/chromium/third_party/blink/renderer/core/frame/frame.cc b/chromium/third_party/blink/renderer/core/frame/frame.cc +index e0ce2a1bcbef..ce18145c67a6 100644 +--- src/3rdparty/chromium/third_party/blink/renderer/core/frame/frame.cc ++++ src/3rdparty/chromium/third_party/blink/renderer/core/frame/frame.cc +@@ -286,10 +286,21 @@ void Frame::DidChangeVisibilityState() { + child_frames[i]->DidChangeVisibilityState(); + } + ++void Frame::NotifyUserActivationInFrameTreeStickyOnly() { ++ NotifyUserActivationInFrameTree( ++ mojom::blink::UserActivationNotificationType::kNone, ++ /*sticky_only=*/true); ++} ++ + void Frame::NotifyUserActivationInFrameTree( +- mojom::blink::UserActivationNotificationType notification_type) { ++ mojom::blink::UserActivationNotificationType notification_type, ++ bool sticky_only) { + for (Frame* node = this; node; node = node->Tree().Parent()) { +- node->user_activation_state_.Activate(notification_type); ++ if (sticky_only) { ++ node->user_activation_state_.SetHasBeenActive(); ++ } else { ++ node->user_activation_state_.Activate(notification_type); ++ } + node->ActivateHistoryUserActivationState(); + } + +@@ -307,7 +318,11 @@ void Frame::NotifyUserActivationInFrameTree( + if (local_frame_node && + security_origin->CanAccess( + local_frame_node->GetSecurityContext()->GetSecurityOrigin())) { +- node->user_activation_state_.Activate(notification_type); ++ if (sticky_only) { ++ node->user_activation_state_.SetHasBeenActive(); ++ } else { ++ node->user_activation_state_.Activate(notification_type); ++ } + node->ActivateHistoryUserActivationState(); + } + } +diff --git a/chromium/third_party/blink/renderer/core/frame/frame.h b/chromium/third_party/blink/renderer/core/frame/frame.h +index 2487e9a9a98a..3707cff0fa64 100644 +--- src/3rdparty/chromium/third_party/blink/renderer/core/frame/frame.h ++++ src/3rdparty/chromium/third_party/blink/renderer/core/frame/frame.h +@@ -256,6 +256,12 @@ class CORE_EXPORT Frame : public GarbageCollected<Frame> { + return user_activation_state_.LastActivationWasRestricted(); + } + ++ // Sets the sticky user activation state of this frame. This does not change ++ // the transient user activation state. ++ void SetStickyUserActivationState() { ++ user_activation_state_.SetHasBeenActive(); ++ } ++ + // Resets the user activation state of this frame. + void ClearUserActivation() { user_activation_state_.Clear(); } + +@@ -482,8 +488,10 @@ class CORE_EXPORT Frame : public GarbageCollected<Frame> { + void ApplyFrameOwnerProperties( + mojom::blink::FrameOwnerPropertiesPtr properties); + ++ void NotifyUserActivationInFrameTreeStickyOnly(); + void NotifyUserActivationInFrameTree( +- mojom::blink::UserActivationNotificationType notification_type); ++ mojom::blink::UserActivationNotificationType notification_type, ++ bool sticky_only = false); + bool ConsumeTransientUserActivationInFrameTree(); + void ClearUserActivationInFrameTree(); + +diff --git a/chromium/third_party/blink/renderer/core/frame/remote_frame.cc b/chromium/third_party/blink/renderer/core/frame/remote_frame.cc +index e5d0e24fa1cb..7f3f457261da 100644 +--- src/3rdparty/chromium/third_party/blink/renderer/core/frame/remote_frame.cc ++++ src/3rdparty/chromium/third_party/blink/renderer/core/frame/remote_frame.cc +@@ -665,6 +665,9 @@ void RemoteFrame::UpdateUserActivationState( + case mojom::blink::UserActivationUpdateType::kNotifyActivation: + NotifyUserActivationInFrameTree(notification_type); + break; ++ case mojom::blink::UserActivationUpdateType::kNotifyActivationStickyOnly: ++ NotifyUserActivationInFrameTreeStickyOnly(); ++ break; + case mojom::blink::UserActivationUpdateType::kConsumeTransientActivation: + ConsumeTransientUserActivationInFrameTree(); + break; +diff --git a/chromium/third_party/blink/renderer/core/loader/document_loader.cc b/chromium/third_party/blink/renderer/core/loader/document_loader.cc +index b7b130e869fe..b29ab01b9f84 100644 +--- src/3rdparty/chromium/third_party/blink/renderer/core/loader/document_loader.cc ++++ src/3rdparty/chromium/third_party/blink/renderer/core/loader/document_loader.cc +@@ -305,6 +305,7 @@ struct SameSizeAsDocumentLoader + bool origin_agent_cluster; + bool origin_agent_cluster_left_as_default; + bool is_cross_site_cross_browsing_context_group; ++ bool should_have_sticky_user_activation; + WebVector<WebHistoryItem> navigation_api_back_entries; + WebVector<WebHistoryItem> navigation_api_forward_entries; + std::unique_ptr<CodeCacheHost> code_cache_host; +@@ -512,6 +513,8 @@ DocumentLoader::DocumentLoader( + params_->origin_agent_cluster_left_as_default), + is_cross_site_cross_browsing_context_group_( + params_->is_cross_site_cross_browsing_context_group), ++ should_have_sticky_user_activation_( ++ params_->should_have_sticky_user_activation), + navigation_api_back_entries_(params_->navigation_api_back_entries), + navigation_api_forward_entries_(params_->navigation_api_forward_entries), + extra_data_(std::move(extra_data)), +@@ -651,6 +654,9 @@ DocumentLoader::CreateWebNavigationParamsToCloneDocument() { + params->document_ukm_source_id = ukm_source_id_; + params->is_cross_site_cross_browsing_context_group = + is_cross_site_cross_browsing_context_group_; ++ // Required for javascript: URL commits to propagate sticky user activation. ++ params->should_have_sticky_user_activation = ++ frame_->HasStickyUserActivation() && !frame_->IsMainFrame(); + params->has_text_fragment_token = has_text_fragment_token_; + // Origin trials must still work on the cloned document. + params->initiator_origin_trial_features = +@@ -2554,10 +2560,19 @@ void DocumentLoader::CommitNavigation() { + + frame_->ClearScrollSnapshotClients(); + +- // Clear the user activation state. ++ // Determine whether to give the frame sticky user activation. These checks ++ // mirror the check in Navigator::DidNavigate(). Main frame navigations and ++ // cross-site navigations should not hold on to the sticky user activation ++ // state of the previously navigated page. Same-site navigations should retain ++ // the previous document's sticky user activation state, regardless of whether ++ // the navigation resulted in a new process being created. ++ // See: crbug.com/41493458 + // TODO(crbug.com/736415): Clear this bit unconditionally for all frames. +- if (frame_->IsMainFrame()) +- frame_->ClearUserActivation(); ++ if (!should_have_sticky_user_activation_) { ++ frame_->ClearUserActivation(); ++ } else { ++ frame_->SetStickyUserActivationState(); ++ } + + // The DocumentLoader was flagged as activated if it needs to notify the frame + // that it was activated before navigation. Update the frame state based on +diff --git a/chromium/third_party/blink/renderer/core/loader/document_loader.h b/chromium/third_party/blink/renderer/core/loader/document_loader.h +index 1548bbee1845..ca1758eef3f4 100644 +--- src/3rdparty/chromium/third_party/blink/renderer/core/loader/document_loader.h ++++ src/3rdparty/chromium/third_party/blink/renderer/core/loader/document_loader.h +@@ -783,6 +783,10 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected<DocumentLoader>, + // BrowsingContextGroup. + bool is_cross_site_cross_browsing_context_group_ = false; + ++ // Whether the new document should start with sticky user activation, because ++ // the previously committed document did, and the navigation was same-site. ++ bool should_have_sticky_user_activation_ = false; ++ + WebVector<WebHistoryItem> navigation_api_back_entries_; + WebVector<WebHistoryItem> navigation_api_forward_entries_; + +From 6fd09d7a49f15e12264f25a54db9fe189b235d16 Mon Sep 17 00:00:00 2001 +From: Ayu Ishii <ayui@chromium.org> +Date: Thu, 21 Mar 2024 20:06:29 +0000 +Subject: [PATCH] [Backport] Security bug 323898565 + +Cherry-pick of patch originally reviewed on +https://chromium-review.googlesource.com/c/chromium/src/+/5288855: +WebSQL: Remove session data logic + +On Profile destruction, currently there is a race with +the DatabaseTracker shutdown. DatabaseTracker shutdown +will post task[1] on the database task runner because +it needs to do file I/O. However it also has some logic +to retrieve info for special storage policies from the +Profile which may already be destroyed by that time. + +This change removes logic for special storage policy from +DatabaseTracker. DatabaseTracker(WebSQL) is removed +from all platforms as of M119 except for WebView, which does +not utilize the special storage policy. All policy and +deprecation support have ended with M123. Therefore cleaning +up the code to avoid the race. + +[1]https://source.chromium.org/chromium/chromium/src/+/main:content/browser/storage_partition_impl.cc;l=1200;drc=be92f4cc2f137460213d52a926c9477275a456c5 + +Bug: 323898565, 325476286 +Change-Id: Ie2ef898c558308439a8b0d3fdf67f7157440b20a +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5288855 +Commit-Queue: Ayu Ishii <ayui@chromium.org> +Reviewed-by: Alex Moshchuk <alexmos@chromium.org> +Reviewed-by: Evan Stade <estade@chromium.org> +Cr-Commit-Position: refs/heads/main@{#1276451} +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/557063 +Reviewed-by: Michal Klocek <michal.klocek@qt.io> +--- + chromium/content/browser/browser_context.cc | 8 --- + .../content/browser/storage_partition_impl.cc | 3 +- + .../browser/database/database_tracker.cc | 65 +------------------ + .../browser/database/database_tracker.h | 15 ----- + 4 files changed, 3 insertions(+), 88 deletions(-) + +diff --git a/chromium/content/browser/browser_context.cc b/chromium/content/browser/browser_context.cc +index c07c16f62e3..6b952d4572f 100644 +--- src/3rdparty/chromium/content/browser/browser_context.cc ++++ src/3rdparty/chromium/content/browser/browser_context.cc +@@ -56,7 +56,6 @@ + #include "media/mojo/services/video_decode_perf_history.h" + #include "media/mojo/services/webrtc_video_perf_history.h" + #include "storage/browser/blob/blob_storage_context.h" +-#include "storage/browser/database/database_tracker.h" + #include "storage/browser/file_system/external_mount_points.h" + #include "third_party/blink/public/mojom/push_messaging/push_messaging.mojom.h" + #include "third_party/perfetto/include/perfetto/tracing/traced_proto.h" +@@ -252,13 +251,6 @@ void BrowserContext::EnsureResourceContextInitialized() { + void BrowserContext::SaveSessionState() { + StoragePartition* storage_partition = GetDefaultStoragePartition(); + +- storage::DatabaseTracker* database_tracker = +- storage_partition->GetDatabaseTracker(); +- database_tracker->task_runner()->PostTask( +- FROM_HERE, +- base::BindOnce(&storage::DatabaseTracker::SetForceKeepSessionState, +- base::WrapRefCounted(database_tracker))); +- + storage_partition->GetCookieManagerForBrowserProcess() + ->SetForceKeepSessionState(); + +diff --git a/chromium/content/browser/storage_partition_impl.cc b/chromium/content/browser/storage_partition_impl.cc +index 3147e6d0371..12ef04e2d8f 100644 +--- src/3rdparty/chromium/content/browser/storage_partition_impl.cc ++++ src/3rdparty/chromium/content/browser/storage_partition_impl.cc +@@ -1371,8 +1371,7 @@ void StoragePartitionImpl::Initialize( + browser_context_, partition_path_, is_in_memory(), quota_manager_proxy); + + database_tracker_ = storage::DatabaseTracker::Create( +- partition_path_, is_in_memory(), +- browser_context_->GetSpecialStoragePolicy(), quota_manager_proxy); ++ partition_path_, is_in_memory(), quota_manager_proxy); + + dom_storage_context_ = DOMStorageContextWrapper::Create( + this, browser_context_->GetSpecialStoragePolicy()); +diff --git a/chromium/storage/browser/database/database_tracker.cc b/chromium/storage/browser/database/database_tracker.cc +index 5dbfcf2d422..865661ea56e 100644 +--- src/3rdparty/chromium/storage/browser/database/database_tracker.cc ++++ src/3rdparty/chromium/storage/browser/database/database_tracker.cc +@@ -42,7 +42,6 @@ + #include "storage/browser/database/databases_table.h" + #include "storage/browser/quota/quota_client_type.h" + #include "storage/browser/quota/quota_manager_proxy.h" +-#include "storage/browser/quota/special_storage_policy.h" + #include "storage/common/database/database_identifier.h" + #include "third_party/blink/public/common/storage_key/storage_key.h" + #include "third_party/blink/public/mojom/quota/quota_types.mojom.h" +@@ -73,12 +72,6 @@ OriginInfo::OriginInfo(const OriginInfo& origin_info) = default; + + OriginInfo::~OriginInfo() = default; + +-void OriginInfo::GetAllDatabaseNames( +- std::vector<std::u16string>* databases) const { +- for (const auto& name_and_size : database_sizes_) +- databases->push_back(name_and_size.first); +-} +- + int64_t OriginInfo::GetDatabaseSize(const std::u16string& database_name) const { + auto it = database_sizes_.find(database_name); + if (it != database_sizes_.end()) +@@ -92,11 +85,10 @@ OriginInfo::OriginInfo(const std::string& origin_identifier, int64_t total_size) + scoped_refptr<DatabaseTracker> DatabaseTracker::Create( + const base::FilePath& profile_path, + bool is_incognito, +- scoped_refptr<SpecialStoragePolicy> special_storage_policy, + scoped_refptr<QuotaManagerProxy> quota_manager_proxy) { + auto database_tracker = base::MakeRefCounted<DatabaseTracker>( +- profile_path, is_incognito, std::move(special_storage_policy), +- std::move(quota_manager_proxy), base::PassKey<DatabaseTracker>()); ++ profile_path, is_incognito, std::move(quota_manager_proxy), ++ base::PassKey<DatabaseTracker>()); + database_tracker->RegisterQuotaClient(); + return database_tracker; + } +@@ -104,7 +96,6 @@ scoped_refptr<DatabaseTracker> DatabaseTracker::Create( + DatabaseTracker::DatabaseTracker( + const base::FilePath& profile_path, + bool is_incognito, +- scoped_refptr<SpecialStoragePolicy> special_storage_policy, + scoped_refptr<QuotaManagerProxy> quota_manager_proxy, + base::PassKey<DatabaseTracker>) + : is_incognito_(is_incognito), +@@ -117,7 +108,6 @@ DatabaseTracker::DatabaseTracker( + .page_size = 4096, + .cache_size = 500, + })), +- special_storage_policy_(std::move(special_storage_policy)), + quota_manager_proxy_(std::move(quota_manager_proxy)), + task_runner_(base::ThreadPool::CreateSequencedTaskRunner( + {base::MayBlock(), base::TaskPriority::USER_VISIBLE, +@@ -791,12 +781,6 @@ void DatabaseTracker::DeleteDataModifiedSince( + DatabaseSet to_be_deleted; + int rv = net::OK; + for (const auto& origin : origins_identifiers) { +- if (special_storage_policy_.get() && +- special_storage_policy_->IsStorageProtected( +- GetOriginURLFromIdentifier(origin))) { +- continue; +- } +- + std::vector<DatabaseDetails> details; + if (!databases_table_->GetAllDatabaseDetailsForOriginIdentifier(origin, + &details)) { +@@ -930,44 +914,6 @@ void DatabaseTracker::DeleteIncognitoDBDirectory() { + base::DeletePathRecursively(incognito_db_dir); + } + +-void DatabaseTracker::ClearSessionOnlyOrigins() { +- DCHECK(task_runner_->RunsTasksInCurrentSequence()); +- bool has_session_only_databases = +- special_storage_policy_.get() && +- special_storage_policy_->HasSessionOnlyOrigins(); +- +- // Clearing only session-only databases, and there are none. +- if (!has_session_only_databases) +- return; +- +- if (!LazyInit()) +- return; +- +- std::vector<std::string> origin_identifiers; +- GetAllOriginIdentifiers(&origin_identifiers); +- +- for (const auto& origin : origin_identifiers) { +- GURL origin_url = GetOriginURLFromIdentifier(origin); +- if (!special_storage_policy_->IsStorageSessionOnly(origin_url)) +- continue; +- if (special_storage_policy_->IsStorageProtected(origin_url)) +- continue; +- OriginInfo origin_info; +- std::vector<std::u16string> databases; +- GetOriginInfo(origin, &origin_info); +- origin_info.GetAllDatabaseNames(&databases); +- +- for (const auto& database : databases) { +- base::File file( +- GetFullDBFilePath(origin, database), +- base::File::FLAG_OPEN_ALWAYS | base::File::FLAG_WIN_SHARE_DELETE | +- base::File::FLAG_DELETE_ON_CLOSE | base::File::FLAG_READ); +- } +- DeleteOrigin(origin, true); +- } +-} +- +- + void DatabaseTracker::Shutdown() { + DCHECK(task_runner_->RunsTasksInCurrentSequence()); + if (shutting_down_) { +@@ -984,8 +930,6 @@ void DatabaseTracker::Shutdown() { + + if (is_incognito_) + DeleteIncognitoDBDirectory(); +- else if (!force_keep_session_state_) +- ClearSessionOnlyOrigins(); + CloseTrackerDatabaseAndClearCaches(); + + // Explicitly destroy `db_` on the correct sequence rather than waiting for +@@ -996,9 +940,4 @@ void DatabaseTracker::Shutdown() { + db_.reset(); + } + +-void DatabaseTracker::SetForceKeepSessionState() { +- DCHECK(task_runner_->RunsTasksInCurrentSequence()); +- force_keep_session_state_ = true; +-} +- + } // namespace storage +diff --git a/chromium/storage/browser/database/database_tracker.h b/chromium/storage/browser/database/database_tracker.h +index 57d189e338d..bc55a0b020a 100644 +--- src/3rdparty/chromium/storage/browser/database/database_tracker.h ++++ src/3rdparty/chromium/storage/browser/database/database_tracker.h +@@ -41,7 +41,6 @@ namespace storage { + class DatabaseQuotaClient; + class QuotaClientCallbackWrapper; + class QuotaManagerProxy; +-class SpecialStoragePolicy; + + COMPONENT_EXPORT(STORAGE_BROWSER) + extern const base::FilePath::CharType kDatabaseDirectoryName[]; +@@ -101,13 +100,11 @@ class COMPONENT_EXPORT(STORAGE_BROWSER) DatabaseTracker + static scoped_refptr<DatabaseTracker> Create( + const base::FilePath& profile_path, + bool is_incognito, +- scoped_refptr<SpecialStoragePolicy> special_storage_policy, + scoped_refptr<QuotaManagerProxy> quota_manager_proxy); + + // Exposed for base::MakeRefCounted. Users should call Create(). + DatabaseTracker(const base::FilePath& profile_path, + bool is_incognito, +- scoped_refptr<SpecialStoragePolicy> special_storage_policy, + scoped_refptr<QuotaManagerProxy> quota_manager_proxy, + base::PassKey<DatabaseTracker>); + +@@ -168,9 +165,6 @@ class COMPONENT_EXPORT(STORAGE_BROWSER) DatabaseTracker + + // Deletes databases touched since `cutoff`. + // +- // Does not delete databases belonging to origins designated as protected by +- // the SpecialStoragePolicy passed to the DatabaseTracker constructor. +- // + // `callback` must must be non-null, and is invoked upon completion with a + // net::Error. The status will be net::OK on success, or net::FAILED if not + // all databases could be deleted. `callback` may be called before this method +@@ -198,8 +192,6 @@ class COMPONENT_EXPORT(STORAGE_BROWSER) DatabaseTracker + // Shutdown the database tracker, deleting database files if the tracker is + // used for an Incognito profile. + void Shutdown(); +- // Disables the exit-time deletion of session-only data. +- void SetForceKeepSessionState(); + + protected: + // Subclasses need PassKeys to call the constructor. +@@ -248,9 +240,6 @@ class COMPONENT_EXPORT(STORAGE_BROWSER) DatabaseTracker + // exists. + void DeleteIncognitoDBDirectory(); + +- // Deletes session-only databases. Blocks databases from being created/opened. +- void ClearSessionOnlyOrigins(); +- + bool DeleteClosedDatabase(const std::string& origin_identifier, + const std::u16string& database_name); + +@@ -303,7 +292,6 @@ class COMPONENT_EXPORT(STORAGE_BROWSER) DatabaseTracker + + bool is_initialized_ = false; + const bool is_incognito_; +- bool force_keep_session_state_ = false; + bool shutting_down_ = false; + const base::FilePath profile_path_; + +@@ -324,9 +312,6 @@ class COMPONENT_EXPORT(STORAGE_BROWSER) DatabaseTracker + std::vector<std::pair<net::CompletionOnceCallback, DatabaseSet>> + deletion_callbacks_; + +- // Apps and Extensions can have special rights. +- const scoped_refptr<SpecialStoragePolicy> special_storage_policy_; +- + // Can be accessed from any thread via quota_manager_proxy(). + // + // Thread-safety argument: The reference is immutable. +From 3ef0cdbadfc403513047464d18e63fc952a43f7b Mon Sep 17 00:00:00 2001 +From: Shahbaz Youssefi <syoussefi@chromium.org> +Date: Mon, 8 Apr 2024 10:14:45 -0400 +Subject: [PATCH] [Backport] CVE-2024-4058: Type Confusion in ANGLE + +Cherry-pick of patch originally reviewed on +https://chromium-review.googlesource.com/c/angle/angle/+/5462388: +SPIR-V: Fix const constructors with single scalar + +These constructors may be generated because of +RemoveArrayLengthTraverser. + +Bug: chromium:332546345 +Change-Id: I2b2bf3728ef5bae148abc2a8518f8f3f42850025 +Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5462388 +(cherry picked from commit 0b776d32f69a932acb61963d9daad9e13f610944) +Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5466390 +Commit-Queue: Zakhar Voit <voit@google.com> +Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> +Reviewed-by: Geoff Lang <geofflang@chromium.org> +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/557315 +Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> +--- + .../third_party/angle/src/compiler/translator/Compiler.cpp | 5 +++++ + .../angle/src/compiler/translator/spirv/OutputSPIRV.cpp | 2 ++ + 2 files changed, 7 insertions(+) + +diff --git a/chromium/third_party/angle/src/compiler/translator/Compiler.cpp b/chromium/third_party/angle/src/compiler/translator/Compiler.cpp +index c70c419631a..c846c9b33fa 100644 +--- src/3rdparty/chromium/third_party/angle/src/compiler/translator/Compiler.cpp ++++ src/3rdparty/chromium/third_party/angle/src/compiler/translator/Compiler.cpp +@@ -1034,6 +1034,11 @@ bool TCompiler::checkAndSimplifyAST(TIntermBlock *root, + { + return false; + } ++ // Fold the expressions again, because |RemoveArrayLengthMethod| can introduce new constants. ++ if (!FoldExpressions(this, root, &mDiagnostics)) ++ { ++ return false; ++ } + + if (!RemoveUnreferencedVariables(this, root, &mSymbolTable)) + { +diff --git a/chromium/third_party/angle/src/compiler/translator/spirv/OutputSPIRV.cpp b/chromium/third_party/angle/src/compiler/translator/spirv/OutputSPIRV.cpp +index ed3aac4e432..4c3d1d000c6 100644 +--- src/3rdparty/chromium/third_party/angle/src/compiler/translator/spirv/OutputSPIRV.cpp ++++ src/3rdparty/chromium/third_party/angle/src/compiler/translator/spirv/OutputSPIRV.cpp +@@ -1335,6 +1335,8 @@ spirv::IdRef OutputSPIRVTraverser::createComplexConstant(const TType &type, + + if (type.isMatrix() && !type.isArray()) + { ++ ASSERT(parameters.size() == type.getRows() * type.getCols()); ++ + // Matrices are constructed from their columns. + spirv::IdRefList columnIds; + +From b0ff4b16e877e3787a7200b71440c9f2be7fe1d7 Mon Sep 17 00:00:00 2001 +From: Antonio Maiorano <amaiorano@google.com> +Date: Thu, 18 Apr 2024 13:07:04 -0400 +Subject: [PATCH] [Backport] CVE-2024-4060: Use after free in Dawn + +Cherry-pick of patch originally reviewed on +https://chromium-review.googlesource.com/c/external/github.com/microsoft/DirectXShaderCompiler/+/5464347: +Replace dynamic_cast with virtual call (#6515) + +Make TextDiagnosticPrinter::setPrefix a virtual function in base class +DiagnosticConsumer. This allows us to avoid using dynamic_cast in +BackendConsumer::DxilDiagHandler, required for codebases that do not +enable RTTI. This is also the only place in the codebase that uses RTTI +(AFAICT). + +Bug: chromium:333420620 +Change-Id: Ida73077f24fdb4b705b5d868b04ac6cfecb30327 +Reviewed-on: https://chromium-review.googlesource.com/c/external/github.com/microsoft/DirectXShaderCompiler/+/5464347 +Reviewed-by: dan sinclair <dsinclair@chromium.org> +Reviewed-by: David Neto <dneto@google.com> +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/557316 +Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> +--- + .../dxc/tools/clang/include/clang/Basic/Diagnostic.h | 2 ++ + .../tools/clang/include/clang/Frontend/TextDiagnosticPrinter.h | 3 ++- + .../third_party/dxc/tools/clang/lib/CodeGen/CodeGenAction.cpp | 2 +- + 3 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/chromium/third_party/dawn/third_party/dxc/tools/clang/include/clang/Basic/Diagnostic.h b/chromium/third_party/dawn/third_party/dxc/tools/clang/include/clang/Basic/Diagnostic.h +index cf56e3a7208..b6f804012c5 100644 +--- src/3rdparty/chromium/third_party/dawn/third_party/dxc/tools/clang/include/clang/Basic/Diagnostic.h ++++ src/3rdparty/chromium/third_party/dawn/third_party/dxc/tools/clang/include/clang/Basic/Diagnostic.h +@@ -1395,6 +1395,8 @@ class DiagnosticConsumer { + /// warnings and errors. + virtual void HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, + const Diagnostic &Info); ++ ++ virtual void setPrefix(std::string Value) {} // HLSL Change + }; + + /// \brief A diagnostic client that ignores all diagnostics. +diff --git a/chromium/third_party/dawn/third_party/dxc/tools/clang/include/clang/Frontend/TextDiagnosticPrinter.h b/chromium/third_party/dawn/third_party/dxc/tools/clang/include/clang/Frontend/TextDiagnosticPrinter.h +index 04a570559fe..936031e0967 100644 +--- src/3rdparty/chromium/third_party/dawn/third_party/dxc/tools/clang/include/clang/Frontend/TextDiagnosticPrinter.h ++++ src/3rdparty/chromium/third_party/dawn/third_party/dxc/tools/clang/include/clang/Frontend/TextDiagnosticPrinter.h +@@ -45,7 +45,8 @@ class TextDiagnosticPrinter : public DiagnosticConsumer { + /// setPrefix - Set the diagnostic printer prefix string, which will be + /// printed at the start of any diagnostics. If empty, no prefix string is + /// used. +- void setPrefix(std::string Value) { Prefix = Value; } ++ // HLSL Change: add override ++ void setPrefix(std::string Value) override { Prefix = Value; } + + void BeginSourceFile(const LangOptions &LO, const Preprocessor *PP) override; + void EndSourceFile() override; +diff --git a/chromium/third_party/dawn/third_party/dxc/tools/clang/lib/CodeGen/CodeGenAction.cpp b/chromium/third_party/dawn/third_party/dxc/tools/clang/lib/CodeGen/CodeGenAction.cpp +index 4fa721e8122..68ebaadf5a8 100644 +--- src/3rdparty/chromium/third_party/dawn/third_party/dxc/tools/clang/lib/CodeGen/CodeGenAction.cpp ++++ src/3rdparty/chromium/third_party/dawn/third_party/dxc/tools/clang/lib/CodeGen/CodeGenAction.cpp +@@ -557,7 +557,7 @@ BackendConsumer::DxilDiagHandler(const llvm::DiagnosticInfoDxil &D) { + + // If no location information is available, add function name + if (Loc.isInvalid()) { +- auto *DiagClient = dynamic_cast<TextDiagnosticPrinter*>(Diags.getClient()); ++ auto *DiagClient = Diags.getClient(); + auto *func = D.getFunction(); + if (DiagClient && func) + DiagClient->setPrefix("Function: " + func->getName().str()); +From b916ca00cc5222253ac5860c3e612ccf00d899c3 Mon Sep 17 00:00:00 2001 +From: Nina Satragno <nsatragno@chromium.org> +Date: Mon, 8 Apr 2024 20:07:43 +0000 +Subject: [PATCH] [Backport] Security bug 332724843 + +Partial manual backport of patch originally reviewed on +https://chromium-review.googlesource.com/c/chromium/src/+/5426374: +[webauthn] Don't keep network contexts around + +Instead of having fido code pass network contexts around, pass a factory +and get a fresh one every time one is needed. + +Keep cable transact* methods that take a network context around until +we clean up the android cable client module in a follow-up. + +Bug: 332724843 +Change-Id: I33ea5c741706041c75c10cf881452fcf77fce445 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5426374 +Reviewed-by: Adam Langley <agl@chromium.org> +Commit-Queue: Nina Satragno <nsatragno@chromium.org> +Cr-Commit-Position: refs/heads/main@{#1284063} +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/557317 +Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> +--- + chromium/device/fido/BUILD.gn | 1 + + .../device/fido/cable/fido_tunnel_device.cc | 9 +-- + .../device/fido/cable/fido_tunnel_device.h | 5 +- + .../device/fido/cable/v2_authenticator.cc | 66 +++++++++++++++---- + chromium/device/fido/cable/v2_authenticator.h | 28 +++++++- + chromium/device/fido/cable/v2_discovery.cc | 10 +-- + chromium/device/fido/cable/v2_discovery.h | 5 +- + .../device/fido/fido_discovery_factory.cc | 7 +- + chromium/device/fido/fido_discovery_factory.h | 8 ++- + .../device/fido/network_context_factory.h | 20 ++++++ + 10 files changed, 122 insertions(+), 37 deletions(-) + create mode 100644 chromium/device/fido/network_context_factory.h + +diff --git a/chromium/device/fido/BUILD.gn b/chromium/device/fido/BUILD.gn +index 8e168df02ef..be11e40a4ce 100644 +--- src/3rdparty/chromium/device/fido/BUILD.gn ++++ src/3rdparty/chromium/device/fido/BUILD.gn +@@ -42,6 +42,7 @@ component("fido") { + "fido_transport_protocol.h", + "json_request.cc", + "json_request.h", ++ "network_context_factory.h", + "opaque_attestation_statement.cc", + "opaque_attestation_statement.h", + "p256_public_key.cc", +diff --git a/chromium/device/fido/cable/fido_tunnel_device.cc b/chromium/device/fido/cable/fido_tunnel_device.cc +index ad35e6ee176..bd10a4793bb 100644 +--- src/3rdparty/chromium/device/fido/cable/fido_tunnel_device.cc ++++ src/3rdparty/chromium/device/fido/cable/fido_tunnel_device.cc +@@ -17,6 +17,7 @@ + #include "device/fido/features.h" + #include "device/fido/fido_constants.h" + #include "device/fido/fido_parsing_utils.h" ++#include "device/fido/network_context_factory.h" + #include "net/traffic_annotation/network_traffic_annotation.h" + #include "third_party/boringssl/src/include/openssl/aes.h" + #include "third_party/boringssl/src/include/openssl/digest.h" +@@ -96,7 +97,7 @@ constexpr net::NetworkTrafficAnnotationTag kTrafficAnnotation = + })"); + + FidoTunnelDevice::FidoTunnelDevice( +- network::mojom::NetworkContext* network_context, ++ NetworkContextFactory network_context_factory, + absl::optional<base::RepeatingCallback<void(std::unique_ptr<Pairing>)>> + pairing_callback, + absl::optional<base::RepeatingCallback<void(Event)>> event_callback, +@@ -130,7 +131,7 @@ FidoTunnelDevice::FidoTunnelDevice( + base::BindOnce(&FidoTunnelDevice::OnTunnelReady, base::Unretained(this)), + base::BindRepeating(&FidoTunnelDevice::OnTunnelData, + base::Unretained(this))); +- network_context->CreateWebSocket( ++ network_context_factory.Run()->CreateWebSocket( + url, {kCableWebSocketProtocol}, net::SiteForCookies(), + net::IsolationInfo(), /*additional_headers=*/{}, + network::mojom::kBrowserProcessId, url::Origin::Create(url), +@@ -145,7 +146,7 @@ FidoTunnelDevice::FidoTunnelDevice( + + FidoTunnelDevice::FidoTunnelDevice( + FidoRequestType request_type, +- network::mojom::NetworkContext* network_context, ++ NetworkContextFactory network_context_factory, + std::unique_ptr<Pairing> pairing, + base::OnceClosure pairing_is_invalid, + absl::optional<base::RepeatingCallback<void(Event)>> event_callback) +@@ -187,7 +188,7 @@ FidoTunnelDevice::FidoTunnelDevice( + headers.emplace_back( + network::mojom::HttpHeader::New(kCableSignalConnectionHeader, "true")); + } +- network_context->CreateWebSocket( ++ network_context_factory.Run()->CreateWebSocket( + url, {kCableWebSocketProtocol}, net::SiteForCookies(), + net::IsolationInfo(), std::move(headers), + network::mojom::kBrowserProcessId, url::Origin::Create(url), +diff --git a/chromium/device/fido/cable/fido_tunnel_device.h b/chromium/device/fido/cable/fido_tunnel_device.h +index 1d0a7cb3372..840ecc34232 100644 +--- src/3rdparty/chromium/device/fido/cable/fido_tunnel_device.h ++++ src/3rdparty/chromium/device/fido/cable/fido_tunnel_device.h +@@ -17,6 +17,7 @@ + #include "device/fido/cable/websocket_adapter.h" + #include "device/fido/fido_constants.h" + #include "device/fido/fido_device.h" ++#include "device/fido/network_context_factory.h" + #include "third_party/abseil-cpp/absl/types/variant.h" + + namespace network::mojom { +@@ -33,7 +34,7 @@ class COMPONENT_EXPORT(DEVICE_FIDO) FidoTunnelDevice : public FidoDevice { + public: + // This constructor is used for QR-initiated connections. + FidoTunnelDevice( +- network::mojom::NetworkContext* network_context, ++ NetworkContextFactory network_context_factory, + absl::optional<base::RepeatingCallback<void(std::unique_ptr<Pairing>)>> + pairing_callback, + absl::optional<base::RepeatingCallback<void(Event)>> event_callback, +@@ -47,7 +48,7 @@ class COMPONENT_EXPORT(DEVICE_FIDO) FidoTunnelDevice : public FidoDevice { + // run. + FidoTunnelDevice( + FidoRequestType request_type, +- network::mojom::NetworkContext* network_context, ++ NetworkContextFactory network_context_factory, + std::unique_ptr<Pairing> pairing, + base::OnceClosure pairing_is_invalid, + absl::optional<base::RepeatingCallback<void(Event)>> event_callback); +diff --git a/chromium/device/fido/cable/v2_authenticator.cc b/chromium/device/fido/cable/v2_authenticator.cc +index e4bd3244cb3..faf8915ec10 100644 +--- src/3rdparty/chromium/device/fido/cable/v2_authenticator.cc ++++ src/3rdparty/chromium/device/fido/cable/v2_authenticator.cc +@@ -23,6 +23,7 @@ + #include "device/fido/features.h" + #include "device/fido/fido_constants.h" + #include "device/fido/fido_parsing_utils.h" ++#include "device/fido/network_context_factory.h" + #include "device/fido/public_key_credential_descriptor.h" + #include "device/fido/public_key_credential_params.h" + #include "device/fido/public_key_credential_rp_entity.h" +@@ -289,7 +290,7 @@ class TunnelTransport : public Transport { + public: + TunnelTransport( + Platform* platform, +- network::mojom::NetworkContext* network_context, ++ NetworkContextFactory network_context_factory, + base::span<const uint8_t> secret, + base::span<const uint8_t, device::kP256X962Length> peer_identity, + GeneratePairingDataCallback generate_pairing_data) +@@ -302,7 +303,7 @@ class TunnelTransport : public Transport { + secret, + base::span<const uint8_t>(), + device::cablev2::DerivedValueType::kEIDKey)), +- network_context_(network_context), ++ network_context_factory_(std::move(network_context_factory)), + peer_identity_(device::fido_parsing_utils::Materialize(peer_identity)), + generate_pairing_data_(std::move(generate_pairing_data)), + secret_(fido_parsing_utils::Materialize(secret)) { +@@ -319,7 +320,7 @@ class TunnelTransport : public Transport { + + TunnelTransport( + Platform* platform, +- network::mojom::NetworkContext* network_context, ++ NetworkContextFactory network_context_factory, + base::span<const uint8_t> secret, + base::span<const uint8_t, device::cablev2::kClientNonceSize> client_nonce, + std::array<uint8_t, device::cablev2::kRoutingIdSize> routing_id, +@@ -331,7 +332,7 @@ class TunnelTransport : public Transport { + secret, + client_nonce, + device::cablev2::DerivedValueType::kEIDKey)), +- network_context_(network_context), ++ network_context_factory_(network_context_factory), + secret_(fido_parsing_utils::Materialize(secret)), + local_identity_(std::move(local_identity)) { + DCHECK_EQ(state_, State::kNone); +@@ -390,7 +391,7 @@ class TunnelTransport : public Transport { + void StartWebSocket() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + +- network_context_->CreateWebSocket( ++ network_context_factory_.Run()->CreateWebSocket( + target_, {device::kCableWebSocketProtocol}, net::SiteForCookies(), + net::IsolationInfo(), /*additional_headers=*/{}, + network::mojom::kBrowserProcessId, url::Origin::Create(target_), +@@ -623,7 +624,7 @@ class TunnelTransport : public Transport { + const std::array<uint8_t, kEIDKeySize> eid_key_; + std::unique_ptr<WebSocketAdapter> websocket_client_; + std::unique_ptr<Crypter> crypter_; +- const raw_ptr<network::mojom::NetworkContext> network_context_; ++ NetworkContextFactory network_context_factory_; + const absl::optional<std::array<uint8_t, kP256X962Length>> peer_identity_; + std::array<uint8_t, kPSKSize> psk_; + GeneratePairingDataCallback generate_pairing_data_; +@@ -1238,7 +1239,7 @@ std::unique_ptr<Transaction> TransactWithPlaintextTransport( + + std::unique_ptr<Transaction> TransactFromQRCode( + std::unique_ptr<Platform> platform, +- network::mojom::NetworkContext* network_context, ++ NetworkContextFactory network_context_factory, + base::span<const uint8_t, kRootSecretSize> root_secret, + const std::string& authenticator_name, + base::span<const uint8_t, 16> qr_secret, +@@ -1249,16 +1250,34 @@ std::unique_ptr<Transaction> TransactFromQRCode( + + Platform* const platform_ptr = platform.get(); + return std::make_unique<CTAP2Processor>( +- std::make_unique<TunnelTransport>(platform_ptr, network_context, +- qr_secret, peer_identity, +- std::move(generate_pairing_data)), ++ std::make_unique<TunnelTransport>( ++ platform_ptr, std::move(network_context_factory), qr_secret, ++ peer_identity, std::move(generate_pairing_data)), + std::move(platform)); + } + +-std::unique_ptr<Transaction> TransactFromFCM( ++std::unique_ptr<Transaction> TransactFromQRCodeDeprecated( + std::unique_ptr<Platform> platform, + network::mojom::NetworkContext* network_context, + base::span<const uint8_t, kRootSecretSize> root_secret, ++ const std::string& authenticator_name, ++ base::span<const uint8_t, 16> qr_secret, ++ base::span<const uint8_t, kP256X962Length> peer_identity, ++ std::optional<std::vector<uint8_t>> contact_id) { ++ NetworkContextFactory factory = base::BindRepeating( ++ [](network::mojom::NetworkContext* network_context) { ++ return network_context; ++ }, ++ network_context); ++ return TransactFromQRCode(std::move(platform), std::move(factory), ++ root_secret, authenticator_name, qr_secret, ++ peer_identity, std::move(contact_id)); ++} ++ ++std::unique_ptr<Transaction> TransactFromFCM( ++ std::unique_ptr<Platform> platform, ++ NetworkContextFactory network_context_factory, ++ base::span<const uint8_t, kRootSecretSize> root_secret, + std::array<uint8_t, kRoutingIdSize> routing_id, + base::span<const uint8_t, kTunnelIdSize> tunnel_id, + base::span<const uint8_t, kPairingIDSize> pairing_id, +@@ -1269,12 +1288,31 @@ std::unique_ptr<Transaction> TransactFromFCM( + + Platform* const platform_ptr = platform.get(); + return std::make_unique<CTAP2Processor>( +- std::make_unique<TunnelTransport>(platform_ptr, network_context, +- paired_secret, client_nonce, routing_id, +- tunnel_id, IdentityKey(root_secret)), ++ std::make_unique<TunnelTransport>( ++ platform_ptr, std::move(network_context_factory), paired_secret, ++ client_nonce, routing_id, tunnel_id, IdentityKey(root_secret)), + std::move(platform)); + } + ++std::unique_ptr<Transaction> TransactFromFCMDeprecated( ++ std::unique_ptr<Platform> platform, ++ network::mojom::NetworkContext* network_context, ++ base::span<const uint8_t, kRootSecretSize> root_secret, ++ std::array<uint8_t, kRoutingIdSize> routing_id, ++ base::span<const uint8_t, kTunnelIdSize> tunnel_id, ++ base::span<const uint8_t, kPairingIDSize> pairing_id, ++ base::span<const uint8_t, kClientNonceSize> client_nonce, ++ std::optional<base::span<const uint8_t>> contact_id) { ++ NetworkContextFactory factory = base::BindRepeating( ++ [](network::mojom::NetworkContext* network_context) { ++ return network_context; ++ }, ++ network_context); ++ return TransactFromFCM(std::move(platform), std::move(factory), root_secret, ++ std::move(routing_id), tunnel_id, pairing_id, ++ client_nonce, std::move(contact_id)); ++} ++ + } // namespace authenticator + } // namespace cablev2 + } // namespace device +diff --git a/chromium/device/fido/cable/v2_authenticator.h b/chromium/device/fido/cable/v2_authenticator.h +index 0f55d7758ed..811e632e915 100644 +--- src/3rdparty/chromium/device/fido/cable/v2_authenticator.h ++++ src/3rdparty/chromium/device/fido/cable/v2_authenticator.h +@@ -14,6 +14,7 @@ + #include "base/functional/callback.h" + #include "device/fido/cable/v2_constants.h" + #include "device/fido/fido_constants.h" ++#include "device/fido/network_context_factory.h" + #include "services/network/public/mojom/network_context.mojom-forward.h" + #include "third_party/abseil-cpp/absl/types/optional.h" + #include "third_party/abseil-cpp/absl/types/variant.h" +@@ -139,7 +140,7 @@ std::unique_ptr<Transaction> TransactWithPlaintextTransport( + // contents of a QR code. + std::unique_ptr<Transaction> TransactFromQRCode( + std::unique_ptr<Platform> platform, +- network::mojom::NetworkContext* network_context, ++ NetworkContextFactory network_context_factory, + base::span<const uint8_t, kRootSecretSize> root_secret, + const std::string& authenticator_name, + // TODO: name this constant. +@@ -147,11 +148,22 @@ std::unique_ptr<Transaction> TransactFromQRCode( + base::span<const uint8_t, kP256X962Length> peer_identity, + absl::optional<std::vector<uint8_t>> contact_id); + ++// Deprecated, kept around while Android cable code is cleaned up. Use ++// TransactFromQRCode instead. ++std::unique_ptr<Transaction> TransactFromQRCodeDeprecated( ++ std::unique_ptr<Platform> platform, ++ network::mojom::NetworkContext* network_context, ++ base::span<const uint8_t, kRootSecretSize> root_secret, ++ const std::string& authenticator_name, ++ base::span<const uint8_t, 16> qr_secret, ++ base::span<const uint8_t, kP256X962Length> peer_identity, ++ std::optional<std::vector<uint8_t>> contact_id); ++ + // TransactFromFCM starts a network-based transaction based on the decoded + // contents of a cloud message. + std::unique_ptr<Transaction> TransactFromFCM( + std::unique_ptr<Platform> platform, +- network::mojom::NetworkContext* network_context, ++ NetworkContextFactory network_context_factory, + base::span<const uint8_t, kRootSecretSize> root_secret, + std::array<uint8_t, kRoutingIdSize> routing_id, + base::span<const uint8_t, kTunnelIdSize> tunnel_id, +@@ -159,6 +171,18 @@ std::unique_ptr<Transaction> TransactFromFCM( + base::span<const uint8_t, kClientNonceSize> client_nonce, + absl::optional<base::span<const uint8_t>> contact_id); + ++// Deprecated, kept around while Android cable code is cleaned up. Use ++// TransactFromFCM instead. ++std::unique_ptr<Transaction> TransactFromFCMDeprecated( ++ std::unique_ptr<Platform> platform, ++ network::mojom::NetworkContext* network_context, ++ base::span<const uint8_t, kRootSecretSize> root_secret, ++ std::array<uint8_t, kRoutingIdSize> routing_id, ++ base::span<const uint8_t, kTunnelIdSize> tunnel_id, ++ base::span<const uint8_t, kPairingIDSize> pairing_id, ++ base::span<const uint8_t, kClientNonceSize> client_nonce, ++ std::optional<base::span<const uint8_t>> contact_id); ++ + } // namespace authenticator + } // namespace cablev2 + } // namespace device +diff --git a/chromium/device/fido/cable/v2_discovery.cc b/chromium/device/fido/cable/v2_discovery.cc +index e6a8bb03557..c19ed148ee1 100644 +--- src/3rdparty/chromium/device/fido/cable/v2_discovery.cc ++++ src/3rdparty/chromium/device/fido/cable/v2_discovery.cc +@@ -49,7 +49,7 @@ void RecordEvent(CableV2DiscoveryEvent event) { + + Discovery::Discovery( + FidoRequestType request_type, +- network::mojom::NetworkContext* network_context, ++ NetworkContextFactory network_context_factory, + absl::optional<base::span<const uint8_t, kQRKeySize>> qr_generator_key, + std::unique_ptr<AdvertEventStream> advert_stream, + std::unique_ptr<EventStream<std::unique_ptr<Pairing>>> +@@ -62,7 +62,7 @@ Discovery::Discovery( + absl::optional<base::RepeatingCallback<void(Event)>> event_callback) + : FidoDeviceDiscovery(FidoTransportProtocol::kHybrid), + request_type_(request_type), +- network_context_(network_context), ++ network_context_factory_(std::move(network_context_factory)), + qr_keys_(KeysFromQRGeneratorKey(qr_generator_key)), + extension_keys_(KeysFromExtension(extension_contents)), + advert_stream_(std::move(advert_stream)), +@@ -161,7 +161,7 @@ void Discovery::OnBLEAdvertSeen(base::span<const uint8_t, kAdvertSize> advert) { + event_callback_->Run(Event::kBLEAdvertReceived); + } + AddDevice(std::make_unique<cablev2::FidoTunnelDevice>( +- network_context_, pairing_callback_, event_callback_, ++ network_context_factory_, pairing_callback_, event_callback_, + qr_keys_->qr_secret, qr_keys_->local_identity_seed, *plaintext)); + return; + } +@@ -177,7 +177,7 @@ void Discovery::OnBLEAdvertSeen(base::span<const uint8_t, kAdvertSize> advert) { + RecordEvent(CableV2DiscoveryEvent::kExtensionMatch); + device_committed_ = true; + AddDevice(std::make_unique<cablev2::FidoTunnelDevice>( +- network_context_, base::DoNothing(), event_callback_, ++ network_context_factory_, base::DoNothing(), event_callback_, + extension.qr_secret, extension.local_identity_seed, *plaintext)); + return; + } +@@ -190,7 +190,7 @@ void Discovery::OnBLEAdvertSeen(base::span<const uint8_t, kAdvertSize> advert) { + void Discovery::OnContactDevice(std::unique_ptr<Pairing> pairing) { + auto pairing_copy = std::make_unique<Pairing>(*pairing); + tunnels_pending_advert_.emplace_back(std::make_unique<FidoTunnelDevice>( +- request_type_, network_context_, std::move(pairing), ++ request_type_, network_context_factory_, std::move(pairing), + base::BindOnce(&Discovery::PairingIsInvalid, weak_factory_.GetWeakPtr(), + std::move(pairing_copy)), + event_callback_)); +diff --git a/chromium/device/fido/cable/v2_discovery.h b/chromium/device/fido/cable/v2_discovery.h +index c5aa2179d7b..44fc0180c58 100644 +--- src/3rdparty/chromium/device/fido/cable/v2_discovery.h ++++ src/3rdparty/chromium/device/fido/cable/v2_discovery.h +@@ -19,6 +19,7 @@ + #include "device/fido/cable/v2_constants.h" + #include "device/fido/fido_constants.h" + #include "device/fido/fido_device_discovery.h" ++#include "device/fido/network_context_factory.h" + #include "services/network/public/mojom/network_context.mojom-forward.h" + #include "third_party/abseil-cpp/absl/types/optional.h" + +@@ -36,7 +37,7 @@ class COMPONENT_EXPORT(DEVICE_FIDO) Discovery : public FidoDeviceDiscovery { + + Discovery( + FidoRequestType request_type, +- network::mojom::NetworkContext* network_context, ++ NetworkContextFactory network_context_factory, + absl::optional<base::span<const uint8_t, kQRKeySize>> qr_generator_key, + std::unique_ptr<AdvertEventStream> advert_stream, + // contact_device_stream contains a series of pairings indicating that the +@@ -80,7 +81,7 @@ class COMPONENT_EXPORT(DEVICE_FIDO) Discovery : public FidoDeviceDiscovery { + const std::vector<CableDiscoveryData>& extension_contents); + + const FidoRequestType request_type_; +- const raw_ptr<network::mojom::NetworkContext> network_context_; ++ NetworkContextFactory network_context_factory_; + const absl::optional<UnpairedKeys> qr_keys_; + const std::vector<UnpairedKeys> extension_keys_; + std::unique_ptr<AdvertEventStream> advert_stream_; +diff --git a/chromium/device/fido/fido_discovery_factory.cc b/chromium/device/fido/fido_discovery_factory.cc +index 040aa19fbb4..2d6c85c7721 100644 +--- src/3rdparty/chromium/device/fido/fido_discovery_factory.cc ++++ src/3rdparty/chromium/device/fido/fido_discovery_factory.cc +@@ -87,7 +87,7 @@ std::vector<std::unique_ptr<FidoDiscoveryBase>> FidoDiscoveryFactory::Create( + &CableDiscoveryData::version); + if (qr_generator_key_.has_value() || have_v2_discovery_data) { + ret.emplace_back(std::make_unique<cablev2::Discovery>( +- request_type_.value(), network_context_, qr_generator_key_, ++ request_type_.value(), network_context_factory_, qr_generator_key_, + v1_discovery->GetV2AdvertStream(), + std::move(contact_device_stream_), + cable_data_.value_or(std::vector<CableDiscoveryData>()), +@@ -148,11 +148,6 @@ void FidoDiscoveryFactory::set_android_accessory_params( + aoa_request_description_ = std::move(aoa_request_description); + } + +-void FidoDiscoveryFactory::set_network_context( +- network::mojom::NetworkContext* network_context) { +- network_context_ = network_context; +-} +- + void FidoDiscoveryFactory::set_cable_pairing_callback( + base::RepeatingCallback<void(std::unique_ptr<cablev2::Pairing>)> callback) { + cable_pairing_callback_ = std::move(callback); +diff --git a/chromium/device/fido/fido_discovery_factory.h b/chromium/device/fido/fido_discovery_factory.h +index ed2b51d86cc..9705d548c24 100644 +--- src/3rdparty/chromium/device/fido/fido_discovery_factory.h ++++ src/3rdparty/chromium/device/fido/fido_discovery_factory.h +@@ -22,6 +22,7 @@ + #include "device/fido/fido_request_handler_base.h" + #include "device/fido/fido_transport_protocol.h" + #include "device/fido/hid/fido_hid_discovery.h" ++#include "device/fido/network_context_factory.h" + #include "mojo/public/cpp/bindings/remote.h" + #include "services/device/public/mojom/usb_manager.mojom.h" + #include "services/network/public/mojom/network_context.mojom-forward.h" +@@ -69,7 +70,10 @@ class COMPONENT_EXPORT(DEVICE_FIDO) FidoDiscoveryFactory { + mojo::Remote<device::mojom::UsbDeviceManager>, + std::string aoa_request_description); + +- void set_network_context(network::mojom::NetworkContext*); ++ void set_network_context_factory( ++ NetworkContextFactory network_context_factory) { ++ network_context_factory_ = std::move(network_context_factory); ++ } + + // set_cable_pairing_callback installs a repeating callback that will be + // called when a QR handshake results in a phone wishing to pair with this +@@ -167,7 +171,7 @@ class COMPONENT_EXPORT(DEVICE_FIDO) FidoDiscoveryFactory { + absl::optional<mojo::Remote<device::mojom::UsbDeviceManager>> + usb_device_manager_; + std::string aoa_request_description_; +- raw_ptr<network::mojom::NetworkContext> network_context_ = nullptr; ++ NetworkContextFactory network_context_factory_; + absl::optional<std::vector<CableDiscoveryData>> cable_data_; + absl::optional<std::array<uint8_t, cablev2::kQRKeySize>> qr_generator_key_; + absl::optional<FidoRequestType> request_type_; +diff --git a/chromium/device/fido/network_context_factory.h b/chromium/device/fido/network_context_factory.h +new file mode 100644 +index 00000000000..802f45c4c45 +--- /dev/null ++++ src/3rdparty/chromium/device/fido/network_context_factory.h +@@ -0,0 +1,20 @@ ++// Copyright 2024 The Chromium Authors ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#ifndef DEVICE_FIDO_NETWORK_CONTEXT_FACTORY_H_ ++#define DEVICE_FIDO_NETWORK_CONTEXT_FACTORY_H_ ++ ++#include "base/functional/callback_forward.h" ++ ++namespace network::mojom { ++class NetworkContext; ++} // namespace network::mojom ++ ++namespace device { ++using NetworkContextFactory = ++ base::RepeatingCallback<network::mojom::NetworkContext*()>; ++} // namespace device ++ ++#endif // DEVICE_FIDO_NETWORK_CONTEXT_FACTORY_H_ ++ +From 533465116ce3b87ebd30d1b4de055daa413c1050 Mon Sep 17 00:00:00 2001 +From: Tommy Steimel <steimel@chromium.org> +Date: Wed, 24 Apr 2024 09:18:49 +0000 +Subject: [PATCH] [Backport] CVE-2024-4331: Use after free in Picture In + Picture + +Cherry-pick of patch originally reviewed on +https://chromium-review.googlesource.com/c/chromium/src/+/5477908: +Don't assume the enter event window is a LocalDOMWindow + +This CL changes DocumentPictureInPictureEvent to store a DOMWindow +instead of a LocalDOMWindow to prevent crashes when the window it gets +is actually a RemoteDOMWindow. + +(cherry picked from commit 2314741cdf2c4a6e11234dda7006ec0dd9005bbb) + +Bug: 335003891 +Change-Id: I86a0ec5a89b51a26d5dd89559f86e6e4d6c3e8fe +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5467978 +Commit-Queue: Tommy Steimel <steimel@chromium.org> +Cr-Original-Commit-Position: refs/heads/main@{#1290122} +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5477908 +Auto-Submit: Tommy Steimel <steimel@chromium.org> +Commit-Queue: Frank Liberato <liberato@chromium.org> +Cr-Commit-Position: refs/branch-heads/6367@{#974} +Cr-Branched-From: d158c6dc6e3604e6f899041972edf26087a49740-refs/heads/main@{#1274542} +(cherry picked from commit 98bcf9ef5cdd3a19f8b739f2cc6b2afdb01b7694) +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/560756 +Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> +--- + .../document_picture_in_picture_event.cc | 9 ++++----- + .../document_picture_in_picture_event.h | 11 +++++------ + 2 files changed, 9 insertions(+), 11 deletions(-) + +diff --git a/chromium/third_party/blink/renderer/modules/document_picture_in_picture/document_picture_in_picture_event.cc b/chromium/third_party/blink/renderer/modules/document_picture_in_picture/document_picture_in_picture_event.cc +index 037813c62c2..572d0803c25 100644 +--- src/3rdparty/chromium/third_party/blink/renderer/modules/document_picture_in_picture/document_picture_in_picture_event.cc ++++ src/3rdparty/chromium/third_party/blink/renderer/modules/document_picture_in_picture/document_picture_in_picture_event.cc +@@ -8,7 +8,7 @@ namespace blink { + + DocumentPictureInPictureEvent* DocumentPictureInPictureEvent::Create( + const AtomicString& type, +- LocalDOMWindow* document_picture_in_picture_window) { ++ DOMWindow* document_picture_in_picture_window) { + return MakeGarbageCollected<DocumentPictureInPictureEvent>( + type, document_picture_in_picture_window); + } +@@ -19,13 +19,13 @@ DocumentPictureInPictureEvent* DocumentPictureInPictureEvent::Create( + return MakeGarbageCollected<DocumentPictureInPictureEvent>(type, initializer); + } + +-LocalDOMWindow* DocumentPictureInPictureEvent::window() const { ++DOMWindow* DocumentPictureInPictureEvent::window() const { + return document_picture_in_picture_window_.Get(); + } + + DocumentPictureInPictureEvent::DocumentPictureInPictureEvent( + AtomicString const& type, +- LocalDOMWindow* document_picture_in_picture_window) ++ DOMWindow* document_picture_in_picture_window) + : Event(type, Bubbles::kYes, Cancelable::kNo), + document_picture_in_picture_window_(document_picture_in_picture_window) {} + +@@ -33,8 +33,7 @@ DocumentPictureInPictureEvent::DocumentPictureInPictureEvent( + AtomicString const& type, + const DocumentPictureInPictureEventInit* initializer) + : Event(type, initializer), +- document_picture_in_picture_window_( +- static_cast<LocalDOMWindow*>(initializer->window())) {} ++ document_picture_in_picture_window_(initializer->window()) {} + + void DocumentPictureInPictureEvent::Trace(Visitor* visitor) const { + visitor->Trace(document_picture_in_picture_window_); +diff --git a/chromium/third_party/blink/renderer/modules/document_picture_in_picture/document_picture_in_picture_event.h b/chromium/third_party/blink/renderer/modules/document_picture_in_picture/document_picture_in_picture_event.h +index 7af20221469..59cd8cb7a2e 100644 +--- src/3rdparty/chromium/third_party/blink/renderer/modules/document_picture_in_picture/document_picture_in_picture_event.h ++++ src/3rdparty/chromium/third_party/blink/renderer/modules/document_picture_in_picture/document_picture_in_picture_event.h +@@ -6,7 +6,7 @@ + #define THIRD_PARTY_BLINK_RENDERER_MODULES_DOCUMENT_PICTURE_IN_PICTURE_DOCUMENT_PICTURE_IN_PICTURE_EVENT_H_ + + #include "third_party/blink/renderer/bindings/modules/v8/v8_document_picture_in_picture_event_init.h" +-#include "third_party/blink/renderer/core/frame/local_dom_window.h" ++#include "third_party/blink/renderer/core/frame/dom_window.h" + #include "third_party/blink/renderer/modules/event_modules.h" + #include "third_party/blink/renderer/platform/wtf/text/atomic_string.h" + +@@ -18,22 +18,21 @@ class MODULES_EXPORT DocumentPictureInPictureEvent final : public Event { + DEFINE_WRAPPERTYPEINFO(); + + public: +- static DocumentPictureInPictureEvent* Create(const AtomicString&, +- LocalDOMWindow*); ++ static DocumentPictureInPictureEvent* Create(const AtomicString&, DOMWindow*); + static DocumentPictureInPictureEvent* Create( + const AtomicString&, + const DocumentPictureInPictureEventInit*); + +- DocumentPictureInPictureEvent(AtomicString const&, LocalDOMWindow*); ++ DocumentPictureInPictureEvent(AtomicString const&, DOMWindow*); + DocumentPictureInPictureEvent(AtomicString const&, + const DocumentPictureInPictureEventInit*); + +- LocalDOMWindow* window() const; ++ DOMWindow* window() const; + + void Trace(Visitor*) const override; + + private: +- Member<LocalDOMWindow> document_picture_in_picture_window_; ++ Member<DOMWindow> document_picture_in_picture_window_; + }; + + } // namespace blink +From 8f952f1e9d4fbfcfa23f8970985214f473ebffed Mon Sep 17 00:00:00 2001 +From: Antonio Maiorano <amaiorano@google.com> +Date: Thu, 25 Apr 2024 16:49:11 -0400 +Subject: [PATCH] [Backport] CVE-2024-4368: Use after free in Dawn + +Manual cherry-pick of patch originally reviewed on +https://chromium-review.googlesource.com/c/external/github.com/microsoft/DirectXShaderCompiler/+/5490380: +Fixed crash in loop unroll caused by bug in structurize loop exits (#6548) + +Fixed a bug in `hlsl::RemoveUnstructuredLoopExits` where when a new +exiting block is created from splitting, it was added to the current +loop being processed, when it could also part of an inner loop. Not +adding the new block to inner loops that it's part of makes the inner +loops malformed, and causes crash. + +This fix adds the new block to the inner most loop that it should be +part of. Also adds the `StructurizeLoopExits` option to `loop-unroll` +pass, which was missing before. + +Bug: chromium:333508731 +Change-Id: I7efc21bc61aeb81b4906a600c35272af232710ea +Reviewed-on: https://chromium-review.googlesource.com/c/external/github.com/microsoft/DirectXShaderCompiler/+/5490380 +Reviewed-by: James Price <jrprice@google.com> +Reviewed-by: Ben Clayton <bclayton@chromium.org> +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/560757 +Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> +--- + .../Scalar/DxilRemoveUnstructuredLoopExits.cpp | 7 ++++++- + .../dxc/lib/Transforms/Scalar/LoopUnrollPass.cpp | 12 ++++++++++++ + .../dawn/third_party/dxc/utils/hct/hctdb.py | 3 ++- + 3 files changed, 20 insertions(+), 2 deletions(-) + +diff --git a/chromium/third_party/dawn/third_party/dxc/lib/Transforms/Scalar/DxilRemoveUnstructuredLoopExits.cpp b/chromium/third_party/dawn/third_party/dxc/lib/Transforms/Scalar/DxilRemoveUnstructuredLoopExits.cpp +index 1278b1cac0a..a68a4dd7c56 100644 +--- src/3rdparty/chromium/third_party/dawn/third_party/dxc/lib/Transforms/Scalar/DxilRemoveUnstructuredLoopExits.cpp ++++ src/3rdparty/chromium/third_party/dawn/third_party/dxc/lib/Transforms/Scalar/DxilRemoveUnstructuredLoopExits.cpp +@@ -430,7 +430,12 @@ static bool RemoveUnstructuredLoopExitsIteration(BasicBlock *exiting_block, Loop + BasicBlock *new_not_exiting_block = new_exiting_block->splitBasicBlock(new_exiting_block->getFirstNonPHI()); + new_exiting_block->setName("dx.struct_exit.new_exiting"); + new_not_exiting_block->setName(old_name); +- L->addBasicBlockToLoop(new_not_exiting_block, *LI); ++ // Query for new_exiting_block's own loop to add new_not_exiting_block to. ++ // It's possible that new_exiting_block is part of another inner loop ++ // separate from L. If added directly to L, the inner loop(s) will not ++ // contain new_not_exiting_block, making them malformed. ++ Loop *inner_loop_of_exiting_block = LI->getLoopFor(new_exiting_block); ++ inner_loop_of_exiting_block->addBasicBlockToLoop(new_not_exiting_block, *LI); + + // Branch to latch_exit + new_exiting_block->getTerminator()->eraseFromParent(); +diff --git a/chromium/third_party/dawn/third_party/dxc/lib/Transforms/Scalar/LoopUnrollPass.cpp b/chromium/third_party/dawn/third_party/dxc/lib/Transforms/Scalar/LoopUnrollPass.cpp +index dd520f7e57d..b17a5a4a0bc 100644 +--- src/3rdparty/chromium/third_party/dawn/third_party/dxc/lib/Transforms/Scalar/LoopUnrollPass.cpp ++++ src/3rdparty/chromium/third_party/dawn/third_party/dxc/lib/Transforms/Scalar/LoopUnrollPass.cpp +@@ -155,6 +155,18 @@ namespace { + bool UserAllowPartial; + bool UserRuntime; + ++ // HLSL Change - begin ++ // Function overrides that resolve options when used for DxOpt ++ void applyOptions(PassOptions O) override { ++ GetPassOptionBool(O, "StructurizeLoopExits", &StructurizeLoopExits, ++ false); ++ } ++ void dumpConfig(raw_ostream &OS) override { ++ LoopPass::dumpConfig(OS); ++ OS << ",StructurizeLoopExits=" << StructurizeLoopExits; ++ } ++ // HLSL Change - end ++ + bool runOnLoop(Loop *L, LPPassManager &LPM) override; + + /// This transformation requires natural loop information & requires that +diff --git a/chromium/third_party/dawn/third_party/dxc/utils/hct/hctdb.py b/chromium/third_party/dawn/third_party/dxc/utils/hct/hctdb.py +index dcb1923fafe..96da518d1ac 100644 +--- src/3rdparty/chromium/third_party/dawn/third_party/dxc/utils/hct/hctdb.py ++++ src/3rdparty/chromium/third_party/dawn/third_party/dxc/utils/hct/hctdb.py +@@ -2270,7 +2270,8 @@ def add_pass(name, type_name, doc, opts): + {'n':'unroll-count', 'i':'UnrollCount', 't':'unsigned', 'd':'Use this unroll count for all loops including those with unroll_count pragma values, for testing purposes'}, + {'n':'unroll-allow-partial', 'i':'UnrollAllowPartial', 't':'bool', 'd':'Allows loops to be partially unrolled until -unroll-threshold loop size is reached.'}, + {'n':'unroll-runtime', 'i':'UnrollRuntime', 't':'bool', 'd':'Unroll loops with run-time trip counts'}, +- {'n':'pragma-unroll-threshold', 'i':'PragmaUnrollThreshold', 't':'unsigned', 'd':'Unrolled size limit for loops with an unroll(full) or unroll_count pragma.'}]) ++ {'n':'pragma-unroll-threshold', 'i':'PragmaUnrollThreshold', 't':'unsigned', 'd':'Unrolled size limit for loops with an unroll(full) or unroll_count pragma.'}, ++ {'n': 'StructurizeLoopExits', 't': 'bool', 'c': 1, 'd': 'Whether the unroller should try to structurize loop exits first.'}]) + add_pass('mldst-motion', 'MergedLoadStoreMotion', 'MergedLoadStoreMotion', []) + add_pass('gvn', 'GVN', 'Global Value Numbering', [ + {'n':'noloads', 't':'bool', 'c':1}, +From 453dc7630d1e8457a97a7cbc70b8990afd5bf5e4 Mon Sep 17 00:00:00 2001 +From: Ken Rockot <rockot@google.com> +Date: Wed, 8 May 2024 15:32:48 +0000 +Subject: [PATCH] [Backport] CVE-2024-4671: Use after free in Visuals + +Cherry-pick of patch originally reviewed on +https://chromium-review.googlesource.com/c/chromium/src/+/5523748: +Viz: Tolerate SinkGroup destruction during submit + +Fixed: 339266700 +Change-Id: I8c0ea8c540948016346b00db64fe33260d2446f0 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5523748 +Reviewed-by: Kyle Charbonneau <kylechar@chromium.org> +Reviewed-by: Jonathan Ross <jonross@chromium.org> +Commit-Queue: Ken Rockot <rockot@google.com> +Cr-Commit-Position: refs/heads/main@{#1298119} +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/560758 +Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> +--- + .../frame_sinks/frame_sink_bundle_impl.cc | 30 ++++++++++++++----- + 1 file changed, 22 insertions(+), 8 deletions(-) + +diff --git a/chromium/components/viz/service/frame_sinks/frame_sink_bundle_impl.cc b/chromium/components/viz/service/frame_sinks/frame_sink_bundle_impl.cc +index e339c23f9cd..2ae2dfe1a8b 100644 +--- src/3rdparty/chromium/components/viz/service/frame_sinks/frame_sink_bundle_impl.cc ++++ src/3rdparty/chromium/components/viz/service/frame_sinks/frame_sink_bundle_impl.cc +@@ -4,12 +4,15 @@ + + #include "components/viz/service/frame_sinks/frame_sink_bundle_impl.h" + ++#include <map> + #include <utility> + #include <vector> + + #include "base/check.h" + #include "base/functional/bind.h" ++#include "base/memory/raw_ptr.h" + #include "base/memory/raw_ref.h" ++#include "base/memory/weak_ptr.h" + #include "build/build_config.h" + #include "components/viz/service/frame_sinks/compositor_frame_sink_impl.h" + #include "components/viz/service/frame_sinks/frame_sink_manager_impl.h" +@@ -45,6 +48,10 @@ class FrameSinkBundleImpl::SinkGroup : public BeginFrameObserver { + + bool IsEmpty() const { return frame_sinks_.empty(); } + ++ base::WeakPtr<SinkGroup> GetWeakPtr() { ++ return weak_ptr_factory_.GetWeakPtr(); ++ } ++ + void AddFrameSink(uint32_t sink_id) { + frame_sinks_.insert(sink_id); + +@@ -206,6 +213,8 @@ class FrameSinkBundleImpl::SinkGroup : public BeginFrameObserver { + std::set<uint32_t> unacked_submissions_; + + BeginFrameArgs last_used_begin_frame_args_; ++ ++ base::WeakPtrFactory<SinkGroup> weak_ptr_factory_{this}; + }; + + FrameSinkBundleImpl::FrameSinkBundleImpl( +@@ -276,8 +285,9 @@ void FrameSinkBundleImpl::SetNeedsBeginFrame(uint32_t sink_id, + + void FrameSinkBundleImpl::Submit( + std::vector<mojom::BundledFrameSubmissionPtr> submissions) { +- std::set<SinkGroup*> groups; +- std::set<SinkGroup*> affected_groups; ++ std::map<raw_ptr<SinkGroup>, base::WeakPtr<SinkGroup>> groups; ++ std::map<raw_ptr<SinkGroup>, base::WeakPtr<SinkGroup>> affected_groups; ++ + // Count the frame submissions before processing anything. This ensures that + // any frames submitted here will be acked together in a batch, and not acked + // individually in case they happen to ack synchronously within +@@ -288,10 +298,10 @@ void FrameSinkBundleImpl::Submit( + // through to the client without batching. + for (auto& submission : submissions) { + if (auto* group = GetSinkGroup(submission->sink_id)) { +- groups.insert(group); ++ groups.emplace(group, group->GetWeakPtr()); + if (submission->data->is_frame()) { + group->WillSubmitFrame(submission->sink_id); +- affected_groups.insert(group); ++ affected_groups.emplace(group, group->GetWeakPtr()); + } + } + } +@@ -321,12 +331,16 @@ void FrameSinkBundleImpl::Submit( + } + } + +- for (auto* group : groups) { +- group->DidFinishFrame(); ++ for (const auto& [unsafe_group, weak_group] : groups) { ++ if (weak_group) { ++ weak_group->DidFinishFrame(); ++ } + } + +- for (auto* group : affected_groups) { +- group->FlushMessages(); ++ for (const auto& [unsafe_group, weak_group] : affected_groups) { ++ if (weak_group) { ++ weak_group->FlushMessages(); ++ } + } + } + +From 09a04a46a47e57bc423cc37fb95bc66041936940 Mon Sep 17 00:00:00 2001 +From: Shu-yu Guo <syg@chromium.org> +Date: Thu, 9 May 2024 12:03:28 -0700 +Subject: [PATCH] [Backport] Security bug 339458194 + +Cherry-pick of patch originally reviewed on +https://chromium-review.googlesource.com/c/v8/v8/+/5527397 +Only normalize JSObject targets in SetOrCopyDataProperties + +Bug: b/339458194 +Change-Id: I4d6eebdd921971fa28d7c474535d978900ba633f +Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5527397 +Commit-Queue: Shu-yu Guo <syg@chromium.org> +Cr-Commit-Position: refs/heads/main@{#93811} +(cherry picked from commit f320600cd1f48ba6bb57c0395823fe0c5e5ec52e) +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/560760 +Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> +--- + chromium/v8/src/objects/js-objects.cc | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/chromium/v8/src/objects/js-objects.cc b/chromium/v8/src/objects/js-objects.cc +index 6094323ee09..9d104492603 100644 +--- src/3rdparty/chromium/v8/src/objects/js-objects.cc ++++ src/3rdparty/chromium/v8/src/objects/js-objects.cc +@@ -429,9 +429,7 @@ Maybe<bool> JSReceiver::SetOrCopyDataProperties( + Nothing<bool>()); + + if (!from->HasFastProperties() && target->HasFastProperties() && +- !IsJSGlobalProxy(*target)) { +- // JSProxy is always in slow-mode. +- DCHECK(!IsJSProxy(*target)); ++ IsJSObject(*target) && !IsJSGlobalProxy(*target)) { + // Convert to slow properties if we're guaranteed to overflow the number of + // descriptors. + int source_length; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_BUILD.gn index f22c3b6676f2..0f0336991402 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/BUILD.gn.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/BUILD.gn.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/BUILD.gn -@@ -61,7 +61,7 @@ declare_args() { +@@ -62,7 +62,7 @@ declare_args() { qtwebengine_target = "//tools/gn" } @@ -9,25 +9,58 @@ # An official (maximally optimized!) component (optimized for build times) # build doesn't make sense and usually doesn't work. assert(!is_component_build) -@@ -428,7 +428,7 @@ if (!is_qtwebengine){ +@@ -96,7 +96,6 @@ group("gn_all") { + "//codelabs", + "//components:components_unittests", + "//components/gwp_asan:gwp_asan_unittests", +- "//infra/orchestrator:orchestrator_all", + "//net:net_unittests", + "//sandbox:sandbox_unittests", + "//services:services_unittests", +@@ -418,7 +417,7 @@ group("gn_all") { + } + } + +- if (is_linux || is_chromeos || is_android) { ++ if ((is_linux && !is_bsd) || is_chromeos || is_android) { + deps += [ + "//third_party/breakpad:breakpad_unittests", + "//third_party/breakpad:core-2-minidump", +@@ -618,6 +617,15 @@ group("gn_all") { + } + } + ++ if (is_bsd) { ++ deps -= [ ++ "//third_party/breakpad:dump_syms($host_toolchain)", ++ "//third_party/breakpad:microdump_stackwalk($host_toolchain)", ++ "//third_party/breakpad:minidump_dump($host_toolchain)", ++ "//third_party/breakpad:minidump_stackwalk($host_toolchain)", ++ ] ++ } ++ + if (is_mac) { + deps += [ + "//third_party/breakpad:dump_syms", +@@ -667,7 +675,7 @@ group("gn_all") { + host_os == "win") { + deps += [ "//chrome/test/mini_installer:mini_installer_tests" ] + } +- } else if (!is_android && !is_ios && !is_fuchsia) { ++ } else if (!is_android && !is_ios && !is_fuchsia && !is_bsd) { + deps += [ "//third_party/breakpad:symupload($host_toolchain)" ] } - } -- if (is_linux || is_chromeos || is_android) { -+ if ((is_linux && !is_bsd) || is_chromeos || is_android) { - deps += [ - "//third_party/breakpad:breakpad_unittests", - "//third_party/breakpad:core-2-minidump", -@@ -1098,7 +1098,7 @@ if (!is_ios && !is_qtwebengine) { +@@ -1095,7 +1103,7 @@ if (use_blink && !is_cronet_build) { ] } - if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos) { + if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos && !is_bsd) { - # WPT Webdriver tests runner - # chrome/test/chromedriver/test/run_webdriver_tests.py script_test("webdriver_wpt_tests") { -@@ -1198,7 +1198,7 @@ if (!is_ios && !is_qtwebengine) { + script = "//third_party/blink/tools/run_wpt_tests.py" + args = [ +@@ -1185,7 +1193,7 @@ if (use_blink && !is_cronet_build) { data_deps += [ "//content/web_test:web_test_common_mojom_js_data_deps" ] } @@ -36,7 +69,7 @@ data_deps += [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] } -@@ -1207,7 +1207,7 @@ if (!is_ios && !is_qtwebengine) { +@@ -1194,7 +1202,7 @@ if (use_blink && !is_cronet_build) { data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } @@ -45,7 +78,7 @@ data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } -@@ -1675,7 +1675,7 @@ group("chromium_builder_perf") { +@@ -1654,7 +1662,7 @@ group("chromium_builder_perf") { data_deps += [ "//chrome/test:performance_browser_tests" ] } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_BUILD.gn index 9c2a0f9c2332..07baa903ce0a 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/BUILD.gn.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/base/BUILD.gn.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/base/BUILD.gn -@@ -189,7 +189,7 @@ buildflag_header("ios_cronet_buildflags") { +@@ -199,7 +199,7 @@ buildflag_header("ios_cronet_buildflags") { flags = [ "CRONET_BUILD=$is_cronet_build" ] } @@ -9,24 +9,32 @@ buildflag_header("message_pump_buildflags") { header = "message_pump_buildflags.h" header_dir = "base/message_loop" -@@ -1009,7 +1009,6 @@ jumbo_component("base") { - "threading/thread_type_delegate.cc", - "threading/thread_type_delegate.h", - ] -- jumbo_excluded_sources += [ "process/memory_linux.cc" ] +@@ -1117,11 +1117,23 @@ jumbo_component("base") { + # Needed for <atomic> if using newer C++ library than sysroot, except if + # building inside the cros_sdk environment - use host_toolchain as a + # more robust check for this. +- if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos)) && ++ if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos && !is_bsd)) && + host_toolchain != "//build/toolchain/cros:host") { + libs += [ "atomic" ] } - if (is_linux || is_chromeos || is_android || is_fuchsia) { -@@ -1132,7 +1131,7 @@ jumbo_component("base") { - ] - configs += [ "//base/allocator:mac_no_default_new_delete_symbols" ] - } -- if (is_chromeos || is_linux) { -+ if (is_chromeos || (is_linux && !is_bsd)) { - sources += [ - "allocator/partition_allocator/shim/allocator_shim_override_cpp_symbols.h", - "allocator/partition_allocator/shim/allocator_shim_override_glibc_weak_symbols.h", -@@ -1173,7 +1172,7 @@ jumbo_component("base") { ++ # *BSD needs libkvm ++ if (is_bsd) { ++ libs += [ "kvm" ] ++ } ++ ++ if (is_freebsd) { ++ libs += [ ++ "execinfo", ++ "util", ++ ] ++ } ++ + if (use_allocator_shim) { + if (is_apple) { + sources += [ "allocator/early_zone_registration_apple.h" ] +@@ -1141,7 +1153,7 @@ jumbo_component("base") { # Allow more direct string conversions on platforms with native utf8 # strings @@ -35,7 +43,30 @@ defines += [ "SYSTEM_NATIVE_UTF8" ] } -@@ -2119,6 +2118,43 @@ jumbo_component("base") { +@@ -2091,6 +2103,22 @@ jumbo_component("base") { + ] + } + ++ if (is_openbsd) { ++ sources += [ ++ "process/process_handle_openbsd.cc", ++ "process/process_iterator_openbsd.cc", ++ "process/process_metrics_openbsd.cc", ++ "system/sys_info_openbsd.cc", ++ ] ++ } else if (is_freebsd) { ++ sources += [ ++ "process/process_handle_freebsd.cc", ++ "process/process_iterator_freebsd.cc", ++ "process/process_metrics_freebsd.cc", ++ "system/sys_info_freebsd.cc", ++ ] ++ } ++ + # iOS + if (is_ios) { + sources += [ +@@ -2223,6 +2251,29 @@ jumbo_component("base") { } } @@ -43,43 +74,29 @@ + sources -= [ + "files/file_path_watcher_inotify.cc", + "files/scoped_file_linux.cc", -+ "process/process_linux.cc", + "system/sys_info_linux.cc", + "process/process_iterator_linux.cc", ++ "process/process_linux.cc", + "process/process_metrics_linux.cc", + "process/process_handle_linux.cc", + "profiler/stack_copier_signal.cc", + "profiler/stack_copier_signal.h", + "profiler/thread_delegate_posix.cc", + "profiler/thread_delegate_posix.h", ++ "threading/platform_thread_linux.cc", + ] + sources += [ + "files/file_path_watcher_kqueue.cc", + "files/file_path_watcher_kqueue.h", + "files/file_path_watcher_bsd.cc", ++ "threading/platform_thread_bsd.cc", + ] + } + -+ if (is_openbsd) { -+ sources += [ -+ "process/process_handle_openbsd.cc", -+ "process/process_iterator_openbsd.cc", -+ "process/process_metrics_openbsd.cc", -+ "system/sys_info_openbsd.cc", -+ ] -+ } else if (is_freebsd) { -+ sources += [ -+ "process/process_handle_freebsd.cc", -+ "process/process_iterator_freebsd.cc", -+ "process/process_metrics_freebsd.cc", -+ "system/sys_info_freebsd.cc", -+ ] -+ } -+ - # iOS - if (is_ios) { + if (use_blink) { sources += [ -@@ -2214,7 +2250,7 @@ jumbo_component("base") { + "files/file_path_watcher.cc", +@@ -2233,7 +2284,7 @@ jumbo_component("base") { } if (dep_libevent) { @@ -88,7 +105,7 @@ } if (use_libevent) { -@@ -3482,7 +3518,7 @@ test("base_unittests") { +@@ -3607,7 +3658,7 @@ test("base_unittests") { ] } @@ -97,7 +114,7 @@ sources += [ "debug/proc_maps_linux_unittest.cc", "files/scoped_file_linux_unittest.cc", -@@ -3531,7 +3567,7 @@ test("base_unittests") { +@@ -3628,7 +3679,7 @@ test("base_unittests") { "posix/file_descriptor_shuffle_unittest.cc", "posix/unix_domain_socket_unittest.cc", ] @@ -106,7 +123,7 @@ sources += [ "profiler/stack_base_address_posix_unittest.cc", "profiler/stack_copier_signal_unittest.cc", -@@ -3542,7 +3578,7 @@ test("base_unittests") { +@@ -3639,7 +3690,7 @@ test("base_unittests") { # Allow more direct string conversions on platforms with native utf8 # strings @@ -115,7 +132,7 @@ defines += [ "SYSTEM_NATIVE_UTF8" ] } -@@ -3763,7 +3799,7 @@ test("base_unittests") { +@@ -3895,7 +3946,7 @@ test("base_unittests") { } } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_dispatcher_tls.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_dispatcher_tls.h index e0f121f10163..e31181bb5508 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_dispatcher_tls.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_dispatcher_tls.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/allocator/dispatcher/tls.h.orig 2023-02-08 09:03:45 UTC +--- src/3rdparty/chromium/base/allocator/dispatcher/tls.h.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/base/allocator/dispatcher/tls.h -@@ -51,7 +51,7 @@ struct BASE_EXPORT MMapAllocator { +@@ -50,7 +50,7 @@ struct BASE_EXPORT MMapAllocator { partition_alloc::PartitionPageSize(); #elif BUILDFLAG(IS_APPLE) constexpr static size_t AllocationChunkSize = 16384; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_BUILD.gn new file mode 100644 index 000000000000..16dc80d6f2e1 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_BUILD.gn @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/base/allocator/partition_allocator/BUILD.gn.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/base/allocator/partition_allocator/BUILD.gn +@@ -562,7 +562,7 @@ source_set("allocator_shim") { + ] + configs += [ ":mac_no_default_new_delete_symbols" ] + } +- if (is_chromeos || is_linux) { ++ if ((is_chromeos || is_linux) && !is_bsd) { + sources += [ + "shim/allocator_shim_override_cpp_symbols.h", + "shim/allocator_shim_override_glibc_weak_symbols.h", diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_address__space__randomization.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_address__space__randomization.h index 0b96554c9d5b..c48328b2fae5 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_address__space__randomization.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_address__space__randomization.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/base/allocator/partition_allocator/address_space_randomization.h.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/base/allocator/partition_allocator/address_space_randomization.h.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/base/allocator/partition_allocator/address_space_randomization.h @@ -38,7 +38,7 @@ AslrMask(uintptr_t bits) { #if defined(ARCH_CPU_64_BITS) - #if defined(MEMORY_TOOL_REPLACES_ALLOCATOR) -+ #if defined(MEMORY_TOOL_REPLACES_ALLOCATOR) && !defined(OS_BSD) ++ #if defined(MEMORY_TOOL_REPLACES_ALLOCATOR) && !BUILDFLAG(IS_BSD) // We shouldn't allocate system pages at all for sanitizer builds. However, // we do, and if random hint addresses interfere with address ranges diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_page__allocator.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_page__allocator.h index 8c4250d7d91e..3eb4f28da567 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_page__allocator.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_page__allocator.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator.h.orig 2022-11-30 08:12:58 UTC +--- src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator.h.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator.h -@@ -231,7 +231,7 @@ void DecommitAndZeroSystemPages(void* address, size_t +@@ -258,7 +258,7 @@ void DecommitAndZeroSystemPages(void* address, // recommitted. Do not assume that this will not change over time. constexpr PA_COMPONENT_EXPORT( PARTITION_ALLOC) bool DecommittedMemoryIsAlwaysZeroed() { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_page__allocator__constants.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_page__allocator__constants.h index 925000cf8eef..272faad2da2b 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_page__allocator__constants.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_page__allocator__constants.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_constants.h.orig 2022-09-24 10:57:32 UTC +--- src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_constants.h.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_constants.h @@ -25,7 +25,7 @@ // elimination. @@ -9,7 +9,7 @@ // This should work for all POSIX (if needed), but currently all other // supported OS/architecture combinations use either hard-coded values // (such as x86) or have means to determine these values without needing -@@ -81,7 +81,7 @@ PageAllocationGranularityShift() { +@@ -92,7 +92,7 @@ PageAllocationGranularityShift() { return 14; // 16kB #elif BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS) return static_cast<size_t>(vm_page_shift); @@ -18,7 +18,7 @@ // arm64 supports 4kb (shift = 12), 16kb (shift = 14), and 64kb (shift = 16) // page sizes. Retrieve from or initialize cache. size_t shift = page_characteristics.shift.load(std::memory_order_relaxed); -@@ -102,7 +102,7 @@ PageAllocationGranularity() { +@@ -113,7 +113,7 @@ PageAllocationGranularity() { // This is literally equivalent to |1 << PageAllocationGranularityShift()| // below, but was separated out for IS_APPLE to avoid << on a non-constexpr. return vm_page_size; @@ -27,8 +27,8 @@ // arm64 supports 4kb, 16kb, and 64kb page sizes. Retrieve from or // initialize cache. size_t size = page_characteristics.size.load(std::memory_order_relaxed); -@@ -141,7 +141,7 @@ SystemPageShift() { - PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR PA_ALWAYS_INLINE size_t +@@ -152,7 +152,7 @@ SystemPageShift() { + PA_ALWAYS_INLINE PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR size_t SystemPageSize() { #if (BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS)) || \ - (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_page__allocator__internals__posix.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_page__allocator__internals__posix.h index 734969897517..b0e1fabca7e2 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_page__allocator__internals__posix.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_page__allocator__internals__posix.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_internals_posix.h -@@ -380,8 +380,12 @@ bool TryRecommitSystemPagesInternal( +@@ -403,8 +403,12 @@ bool TryRecommitSystemPagesInternal( void DiscardSystemPagesInternal(uintptr_t address, size_t length) { void* ptr = reinterpret_cast<void*>(address); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__address__space.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__address__space.cc index b16f589d70fe..9171c87c625d 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__address__space.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__address__space.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/allocator/partition_allocator/partition_address_space.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/base/allocator/partition_allocator/partition_address_space.cc.orig 2023-07-16 15:47:57 UTC +++ src/3rdparty/chromium/base/allocator/partition_allocator/partition_address_space.cc -@@ -417,7 +417,7 @@ void PartitionAddressSpace::UninitPkeyPoolForTesting() +@@ -420,7 +420,7 @@ void PartitionAddressSpace::UninitThreadIsolatedPoolFo } #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc.gni b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc.gni index e5856f005242..7cf907ee908d 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc.gni +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc.gni @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.gni.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.gni.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.gni -@@ -276,7 +276,7 @@ assert(!use_asan_backup_ref_ptr || use_hookable_raw_pt - "AsanBackupRefPtr requires RawPtrHookableImpl") - - declare_args() { -- enable_pkeys = is_linux && target_cpu == "x64" -+ enable_pkeys = (is_linux && !is_bsd) && target_cpu == "x64" +@@ -328,7 +328,7 @@ declare_args() { + # pkeys support is explicitly disabled in all Cronet builds, as some test + # dependencies that use partition_allocator are compiled in AOSP against a + # version of glibc that does not include pkeys syscall numbers. +- enable_pkeys = is_linux && target_cpu == "x64" && !is_cronet_build ++ enable_pkeys = (is_linux && !is_bsd) && target_cpu == "x64" && !is_cronet_build } assert(!enable_pkeys || (is_linux && target_cpu == "x64"), "Pkeys are only supported on x64 linux") diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc__base_compiler__specific.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc__base_compiler__specific.h new file mode 100644 index 000000000000..2577bd6e1d7a --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc__base_compiler__specific.h @@ -0,0 +1,32 @@ +--- src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_base/compiler_specific.h.orig 2023-04-28 17:01:32 UTC ++++ src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_base/compiler_specific.h +@@ -24,9 +24,9 @@ + // Annotate a function indicating it should not be inlined. + // Use like: + // NOINLINE void DoStuff() { ... } +-#if defined(__clang__) && PA_HAS_ATTRIBUTE(noinline) ++#if defined(__clang__) && (__clang_major__ >= 15) && PA_HAS_ATTRIBUTE(noinline) + #define PA_NOINLINE [[clang::noinline]] +-#elif defined(COMPILER_GCC) && PA_HAS_ATTRIBUTE(noinline) ++#elif (defined(COMPILER_GCC) || defined(__clang__)) && PA_HAS_ATTRIBUTE(noinline) + #define PA_NOINLINE __attribute__((noinline)) + #elif defined(COMPILER_MSVC) + #define PA_NOINLINE __declspec(noinline) +@@ -34,7 +34,7 @@ + #define PA_NOINLINE + #endif + +-#if defined(__clang__) && defined(NDEBUG) && PA_HAS_ATTRIBUTE(always_inline) ++#if defined(__clang__) && (__clang_major__ >= 15) && defined(NDEBUG) && PA_HAS_ATTRIBUTE(always_inline) + #define PA_ALWAYS_INLINE [[clang::always_inline]] inline + #elif defined(COMPILER_GCC) && defined(NDEBUG) && \ + PA_HAS_ATTRIBUTE(always_inline) +@@ -53,7 +53,7 @@ + // prevent code folding, see NO_CODE_FOLDING() in base/debug/alias.h. + // Use like: + // void NOT_TAIL_CALLED FooBar(); +-#if defined(__clang__) && PA_HAS_ATTRIBUTE(not_tail_called) ++#if defined(__clang__) && (__clang_major__ >= 15) && PA_HAS_ATTRIBUTE(not_tail_called) + #define PA_NOT_TAIL_CALLED [[clang::not_tail_called]] + #else + #define PA_NOT_TAIL_CALLED diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc__base_debug_stack__trace__posix.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc__base_debug_stack__trace__posix.cc new file mode 100644 index 000000000000..4f82b1eff27f --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc__base_debug_stack__trace__posix.cc @@ -0,0 +1,34 @@ +--- src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_base/debug/stack_trace_posix.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_base/debug/stack_trace_posix.cc +@@ -12,11 +12,11 @@ + #include <string.h> + #include <unistd.h> + +-#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_APPLE) ++#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) + #include <link.h> // For ElfW() macro. + #endif + +-#if BUILDFLAG(IS_APPLE) ++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) + #define HAVE_DLADDR + #include <dlfcn.h> + #endif +@@ -25,7 +25,7 @@ namespace partition_alloc::internal::base::debug { + + namespace { + +-#if !BUILDFLAG(IS_APPLE) ++#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) + + constexpr size_t kBufferSize = 4096u; + +@@ -359,7 +359,7 @@ void PrintStackTraceInternal(void* const* trace, size_ + } + #endif // !BUILDFLAG(IS_APPLE) + +-#if BUILDFLAG(IS_APPLE) ++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) + // Since /proc/self/maps is not available, use dladdr() to obtain module + // names and offsets inside the modules from the given addresses. + void PrintStackTraceInternal(void* const* trace, size_t size) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc__base_rand__util__posix.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc__base_rand__util__posix.cc index 3862972fb3c6..1c070033462d 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc__base_rand__util__posix.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc__base_rand__util__posix.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_base/rand_util_posix.cc.orig 2022-07-22 17:30:31 UTC +--- src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_base/rand_util_posix.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_base/rand_util_posix.cc -@@ -86,6 +86,10 @@ void RandBytes(void* output, size_t output_length) { +@@ -90,6 +90,10 @@ void RandBytes(void* output, size_t output_length) { if (getentropy(output, output_length) == 0) { return; } @@ -9,5 +9,5 @@ + return; + } #endif - - // If the OS-specific mechanisms didn't work, fall through to reading from + // If getrandom(2) above returned with an error and the /dev/urandom fallback + // took place on Linux/ChromeOS bots, they would fail with a CHECK in diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc__config.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc__config.h index fd5c07ae23ed..cd7f463a4040 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc__config.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc__config.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_config.h.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_config.h.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_config.h -@@ -104,7 +104,7 @@ static_assert(sizeof(void*) != 8, ""); +@@ -94,7 +94,7 @@ static_assert(sizeof(void*) != 8, ""); // POSIX is not only UNIX, e.g. macOS and other OSes. We do use Linux-specific // features such as futex(2). #define PA_CONFIG_HAS_LINUX_KERNEL() \ @@ -9,7 +9,7 @@ // On some platforms, we implement locking by spinning in userspace, then going // into the kernel only if there is contention. This requires platform support, -@@ -251,7 +251,7 @@ constexpr bool kUseLazyCommit = false; +@@ -237,7 +237,7 @@ constexpr bool kUseLazyCommit = false; // On these platforms, lock all the partitions before fork(), and unlock after. // This may be required on more platforms in the future. #define PA_CONFIG_HAS_ATFORK_HANDLER() \ @@ -18,7 +18,7 @@ // PartitionAlloc uses PartitionRootEnumerator to acquire all // PartitionRoots at BeforeFork and to release at AfterFork. -@@ -296,7 +296,7 @@ constexpr bool kUseLazyCommit = false; +@@ -284,7 +284,7 @@ constexpr bool kUseLazyCommit = false; // Also enabled on ARM64 macOS, as the 16kiB pages on this platform lead to // larger slot spans. #define PA_CONFIG_PREFER_SMALLER_SLOT_SPANS() \ diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc__constants.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc__constants.h index 7a6ee0bf9191..397135e90aa3 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc__constants.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc__constants.h @@ -1,20 +1,21 @@ ---- src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h -@@ -92,7 +92,7 @@ PartitionPageShift() { +@@ -95,7 +95,7 @@ PartitionPageShift() { return 18; // 256 KiB } #elif (BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS)) || \ - (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)) + ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)) - PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR PA_ALWAYS_INLINE size_t + PA_ALWAYS_INLINE PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR size_t PartitionPageShift() { return PageAllocationGranularityShift() + 2; -@@ -296,7 +296,7 @@ constexpr size_t kNumPools = kMaxPoolHandle - 1; - // When pointer compression is enabled, we cannot use large pools (at most +@@ -297,7 +297,8 @@ constexpr size_t kNumPools = kMaxPoolHandle - 1; // 8GB for each of the glued pools). #if BUILDFLAG(HAS_64_BIT_POINTERS) --#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || PA_CONFIG(POINTER_COMPRESSION) -+#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || PA_CONFIG(POINTER_COMPRESSION) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || \ +- BUILDFLAG(ENABLE_POINTER_COMPRESSION) ++ BUILDFLAG(ENABLE_POINTER_COMPRESSION) || \ ++ BUILDFLAG(IS_BSD) constexpr size_t kPoolMaxSize = 8 * kGiB; #else constexpr size_t kPoolMaxSize = 16 * kGiB; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc__forward.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc__forward.h index a00532114b5f..c3fcc5774afb 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc__forward.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc__forward.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_forward.h.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_forward.h.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_forward.h -@@ -27,9 +27,13 @@ namespace internal { +@@ -28,9 +28,13 @@ namespace internal { // the second one 16. We could technically return something different for // malloc() and operator new(), but this would complicate things, and most of // our allocations are presumably coming from operator new() anyway. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__page.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__page.h deleted file mode 100644 index 7ec258bfe64e..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__page.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/base/allocator/partition_allocator/partition_page.h.orig 2023-04-05 11:05:06 UTC -+++ src/3rdparty/chromium/base/allocator/partition_allocator/partition_page.h -@@ -143,7 +143,7 @@ struct SlotSpanMetadata { - // PartitionPageSize() is 4 times the OS page size. - static constexpr size_t kMaxSlotsPerSlotSpan = - 4 * (1 << 14) / kSmallestBucket; --#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) -+#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) - // System page size can be 4, 16, or 64 kiB on Linux on arm64. 64 kiB is - // currently (kMaxSlotsPerSlotSpanBits == 13) not supported by the code, - // so we use the 16 kiB maximum (64 kiB will crash). diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__page__constants.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__page__constants.h new file mode 100644 index 000000000000..33c47d3245bc --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__page__constants.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/base/allocator/partition_allocator/partition_page_constants.h.orig 2023-08-17 07:33:31 UTC ++++ src/3rdparty/chromium/base/allocator/partition_allocator/partition_page_constants.h +@@ -16,7 +16,7 @@ namespace partition_alloc::internal { + // (1 << 12 or 1 << 14), as checked in PartitionRoot::Init(). And + // PartitionPageSize() is 4 times the OS page size. + static constexpr size_t kMaxSlotsPerSlotSpan = 4 * (1 << 14) / kSmallestBucket; +-#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) ++#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) + // System page size can be 4, 16, or 64 kiB on Linux on arm64. 64 kiB is + // currently (kMaxSlotsPerSlotSpanBits == 13) not supported by the code, + // so we use the 16 kiB maximum (64 kiB will crash). diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__root.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__root.cc index 6f8d525cdbcc..b925619dd52c 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__root.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__root.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/allocator/partition_allocator/partition_root.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/base/allocator/partition_allocator/partition_root.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/base/allocator/partition_allocator/partition_root.cc -@@ -42,7 +42,7 @@ +@@ -47,7 +47,7 @@ #include "wow64apiset.h" #endif @@ -9,7 +9,7 @@ #include <pthread.h> #endif -@@ -245,7 +245,7 @@ void PartitionAllocMallocInitOnce() { +@@ -281,7 +281,7 @@ void PartitionAllocMallocInitOnce() { return; } @@ -18,7 +18,7 @@ // When fork() is called, only the current thread continues to execute in the // child process. If the lock is held, but *not* by this thread when fork() is // called, we have a deadlock. -@@ -339,7 +339,7 @@ static size_t PartitionPurgeSlotSpan( +@@ -379,7 +379,7 @@ static size_t PartitionPurgeSlotSpan(PartitionRoot* ro constexpr size_t kMaxSlotCount = (PartitionPageSize() * kMaxPartitionPagesPerRegularSlotSpan) / MinPurgeableSlotSize(); @@ -27,7 +27,7 @@ // It's better for slot_usage to be stack-allocated and fixed-size, which // demands that its size be constexpr. On IS_APPLE and Linux on arm64, // PartitionPageSize() is always SystemPageSize() << 2, so regardless of -@@ -811,7 +811,7 @@ void PartitionRoot<thread_safe>::Init(PartitionOptions +@@ -948,7 +948,7 @@ void PartitionRoot::Init(PartitionOptions opts) { // apple OSes. PA_CHECK((internal::SystemPageSize() == (size_t{1} << 12)) || (internal::SystemPageSize() == (size_t{1} << 14))); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_spinning__mutex.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_spinning__mutex.cc index 8f34cabed102..06cc5fa96143 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_spinning__mutex.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_spinning__mutex.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/base/allocator/partition_allocator/spinning_mutex.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/base/allocator/partition_allocator/spinning_mutex.cc.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/base/allocator/partition_allocator/spinning_mutex.cc @@ -18,7 +18,16 @@ @@ -17,7 +17,7 @@ #include <sys/syscall.h> #include <unistd.h> #endif // PA_CONFIG(HAS_LINUX_KERNEL) -@@ -107,8 +116,16 @@ void SpinningMutex::FutexWait() { +@@ -108,8 +117,16 @@ void SpinningMutex::FutexWait() { // |kLockedContended| anymore. Note that even without spurious wakeups, the // value of |state_| is not guaranteed when this returns, as another thread // may get the lock before we get to run. @@ -34,7 +34,7 @@ if (err) { // These are programming error, check them. -@@ -120,8 +137,16 @@ void SpinningMutex::FutexWait() { +@@ -121,8 +138,16 @@ void SpinningMutex::FutexWait() { void SpinningMutex::FutexWake() { int saved_errno = errno; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_starscan_stack_stack.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_starscan_stack_stack.cc index 1f24d9074f2f..cfa0d433b7e8 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_starscan_stack_stack.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_starscan_stack_stack.cc @@ -1,10 +1,10 @@ ---- src/3rdparty/chromium/base/allocator/partition_allocator/starscan/stack/stack.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/base/allocator/partition_allocator/starscan/stack/stack.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/base/allocator/partition_allocator/starscan/stack/stack.cc @@ -18,6 +18,10 @@ #include <pthread.h> #endif -+#if defined(OS_BSD) ++#if BUILDFLAG(IS_BSD) +#include <pthread_np.h> +#endif + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_base__switches.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_base__switches.cc index 49bcb7b5ac66..f5180faeb6f1 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_base__switches.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_base__switches.cc @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/base/base_switches.cc.orig 2022-08-31 12:19:35 UTC +--- src/3rdparty/chromium/base/base_switches.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/base/base_switches.cc -@@ -170,7 +170,7 @@ const char kForceFieldTrialParams[] = "force-fieldtria - +@@ -180,7 +180,7 @@ const char kPackageVersionName[] = "package-version-na + const char kPackageVersionCode[] = "package-version-code"; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_base__switches.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_base__switches.h index 21d5313d8ecf..e3ecb7515a0c 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_base__switches.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_base__switches.h @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/base/base_switches.h.orig 2022-08-31 12:19:35 UTC +--- src/3rdparty/chromium/base/base_switches.h.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/base/base_switches.h -@@ -60,7 +60,7 @@ extern const char kEnableIdleTracing[]; - extern const char kForceFieldTrialParams[]; +@@ -62,7 +62,7 @@ extern const char kPackageVersionName[]; + extern const char kPackageVersionCode[]; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_compiler__specific.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_compiler__specific.h new file mode 100644 index 000000000000..ad3ed85ba102 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_compiler__specific.h @@ -0,0 +1,35 @@ +--- src/3rdparty/chromium/base/compiler_specific.h.orig 2023-04-28 17:01:32 UTC ++++ src/3rdparty/chromium/base/compiler_specific.h +@@ -41,9 +41,9 @@ + // Annotate a function indicating it should not be inlined. + // Use like: + // NOINLINE void DoStuff() { ... } +-#if defined(__clang__) && HAS_ATTRIBUTE(noinline) ++#if defined(__clang__) && (__clang_major__ >= 15) && HAS_ATTRIBUTE(noinline) + #define NOINLINE [[clang::noinline]] +-#elif defined(COMPILER_GCC) && HAS_ATTRIBUTE(noinline) ++#elif (defined(COMPILER_GCC) || defined(__clang__)) && HAS_ATTRIBUTE(noinline) + #define NOINLINE __attribute__((noinline)) + #elif defined(COMPILER_MSVC) + #define NOINLINE __declspec(noinline) +@@ -51,9 +51,9 @@ + #define NOINLINE + #endif + +-#if defined(__clang__) && defined(NDEBUG) && HAS_ATTRIBUTE(always_inline) ++#if defined(__clang__) && (__clang_major__ >= 15) && defined(NDEBUG) && HAS_ATTRIBUTE(always_inline) + #define ALWAYS_INLINE [[clang::always_inline]] inline +-#elif defined(COMPILER_GCC) && defined(NDEBUG) && HAS_ATTRIBUTE(always_inline) ++#elif (defined(COMPILER_GCC) || defined(__clang__)) && defined(NDEBUG) && HAS_ATTRIBUTE(always_inline) + #define ALWAYS_INLINE inline __attribute__((__always_inline__)) + #elif defined(COMPILER_MSVC) && defined(NDEBUG) + #define ALWAYS_INLINE __forceinline +@@ -69,7 +69,7 @@ + // prevent code folding, see NO_CODE_FOLDING() in base/debug/alias.h. + // Use like: + // NOT_TAIL_CALLED void FooBar(); +-#if defined(__clang__) && HAS_ATTRIBUTE(not_tail_called) ++#if defined(__clang__) && (__clang_major__ >= 15) && HAS_ATTRIBUTE(not_tail_called) + #define NOT_TAIL_CALLED [[clang::not_tail_called]] + #else + #define NOT_TAIL_CALLED diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_debug_elf__reader.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_debug_elf__reader.cc index d4a4722204fd..babce6ea3dbf 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_debug_elf__reader.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_debug_elf__reader.cc @@ -1,10 +1,10 @@ ---- src/3rdparty/chromium/base/debug/elf_reader.cc.orig 2022-08-31 12:19:35 UTC +--- src/3rdparty/chromium/base/debug/elf_reader.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/base/debug/elf_reader.cc @@ -78,6 +78,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base, bool found = false; while (current_section < section_end) { current_note = reinterpret_cast<const Nhdr*>(current_section); -+#if !defined(OS_BSD) ++#if !BUILDFLAG(IS_BSD) if (current_note->n_type == NT_GNU_BUILD_ID) { StringPiece note_name(current_section + sizeof(Nhdr), current_note->n_namesz); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_debug_stack__trace__posix.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_debug_stack__trace__posix.cc index c4a64e564a43..5d07bea8c52f 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_debug_stack__trace__posix.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_debug_stack__trace__posix.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/base/debug/stack_trace_posix.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/base/debug/stack_trace_posix.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/base/debug/stack_trace_posix.cc @@ -41,7 +41,7 @@ // execinfo.h and backtrace(3) are really only present in glibc and in macOS @@ -18,7 +18,53 @@ #include "base/debug/proc_maps_linux.h" #endif -@@ -799,6 +799,9 @@ class SandboxSymbolizeHelper { +@@ -300,7 +300,7 @@ void PrintToStderr(const char* output) { + std::ignore = HANDLE_EINTR(write(STDERR_FILENO, output, strlen(output))); + } + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + void AlarmSignalHandler(int signal, siginfo_t* info, void* void_context) { + // We have seen rare cases on AMD linux where the default signal handler + // either does not run or a thread (Probably an AMD driver thread) prevents +@@ -317,7 +317,11 @@ void AlarmSignalHandler(int signal, siginfo_t* info, v + "Warning: Default signal handler failed to terminate process.\n"); + PrintToStderr("Calling exit_group() directly to prevent timeout.\n"); + // See: https://man7.org/linux/man-pages/man2/exit_group.2.html ++#if BUILDFLAG(IS_BSD) ++ _exit(EXIT_FAILURE); ++#else + syscall(SYS_exit_group, EXIT_FAILURE); ++#endif + } + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || + // BUILDFLAG(IS_CHROMEOS) +@@ -534,7 +538,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf + _exit(EXIT_FAILURE); + } + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // Set an alarm to trigger in case the default handler does not terminate + // the process. See 'AlarmSignalHandler' for more details. + struct sigaction action; +@@ -559,6 +563,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf + // signals that do not re-raise autonomously), such as signals delivered via + // kill() and asynchronous hardware faults such as SEGV_MTEAERR, which would + // otherwise be lost when re-raising the signal via raise(). ++#if !BUILDFLAG(IS_BSD) + long retval = syscall(SYS_rt_tgsigqueueinfo, getpid(), syscall(SYS_gettid), + info->si_signo, info); + if (retval == 0) { +@@ -573,6 +578,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf + if (errno != EPERM) { + _exit(EXIT_FAILURE); + } ++#endif + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || + // BUILDFLAG(IS_CHROMEOS) + +@@ -821,6 +827,9 @@ class SandboxSymbolizeHelper { // for the modules that are loaded in the current process. // Returns true on success. bool CacheMemoryRegions() { @@ -28,7 +74,7 @@ // Reads /proc/self/maps. std::string contents; if (!ReadProcMaps(&contents)) { -@@ -816,6 +819,7 @@ class SandboxSymbolizeHelper { +@@ -838,6 +847,7 @@ class SandboxSymbolizeHelper { is_initialized_ = true; return true; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_files_file__util__posix.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_files_file__util__posix.cc index f483c647acfb..7f2c78bd85af 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_files_file__util__posix.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_files_file__util__posix.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/files/file_util_posix.cc.orig 2022-08-31 12:19:35 UTC +--- src/3rdparty/chromium/base/files/file_util_posix.cc.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/base/files/file_util_posix.cc -@@ -700,32 +700,34 @@ bool CreateDirectoryAndGetError(const FilePath& full_p +@@ -756,32 +756,34 @@ bool CreateDirectoryAndGetError(const FilePath& full_p File::Error* error) { ScopedBlockingCall scoped_blocking_call( FROM_HERE, BlockingType::MAY_BLOCK); // For call to mkdir(). diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_i18n_icu__util.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_i18n_icu__util.cc index a38478c3c072..5451c26e763e 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_i18n_icu__util.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_i18n_icu__util.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/base/i18n/icu_util.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/base/i18n/icu_util.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/base/i18n/icu_util.cc @@ -51,7 +51,7 @@ #include "third_party/icu/source/common/unicode/unistr.h" @@ -9,7 +9,7 @@ BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) #include "third_party/icu/source/i18n/unicode/timezone.h" #endif -@@ -344,7 +344,7 @@ void InitializeIcuTimeZone() { +@@ -349,7 +349,7 @@ void InitializeIcuTimeZone() { FuchsiaIntlProfileWatcher::GetPrimaryTimeZoneIdForIcuInitialization(); icu::TimeZone::adoptDefault( icu::TimeZone::createTimeZone(icu::UnicodeString::fromUTF8(zone_id))); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_linux__util.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_linux__util.cc index 5d034a4c4d1f..c5250c813ac6 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_linux__util.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_linux__util.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/base/linux_util.cc.orig 2022-08-31 12:19:35 UTC +--- src/3rdparty/chromium/base/linux_util.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/base/linux_util.cc @@ -15,6 +15,7 @@ @@ -12,7 +12,7 @@ } bool GetThreadsForProcess(pid_t pid, std::vector<pid_t>* tids) { -+#if defined(OS_BSD) ++#if BUILDFLAG(IS_BSD) + return false; +#else // 25 > strlen("/proc//task") + strlen(std::to_string(INT_MAX)) + 1 = 22 diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_memory_madv__free__discardable__memory__posix.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_memory_madv__free__discardable__memory__posix.cc index 47133357042d..65ff5cfba392 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_memory_madv__free__discardable__memory__posix.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_memory_madv__free__discardable__memory__posix.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/memory/madv_free_discardable_memory_posix.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/base/memory/madv_free_discardable_memory_posix.cc.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/base/memory/madv_free_discardable_memory_posix.cc -@@ -299,6 +299,10 @@ bool MadvFreeDiscardableMemoryPosix::IsResident() cons +@@ -306,6 +306,10 @@ void MadvFreeDiscardableMemoryPosix::SetKeepMemoryForT bool MadvFreeDiscardableMemoryPosix::IsResident() const { DFAKE_SCOPED_RECURSIVE_LOCK(thread_collision_warner_); @@ -11,7 +11,7 @@ #if BUILDFLAG(IS_APPLE) std::vector<char> vec(allocated_pages_); #else -@@ -314,6 +318,7 @@ bool MadvFreeDiscardableMemoryPosix::IsResident() cons +@@ -321,6 +325,7 @@ bool MadvFreeDiscardableMemoryPosix::IsResident() cons return false; } return true; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_memory_platform__shared__memory__region.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_memory_platform__shared__memory__region.h index bdc1f9a4b417..30ea9baa2090 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_memory_platform__shared__memory__region.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_memory_platform__shared__memory__region.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/base/memory/platform_shared_memory_region.h.orig 2022-06-17 14:20:10 UTC +--- src/3rdparty/chromium/base/memory/platform_shared_memory_region.h.orig 2023-07-16 15:47:57 UTC +++ src/3rdparty/chromium/base/memory/platform_shared_memory_region.h @@ -16,7 +16,7 @@ @@ -18,7 +18,7 @@ // Structure to limit access to executable region creation. struct ExecutableRegion { private: -@@ -211,7 +211,7 @@ class BASE_EXPORT PlatformSharedMemoryRegion { +@@ -215,7 +215,7 @@ class BASE_EXPORT PlatformSharedMemoryRegion { CheckPlatformHandlePermissionsCorrespondToMode); static PlatformSharedMemoryRegion Create(Mode mode, size_t size diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_process_launch.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_process_launch.h index 0d027a49424e..a744c9a96f61 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_process_launch.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_process_launch.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/process/launch.h.orig 2022-06-17 14:20:10 UTC +--- src/3rdparty/chromium/base/process/launch.h.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/base/process/launch.h -@@ -198,7 +198,7 @@ struct BASE_EXPORT LaunchOptions { +@@ -200,7 +200,7 @@ struct BASE_EXPORT LaunchOptions { bool clear_environment = false; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.cc index d78f3991d67a..95df631a5545 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/base/process/process_metrics.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/base/process/process_metrics.cc.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/base/process/process_metrics.cc @@ -17,7 +17,7 @@ namespace base { namespace { @@ -27,7 +27,7 @@ Value::Dict meminfo = memory_info_.ToDict(); meminfo.Merge(vmstat_info_.ToDict()); res.Set("meminfo", std::move(meminfo)); -@@ -98,7 +98,6 @@ std::unique_ptr<ProcessMetrics> ProcessMetrics::Create +@@ -100,7 +100,6 @@ std::unique_ptr<ProcessMetrics> ProcessMetrics::Create #endif // !BUILDFLAG(IS_MAC) } @@ -35,7 +35,7 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage( TimeDelta cumulative_cpu) { TimeTicks time = TimeTicks::Now(); -@@ -124,7 +123,6 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage( +@@ -126,7 +125,6 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage( double ProcessMetrics::GetPlatformIndependentCPUUsage() { return GetPlatformIndependentCPUUsage(GetCumulativeCPUUsage()); } @@ -43,7 +43,7 @@ #if BUILDFLAG(IS_WIN) double ProcessMetrics::GetPreciseCPUUsage(TimeDelta cumulative_cpu) { -@@ -155,7 +153,7 @@ double ProcessMetrics::GetPreciseCPUUsage() { +@@ -157,7 +155,7 @@ double ProcessMetrics::GetPreciseCPUUsage() { #endif // BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.h index 90733ad68e8c..d66d3ffb3d6a 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/base/process/process_metrics.h.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/base/process/process_metrics.h.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/base/process/process_metrics.h @@ -37,7 +37,7 @@ #endif @@ -54,7 +54,7 @@ int CalculateIdleWakeupsPerSecond(uint64_t absolute_idle_wakeups); #endif #if BUILDFLAG(IS_APPLE) -@@ -263,9 +263,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -266,9 +266,7 @@ class BASE_EXPORT ProcessMetrics { // Used to store the previous times and CPU usage counts so we can // compute the CPU usage between calls. TimeTicks last_cpu_time_; @@ -64,7 +64,7 @@ #if BUILDFLAG(IS_WIN) TimeTicks last_cpu_time_for_precise_cpu_usage_; -@@ -273,7 +271,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -276,7 +274,7 @@ class BASE_EXPORT ProcessMetrics { #endif #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics__openbsd.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics__openbsd.cc index cd614ca55016..85a72669036d 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics__openbsd.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics__openbsd.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/base/process/process_metrics_openbsd.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/base/process/process_metrics_openbsd.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/base/process/process_metrics_openbsd.cc @@ -6,14 +6,23 @@ @@ -83,13 +83,14 @@ size_t GetSystemCommitCharge() { int mib[] = { CTL_VM, VM_METER }; int pagesize; -@@ -84,6 +67,129 @@ size_t GetSystemCommitCharge() { +@@ -84,6 +67,133 @@ size_t GetSystemCommitCharge() { pagesize = getpagesize(); return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize); +} + +int ProcessMetrics::GetOpenFdCount() const { ++#if 0 + struct kinfo_file *files; + kvm_t *kd = NULL; + int total_count = 0; @@ -108,10 +109,13 @@ + +out: + return total_count; ++#endif ++ return getdtablecount(); +} + +int ProcessMetrics::GetOpenFdSoftLimit() const { -+ return GetMaxFds(); ++ return getdtablesize(); ++// return GetMaxFds(); +} + +uint64_t ProcessMetrics::GetVmSwapBytes() const { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics__posix.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics__posix.cc index 8ef51d87848b..f820e17841e2 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics__posix.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics__posix.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/process/process_metrics_posix.cc.orig 2022-08-31 12:19:35 UTC +--- src/3rdparty/chromium/base/process/process_metrics_posix.cc.orig 2023-07-16 15:47:57 UTC +++ src/3rdparty/chromium/base/process/process_metrics_posix.cc -@@ -20,6 +20,8 @@ +@@ -21,6 +21,8 @@ #if BUILDFLAG(IS_APPLE) #include <malloc/malloc.h> @@ -9,7 +9,7 @@ #else #include <malloc.h> #endif -@@ -135,7 +137,7 @@ size_t ProcessMetrics::GetMallocUsage() { +@@ -134,7 +136,7 @@ size_t ProcessMetrics::GetMallocUsage() { return stats.size_in_use; #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) return GetMallocUsageMallinfo(); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_process_process__posix.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_process_process__posix.cc index c24ad3485633..f7da874a37ff 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_process_process__posix.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_process_process__posix.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/base/process/process_posix.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/base/process/process_posix.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/base/process/process_posix.cc @@ -23,10 +23,15 @@ #include "base/trace_event/base_tracing.h" @@ -9,7 +9,7 @@ #include <sys/event.h> #endif -+#if defined(OS_BSD) ++#if BUILDFLAG(IS_BSD) +#include <sys/types.h> +#include <sys/sysctl.h> +#endif @@ -35,21 +35,21 @@ // On Mac we can wait on non child processes. return WaitForSingleNonChildProcess(handle, timeout); #else -@@ -387,7 +392,55 @@ void Process::Exited(int exit_code) const { +@@ -387,7 +392,56 @@ void Process::Exited(int exit_code) const { - int Process::GetPriority() const { + int Process::GetOSPriority() const { DCHECK(IsValid()); +// avoid pledge(2) violation -+#if defined(OS_BSD) ++#if BUILDFLAG(IS_BSD) + return 0; +#else return getpriority(PRIO_PROCESS, static_cast<id_t>(process_)); +#endif -+} + } + +Time Process::CreationTime() const { +// avoid ps pledge in the network process -+#if !defined(OS_BSD) ++#if !BUILDFLAG(IS_BSD) + int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid(), + sizeof(struct kinfo_proc), 0 }; + struct kinfo_proc *info = nullptr; @@ -57,7 +57,7 @@ +#endif + Time ct = Time(); + -+#if !defined(OS_BSD) ++#if !BUILDFLAG(IS_BSD) + if (sysctl(mib, std::size(mib), NULL, &info_size, NULL, 0) < 0) + goto out; + @@ -77,17 +77,18 @@ + return ct; +} + -+bool Process::IsProcessBackgrounded() const { -+ return false; ++#if BUILDFLAG(IS_BSD) ++Process::Priority Process::GetPriority() const { ++ return Priority::kUserBlocking; +} -+ -+bool Process::SetProcessBackgrounded(bool value) { ++ ++bool Process::SetPriority(Priority priority) { + return false; +} -+ -+// static -+bool Process::CanBackgroundProcesses() { ++ ++bool Process::CanSetPriority() { + return false; - } ++} ++#endif } // namespace base diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_profiler_module__cache.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_profiler_module__cache.cc index 58412582057f..b6c3709aa44a 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_profiler_module__cache.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_profiler_module__cache.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/profiler/module_cache.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/base/profiler/module_cache.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/base/profiler/module_cache.cc -@@ -37,7 +37,7 @@ std::string TransformModuleIDToSymbolServerFormat(Stri +@@ -52,7 +52,7 @@ std::string TransformModuleIDToSymbolServerFormat(Stri // Android and Linux Chrome builds use the "breakpad" format to index their // build id, so we transform the build id for these platforms. All other // platforms keep their symbols indexed by the original build ID. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_profiler_stack__sampling__profiler__test__util.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_profiler_stack__sampling__profiler__test__util.cc index e4ed87ae163a..aefe2a163bd5 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_profiler_stack__sampling__profiler__test__util.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_profiler_stack__sampling__profiler__test__util.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/profiler/stack_sampling_profiler_test_util.cc.orig 2023-02-08 09:03:45 UTC +--- src/3rdparty/chromium/base/profiler/stack_sampling_profiler_test_util.cc.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/base/profiler/stack_sampling_profiler_test_util.cc -@@ -33,7 +33,7 @@ +@@ -36,7 +36,7 @@ // Fortunately, it provides _alloca, which functions identically. #include <malloc.h> #define alloca _alloca diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_rand__util.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_rand__util.h index df6405773e53..16eba4061a14 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_rand__util.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_rand__util.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/rand_util.h.orig 2022-11-30 08:12:58 UTC +--- src/3rdparty/chromium/base/rand_util.h.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/base/rand_util.h -@@ -117,7 +117,7 @@ void RandomShuffle(Itr first, Itr last) { +@@ -121,7 +121,7 @@ void RandomShuffle(Itr first, Itr last) { std::shuffle(first, last, RandomBitGenerator()); } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info.cc index 5ae54d0bdd4e..db411e4749cd 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/system/sys_info.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/base/system/sys_info.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/base/system/sys_info.cc -@@ -106,7 +106,7 @@ std::string SysInfo::HardwareModelName() { +@@ -166,7 +166,7 @@ std::string SysInfo::HardwareModelName() { #endif void SysInfo::GetHardwareInfo(base::OnceCallback<void(HardwareInfo)> callback) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info.h index 226b5a530701..b69d60cc2735 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info.h @@ -1,15 +1,15 @@ ---- src/3rdparty/chromium/base/system/sys_info.h.orig 2023-02-08 09:03:45 UTC +--- src/3rdparty/chromium/base/system/sys_info.h.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/base/system/sys_info.h -@@ -246,6 +246,8 @@ class BASE_EXPORT SysInfo { - static void SetIsCpuSecurityMitigationsEnabled(bool is_enabled); +@@ -266,6 +266,8 @@ class BASE_EXPORT SysInfo { + static void ResetCpuSecurityMitigationsEnabledForTesting(); #endif + static uint64_t MaxSharedMemorySize(); + private: + friend class test::ScopedAmountOfPhysicalMemoryOverride; FRIEND_TEST_ALL_PREFIXES(SysInfoTest, AmountOfAvailablePhysicalMemory); - FRIEND_TEST_ALL_PREFIXES(debug::SystemMetricsTest, ParseMeminfo); -@@ -257,7 +259,7 @@ class BASE_EXPORT SysInfo { +@@ -278,7 +280,7 @@ class BASE_EXPORT SysInfo { static HardwareInfo GetHardwareInfoSync(); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info__posix.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info__posix.cc index 9b5a1d6262b0..73a5f9f01a17 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info__posix.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info__posix.cc @@ -1,21 +1,24 @@ ---- src/3rdparty/chromium/base/system/sys_info_posix.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/base/system/sys_info_posix.cc.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/base/system/sys_info_posix.cc -@@ -165,12 +165,12 @@ int NumberOfProcessors() { +@@ -117,7 +117,7 @@ bool GetDiskSpaceInfo(const base::FilePath& path, - } // namespace internal + namespace base { -#if !BUILDFLAG(IS_OPENBSD) +#if !BUILDFLAG(IS_BSD) int SysInfo::NumberOfProcessors() { - static int number_of_processors = internal::NumberOfProcessors(); - return number_of_processors; + #if BUILDFLAG(IS_MAC) + absl::optional<int> number_of_physical_cores = +@@ -161,7 +161,7 @@ int SysInfo::NumberOfProcessors() { + + return num_cpus; } -#endif // !BUILDFLAG(IS_OPENBSD) +#endif // !BUILDFLAG(IS_BSD) // static uint64_t SysInfo::AmountOfVirtualMemory() { -@@ -260,6 +260,8 @@ std::string SysInfo::OperatingSystemArchitecture() { +@@ -251,6 +251,8 @@ std::string SysInfo::OperatingSystemArchitecture() { arch = "x86"; } else if (arch == "amd64") { arch = "x86_64"; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_test_test__file__util__linux.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_test_test__file__util__linux.cc index 49b9ce7d6fbe..0a61f568e7e7 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_test_test__file__util__linux.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_test_test__file__util__linux.cc @@ -1,10 +1,10 @@ ---- src/3rdparty/chromium/base/test/test_file_util_linux.cc.orig 2022-02-28 16:54:41 UTC +--- src/3rdparty/chromium/base/test/test_file_util_linux.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/base/test/test_file_util_linux.cc @@ -54,8 +54,10 @@ bool EvictFileFromSystemCache(const FilePath& file) { return false; if (fdatasync(fd.get()) != 0) return false; -+#if !defined(OS_BSD) ++#if !BUILDFLAG(IS_BSD) if (posix_fadvise(fd.get(), 0, 0, POSIX_FADV_DONTNEED) != 0) return false; +#endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_threading_hang__watcher.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_threading_hang__watcher.cc new file mode 100644 index 000000000000..62a5b20ce6c5 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_threading_hang__watcher.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/base/threading/hang_watcher.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/base/threading/hang_watcher.cc +@@ -331,7 +331,7 @@ void HangWatcher::InitializeOnMainThread(ProcessType p + + bool enable_hang_watcher = base::FeatureList::IsEnabled(kEnableHangWatcher); + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) + if (is_zygote_child) { + enable_hang_watcher = + enable_hang_watcher && diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__bsd.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__bsd.cc new file mode 100644 index 000000000000..d2ea66bf3ea5 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__bsd.cc @@ -0,0 +1,34 @@ +--- src/3rdparty/chromium/base/threading/platform_thread_bsd.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/base/threading/platform_thread_bsd.cc +@@ -0,0 +1,31 @@ ++// Copyright 2023 The Chromium Authors ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++// Description: These are stubs for *BSD. ++ ++#include "base/threading/platform_thread.h" ++ ++namespace base { ++namespace internal { ++ ++bool CanSetThreadTypeToRealtimeAudio() { ++ return false; ++} ++ ++bool SetCurrentThreadTypeForPlatform(ThreadType thread_type, ++ MessagePumpType pump_type_hint) { ++ return false; ++} ++ ++absl::optional<ThreadPriorityForTest> ++GetCurrentThreadPriorityForPlatformForTest() { ++ return absl::nullopt; ++} ++} // namespace internal ++ ++// static ++void PlatformThreadBase::SetName(const std::string& name) { ++ SetNameCommon(name); ++} ++ ++} // namespace base diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__internal__posix.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__internal__posix.cc new file mode 100644 index 000000000000..7feb2dec502e --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__internal__posix.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/base/threading/platform_thread_internal_posix.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/base/threading/platform_thread_internal_posix.cc +@@ -41,7 +41,7 @@ ThreadPriorityForTest NiceValueToThreadPriorityForTest + } + + int GetCurrentThreadNiceValue() { +-#if BUILDFLAG(IS_NACL) ++#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_BSD) + NOTIMPLEMENTED(); + return 0; + #else diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__linux.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__linux.cc deleted file mode 100644 index e7a0ef2e0396..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__linux.cc +++ /dev/null @@ -1,84 +0,0 @@ ---- src/3rdparty/chromium/base/threading/platform_thread_linux.cc.orig 2023-02-08 09:03:45 UTC -+++ src/3rdparty/chromium/base/threading/platform_thread_linux.cc -@@ -30,7 +30,9 @@ - - #if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) - #include <pthread.h> -+#if !BUILDFLAG(IS_BSD) - #include <sys/prctl.h> -+#endif - #include <sys/resource.h> - #include <sys/time.h> - #include <sys/types.h> -@@ -139,7 +141,7 @@ long sched_setattr(pid_t pid, - #endif // !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) - #endif // BUILDFLAG(IS_CHROMEOS) - --#if !BUILDFLAG(IS_NACL) -+#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) - const FilePath::CharType kCgroupDirectory[] = - FILE_PATH_LITERAL("/sys/fs/cgroup"); - -@@ -313,7 +315,7 @@ void SetThreadCgroupsForThreadType(PlatformThreadId th - namespace internal { - - namespace { --#if !BUILDFLAG(IS_NACL) -+#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) - const struct sched_param kRealTimePrio = {8}; - #endif - } // namespace -@@ -340,7 +342,7 @@ const ThreadTypeToNiceValuePair kThreadTypeToNiceValue - }; - - bool CanSetThreadTypeToRealtimeAudio() { --#if !BUILDFLAG(IS_NACL) -+#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) - // A non-zero soft-limit on RLIMIT_RTPRIO is required to be allowed to invoke - // pthread_setschedparam in SetCurrentThreadTypeForPlatform(). - struct rlimit rlim; -@@ -352,7 +354,7 @@ bool CanSetThreadTypeToRealtimeAudio() { - - bool SetCurrentThreadTypeForPlatform(ThreadType thread_type, - MessagePumpType pump_type_hint) { --#if !BUILDFLAG(IS_NACL) -+#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) - const PlatformThreadId tid = PlatformThread::CurrentId(); - - if (g_thread_type_delegate && -@@ -378,7 +380,7 @@ bool SetCurrentThreadTypeForPlatform(ThreadType thread - - absl::optional<ThreadPriorityForTest> - GetCurrentThreadPriorityForPlatformForTest() { --#if !BUILDFLAG(IS_NACL) -+#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) - int maybe_sched_rr = 0; - struct sched_param maybe_realtime_prio = {0}; - if (pthread_getschedparam(pthread_self(), &maybe_sched_rr, -@@ -397,7 +399,7 @@ GetCurrentThreadPriorityForPlatformForTest() { - void PlatformThread::SetName(const std::string& name) { - ThreadIdNameManager::GetInstance()->SetName(name); - --#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) -+#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) && !BUILDFLAG(IS_BSD) - // On linux we can get the thread names to show up in the debugger by setting - // the process name for the LWP. We don't want to do this for the main - // thread because that would rename the process, causing tools like killall -@@ -417,7 +419,7 @@ void PlatformThread::SetName(const std::string& name) - #endif // !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) - } - --#if !BUILDFLAG(IS_NACL) -+#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) - // static - void PlatformThread::SetThreadTypeDelegate(ThreadTypeDelegate* delegate) { - // A component cannot override a delegate set by another component, thus -@@ -428,7 +430,7 @@ void PlatformThread::SetThreadTypeDelegate(ThreadTypeD - } - #endif - --#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) -+#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) && !BUILDFLAG(IS_BSD) - // static - void PlatformThread::SetThreadType(ProcessId process_id, - PlatformThreadId thread_id, diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__posix.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__posix.cc index ab57809e0ac0..3e8c5740f048 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__posix.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__posix.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/threading/platform_thread_posix.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/base/threading/platform_thread_posix.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/base/threading/platform_thread_posix.cc -@@ -76,7 +76,7 @@ void* ThreadFunc(void* params) { +@@ -76,12 +76,12 @@ void* ThreadFunc(void* params) { if (!thread_params->joinable) base::DisallowSingleton(); @@ -9,6 +9,21 @@ partition_alloc::internal::PCScan::NotifyThreadCreated( partition_alloc::internal::GetStackPointer()); #endif + +-#if !BUILDFLAG(IS_NACL) ++#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_APPLE) + PlatformThread::SetCurrentThreadRealtimePeriodValue( + delegate->GetRealtimePeriod()); +@@ -353,7 +353,7 @@ void PlatformThreadBase::Detach(PlatformThreadHandle t + + // static + bool PlatformThreadBase::CanChangeThreadType(ThreadType from, ThreadType to) { +-#if BUILDFLAG(IS_NACL) ++#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_BSD) + return false; + #else + if (from >= to) { @@ -374,6 +374,9 @@ void SetCurrentThreadTypeImpl(ThreadType thread_type, MessagePumpType pump_type_hint) { #if BUILDFLAG(IS_NACL) @@ -19,3 +34,12 @@ #else if (internal::SetCurrentThreadTypeForPlatform(thread_type, pump_type_hint)) return; +@@ -396,7 +399,7 @@ void SetCurrentThreadTypeImpl(ThreadType thread_type, + + // static + ThreadPriorityForTest PlatformThreadBase::GetCurrentThreadPriorityForTest() { +-#if BUILDFLAG(IS_NACL) ++#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_BSD) + NOTIMPLEMENTED(); + return ThreadPriorityForTest::kNormal; + #else diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_trace__event_malloc__dump__provider.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_trace__event_malloc__dump__provider.cc index 6f4bb60c70b9..dc3be50876aa 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_trace__event_malloc__dump__provider.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_trace__event_malloc__dump__provider.cc @@ -1,15 +1,15 @@ ---- src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc.orig 2023-02-08 09:03:45 UTC +--- src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc @@ -25,6 +25,8 @@ #if BUILDFLAG(IS_APPLE) #include <malloc/malloc.h> -+#elif defined(OS_BSD) ++#elif BUILDFLAG(IS_BSD) +#include <stdlib.h> #else #include <malloc.h> #endif -@@ -187,7 +189,7 @@ void ReportAppleAllocStats(size_t* total_virtual_size, +@@ -188,7 +190,7 @@ void ReportAppleAllocStats(size_t* total_virtual_size, #if (BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(IS_ANDROID)) || \ (!BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && !BUILDFLAG(IS_WIN) && \ @@ -18,11 +18,11 @@ void ReportMallinfoStats(ProcessMemoryDump* pmd, size_t* total_virtual_size, size_t* resident_size, -@@ -358,6 +360,9 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDump +@@ -359,6 +361,9 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDump &allocated_objects_count); #elif BUILDFLAG(IS_FUCHSIA) // TODO(fuchsia): Port, see https://crbug.com/706592. -+#elif defined(OS_BSD) ++#elif BUILDFLAG(IS_BSD) + total_virtual_size = 0; + allocated_objects_size = 0; #else diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_trace__event_trace__log.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_trace__event_trace__log.cc new file mode 100644 index 000000000000..6fe3d1861bc9 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_base_trace__event_trace__log.cc @@ -0,0 +1,16 @@ +--- src/3rdparty/chromium/base/trace_event/trace_log.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/base/trace_event/trace_log.cc +@@ -2190,8 +2190,13 @@ void TraceLog::SetTraceBufferForTesting( + #if BUILDFLAG(USE_PERFETTO_CLIENT_LIBRARY) + void TraceLog::OnSetup(const perfetto::DataSourceBase::SetupArgs& args) { + AutoLock lock(track_event_lock_); ++#if defined(__clang__) && (__clang_major__ >= 16) + track_event_sessions_.emplace_back(args.internal_instance_index, *args.config, + args.backend_type); ++#else ++ track_event_sessions_.emplace_back(TrackEventSession{args.internal_instance_index, *args.config, ++ args.backend_type}); ++#endif + } + + void TraceLog::OnStart(const perfetto::DataSourceBase::StartArgs&) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_BUILD.gn index b1f5f44f2f80..a3f30fdd37eb 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_BUILD.gn @@ -1,22 +1,13 @@ ---- src/3rdparty/chromium/build/config/BUILD.gn.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/build/config/BUILD.gn.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/build/config/BUILD.gn -@@ -222,13 +222,17 @@ config("default_libs") { - "CoreText.framework", - "Foundation.framework", - ] -- } else if (is_linux || is_chromeos) { -+ } else if ((is_linux && !is_bsd) || is_chromeos) { - libs = [ - "dl", - "pthread", - "rt", - ] -- } +@@ -218,6 +218,10 @@ config("default_libs") { + # Targets should choose to explicitly link frameworks they require. Since + # linking can have run-time side effects, nothing should be listed here. + libs = [] + } else if (is_bsd) { + libs = [ + "pthread", + ] -+ } - } - - group("common_deps") { + } else if (is_linux || is_chromeos) { + libs = [ + "dl", diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_BUILDCONFIG.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_BUILDCONFIG.gn index a7e1736e9cce..c9eb9e97a18d 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_BUILDCONFIG.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_BUILDCONFIG.gn @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/build/config/BUILDCONFIG.gn.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/build/config/BUILDCONFIG.gn.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/build/config/BUILDCONFIG.gn @@ -136,7 +136,8 @@ declare_args() { is_official_build = false diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_BUILD.gn index 85c5c8963128..7945516dc450 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_BUILD.gn @@ -1,6 +1,15 @@ ---- src/3rdparty/chromium/build/config/compiler/BUILD.gn.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/build/config/compiler/BUILD.gn.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/build/config/compiler/BUILD.gn -@@ -243,13 +243,16 @@ config("no_unresolved_symbols") { +@@ -198,7 +198,7 @@ declare_args() { + # This greatly reduces the size of debug builds, at the cost of + # debugging information which is required by some specialized + # debugging tools. +- simple_template_names = is_clang && !is_nacl && !is_win && !is_apple ++ simple_template_names = is_clang && !is_nacl && !is_win && !is_apple && !is_bsd + } + + declare_args() { +@@ -262,13 +262,16 @@ config("no_unresolved_symbols") { # Compiler instrumentation can introduce dependencies in DSOs to symbols in # the executable they are loaded into, so they are unresolved at link-time. config("no_unresolved_symbols") { @@ -18,7 +27,7 @@ } # compiler --------------------------------------------------------------------- -@@ -513,6 +516,10 @@ config("compiler") { +@@ -555,6 +558,10 @@ config("compiler") { } } @@ -29,16 +38,16 @@ # Linux-specific compiler flags setup. # ------------------------------------ if (use_gold) { -@@ -882,7 +889,7 @@ config("compiler") { - # * Apple platforms (e.g. MacOS, iPhone, iPad) aren't supported because xcode - # lldb doesn't have the needed changes yet. - # TODO(crbug.com/1379070): Remove if the upstream default ever changes. -- if (is_clang && !is_nacl && !is_win && !is_apple) { -+ if (is_clang && !is_nacl && !is_win && !is_apple && !is_bsd) { - cflags_cc += [ "-gsimple-template-names" ] - } +@@ -823,7 +830,7 @@ config("compiler") { -@@ -1065,7 +1072,7 @@ config("compiler_cpu_abi") { + ldflags += [ "-Wl,-mllvm,-import-instr-limit=$import_instr_limit" ] + +- if (!is_chromeos) { ++ if (!is_chromeos && !is_bsd) { + # TODO(https://crbug.com/972449): turn on for ChromeOS when that + # toolchain has this flag. + # We only use one version of LLVM within a build so there's no need to +@@ -1170,7 +1177,7 @@ config("compiler_cpu_abi") { ] } } else if (current_cpu == "arm") { @@ -47,7 +56,7 @@ !(is_chromeos_lacros && is_chromeos_device)) { cflags += [ "--target=arm-linux-gnueabihf" ] ldflags += [ "--target=arm-linux-gnueabihf" ] -@@ -1083,7 +1090,7 @@ config("compiler_cpu_abi") { +@@ -1188,7 +1195,7 @@ config("compiler_cpu_abi") { cflags += [ "-mtune=$arm_tune" ] } } else if (current_cpu == "arm64") { @@ -56,7 +65,7 @@ !(is_chromeos_lacros && is_chromeos_device)) { cflags += [ "--target=aarch64-linux-gnu" ] ldflags += [ "--target=aarch64-linux-gnu" ] -@@ -1418,7 +1425,7 @@ config("compiler_deterministic") { +@@ -1523,7 +1530,7 @@ config("compiler_deterministic") { # 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. @@ -65,7 +74,7 @@ # TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here. cflags += [ "-Xclang", -@@ -1470,7 +1477,7 @@ config("clang_revision") { +@@ -1575,7 +1582,7 @@ config("clang_revision") { } config("clang_revision") { @@ -74,7 +83,7 @@ update_args = [ "--print-revision", "--verify-version=$clang_version", -@@ -1872,7 +1879,7 @@ config("default_warnings") { +@@ -2005,7 +2012,7 @@ config("default_warnings") { "-Wno-ignored-pragma-optimize", ] @@ -83,7 +92,7 @@ cflags += [ # TODO(crbug.com/1343975) Evaluate and possibly enable. "-Wno-deprecated-builtins", -@@ -2054,7 +2061,7 @@ config("no_chromium_code") { +@@ -2218,7 +2225,7 @@ config("no_chromium_code") { # third-party libraries. "-Wno-c++11-narrowing", ] @@ -92,7 +101,7 @@ cflags += [ # Disabled for similar reasons as -Wunused-variable. "-Wno-unused-but-set-variable", -@@ -2570,7 +2577,7 @@ config("afdo") { +@@ -2736,7 +2743,7 @@ config("afdo") { # There are some targeted places that AFDO regresses, so we provide a separate # config to allow AFDO to be disabled per-target. config("afdo") { @@ -101,8 +110,8 @@ cflags = [] if (clang_emit_debug_info_for_profiling) { # Add the following flags to generate debug info for profiling. -@@ -2589,7 +2596,7 @@ config("afdo") { - } +@@ -2763,7 +2770,7 @@ config("afdo") { + cflags += [ "-Wno-backend-plugin" ] inputs = [ _clang_sample_profile ] } - } else if (auto_profile_path != "" && is_a_target_toolchain) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_pgo_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_pgo_BUILD.gn new file mode 100644 index 000000000000..e5f736b1a13c --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_pgo_BUILD.gn @@ -0,0 +1,19 @@ +--- src/3rdparty/chromium/build/config/compiler/pgo/BUILD.gn.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/build/config/compiler/pgo/BUILD.gn +@@ -143,13 +143,14 @@ config("pgo_optimization_flags") { + + # Enable basic block layout based on the extended TSP problem. This aims to + # improve icache utilization and reduce the binary size. +- if (use_thin_lto) { ++ # __clang_major__ >= 15 ++ if (use_thin_lto && !is_bsd) { + if (is_win) { + ldflags = [ "-mllvm:-enable-ext-tsp-block-placement=1" ] + } else { + ldflags = [ "-Wl,-mllvm,-enable-ext-tsp-block-placement=1" ] + } +- } else { ++ } else if (!is_bsd) { + cflags += [ + "-mllvm", + "-enable-ext-tsp-block-placement=1", diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_freetype_freetype.gni b/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_freetype_freetype.gni deleted file mode 100644 index ab30256825eb..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_freetype_freetype.gni +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/build/config/freetype/freetype.gni.orig 2023-08-23 22:56:29 UTC -+++ src/3rdparty/chromium/build/config/freetype/freetype.gni -@@ -10,7 +10,5 @@ declare_args() { - # than version 2.7.1 and have color bitmap support compiled in. WARNING: - # System FreeType configurations other than as described WILL INTRODUCE TEXT - # RENDERING AND SECURITY REGRESSIONS. -- use_system_freetype = false -- use_qt_freetype = false -- qt_freetype_config = "" -+ use_system_freetype = true - } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_linux_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_linux_BUILD.gn new file mode 100644 index 000000000000..63e443ae5628 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_linux_BUILD.gn @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/build/config/linux/BUILD.gn.orig 2022-05-19 14:06:27 UTC ++++ src/3rdparty/chromium/build/config/linux/BUILD.gn +@@ -41,7 +41,7 @@ config("runtime_library") { + } + + if ((!is_chromeos || default_toolchain != "//build/toolchain/cros:target") && +- (!use_custom_libcxx || current_cpu == "mipsel")) { ++ (!use_custom_libcxx || current_cpu == "mipsel") && !is_bsd) { + libs = [ "atomic" ] + } + } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_linux_pkg-config.py b/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_linux_pkg-config.py index 5bf1f6d7757d..afea5c617dfa 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_linux_pkg-config.py +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_linux_pkg-config.py @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/build/config/linux/pkg-config.py.orig 2024-02-10 00:23:21 UTC +--- src/3rdparty/chromium/build/config/linux/pkg-config.py.orig 2024-01-23 10:07:29 UTC +++ src/3rdparty/chromium/build/config/linux/pkg-config.py @@ -108,7 +108,7 @@ def main(): # If this is run on non-Linux platforms, just return nothing and indicate # success. This allows us to "kind of emulate" a Linux build from other # platforms. - if 'linux' not in sys.platform and 'darwin' not in sys.platform: -+ if not sys.platform.startswith(tuple(['linux', 'openbsd', 'freebsd', 'darwin'])): ++ if not sys.platform.startswith(tuple(['linux', 'darwin', 'freebsd', 'openbsd'])): print("[[],[],[],[],[]]") return 0 diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_ozone.gni b/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_ozone.gni index 122af743c6f6..763302535df5 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_ozone.gni +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_ozone.gni @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/build/config/ozone.gni.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/build/config/ozone.gni.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/build/config/ozone.gni -@@ -90,7 +90,15 @@ declare_args() { +@@ -87,7 +87,15 @@ declare_args() { } else if (is_chromeos_lacros) { ozone_platform = "wayland" ozone_platform_wayland = true diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_rust.gni b/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_rust.gni deleted file mode 100644 index c0ed80bc9866..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_config_rust.gni +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/build/config/rust.gni.orig 2023-04-05 11:05:06 UTC -+++ src/3rdparty/chromium/build/config/rust.gni -@@ -135,7 +135,7 @@ if (enable_rust) { - rust_sysroot = "//third_party/rust-toolchain" - use_unverified_rust_toolchain = false - } else { -- if (host_os != "linux") { -+ if (host_os != "linux" && host_os != "openbsd" && host_os != "freebsd") { - assert(false, - "Attempt to use Android Rust toolchain on an unsupported platform") - } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_toolchain_gcc__toolchain.gni b/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_toolchain_gcc__toolchain.gni index c4d3cef02ebe..a83eea70421e 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_toolchain_gcc__toolchain.gni +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_toolchain_gcc__toolchain.gni @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni.orig 2023-11-20 16:08:07 UTC +--- src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni @@ -53,6 +53,13 @@ if (enable_resource_allowlist_generation) { "enable_resource_allowlist_generation=true does not work for target_os=$target_os") @@ -14,7 +14,7 @@ # This template defines a toolchain for something that works like gcc # (including clang). # -@@ -839,22 +846,12 @@ template("clang_toolchain") { +@@ -888,22 +895,12 @@ template("clang_toolchain") { # use_gold too. template("clang_toolchain") { gcc_toolchain(target_name) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_toolchain_toolchain.gni b/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_toolchain_toolchain.gni new file mode 100644 index 000000000000..ce33cb085585 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_build_toolchain_toolchain.gni @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/build/toolchain/toolchain.gni.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/build/toolchain/toolchain.gni +@@ -67,7 +67,7 @@ if (host_os == "mac") { + host_shlib_extension = ".dylib" + } else if (host_os == "win") { + host_shlib_extension = ".dll" +-} else if (host_os == "linux" || host_os == "aix") { ++} else if (is_posix) { + host_shlib_extension = ".so" + } else { + assert(false, "Host platform not supported") diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_cc_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_cc_BUILD.gn index 36c7ea079dde..416cda0112e3 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_cc_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_cc_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/cc/BUILD.gn.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/cc/BUILD.gn.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/cc/BUILD.gn -@@ -668,7 +668,7 @@ cc_test_static_library("test_support") { +@@ -674,7 +674,7 @@ cc_test_static_library("test_support") { if (enable_vulkan) { deps += [ "//gpu/vulkan/init" ] } @@ -8,9 +8,9 @@ + if (!is_android && !is_bsd) { data_deps = [ "//third_party/mesa_headers" ] } - } -@@ -913,7 +913,6 @@ cc_test("cc_unittests") { - data = [ "//components/viz/test/data/" ] + if (skia_use_dawn) { +@@ -929,7 +929,6 @@ cc_test("cc_unittests") { + data = [ "//components/test/data/viz/" ] data_deps = [ "//testing/buildbot/filters:cc_unittests_filters", - "//third_party/mesa_headers", diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_cc_base_features.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_cc_base_features.cc new file mode 100644 index 000000000000..17cb349564cb --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_cc_base_features.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/cc/base/features.cc.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/cc/base/features.cc +@@ -85,7 +85,7 @@ CONSTINIT const base::Feature kUseDMSAAForTiles( + // be using a separate flag to control the launch on GL. + CONSTINIT const base::Feature kUseDMSAAForTiles( + "UseDMSAAForTiles", +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + base::FEATURE_ENABLED_BY_DEFAULT + #else + base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_app_app__management__strings.grdp b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_app_app__management__strings.grdp new file mode 100644 index 000000000000..a336b3f36bc5 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_app_app__management__strings.grdp @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/app/app_management_strings.grdp.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/chrome/app/app_management_strings.grdp +@@ -188,7 +188,7 @@ + You can open and edit supported files with this app from Finder or other apps. To control which files open this app by default, <ph name="BEGIN_LINK"><a href="#"></ph>learn how to set default apps on your device<ph name="END_LINK"></a></ph>. + </message> + </if> +- <if expr="is_fuchsia or is_linux"> ++ <if expr="is_fuchsia or is_posix"> + <message name="IDS_APP_MANAGEMENT_FILE_HANDLING_SET_DEFAULTS_LINK" desc="Further explanation of the File Handling API, including text describing the purpose of the toggle (referencing a generic Linux file browser app) and a link to a learn more link for default filetype associations."> + You can open and edit supported files with this app from your file browser or other apps. To control which files open this app by default, <ph name="BEGIN_LINK"><a href="#"></ph>learn how to set default apps on your device<ph name="END_LINK"></a></ph>. + </message> diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_app_chromium__strings.grd b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_app_chromium__strings.grd new file mode 100644 index 000000000000..378a00f12881 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_app_chromium__strings.grd @@ -0,0 +1,38 @@ +--- src/3rdparty/chromium/chrome/app/chromium_strings.grd.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/chrome/app/chromium_strings.grd +@@ -315,7 +315,7 @@ If you update this file, be sure also to update google + Welcome to Chromium; new browser window opened + </message> + </if> +- <if expr="is_macosx or is_linux"> ++ <if expr="is_macosx or is_posix"> + <message name="IDS_FIRST_RUN_DIALOG_WINDOW_TITLE" desc="Window title of First Run dialog on Mac and Linux, displayed in title bar"> + Welcome to Chromium + </message> +@@ -465,7 +465,7 @@ If you update this file, be sure also to update google + To get future Chromium updates, you'll need Windows 10 or later. This computer is using Windows 8.1. + </message> + </if> +- <if expr="is_linux"> ++ <if expr="is_posix"> + <message name="IDS_LINUX_OBSOLETE" desc="A message displayed on an at-launch infobar and about:help warning the user that the OS version they are using is no longer supported."> + Chromium may not function correctly because it is no longer supported on this Linux distribution + </message> +@@ -870,7 +870,7 @@ Permissions you've already given to websites and apps + </message> + </if> + +- <if expr="is_win or is_macosx or is_linux"> ++ <if expr="is_win or is_macosx or is_posix"> + <message name="IDS_RELAUNCH_TO_UPDATE_ALT" desc="Alternate text label of the relaunch to update Chrome menu item" translateable="false"> + Not used in Chromium. Placeholder to keep resource maps in sync. + </message> +@@ -1255,7 +1255,7 @@ Permissions you've already given to websites and apps + </message> + </if> + +- <if expr="is_win or is_macosx or is_linux"> ++ <if expr="is_win or is_macosx or is_posix"> + <message name="IDS_UPDATE_RECOMMENDED_DIALOG_TITLE_ALT" desc="Alternate window title for the Update Recommended dialog." translateable="false"> + Not used in Chromium. Placeholder to keep resource maps in sync. + </message> diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_app_generated__resources.grd b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_app_generated__resources.grd new file mode 100644 index 000000000000..185d3fbc661b --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_app_generated__resources.grd @@ -0,0 +1,92 @@ +--- src/3rdparty/chromium/chrome/app/generated_resources.grd.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/chrome/app/generated_resources.grd +@@ -2,7 +2,7 @@ + + <!-- + This file contains definitions of resources that will be translated for each +-locale. The variables is_win, is_macosx, is_linux, and is_posix are available ++locale. The variables is_win, is_macosx, is_posix, and is_posix are available + for making strings OS specific. Other platform defines such as use_titlecase + are declared in tools/grit/grit_rule.gni. + --> +@@ -3601,7 +3601,7 @@ are declared in tools/grit/grit_rule.gni. + </if> + + <!-- Bluetooth Device Credentials (i.e. PIN/Passkey) dialog --> +- <if expr="is_win or is_linux"> ++ <if expr="is_win or is_posix"> + <message name="IDS_BLUETOOTH_DEVICE_CREDENTIALS_TITLE" desc="Title of the Bluetooth device credentials prompt dialog."> + Device Credentials + </message> +@@ -5432,7 +5432,7 @@ are declared in tools/grit/grit_rule.gni. + Read information about your browser, OS, device, installed software, registry values and files + </message> + </if> +- <if expr="is_macosx or is_linux"> ++ <if expr="is_macosx or is_posix"> + <message name="IDS_EXTENSION_PROMPT_WARNING_ENTERPRISE_REPORTING_PRIVATE_ENABLED_LINUX_AND_MACOS" desc="Permission string for enterprise private reporting permission on Linux and MacOS."> + Read information about your browser, OS, device, installed software and files + </message> +@@ -6145,7 +6145,7 @@ Keep your key file in a safe place. You will need it t + Old versions of Chrome Apps won't open on Windows devices after December 2022. Contact your administrator to update to a new version or remove this app. + </message> + </if> +- <if expr="is_linux"> ++ <if expr="is_posix"> + <message name="IDS_FORCE_INSTALLED_DEPRECATED_APPS_CONTENT" desc="Content of the force installed deprecated app dialog"> + Old versions of Chrome Apps won't open on Linux devices after December 2022. Contact your administrator to update to a new version or remove this app. + </message> +@@ -6191,7 +6191,7 @@ Keep your key file in a safe place. You will need it t + Old versions of Chrome apps won't open on Windows devices after December 2022. You can check if there's a new version available. + </message> + </if> +- <if expr="is_linux"> ++ <if expr="is_posix"> + <message name="IDS_DEPRECATED_APPS_MONITOR_RENDERER" desc="Dialog content that educates users that Chrome Apps will soon no longer launch."> + Old versions of Chrome apps won't open on Linux devices after December 2022. You can check if there's a new version available. + </message> +@@ -10396,7 +10396,7 @@ Check your passwords anytime in <ph name="GOOGLE_PASSW + <message name="IDS_APP_MENU_BUTTON_UPDATE" desc="Short label next to app-menu button when an update is available."> + Update + </message> +- <if expr="is_win or is_macosx or is_linux"> ++ <if expr="is_win or is_macosx or is_posix"> + <message name="IDS_APP_MENU_BUTTON_UPDATE_ALT1" desc="Alternate short label next to app-menu button when an update is available."> + Finish update + </message> +@@ -10743,7 +10743,7 @@ Check your passwords anytime in <ph name="GOOGLE_PASSW + Google Pay + </message> + +- <if expr="is_linux"> ++ <if expr="is_posix"> + <message name="IDS_SHOW_WINDOW_DECORATIONS" desc="The label of a radio button in the options dialog for using the system title bar and borders."> + Use system title bar and borders + </message> +@@ -11728,7 +11728,7 @@ Check your passwords anytime in <ph name="GOOGLE_PASSW + </message> + + <!-- Device Trust Consent dialog --> +- <if expr="is_win or is_macosx or is_linux or is_chromeos"> ++ <if expr="is_win or is_macosx or is_posix or is_chromeos"> + <message name="IDS_DEVICE_SIGNALS_CONSENT_DIALOG_TITLE" desc="Title of the dialog shown when user consent is required to share device signals."> + Share information about your device? + </message> +@@ -12136,7 +12136,7 @@ Please help our engineers fix this problem. Tell us wh + Set as default + </message> + +- <if expr="is_linux"> ++ <if expr="is_posix"> + <message name="IDS_MINIMIZE_WINDOW_MENU" desc="The Linux browser window menu item text for minimizing the window."> + Minimize + </message> +@@ -14346,7 +14346,7 @@ Please help our engineers fix this problem. Tell us wh + Open Anyway + </message> + +- <if expr="is_win or is_macosx or is_linux"> ++ <if expr="is_win or is_macosx or is_posix"> + <message name="IDS_UTILITY_PROCESS_SYSTEM_SIGNALS_NAME" desc="The name of the utility process used to collect system signals. Only spawned on Windows, Mac or Linux."> + System Signals Utilities + </message> diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_app_google__chrome__strings.grd b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_app_google__chrome__strings.grd new file mode 100644 index 000000000000..fdd0c329a1d4 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_app_google__chrome__strings.grd @@ -0,0 +1,38 @@ +--- src/3rdparty/chromium/chrome/app/google_chrome_strings.grd.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/chrome/app/google_chrome_strings.grd +@@ -301,7 +301,7 @@ chromium_strings.grd. --> + Welcome to Chrome; new browser window opened + </message> + </if> +- <if expr="is_macosx or is_linux"> ++ <if expr="is_macosx or is_posix"> + <message name="IDS_FIRST_RUN_DIALOG_WINDOW_TITLE" desc="Window title of First Run dialog on Mac and Linux, displayed in title bar"> + Welcome to Google Chrome + </message> +@@ -453,7 +453,7 @@ chromium_strings.grd. --> + To get future Google Chrome updates, you'll need Windows 10 or later. This computer is using Windows 8.1. + </message> + </if> +- <if expr="is_linux"> ++ <if expr="is_posix"> + <message name="IDS_LINUX_OBSOLETE" desc="A message displayed on an at-launch infobar and about:help warning the user that the OS version they are using is no longer supported."> + Google Chrome may not function correctly because it is no longer supported on this Linux distribution + </message> +@@ -855,7 +855,7 @@ Permissions you've already given to websites and apps + </if> + </if> + +- <if expr="is_win or is_macosx or is_linux"> ++ <if expr="is_win or is_macosx or is_posix"> + <if expr="use_titlecase"> + <message name="IDS_RELAUNCH_TO_UPDATE_ALT" desc="Alternate text label of the relaunch to update Chrome menu item"> + Relaunch to Update - Your tabs will reopen +@@ -1278,7 +1278,7 @@ Permissions you've already given to websites and apps + </message> + </if> + +- <if expr="is_win or is_macosx or is_linux"> ++ <if expr="is_win or is_macosx or is_posix"> + <message name="IDS_UPDATE_RECOMMENDED_DIALOG_TITLE_ALT" desc="Alternate window title for the Update Recommended dialog."> + Relaunch to finish Chrome update + </message> diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_app_profiles__strings.grdp b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_app_profiles__strings.grdp new file mode 100644 index 000000000000..1d8767a94030 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_app_profiles__strings.grdp @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/app/profiles_strings.grdp.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/chrome/app/profiles_strings.grdp +@@ -54,7 +54,7 @@ + Add Profile... + </message> + </if> +- <if expr="is_linux"> ++ <if expr="is_posix"> + <message name="IDS_PROFILES_ADD_PROFILE_LABEL" desc="Menu item for adding a new profile."> + Add profile... + </message> diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_app_settings__strings.grdp b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_app_settings__strings.grdp new file mode 100644 index 000000000000..09d3a37079d2 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_app_settings__strings.grdp @@ -0,0 +1,35 @@ +--- src/3rdparty/chromium/chrome/app/settings_strings.grdp.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/chrome/app/settings_strings.grdp +@@ -183,12 +183,12 @@ + Manage accessibility features + </message> + </if> +- <if expr="is_win or is_linux or is_macosx"> ++ <if expr="is_win or is_posix or is_macosx"> + <message name="IDS_SETTINGS_OVERSCROLL_HISTORY_NAVIGATION_TITLE" desc="Title for the overscroll history navigation setting, which allows you to navigate back and forward by swiping left or right with a touch device."> + Swipe between pages + </message> + </if> +- <if expr="is_win or is_linux"> ++ <if expr="is_win or is_posix"> + <message name="IDS_SETTINGS_OVERSCROLL_HISTORY_NAVIGATION_SUBTITLE" desc="Subtitle for the overscroll history navigation setting, which allows you to navigate back and forward by swiping left or right with a touch device."> + Navigate back and forward with swipe gesture + </message> +@@ -222,7 +222,7 @@ + Theme + </message> + </if> +- <if expr="is_linux"> ++ <if expr="is_posix"> + <message name="IDS_SETTINGS_GTK_THEME" desc="Text of the label describing the system (GTK) browser theme on Linux"> + GTK + </message> +@@ -242,7 +242,7 @@ + Use Classic + </message> + </if> +- <if expr="not is_linux or is_chromeos or is_fuchsia"> ++ <if expr="not is_posix or is_chromeos or is_fuchsia"> + <message name="IDS_SETTINGS_RESET_TO_DEFAULT_THEME" desc="Name of the control which resets the browser theme back to the default theme."> + Reset to default + </message> diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_app_theme_chrome__unscaled__resources.grd b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_app_theme_chrome__unscaled__resources.grd new file mode 100644 index 000000000000..f3ceafba7bcb --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_app_theme_chrome__unscaled__resources.grd @@ -0,0 +1,29 @@ +--- src/3rdparty/chromium/chrome/app/theme/chrome_unscaled_resources.grd.orig 2023-07-16 15:47:57 UTC ++++ src/3rdparty/chromium/chrome/app/theme/chrome_unscaled_resources.grd +@@ -16,7 +16,7 @@ + <includes> + <if expr="_google_chrome"> + <then> +- <if expr="is_linux"> ++ <if expr="is_posix"> + <then> + <include name="IDR_PRODUCT_LOGO_64" file="google_chrome/linux/product_logo_64.png" type="BINDATA" /> + <include name="IDR_PRODUCT_LOGO_128" file="google_chrome/linux/product_logo_128.png" type="BINDATA" /> +@@ -61,7 +61,7 @@ + <else> <!-- not _google_chrome --> + <if expr="_is_chrome_for_testing_branded"> + <then> +- <if expr="is_linux"> ++ <if expr="is_posix"> + <then> + <include name="IDR_PRODUCT_LOGO_64" file="google_chrome/google_chrome_for_testing/linux/product_logo_64.png" type="BINDATA" /> + <include name="IDR_PRODUCT_LOGO_128" file="google_chrome/google_chrome_for_testing/linux/product_logo_128.png" type="BINDATA" /> +@@ -75,7 +75,7 @@ + </if> + </then> + <else> <!-- not _is_chrome_for_testing_branded --> +- <if expr="is_linux"> ++ <if expr="is_posix"> + <then> + <include name="IDR_PRODUCT_LOGO_64" file="chromium/linux/product_logo_64.png" type="BINDATA" /> + <include name="IDR_PRODUCT_LOGO_128" file="chromium/linux/product_logo_128.png" type="BINDATA" /> diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_app_theme_theme__resources.grd b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_app_theme_theme__resources.grd new file mode 100644 index 000000000000..10224bce93ce --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_app_theme_theme__resources.grd @@ -0,0 +1,59 @@ +--- src/3rdparty/chromium/chrome/app/theme/theme_resources.grd.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/chrome/app/theme/theme_resources.grd +@@ -146,14 +146,14 @@ + </if> + <if expr="_google_chrome"> + <then> +- <if expr="is_linux"> ++ <if expr="is_posix"> + <then> + <structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_16" file="google_chrome/linux/product_logo_16.png" /> + <structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32" file="google_chrome/linux/product_logo_32.png" /> + <structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32_BETA" file="google_chrome/linux/product_logo_32_beta.png" /> + <structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32_DEV" file="google_chrome/linux/product_logo_32_dev.png" /> + </then> +- <else> <!-- not is_linux --> ++ <else> <!-- not is_posix --> + <if expr="not is_android"> + <structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_16" file="google_chrome/product_logo_16.png" /> + <structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32" file="google_chrome/product_logo_32.png" /> +@@ -161,7 +161,7 @@ + <structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32_BETA" file="google_chrome/product_logo_32_beta.png" /> + <structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32_DEV" file="google_chrome/product_logo_32_dev.png" /> + </else> +- </if> <!-- is_linux --> ++ </if> <!-- is_posix --> + <structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32_CANARY" file="google_chrome/product_logo_32_canary.png" /> + <if expr="not is_android"> + <structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_NAME_22" file="google_chrome/product_logo_name_22.png" /> +@@ -173,7 +173,7 @@ + <else> <!-- not _google_chrome --> + <if expr="_is_chrome_for_testing_branded"> + <then> +- <if expr="is_linux"> ++ <if expr="is_posix"> + <then> + <structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_16" file="google_chrome/google_chrome_for_testing/linux/product_logo_16.png" /> + <structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32" file="google_chrome/google_chrome_for_testing/linux/product_logo_32.png" /> +@@ -182,10 +182,10 @@ + <structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_16" file="google_chrome/google_chrome_for_testing/product_logo_16.png" /> + <structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32" file="google_chrome/google_chrome_for_testing/product_logo_32.png" /> + </else> +- </if> <!-- is_linux --> ++ </if> <!-- is_posix --> + </then> + <else> <!-- not _is_chrome_for_testing_branded --> +- <if expr="is_linux"> ++ <if expr="is_posix"> + <then> + <structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_16" file="chromium/linux/product_logo_16.png" /> + <structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32" file="chromium/linux/product_logo_32.png" /> +@@ -194,7 +194,7 @@ + <structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_16" file="chromium/product_logo_16.png" /> + <structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32" file="chromium/product_logo_32.png" /> + </else> +- </if> <!-- is_linux --> ++ </if> <!-- is_posix --> + </else> + </if> <!-- _is_chrome_for_testing_branded --> + <structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_NAME_22" file="chromium/product_logo_name_22.png" /> diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_BUILD.gn new file mode 100644 index 000000000000..95970a4cb06a --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_BUILD.gn @@ -0,0 +1,16 @@ +--- src/3rdparty/chromium/chrome/browser/BUILD.gn.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/chrome/browser/BUILD.gn +@@ -6312,6 +6312,13 @@ static_library("browser") { + } + } + ++ if (is_bsd) { ++ sources -= [ ++ "metrics/bluetooth_metrics_provider.cc", ++ "metrics/bluetooth_metrics_provider.h", ++ ] ++ } ++ + if (is_linux && use_dbus) { + sources += [ + "dbus_memory_pressure_evaluator_linux.cc", diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_custom__handlers_chrome__protocol__handler__registry__delegate.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_custom__handlers_chrome__protocol__handler__registry__delegate.cc new file mode 100644 index 000000000000..808db0af5867 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_custom__handlers_chrome__protocol__handler__registry__delegate.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/browser/custom_handlers/chrome_protocol_handler_registry_delegate.cc.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/chrome/browser/custom_handlers/chrome_protocol_handler_registry_delegate.cc +@@ -77,7 +77,7 @@ bool ChromeProtocolHandlerRegistryDelegate::ShouldRemo + // If true default protocol handlers will be removed if the OS level + // registration for a protocol is no longer Chrome. + bool ChromeProtocolHandlerRegistryDelegate::ShouldRemoveHandlersNotInOS() { +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // We don't do this on Linux as the OS registration there is not reliable, + // and Chrome OS doesn't have any notion of OS registration. + // TODO(benwells): When Linux support is more reliable remove this diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_BUILD.gn new file mode 100644 index 000000000000..06da7024e1e3 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_BUILD.gn @@ -0,0 +1,13 @@ +--- src/3rdparty/chromium/chrome/browser/extensions/BUILD.gn.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/chrome/browser/extensions/BUILD.gn +@@ -1372,6 +1372,10 @@ static_library("extensions") { + deps += [ "//chrome/services/printing/public/mojom" ] + } + ++ if (is_bsd) { ++ sources -= [ "api/image_writer_private/removable_storage_provider_linux.cc" ] ++ } ++ + if (enable_service_discovery) { + sources += [ + "api/mdns/mdns_api.cc", diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc new file mode 100644 index 000000000000..06a864400955 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc +@@ -43,7 +43,7 @@ + #include "extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.h" + #include "extensions/browser/api/networking_private/networking_private_delegate_factory.h" + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #include "chrome/browser/extensions/api/system_indicator/system_indicator_manager_factory.h" + #endif + +@@ -108,7 +108,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt + extensions::SettingsPrivateEventRouterFactory::GetInstance(); + extensions::SettingsOverridesAPI::GetFactoryInstance(); + extensions::SidePanelService::GetFactoryInstance(); +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + extensions::SystemIndicatorManagerFactory::GetInstance(); + #endif + extensions::TabGroupsEventRouterFactory::GetInstance(); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc new file mode 100644 index 000000000000..5f0523de5f4c --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc @@ -0,0 +1,29 @@ +--- src/3rdparty/chromium/chrome/browser/extensions/api/enterprise_reporting_private/chrome_desktop_report_request_helper.cc.orig 2022-07-22 17:30:31 UTC ++++ src/3rdparty/chromium/chrome/browser/extensions/api/enterprise_reporting_private/chrome_desktop_report_request_helper.cc +@@ -24,7 +24,7 @@ + #include "base/win/registry.h" + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "base/environment.h" + #include "base/nix/xdg_util.h" + #endif +@@ -256,7 +256,7 @@ base::FilePath GetEndpointVerificationDir() { + bool got_path = false; + #if BUILDFLAG(IS_WIN) + got_path = base::PathService::Get(base::DIR_LOCAL_APP_DATA, &path); +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + std::unique_ptr<base::Environment> env(base::Environment::Create()); + path = base::nix::GetXDGDirectory(env.get(), base::nix::kXdgConfigHomeEnvVar, + base::nix::kDotConfigDir); +@@ -267,7 +267,7 @@ base::FilePath GetEndpointVerificationDir() { + if (!got_path) + return path; + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + path = path.AppendASCII("google"); + #else + path = path.AppendASCII("Google"); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc new file mode 100644 index 000000000000..277b0a7db4ab --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.cc.orig 2022-11-30 08:12:58 UTC ++++ src/3rdparty/chromium/chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.cc +@@ -8,7 +8,7 @@ + + #include "build/build_config.h" + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + + #include <memory> + #include <utility> diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h new file mode 100644 index 000000000000..36906235599b --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.h.orig 2022-08-31 12:19:35 UTC ++++ src/3rdparty/chromium/chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.h +@@ -7,7 +7,7 @@ + + #include "build/build_config.h" + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + + #include <vector> + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc new file mode 100644 index 000000000000..971325d39aff --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc @@ -0,0 +1,38 @@ +--- src/3rdparty/chromium/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc.orig 2023-04-28 17:01:32 UTC ++++ src/3rdparty/chromium/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc +@@ -32,7 +32,7 @@ + #include "components/reporting/util/statusor.h" + #endif + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "base/strings/string_util.h" + #include "chrome/browser/enterprise/signals/signals_aggregator_factory.h" + #include "chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.h" +@@ -149,7 +149,7 @@ api::enterprise_reporting_private::ContextInfo ToConte + return info; + } + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + + device_signals::SignalsAggregationRequest CreateAggregationRequest( + device_signals::SignalName signal_name) { +@@ -210,7 +210,7 @@ EnterpriseReportingPrivateGetDeviceIdFunction:: + + // getPersistentSecret + +-#if !BUILDFLAG(IS_LINUX) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + + EnterpriseReportingPrivateGetPersistentSecretFunction:: + EnterpriseReportingPrivateGetPersistentSecretFunction() = default; +@@ -637,7 +637,7 @@ void EnterpriseReportingPrivateEnqueueRecordFunction:: + } + #endif + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + + // getFileSystemInfo + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h new file mode 100644 index 000000000000..f8809f86b0d8 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h @@ -0,0 +1,29 @@ +--- src/3rdparty/chromium/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.h.orig 2023-03-09 06:31:50 UTC ++++ src/3rdparty/chromium/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.h +@@ -20,7 +20,7 @@ + #include "components/reporting/proto/synced/record.pb.h" + #include "components/reporting/proto/synced/record_constants.pb.h" + #include "components/reporting/util/statusor.h" +-#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "base/time/time.h" + #include "components/device_signals/core/browser/signals_types.h" + #endif // BUILDFLAG(IS_CHROMEOS) +@@ -56,7 +56,7 @@ class EnterpriseReportingPrivateGetDeviceIdFunction : + ~EnterpriseReportingPrivateGetDeviceIdFunction() override; + }; + +-#if !BUILDFLAG(IS_LINUX) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + + class EnterpriseReportingPrivateGetPersistentSecretFunction + : public ExtensionFunction { +@@ -266,7 +266,7 @@ class EnterpriseReportingPrivateEnqueueRecordFunction + + #endif + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + + class EnterpriseReportingPrivateGetFileSystemInfoFunction + : public ExtensionFunction { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc new file mode 100644 index 000000000000..87a92318daf3 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc +@@ -20,6 +20,7 @@ static base::LazyInstance<scoped_refptr<StorageDeviceL + + void RemovableStorageProvider::GetAllDevices(DeviceListReadyCallback callback) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); ++#if !BUILDFLAG(IS_BSD) + if (g_test_device_list.Get().get() != nullptr) { + base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask( + FROM_HERE, +@@ -33,6 +34,9 @@ void RemovableStorageProvider::GetAllDevices(DeviceLis + base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}, + base::BindOnce(&RemovableStorageProvider::PopulateDeviceList), + std::move(callback)); ++#else ++ NOTIMPLEMENTED(); ++#endif + } + + // static diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_messaging_native__process__launcher__posix.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_messaging_native__process__launcher__posix.cc new file mode 100644 index 000000000000..91fcc20ed463 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_messaging_native__process__launcher__posix.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc.orig 2022-02-28 16:54:41 UTC ++++ src/3rdparty/chromium/chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc +@@ -82,7 +82,7 @@ bool NativeProcessLauncher::LaunchNativeProcess( + + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + // Don't use no_new_privs mode, e.g. in case the host needs to use sudo. + options.allow_new_privs = true; + #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc new file mode 100644 index 000000000000..802634836f97 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc +@@ -603,7 +603,7 @@ void PasswordsPrivateDelegateImpl::OnFetchingFamilyMem + } + + void PasswordsPrivateDelegateImpl::OsReauthTimeoutCall() { +-#if !BUILDFLAG(IS_LINUX) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + PasswordsPrivateEventRouter* router = + PasswordsPrivateEventRouterFactory::GetForProfile(profile_); + if (router) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc new file mode 100644 index 000000000000..5c9454eeb598 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc @@ -0,0 +1,13 @@ +--- src/3rdparty/chromium/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc.orig 2023-09-29 10:14:06 UTC ++++ src/3rdparty/chromium/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc +@@ -280,7 +280,9 @@ bool ChromeRuntimeAPIDelegate::GetPlatformInfo(Platfor + } else if (strcmp(os, "linux") == 0) { + info->os = extensions::api::runtime::PlatformOs::kLinux; + } else if (strcmp(os, "openbsd") == 0) { +- info->os = extensions::api::runtime::PlatformOs::kOpenbsd; ++ info->os = extensions::api::runtime::PlatformOs::kLinux; ++ } else if (strcmp(os, "freebsd") == 0) { ++ info->os = extensions::api::runtime::PlatformOs::kLinux; + } else if (strcmp(os, "fuchsia") == 0) { + info->os = extensions::api::runtime::PlatformOs::kFuchsia; + } else { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_settings__private_prefs__util.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_settings__private_prefs__util.cc new file mode 100644 index 000000000000..ab7ab9a7009d --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_settings__private_prefs__util.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/chrome/browser/extensions/api/settings_private/prefs_util.cc +@@ -199,7 +199,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist + (*s_allowlist)[::prefs::kSidePanelHorizontalAlignment] = + settings_api::PrefType::PREF_TYPE_BOOLEAN; + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + (*s_allowlist)[::prefs::kUseCustomChromeFrame] = + settings_api::PrefType::PREF_TYPE_BOOLEAN; + #endif +@@ -211,7 +211,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist + settings_api::PrefType::PREF_TYPE_STRING; + (*s_allowlist)[::prefs::kPolicyThemeColor] = + settings_api::PrefType::PREF_TYPE_NUMBER; +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + (*s_allowlist)[::prefs::kSystemTheme] = + settings_api::PrefType::PREF_TYPE_NUMBER; + #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_tabs_tabs__api.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_tabs_tabs__api.cc new file mode 100644 index 000000000000..0a42e29cfbed --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_tabs_tabs__api.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/browser/extensions/api/tabs/tabs_api.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/chrome/browser/extensions/api/tabs/tabs_api.cc +@@ -860,7 +860,7 @@ ExtensionFunction::ResponseAction WindowsCreateFunctio + // ui::SHOW_STATE_MINIMIZED above, on Linux the window is not created as + // minimized. + // TODO(crbug.com/1410400): Remove this workaround when linux is fixed. +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // TODO(crbug.com/1410400): Find a fix for wayland as well. + + // Must be defined inside IS_LINUX to compile on windows/mac. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc new file mode 100644 index 000000000000..e0f8858decb5 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc @@ -0,0 +1,29 @@ +--- src/3rdparty/chromium/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc +@@ -31,7 +31,7 @@ + #include "extensions/browser/process_manager.h" + #include "extensions/common/error_utils.h" + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "extensions/common/permissions/permissions_data.h" + #endif + +@@ -40,7 +40,7 @@ bool CanEnableAudioDebugRecordingsFromExtension( + bool CanEnableAudioDebugRecordingsFromExtension( + const extensions::Extension* extension) { + bool enabled_by_permissions = false; +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + if (extension) { + enabled_by_permissions = + extension->permissions_data()->active_permissions().HasAPIPermission( +@@ -598,7 +598,7 @@ WebrtcLoggingPrivateGetLogsDirectoryFunction::Run() { + + ExtensionFunction::ResponseAction + WebrtcLoggingPrivateGetLogsDirectoryFunction::Run() { +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // Unlike other WebrtcLoggingPrivate functions that take a RequestInfo object, + // this function shouldn't be called by a component extension on behalf of + // some web code. It returns a DirectoryEntry for use directly in the calling diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_webstore__private_webstore__private__api.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_webstore__private_webstore__private__api.cc new file mode 100644 index 000000000000..da9a51a03c39 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_webstore__private_webstore__private__api.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc +@@ -924,7 +924,7 @@ void WebstorePrivateBeginInstallWithManifest3Function: + RequestExtensionApproval(contents); + return; + } +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + // Shows a parental permission dialog directly bypassing the extension + // install dialog view. The parental permission dialog contains a superset + // of data from the extension install dialog: requested extension diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_gcm_gcm__profile__service__factory.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_gcm_gcm__profile__service__factory.cc new file mode 100644 index 000000000000..2f92338c3b30 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_gcm_gcm__profile__service__factory.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/chrome/browser/gcm/gcm_profile_service_factory.cc.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/chrome/browser/gcm/gcm_profile_service_factory.cc +@@ -91,7 +91,7 @@ GCMProfileService* GCMProfileServiceFactory::GetForPro + // static + GCMProfileService* GCMProfileServiceFactory::GetForProfile( + content::BrowserContext* profile) { +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // On desktop, incognito profiles are checked with IsIncognitoProfile(). + // It's possible for non-incognito profiles to also be off-the-record. + bool is_profile_supported = +@@ -131,7 +131,7 @@ KeyedService* GCMProfileServiceFactory::BuildServiceIn + KeyedService* GCMProfileServiceFactory::BuildServiceInstanceFor( + content::BrowserContext* context) const { + Profile* profile = Profile::FromBrowserContext(context); +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + DCHECK(!profile->IsIncognitoProfile()); + #else + DCHECK(!profile->IsOffTheRecord()); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_gcm_instance__id_instance__id__profile__service__factory.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_gcm_instance__id_instance__id__profile__service__factory.cc new file mode 100644 index 000000000000..de8d94187879 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_gcm_instance__id_instance__id__profile__service__factory.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/chrome/browser/gcm/instance_id/instance_id_profile_service_factory.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/chrome/browser/gcm/instance_id/instance_id_profile_service_factory.cc +@@ -16,7 +16,7 @@ namespace instance_id { + // static + InstanceIDProfileService* InstanceIDProfileServiceFactory::GetForProfile( + content::BrowserContext* profile) { +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // On desktop, the guest profile is actually the primary OTR profile of + // the "regular" guest profile. The regular guest profile is never used + // directly by users. Also, user are not able to create child OTR profiles +@@ -61,7 +61,7 @@ InstanceIDProfileServiceFactory::~InstanceIDProfileSer + KeyedService* InstanceIDProfileServiceFactory::BuildServiceInstanceFor( + content::BrowserContext* context) const { + Profile* profile = Profile::FromBrowserContext(context); +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // On desktop, incognito profiles are checked with IsIncognitoProfile(). + // It's possible for non-incognito profiles to also be off-the-record. + bool is_incognito = profile->IsIncognitoProfile(); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_router_discovery_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_router_discovery_BUILD.gn new file mode 100644 index 000000000000..483961bbc5a5 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_router_discovery_BUILD.gn @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/browser/media/router/discovery/BUILD.gn.orig 2022-10-24 13:33:33 UTC ++++ src/3rdparty/chromium/chrome/browser/media/router/discovery/BUILD.gn +@@ -80,7 +80,7 @@ static_library("discovery") { + "media_sink_discovery_metrics.h", + ] + +- if (is_linux || is_chromeos) { ++ if ((is_linux || is_chromeos) && !is_bsd) { + sources += [ "discovery_network_list_wifi_linux.cc" ] + } + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_capture__policy__utils.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_capture__policy__utils.cc index 77d0b039dee3..91903778b113 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_capture__policy__utils.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_capture__policy__utils.cc @@ -1,20 +1,20 @@ ---- src/3rdparty/chromium/chrome/browser/media/webrtc/capture_policy_utils.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/chrome/browser/media/webrtc/capture_policy_utils.cc.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/chrome/browser/media/webrtc/capture_policy_utils.cc -@@ -118,7 +118,7 @@ AllowedScreenCaptureLevel GetAllowedCaptureLevel(const +@@ -139,7 +139,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry + } - bool IsGetDisplayMediaSetSelectAllScreensAllowedForAnySite( - content::BrowserContext* context) { + bool IsGetAllScreensMediaAllowedForAnySite(content::BrowserContext* context) { -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) Profile* profile = Profile::FromBrowserContext(context); if (!profile) { return false; -@@ -145,7 +145,7 @@ bool IsGetDisplayMediaSetSelectAllScreensAllowedForAny - bool IsGetDisplayMediaSetSelectAllScreensAllowed( - content::BrowserContext* context, - const GURL& url) { +@@ -174,7 +174,7 @@ bool IsGetAllScreensMediaAllowedForAnySite(content::Br + + bool IsGetAllScreensMediaAllowed(content::BrowserContext* context, + const GURL& url) { -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) Profile* profile = Profile::FromBrowserContext(context); - if (!profile) + if (!profile) { return false; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_chrome__screen__enumerator.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_chrome__screen__enumerator.cc index c53c86c51fbd..e3b515d773a3 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_chrome__screen__enumerator.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_chrome__screen__enumerator.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/chrome/browser/media/webrtc/chrome_screen_enumerator.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/chrome/browser/media/webrtc/chrome_screen_enumerator.cc.orig 2023-07-16 15:47:57 UTC +++ src/3rdparty/chromium/chrome/browser/media/webrtc/chrome_screen_enumerator.cc -@@ -20,7 +20,7 @@ +@@ -21,7 +21,7 @@ #if BUILDFLAG(IS_CHROMEOS_ASH) #include "ash/shell.h" #include "ui/aura/window.h" @@ -9,7 +9,7 @@ #include "base/functional/callback.h" #include "content/public/browser/desktop_capture.h" #endif -@@ -31,7 +31,7 @@ base::LazyInstance<std::vector<aura::Window*>>::Destru +@@ -32,7 +32,7 @@ base::LazyInstance<std::vector<aura::Window*>>::Destru root_windows_for_testing_ = LAZY_INSTANCE_INITIALIZER; } // namespace @@ -18,7 +18,7 @@ namespace { base::LazyInstance<std::unique_ptr<webrtc::DesktopCapturer>>::DestructorAtExit g_desktop_capturer_for_testing = LAZY_INSTANCE_INITIALIZER; -@@ -77,7 +77,7 @@ blink::mojom::StreamDevicesSetPtr EnumerateScreens( +@@ -78,7 +78,7 @@ blink::mojom::StreamDevicesSetPtr EnumerateScreens( return stream_devices_set; } @@ -27,7 +27,7 @@ blink::mojom::StreamDevicesSetPtr EnumerateScreens( blink::mojom::MediaStreamType stream_type) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); -@@ -128,7 +128,7 @@ void ChromeScreenEnumerator::SetRootWindowsForTesting( +@@ -129,7 +129,7 @@ void ChromeScreenEnumerator::SetRootWindowsForTesting( root_windows_for_testing_.Get() = std::move(root_windows); } @@ -36,9 +36,9 @@ void ChromeScreenEnumerator::SetDesktopCapturerForTesting( std::unique_ptr<webrtc::DesktopCapturer> capturer) { g_desktop_capturer_for_testing.Get() = std::move(capturer); -@@ -144,7 +144,7 @@ void ChromeScreenEnumerator::EnumerateScreens( - DCHECK(base::FeatureList::IsEnabled( - features::kGetDisplayMediaSetAutoSelectAllScreens)); +@@ -143,7 +143,7 @@ void ChromeScreenEnumerator::EnumerateScreens( + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); + DCHECK(base::FeatureList::IsEnabled(blink::features::kGetAllScreensMedia)); -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__event__log__uploader.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__event__log__uploader.cc index 226274e7a074..1997053b0136 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__event__log__uploader.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__event__log__uploader.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/chrome/browser/media/webrtc/webrtc_event_log_uploader.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/chrome/browser/media/webrtc/webrtc_event_log_uploader.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/chrome/browser/media/webrtc/webrtc_event_log_uploader.cc -@@ -43,7 +43,7 @@ const char kProduct[] = "Chrome_ChromeOS"; +@@ -44,7 +44,7 @@ const char kProduct[] = "Chrome_ChromeOS"; const char kProduct[] = "Chrome_Mac"; #elif BUILDFLAG(IS_CHROMEOS_ASH) const char kProduct[] = "Chrome_ChromeOS"; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__log__uploader.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__log__uploader.cc index 647f9df48f94..de2a37accf04 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__log__uploader.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__log__uploader.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/chrome/browser/media/webrtc/webrtc_log_uploader.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/chrome/browser/media/webrtc/webrtc_log_uploader.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/chrome/browser/media/webrtc/webrtc_log_uploader.cc -@@ -365,6 +365,10 @@ void WebRtcLogUploader::SetupMultipart( +@@ -375,6 +375,10 @@ void WebRtcLogUploader::SetupMultipart( const char product[] = "Chrome_ChromeOS"; #elif BUILDFLAG(IS_FUCHSIA) const char product[] = "Chrome_Fuchsia"; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__logging__controller.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__logging__controller.cc index fdebe744f962..c74047f8bfa1 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__logging__controller.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__logging__controller.cc @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/chrome/browser/media/webrtc/webrtc_logging_controller.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/chrome/browser/media/webrtc/webrtc_logging_controller.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/chrome/browser/media/webrtc/webrtc_logging_controller.cc -@@ -23,10 +23,10 @@ - #include "content/public/browser/browser_context.h" +@@ -25,10 +25,10 @@ + #include "components/webrtc_logging/browser/text_log_list.h" #include "content/public/browser/render_process_host.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) @@ -13,7 +13,7 @@ using webrtc_event_logging::WebRtcEventLogManager; -@@ -278,7 +278,7 @@ void WebRtcLoggingController::StartEventLogging( +@@ -285,7 +285,7 @@ void WebRtcLoggingController::StartEventLogging( web_app_id, callback); } @@ -22,7 +22,7 @@ void WebRtcLoggingController::GetLogsDirectory( LogsDirectoryCallback callback, LogsDirectoryErrorCallback error_callback) { -@@ -323,7 +323,7 @@ void WebRtcLoggingController::GrantLogsDirectoryAccess +@@ -330,7 +330,7 @@ void WebRtcLoggingController::GrantLogsDirectoryAccess FROM_HERE, base::BindOnce(std::move(callback), file_system.id(), registered_name)); } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__logging__controller.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__logging__controller.h index 1ba821af9e7a..49b8eb69053c 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__logging__controller.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__logging__controller.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/chrome/browser/media/webrtc/webrtc_logging_controller.h.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/chrome/browser/media/webrtc/webrtc_logging_controller.h.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/chrome/browser/media/webrtc/webrtc_logging_controller.h -@@ -137,7 +137,7 @@ class WebRtcLoggingController +@@ -138,7 +138,7 @@ class WebRtcLoggingController size_t web_app_id, const StartEventLoggingCallback& callback); @@ -9,9 +9,9 @@ // Ensures that the WebRTC Logs directory exists and then grants render // process access to the 'WebRTC Logs' directory, and invokes |callback| with // the ids necessary to create a DirectoryEntry object. -@@ -196,7 +196,7 @@ class WebRtcLoggingController - bool success, - const std::string& error_message); +@@ -203,7 +203,7 @@ class WebRtcLoggingController + + content::BrowserContext* GetBrowserContext() const; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_net_system__network__context__manager.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_net_system__network__context__manager.cc new file mode 100644 index 000000000000..f3128071a53f --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_net_system__network__context__manager.cc @@ -0,0 +1,115 @@ +--- src/3rdparty/chromium/chrome/browser/net/system_network_context_manager.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/chrome/browser/net/system_network_context_manager.cc +@@ -92,7 +92,7 @@ + + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + #include "chrome/common/chrome_paths_internal.h" + #include "chrome/grit/chromium_strings.h" + #include "ui/base/l10n/l10n_util.h" +@@ -183,7 +183,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut + auth_dynamic_params->basic_over_http_enabled = + local_state->GetBoolean(prefs::kBasicAuthOverHttpEnabled); + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + auth_dynamic_params->delegate_by_kdc_policy = + local_state->GetBoolean(prefs::kAuthNegotiateDelegateByKdcPolicy); + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +@@ -241,7 +241,7 @@ NetworkSandboxState IsNetworkSandboxEnabledInternal() + if (g_previously_failed_to_launch_sandboxed_service) { + return NetworkSandboxState::kDisabledBecauseOfFailedLaunch; + } +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + auto* local_state = g_browser_process->local_state(); + #endif + +@@ -262,7 +262,7 @@ NetworkSandboxState IsNetworkSandboxEnabledInternal() + } + #endif // BUILDFLAG(IS_WIN) + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (local_state && + local_state->HasPrefPath(prefs::kNetworkServiceSandboxEnabled)) { + return local_state->GetBoolean(prefs::kNetworkServiceSandboxEnabled) +@@ -457,7 +457,7 @@ void SystemNetworkContextManager::DeleteInstance() { + g_system_network_context_manager = nullptr; + } + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + SystemNetworkContextManager::GssapiLibraryLoadObserver:: + GssapiLibraryLoadObserver(SystemNetworkContextManager* owner) + : owner_(owner) {} +@@ -515,7 +515,7 @@ SystemNetworkContextManager::SystemNetworkContextManag + pref_change_registrar_.Add(prefs::kAllHttpAuthSchemesAllowedForOrigins, + auth_pref_callback); + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + pref_change_registrar_.Add(prefs::kAuthNegotiateDelegateByKdcPolicy, + auth_pref_callback); + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +@@ -562,7 +562,7 @@ SystemNetworkContextManager::SystemNetworkContextManag + #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + pref_change_registrar_.Add( + prefs::kEnforceLocalAnchorConstraintsEnabled, + base::BindRepeating(&SystemNetworkContextManager:: +@@ -611,7 +611,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe + registry->RegisterBooleanPref(prefs::kKerberosEnabled, false); + #endif // BUILDFLAG(IS_CHROMEOS_LACROS) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + registry->RegisterBooleanPref(prefs::kAuthNegotiateDelegateByKdcPolicy, + false); + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +@@ -640,7 +640,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe + registry->RegisterBooleanPref(prefs::kChromeRootStoreEnabled, false); + #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + // Note that the default value is not relevant because the pref is only + // evaluated when it is managed. + registry->RegisterBooleanPref(prefs::kEnforceLocalAnchorConstraintsEnabled, +@@ -649,11 +649,11 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe + + registry->RegisterListPref(prefs::kExplicitlyAllowedNetworkPorts); + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + registry->RegisterBooleanPref(prefs::kNetworkServiceSandboxEnabled, true); + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + registry->RegisterBooleanPref(prefs::kReceivedHttpAuthNegotiateHeader, false); + #endif // BUILDFLAG(IS_LINUX) + } +@@ -702,7 +702,7 @@ void SystemNetworkContextManager::OnNetworkServiceCrea + OnNewHttpAuthDynamicParams(http_auth_dynamic_params); + network_service->ConfigureHttpAuthPrefs(std::move(http_auth_dynamic_params)); + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + gssapi_library_loader_observer_.Install(network_service); + #endif // BUILDFLAG(IS_LINUX) + +@@ -1009,7 +1009,7 @@ void SystemNetworkContextManager::UpdateChromeRootStor + #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + void SystemNetworkContextManager::UpdateEnforceLocalAnchorConstraintsEnabled() { + const PrefService::Preference* enforce_local_anchor_constraints_enabled_pref = + local_state_->FindPreference( diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_net_system__network__context__manager.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_net_system__network__context__manager.h new file mode 100644 index 000000000000..03783d1b1351 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_net_system__network__context__manager.h @@ -0,0 +1,29 @@ +--- src/3rdparty/chromium/chrome/browser/net/system_network_context_manager.h.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/chrome/browser/net/system_network_context_manager.h +@@ -185,7 +185,7 @@ class SystemNetworkContextManager { + class URLLoaderFactoryForSystem; + class NetworkProcessLaunchWatcher; + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + class GssapiLibraryLoadObserver + : public network::mojom::GssapiLibraryLoadObserver { + public: +@@ -229,7 +229,7 @@ class SystemNetworkContextManager { + #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + // Applies the current value of the kEnforceLocalAnchorConstraintsEnabled + // pref to the enforcement state. + void UpdateEnforceLocalAnchorConstraintsEnabled(); +@@ -275,7 +275,7 @@ class SystemNetworkContextManager { + + static absl::optional<bool> certificate_transparency_enabled_for_testing_; + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + GssapiLibraryLoadObserver gssapi_library_loader_observer_{this}; + #endif // BUILDFLAG(IS_LINUX) + }; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_prefs_browser__prefs.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_prefs_browser__prefs.cc new file mode 100644 index 000000000000..01dbe1ca48f5 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_prefs_browser__prefs.cc @@ -0,0 +1,69 @@ +--- src/3rdparty/chromium/chrome/browser/prefs/browser_prefs.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/chrome/browser/prefs/browser_prefs.cc +@@ -478,13 +478,13 @@ + #endif + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_ASH) ++ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + #include "components/device_signals/core/browser/pref_names.h" // nogncheck due to crbug.com/1125897 + #endif + + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + #include "chrome/browser/browser_switcher/browser_switcher_prefs.h" + #endif +@@ -517,7 +517,7 @@ + #include "chrome/browser/sessions/session_service_log.h" + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "ui/color/system_theme.h" + #endif + +@@ -662,7 +662,7 @@ const char kPluginsPluginsList[] = "plugins.plugins_li + const char kPluginsShowDetails[] = "plugins.show_details"; + + // Deprecated 02/2023. +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + const char kWebAppsUrlHandlerInfo[] = "web_apps.url_handler_info"; + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + +@@ -948,7 +948,7 @@ void RegisterLocalStatePrefsForMigration(PrefRegistryS + #endif // BUILDFLAG(IS_CHROMEOS_ASH) + + // Deprecated 02/2023. +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + registry->RegisterDictionaryPref(kWebAppsUrlHandlerInfo); + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + +@@ -1863,12 +1863,12 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync + #endif + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_ASH) ++ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + device_signals::RegisterProfilePrefs(registry); + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || + // BUILDFLAG(IS_CHROMEOS_ASH) + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + browser_switcher::BrowserSwitcherPrefs::RegisterProfilePrefs(registry); + #endif + +@@ -2018,7 +2018,7 @@ void MigrateObsoleteLocalStatePrefs(PrefService* local + #endif // BUILDFLAG(IS_CHROMEOS_ASH) + + // Added 02/2023 +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + local_state->ClearPref(kWebAppsUrlHandlerInfo); + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_prefs_pref__service__incognito__allowlist.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_prefs_pref__service__incognito__allowlist.cc new file mode 100644 index 000000000000..30ddf9a2ebc9 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_prefs_pref__service__incognito__allowlist.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/browser/prefs/pref_service_incognito_allowlist.cc.orig 2023-08-17 07:33:31 UTC ++++ src/3rdparty/chromium/chrome/browser/prefs/pref_service_incognito_allowlist.cc +@@ -168,7 +168,7 @@ const char* const kPersistentPrefNames[] = { + prefs::kShowFullscreenToolbar, + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Toggleing custom frames affects all open windows in the profile, hence + // should be written to the regular profile when changed in incognito mode. + prefs::kUseCustomChromeFrame, diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_printing_print__backend__service__manager.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_printing_print__backend__service__manager.cc new file mode 100644 index 000000000000..8139fb923780 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_printing_print__backend__service__manager.cc @@ -0,0 +1,29 @@ +--- src/3rdparty/chromium/chrome/browser/printing/print_backend_service_manager.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/chrome/browser/printing/print_backend_service_manager.cc +@@ -33,7 +33,7 @@ + #include "printing/buildflags/buildflags.h" + #include "printing/printing_features.h" + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "content/public/common/content_switches.h" + #endif + +@@ -851,7 +851,7 @@ PrintBackendServiceManager::GetServiceFromBundle( + host.BindNewPipeAndPassReceiver(), + content::ServiceProcessHost::Options() + .WithDisplayName(IDS_UTILITY_PROCESS_PRINT_BACKEND_SERVICE_NAME) +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + .WithExtraCommandLineSwitches({switches::kMessageLoopTypeUi}) + #endif + .Pass()); +@@ -1024,7 +1024,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate + return kNoClientsRegisteredResetOnIdleTimeout; + + case ClientType::kQueryWithUi: +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // No need to update if there were other query with UI clients. + if (HasQueryWithUiClientForRemoteId(remote_id)) { + return absl::nullopt; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_printing_printer__query.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_printing_printer__query.cc new file mode 100644 index 000000000000..125dba287eaa --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_printing_printer__query.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/browser/printing/printer_query.cc.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/chrome/browser/printing/printer_query.cc +@@ -361,7 +361,7 @@ void PrinterQuery::UpdatePrintSettings(base::Value::Di + crash_key = std::make_unique<crash_keys::ScopedPrinterInfo>( + print_backend->GetPrinterDriverInfo(printer_name)); + +-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS) ++#if (BUILDFLAG(IS_BSD) || BUILDFLAG(IS_LINUX)) && BUILDFLAG(USE_CUPS) + PrinterBasicInfo basic_info; + if (print_backend->GetPrinterBasicInfo(printer_name, &basic_info) == + mojom::ResultCode::kSuccess) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_resources_sandbox__internals_sandbox__internals.ts b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_resources_sandbox__internals_sandbox__internals.ts new file mode 100644 index 000000000000..e10b79e480c1 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_resources_sandbox__internals_sandbox__internals.ts @@ -0,0 +1,29 @@ +--- src/3rdparty/chromium/chrome/browser/resources/sandbox_internals/sandbox_internals.ts.orig 2023-02-08 09:03:45 UTC ++++ src/3rdparty/chromium/chrome/browser/resources/sandbox_internals/sandbox_internals.ts +@@ -2,7 +2,7 @@ + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. + +-// <if expr="is_linux or is_chromeos"> ++// <if expr="is_posix or is_chromeos"> + import './strings.m.js'; + + import {loadTimeData} from 'chrome://resources/js/load_time_data.js'; +@@ -121,7 +121,7 @@ function androidHandler() { + } + // </if> + +-// <if expr="is_linux or is_chromeos"> ++// <if expr="is_posix or is_chromeos"> + + /** + * Adds a status row that reports either Yes or No. +@@ -182,7 +182,7 @@ document.addEventListener('DOMContentLoaded', () => { + // <if expr="is_android"> + androidHandler(); + // </if> +- // <if expr="is_linux or is_chromeos"> ++ // <if expr="is_posix or is_chromeos"> + linuxHandler(); + // </if> + }); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_resources_signin_signin__shared.css b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_resources_signin_signin__shared.css new file mode 100644 index 000000000000..1a3008147862 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_resources_signin_signin__shared.css @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/browser/resources/signin/signin_shared.css.orig 2022-11-30 08:12:58 UTC ++++ src/3rdparty/chromium/chrome/browser/resources/signin/signin_shared.css +@@ -54,7 +54,7 @@ a { + border-radius: var(--scrollbar-width); + } + +-<if expr="is_macosx or is_linux or is_chromeos"> ++<if expr="is_macosx or is_posix or is_chromeos"> + .action-container { + flex-flow: row-reverse; + justify-content: flex-start; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_resources_signin_sync__confirmation_sync__confirmation__app.html b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_resources_signin_sync__confirmation_sync__confirmation__app.html new file mode 100644 index 000000000000..5ec551183f86 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_resources_signin_sync__confirmation_sync__confirmation__app.html @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/chrome/browser/resources/signin/sync_confirmation/sync_confirmation_app.html.orig 2023-07-16 15:47:57 UTC ++++ src/3rdparty/chromium/chrome/browser/resources/signin/sync_confirmation/sync_confirmation_app.html +@@ -290,7 +290,7 @@ + autofocus="[[isModalDialog_]]"> + $i18n{syncConfirmationConfirmLabel} + </cr-button> +- <if expr="is_macosx or is_linux or chromeos_ash or chromeos_lacros"> ++ <if expr="is_macosx or is_posix or chromeos_ash or chromeos_lacros"> + <cr-button id="settingsButton" on-click="onGoToSettings_" + disabled="[[anyButtonClicked_]]" consent-confirmation> + $i18n{syncConfirmationSettingsLabel} +@@ -300,7 +300,7 @@ + disabled="[[anyButtonClicked_]]"> + $i18n{syncConfirmationUndoLabel} + </cr-button> +- <if expr="not (is_macosx or is_linux or chromeos_ash or chromeos_lacros)"> ++ <if expr="not (is_macosx or is_posix or chromeos_ash or chromeos_lacros)"> + <cr-button id="settingsButton" on-click="onGoToSettings_" + disabled="[[anyButtonClicked_]]" consent-confirmation> + $i18n{syncConfirmationSettingsLabel} diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_about__ui.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_about__ui.cc new file mode 100644 index 000000000000..565fc76382d7 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_about__ui.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/chrome/browser/ui/webui/about_ui.cc.orig 2023-07-16 15:47:57 UTC ++++ src/3rdparty/chromium/chrome/browser/ui/webui/about_ui.cc +@@ -635,7 +635,7 @@ std::string ChromeURLs() { + return html; + } + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + std::string AboutLinuxProxyConfig() { + std::string data; + AppendHeader(&data, +@@ -689,7 +689,7 @@ void AboutUIHTMLSource::StartDataRequest( + response = + ui::ResourceBundle::GetSharedInstance().LoadDataResourceString(idr); + } +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + } else if (source_name_ == chrome::kChromeUILinuxProxyConfigHost) { + response = AboutLinuxProxyConfig(); + #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_app__home_app__home__page__handler.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_app__home_app__home__page__handler.cc new file mode 100644 index 000000000000..a7b61b1f993f --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_app__home_app__home__page__handler.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/chrome/browser/ui/webui/app_home/app_home_page_handler.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/chrome/browser/ui/webui/app_home/app_home_page_handler.cc +@@ -415,7 +415,7 @@ app_home::mojom::AppInfoPtr AppHomePageHandler::Create + + bool deprecated_app = false; + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + auto* context = extension_system_->extension_service()->GetBrowserContext(); + deprecated_app = + extensions::IsExtensionUnsupportedDeprecatedApp(context, extension->id()); +@@ -478,7 +478,7 @@ void AppHomePageHandler::FillExtensionInfoList( + } + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + auto* context = extension_system_->extension_service()->GetBrowserContext(); + const bool is_deprecated_app = + extensions::IsExtensionUnsupportedDeprecatedApp(context, diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc new file mode 100644 index 000000000000..a717e9efc5ce --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc @@ -0,0 +1,92 @@ +--- src/3rdparty/chromium/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc +@@ -213,7 +213,7 @@ + #include "chrome/browser/ui/webui/chromeos/chrome_url_disabled/chrome_url_disabled_ui.h" + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "chrome/browser/ui/webui/webui_js_error/webui_js_error_ui.h" + #endif + +@@ -239,17 +239,17 @@ + #endif + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "chrome/browser/ui/webui/discards/discards_ui.h" + #endif + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ +- BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + #include "chrome/browser/ui/webui/sandbox/sandbox_internals_ui.h" + #endif + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_ASH) ++ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + #include "chrome/browser/ui/webui/connectors_internals/connectors_internals_ui.h" + #endif + +@@ -402,7 +402,7 @@ bool IsAboutUI(const GURL& url) { + #if !BUILDFLAG(IS_ANDROID) + || url.host_piece() == chrome::kChromeUITermsHost + #endif +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + || url.host_piece() == chrome::kChromeUILinuxProxyConfigHost + #endif + #if BUILDFLAG(IS_CHROMEOS_ASH) +@@ -663,7 +663,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we + if (url.host_piece() == chrome::kChromeUIMobileSetupHost) + return &NewWebUI<ash::cellular_setup::MobileSetupUI>; + #endif // BUILDFLAG(IS_CHROMEOS_ASH) +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + if (url.host_piece() == chrome::kChromeUIWebUIJsErrorHost) + return &NewWebUI<WebUIJsErrorUI>; + #endif +@@ -725,7 +725,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we + if (url.host_piece() == chrome::kChromeUINaClHost) + return &NewWebUI<NaClUI>; + #endif +-#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ ++#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ + defined(TOOLKIT_VIEWS)) || \ + defined(USE_AURA) + if (url.host_piece() == chrome::kChromeUITabModalConfirmDialogHost) +@@ -794,27 +794,27 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we + } + #endif + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ +- BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + if (url.host_piece() == chrome::kChromeUISandboxHost) { + return &NewWebUI<SandboxInternalsUI>; + } + #endif + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_ASH) ++ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + if (url.host_piece() == chrome::kChromeUIConnectorsInternalsHost) + return &NewWebUI<enterprise_connectors::ConnectorsInternalsUI>; + #endif + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + if (url.host_piece() == chrome::kChromeUIDiscardsHost) + return &NewWebUI<DiscardsUI>; + #endif +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (url.host_piece() == chrome::kChromeUIBrowserSwitchHost) + return &NewWebUI<BrowserSwitchUI>; + #endif + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + if (url.host_piece() == chrome::kChromeUIWebAppSettingsHost) + return &NewWebUI<WebAppSettingsUI>; + #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc new file mode 100644 index 000000000000..1ef21d90c51b --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc @@ -0,0 +1,29 @@ +--- src/3rdparty/chromium/chrome/browser/ui/webui/connectors_internals/device_trust_utils.cc.orig 2023-03-09 06:31:50 UTC ++++ src/3rdparty/chromium/chrome/browser/ui/webui/connectors_internals/device_trust_utils.cc +@@ -6,7 +6,7 @@ + + #include "build/build_config.h" + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + #include "base/base64url.h" + #include "chrome/browser/browser_process.h" + #include "chrome/browser/policy/chrome_browser_policy_connector.h" +@@ -24,7 +24,7 @@ namespace utils { + + namespace { + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + + connectors_internals::mojom::KeyTrustLevel ParseTrustLevel( + BPKUR::KeyTrustLevel trust_level) { +@@ -92,7 +92,7 @@ connectors_internals::mojom::Int32ValuePtr ToMojomValu + } // namespace + + connectors_internals::mojom::KeyInfoPtr GetKeyInfo() { +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + auto* key_manager = g_browser_process->browser_policy_connector() + ->chrome_browser_cloud_management_controller() + ->GetDeviceTrustKeyManager(); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_management_management__ui.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_management_management__ui.cc new file mode 100644 index 000000000000..c5e532d3d32b --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_management_management__ui.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/browser/ui/webui/management/management_ui.cc.orig 2023-03-09 06:31:50 UTC ++++ src/3rdparty/chromium/chrome/browser/ui/webui/management/management_ui.cc +@@ -92,7 +92,7 @@ content::WebUIDataSource* CreateAndAddManagementUIHtml + {kManagementOnFileTransferVisibleData, + IDS_MANAGEMENT_FILE_TRANSFER_VISIBLE_DATA}, + #endif // BUILDFLAG(IS_CHROMEOS) +-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + {kManagementScreenCaptureEvent, IDS_MANAGEMENT_SCREEN_CAPTURE_EVENT}, + {kManagementScreenCaptureData, IDS_MANAGEMENT_SCREEN_CAPTURE_DATA}, + #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_management_management__ui__handler.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_management_management__ui__handler.cc new file mode 100644 index 000000000000..084248a340c7 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_management_management__ui__handler.cc @@ -0,0 +1,53 @@ +--- src/3rdparty/chromium/chrome/browser/ui/webui/management/management_ui_handler.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/chrome/browser/ui/webui/management/management_ui_handler.cc +@@ -94,7 +94,7 @@ + #include "components/policy/core/common/cloud/user_cloud_policy_manager.h" + #endif // BUILDFLAG(IS_CHROMEOS_ASH) + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "chrome/browser/enterprise/signals/user_permission_service_factory.h" + #include "components/device_signals/core/browser/user_permission_service.h" // nogncheck + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +@@ -190,12 +190,12 @@ enum class ReportingType { + kLegacyTech, + }; + +-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + const char kManagementScreenCaptureEvent[] = "managementScreenCaptureEvent"; + const char kManagementScreenCaptureData[] = "managementScreenCaptureData"; + #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + const char kManagementDeviceSignalsDisclosure[] = + "managementDeviceSignalsDisclosure"; + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +@@ -773,7 +773,7 @@ void ManagementUIHandler::AddReportingInfo(base::Value + GetReportingTypeValue(report_definition.reporting_type)); + report_sources->Append(std::move(data)); + } +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Insert the device signals consent disclosure at the end of browser + // reporting section. + auto* user_permission_service = GetUserPermissionService(); +@@ -1061,7 +1061,7 @@ base::Value::Dict ManagementUIHandler::GetThreatProtec + kManagementOnPageVisitedVisibleData, &info); + } + +-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (capture_policy::IsGetAllScreensMediaAllowedForAnySite(profile)) { + AddThreatProtectionPermission(kManagementScreenCaptureEvent, + kManagementScreenCaptureData, &info); +@@ -1145,7 +1145,7 @@ policy::PolicyService* ManagementUIHandler::GetPolicyS + ->policy_service(); + } + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + device_signals::UserPermissionService* + ManagementUIHandler::GetUserPermissionService() { + return enterprise_signals::UserPermissionServiceFactory::GetForProfile( diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_management_management__ui__handler.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_management_management__ui__handler.h new file mode 100644 index 000000000000..fb7c7572967b --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_management_management__ui__handler.h @@ -0,0 +1,37 @@ +--- src/3rdparty/chromium/chrome/browser/ui/webui/management/management_ui_handler.h.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/chrome/browser/ui/webui/management/management_ui_handler.h +@@ -24,14 +24,14 @@ + #include "extensions/common/extension_id.h" + #include "url/gurl.h" + +-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Constants defining the IDs for the localized strings sent to the page as + // load time data. + extern const char kManagementScreenCaptureEvent[]; + extern const char kManagementScreenCaptureData[]; + #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + extern const char kManagementDeviceSignalsDisclosure[]; + #endif // #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + +@@ -117,7 +117,7 @@ class StatusCollector; + class SystemLogUploader; + } // namespace policy + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + namespace device_signals { + class UserPermissionService; + } // namespace device_signals +@@ -177,7 +177,7 @@ class ManagementUIHandler : public content::WebUIMessa + base::Value::List GetManagedWebsitesInfo(Profile* profile) const; + base::Value::List GetApplicationsInfo(Profile* profile) const; + virtual policy::PolicyService* GetPolicyService(); +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + virtual device_signals::UserPermissionService* GetUserPermissionService(); + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_ntp_app__launcher__handler.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_ntp_app__launcher__handler.cc new file mode 100644 index 000000000000..8bf838a52106 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_ntp_app__launcher__handler.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/browser/ui/webui/ntp/app_launcher_handler.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/chrome/browser/ui/webui/ntp/app_launcher_handler.cc +@@ -320,7 +320,7 @@ base::Value::Dict AppLauncherHandler::CreateExtensionI + bool is_deprecated_app = false; + auto* context = extension_service_->GetBrowserContext(); + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + is_deprecated_app = + extensions::IsExtensionUnsupportedDeprecatedApp(context, extension->id()); + #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_realbox_realbox__handler.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_realbox_realbox__handler.cc new file mode 100644 index 000000000000..286837de110d --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_realbox_realbox__handler.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/chrome/browser/ui/webui/realbox/realbox_handler.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/chrome/browser/ui/webui/realbox/realbox_handler.cc +@@ -146,7 +146,7 @@ constexpr char kMacShareIconResourceName[] = + #elif BUILDFLAG(IS_WIN) + constexpr char kWinShareIconResourceName[] = + "//resources/cr_components/omnibox/icons/win_share.svg"; +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + constexpr char kLinuxShareIconResourceName[] = + "//resources/cr_components/omnibox/icons/share.svg"; + #else +@@ -745,7 +745,7 @@ std::string RealboxHandler::PedalVectorIconToResourceN + icon.name == omnibox::kShareWinChromeRefreshIcon.name) { + return kWinShareIconResourceName; + } +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (icon.name == omnibox::kShareIcon.name || + icon.name == omnibox::kShareLinuxChromeRefreshIcon.name) { + return kLinuxShareIconResourceName; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_settings_appearance__handler.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_settings_appearance__handler.cc new file mode 100644 index 000000000000..17580c061f6b --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_settings_appearance__handler.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/browser/ui/webui/settings/appearance_handler.cc.orig 2022-10-24 13:33:33 UTC ++++ src/3rdparty/chromium/chrome/browser/ui/webui/settings/appearance_handler.cc +@@ -28,7 +28,7 @@ void AppearanceHandler::RegisterMessages() { + "useDefaultTheme", + base::BindRepeating(&AppearanceHandler::HandleUseTheme, + base::Unretained(this), ui::SystemTheme::kDefault)); +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + web_ui()->RegisterMessageCallback( + "useGtkTheme", + base::BindRepeating(&AppearanceHandler::HandleUseTheme, diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc new file mode 100644 index 000000000000..e93abe0efa2d --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc @@ -0,0 +1,65 @@ +--- src/3rdparty/chromium/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc +@@ -135,7 +135,7 @@ + #include "ash/webui/settings/public/constants/routes.mojom.h" + #endif + +-#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) ++#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) + #include "ui/display/screen.h" + #endif + +@@ -155,7 +155,7 @@ + #include "chrome/browser/ui/webui/certificate_manager_localized_strings_provider.h" + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "ui/linux/linux_ui_factory.h" + #include "ui/ozone/public/ozone_platform.h" + #endif +@@ -263,7 +263,7 @@ void AddCommonStrings(content::WebUIDataSource* html_s + base::FeatureList::IsEnabled( + supervised_user::kClearingCookiesKeepsSupervisedUsersSignedIn)); + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + bool allow_qt_theme = base::FeatureList::IsEnabled(ui::kAllowQt); + #else + bool allow_qt_theme = false; +@@ -294,7 +294,7 @@ void AddA11yStrings(content::WebUIDataSource* html_sou + {"focusHighlightLabel", + IDS_SETTINGS_ACCESSIBILITY_FOCUS_HIGHLIGHT_DESCRIPTION}, + #endif +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + {"overscrollHistoryNavigationTitle", + IDS_SETTINGS_OVERSCROLL_HISTORY_NAVIGATION_TITLE}, + {"overscrollHistoryNavigationSubtitle", +@@ -433,7 +433,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht + {"huge", IDS_SETTINGS_HUGE_FONT_SIZE}, + {"sidePanelAlignLeft", IDS_SETTINGS_SIDE_PANEL_ALIGN_LEFT}, + {"sidePanelAlignRight", IDS_SETTINGS_SIDE_PANEL_ALIGN_RIGHT}, +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + {"gtkTheme", IDS_SETTINGS_GTK_THEME}, + {"useGtkTheme", IDS_SETTINGS_USE_GTK_THEME}, + {"qtTheme", IDS_SETTINGS_QT_THEME}, +@@ -443,7 +443,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht + #else + {"resetToDefaultTheme", IDS_SETTINGS_RESET_TO_DEFAULT_THEME}, + #endif +-#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) ++#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) + {"showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS}, + #endif + #if BUILDFLAG(IS_MAC) +@@ -468,7 +468,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht + + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) ++#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) + bool show_custom_chrome_frame = ui::OzonePlatform::GetInstance() + ->GetPlatformRuntimeProperties() + .supports_server_side_window_decorations; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_channel__info.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_channel__info.h new file mode 100644 index 000000000000..2c5c06693e34 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_channel__info.h @@ -0,0 +1,18 @@ +--- src/3rdparty/chromium/chrome/common/channel_info.h.orig 2023-04-28 17:01:32 UTC ++++ src/3rdparty/chromium/chrome/common/channel_info.h +@@ -104,13 +104,13 @@ void ClearChannelForTesting(); + std::string GetChannelSuffixForDataDir(); + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + std::string GetChannelSuffixForExtraFlagsEnvVarName(); + #endif + + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + // Returns the channel-specific filename of the desktop shortcut used to launch + // the browser. + std::string GetDesktopName(base::Environment* env); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_channel__info__posix.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_channel__info__posix.cc new file mode 100644 index 000000000000..e0d82654c4e1 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_channel__info__posix.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/chrome/common/channel_info_posix.cc.orig 2023-04-28 17:01:32 UTC ++++ src/3rdparty/chromium/chrome/common/channel_info_posix.cc +@@ -92,7 +92,7 @@ std::string GetChannelSuffixForDataDir() { + } + } + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + std::string GetChannelSuffixForExtraFlagsEnvVarName() { + #if BUILDFLAG(GOOGLE_CHROME_BRANDING) + const auto channel_state = GetChannelImpl(); +@@ -118,7 +118,7 @@ std::string GetChannelSuffixForExtraFlagsEnvVarName() + + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + std::string GetDesktopName(base::Environment* env) { + #if BUILDFLAG(GOOGLE_CHROME_BRANDING) + // Google Chrome packaged as a snap is a special case: the application name diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__features.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__features.cc new file mode 100644 index 000000000000..18a04c2ad7dd --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__features.cc @@ -0,0 +1,83 @@ +--- src/3rdparty/chromium/chrome/common/chrome_features.cc.orig 2024-01-23 10:07:29 UTC ++++ src/3rdparty/chromium/chrome/common/chrome_features.cc +@@ -74,7 +74,7 @@ BASE_FEATURE(kAppShimNotificationAttribution, + + // Enables the built-in DNS resolver. + #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || \ +- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + BASE_FEATURE(kAsyncDns, + "AsyncDns", + base::FEATURE_ENABLED_BY_DEFAULT +@@ -87,7 +87,7 @@ BASE_FEATURE(kAsyncDns, + #endif + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + // Enables or disables the Autofill survey triggered by opening a prompt to + // save address info. + BASE_FEATURE(kAutofillAddressSurvey, +@@ -105,7 +105,7 @@ BASE_FEATURE(kAutofillPasswordSurvey, + base::FEATURE_DISABLED_BY_DEFAULT); + #endif + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // Enables the Restart background mode optimization. When all Chrome UI is + // closed and it goes in the background, allows to restart the browser to + // discard memory. +@@ -301,7 +301,7 @@ BASE_FEATURE(kDesktopPWAsEnforceWebAppSettingsPolicy, + base::FEATURE_ENABLED_BY_DEFAULT); + + // Enables or disables Desktop PWAs to be auto-started on OS login. +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + BASE_FEATURE(kDesktopPWAsRunOnOsLogin, + "DesktopPWAsRunOnOsLogin", + base::FEATURE_ENABLED_BY_DEFAULT +@@ -335,7 +335,7 @@ BASE_FEATURE(kDesktopPWAsWebBundles, + base::FEATURE_DISABLED_BY_DEFAULT); + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + // Controls whether Chrome Apps are supported. See https://crbug.com/1221251. + // If the feature is disabled, Chrome Apps continue to work. If enabled, Chrome + // Apps will not launch and will be marked in the UI as deprecated. +@@ -366,7 +366,7 @@ BASE_FEATURE(kDisruptiveNotificationPermissionRevocati + + // Enable DNS over HTTPS (DoH). + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) ++ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + BASE_FEATURE(kDnsOverHttps, + "DnsOverHttps", + base::FEATURE_ENABLED_BY_DEFAULT +@@ -387,7 +387,7 @@ const base::FeatureParam<bool> kDnsOverHttpsShowUiPara + const base::FeatureParam<bool> kDnsOverHttpsShowUiParam { + &kDnsOverHttps, "ShowUi", + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) ++ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + true + #else + false +@@ -875,7 +875,7 @@ BASE_FEATURE(kKAnonymityServiceStorage, + "KAnonymityServiceStorage", + base::FEATURE_ENABLED_BY_DEFAULT); + +-#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) ++#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) + BASE_FEATURE(kLinuxLowMemoryMonitor, + "LinuxLowMemoryMonitor", + base::FEATURE_DISABLED_BY_DEFAULT); +@@ -888,7 +888,7 @@ constexpr base::FeatureParam<int> kLinuxLowMemoryMonit + &kLinuxLowMemoryMonitor, "critical_level", 255}; + #endif // BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + BASE_FEATURE(kListWebAppsSwitch, + "ListWebAppsSwitch", + base::FEATURE_DISABLED_BY_DEFAULT); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__features.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__features.h new file mode 100644 index 000000000000..033e2af8b846 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__features.h @@ -0,0 +1,45 @@ +--- src/3rdparty/chromium/chrome/common/chrome_features.h.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/chrome/common/chrome_features.h +@@ -61,13 +61,13 @@ BASE_DECLARE_FEATURE(kAppShimNotificationAttribution); + COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAsyncDns); + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAutofillAddressSurvey); + COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAutofillCardSurvey); + COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAutofillPasswordSurvey); + #endif + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + COMPONENT_EXPORT(CHROME_FEATURES) + BASE_DECLARE_FEATURE(kBackgroundModeAllowRestart); + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +@@ -201,7 +201,7 @@ BASE_DECLARE_FEATURE(kDesktopPWAsTabStripSettings); + COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kDesktopPWAsWebBundles); + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kChromeAppsDeprecation); + COMPONENT_EXPORT(CHROME_FEATURES) + BASE_DECLARE_FEATURE(kKeepForceInstalledPreinstalledApps); +@@ -499,7 +499,7 @@ BASE_DECLARE_FEATURE(kKAnonymityServiceOHTTPRequests); + COMPONENT_EXPORT(CHROME_FEATURES) + BASE_DECLARE_FEATURE(kKAnonymityServiceStorage); + +-#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) ++#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) + COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kLinuxLowMemoryMonitor); + COMPONENT_EXPORT(CHROME_FEATURES) + extern const base::FeatureParam<int> kLinuxLowMemoryMonitorModerateLevel; +@@ -507,7 +507,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) + extern const base::FeatureParam<int> kLinuxLowMemoryMonitorCriticalLevel; + #endif // BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kListWebAppsSwitch); + #endif + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths.cc new file mode 100644 index 000000000000..5ea4fc7401a8 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths.cc @@ -0,0 +1,84 @@ +--- src/3rdparty/chromium/chrome/common/chrome_paths.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/chrome/common/chrome_paths.cc +@@ -30,7 +30,7 @@ + #include "base/apple/foundation_util.h" + #endif + +-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_OPENBSD) ++#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) + #include "components/policy/core/common/policy_paths.h" + #endif + +@@ -49,14 +49,14 @@ + + namespace { + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // The path to the external extension <id>.json files. + // /usr/share seems like a good choice, see: http://www.pathname.com/fhs/ + const base::FilePath::CharType kFilepathSinglePrefExtensions[] = + #if BUILDFLAG(GOOGLE_CHROME_BRANDING) +- FILE_PATH_LITERAL("/usr/share/google-chrome/extensions"); ++ FILE_PATH_LITERAL("/usr/local/share/chromium/extensions"); + #else +- FILE_PATH_LITERAL("/usr/share/chromium/extensions"); ++ FILE_PATH_LITERAL("/usr/local/share/chromium/extensions"); + #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) + + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +@@ -211,7 +211,7 @@ bool PathProvider(int key, base::FilePath* result) { + } + break; + case chrome::DIR_DEFAULT_DOWNLOADS_SAFE: +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + if (!GetUserDownloadsDirectorySafe(&cur)) { + return false; + } +@@ -504,7 +504,7 @@ bool PathProvider(int key, base::FilePath* result) { + return false; + } + break; +-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_OPENBSD) ++#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) + case chrome::DIR_POLICY_FILES: { + cur = base::FilePath(policy::kPolicyPath); + break; +@@ -515,7 +515,7 @@ bool PathProvider(int key, base::FilePath* result) { + #if BUILDFLAG(IS_CHROMEOS_ASH) || \ + ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \ + BUILDFLAG(CHROMIUM_BRANDING)) || \ +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + case chrome::DIR_USER_EXTERNAL_EXTENSIONS: { + if (!base::PathService::Get(chrome::DIR_USER_DATA, &cur)) { + return false; +@@ -524,7 +524,7 @@ bool PathProvider(int key, base::FilePath* result) { + break; + } + #endif +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + case chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS: { + cur = base::FilePath(kFilepathSinglePrefExtensions); + break; +@@ -571,7 +571,7 @@ bool PathProvider(int key, base::FilePath* result) { + break; + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + case chrome::DIR_NATIVE_MESSAGING: + #if BUILDFLAG(IS_MAC) + #if BUILDFLAG(GOOGLE_CHROME_BRANDING) +@@ -585,6 +585,9 @@ bool PathProvider(int key, base::FilePath* result) { + #if BUILDFLAG(GOOGLE_CHROME_BRANDING) + cur = base::FilePath( + FILE_PATH_LITERAL("/etc/opt/chrome/native-messaging-hosts")); ++#elif BUILDFLAG(IS_FREEBSD) ++ cur = base::FilePath(FILE_PATH_LITERAL( ++ "/usr/local/etc/chromium/native-messaging-hosts")); + #else + cur = base::FilePath( + FILE_PATH_LITERAL("/etc/chromium/native-messaging-hosts")); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths.h new file mode 100644 index 000000000000..7a1e8b1854d5 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths.h @@ -0,0 +1,29 @@ +--- src/3rdparty/chromium/chrome/common/chrome_paths.h.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/chrome/common/chrome_paths.h +@@ -57,7 +57,7 @@ enum { + #if BUILDFLAG(IS_CHROMEOS_ASH) || \ + ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \ + BUILDFLAG(CHROMIUM_BRANDING)) || \ +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + DIR_USER_EXTERNAL_EXTENSIONS, // Directory for per-user external extensions + // on Chrome Mac and Chromium Linux. + // On Chrome OS, this path is used for OEM +@@ -65,7 +65,7 @@ enum { + // create it. + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + DIR_STANDALONE_EXTERNAL_EXTENSIONS, // Directory for 'per-extension' + // definition manifest files that + // describe extensions which are to be +@@ -123,7 +123,7 @@ enum { + // must be cleared on device reboot. + + #endif +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + DIR_NATIVE_MESSAGING, // System directory where native messaging host + // manifest files are stored. + DIR_USER_NATIVE_MESSAGING, // Directory with Native Messaging Hosts diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths__internal.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths__internal.h new file mode 100644 index 000000000000..ef783e50e09d --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths__internal.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/common/chrome_paths_internal.h.orig 2023-05-31 08:12:17 UTC ++++ src/3rdparty/chromium/chrome/common/chrome_paths_internal.h +@@ -43,7 +43,7 @@ void GetUserCacheDirectory(const base::FilePath& profi + // Get the path to the user's documents directory. + bool GetUserDocumentsDirectory(base::FilePath* result); + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // Gets the path to a safe default download directory for a user. + bool GetUserDownloadsDirectorySafe(base::FilePath* result); + #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__switches.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__switches.cc new file mode 100644 index 000000000000..a75007a16709 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__switches.cc @@ -0,0 +1,19 @@ +--- src/3rdparty/chromium/chrome/common/chrome_switches.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/chrome/common/chrome_switches.cc +@@ -849,14 +849,14 @@ const char kAllowNaClSocketAPI[] = "allow-nacl-socket- + #endif + + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + const char kEnableNewAppMenuIcon[] = "enable-new-app-menu-icon"; + + // Causes the browser to launch directly in guest mode. + const char kGuest[] = "guest"; + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + // Writes open and installed web apps for each profile to the specified file + // without launching a new browser window or tab. Pass a absolute file path to + // specify where to output the information. Can be used together with optional diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__switches.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__switches.h new file mode 100644 index 000000000000..409d50bc04d6 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__switches.h @@ -0,0 +1,17 @@ +--- src/3rdparty/chromium/chrome/common/chrome_switches.h.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/chrome/common/chrome_switches.h +@@ -269,12 +269,12 @@ extern const char kAllowNaClSocketAPI[]; + #endif + + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + extern const char kEnableNewAppMenuIcon[]; + extern const char kGuest[]; + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + extern const char kListApps[]; + extern const char kProfileBaseName[]; + extern const char kProfileManagementAttributes[]; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_extensions_permissions_chrome__permission__message__rules.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_extensions_permissions_chrome__permission__message__rules.cc new file mode 100644 index 000000000000..495166345ead --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_extensions_permissions_chrome__permission__message__rules.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/common/extensions/permissions/chrome_permission_message_rules.cc.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/chrome/common/extensions/permissions/chrome_permission_message_rules.cc +@@ -287,7 +287,7 @@ int GetEnterpriseReportingPrivatePermissionMessageId() + #endif + #if BUILDFLAG(IS_WIN) + return IDS_EXTENSION_PROMPT_WARNING_ENTERPRISE_REPORTING_PRIVATE_ENABLED_WIN; +-#elif BUILDFLAG(IS_LINUX) or BUILDFLAG(IS_MAC) ++#elif BUILDFLAG(IS_LINUX) or BUILDFLAG(IS_MAC) or BUILDFLAG(IS_BSD) + return IDS_EXTENSION_PROMPT_WARNING_ENTERPRISE_REPORTING_PRIVATE_ENABLED_LINUX_AND_MACOS; + #else + return IDS_EXTENSION_PROMPT_WARNING_ENTERPRISE_REPORTING_PRIVATE; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_media_cdm__host__file__path.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_media_cdm__host__file__path.cc new file mode 100644 index 000000000000..1ae38d605706 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_media_cdm__host__file__path.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/common/media/cdm_host_file_path.cc.orig 2023-02-08 09:03:45 UTC ++++ src/3rdparty/chromium/chrome/common/media/cdm_host_file_path.cc +@@ -90,7 +90,7 @@ void AddCdmHostFilePaths( + cdm_host_file_paths->emplace_back(chrome_framework_path, + chrome_framework_sig_path); + +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + + base::FilePath chrome_exe_dir; + if (!base::PathService::Get(base::DIR_EXE, &chrome_exe_dir)) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_media_cdm__registration.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_media_cdm__registration.cc new file mode 100644 index 000000000000..e6eee8f508c5 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_media_cdm__registration.cc @@ -0,0 +1,52 @@ +--- src/3rdparty/chromium/chrome/common/media/cdm_registration.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/chrome/common/media/cdm_registration.cc +@@ -25,11 +25,11 @@ + + #if BUILDFLAG(ENABLE_WIDEVINE) + #include "third_party/widevine/cdm/widevine_cdm_common.h" // nogncheck +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #include "base/native_library.h" + #include "chrome/common/chrome_paths.h" + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "base/no_destructor.h" + #include "chrome/common/media/component_widevine_cdm_hint_file_linux.h" + #include "components/cdm/common/cdm_manifest.h" +@@ -56,7 +56,7 @@ using Robustness = content::CdmInfo::Robustness; + #if BUILDFLAG(ENABLE_WIDEVINE) + #if (BUILDFLAG(BUNDLE_WIDEVINE_CDM) || \ + BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT)) && \ +- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) ++ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) + // Create a CdmInfo for a Widevine CDM, using |version|, |cdm_library_path|, and + // |capability|. + std::unique_ptr<content::CdmInfo> CreateWidevineCdmInfo( +@@ -101,7 +101,7 @@ std::unique_ptr<content::CdmInfo> CreateCdmInfoFromWid + // BUILDFLAG(IS_CHROMEOS)) + + #if BUILDFLAG(BUNDLE_WIDEVINE_CDM) && \ +- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) ++ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) + // On Linux/ChromeOS we have to preload the CDM since it uses the zygote + // sandbox. On Windows and Mac, the bundled CDM is handled by the component + // updater. +@@ -125,7 +125,7 @@ content::CdmInfo* GetBundledWidevine() { + // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) + + #if BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT) && \ +- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) ++ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) + // This code checks to see if a component updated Widevine CDM can be found. If + // there is one and it looks valid, return the CdmInfo for that CDM. Otherwise + // return nullptr. +@@ -160,7 +160,7 @@ void AddSoftwareSecureWidevine(std::vector<content::Cd + /*supports_sub_key_systems=*/false, kWidevineCdmDisplayName, + kWidevineCdmType, base::Version(), base::FilePath()); + +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #if defined(WIDEVINE_CDM_MIN_GLIBC_VERSION) + base::Version glibc_version(gnu_get_libc_version()); + DCHECK(glibc_version.IsValid()); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_media_component__widevine__cdm__hint__file__linux.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_media_component__widevine__cdm__hint__file__linux.h new file mode 100644 index 000000000000..c5be9ae3d7d6 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_media_component__widevine__cdm__hint__file__linux.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/common/media/component_widevine_cdm_hint_file_linux.h.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/chrome/common/media/component_widevine_cdm_hint_file_linux.h +@@ -15,7 +15,7 @@ + + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) ++#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) + #error "This file only applies to desktop Linux and ChromeOS." + #endif + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_pref__names.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_pref__names.h new file mode 100644 index 000000000000..b83fa0c4e311 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_pref__names.h @@ -0,0 +1,82 @@ +--- src/3rdparty/chromium/chrome/common/pref_names.h.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/chrome/common/pref_names.h +@@ -1316,7 +1316,7 @@ inline constexpr char kUseAshProxy[] = "lacros.proxy.u + + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + // Linux specific preference on whether we should match the system theme. + inline constexpr char kSystemTheme[] = "extensions.theme.system_theme"; + #endif +@@ -1442,7 +1442,7 @@ inline constexpr char kShowUpdatePromotionInfoBar[] = + "browser.show_update_promotion_info_bar"; + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Boolean that is false if we should show window manager decorations. If + // true, we draw a custom chrome frame (thicker title bar and blue border). + inline constexpr char kUseCustomChromeFrame[] = "browser.custom_chrome_frame"; +@@ -1986,7 +1986,7 @@ inline constexpr char kDownloadLastCompleteTime[] = + "download.last_complete_time"; + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + inline constexpr char kOpenPdfDownloadInSystemReader[] = + "download.open_pdf_in_system_reader"; + #endif +@@ -2392,14 +2392,14 @@ inline constexpr char kMediaStorageIdSalt[] = "media.s + inline constexpr char kMediaCdmOriginData[] = "media.cdm.origin_data"; + #endif // BUILDFLAG(IS_WIN) + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // A boolean pref to determine whether or not the network service is running + // sandboxed. + inline constexpr char kNetworkServiceSandboxEnabled[] = + "net.network_service_sandbox"; + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Records whether the user has seen an HTTP auth "negotiate" header. + inline constexpr char kReceivedHttpAuthNegotiateHeader[] = + "net.received_http_auth_negotiate_headers"; +@@ -2477,7 +2477,7 @@ inline constexpr char kAmbientAuthenticationInPrivateM + inline constexpr char kBasicAuthOverHttpEnabled[] = + "auth.basic_over_http_enabled"; + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // Boolean that specifies whether OK-AS-DELEGATE flag from KDC is respected + // along with kAuthNegotiateDelegateAllowlist. + inline constexpr char kAuthNegotiateDelegateByKdcPolicy[] = +@@ -3551,7 +3551,7 @@ inline constexpr char kFileOrDirectoryPickerWithoutGes + inline constexpr char kSandboxExternalProtocolBlocked[] = + "profile.sandbox_external_protocol_blocked"; + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Boolean that indicates if system notifications are allowed to be used in + // place of Chrome notifications. + inline constexpr char kAllowSystemNotifications[] = +@@ -3607,7 +3607,7 @@ inline constexpr char kCACertificateManagementAllowed[ + inline constexpr char kChromeRootStoreEnabled[] = "chrome_root_store_enabled"; + #endif + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + inline constexpr char kEnforceLocalAnchorConstraintsEnabled[] = + "enforce_local_anchor_constraints_enabled"; + #endif +@@ -3921,7 +3921,7 @@ inline constexpr char kThrottleNonVisibleCrossOriginIf + inline constexpr char kNewBaseUrlInheritanceBehaviorAllowed[] = + "new_base_url_inheritance_behavior_allowed"; + +-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // If this exists and is true, Chrome may run system DNS resolution out of the + // network process. If false, Chrome will run system DNS resolution in the + // network process. If non-existent, Chrome will decide where to run system DNS diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_url__constants.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_url__constants.cc new file mode 100644 index 000000000000..4e4c4256a7c0 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_url__constants.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/common/url_constants.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/chrome/common/url_constants.cc +@@ -560,7 +560,7 @@ const char kPhoneHubPermissionLearnMoreURL[] = + "https://support.google.com/chromebook/?p=multidevice"; + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + const char kChromeAppsDeprecationLearnMoreURL[] = + "https://support.google.com/chrome/?p=chrome_app_deprecation"; + #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_url__constants.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_url__constants.h new file mode 100644 index 000000000000..f6a5d2a1b0dd --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_url__constants.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/common/url_constants.h.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/chrome/common/url_constants.h +@@ -537,7 +537,7 @@ extern const char kOutdatedPluginLearnMoreURL[]; + extern const char kPhoneHubPermissionLearnMoreURL[]; + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + + // "Learn more" URL for the chrome apps deprecation dialog. + extern const char kChromeAppsDeprecationLearnMoreURL[]; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_webui__url__constants.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_webui__url__constants.cc index d77fe97d96d2..b6a7bd6460f4 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_webui__url__constants.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_webui__url__constants.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/chrome/common/webui_url_constants.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/chrome/common/webui_url_constants.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/chrome/common/webui_url_constants.cc -@@ -514,18 +514,18 @@ const char kOsUIVersionURL[] = "os://version"; +@@ -503,18 +503,18 @@ const char kOsUIVersionURL[] = "os://version"; const char kOsUIVersionURL[] = "os://version"; #endif @@ -22,7 +22,7 @@ const char kChromeUIDiscardsHost[] = "discards"; const char kChromeUIDiscardsURL[] = "chrome://discards/"; #endif -@@ -540,14 +540,14 @@ const char kChromeUILinuxProxyConfigHost[] = "linux-pr +@@ -529,14 +529,14 @@ const char kChromeUILinuxProxyConfigHost[] = "linux-pr #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ @@ -39,7 +39,7 @@ const char kChromeUIBrowserSwitchHost[] = "browser-switch"; const char kChromeUIBrowserSwitchURL[] = "chrome://browser-switch/"; const char kChromeUIEnterpriseProfileWelcomeHost[] = -@@ -564,7 +564,7 @@ const char kChromeUIProfilePickerStartupQuery[] = "sta +@@ -555,7 +555,7 @@ const char kChromeUIProfilePickerStartupQuery[] = "sta const char kChromeUIProfilePickerStartupQuery[] = "startup"; #endif @@ -48,7 +48,7 @@ defined(TOOLKIT_VIEWS)) || \ defined(USE_AURA) const char kChromeUITabModalConfirmDialogHost[] = "tab-modal-confirm-dialog"; -@@ -644,7 +644,7 @@ const char kPrivacySandboxSubPagePath[] = "/privacySan +@@ -637,7 +637,7 @@ const char kPrivacySandboxSubPagePath[] = "/privacySan #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ @@ -57,7 +57,7 @@ const char kChromeUIWebAppSettingsURL[] = "chrome://app-settings/"; const char kChromeUIWebAppSettingsHost[] = "app-settings"; #endif -@@ -880,7 +880,7 @@ const char* const kChromeDebugURLs[] = { +@@ -888,7 +888,7 @@ const char* const kChromeDebugURLs[] = { blink::kChromeUIGpuJavaCrashURL, kChromeUIJavaCrashURL, #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_webui__url__constants.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_webui__url__constants.h index 595b89b1194f..0d4b951f5af2 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_webui__url__constants.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_common_webui__url__constants.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/chrome/common/webui_url_constants.h.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/chrome/common/webui_url_constants.h.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/chrome/common/webui_url_constants.h -@@ -433,24 +433,24 @@ extern const char kOsUIVersionURL[]; +@@ -420,24 +420,24 @@ extern const char kOsUIVersionURL[]; extern const char kOsUIVersionURL[]; #endif @@ -29,7 +29,7 @@ extern const char kChromeUIWebAppSettingsURL[]; extern const char kChromeUIWebAppSettingsHost[]; #endif -@@ -465,14 +465,14 @@ extern const char kChromeUILinuxProxyConfigHost[]; +@@ -452,7 +452,7 @@ extern const char kChromeUILinuxProxyConfigHost[]; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ @@ -38,15 +38,16 @@ extern const char kChromeUISandboxHost[]; #endif +@@ -464,7 +464,7 @@ extern const char kChromeUISearchEngineChoiceHost[]; // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) -+ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) ++ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) extern const char kChromeUIBrowserSwitchHost[]; extern const char kChromeUIBrowserSwitchURL[]; extern const char kChromeUIEnterpriseProfileWelcomeHost[]; -@@ -486,7 +486,7 @@ extern const char kChromeUIProfilePickerStartupQuery[] +@@ -480,7 +480,7 @@ extern const char kChromeUIProfilePickerStartupQuery[] extern const char kChromeUIProfilePickerStartupQuery[]; #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_renderer_chrome__render__frame__observer.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_renderer_chrome__render__frame__observer.cc new file mode 100644 index 000000000000..92600c40052b --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_renderer_chrome__render__frame__observer.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/renderer/chrome_render_frame_observer.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/chrome/renderer/chrome_render_frame_observer.cc +@@ -349,7 +349,7 @@ void ChromeRenderFrameObserver::OnDestruct() { + + void ChromeRenderFrameObserver::DraggableRegionsChanged() { + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // Only the main frame is allowed to control draggable regions, to avoid other + // frames manipulate the regions in the browser process. + if (!render_frame()->IsMainFrame()) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_test_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_test_BUILD.gn new file mode 100644 index 000000000000..67fbfe0dbd94 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_test_BUILD.gn @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/test/BUILD.gn.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/chrome/test/BUILD.gn +@@ -11028,7 +11028,7 @@ test("chrome_app_unittests") { + "//components/heap_profiling/in_process", + "//components/safe_browsing:buildflags", + ] +- if (!is_fuchsia && !is_mac) { ++ if (!is_fuchsia && !is_mac && !is_bsd) { + deps += [ "//third_party/breakpad:client" ] + } + if (is_android) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_test_chromedriver_chrome__launcher.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_test_chromedriver_chrome__launcher.cc new file mode 100644 index 000000000000..3445ef9a0d31 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_test_chromedriver_chrome__launcher.cc @@ -0,0 +1,10 @@ +--- src/3rdparty/chromium/chrome/test/chromedriver/chrome_launcher.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/chrome/test/chromedriver/chrome_launcher.cc +@@ -69,6 +69,7 @@ + #include <fcntl.h> + #include <sys/stat.h> + #include <sys/types.h> ++#include <sys/wait.h> + #include <unistd.h> + #elif BUILDFLAG(IS_WIN) + #include <windows.h> diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_test_chromedriver_chrome_chrome__finder.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_test_chromedriver_chrome_chrome__finder.cc new file mode 100644 index 000000000000..0bdc905691f4 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_chrome_test_chromedriver_chrome_chrome__finder.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/chrome/test/chromedriver/chrome/chrome_finder.cc.orig 2023-08-04 12:03:57 UTC ++++ src/3rdparty/chromium/chrome/test/chromedriver/chrome/chrome_finder.cc +@@ -57,7 +57,7 @@ void GetApplicationDirs(std::vector<base::FilePath>* l + installation_locations[i].Append(L"Chromium\\Application")); + } + } +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + void GetApplicationDirs(std::vector<base::FilePath>* locations) { + // TODO: Respect users' PATH variables. + // Until then, we use an approximation of the most common defaults. +@@ -157,7 +157,7 @@ bool FindChrome(base::FilePath* browser_exe) { + base::FilePath(chrome::kGoogleChromeForTestingBrowserProcessExecutablePath), + base::FilePath(chrome::kGoogleChromeBrowserProcessExecutablePath), + base::FilePath(chrome::kChromiumBrowserProcessExecutablePath), +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + base::FilePath(chrome::kBrowserProcessExecutablePath), + base::FilePath("chrome"), // Chrome for Testing or Google Chrome + base::FilePath("google-chrome"), diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_autofill__payments__strings.grdp b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_autofill__payments__strings.grdp index 2b6ae7227567..1e0b53511ea1 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_autofill__payments__strings.grdp +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_autofill__payments__strings.grdp @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/components/autofill_payments_strings.grdp.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/components/autofill_payments_strings.grdp.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/components/autofill_payments_strings.grdp -@@ -118,7 +118,7 @@ +@@ -130,7 +130,7 @@ <message name="IDS_AUTOFILL_FIX_FLOW_PROMPT_SAVE_CARD_LABEL" desc="Text to show on the button to save the card to Google when the fix flow dialog is shown after the Autofill save card prompt." formatter_data="android_java"> Save card </message> diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_autofill_core_browser_contact__info__sync__util.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_autofill_core_browser_contact__info__sync__util.cc new file mode 100644 index 000000000000..b80b75fc5ee4 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_autofill_core_browser_contact__info__sync__util.cc @@ -0,0 +1,18 @@ +--- src/3rdparty/chromium/components/autofill/core/browser/contact_info_sync_util.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/components/autofill/core/browser/contact_info_sync_util.cc +@@ -174,9 +174,15 @@ class ContactInfoProfileSetter { + CHECK(observations.empty()); + for (const sync_pb::ContactInfoSpecifics::Observation& proto_observation : + proto_observations) { ++#if defined(__clang__) && (__clang_major__ >= 15) + observations.emplace_back(proto_observation.type(), + ProfileTokenQuality::FormSignatureHash( + proto_observation.form_hash())); ++#else ++ observations.emplace_back() = { static_cast<unsigned char>(proto_observation.type()), ++ ProfileTokenQuality::FormSignatureHash( ++ proto_observation.form_hash()) }; ++#endif + } + } + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_autofill_core_browser_personal__data__manager.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_autofill_core_browser_personal__data__manager.cc index 2b1ac7181e5a..69dc752cebd1 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_autofill_core_browser_personal__data__manager.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_autofill_core_browser_personal__data__manager.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/components/autofill/core/browser/personal_data_manager.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/components/autofill/core/browser/personal_data_manager.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/components/autofill/core/browser/personal_data_manager.cc -@@ -2253,7 +2253,8 @@ bool PersonalDataManager::ShouldShowCardsFromAccountOp +@@ -2492,7 +2492,8 @@ bool PersonalDataManager::ShouldShowCardsFromAccountOp // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ @@ -9,4 +9,4 @@ + BUILDFLAG(IS_BSD) // This option should only be shown for users that have not enabled the Sync // Feature and that have server credit cards available. - if (!sync_service_ || sync_service_->IsSyncFeatureEnabled() || + // TODO(crbug.com/1462552): Simplify once ConsentLevel::kSync and diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_autofill_core_browser_webdata_autofill__sync__bridge__util.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_autofill_core_browser_webdata_autofill__sync__bridge__util.cc new file mode 100644 index 000000000000..8e4f33f7ee9e --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_autofill_core_browser_webdata_autofill__sync__bridge__util.cc @@ -0,0 +1,22 @@ +--- src/3rdparty/chromium/components/autofill/core/browser/webdata/autofill_sync_bridge_util.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/components/autofill/core/browser/webdata/autofill_sync_bridge_util.cc +@@ -553,11 +553,19 @@ ServerCvc AutofillWalletCvcStructDataFromWalletCredent + base::StringToInt64(wallet_credential_specifics.instrument_id(), + &instrument_id); + ++#if defined(__clang__) && (__clang_major__ >= 15) + return ServerCvc( + instrument_id, base::UTF8ToUTF16(wallet_credential_specifics.cvc()), + base::Time::UnixEpoch() + + base::Milliseconds(wallet_credential_specifics + .last_updated_time_unix_epoch_millis())); ++#else ++ return ServerCvc( { ++ instrument_id, base::UTF8ToUTF16(wallet_credential_specifics.cvc()), ++ base::Time::UnixEpoch() + ++ base::Milliseconds(wallet_credential_specifics ++ .last_updated_time_unix_epoch_millis()) }); ++#endif + } + + VirtualCardUsageData VirtualCardUsageDataFromUsageSpecifics( diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_autofill_core_common_autofill__payments__features.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_autofill_core_common_autofill__payments__features.cc index 175dce1c3881..a9efef1f1241 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_autofill_core_common_autofill__payments__features.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_autofill_core_common_autofill__payments__features.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/components/autofill/core/common/autofill_payments_features.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/components/autofill/core/common/autofill_payments_features.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/components/autofill/core/common/autofill_payments_features.cc -@@ -270,7 +270,7 @@ const base::FeatureParam<int> +@@ -281,7 +281,7 @@ BASE_FEATURE(kEnablePixPayments, bool ShouldShowImprovedUserConsentForCreditCardSave() { // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_autofill_core_common_autofill__util.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_autofill_core_common_autofill__util.cc index 45ed3e6c7a57..3050c1af8432 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_autofill_core_common_autofill__util.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_autofill_core_common_autofill__util.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/components/autofill/core/common/autofill_util.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/components/autofill/core/common/autofill_util.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/components/autofill/core/common/autofill_util.cc -@@ -156,7 +156,7 @@ bool SanitizedFieldIsEmpty(const std::u16string& value +@@ -153,7 +153,7 @@ bool SanitizedFieldIsEmpty(const std::u16string& value bool ShouldAutoselectFirstSuggestionOnArrowDown() { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_commerce__strings.grdp b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_commerce__strings.grdp new file mode 100644 index 000000000000..c2c2bfd11d9c --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_commerce__strings.grdp @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/commerce_strings.grdp.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/components/commerce_strings.grdp +@@ -292,7 +292,7 @@ + <message name="IDS_PRICE_HISTORY_DESCRIPTION" desc="The description of the Price History section in the Shopping Insights side panel explaining how the prices are gathered."> + Typical prices are based on stores across the web over the past 90 days. + </message> +- <if expr="is_win or is_linux"> ++ <if expr="is_win or is_posix"> + <then> + <message name="IDS_PRICE_HISTORY_GRAPH_ACCESSIBILITY" desc="Accessibility string for the price history graph indicating how users can review the price changes on the graph."> + Browse mode, you can change to Forms mode to use the left/right arrow to review price changes on the graph diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_components__chromium__strings.grd b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_components__chromium__strings.grd index 33e63f90895e..e9a83b5cca65 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_components__chromium__strings.grd +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_components__chromium__strings.grd @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/components/components_chromium_strings.grd.orig 2023-02-08 09:03:45 UTC +--- src/3rdparty/chromium/components/components_chromium_strings.grd.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/components/components_chromium_strings.grd -@@ -220,7 +220,7 @@ +@@ -226,7 +226,7 @@ </message> </if> <!-- The ChromeOS version of this string is defined in //components/error_page_strings.grdp. --> diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_components__google__chrome__strings.grd b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_components__google__chrome__strings.grd index d3c31feb7f34..9e9e4e219df3 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_components__google__chrome__strings.grd +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_components__google__chrome__strings.grd @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/components/components_google_chrome_strings.grd.orig 2023-02-08 09:03:45 UTC +--- src/3rdparty/chromium/components/components_google_chrome_strings.grd.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/components/components_google_chrome_strings.grd -@@ -220,7 +220,7 @@ +@@ -226,7 +226,7 @@ </message> </if> <!-- The ChromeOS version of this string is defined in //components/error_page_strings.grdp. --> diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_crash_core_app_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_crash_core_app_BUILD.gn index 0a45f6bb117d..0df6ae034759 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_crash_core_app_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_crash_core_app_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/components/crash/core/app/BUILD.gn.orig 2022-11-30 08:12:58 UTC +--- src/3rdparty/chromium/components/crash/core/app/BUILD.gn.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/components/crash/core/app/BUILD.gn -@@ -52,7 +52,7 @@ static_library("app") { +@@ -72,7 +72,7 @@ static_library("app") { "crashpad.h", ] @@ -9,7 +9,7 @@ sources += [ "crashpad_linux.cc" ] } -@@ -65,6 +65,10 @@ static_library("app") { +@@ -85,6 +85,10 @@ static_library("app") { ] } @@ -20,7 +20,7 @@ defines = [ "CRASH_IMPLEMENTATION" ] public_deps = [ ":lib" ] -@@ -96,7 +100,7 @@ static_library("app") { +@@ -113,7 +117,7 @@ static_library("app") { libs = [ "log" ] } @@ -29,7 +29,7 @@ deps += [ "//base:base_static", "//components/crash/core/common", -@@ -224,11 +228,6 @@ if (is_mac || is_android || is_linux || is_chromeos) { +@@ -241,11 +245,6 @@ if (is_mac || is_android || is_linux || is_chromeos) { # define custom UserStreamDataSources. executable("chrome_crashpad_handler") { sources = [ "chrome_crashpad_handler.cc" ] diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_crash_core_app_chrome__crashpad__handler.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_crash_core_app_chrome__crashpad__handler.cc new file mode 100644 index 000000000000..c8ec0dfb2bf6 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_crash_core_app_chrome__crashpad__handler.cc @@ -0,0 +1,12 @@ +--- src/3rdparty/chromium/components/crash/core/app/chrome_crashpad_handler.cc.orig 2022-02-07 13:39:41 UTC ++++ src/3rdparty/chromium/components/crash/core/app/chrome_crashpad_handler.cc +@@ -6,5 +6,9 @@ + extern "C" int CrashpadHandlerMain(int argc, char* argv[]); + + int main(int argc, char* argv[]) { ++#if defined(__OpenBSD__) || defined(__FreeBSD__) ++ return -1; ++#else + return CrashpadHandlerMain(argc, argv); ++#endif + } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_crash_core_browser_crash__upload__list__crashpad.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_crash_core_browser_crash__upload__list__crashpad.cc new file mode 100644 index 000000000000..52f8cda11e33 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_crash_core_browser_crash__upload__list__crashpad.cc @@ -0,0 +1,26 @@ +--- src/3rdparty/chromium/components/crash/core/browser/crash_upload_list_crashpad.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/components/crash/core/browser/crash_upload_list_crashpad.cc +@@ -38,7 +38,9 @@ CrashUploadListCrashpad::~CrashUploadListCrashpad() = + std::vector<std::unique_ptr<UploadList::UploadInfo>> + CrashUploadListCrashpad::LoadUploadList() { + std::vector<crash_reporter::Report> reports; ++#if !BUILDFLAG(IS_BSD) + crash_reporter::GetReports(&reports); ++#endif + + std::vector<std::unique_ptr<UploadInfo>> uploads; + for (const crash_reporter::Report& report : reports) { +@@ -52,9 +54,13 @@ CrashUploadListCrashpad::LoadUploadList() { + + void CrashUploadListCrashpad::ClearUploadList(const base::Time& begin, + const base::Time& end) { ++#if !BUILDFLAG(IS_BSD) + crash_reporter::ClearReportsBetween(begin, end); ++#endif + } + + void CrashUploadListCrashpad::RequestSingleUpload(const std::string& local_id) { ++#if !BUILDFLAG(IS_BSD) + crash_reporter::RequestSingleCrashUpload(local_id); ++#endif + } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_crash_core_common_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_crash_core_common_BUILD.gn index f1bbd08b7b3a..71e24e436073 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_crash_core_common_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_crash_core_common_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/components/crash/core/common/BUILD.gn.orig 2022-11-30 08:12:58 UTC +--- src/3rdparty/chromium/components/crash/core/common/BUILD.gn.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/components/crash/core/common/BUILD.gn -@@ -8,7 +8,7 @@ import("//components/gwp_asan/buildflags/buildflags.gn +@@ -9,7 +9,7 @@ import("//components/gwp_asan/buildflags/buildflags.gn declare_args() { # If set to true, this will stub out and disable the entire crash key system. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_browser_mock__signals__aggregator.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_browser_mock__signals__aggregator.h new file mode 100644 index 000000000000..c10e886469e8 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_browser_mock__signals__aggregator.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/device_signals/core/browser/mock_signals_aggregator.h.orig 2023-07-16 15:47:57 UTC ++++ src/3rdparty/chromium/components/device_signals/core/browser/mock_signals_aggregator.h +@@ -17,7 +17,7 @@ class MockSignalsAggregator : public SignalsAggregator + MockSignalsAggregator(); + ~MockSignalsAggregator() override; + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + MOCK_METHOD(void, + GetSignalsForUser, + (const UserContext&, diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_browser_signals__aggregator.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_browser_signals__aggregator.h new file mode 100644 index 000000000000..8945a39bfae4 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_browser_signals__aggregator.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/device_signals/core/browser/signals_aggregator.h.orig 2023-07-16 15:47:57 UTC ++++ src/3rdparty/chromium/components/device_signals/core/browser/signals_aggregator.h +@@ -22,7 +22,7 @@ class SignalsAggregator : public KeyedService { + + ~SignalsAggregator() override = default; + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Will asynchronously collect signals whose names are specified in the + // `request` object, and will also use a `user_context` to validate that the + // user has permissions to the device's signals. Invokes `callback` with the diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_browser_signals__aggregator__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_browser_signals__aggregator__impl.cc new file mode 100644 index 000000000000..b969d8274da0 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_browser_signals__aggregator__impl.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/device_signals/core/browser/signals_aggregator_impl.cc.orig 2023-07-16 15:47:57 UTC ++++ src/3rdparty/chromium/components/device_signals/core/browser/signals_aggregator_impl.cc +@@ -65,7 +65,7 @@ SignalsAggregatorImpl::SignalsAggregatorImpl( + + SignalsAggregatorImpl::~SignalsAggregatorImpl() = default; + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void SignalsAggregatorImpl::GetSignalsForUser( + const UserContext& user_context, + const SignalsAggregationRequest& request, diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_browser_signals__aggregator__impl.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_browser_signals__aggregator__impl.h new file mode 100644 index 000000000000..16687e49a244 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_browser_signals__aggregator__impl.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/device_signals/core/browser/signals_aggregator_impl.h.orig 2023-07-16 15:47:57 UTC ++++ src/3rdparty/chromium/components/device_signals/core/browser/signals_aggregator_impl.h +@@ -29,7 +29,7 @@ class SignalsAggregatorImpl : public SignalsAggregator + ~SignalsAggregatorImpl() override; + + // SignalsAggregator: +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void GetSignalsForUser(const UserContext& user_context, + const SignalsAggregationRequest& request, + GetSignalsCallback callback) override; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_browser_user__permission__service.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_browser_user__permission__service.h new file mode 100644 index 000000000000..7e4320d11974 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_browser_user__permission__service.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/device_signals/core/browser/user_permission_service.h.orig 2023-07-16 15:47:57 UTC ++++ src/3rdparty/chromium/components/device_signals/core/browser/user_permission_service.h +@@ -57,7 +57,7 @@ class UserPermissionService : public KeyedService { + // missing. + virtual bool ShouldCollectConsent() const = 0; + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Will verify whether context-aware signals can be collected + // on behalf of the user represented by `user_context`. Returns `kGranted` if + // collection is allowed. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_browser_user__permission__service__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_browser_user__permission__service__impl.cc new file mode 100644 index 000000000000..64bcd72f3ed5 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_browser_user__permission__service__impl.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/device_signals/core/browser/user_permission_service_impl.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/components/device_signals/core/browser/user_permission_service_impl.cc +@@ -92,7 +92,7 @@ bool UserPermissionServiceImpl::ShouldCollectConsent() + consent_required_by_dependent_policy; + } + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + UserPermission UserPermissionServiceImpl::CanUserCollectSignals( + const UserContext& user_context) const { + // Return "unknown user" if no user ID was given. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_browser_user__permission__service__impl.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_browser_user__permission__service__impl.h new file mode 100644 index 000000000000..d13ac5ce39bc --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_browser_user__permission__service__impl.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/device_signals/core/browser/user_permission_service_impl.h.orig 2023-07-16 15:47:57 UTC ++++ src/3rdparty/chromium/components/device_signals/core/browser/user_permission_service_impl.h +@@ -39,7 +39,7 @@ class UserPermissionServiceImpl : public UserPermissio + + // UserPermissionService: + bool ShouldCollectConsent() const override; +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + UserPermission CanUserCollectSignals( + const UserContext& user_context) const override; + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_common_signals__features.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_common_signals__features.cc new file mode 100644 index 000000000000..e4133bba0bd3 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_common_signals__features.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/device_signals/core/common/signals_features.cc.orig 2023-08-17 07:33:31 UTC ++++ src/3rdparty/chromium/components/device_signals/core/common/signals_features.cc +@@ -46,7 +46,7 @@ bool IsNewFunctionEnabled(NewEvFunction new_ev_functio + } + + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_CHROMEOS_ASH) ++ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + // Enables the triggering of device signals consent dialog when conditions met + // This feature also requires UnmanagedDeviceSignalsConsentFlowEnabled policy to + // be enabled diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_common_signals__features.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_common_signals__features.h new file mode 100644 index 000000000000..5dc4cb05216f --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_common_signals__features.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/device_signals/core/common/signals_features.h.orig 2023-08-17 07:33:31 UTC ++++ src/3rdparty/chromium/components/device_signals/core/common/signals_features.h +@@ -28,7 +28,7 @@ enum class NewEvFunction { kFileSystemInfo, kSettings, + bool IsNewFunctionEnabled(NewEvFunction new_ev_function); + + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_CHROMEOS_ASH) ++ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + BASE_DECLARE_FEATURE(kDeviceSignalsConsentDialog); + + // Returns true if device signals consent dialog has been enabled for diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_system__signals_platform__delegate.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_system__signals_platform__delegate.cc new file mode 100644 index 000000000000..ba31ef8c88fa --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_device__signals_core_system__signals_platform__delegate.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/device_signals/core/system_signals/platform_delegate.cc.orig 2022-09-24 10:57:32 UTC ++++ src/3rdparty/chromium/components/device_signals/core/system_signals/platform_delegate.cc +@@ -11,7 +11,7 @@ namespace device_signals { + + bool CustomFilePathComparator::operator()(const base::FilePath& a, + const base::FilePath& b) const { +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // On Linux, the file system is case sensitive. + return a < b; + #else diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_embedder__support_user__agent__utils.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_embedder__support_user__agent__utils.cc new file mode 100644 index 000000000000..df08ebcae4e2 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_embedder__support_user__agent__utils.cc @@ -0,0 +1,12 @@ +--- src/3rdparty/chromium/components/embedder_support/user_agent_utils.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/components/embedder_support/user_agent_utils.cc +@@ -432,6 +432,9 @@ std::string GetPlatformForUAMetadata() { + # else + return "Chromium OS"; + # endif ++#elif BUILDFLAG(IS_BSD) ++ // The internet is weird... ++ return "Linux"; + #else + return std::string(version_info::GetOSType()); + #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_feature__engagement_public_event__constants.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_feature__engagement_public_event__constants.cc new file mode 100644 index 000000000000..45d8fe3c9b29 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_feature__engagement_public_event__constants.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/feature_engagement/public/event_constants.cc.orig 2022-02-28 16:54:41 UTC ++++ src/3rdparty/chromium/components/feature_engagement/public/event_constants.cc +@@ -11,7 +11,7 @@ namespace feature_engagement { + namespace events { + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + const char kNewTabOpened[] = "new_tab_opened"; + const char kSixthTabOpened[] = "sixth_tab_opened"; + const char kTabGroupCreated[] = "tab_group_created"; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_feature__engagement_public_event__constants.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_feature__engagement_public_event__constants.h new file mode 100644 index 000000000000..1c61f2507d9f --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_feature__engagement_public_event__constants.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/feature_engagement/public/event_constants.h.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/components/feature_engagement/public/event_constants.h +@@ -14,7 +14,7 @@ namespace events { + + // Desktop + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + // The user has explicitly opened a new tab via an entry point from inside of + // Chrome. + extern const char kNewTabOpened[]; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__configurations.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__configurations.cc new file mode 100644 index 000000000000..eacb45825e24 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__configurations.cc @@ -0,0 +1,21 @@ +--- src/3rdparty/chromium/components/feature_engagement/public/feature_configurations.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/components/feature_engagement/public/feature_configurations.cc +@@ -46,7 +46,7 @@ FeatureConfig CreateAlwaysTriggerConfig(const base::Fe + absl::optional<FeatureConfig> GetClientSideFeatureConfig( + const base::Feature* feature) { + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + if (kIPHPasswordsAccountStorageFeature.name == feature->name) { + absl::optional<FeatureConfig> config = FeatureConfig(); + config->valid = true; +@@ -1336,7 +1336,8 @@ absl::optional<FeatureConfig> GetClientSideFeatureConf + #endif // BUILDFLAG(IS_ANDROID) + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ ++ BUILDFLAG(IS_BSD) + + if (kIPHAutofillExternalAccountProfileSuggestionFeature.name == + feature->name) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__constants.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__constants.cc new file mode 100644 index 000000000000..8dd1aa2f62ed --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__constants.cc @@ -0,0 +1,21 @@ +--- src/3rdparty/chromium/components/feature_engagement/public/feature_constants.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/components/feature_engagement/public/feature_constants.cc +@@ -21,7 +21,7 @@ BASE_FEATURE(kUseClientConfigIPH, + BASE_FEATURE(kIPHDummyFeature, "IPH_Dummy", base::FEATURE_DISABLED_BY_DEFAULT); + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + BASE_FEATURE(kIPHAutofillFeedbackNewBadgeFeature, + "IPH_AutofillFeedbackNewBadge", + base::FEATURE_DISABLED_BY_DEFAULT); +@@ -519,7 +519,8 @@ BASE_FEATURE(kIPHiOSPromoPasswordManagerWidgetFeature, + #endif // BUILDFLAG(IS_IOS) + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ ++ BUILDFLAG(IS_BSD) + BASE_FEATURE(kIPHAutofillExternalAccountProfileSuggestionFeature, + "IPH_AutofillExternalAccountProfileSuggestion", + base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__constants.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__constants.h new file mode 100644 index 000000000000..67ad6e46d739 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__constants.h @@ -0,0 +1,21 @@ +--- src/3rdparty/chromium/components/feature_engagement/public/feature_constants.h.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/components/feature_engagement/public/feature_constants.h +@@ -23,7 +23,7 @@ BASE_DECLARE_FEATURE(kUseClientConfigIPH); + BASE_DECLARE_FEATURE(kIPHDummyFeature); + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + BASE_DECLARE_FEATURE(kIPHAutofillFeedbackNewBadgeFeature); + BASE_DECLARE_FEATURE(kIPHBatterySaverModeFeature); + BASE_DECLARE_FEATURE(kIPHCompanionSidePanelFeature); +@@ -211,7 +211,8 @@ BASE_DECLARE_FEATURE(kIPHiOSPromoPasswordManagerWidget + #endif // BUILDFLAG(IS_IOS) + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ ++ BUILDFLAG(IS_BSD) + BASE_DECLARE_FEATURE(kIPHAutofillExternalAccountProfileSuggestionFeature); + BASE_DECLARE_FEATURE(kIPHAutofillVirtualCardCVCSuggestionFeature); + BASE_DECLARE_FEATURE(kIPHAutofillVirtualCardSuggestionFeature); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__list.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__list.cc new file mode 100644 index 000000000000..17611addcc17 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__list.cc @@ -0,0 +1,21 @@ +--- src/3rdparty/chromium/components/feature_engagement/public/feature_list.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/components/feature_engagement/public/feature_list.cc +@@ -139,7 +139,7 @@ const base::Feature* const kAllFeatures[] = { + &kIPHiOSPromoPasswordManagerWidgetFeature, + #endif // BUILDFLAG(IS_IOS) + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + &kIPHAutofillFeedbackNewBadgeFeature, + &kIPHBatterySaverModeFeature, + &kIPHCompanionSidePanelFeature, +@@ -186,7 +186,8 @@ const base::Feature* const kAllFeatures[] = { + // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ ++ BUILDFLAG(IS_BSD) + &kIPHAutofillExternalAccountProfileSuggestionFeature, + &kIPHAutofillVirtualCardCVCSuggestionFeature, + &kIPHAutofillVirtualCardSuggestionFeature, diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__list.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__list.h new file mode 100644 index 000000000000..f39c82c3a1b9 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__list.h @@ -0,0 +1,40 @@ +--- src/3rdparty/chromium/components/feature_engagement/public/feature_list.h.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/components/feature_engagement/public/feature_list.h +@@ -259,7 +259,7 @@ DEFINE_VARIATION_PARAM(kIPHiOSPromoPasswordManagerWidg + #endif // BUILDFLAG(IS_IOS) + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + DEFINE_VARIATION_PARAM(kIPHAutofillFeedbackNewBadgeFeature, + "IPH_AutofillFeedbackNewBadge"); + DEFINE_VARIATION_PARAM(kIPHBatterySaverModeFeature, "IPH_BatterySaverMode"); +@@ -335,7 +335,8 @@ DEFINE_VARIATION_PARAM(kIPHBackNavigationMenuFeature, + // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ ++ BUILDFLAG(IS_BSD) + DEFINE_VARIATION_PARAM(kIPHAutofillExternalAccountProfileSuggestionFeature, + "IPH_AutofillExternalAccountProfileSuggestion"); + DEFINE_VARIATION_PARAM(kIPHAutofillVirtualCardCVCSuggestionFeature, +@@ -541,7 +542,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation + VARIATION_ENTRY(kIPHiOSPromoPostRestoreDefaultBrowserFeature), + VARIATION_ENTRY(kIPHiOSPromoPasswordManagerWidgetFeature), + #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + VARIATION_ENTRY(kIPHAutofillFeedbackNewBadgeFeature), + VARIATION_ENTRY(kIPHBatterySaverModeFeature), + VARIATION_ENTRY(kIPHCompanionSidePanelFeature), +@@ -589,7 +590,8 @@ constexpr flags_ui::FeatureEntry::FeatureVariation + // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ ++ BUILDFLAG(IS_BSD) + VARIATION_ENTRY(kIPHAutofillExternalAccountProfileSuggestionFeature), + VARIATION_ENTRY(kIPHAutofillVirtualCardCVCSuggestionFeature), + VARIATION_ENTRY(kIPHAutofillVirtualCardSuggestionFeature), diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_feed_core_proto_v2_wire_version.proto b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_feed_core_proto_v2_wire_version.proto new file mode 100644 index 000000000000..626494912842 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_feed_core_proto_v2_wire_version.proto @@ -0,0 +1,13 @@ +--- src/3rdparty/chromium/components/feed/core/proto/v2/wire/version.proto.orig 2021-05-12 22:05:49 UTC ++++ src/3rdparty/chromium/components/feed/core/proto/v2/wire/version.proto +@@ -25,8 +25,8 @@ message Version { + BETA = 3; + RELEASE = 4; + } +- optional int32 major = 1; +- optional int32 minor = 2; ++ optional int32 gmajor = 1; ++ optional int32 gminor = 2; + optional int32 build = 3; + optional int32 revision = 4; + optional Architecture architecture = 5; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_feed_core_v2_proto__util.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_feed_core_v2_proto__util.cc new file mode 100644 index 000000000000..076274fd9203 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_feed_core_v2_proto__util.cc @@ -0,0 +1,24 @@ +--- src/3rdparty/chromium/components/feed/core/v2/proto_util.cc.orig 2023-07-16 15:47:57 UTC ++++ src/3rdparty/chromium/components/feed/core/v2/proto_util.cc +@@ -93,8 +93,8 @@ feedwire::Version GetPlatformVersionMessage() { + + int32_t major, minor, revision; + base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &revision); +- result.set_major(major); +- result.set_minor(minor); ++ result.set_gmajor(major); ++ result.set_gminor(minor); + result.set_revision(revision); + #if BUILDFLAG(IS_ANDROID) + result.set_api_version(base::android::BuildInfo::GetInstance()->sdk_int()); +@@ -109,8 +109,8 @@ feedwire::Version GetAppVersionMessage(const ChromeInf + // Chrome's version is in the format: MAJOR,MINOR,BUILD,PATCH. + const std::vector<uint32_t>& numbers = chrome_info.version.components(); + if (numbers.size() > 3) { +- result.set_major(static_cast<int32_t>(numbers[0])); +- result.set_minor(static_cast<int32_t>(numbers[1])); ++ result.set_gmajor(static_cast<int32_t>(numbers[0])); ++ result.set_gminor(static_cast<int32_t>(numbers[1])); + result.set_build(static_cast<int32_t>(numbers[2])); + result.set_revision(static_cast<int32_t>(numbers[3])); + } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_flags__ui_flags__state.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_flags__ui_flags__state.cc index 56dd7feeee6c..4c38ab9ecbd8 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_flags__ui_flags__state.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_flags__ui_flags__state.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/components/flags_ui/flags_state.cc.orig 2022-07-22 17:30:31 UTC +--- src/3rdparty/chromium/components/flags_ui/flags_state.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/components/flags_ui/flags_state.cc -@@ -672,7 +672,7 @@ unsigned short FlagsState::GetCurrentPlatform() { +@@ -741,7 +741,7 @@ unsigned short FlagsState::GetCurrentPlatform() { return kOsCrOS; #elif BUILDFLAG(IS_CHROMEOS_LACROS) return kOsLacros; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_gwp__asan_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_gwp__asan_BUILD.gn new file mode 100644 index 000000000000..07b7216ee88b --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_gwp__asan_BUILD.gn @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/gwp_asan/BUILD.gn.orig 2022-11-30 08:12:58 UTC ++++ src/3rdparty/chromium/components/gwp_asan/BUILD.gn +@@ -15,7 +15,7 @@ test("gwp_asan_unittests") { + "//testing/gtest", + "//third_party/boringssl", + ] +- if (is_win || is_mac || is_linux || is_chromeos || is_android) { ++ if ((is_win || is_mac || is_linux || is_chromeos || is_android) && !is_bsd) { + deps += [ + "//components/gwp_asan/client:unit_tests", + "//components/gwp_asan/crash_handler:unit_tests", diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_gwp__asan_client_guarded__page__allocator__posix.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_gwp__asan_client_guarded__page__allocator__posix.cc new file mode 100644 index 000000000000..b9a40268566b --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_gwp__asan_client_guarded__page__allocator__posix.cc @@ -0,0 +1,13 @@ +--- src/3rdparty/chromium/components/gwp_asan/client/guarded_page_allocator_posix.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/components/gwp_asan/client/guarded_page_allocator_posix.cc +@@ -35,8 +35,9 @@ void GuardedPageAllocator::MarkPageInaccessible(void* + // mmap() a PROT_NONE page over the address to release it to the system, if + // we used mprotect() here the system would count pages in the quarantine + // against the RSS. ++ // MAP_ANONYMOUS requires the fd to be -1 on !linux + void* err = mmap(ptr, state_.page_size, PROT_NONE, +- MAP_FIXED | MAP_ANONYMOUS | MAP_PRIVATE, 0, 0); ++ MAP_FIXED | MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); + PCHECK(err == ptr) << "mmap"; + } + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_gwp__asan_client_gwp__asan.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_gwp__asan_client_gwp__asan.cc new file mode 100644 index 000000000000..45ec484e308d --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_gwp__asan_client_gwp__asan.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/components/gwp_asan/client/gwp_asan.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/components/gwp_asan/client/gwp_asan.cc +@@ -64,7 +64,7 @@ constexpr bool kCpuIs64Bit = + // ProcessSamplingBoost is the multiplier to increase the + // ProcessSamplingProbability in scenarios where we want to perform additional + // testing (e.g., on canary/dev builds). +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + constexpr int kDefaultMaxAllocations = 50; + constexpr int kDefaultMaxMetadata = 210; + constexpr int kDefaultTotalPages = kCpuIs64Bit ? 2048 : kDefaultMaxMetadata * 2; +@@ -84,7 +84,7 @@ constexpr int kDefaultProcessSamplingBoost2 = 10; + // BUILDFLAG(IS_FUCHSIA) + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_ASH) ++ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + constexpr base::FeatureState kDefaultEnabled = base::FEATURE_ENABLED_BY_DEFAULT; + #else + constexpr base::FeatureState kDefaultEnabled = diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_gwp__asan_crash__handler_crash__analyzer.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_gwp__asan_crash__handler_crash__analyzer.cc new file mode 100644 index 000000000000..2e677802856f --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_gwp__asan_crash__handler_crash__analyzer.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/components/gwp_asan/crash_handler/crash_analyzer.cc.orig 2023-05-31 08:12:17 UTC ++++ src/3rdparty/chromium/components/gwp_asan/crash_handler/crash_analyzer.cc +@@ -30,7 +30,7 @@ + #include "third_party/crashpad/crashpad/snapshot/process_snapshot.h" + #include "third_party/crashpad/crashpad/util/process/process_memory.h" + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + #include <signal.h> + #elif BUILDFLAG(IS_APPLE) + #include <mach/exception_types.h> +@@ -90,7 +90,7 @@ bool CrashAnalyzer::GetExceptionInfo( + + crashpad::VMAddress CrashAnalyzer::GetAccessAddress( + const crashpad::ExceptionSnapshot& exception) { +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + if (exception.Exception() == SIGSEGV || exception.Exception() == SIGBUS) + return exception.ExceptionAddress(); + #elif BUILDFLAG(IS_APPLE) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_live__caption_caption__util.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_live__caption_caption__util.cc new file mode 100644 index 000000000000..ce4ef2e65108 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_live__caption_caption__util.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/components/live_caption/caption_util.cc.orig 2023-07-16 15:47:57 UTC ++++ src/3rdparty/chromium/components/live_caption/caption_util.cc +@@ -145,7 +145,7 @@ bool IsLiveCaptionFeatureSupported() { + return false; + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Check if the CPU has the required instruction set to run the Speech + // On-Device API (SODA) library. + static bool has_sse41 = base::CPU().has_sse41(); +@@ -167,7 +167,7 @@ std::string GetCaptionSettingsUrl() { + return "chrome://os-settings/audioAndCaptions"; + #endif // BUILDFLAG(IS_CHROMEOS) + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return "chrome://settings/captions"; + #endif // BUILDFLAG(IS_LINUX) + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_live__caption_caption__util.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_live__caption_caption__util.h new file mode 100644 index 000000000000..8a704f098a16 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_live__caption_caption__util.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/live_caption/caption_util.h.orig 2023-07-16 15:47:57 UTC ++++ src/3rdparty/chromium/components/live_caption/caption_util.h +@@ -14,7 +14,7 @@ class PrefService; + namespace captions { + + #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + extern const char kCaptionSettingsUrl[]; + #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || + // BUILDFLAG(IS_MAC) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_management__strings.grdp b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_management__strings.grdp new file mode 100644 index 000000000000..e45b81485e41 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_management__strings.grdp @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/management_strings.grdp.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/components/management_strings.grdp +@@ -346,7 +346,7 @@ + </if> + + <!-- Strings related to Chrome Enterprise Device Signals Sharing --> +- <if expr="is_win or is_linux or is_macosx"> ++ <if expr="is_win or is_posix or is_macosx"> + <message name="IDS_MANAGEMENT_DEVICE_SIGNALS_DISCLOSURE" desc="Disclosure message explaining that device signals can be shared."> + Information about your browser, OS, device, installed software, and files + </message> diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_media__router_common_providers_cast_channel_cast__message__util.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_media__router_common_providers_cast_channel_cast__message__util.cc new file mode 100644 index 000000000000..68fff7e336fe --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_media__router_common_providers_cast_channel_cast__message__util.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/media_router/common/providers/cast/channel/cast_message_util.cc.orig 2022-11-30 08:12:58 UTC ++++ src/3rdparty/chromium/components/media_router/common/providers/cast/channel/cast_message_util.cc +@@ -170,7 +170,7 @@ int GetVirtualConnectPlatformValue() { + return 4; + #elif BUILDFLAG(IS_CHROMEOS_ASH) + return 5; +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + return 6; + #else + return 0; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_metrics_drive__metrics__provider__linux.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_metrics_drive__metrics__provider__linux.cc index d4aadea8dca0..0fde59efeb73 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_metrics_drive__metrics__provider__linux.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_metrics_drive__metrics__provider__linux.cc @@ -1,10 +1,10 @@ ---- src/3rdparty/chromium/components/metrics/drive_metrics_provider_linux.cc.orig 2021-04-14 18:40:59 UTC +--- src/3rdparty/chromium/components/metrics/drive_metrics_provider_linux.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/components/metrics/drive_metrics_provider_linux.cc @@ -4,7 +4,13 @@ #include "components/metrics/drive_metrics_provider.h" -+#if defined(OS_BSD) ++#if BUILDFLAG(IS_BSD) +#include <sys/types.h> +#define MAJOR(dev) major(dev) +#define MINOR(dev) minor(dev) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_metrics_metrics__log.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_metrics_metrics__log.cc index 76142e0ff3bf..baa13d124508 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_metrics_metrics__log.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_metrics_metrics__log.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/components/metrics/metrics_log.cc.orig 2023-01-11 09:17:16 UTC +--- src/3rdparty/chromium/components/metrics/metrics_log.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/components/metrics/metrics_log.cc @@ -53,7 +53,7 @@ #include "base/win/current_module.h" @@ -9,7 +9,7 @@ #include "base/environment.h" #include "base/nix/xdg_util.h" #endif -@@ -123,7 +123,7 @@ void RecordCurrentTime( +@@ -139,7 +139,7 @@ void RecordCurrentTime( } } @@ -18,7 +18,7 @@ metrics::SystemProfileProto::OS::XdgSessionType ToProtoSessionType( base::nix::SessionType session_type) { switch (session_type) { -@@ -375,7 +375,7 @@ void MetricsLog::RecordCoreSystemProfile( +@@ -399,7 +399,7 @@ void MetricsLog::RecordCoreSystemProfile( // OperatingSystemVersion refers to the ChromeOS release version. #if BUILDFLAG(IS_CHROMEOS_ASH) os->set_kernel_version(base::SysInfo::KernelVersion()); @@ -27,7 +27,7 @@ // Linux operating system version is copied over into kernel version to be // consistent. os->set_kernel_version(base::SysInfo::OperatingSystemVersion()); -@@ -392,7 +392,7 @@ void MetricsLog::RecordCoreSystemProfile( +@@ -416,7 +416,7 @@ void MetricsLog::RecordCoreSystemProfile( os->set_build_number(base::SysInfo::GetIOSBuildNumber()); #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_network__session__configurator_browser_network__session__configurator.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_network__session__configurator_browser_network__session__configurator.cc index 63b224579fe1..9fef706ac19d 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_network__session__configurator_browser_network__session__configurator.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_network__session__configurator_browser_network__session__configurator.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/components/network_session_configurator/browser/network_session_configurator.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/components/network_session_configurator/browser/network_session_configurator.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/components/network_session_configurator/browser/network_session_configurator.cc -@@ -807,7 +807,7 @@ net::URLRequestContextBuilder::HttpCacheParams::Type C - } - #endif // #if !BUILDFLAG(IS_ANDROID) - --#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +@@ -793,7 +793,7 @@ net::URLRequestContextBuilder::HttpCacheParams::Type C + // backport, having it behave differently than in stable would be a bigger + // problem. TODO: Does this work in later macOS releases? + #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) return net::URLRequestContextBuilder::HttpCacheParams::DISK_SIMPLE; #else return net::URLRequestContextBuilder::HttpCacheParams::DISK_BLOCKFILE; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_optimization__guide_core_optimization__guide__util.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_optimization__guide_core_optimization__guide__util.cc new file mode 100644 index 000000000000..50c12084abdd --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_optimization__guide_core_optimization__guide__util.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/optimization_guide/core/optimization_guide_util.cc.orig 2022-10-24 13:33:33 UTC ++++ src/3rdparty/chromium/components/optimization_guide/core/optimization_guide_util.cc +@@ -27,7 +27,7 @@ optimization_guide::proto::Platform GetPlatform() { + return optimization_guide::proto::PLATFORM_CHROMEOS; + #elif BUILDFLAG(IS_ANDROID) + return optimization_guide::proto::PLATFORM_ANDROID; +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return optimization_guide::proto::PLATFORM_LINUX; + #else + return optimization_guide::proto::PLATFORM_UNKNOWN; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_optimization__guide_core_tflite__model__executor.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_optimization__guide_core_tflite__model__executor.h new file mode 100644 index 000000000000..1382842194a0 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_optimization__guide_core_tflite__model__executor.h @@ -0,0 +1,62 @@ +--- src/3rdparty/chromium/components/optimization_guide/core/tflite_model_executor.h.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/components/optimization_guide/core/tflite_model_executor.h +@@ -240,7 +240,11 @@ class TFLiteModelExecutor : public ModelExecutor<Outpu + void SendForBatchExecution( + BatchExecutionCallback callback_on_complete, + base::TimeTicks start_time, ++#if defined(__clang__) && (__clang_major__ >= 15) + ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) ++#else ++ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) ++#endif + override { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +@@ -262,7 +266,11 @@ class TFLiteModelExecutor : public ModelExecutor<Outpu + // 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<absl::optional<OutputType>> SendForBatchExecutionSync( ++#if defined(__clang__) && (__clang_major__ >= 15) + ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) ++#else ++ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) ++#endif + override { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +@@ -417,7 +425,11 @@ class TFLiteModelExecutor : public ModelExecutor<Outpu + // executes it on the model execution thread. + void LoadModelFileAndBatchExecute( + BatchExecutionCallback callback_on_complete, ++#if defined(__clang__) && (__clang_major__ >= 15) + ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) { ++#else ++ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) { ++#endif + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + +@@ -434,7 +446,11 @@ class TFLiteModelExecutor : public ModelExecutor<Outpu + + // Batch executes the loaded model for inputs. + void BatchExecuteLoadedModel( ++#if defined(__clang__) && (__clang_major__ >= 15) + ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs, ++#else ++ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs, ++#endif + std::vector<absl::optional<OutputType>>* outputs) { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +@@ -494,7 +510,11 @@ class TFLiteModelExecutor : public ModelExecutor<Outpu + // Unloads the model if needed. + void BatchExecuteLoadedModelAndRunCallback( + BatchExecutionCallback callback_on_complete, ++#if defined(__clang__) && (__clang_major__ >= 15) + ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs, ++#else ++ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs, ++#endif + ExecutionStatus execution_status) { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_keyring__util__linux.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_keyring__util__linux.cc deleted file mode 100644 index dc3bd7fb17c4..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_keyring__util__linux.cc +++ /dev/null @@ -1,17 +0,0 @@ ---- src/3rdparty/chromium/components/os_crypt/keyring_util_linux.cc.orig 2022-04-21 18:48:31 UTC -+++ src/3rdparty/chromium/components/os_crypt/keyring_util_linux.cc -@@ -68,12 +68,12 @@ bool GnomeKeyringLoader::LoadGnomeKeyring() { - if (keyring_loaded) - return true; - -- void* handle = dlopen("libgnome-keyring.so.0", RTLD_NOW | RTLD_GLOBAL); -+ void* handle = dlopen("libgnome-keyring.so", RTLD_NOW | RTLD_GLOBAL); - if (!handle) { - // We wanted to use GNOME Keyring, but we couldn't load it. Warn, because - // either the user asked for this, or we autodetected it incorrectly. (Or - // the system has broken libraries, which is also good to warn about.) -- LOG(WARNING) << "Could not load libgnome-keyring.so.0: " << dlerror(); -+ LOG(WARNING) << "Could not load libgnome-keyring.so: " << dlerror(); - return false; - } - diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_libsecret__util__linux.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_libsecret__util__linux.cc deleted file mode 100644 index 5d331a6d8dcb..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_libsecret__util__linux.cc +++ /dev/null @@ -1,18 +0,0 @@ ---- src/3rdparty/chromium/components/os_crypt/libsecret_util_linux.cc.orig 2022-06-17 14:20:10 UTC -+++ src/3rdparty/chromium/components/os_crypt/libsecret_util_linux.cc -@@ -102,13 +102,13 @@ bool LibsecretLoader::LoadLibsecret() { - if (libsecret_loaded_) - return true; - -- static void* handle = dlopen("libsecret-1.so.0", RTLD_NOW | RTLD_GLOBAL); -+ static void* handle = dlopen("libsecret-1.so", RTLD_NOW | RTLD_GLOBAL); - if (!handle) { - // We wanted to use libsecret, but we couldn't load it. Warn, because - // either the user asked for this, or we autodetected it incorrectly. (Or - // the system has broken libraries, which is also good to warn about.) - // TODO(crbug.com/607435): Channel this message to the user-facing log -- VLOG(1) << "Could not load libsecret-1.so.0: " << dlerror(); -+ VLOG(1) << "Could not load libsecret-1.so: " << dlerror(); - return false; - } - diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_sync_libsecret__util__linux.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_sync_libsecret__util__linux.cc new file mode 100644 index 000000000000..82e9cd60a576 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_sync_libsecret__util__linux.cc @@ -0,0 +1,27 @@ +--- src/3rdparty/chromium/components/os_crypt/sync/libsecret_util_linux.cc.orig 2023-04-28 17:01:32 UTC ++++ src/3rdparty/chromium/components/os_crypt/sync/libsecret_util_linux.cc +@@ -99,16 +99,22 @@ bool LibsecretLoader::EnsureLibsecretLoaded() { + + // static + bool LibsecretLoader::LoadLibsecret() { ++#if BUILDFLAG(IS_BSD) ++ const char* kSecretLib = "libsecret-1.so"; ++#else ++ const char* kSecretLib = "libsecret-1.so.0"; ++#endif ++ + if (libsecret_loaded_) + return true; + +- static void* handle = dlopen("libsecret-1.so.0", RTLD_NOW | RTLD_GLOBAL); ++ static void* handle = dlopen(kSecretLib, RTLD_NOW | RTLD_GLOBAL); + if (!handle) { + // We wanted to use libsecret, but we couldn't load it. Warn, because + // either the user asked for this, or we autodetected it incorrectly. (Or + // the system has broken libraries, which is also good to warn about.) + // TODO(crbug.com/607435): Channel this message to the user-facing log +- VLOG(1) << "Could not load libsecret-1.so.0: " << dlerror(); ++ VLOG(1) << "Could not load << " << kSecretLib << ": " << dlerror(); + return false; + } + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_os__crypt.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_sync_os__crypt.h index 948a26a809bc..8bbbbc3083c8 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_os__crypt.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_sync_os__crypt.h @@ -1,5 +1,5 @@ ---- src/3rdparty/chromium/components/os_crypt/os_crypt.h.orig 2023-01-11 09:17:16 UTC -+++ src/3rdparty/chromium/components/os_crypt/os_crypt.h +--- src/3rdparty/chromium/components/os_crypt/sync/os_crypt.h.orig 2023-04-28 17:01:32 UTC ++++ src/3rdparty/chromium/components/os_crypt/sync/os_crypt.h @@ -14,7 +14,7 @@ #include "build/build_config.h" #include "build/chromecast_buildflags.h" diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_paint__preview_browser_paint__preview__client.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_paint__preview_browser_paint__preview__client.cc new file mode 100644 index 000000000000..69c6b096d20a --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_paint__preview_browser_paint__preview__client.cc @@ -0,0 +1,13 @@ +--- src/3rdparty/chromium/components/paint_preview/browser/paint_preview_client.cc.orig 2023-03-09 06:31:50 UTC ++++ src/3rdparty/chromium/components/paint_preview/browser/paint_preview_client.cc +@@ -310,8 +310,8 @@ void PaintPreviewClient::CapturePaintPreview( + metadata->set_url(url.spec()); + metadata->set_version(kPaintPreviewVersion); + auto* chromeVersion = metadata->mutable_chrome_version(); +- chromeVersion->set_major(CHROME_VERSION_MAJOR); +- chromeVersion->set_minor(CHROME_VERSION_MINOR); ++ chromeVersion->set_gmajor(CHROME_VERSION_MAJOR); ++ chromeVersion->set_gminor(CHROME_VERSION_MINOR); + chromeVersion->set_build(CHROME_VERSION_BUILD); + chromeVersion->set_patch(CHROME_VERSION_PATCH); + document_data.callback = std::move(callback); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_paint__preview_player_player__compositor__delegate.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_paint__preview_player_player__compositor__delegate.cc new file mode 100644 index 000000000000..43b3203fc18b --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_paint__preview_player_player__compositor__delegate.cc @@ -0,0 +1,13 @@ +--- src/3rdparty/chromium/components/paint_preview/player/player_compositor_delegate.cc.orig 2023-03-09 06:31:50 UTC ++++ src/3rdparty/chromium/components/paint_preview/player/player_compositor_delegate.cc +@@ -452,8 +452,8 @@ void PlayerCompositorDelegate::ValidateProtoAndLoadAXT + // use the AXTreeUpdate. + auto chrome_version = capture_result_->proto.metadata().chrome_version(); + if (capture_result_->proto.metadata().has_chrome_version() && +- chrome_version.major() == CHROME_VERSION_MAJOR && +- chrome_version.minor() == CHROME_VERSION_MINOR && ++ chrome_version.gmajor() == CHROME_VERSION_MAJOR && ++ chrome_version.gminor() == CHROME_VERSION_MINOR && + chrome_version.build() == CHROME_VERSION_BUILD && + chrome_version.patch() == CHROME_VERSION_PATCH) { + paint_preview_service_->GetFileMixin()->GetAXTreeUpdate( diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_password__manager_core_browser_features_password__features.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_password__manager_core_browser_features_password__features.cc new file mode 100644 index 000000000000..01678c9ccaf3 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_password__manager_core_browser_features_password__features.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/password_manager/core/browser/features/password_features.cc.orig 2023-10-27 05:38:38 UTC ++++ src/3rdparty/chromium/components/password_manager/core/browser/features/password_features.cc +@@ -27,7 +27,7 @@ BASE_FEATURE(kBiometricTouchToFill, + // Delete undecryptable passwords from the store when Sync is active. + BASE_FEATURE(kClearUndecryptablePasswordsOnSync, + "ClearUndecryptablePasswordsInSync", +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + base::FEATURE_ENABLED_BY_DEFAULT + #else + base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_password__manager_core_browser_sync_password__sync__bridge.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_password__manager_core_browser_sync_password__sync__bridge.cc new file mode 100644 index 000000000000..93e1c684834f --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_password__manager_core_browser_sync_password__sync__bridge.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/password_manager/core/browser/sync/password_sync_bridge.cc.orig 2023-10-27 05:38:38 UTC ++++ src/3rdparty/chromium/components/password_manager/core/browser/sync/password_sync_bridge.cc +@@ -197,7 +197,7 @@ bool ShouldRecoverPasswordsDuringMerge() { + } + + bool ShouldCleanSyncMetadataDuringStartupWhenDecryptionFails() { +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return ShouldRecoverPasswordsDuringMerge() && + base::FeatureList::IsEnabled( + features::kForceInitialSyncWhenDecryptionFails); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_password__manager_core_common_password__manager__features.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_password__manager_core_common_password__manager__features.cc index 6e905d43147c..a43967c49118 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_password__manager_core_common_password__manager__features.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_password__manager_core_common_password__manager__features.cc @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/components/password_manager/core/common/password_manager_features.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/components/password_manager/core/common/password_manager_features.cc.orig 2023-10-27 05:38:38 UTC +++ src/3rdparty/chromium/components/password_manager/core/common/password_manager_features.cc -@@ -76,7 +76,7 @@ BASE_FEATURE(kFillOnAccountSelect, - "fill-on-account-select", +@@ -18,7 +18,7 @@ BASE_FEATURE(kEnableOverwritingPlaceholderUsernames, + "EnableOverwritingPlaceholderUsernames", base::FEATURE_DISABLED_BY_DEFAULT); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) @@ -9,12 +9,3 @@ // When enabled, initial sync will be forced during startup if the password // store has encryption service failures. BASE_FEATURE(kForceInitialSyncWhenDecryptionFails, -@@ -197,7 +197,7 @@ BASE_FEATURE(kPasswordStrengthIndicator, - "PasswordStrengthIndicator", - base::FEATURE_DISABLED_BY_DEFAULT); - --#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // Displays at least the decryptable and never saved logins in the password - // manager - BASE_FEATURE(kSkipUndecryptablePasswords, diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_password__manager_core_common_password__manager__features.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_password__manager_core_common_password__manager__features.h index 01f51114dce4..38d2d8679d7d 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_password__manager_core_common_password__manager__features.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_password__manager_core_common_password__manager__features.h @@ -1,20 +1,11 @@ ---- src/3rdparty/chromium/components/password_manager/core/common/password_manager_features.h.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/components/password_manager/core/common/password_manager_features.h.orig 2023-10-27 05:38:38 UTC +++ src/3rdparty/chromium/components/password_manager/core/common/password_manager_features.h -@@ -35,7 +35,7 @@ BASE_DECLARE_FEATURE(kEnablePasswordGenerationForClear - BASE_DECLARE_FEATURE(kEnablePasswordManagerWithinFencedFrame); - BASE_DECLARE_FEATURE(kFillingAcrossAffiliatedWebsites); - BASE_DECLARE_FEATURE(kFillOnAccountSelect); +@@ -24,7 +24,7 @@ namespace password_manager::features { + // alongside the definition of their values in the .cc file. + BASE_DECLARE_FEATURE(kEnableOverwritingPlaceholderUsernames); + -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kForceInitialSyncWhenDecryptionFails); #endif - BASE_DECLARE_FEATURE(kInferConfirmationPasswordField); -@@ -67,7 +67,7 @@ BASE_DECLARE_FEATURE(kRecoverFromNeverSaveAndroid); - #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS) // Desktop - BASE_DECLARE_FEATURE(kRevampedPasswordManagementBubble); - #endif --#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - BASE_DECLARE_FEATURE(kSkipUndecryptablePasswords); - #endif - #if BUILDFLAG(IS_ANDROID) + BASE_DECLARE_FEATURE(kForgotPasswordFormSupport); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_performance__manager_public_features.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_performance__manager_public_features.h index 4b534d0d55ea..c16bc41b33e8 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_performance__manager_public_features.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_performance__manager_public_features.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/components/performance_manager/public/features.h.orig 2022-11-30 08:12:58 UTC +--- src/3rdparty/chromium/components/performance_manager/public/features.h.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/components/performance_manager/public/features.h -@@ -20,7 +20,7 @@ BASE_DECLARE_FEATURE(kRunOnMainThread); +@@ -28,7 +28,7 @@ BASE_DECLARE_FEATURE(kRunOnDedicatedThreadPoolThread); #if !BUILDFLAG(IS_ANDROID) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_permissions_prediction__service_prediction__common.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_permissions_prediction__service_prediction__common.cc new file mode 100644 index 000000000000..67fbbfb894e4 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_permissions_prediction__service_prediction__common.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/components/permissions/prediction_service/prediction_common.cc.orig 2022-08-31 12:19:35 UTC ++++ src/3rdparty/chromium/components/permissions/prediction_service/prediction_common.cc +@@ -33,7 +33,7 @@ int BucketizeValue(int count) { + + ClientFeatures_Platform GetCurrentPlatformProto() { + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + return permissions::ClientFeatures_Platform_PLATFORM_DESKTOP; + #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + return permissions::ClientFeatures_Platform_PLATFORM_MOBILE; +@@ -44,7 +44,7 @@ ClientFeatures_Platform GetCurrentPlatformProto() { + + ClientFeatures_PlatformEnum GetCurrentPlatformEnumProto() { + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + return permissions::ClientFeatures_PlatformEnum_PLATFORM_DESKTOP_V2; + #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + return permissions::ClientFeatures_PlatformEnum_PLATFORM_MOBILE_V2; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_policy_core_browser_policy__pref__mapping__test.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_policy_core_browser_policy__pref__mapping__test.cc new file mode 100644 index 000000000000..ef087ec77852 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_policy_core_browser_policy__pref__mapping__test.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/policy/core/browser/policy_pref_mapping_test.cc.orig 2023-04-28 17:01:32 UTC ++++ src/3rdparty/chromium/components/policy/core/browser/policy_pref_mapping_test.cc +@@ -327,7 +327,7 @@ class PolicyTestCase { + const std::string os("chromeos_lacros"); + #elif BUILDFLAG(IS_IOS) + const std::string os("ios"); +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + const std::string os("linux"); + #elif BUILDFLAG(IS_MAC) + const std::string os("mac"); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_policy_core_common_cloud_cloud__policy__client.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_policy_core_common_cloud_cloud__policy__client.cc new file mode 100644 index 000000000000..54ac5041816a --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_policy_core_common_cloud_cloud__policy__client.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/policy/core/common/cloud/cloud_policy_client.cc.orig 2023-05-31 08:12:17 UTC ++++ src/3rdparty/chromium/components/policy/core/common/cloud/cloud_policy_client.cc +@@ -455,7 +455,7 @@ void CloudPolicyClient::FetchPolicy() { + fetch_request->set_invalidation_payload(invalidation_payload_); + } + } +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Only set browser device identifier for CBCM Chrome cloud policy on + // desktop. + if (type_to_fetch.first == diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_policy_core_common_cloud_cloud__policy__util.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_policy_core_common_cloud_cloud__policy__util.cc new file mode 100644 index 000000000000..2a5e84693fdb --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_policy_core_common_cloud_cloud__policy__util.cc @@ -0,0 +1,55 @@ +--- src/3rdparty/chromium/components/policy/core/common/cloud/cloud_policy_util.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/components/policy/core/common/cloud/cloud_policy_util.cc +@@ -20,7 +20,7 @@ + #endif + + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ +- BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + #include <pwd.h> + #include <sys/types.h> + #include <unistd.h> +@@ -35,10 +35,15 @@ + #import <SystemConfiguration/SCDynamicStoreCopySpecific.h> + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + #include <limits.h> // For HOST_NAME_MAX + #endif + ++#if BUILDFLAG(IS_FREEBSD) ++#include <sys/param.h> ++#define HOST_NAME_MAX MAXHOSTNAMELEN ++#endif ++ + #include <algorithm> + #include <utility> + +@@ -86,7 +91,7 @@ namespace em = enterprise_management; + + std::string GetMachineName() { + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + char hostname[HOST_NAME_MAX]; + if (gethostname(hostname, HOST_NAME_MAX) == 0) // Success. + return hostname; +@@ -144,7 +149,7 @@ std::string GetMachineName() { + + std::string GetOSVersion() { + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_APPLE) || \ +- BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + return base::SysInfo::OperatingSystemVersion(); + #elif BUILDFLAG(IS_WIN) + base::win::OSInfo::VersionNumber version_number = +@@ -167,7 +172,7 @@ std::string GetOSArchitecture() { + } + + std::string GetOSUsername() { +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) + struct passwd* creds = getpwuid(getuid()); + if (!creds || !creds->pw_name) + return std::string(); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_policy_core_common_policy__loader__common.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_policy_core_common_policy__loader__common.cc new file mode 100644 index 000000000000..9e7c70f6615e --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_policy_core_common_policy__loader__common.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/components/policy/core/common/policy_loader_common.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/components/policy/core/common/policy_loader_common.cc +@@ -46,7 +46,7 @@ const char* kSensitivePolicies[] = { + key::kDefaultSearchProviderEnabled, + key::kSafeBrowsingEnabled, + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + key::kAutoOpenFileTypes, + key::kSafeBrowsingAllowlistDomains, + key::kHomepageIsNewTabPage, +@@ -55,7 +55,7 @@ const char* kSensitivePolicies[] = { + key::kRestoreOnStartup, + key::kRestoreOnStartupURLs, + #endif +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + key::kCommandLineFlagSecurityWarningsEnabled, + #endif + #if !BUILDFLAG(IS_IOS) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_policy_core_common_policy__paths.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_policy_core_common_policy__paths.cc new file mode 100644 index 000000000000..d9ed95b999a8 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_policy_core_common_policy__paths.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/policy/core/common/policy_paths.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/components/policy/core/common/policy_paths.cc +@@ -16,6 +16,8 @@ namespace policy { + #if BUILDFLAG(GOOGLE_CHROME_BRANDING) || \ + BUILDFLAG(GOOGLE_CHROME_FOR_TESTING_BRANDING) + const char kPolicyPath[] = "/etc/opt/chrome/policies"; ++#elif BUILDFLAG(IS_FREEBSD) ++const char kPolicyPath[] = "/usr/local/etc/chromium/policies"; + #else + const char kPolicyPath[] = "/etc/chromium/policies"; + #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) || \ diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_policy_tools_generate__policy__source.py b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_policy_tools_generate__policy__source.py new file mode 100644 index 000000000000..fb0b794ebdc6 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_policy_tools_generate__policy__source.py @@ -0,0 +1,14 @@ +--- src/3rdparty/chromium/components/policy/tools/generate_policy_source.py.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/components/policy/tools/generate_policy_source.py +@@ -37,9 +37,9 @@ PLATFORM_STRINGS = { + 'ios': ['ios'], + 'fuchsia': ['fuchsia'], + 'chrome.win': ['win'], +- 'chrome.linux': ['linux'], ++ 'chrome.linux': ['linux', 'openbsd', 'freebsd'], + 'chrome.mac': ['mac'], +- 'chrome.*': ['win', 'mac', 'linux'], ++ 'chrome.*': ['win', 'mac', 'linux', 'openbsd', 'freebsd'], + 'chrome.win7': ['win'], + } + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_power__metrics_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_power__metrics_BUILD.gn new file mode 100644 index 000000000000..27faeb446ffb --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_power__metrics_BUILD.gn @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/power_metrics/BUILD.gn.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/components/power_metrics/BUILD.gn +@@ -41,7 +41,7 @@ static_library("power_metrics") { + ldflags = [ "/DELAYLOAD:setupapi.dll" ] + } + +- if (is_linux || is_chromeos) { ++ if ((is_linux && !is_bsd) || is_chromeos) { + sources += [ + "energy_metrics_provider_linux.cc", + "energy_metrics_provider_linux.h", diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_power__metrics_energy__metrics__provider.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_power__metrics_energy__metrics__provider.cc new file mode 100644 index 000000000000..8858d3024b34 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_power__metrics_energy__metrics__provider.cc @@ -0,0 +1,21 @@ +--- src/3rdparty/chromium/components/power_metrics/energy_metrics_provider.cc.orig 2023-08-17 07:33:31 UTC ++++ src/3rdparty/chromium/components/power_metrics/energy_metrics_provider.cc +@@ -9,6 +9,8 @@ + #include "components/power_metrics/energy_metrics_provider_win.h" + #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + #include "components/power_metrics/energy_metrics_provider_linux.h" ++#elif BUILDFLAG(IS_BSD) ++#include "base/notreached.h" + #endif // BUILDFLAG(IS_WIN) + + namespace power_metrics { +@@ -22,6 +24,9 @@ std::unique_ptr<EnergyMetricsProvider> EnergyMetricsPr + return EnergyMetricsProviderWin::Create(); + #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + return EnergyMetricsProviderLinux::Create(); ++#elif BUILDFLAG(IS_BSD) ++ NOTIMPLEMENTED(); ++ return nullptr; + #else + return nullptr; + #endif // BUILDFLAG(IS_WIN) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_safe__browsing_content_resources_gen__file__type__proto.py b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_safe__browsing_content_resources_gen__file__type__proto.py new file mode 100644 index 000000000000..bdf0bdb12355 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_safe__browsing_content_resources_gen__file__type__proto.py @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/components/safe_browsing/content/resources/gen_file_type_proto.py.orig 2023-01-11 09:17:16 UTC ++++ src/3rdparty/chromium/components/safe_browsing/content/resources/gen_file_type_proto.py +@@ -38,6 +38,8 @@ def PlatformTypes(): + "fuchsia": + download_file_types_pb2.DownloadFileType.PLATFORM_TYPE_FUCHSIA, + "linux": download_file_types_pb2.DownloadFileType.PLATFORM_TYPE_LINUX, ++ "openbsd": download_file_types_pb2.DownloadFileType.PLATFORM_TYPE_LINUX, ++ "freebsd": download_file_types_pb2.DownloadFileType.PLATFORM_TYPE_LINUX, + "mac": download_file_types_pb2.DownloadFileType.PLATFORM_TYPE_MAC, + "win": download_file_types_pb2.DownloadFileType.PLATFORM_TYPE_WINDOWS, + } +@@ -181,7 +183,7 @@ class DownloadFileTypeProtoGenerator(BinaryProtoGenera + '-t', + '--type', + help='The platform type. One of android, chromeos, ' + +- 'linux, mac, win') ++ 'linux, mac, win, openbsd, freebsd') + + def AddExtraCommandLineArgsForVirtualEnvRun(self, opts, command): + if opts.type is not None: diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_safe__browsing_core_browser_db_v4__protocol__manager__util.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_safe__browsing_core_browser_db_v4__protocol__manager__util.cc new file mode 100644 index 000000000000..6bfbade8af4e --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_safe__browsing_core_browser_db_v4__protocol__manager__util.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/safe_browsing/core/browser/db/v4_protocol_manager_util.cc.orig 2023-04-28 17:01:32 UTC ++++ src/3rdparty/chromium/components/safe_browsing/core/browser/db/v4_protocol_manager_util.cc +@@ -117,7 +117,7 @@ std::ostream& operator<<(std::ostream& os, const ListI + PlatformType GetCurrentPlatformType() { + #if BUILDFLAG(IS_WIN) + return WINDOWS_PLATFORM; +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + return LINUX_PLATFORM; + #elif BUILDFLAG(IS_IOS) + return IOS_PLATFORM; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_safe__browsing_core_browser_realtime_url__lookup__service__base.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_safe__browsing_core_browser_realtime_url__lookup__service__base.cc new file mode 100644 index 000000000000..a1dc6484a884 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_safe__browsing_core_browser_realtime_url__lookup__service__base.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/safe_browsing/core/browser/realtime/url_lookup_service_base.cc.orig 2022-02-28 16:54:41 UTC ++++ src/3rdparty/chromium/components/safe_browsing/core/browser/realtime/url_lookup_service_base.cc +@@ -109,7 +109,7 @@ RTLookupRequest::OSType GetRTLookupRequestOSType() { + return RTLookupRequest::OS_TYPE_FUCHSIA; + #elif BUILDFLAG(IS_IOS) + return RTLookupRequest::OS_TYPE_IOS; +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return RTLookupRequest::OS_TYPE_LINUX; + #elif BUILDFLAG(IS_MAC) + return RTLookupRequest::OS_TYPE_MAC; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_segmentation__platform_embedder_default__model_cross__device__user__segment.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_segmentation__platform_embedder_default__model_cross__device__user__segment.cc new file mode 100644 index 000000000000..69a7909e2f4e --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_segmentation__platform_embedder_default__model_cross__device__user__segment.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/segmentation_platform/embedder/default_model/cross_device_user_segment.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/components/segmentation_platform/embedder/default_model/cross_device_user_segment.cc +@@ -179,7 +179,7 @@ void CrossDeviceUserSegment::ExecuteModelWithInput( + // Check for current device type and subtract it from the device count + // calculation. + #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + desktop_count -= 1; + #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) + if (ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_TABLET) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.cc new file mode 100644 index 000000000000..a6c20612bade --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.cc @@ -0,0 +1,29 @@ +--- src/3rdparty/chromium/components/services/paint_preview_compositor/paint_preview_compositor_collection_impl.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/components/services/paint_preview_compositor/paint_preview_compositor_collection_impl.cc +@@ -21,7 +21,7 @@ + + #if BUILDFLAG(IS_WIN) + #include "content/public/child/dwrite_font_proxy_init_win.h" +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "components/services/font/public/cpp/font_loader.h" + #endif + +@@ -78,7 +78,7 @@ PaintPreviewCompositorCollectionImpl::PaintPreviewComp + // Initialize font access for Skia. + #if BUILDFLAG(IS_WIN) + content::InitializeDWriteFontProxy(); +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + mojo::PendingRemote<font_service::mojom::FontService> font_service; + content::UtilityThread::Get()->BindHostReceiver( + font_service.InitWithNewPipeAndPassReceiver()); +@@ -101,7 +101,7 @@ PaintPreviewCompositorCollectionImpl::PaintPreviewComp + base::BindOnce([] { SkFontMgr::RefDefault(); })); + + // Sanity check that fonts are working. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // No WebSandbox is provided on Linux so the local fonts aren't accessible. + // This is fine since since the subsetted fonts are provided in the SkPicture. + // However, we still need to check that the SkFontMgr starts as it is used by diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.cc index 23f0ffd45cb3..2e9a316712ba 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/components/services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/components/services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/components/services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.cc @@ -53,6 +53,7 @@ bool ScreenAIPreSandboxHook(sandbox::policy::SandboxLi } @@ -8,7 +8,7 @@ auto* instance = sandbox::policy::SandboxLinux::GetInstance(); std::vector<BrokerFilePermission> permissions{ -@@ -76,6 +77,7 @@ bool ScreenAIPreSandboxHook(sandbox::policy::SandboxLi +@@ -82,6 +83,7 @@ bool ScreenAIPreSandboxHook(sandbox::policy::SandboxLi sandbox::syscall_broker::COMMAND_OPEN}), permissions, sandbox::policy::SandboxLinux::PreSandboxHook(), options); instance->EngageNamespaceSandboxIfPossible(); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.h index 4a345456a725..6b7b6ea44244 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/components/services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.h.orig 2022-04-21 18:48:31 UTC +--- src/3rdparty/chromium/components/services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.h.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/components/services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.h @@ -5,7 +5,13 @@ #ifndef COMPONENTS_SERVICES_SCREEN_AI_SANDBOX_SCREEN_AI_SANDBOX_HOOK_LINUX_H_ @@ -7,7 +7,7 @@ +#include "build/build_config.h" + +#if BUILDFLAG(IS_BSD) -+#include "sandbox/policy/openbsd/sandbox_openbsd.h" ++#include "sandbox/policy/sandbox.h" +#else #include "sandbox/policy/linux/sandbox_linux.h" +#endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_services_screen__ai_screen__ai__library__wrapper.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_services_screen__ai_screen__ai__library__wrapper.cc new file mode 100644 index 000000000000..60d321baf24c --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_services_screen__ai_screen__ai__library__wrapper.cc @@ -0,0 +1,29 @@ +--- src/3rdparty/chromium/components/services/screen_ai/screen_ai_library_wrapper.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/components/services/screen_ai/screen_ai_library_wrapper.cc +@@ -187,7 +187,7 @@ ScreenAILibraryWrapper::PerformOcr(const SkBitmap& ima + + // TODO(crbug.com/1443341): Remove this after fixing the crash issue on Linux + // official. +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + free_library_allocated_char_array_(library_buffer.release()); + #endif + +@@ -219,7 +219,7 @@ ScreenAILibraryWrapper::ExtractLayout(const SkBitmap& + + // TODO(crbug.com/1443341): Remove this after fixing the crash issue on Linux + // official. +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + free_library_allocated_char_array_(library_buffer.release()); + #endif + +@@ -253,7 +253,7 @@ absl::optional<std::vector<int32_t>> ScreenAILibraryWr + + // TODO(crbug.com/1443341): Remove this after fixing the crash issue on Linux + // official. +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + free_library_allocated_int32_array_(library_buffer.release()); + #endif + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_startup__metric__utils_common_startup__metric__utils.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_startup__metric__utils_common_startup__metric__utils.cc new file mode 100644 index 000000000000..f1659cc70599 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_startup__metric__utils_common_startup__metric__utils.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/startup_metric_utils/common/startup_metric_utils.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/components/startup_metric_utils/common/startup_metric_utils.cc +@@ -78,7 +78,7 @@ base::TimeTicks CommonStartupMetricRecorder::StartupTi + // Enabling this logic on OS X causes a significant performance regression. + // TODO(crbug.com/601270): Remove IS_APPLE ifdef once priority changes are + // ignored on Mac main thread. +-#if !BUILDFLAG(IS_APPLE) ++#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) + static bool statics_initialized = false; + if (!statics_initialized) { + statics_initialized = true; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_BUILD.gn index 516f089d4638..1318ba5b920a 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_BUILD.gn @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/components/storage_monitor/BUILD.gn.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/components/storage_monitor/BUILD.gn.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/components/storage_monitor/BUILD.gn @@ -75,7 +75,7 @@ jumbo_static_library("storage_monitor") { deps += [ "//services/device/public/mojom" ] diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_supervised__user_core_browser_proto__fetcher.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_supervised__user_core_browser_proto__fetcher.cc new file mode 100644 index 000000000000..011f6a2d4585 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_supervised__user_core_browser_proto__fetcher.cc @@ -0,0 +1,39 @@ +--- src/3rdparty/chromium/components/supervised_user/core/browser/proto_fetcher.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/components/supervised_user/core/browser/proto_fetcher.cc +@@ -398,8 +398,11 @@ class RetryingFetcherImpl final : public DeferredFetch + // Not copyable. + RetryingFetcherImpl(const RetryingFetcherImpl&) = delete; + RetryingFetcherImpl& operator=(const RetryingFetcherImpl&) = delete; +- ++#if defined(__clang__) && (__clang_major__ >= 15) + void Start(ProtoFetcher<Response>::Callback callback) override { ++#else ++ void Start(typename ProtoFetcher<Response>::Callback callback) override { ++#endif + callback_ = std::move(callback); + Retry(); + } +@@ -435,7 +438,11 @@ class RetryingFetcherImpl final : public DeferredFetch + } + + // Client callback. ++#if defined(__clang__) && (__clang_major__ >= 15) + ProtoFetcher<Response>::Callback callback_; ++#else ++ typename ProtoFetcher<Response>::Callback callback_; ++#endif + + // Retry controls. + base::OneShotTimer timer_; +@@ -578,7 +585,11 @@ ParallelFetchManager<Request, Response>::ParallelFetch + template <typename Request, typename Response> + void ParallelFetchManager<Request, Response>::Fetch( + const Request& request, ++#if defined(__clang__) && (__clang_major__ >= 15) + Fetcher::Callback callback) { ++#else ++ typename Fetcher::Callback callback) { ++#endif + CHECK(callback) << "Use base::DoNothing() instead of empty callback."; + KeyType key = requests_in_flight_.Add(MakeFetcher(request)); + requests_in_flight_.Lookup(key)->Start( diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_supervised__user_core_browser_proto__fetcher.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_supervised__user_core_browser_proto__fetcher.h new file mode 100644 index 000000000000..e84de128d3f5 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_supervised__user_core_browser_proto__fetcher.h @@ -0,0 +1,21 @@ +--- src/3rdparty/chromium/components/supervised_user/core/browser/proto_fetcher.h.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/components/supervised_user/core/browser/proto_fetcher.h +@@ -165,10 +165,18 @@ class ParallelFetchManager { + + // Starts the fetch. Underlying fetcher is stored internally, and will be + // cleaned up after finish or when this manager is destroyed. ++#if defined(__clang__) && (__clang_major__ >= 15) + void Fetch(const Request& request, Fetcher::Callback callback); ++#else ++ void Fetch(const Request& request, typename Fetcher::Callback callback); ++#endif + + private: ++#if defined(__clang__) && (__clang_major__ >= 15) + using KeyType = base::IDMap<std::unique_ptr<Fetcher>>::KeyType; ++#else ++ using KeyType = typename base::IDMap<std::unique_ptr<Fetcher>>::KeyType; ++#endif + + // Remove fetcher under key from requests_in_flight_. + void Remove(KeyType key); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_supervised__user_core_browser_supervised__user__service.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_supervised__user_core_browser_supervised__user__service.cc new file mode 100644 index 000000000000..eac3cbdb5091 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_supervised__user_core_browser_supervised__user__service.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/supervised_user/core/browser/supervised_user_service.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/components/supervised_user/core/browser/supervised_user_service.cc +@@ -206,7 +206,7 @@ FirstTimeInterstitialBannerState SupervisedUserService + const FirstTimeInterstitialBannerState original_state) { + FirstTimeInterstitialBannerState target_state = original_state; + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_IOS) ++ BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) + if (supervised_user::CanDisplayFirstTimeInterstitialBanner()) { + if (original_state != FirstTimeInterstitialBannerState::kSetupComplete && + can_show_first_time_interstitial_banner_) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_sync__device__info_local__device__info__util.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_sync__device__info_local__device__info__util.cc new file mode 100644 index 000000000000..4c825d79ccdb --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_sync__device__info_local__device__info__util.cc @@ -0,0 +1,29 @@ +--- src/3rdparty/chromium/components/sync_device_info/local_device_info_util.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/components/sync_device_info/local_device_info_util.cc +@@ -82,7 +82,7 @@ void OnMachineStatisticsLoaded(LocalDeviceNameInfo* na + sync_pb::SyncEnums::DeviceType GetLocalDeviceType() { + #if BUILDFLAG(IS_CHROMEOS) + return sync_pb::SyncEnums_DeviceType_TYPE_CROS; +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return sync_pb::SyncEnums_DeviceType_TYPE_LINUX; + #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) + switch (ui::GetDeviceFormFactor()) { +@@ -107,7 +107,7 @@ DeviceInfo::OsType GetLocalDeviceOSType() { + return DeviceInfo::OsType::kChromeOsAsh; + #elif BUILDFLAG(IS_CHROMEOS_LACROS) + return DeviceInfo::OsType::kChromeOsLacros; +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return DeviceInfo::OsType::kLinux; + #elif BUILDFLAG(IS_ANDROID) + return DeviceInfo::OsType::kAndroid; +@@ -126,7 +126,7 @@ DeviceInfo::OsType GetLocalDeviceOSType() { + + DeviceInfo::FormFactor GetLocalDeviceFormFactor() { + #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + return DeviceInfo::FormFactor::kDesktop; + #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) + return ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_TABLET diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_sync__device__info_local__device__info__util__linux.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_sync__device__info_local__device__info__util__linux.cc new file mode 100644 index 000000000000..7ce16715d205 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_sync__device__info_local__device__info__util__linux.cc @@ -0,0 +1,14 @@ +--- src/3rdparty/chromium/components/sync_device_info/local_device_info_util_linux.cc.orig 2022-09-24 10:57:32 UTC ++++ src/3rdparty/chromium/components/sync_device_info/local_device_info_util_linux.cc +@@ -9,6 +9,11 @@ + + #include "base/linux_util.h" + ++#if defined(__FreeBSD__) ++#include <sys/param.h> ++#define HOST_NAME_MAX MAXHOSTNAMELEN ++#endif ++ + namespace syncer { + + std::string GetPersonalizableDeviceNameInternal() { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_update__client_update__query__params.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_update__client_update__query__params.cc new file mode 100644 index 000000000000..8e39f14d2c90 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_update__client_update__query__params.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/update_client/update_query_params.cc.orig 2023-07-16 15:47:57 UTC ++++ src/3rdparty/chromium/components/update_client/update_query_params.cc +@@ -42,6 +42,8 @@ const char kOs[] = + "fuchsia"; + #elif BUILDFLAG(IS_OPENBSD) + "openbsd"; ++#elif defined(OS_FREEBSD) ++ "freebsd"; + #else + #error "unknown os" + #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_url__formatter_spoof__checks_idn__spoof__checker.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_url__formatter_spoof__checks_idn__spoof__checker.cc index 844f2cc5b7d5..ffe19ad21e15 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_url__formatter_spoof__checks_idn__spoof__checker.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_url__formatter_spoof__checks_idn__spoof__checker.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/components/url_formatter/spoof_checks/idn_spoof_checker.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/components/url_formatter/spoof_checks/idn_spoof_checker.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/components/url_formatter/spoof_checks/idn_spoof_checker.cc -@@ -292,7 +292,7 @@ IDNSpoofChecker::IDNSpoofChecker() { +@@ -293,7 +293,7 @@ IDNSpoofChecker::IDNSpoofChecker() { // The ideal fix would be to change the omnibox font used for Thai. In // that case, the Linux-only list should be revisited and potentially // removed. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_user__education_views_help__bubble__view.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_user__education_views_help__bubble__view.cc new file mode 100644 index 000000000000..bb21c601c3c9 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_user__education_views_help__bubble__view.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/user_education/views/help_bubble_view.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/components/user_education/views/help_bubble_view.cc +@@ -991,7 +991,7 @@ gfx::Rect HelpBubbleView::GetAnchorRect() const { + void HelpBubbleView::OnBeforeBubbleWidgetInit(views::Widget::InitParams* params, + views::Widget* widget) const { + BubbleDialogDelegateView::OnBeforeBubbleWidgetInit(params, widget); +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Help bubbles anchored to menus may be clipped to their anchors' bounds, + // resulting in visual errors, unless they use accelerated rendering. See + // crbug.com/1445770 for details. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_variations_service_google__groups__updater__service.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_variations_service_google__groups__updater__service.cc new file mode 100644 index 000000000000..3086aa685276 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_variations_service_google__groups__updater__service.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/variations/service/google_groups_updater_service.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/components/variations/service/google_groups_updater_service.cc +@@ -15,7 +15,7 @@ + // information from per-profile data to local-state. + BASE_FEATURE(kVariationsGoogleGroupFiltering, + "VariationsGoogleGroupFiltering", +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + base::FEATURE_ENABLED_BY_DEFAULT + #else + // TODO(b/286365351): launch on Android, iOS and ChromeOS. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_variations_service_variations__service.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_variations_service_variations__service.cc new file mode 100644 index 000000000000..7b28e911fd3e --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_variations_service_variations__service.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/variations/service/variations_service.cc.orig 2023-05-31 08:12:17 UTC ++++ src/3rdparty/chromium/components/variations/service/variations_service.cc +@@ -95,7 +95,7 @@ std::string GetPlatformString() { + return "android"; + #elif BUILDFLAG(IS_FUCHSIA) + return "fuchsia"; +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_SOLARIS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_SOLARIS) || BUILDFLAG(IS_BSD) + // Default BSD and SOLARIS to Linux to not break those builds, although these + // platforms are not officially supported by Chrome. + return "linux"; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_viz_common_gpu_dawn__context__provider.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_viz_common_gpu_dawn__context__provider.cc deleted file mode 100644 index b67426e510f3..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_viz_common_gpu_dawn__context__provider.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/components/viz/common/gpu/dawn_context_provider.cc.orig 2022-02-28 16:54:41 UTC -+++ src/3rdparty/chromium/components/viz/common/gpu/dawn_context_provider.cc -@@ -20,7 +20,7 @@ namespace { - wgpu::BackendType GetDefaultBackendType() { - #if BUILDFLAG(IS_WIN) - return wgpu::BackendType::D3D12; --#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - return wgpu::BackendType::Vulkan; - #else - NOTREACHED(); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_viz_host_renderer__settings__creation.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_viz_host_renderer__settings__creation.cc deleted file mode 100644 index b6ddc3aeb62c..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_viz_host_renderer__settings__creation.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/components/viz/host/renderer_settings_creation.cc.orig 2022-02-28 16:54:41 UTC -+++ src/3rdparty/chromium/components/viz/host/renderer_settings_creation.cc -@@ -52,7 +52,7 @@ RendererSettings CreateRendererSettings() { - renderer_settings.partial_swap_enabled = - !command_line->HasSwitch(switches::kUIDisablePartialSwap); - --#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // Simple frame rate throttling only works on macOS and Linux - renderer_settings.apply_simple_frame_rate_throttling = - features::IsSimpleFrameRateThrottlingEnabled(); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_viz_service_display__embedder_skia__output__surface__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_viz_service_display__embedder_skia__output__surface__impl.cc index d94d56e6ed9a..fc18626498c3 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_viz_service_display__embedder_skia__output__surface__impl.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_viz_service_display__embedder_skia__output__surface__impl.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/components/viz/service/display_embedder/skia_output_surface_impl.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/components/viz/service/display_embedder/skia_output_surface_impl.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/components/viz/service/display_embedder/skia_output_surface_impl.cc -@@ -1259,7 +1259,7 @@ GrBackendFormat SkiaOutputSurfaceImpl::GetGrBackendFor +@@ -1485,7 +1485,7 @@ GrBackendFormat SkiaOutputSurfaceImpl::GetGrBackendFor ->GetDeviceQueue() ->GetVulkanPhysicalDevice(), VK_IMAGE_TILING_OPTIMAL, ycbcr_info); @@ -8,4 +8,4 @@ +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Textures that were allocated _on linux_ with ycbcr info came from // VaapiVideoDecoder, which exports using DRM format modifiers. - return GrBackendFormat::MakeVk(gr_ycbcr_info, + return GrBackendFormats::MakeVk(gr_ycbcr_info, diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_viz_service_display__embedder_skia__output__surface__impl__on__gpu.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_viz_service_display__embedder_skia__output__surface__impl__on__gpu.cc new file mode 100644 index 000000000000..edde402f0b2b --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_viz_service_display__embedder_skia__output__surface__impl__on__gpu.cc @@ -0,0 +1,16 @@ +--- src/3rdparty/chromium/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc +@@ -1521,7 +1521,12 @@ void SkiaOutputSurfaceImplOnGpu::CopyOutputNV12( + + // Issue readbacks from the surfaces: + for (size_t i = 0; i < CopyOutputResult::kNV12MaxPlanes; ++i) { +- SkISize size{plane_surfaces[i]->width(), plane_surfaces[i]->height()}; ++#if defined(__clang__) && (__clang_major__ >= 16) ++ SkISize size(plane_surfaces[i]->width(), plane_surfaces[i]->height()); ++#else ++ SkISize s = { plane_surfaces[i]->width(), plane_surfaces[i]->height() }; ++ SkISize size(s); ++#endif + SkImageInfo dst_info = SkImageInfo::Make( + size, (i == 0) ? kAlpha_8_SkColorType : kR8G8_unorm_SkColorType, + kUnpremul_SkAlphaType); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_viz_service_display_skia__renderer.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_viz_service_display_skia__renderer.cc index 01be933c151f..a82120f17057 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_viz_service_display_skia__renderer.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_viz_service_display_skia__renderer.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/components/viz/service/display/skia_renderer.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/components/viz/service/display/skia_renderer.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/components/viz/service/display/skia_renderer.cc -@@ -1149,7 +1149,7 @@ void SkiaRenderer::ClearFramebuffer() { +@@ -1218,7 +1218,7 @@ void SkiaRenderer::ClearFramebuffer() { if (current_frame()->current_render_pass->has_transparent_background) { ClearCanvas(SkColors::kTransparent); } else { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc index e8f179652c9a..d56254e6b6a5 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc -@@ -98,7 +98,7 @@ RootCompositorFrameSinkImpl::Create( +@@ -110,7 +110,7 @@ RootCompositorFrameSinkImpl::Create( // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. @@ -9,7 +9,7 @@ // For X11, we need notify client about swap completion after resizing, so the // client can use it for synchronize with X11 WM. output_surface->SetNeedsSwapSizeNotifications(true); -@@ -585,7 +585,7 @@ void RootCompositorFrameSinkImpl::DisplayDidCompleteSw +@@ -709,7 +709,7 @@ void RootCompositorFrameSinkImpl::DisplayDidCompleteSw display_client_->DidCompleteSwapWithSize(pixel_size); // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h index 817f9307c9f1..c33ac3839d6f 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h -@@ -200,7 +200,7 @@ class VIZ_SERVICE_EXPORT RootCompositorFrameSinkImpl +@@ -211,7 +211,7 @@ class VIZ_SERVICE_EXPORT RootCompositorFrameSinkImpl // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_app_content__main.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_app_content__main.cc index 9df54ad2e565..e3db4f3c8780 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_app_content__main.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_app_content__main.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/content/app/content_main.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/content/app/content_main.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/content/app/content_main.cc @@ -207,7 +207,7 @@ RunContentProcess(ContentMainParams params, base::EnableTerminationOnOutOfMemory(); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_app_content__main__runner__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_app_content__main__runner__impl.cc index 453c8ae225c4..242f9043efcc 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_app_content__main__runner__impl.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_app_content__main__runner__impl.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/app/content_main_runner_impl.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/content/app/content_main_runner_impl.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/content/app/content_main_runner_impl.cc -@@ -139,13 +139,13 @@ +@@ -142,13 +142,13 @@ #include "content/browser/posix_file_descriptor_info_impl.h" #include "content/public/common/content_descriptors.h" @@ -16,21 +16,16 @@ #include "base/files/file_path_watcher_inotify.h" #include "base/native_library.h" #include "base/rand_util.h" -@@ -170,6 +170,11 @@ - #include "content/public/common/content_client.h" +@@ -183,12 +183,16 @@ + #include "content/public/common/zygote/zygote_handle.h" + #include "content/zygote/zygote_main.h" + #include "media/base/media_switches.h" ++#endif // BUILDFLAG(USE_ZYGOTE_HANDLE) + + #if BUILDFLAG(ENABLE_WEBRTC) + #include "third_party/webrtc_overrides/init_webrtc.h" // nogncheck #endif - -+//XXX -+#if BUILDFLAG(ENABLE_WEBRTC) -+#include "third_party/webrtc_overrides/init_webrtc.h" // nogncheck -+#endif -+ - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) - - #if BUILDFLAG(USE_ZYGOTE) -@@ -189,6 +194,10 @@ - #endif - #endif // BUILDFLAG(USE_ZYGOTE_HANDLE) +-#endif // BUILDFLAG(USE_ZYGOTE_HANDLE) +#if BUILDFLAG(IS_BSD) +#include "base/system/sys_info.h" @@ -39,7 +34,7 @@ #if BUILDFLAG(IS_ANDROID) #include "base/system/sys_info.h" #include "content/browser/android/battery_metrics.h" -@@ -377,7 +386,7 @@ void InitializeZygoteSandboxForBrowserProcess( +@@ -378,7 +382,7 @@ void InitializeZygoteSandboxForBrowserProcess( } #endif // BUILDFLAG(USE_ZYGOTE) @@ -48,17 +43,26 @@ #if BUILDFLAG(ENABLE_PPAPI) // Loads the (native) libraries but does not initialize them (i.e., does not -@@ -413,15 +422,17 @@ void PreloadLibraryCdms() { - } - #endif // BUILDFLAG(ENABLE_LIBRARY_CDMS) +@@ -416,7 +420,10 @@ void PreSandboxInit() { --#if BUILDFLAG(USE_ZYGOTE) -+#if BUILDFLAG(USE_ZYGOTE) || BUILDFLAG(IS_BSD) void PreSandboxInit() { - // Pre-acquire resources needed by BoringSSL. See + // Ensure the /dev/urandom is opened. ++ // we use arc4random ++#if !BUILDFLAG(IS_BSD) + base::GetUrandomFD(); ++#endif + + // May use sysinfo(), sched_getaffinity(), and open various /sys/ and /proc/ + // files. +@@ -427,9 +434,16 @@ void PreSandboxInit() { // https://boringssl.googlesource.com/boringssl/+/HEAD/SANDBOXING.md CRYPTO_pre_sandbox_init(); ++#if BUILDFLAG(IS_BSD) ++ // "cache" the amount of physical memory before pledge(2) ++ base::SysInfo::AmountOfPhysicalMemoryMB(); ++#endif ++ +#if !BUILDFLAG(IS_BSD) // Pre-read /proc/sys/fs/inotify/max_user_watches so it doesn't have to be // allowed by the sandbox. @@ -67,28 +71,7 @@ #if BUILDFLAG(ENABLE_PPAPI) // Ensure access to the Pepper plugins before the sandbox is turned on. -@@ -442,6 +453,11 @@ void PreSandboxInit() { - } - #endif - -+#if BUILDFLAG(IS_BSD) -+ // "cache" the amount of physical memory before pledge(2) -+ base::SysInfo::AmountOfPhysicalMemoryMB(); -+#endif -+ - // Set the android SkFontMgr for blink. We need to ensure this is done - // before the sandbox is initialized to allow the font manager to access - // font configuration files on disk. -@@ -629,7 +645,7 @@ int NO_STACK_PROTECTOR RunZygote(ContentMainDelegate* - delegate->ZygoteStarting(&zygote_fork_delegates); - media::InitializeMediaLibrary(); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - PreSandboxInit(); - #endif - -@@ -832,11 +848,10 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam +@@ -838,11 +852,10 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam kFieldTrialDescriptor + base::GlobalDescriptors::kBaseDescriptor); #endif // !BUILDFLAG(IS_ANDROID) @@ -102,8 +85,12 @@ #endif // !BUILDFLAG(IS_WIN) -@@ -1033,6 +1048,16 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam +@@ -1039,8 +1052,20 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam + process_type == switches::kZygoteProcess) { + PreSandboxInit(); } ++#elif BUILDFLAG(IS_BSD) ++ PreSandboxInit(); #endif +#if BUILDFLAG(IS_BSD) @@ -119,7 +106,7 @@ delegate_->SandboxInitialized(process_type); #if BUILDFLAG(USE_ZYGOTE) -@@ -1100,7 +1125,7 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { +@@ -1108,7 +1133,7 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { ->ReconfigureAfterFeatureListInit(process_type); } @@ -128,7 +115,7 @@ // If dynamic Mojo Core is being used, ensure that it's loaded very early in // the child/zygote process, before any sandbox is initialized. The library // is not fully initialized with IPC support until a ChildProcess is later -@@ -1138,6 +1163,11 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { +@@ -1143,6 +1168,11 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { content_main_params_.reset(); RegisterMainThreadFactories(); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_BUILD.gn index cfc7edccc312..5c5ca02fd01c 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_BUILD.gn @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/content/browser/BUILD.gn.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/content/browser/BUILD.gn.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/content/browser/BUILD.gn -@@ -2360,6 +2360,13 @@ source_set("browser") { - ] +@@ -2463,6 +2463,13 @@ jumbo_source_set("browser") { + deps += [ "//media/mojo/mojom/stable:stable_video_decoder" ] } + if (is_bsd) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_browser__child__process__host__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_browser__child__process__host__impl.cc index 0c89457a2238..4519ecdbfe58 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_browser__child__process__host__impl.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_browser__child__process__host__impl.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/browser/browser_child_process_host_impl.cc.orig 2022-11-30 08:12:58 UTC +--- src/3rdparty/chromium/content/browser/browser_child_process_host_impl.cc.orig 2023-07-16 15:47:57 UTC +++ src/3rdparty/chromium/content/browser/browser_child_process_host_impl.cc -@@ -316,6 +316,7 @@ void BrowserChildProcessHostImpl::LaunchWithoutExtraCo +@@ -321,6 +321,7 @@ void BrowserChildProcessHostImpl::LaunchWithoutExtraCo switches::kDisableBestEffortTasks, switches::kDisableLogging, switches::kEnableLogging, diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_browser__main__loop.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_browser__main__loop.cc index 517ac077bc56..3cba864debd2 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_browser__main__loop.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_browser__main__loop.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/browser/browser_main_loop.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/content/browser/browser_main_loop.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/content/browser/browser_main_loop.cc -@@ -250,6 +250,12 @@ +@@ -251,6 +251,12 @@ #include "mojo/public/cpp/bindings/lib/test_random_mojo_delays.h" #endif @@ -13,7 +13,7 @@ // One of the linux specific headers defines this as a macro. #ifdef DestroyAll #undef DestroyAll -@@ -543,6 +549,12 @@ int BrowserMainLoop::EarlyInitialization() { +@@ -544,6 +550,12 @@ int BrowserMainLoop::EarlyInitialization() { // by now since a thread to start the ServiceManager has been created // before the browser main loop starts. DCHECK(SandboxHostLinux::GetInstance()->IsInitialized()); @@ -26,12 +26,12 @@ #endif // GLib's spawning of new processes is buggy, so it's important that at this -@@ -580,7 +592,7 @@ int BrowserMainLoop::EarlyInitialization() { +@@ -581,7 +593,7 @@ int BrowserMainLoop::EarlyInitialization() { base::PlatformThread::SetCurrentThreadType(base::ThreadType::kCompositing); - #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ + #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // We use quite a few file descriptors for our IPC as well as disk the disk - // cache,and the default limit on the Mac is low (256), so bump it up. + // cache, and the default limit on Apple is low (256), so bump it up. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_child__process__launcher__helper__linux.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_child__process__launcher__helper__linux.cc index 5b1da7855c20..7fee1010940d 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_child__process__launcher__helper__linux.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_child__process__launcher__helper__linux.cc @@ -1,16 +1,19 @@ ---- src/3rdparty/chromium/content/browser/child_process_launcher_helper_linux.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/content/browser/child_process_launcher_helper_linux.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/content/browser/child_process_launcher_helper_linux.cc -@@ -20,7 +20,9 @@ +@@ -21,8 +21,12 @@ #include "content/public/common/result_codes.h" #include "content/public/common/sandboxed_process_launcher_delegate.h" #include "content/public/common/zygote/sandbox_support_linux.h" +#if !BUILDFLAG(IS_BSD) #include "content/public/common/zygote/zygote_handle.h" -+#endif #include "sandbox/policy/linux/sandbox_linux.h" ++#else ++#include "sandbox/policy/sandbox.h" ++#endif namespace content { -@@ -45,14 +47,20 @@ ChildProcessLauncherHelper::GetFilesToMap() { + namespace internal { +@@ -46,14 +50,20 @@ bool ChildProcessLauncherHelper::IsUsingLaunchOptions( } bool ChildProcessLauncherHelper::IsUsingLaunchOptions() { @@ -31,7 +34,7 @@ // Convert FD mapping to FileHandleMappingVector options->fds_to_remap = files_to_register.GetMappingWithIDAdjustment( base::GlobalDescriptors::kBaseDescriptor); -@@ -64,7 +72,9 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLaunche +@@ -65,7 +75,9 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLaunche options->environment = delegate_->GetEnvironment(); } else { @@ -41,7 +44,7 @@ // Environment variables could be supported in the future, but are not // currently supported when launching with the zygote. DCHECK(delegate_->GetEnvironment().empty()); -@@ -81,6 +91,7 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr +@@ -82,6 +94,7 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr int* launch_result) { *is_synchronous_launch = true; Process process; @@ -49,7 +52,7 @@ ZygoteCommunication* zygote_handle = GetZygoteForLaunch(); if (zygote_handle) { // TODO(crbug.com/569191): If chrome supported multiple zygotes they could -@@ -91,7 +102,6 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr +@@ -92,7 +105,6 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr GetProcessType()); *launch_result = LAUNCH_RESULT_SUCCESS; @@ -57,7 +60,7 @@ if (handle) { // It could be a renderer process or an utility process. int oom_score = content::kMiscOomScore; -@@ -100,15 +110,17 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr +@@ -101,15 +113,17 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr oom_score = content::kLowestRendererOomScore; ZygoteHostImpl::GetInstance()->AdjustRendererOOMScore(handle, oom_score); } @@ -76,7 +79,7 @@ #if BUILDFLAG(IS_CHROMEOS) if (GetProcessType() == switches::kRendererProcess) { -@@ -130,10 +142,14 @@ ChildProcessTerminationInfo ChildProcessLauncherHelper +@@ -131,10 +145,14 @@ ChildProcessTerminationInfo ChildProcessLauncherHelper const ChildProcessLauncherHelper::Process& process, bool known_dead) { ChildProcessTerminationInfo info; @@ -91,7 +94,7 @@ info.status = base::GetKnownDeadTerminationStatus(process.process.Handle(), &info.exit_code); } else { -@@ -157,13 +173,17 @@ void ChildProcessLauncherHelper::ForceNormalProcessTer +@@ -160,13 +178,17 @@ void ChildProcessLauncherHelper::ForceNormalProcessTer DCHECK(CurrentlyOnProcessLauncherTaskRunner()); process.process.Terminate(RESULT_CODE_NORMAL_EXIT, false); // On POSIX, we must additionally reap the child. @@ -108,9 +111,9 @@ +#endif } - void ChildProcessLauncherHelper::SetProcessBackgroundedOnLauncherThread( -@@ -174,11 +194,13 @@ void ChildProcessLauncherHelper::SetProcessBackgrounde - process.SetProcessBackgrounded(is_background); + void ChildProcessLauncherHelper::SetProcessPriorityOnLauncherThread( +@@ -178,11 +200,13 @@ void ChildProcessLauncherHelper::SetProcessPriorityOnL + } } +#if !BUILDFLAG(IS_BSD) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_compositor_viz__process__transport__factory.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_compositor_viz__process__transport__factory.cc index 3d0d2bcbdf8f..82013d2983c7 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_compositor_viz__process__transport__factory.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_compositor_viz__process__transport__factory.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/browser/compositor/viz_process_transport_factory.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/content/browser/compositor/viz_process_transport_factory.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/content/browser/compositor/viz_process_transport_factory.cc -@@ -116,7 +116,7 @@ class HostDisplayClient : public viz::HostDisplayClien +@@ -108,7 +108,7 @@ class HostDisplayClient : public viz::HostDisplayClien // viz::HostDisplayClient: // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_devtools_protocol_system__info__handler.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_devtools_protocol_system__info__handler.cc index 47562eb7d940..bc5aeb9a8c03 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_devtools_protocol_system__info__handler.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_devtools_protocol_system__info__handler.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/browser/devtools/protocol/system_info_handler.cc.orig 2023-02-08 09:03:45 UTC +--- src/3rdparty/chromium/content/browser/devtools/protocol/system_info_handler.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/content/browser/devtools/protocol/system_info_handler.cc -@@ -50,7 +50,7 @@ std::unique_ptr<SystemInfo::Size> GfxSizeToSystemInfoS +@@ -49,7 +49,7 @@ std::unique_ptr<SystemInfo::Size> GfxSizeToSystemInfoS // 1046598, and 1153667. // Windows builds need more time -- see Issue 873112 and 1004472. // Mac builds need more time - see Issue angleproject:6182. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_file__system__access_file__system__access__local__path__watcher.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_file__system__access_file__system__access__local__path__watcher.cc new file mode 100644 index 000000000000..95bcf928750a --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_file__system__access_file__system__access__local__path__watcher.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/content/browser/file_system_access/file_system_access_local_path_watcher.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/content/browser/file_system_access/file_system_access_local_path_watcher.cc +@@ -56,7 +56,7 @@ void FileSystemAccessLocalPathWatcher::Initialize( + base::FilePathWatcher::WatchOptions watch_options { + .type = scope().IsRecursive() ? base::FilePathWatcher::Type::kRecursive + : base::FilePathWatcher::Type::kNonRecursive, +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // Note: `report_modified_path` is also present on Android + // and Fuchsia. Update this switch if support for watching + // the local file system is added on those platforms. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl.cc new file mode 100644 index 000000000000..9d9098464fef --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/content/browser/gpu/gpu_data_manager_impl.cc.orig 2023-04-28 17:01:32 UTC ++++ src/3rdparty/chromium/content/browser/gpu/gpu_data_manager_impl.cc +@@ -405,7 +405,7 @@ void GpuDataManagerImpl::OnDisplayMetricsChanged( + private_->OnDisplayMetricsChanged(display, changed_metrics); + } + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + bool GpuDataManagerImpl::IsGpuMemoryBufferNV12Supported() { + base::AutoLock auto_lock(lock_); + return private_->IsGpuMemoryBufferNV12Supported(); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl.h new file mode 100644 index 000000000000..40e498c97e5f --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/content/browser/gpu/gpu_data_manager_impl.h.orig 2023-04-28 17:01:32 UTC ++++ src/3rdparty/chromium/content/browser/gpu/gpu_data_manager_impl.h +@@ -221,7 +221,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDa + void OnDisplayMetricsChanged(const display::Display& display, + uint32_t changed_metrics) override; + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + bool IsGpuMemoryBufferNV12Supported(); + void SetGpuMemoryBufferNV12Supported(bool supported); + #endif // BUILDFLAG(IS_LINUX) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl__private.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl__private.cc new file mode 100644 index 000000000000..1af2cff7314f --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl__private.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/content/browser/gpu/gpu_data_manager_impl_private.cc.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/content/browser/gpu/gpu_data_manager_impl_private.cc +@@ -1787,7 +1787,7 @@ void GpuDataManagerImplPrivate::RecordCompositingMode( + UMA_HISTOGRAM_ENUMERATION("GPU.CompositingMode", compositing_mode); + } + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + bool GpuDataManagerImplPrivate::IsGpuMemoryBufferNV12Supported() { + return is_gpu_memory_buffer_NV12_supported_; + } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl__private.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl__private.h new file mode 100644 index 000000000000..18bd9de3b825 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl__private.h @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/content/browser/gpu/gpu_data_manager_impl_private.h.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/content/browser/gpu/gpu_data_manager_impl_private.h +@@ -151,7 +151,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate { + void OnDisplayMetricsChanged(const display::Display& display, + uint32_t changed_metrics); + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + bool IsGpuMemoryBufferNV12Supported(); + void SetGpuMemoryBufferNV12Supported(bool supported); + #endif // BUILDFLAG(IS_LINUX) +@@ -306,7 +306,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate { + bool application_is_visible_ = true; + + bool disable_gpu_compositing_ = false; +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + bool is_gpu_memory_buffer_NV12_supported_ = false; + #endif // BUILDFLAG(IS_LINUX) + }; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__memory__buffer__manager__singleton.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__memory__buffer__manager__singleton.cc new file mode 100644 index 000000000000..fb3c0191ec87 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__memory__buffer__manager__singleton.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/content/browser/gpu/gpu_memory_buffer_manager_singleton.cc.orig 2023-04-28 17:01:32 UTC ++++ src/3rdparty/chromium/content/browser/gpu/gpu_memory_buffer_manager_singleton.cc +@@ -53,7 +53,7 @@ scoped_refptr<base::SingleThreadTaskRunner> GetTaskRun + #endif + } + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + bool IsGpuMemoryBufferNV12Supported() { + static bool is_computed = false; + static bool supported = false; +@@ -116,7 +116,7 @@ void GpuMemoryBufferManagerSingleton::OnGpuExtraInfoUp + SetNativeConfigurations(std::move(configs)); + } + #endif +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Dynamic check whether the NV12 format is supported as it may be + // inconsistent between the system GBM (Generic Buffer Management) and + // chromium miniGBM. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__process__host.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__process__host.cc index 7d86c8262770..930a6df857d5 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__process__host.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__process__host.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/browser/gpu/gpu_process_host.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/content/browser/gpu/gpu_process_host.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/content/browser/gpu/gpu_process_host.cc -@@ -252,6 +252,7 @@ static const char* const kSwitchNames[] = { +@@ -256,6 +256,7 @@ static const char* const kSwitchNames[] = { switches::kEnableBackgroundThreadPool, switches::kEnableGpuRasterization, switches::kEnableLogging, @@ -8,7 +8,7 @@ switches::kDoubleBufferCompositing, switches::kHeadless, switches::kLoggingLevel, -@@ -283,7 +284,7 @@ static const char* const kSwitchNames[] = { +@@ -289,7 +290,7 @@ static const char* const kSwitchNames[] = { switches::kOzoneDumpFile, switches::kDisableBufferBWCompression, #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_media_frameless__media__interface__proxy.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_media_frameless__media__interface__proxy.cc deleted file mode 100644 index 6d49b8fe66c9..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_media_frameless__media__interface__proxy.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- src/3rdparty/chromium/content/browser/media/frameless_media_interface_proxy.cc.orig 2022-08-31 12:19:35 UTC -+++ src/3rdparty/chromium/content/browser/media/frameless_media_interface_proxy.cc -@@ -16,7 +16,7 @@ - #include "media/mojo/mojom/renderer_extensions.mojom.h" - #include "media/mojo/mojom/stable/stable_video_decoder.mojom.h" - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "content/public/browser/stable_video_decoder_factory.h" - #include "media/base/media_switches.h" - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -67,7 +67,7 @@ void FramelessMediaInterfaceProxy::CreateVideoDecoder( - - mojo::PendingRemote<media::stable::mojom::StableVideoDecoder> - oop_video_decoder; --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - if (base::FeatureList::IsEnabled(media::kUseOutOfProcessVideoDecoding)) { - if (!render_process_host_) { - if (!stable_vd_factory_remote_.is_bound()) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_media_media__interface__proxy.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_media_media__interface__proxy.cc deleted file mode 100644 index d7025daf2fd0..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_media_media__interface__proxy.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- src/3rdparty/chromium/content/browser/media/media_interface_proxy.cc.orig 2022-10-24 13:33:33 UTC -+++ src/3rdparty/chromium/content/browser/media/media_interface_proxy.cc -@@ -73,7 +73,7 @@ - #include "media/mojo/services/mojo_renderer_service.h" // nogncheck - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "content/public/browser/stable_video_decoder_factory.h" - #include "media/base/media_switches.h" - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -286,7 +286,7 @@ void MediaInterfaceProxy::CreateVideoDecoder( - - mojo::PendingRemote<media::stable::mojom::StableVideoDecoder> - oop_video_decoder; --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - if (base::FeatureList::IsEnabled(media::kUseOutOfProcessVideoDecoding)) { - render_frame_host().GetProcess()->CreateStableVideoDecoder( - oop_video_decoder.InitWithNewPipeAndPassReceiver()); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_media_media__keys__listener__manager__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_media_media__keys__listener__manager__impl.cc index c4ec45daf0d9..ab773b105b71 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_media_media__keys__listener__manager__impl.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_media_media__keys__listener__manager__impl.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/browser/media/media_keys_listener_manager_impl.cc.orig 2022-04-21 18:48:31 UTC +--- src/3rdparty/chromium/content/browser/media/media_keys_listener_manager_impl.cc.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/content/browser/media/media_keys_listener_manager_impl.cc -@@ -233,7 +233,7 @@ void MediaKeysListenerManagerImpl::StartListeningForMe +@@ -234,7 +234,7 @@ void MediaKeysListenerManagerImpl::StartListeningForMe // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_network__service__instance__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_network__service__instance__impl.cc index 3f3775cc4b05..7b48f931d99a 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_network__service__instance__impl.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_network__service__instance__impl.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/browser/network_service_instance_impl.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/content/browser/network_service_instance_impl.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/content/browser/network_service_instance_impl.cc -@@ -76,7 +76,7 @@ +@@ -82,7 +82,7 @@ #include "content/browser/network/network_service_process_tracker_win.h" #endif @@ -9,12 +9,21 @@ #include "content/browser/system_dns_resolution/system_dns_resolver.h" #include "services/network/public/mojom/system_dns_resolution.mojom-forward.h" #endif -@@ -404,7 +404,7 @@ network::mojom::NetworkServiceParamsPtr CreateNetworkS +@@ -421,7 +421,7 @@ void CreateInProcessNetworkService( + #endif + } + +-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Runs a self-owned SystemDnsResolverMojoImpl. This is meant to run on a + // high-priority thread pool. + void RunSystemDnsResolverOnThreadPool( +@@ -488,7 +488,7 @@ network::mojom::NetworkServiceParamsPtr CreateNetworkS } #endif // BUILDFLAG(IS_POSIX) --#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (GetContentClient() ->browser() ->ShouldRunOutOfProcessSystemDnsResolution() && diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_back__forward__cache__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_back__forward__cache__impl.cc deleted file mode 100644 index 80adf88d5161..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_back__forward__cache__impl.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/content/browser/renderer_host/back_forward_cache_impl.cc.orig 2023-03-09 06:31:50 UTC -+++ src/3rdparty/chromium/content/browser/renderer_host/back_forward_cache_impl.cc -@@ -56,7 +56,7 @@ BASE_FEATURE(kBackForwardCacheSize, - // Sets the BackForwardCache size for desktop. - // See crbug.com/1291435. - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_CHROMEOS) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - base::FEATURE_ENABLED_BY_DEFAULT - #else - base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_delegated__frame__host.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_delegated__frame__host.cc index db196c7b2f00..bc9b7da1b672 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_delegated__frame__host.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_delegated__frame__host.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/browser/renderer_host/delegated_frame_host.cc.orig 2023-02-08 09:03:45 UTC +--- src/3rdparty/chromium/content/browser/renderer_host/delegated_frame_host.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/content/browser/renderer_host/delegated_frame_host.cc -@@ -295,7 +295,7 @@ void DelegatedFrameHost::EmbedSurface( +@@ -312,7 +312,7 @@ void DelegatedFrameHost::EmbedSurface( if (!primary_surface_id || primary_surface_id->local_surface_id() != local_surface_id_) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_media_service__video__capture__device__launcher.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_media_service__video__capture__device__launcher.cc new file mode 100644 index 000000000000..fd80eb76142b --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_media_service__video__capture__device__launcher.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/content/browser/renderer_host/media/service_video_capture_device_launcher.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/content/browser/renderer_host/media/service_video_capture_device_launcher.cc +@@ -24,7 +24,7 @@ + #include "media/base/media_switches.h" + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "content/browser/gpu/gpu_data_manager_impl.h" + #endif + +@@ -166,7 +166,7 @@ void ServiceVideoCaptureDeviceLauncher::LaunchDeviceAs + } + #else + if (switches::IsVideoCaptureUseGpuMemoryBufferEnabled()) { +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // On Linux, additionally check whether the NV12 GPU memory buffer is + // supported. + if (GpuDataManagerImpl::GetInstance()->IsGpuMemoryBufferNV12Supported()) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__process__host__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__process__host__impl.cc index 7721b63b40fe..c4ce8d2eff8f 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__process__host__impl.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__process__host__impl.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/browser/renderer_host/render_process_host_impl.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/content/browser/renderer_host/render_process_host_impl.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/content/browser/renderer_host/render_process_host_impl.cc -@@ -212,7 +212,7 @@ +@@ -218,7 +218,7 @@ #include "third_party/blink/public/mojom/android_font_lookup/android_font_lookup.mojom.h" #endif @@ -9,7 +9,7 @@ #include <sys/resource.h> #include "components/services/font/public/mojom/font_service.mojom.h" // nogncheck -@@ -1148,7 +1148,7 @@ size_t GetPlatformProcessLimit() { +@@ -955,7 +955,7 @@ size_t GetPlatformProcessLimit() { // to indicate failure and std::numeric_limits<size_t>::max() to indicate // unlimited. size_t GetPlatformProcessLimit() { @@ -18,7 +18,7 @@ struct rlimit limit; if (getrlimit(RLIMIT_NPROC, &limit) != 0) return kUnknownPlatformProcessLimit; -@@ -1240,7 +1240,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public +@@ -1098,7 +1098,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public return; } @@ -27,7 +27,7 @@ if (auto font_receiver = receiver.As<font_service::mojom::FontService>()) { ConnectToFontService(std::move(font_receiver)); return; -@@ -1329,7 +1329,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public +@@ -1187,7 +1187,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public std::unique_ptr<service_manager::BinderRegistry> binders_; mojo::Receiver<mojom::ChildProcessHost> receiver_{this}; @@ -36,29 +36,20 @@ mojo::Remote<media::mojom::VideoEncodeAcceleratorProviderFactory> video_encode_accelerator_factory_remote_; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -2168,7 +2168,7 @@ void RenderProcessHostImpl::ReinitializeLogging( - } - #endif // BUILDFLAG(IS_CHROMEOS_ASH) +@@ -3287,7 +3287,7 @@ void RenderProcessHostImpl::AppendRendererCommandLine( + base::TimeTicks::UnixEpoch().since_origin().InMicroseconds())); + } --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - void RenderProcessHostImpl::CreateStableVideoDecoder( - mojo::PendingReceiver<media::stable::mojom::StableVideoDecoder> receiver) { - DCHECK_CURRENTLY_ON(BrowserThread::UI); -@@ -3356,6 +3356,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Append `kDisableVideoCaptureUseGpuMemoryBuffer` flag if there is no support + // for NV12 GPU memory buffer. + if (switches::IsVideoCaptureUseGpuMemoryBufferEnabled() && +@@ -3347,6 +3347,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin switches::kDisableSpeechAPI, switches::kDisableThreadedCompositing, switches::kDisableTouchDragDrop, + switches::kDisableUnveil, - switches::kDisableUseMojoVideoDecoderForPepper, switches::kDisableV8IdleTasks, switches::kDisableVideoCaptureUseGpuMemoryBuffer, -@@ -4847,7 +4848,7 @@ void RenderProcessHostImpl::ResetIPC() { - coordinator_connector_receiver_.reset(); - tracing_registration_.reset(); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - stable_video_decoder_factory_remote_.reset(); - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) - + switches::kDisableWebGLImageChromium, diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__process__host__impl.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__process__host__impl.h index 9595b09fccf6..9f56dc81fc8f 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__process__host__impl.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__process__host__impl.h @@ -1,15 +1,6 @@ ---- src/3rdparty/chromium/content/browser/renderer_host/render_process_host_impl.h.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/content/browser/renderer_host/render_process_host_impl.h.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/content/browser/renderer_host/render_process_host_impl.h -@@ -85,7 +85,7 @@ - #include "content/public/browser/android/child_process_importance.h" - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "media/mojo/mojom/stable/stable_video_decoder.mojom.h" - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) - -@@ -495,7 +495,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -545,7 +545,7 @@ class CONTENT_EXPORT RenderProcessHostImpl // Sets this RenderProcessHost to be guest only. For Testing only. void SetForGuestsOnlyForTesting(); @@ -18,21 +9,3 @@ // Launch the zygote early in the browser startup. static void EarlyZygoteLaunch(); #endif // BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_MAC) -@@ -704,7 +704,7 @@ class CONTENT_EXPORT RenderProcessHostImpl - mojo::PendingReceiver<blink::mojom::WebSocketConnector> receiver) - override; - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - void CreateStableVideoDecoder( - mojo::PendingReceiver<media::stable::mojom::StableVideoDecoder> receiver) - override; -@@ -1181,7 +1181,7 @@ class CONTENT_EXPORT RenderProcessHostImpl - // RenderProcessHost. This is destroyed early in ResetIPC() method. - std::unique_ptr<PermissionServiceContext> permission_service_context_; - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // Connection to the StableVideoDecoderFactory that lives in a utility - // process. This is only used for out-of-process video decoding. - mojo::Remote<media::stable::mojom::StableVideoDecoderFactory> diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__view__host__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__view__host__impl.cc index cf2fc7e43e27..7d964a964f7e 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__view__host__impl.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__view__host__impl.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/content/browser/renderer_host/render_view_host_impl.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/content/browser/renderer_host/render_view_host_impl.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/content/browser/renderer_host/render_view_host_impl.cc -@@ -250,7 +250,7 @@ void RenderViewHostImpl::GetPlatformSpecificPrefs( +@@ -273,7 +273,7 @@ void RenderViewHostImpl::GetPlatformSpecificPrefs( display::win::ScreenWin::GetSystemMetricsInDIP(SM_CYVSCROLL); prefs->arrow_bitmap_width_horizontal_scroll_bar_in_dips = display::win::ScreenWin::GetSystemMetricsInDIP(SM_CXHSCROLL); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - prefs->system_font_family_name = gfx::Font().GetFontName(); - #elif BUILDFLAG(IS_FUCHSIA) - // Make Blink's "focus ring" invisible. The focus ring is a hairline border + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + if (command_line->HasSwitch(switches::kSystemFontFamily)) { + prefs->system_font_family_name = diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__aura.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__aura.cc index bf643fd9f732..ae80ad304554 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__aura.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__aura.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/browser/renderer_host/render_widget_host_view_aura.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/content/browser/renderer_host/render_widget_host_view_aura.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -119,7 +119,7 @@ +@@ -121,7 +121,7 @@ #include "ui/gfx/gdi_util.h" #endif @@ -9,7 +9,7 @@ #include "content/browser/accessibility/browser_accessibility_auralinux.h" #include "ui/base/ime/linux/text_edit_command_auralinux.h" #include "ui/linux/linux_ui.h" -@@ -452,7 +452,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewAura::Ge +@@ -461,7 +461,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewAura::Ge return ToBrowserAccessibilityWin(manager->GetBrowserAccessibilityRoot()) ->GetCOM(); @@ -18,7 +18,7 @@ BrowserAccessibilityManager* manager = host()->GetOrCreateRootBrowserAccessibilityManager(); if (manager && manager->GetBrowserAccessibilityRoot()) -@@ -1588,7 +1588,7 @@ bool RenderWidgetHostViewAura::ShouldDoLearning() { +@@ -1720,7 +1720,7 @@ bool RenderWidgetHostViewAura::ShouldDoLearning() { return GetTextInputManager() && GetTextInputManager()->should_do_learning(); } @@ -27,7 +27,7 @@ bool RenderWidgetHostViewAura::SetCompositionFromExistingText( const gfx::Range& range, const std::vector<ui::ImeTextSpan>& ui_ime_text_spans) { -@@ -2420,7 +2420,7 @@ bool RenderWidgetHostViewAura::NeedsInputGrab() { +@@ -2565,7 +2565,7 @@ bool RenderWidgetHostViewAura::NeedsInputGrab() { } bool RenderWidgetHostViewAura::NeedsMouseCapture() { @@ -36,7 +36,7 @@ return NeedsInputGrab(); #else return false; -@@ -2597,7 +2597,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit +@@ -2748,7 +2748,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit if (!target_host) return; @@ -44,4 +44,4 @@ +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto* linux_ui = ui::LinuxUi::instance(); std::vector<ui::TextEditCommandAuraLinux> commands; - if (!event.skip_in_browser && linux_ui && event.os_event && + if (!event.skip_if_unhandled && linux_ui && event.os_event && diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__aura.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__aura.h index 287bb394b0e3..0322e463770c 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__aura.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__aura.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/browser/renderer_host/render_widget_host_view_aura.h.orig 2023-01-11 09:17:16 UTC +--- src/3rdparty/chromium/content/browser/renderer_host/render_widget_host_view_aura.h.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/content/browser/renderer_host/render_widget_host_view_aura.h -@@ -244,7 +244,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura +@@ -257,7 +257,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura ukm::SourceId GetClientSourceForMetrics() const override; bool ShouldDoLearning() override; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__event__handler.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__event__handler.cc index 92d32cbb737a..22b15cee0a8c 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__event__handler.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__event__handler.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/browser/renderer_host/render_widget_host_view_event_handler.cc.orig 2022-02-28 16:54:41 UTC +--- src/3rdparty/chromium/content/browser/renderer_host/render_widget_host_view_event_handler.cc.orig 2023-07-16 15:47:57 UTC +++ src/3rdparty/chromium/content/browser/renderer_host/render_widget_host_view_event_handler.cc -@@ -596,7 +596,7 @@ bool RenderWidgetHostViewEventHandler::CanRendererHand +@@ -597,7 +597,7 @@ bool RenderWidgetHostViewEventHandler::CanRendererHand if (event->type() == ui::ET_MOUSE_EXITED) { if (mouse_locked || selection_popup) return false; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_sandbox__host__linux.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_sandbox__host__linux.cc index 6a3e81247fd9..98daadc85c81 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_sandbox__host__linux.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_sandbox__host__linux.cc @@ -1,10 +1,10 @@ ---- src/3rdparty/chromium/content/browser/sandbox_host_linux.cc.orig 2022-02-07 13:39:41 UTC +--- src/3rdparty/chromium/content/browser/sandbox_host_linux.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/content/browser/sandbox_host_linux.cc @@ -45,6 +45,7 @@ void SandboxHostLinux::Init() { // Instead, it replies on a temporary socket provided by the caller. PCHECK(0 == shutdown(browser_socket, SHUT_WR)) << "shutdown"; -+#if !defined(OS_BSD) ++#if !BUILDFLAG(IS_BSD) int pipefds[2]; CHECK(0 == pipe(pipefds)); const int child_lifeline_fd = pipefds[0]; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_jank__monitor__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_jank__monitor__impl.cc index 5943ba589267..290ad1688b2d 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_jank__monitor__impl.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_jank__monitor__impl.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/browser/scheduler/responsiveness/jank_monitor_impl.cc.orig 2023-01-11 09:17:16 UTC +--- src/3rdparty/chromium/content/browser/scheduler/responsiveness/jank_monitor_impl.cc.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/content/browser/scheduler/responsiveness/jank_monitor_impl.cc -@@ -334,7 +334,7 @@ void JankMonitorImpl::ThreadExecutionState::DidRunTask +@@ -340,7 +340,7 @@ void JankMonitorImpl::ThreadExecutionState::DidRunTask // in context menus, among others). Simply ignore the mismatches for now. // See https://crbug.com/929813 for the details of why the mismatch // happens. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_service__worker_service__worker__context__wrapper.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_service__worker_service__worker__context__wrapper.cc new file mode 100644 index 000000000000..477a7524b89c --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_service__worker_service__worker__context__wrapper.cc @@ -0,0 +1,15 @@ +--- src/3rdparty/chromium/content/browser/service_worker/service_worker_context_wrapper.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/content/browser/service_worker/service_worker_context_wrapper.cc +@@ -1409,7 +1409,12 @@ void ServiceWorkerContextWrapper::MaybeProcessPendingW + return; + } + ++#if defined(__clang__) && (__clang_major__ >= 16) + auto [document_url, key, callback] = std::move(*request); ++#else ++ auto [d_u, key, callback] = std::move(*request); ++ auto document_url = d_u; ++#endif + + DCHECK(document_url.is_valid()); + TRACE_EVENT1("ServiceWorker", diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_utility__process__host.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_utility__process__host.cc new file mode 100644 index 000000000000..82c2bac9c1b1 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_utility__process__host.cc @@ -0,0 +1,56 @@ +--- src/3rdparty/chromium/content/browser/utility_process_host.cc.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/content/browser/utility_process_host.cc +@@ -59,7 +59,7 @@ + #include "content/browser/v8_snapshot_files.h" + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "base/files/file_util.h" + #include "base/files/scoped_file.h" + #include "base/pickle.h" +@@ -69,7 +69,7 @@ + #include "media/capture/capture_switches.h" + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #include "base/task/sequenced_task_runner.h" + #include "components/viz/host/gpu_client.h" + #include "media/capture/capture_switches.h" +@@ -80,7 +80,7 @@ namespace { + + namespace { + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + base::ScopedFD PassNetworkContextParentDirs( + std::vector<base::FilePath> network_context_parent_dirs) { + base::Pickle pickle; +@@ -129,7 +129,7 @@ UtilityProcessHost::UtilityProcessHost(std::unique_ptr + started_(false), + name_(u"utility process"), + file_data_(std::make_unique<ChildProcessLauncherFileData>()), +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + gpu_client_(nullptr, base::OnTaskRunnerDeleter(nullptr)), + #endif + client_(std::move(client)) { +@@ -421,7 +421,7 @@ bool UtilityProcessHost::StartProcess() { + file_data_->files_to_preload.merge(GetV8SnapshotFilesToPreload()); + #endif // BUILDFLAG(IS_POSIX) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // The network service should have access to the parent directories + // necessary for its usage. + if (sandbox_type_ == sandbox::mojom::Sandbox::kNetwork) { +@@ -432,7 +432,7 @@ bool UtilityProcessHost::StartProcess() { + } + #endif // BUILDFLAG(IS_LINUX) + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Pass `kVideoCaptureUseGpuMemoryBuffer` flag to video capture service only + // when the video capture use GPU memory buffer enabled and NV12 GPU memory + // buffer supported. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_utility__process__host.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_utility__process__host.h new file mode 100644 index 000000000000..aea00e23d172 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_utility__process__host.h @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/content/browser/utility_process_host.h.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/content/browser/utility_process_host.h +@@ -39,7 +39,7 @@ namespace base { + class Thread; + } // namespace base + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + namespace viz { + class GpuClient; + } // namespace viz +@@ -225,7 +225,7 @@ class CONTENT_EXPORT UtilityProcessHost + std::vector<RunServiceDeprecatedCallback> pending_run_service_callbacks_; + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + std::unique_ptr<viz::GpuClient, base::OnTaskRunnerDeleter> gpu_client_; + #endif + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_utility__process__host__receiver__bindings.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_utility__process__host__receiver__bindings.cc index 314f93bed1bb..d35523053a30 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_utility__process__host__receiver__bindings.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_utility__process__host__receiver__bindings.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/browser/utility_process_host_receiver_bindings.cc.orig 2022-02-28 16:54:41 UTC +--- src/3rdparty/chromium/content/browser/utility_process_host_receiver_bindings.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/content/browser/utility_process_host_receiver_bindings.cc -@@ -10,7 +10,7 @@ +@@ -10,12 +10,12 @@ #include "content/public/browser/content_browser_client.h" #include "content/public/common/content_client.h" @@ -9,7 +9,13 @@ #include "components/services/font/public/mojom/font_service.mojom.h" // nogncheck #include "content/browser/font_service.h" // nogncheck #endif -@@ -19,7 +19,7 @@ namespace content { + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #include "components/viz/host/gpu_client.h" + #include "content/public/browser/gpu_client.h" + #endif +@@ -24,13 +24,13 @@ namespace content { void UtilityProcessHost::BindHostReceiver( mojo::GenericPendingReceiver receiver) { @@ -18,3 +24,10 @@ if (auto font_receiver = receiver.As<font_service::mojom::FontService>()) { ConnectToFontService(std::move(font_receiver)); return; + } + #endif +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + if (auto gpu_receiver = receiver.As<viz::mojom::Gpu>()) { + gpu_client_ = + content::CreateGpuClient(std::move(gpu_receiver), base::DoNothing()); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_utility__sandbox__delegate.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_utility__sandbox__delegate.cc index 1b208bccaa05..7ce84ddd1fc5 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_utility__sandbox__delegate.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_utility__sandbox__delegate.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/browser/utility_sandbox_delegate.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/content/browser/utility_sandbox_delegate.cc.orig 2023-07-16 15:47:57 UTC +++ src/3rdparty/chromium/content/browser/utility_sandbox_delegate.cc -@@ -64,13 +64,13 @@ UtilitySandboxedProcessLauncherDelegate:: +@@ -63,13 +63,13 @@ UtilitySandboxedProcessLauncherDelegate:: #if BUILDFLAG(ENABLE_PPAPI) sandbox_type_ == sandbox::mojom::Sandbox::kPpapi || #endif @@ -17,7 +17,7 @@ sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoEncoding || #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -117,10 +117,10 @@ ZygoteCommunication* UtilitySandboxedProcessLauncherDe +@@ -124,10 +124,10 @@ ZygoteCommunication* UtilitySandboxedProcessLauncherDe // unsandboxed zygote and then apply their actual sandboxes in the forked // process upon startup. if (sandbox_type_ == sandbox::mojom::Sandbox::kNetwork || diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_web__contents_web__contents__view__aura.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_web__contents_web__contents__view__aura.cc index d24e69eab48d..7fa4e49ef2cf 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_web__contents_web__contents__view__aura.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_web__contents_web__contents__view__aura.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/content/browser/web_contents/web_contents_view_aura.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/content/browser/web_contents/web_contents_view_aura.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/content/browser/web_contents/web_contents_view_aura.cc @@ -178,7 +178,7 @@ class WebDragSourceAura : public content::WebContentsO raw_ptr<aura::Window> window_; @@ -18,7 +18,7 @@ // We set the file contents before the URL because the URL also sets file // contents (to a .URL shortcut). We want to prefer file content data over // a shortcut so we add it first. -@@ -1371,7 +1371,7 @@ void WebContentsViewAura::OnMouseEvent(ui::MouseEvent* +@@ -1340,7 +1340,7 @@ void WebContentsViewAura::OnMouseEvent(ui::MouseEvent* // Linux window managers like to handle raise-on-click themselves. If we // raise-on-click manually, this may override user settings that prevent // focus-stealing. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_webui_web__ui__main__frame__observer.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_webui_web__ui__main__frame__observer.cc index ba73c6926ab2..d4e2edce9b70 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_webui_web__ui__main__frame__observer.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_webui_web__ui__main__frame__observer.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/content/browser/webui/web_ui_main_frame_observer.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/content/browser/webui/web_ui_main_frame_observer.cc.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/content/browser/webui/web_ui_main_frame_observer.cc @@ -13,7 +13,7 @@ #include "content/public/browser/navigation_handle.h" @@ -27,7 +27,7 @@ void WebUIMainFrameObserver::OnDidAddMessageToConsole( RenderFrameHost* source_frame, blink::mojom::ConsoleMessageLevel log_level, -@@ -163,7 +163,7 @@ void WebUIMainFrameObserver::ReadyToCommitNavigation( +@@ -167,7 +167,7 @@ void WebUIMainFrameObserver::ReadyToCommitNavigation( // TODO(crbug.com/1129544) This is currently disabled due to Windows DLL // thunking issues. Fix & re-enable. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_zygote__host_zygote__host__impl__linux.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_zygote__host_zygote__host__impl__linux.cc index 0ad768406f15..dde0143d78ed 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_zygote__host_zygote__host__impl__linux.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_browser_zygote__host_zygote__host__impl__linux.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/browser/zygote_host/zygote_host_impl_linux.cc.orig 2023-11-20 16:08:07 UTC +--- src/3rdparty/chromium/content/browser/zygote_host/zygote_host_impl_linux.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/content/browser/zygote_host/zygote_host_impl_linux.cc -@@ -20,8 +20,10 @@ +@@ -20,13 +20,19 @@ #include "build/chromeos_buildflags.h" #include "content/common/zygote/zygote_commands_linux.h" #include "content/common/zygote/zygote_communication_linux.h" @@ -11,7 +11,16 @@ #include "sandbox/linux/services/credentials.h" #include "sandbox/linux/services/namespace_sandbox.h" #include "sandbox/linux/suid/client/setuid_sandbox_host.h" -@@ -39,6 +41,7 @@ namespace { + #include "sandbox/linux/suid/common/sandbox.h" ++#if BUILDFLAG(IS_BSD) ++#include "sandbox/policy/sandbox.h" ++#else + #include "sandbox/policy/linux/sandbox_linux.h" ++#endif + #include "sandbox/policy/switches.h" + + #if BUILDFLAG(IS_CHROMEOS) +@@ -39,6 +45,7 @@ namespace { namespace { @@ -19,7 +28,7 @@ // Receive a fixed message on fd and return the sender's PID. // Returns true if the message received matches the expected message. bool ReceiveFixedMessage(int fd, -@@ -60,6 +63,7 @@ bool ReceiveFixedMessage(int fd, +@@ -60,6 +67,7 @@ bool ReceiveFixedMessage(int fd, return false; return true; } @@ -27,7 +36,7 @@ } // namespace -@@ -69,9 +73,13 @@ ZygoteHostImpl::ZygoteHostImpl() +@@ -69,9 +77,13 @@ ZygoteHostImpl::ZygoteHostImpl() } ZygoteHostImpl::ZygoteHostImpl() @@ -41,7 +50,7 @@ sandbox_binary_(), zygote_pids_lock_(), zygote_pids_() {} -@@ -84,6 +92,7 @@ void ZygoteHostImpl::Init(const base::CommandLine& com +@@ -84,6 +96,7 @@ void ZygoteHostImpl::Init(const base::CommandLine& com } void ZygoteHostImpl::Init(const base::CommandLine& command_line) { @@ -49,7 +58,7 @@ if (command_line.HasSwitch(sandbox::policy::switches::kNoSandbox)) { return; } -@@ -134,6 +143,7 @@ void ZygoteHostImpl::Init(const base::CommandLine& com +@@ -134,6 +147,7 @@ void ZygoteHostImpl::Init(const base::CommandLine& com "you can try using --" << sandbox::policy::switches::kNoSandbox << "."; } @@ -57,7 +66,7 @@ } void ZygoteHostImpl::AddZygotePid(pid_t pid) { -@@ -158,6 +168,7 @@ pid_t ZygoteHostImpl::LaunchZygote( +@@ -158,6 +172,7 @@ pid_t ZygoteHostImpl::LaunchZygote( base::CommandLine* cmd_line, base::ScopedFD* control_fd, base::FileHandleMappingVector additional_remapped_fds) { @@ -65,7 +74,7 @@ int fds[2]; #if !defined(TOOLKIT_QT) CHECK_EQ(0, socketpair(AF_UNIX, SOCK_SEQPACKET, 0, fds)); -@@ -232,9 +243,12 @@ pid_t ZygoteHostImpl::LaunchZygote( +@@ -232,9 +247,12 @@ pid_t ZygoteHostImpl::LaunchZygote( AddZygotePid(pid); return pid; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_child_child__process.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_child_child__process.cc index 39e9f408b7dc..5e6ce6e52391 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_child_child__process.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_child_child__process.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/content/child/child_process.cc.orig 2022-09-24 10:57:32 UTC +--- src/3rdparty/chromium/content/child/child_process.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/content/child/child_process.cc -@@ -68,7 +68,7 @@ ChildProcess::ChildProcess(base::ThreadType io_thread_ - DCHECK(!g_lazy_child_process_tls.Pointer()->Get()); - g_lazy_child_process_tls.Pointer()->Set(this); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +@@ -70,7 +70,7 @@ ChildProcess::ChildProcess(base::ThreadType io_thread_ + io_thread_(std::make_unique<ChildIOThread>()) { const base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess(); +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const bool is_embedded_in_browser_process = + !command_line.HasSwitch(switches::kProcessType); + if (IsMojoCoreSharedLibraryEnabled() && !is_embedded_in_browser_process) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_common_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_common_BUILD.gn index 22c49257a7b5..2c3e5ed10695 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_common_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_common_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/common/BUILD.gn.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/content/common/BUILD.gn.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/content/common/BUILD.gn -@@ -449,6 +449,9 @@ if (is_linux || is_chromeos) { +@@ -452,6 +452,9 @@ if (is_linux || is_chromeos) { public = [ "set_process_title_linux.h" ] sources = [ "set_process_title_linux.cc" ] deps = [ "//base" ] @@ -10,7 +10,7 @@ } } -@@ -497,7 +500,7 @@ mojom("mojo_bindings") { +@@ -498,7 +501,7 @@ mojom("mojo_bindings") { if (enable_ipc_logging) { enabled_features += [ "ipc_logging" ] } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_common_zygote_sandbox__support__linux.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_common_zygote_sandbox__support__linux.cc new file mode 100644 index 000000000000..068d9a30097e --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_common_zygote_sandbox__support__linux.cc @@ -0,0 +1,14 @@ +--- src/3rdparty/chromium/content/common/zygote/sandbox_support_linux.cc.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/content/common/zygote/sandbox_support_linux.cc +@@ -8,7 +8,11 @@ + #include "base/posix/global_descriptors.h" + #include "base/posix/unix_domain_socket.h" + #include "content/public/common/content_descriptors.h" ++#if BUILDFLAG(IS_BSD) ++#include "sandbox/policy/sandbox.h" ++#else + #include "sandbox/policy/linux/sandbox_linux.h" ++#endif + + namespace content { + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_gpu_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_gpu_BUILD.gn new file mode 100644 index 000000000000..c28dadfad11f --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_gpu_BUILD.gn @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/content/gpu/BUILD.gn.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/content/gpu/BUILD.gn +@@ -107,6 +107,17 @@ target(link_target_type, "gpu_sources") { + } + } + ++ if (is_bsd) { ++ sources -= [ ++ "gpu_sandbox_hook_linux.cc", ++ "gpu_sandbox_hook_linux.h", ++ ] ++ sources += [ ++ "gpu_sandbox_hook_bsd.cc", ++ "gpu_sandbox_hook_bsd.h", ++ ] ++ } ++ + if (is_chromeos_ash) { + deps += [ + "//components/services/font/public/cpp", diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__main.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__main.cc index f50f4c5dfade..e0b2facb3e42 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__main.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__main.cc @@ -1,15 +1,19 @@ ---- src/3rdparty/chromium/content/gpu/gpu_main.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/content/gpu/gpu_main.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/content/gpu/gpu_main.cc -@@ -89,7 +89,7 @@ - #include "sandbox/win/src/sandbox.h" +@@ -96,6 +96,12 @@ + #include "sandbox/policy/sandbox_type.h" #endif --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "content/gpu/gpu_sandbox_hook_linux.h" - #include "sandbox/policy/linux/sandbox_linux.h" - #include "sandbox/policy/sandbox_type.h" -@@ -110,7 +110,7 @@ namespace content { ++#if BUILDFLAG(IS_BSD) ++#include "content/gpu/gpu_sandbox_hook_bsd.h" ++#include "sandbox/policy/sandbox.h" ++#include "sandbox/policy/sandbox_type.h" ++#endif ++ + #if BUILDFLAG(IS_MAC) + #include "base/message_loop/message_pump_apple.h" + #include "components/metal_util/device_removal.h" +@@ -112,7 +118,7 @@ namespace { namespace { @@ -18,7 +22,7 @@ bool StartSandboxLinux(gpu::GpuWatchdogThread*, const gpu::GPUInfo*, const gpu::GpuPreferences&); -@@ -172,7 +172,7 @@ class ContentSandboxHelper : public gpu::GpuSandboxHel +@@ -177,7 +183,7 @@ class ContentSandboxHelper : public gpu::GpuSandboxHel bool EnsureSandboxInitialized(gpu::GpuWatchdogThread* watchdog_thread, const gpu::GPUInfo* gpu_info, const gpu::GpuPreferences& gpu_prefs) override { @@ -27,7 +31,7 @@ return StartSandboxLinux(watchdog_thread, gpu_info, gpu_prefs); #elif BUILDFLAG(IS_WIN) return StartSandboxWindows(sandbox_info_); -@@ -270,7 +270,7 @@ int GpuMain(MainFunctionParams parameters) { +@@ -287,7 +293,7 @@ int GpuMain(MainFunctionParams parameters) { std::make_unique<base::SingleThreadTaskExecutor>( gpu_preferences.message_pump_type); } @@ -36,7 +40,7 @@ #error "Unsupported Linux platform." #elif BUILDFLAG(IS_MAC) // Cross-process CoreAnimation requires a CFRunLoop to function at all, and -@@ -405,7 +405,7 @@ int GpuMain(MainFunctionParams parameters) { +@@ -422,7 +428,7 @@ namespace { namespace { @@ -45,3 +49,12 @@ bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdog_thread, const gpu::GPUInfo* gpu_info, const gpu::GpuPreferences& gpu_prefs) { +@@ -462,7 +468,7 @@ bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdo + sandbox_options.accelerated_video_encode_enabled = + !gpu_prefs.disable_accelerated_video_encode; + +-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Video decoding of many video streams can use thousands of FDs as well as + // Exo clients like Lacros. + // See https://crbug.com/1417237 diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__sandbox__hook__bsd.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__sandbox__hook__bsd.cc new file mode 100644 index 000000000000..0ec98f987d6d --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__sandbox__hook__bsd.cc @@ -0,0 +1,72 @@ +--- src/3rdparty/chromium/content/gpu/gpu_sandbox_hook_bsd.cc.orig 2023-04-28 17:01:32 UTC ++++ src/3rdparty/chromium/content/gpu/gpu_sandbox_hook_bsd.cc +@@ -0,0 +1,69 @@ ++// Copyright 2023 The Chromium Authors ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#include "content/gpu/gpu_sandbox_hook_bsd.h" ++ ++#include <dlfcn.h> ++#include <errno.h> ++#include <sys/stat.h> ++ ++#include <memory> ++#include <sstream> ++#include <utility> ++#include <vector> ++ ++#include "base/base_paths.h" ++#include "base/files/file_enumerator.h" ++#include "base/files/file_path.h" ++#include "base/files/scoped_file.h" ++#include "base/functional/bind.h" ++#include "base/logging.h" ++#include "base/path_service.h" ++#include "base/strings/stringprintf.h" ++#include "build/build_config.h" ++#include "build/buildflag.h" ++#include "build/chromeos_buildflags.h" ++#include "content/common/set_process_title.h" ++#include "content/public/common/content_switches.h" ++#include "media/gpu/buildflags.h" ++ ++namespace content { ++namespace { ++ ++constexpr int dlopen_flag = RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE; ++ ++void LoadVulkanLibraries() { ++ // Try to preload Vulkan libraries. Failure is not an error as not all may be ++ // present. ++ const char* kLibraries[] = { ++ "libvulkan.so", ++ "libvulkan_intel.so", ++ "libvulkan_intel_hasvk.so", ++ "libvulkan_radeon.so", ++ }; ++ for (const auto* library : kLibraries) { ++ dlopen(library, dlopen_flag); ++ } ++} ++ ++bool LoadLibrariesForGpu( ++ const sandbox::policy::SandboxSeccompBPF::Options& options) { ++ LoadVulkanLibraries(); ++ ++ return true; ++} ++ ++} // namespace ++ ++bool GpuProcessPreSandboxHook(sandbox::policy::SandboxLinux::Options options) { ++ if (!LoadLibrariesForGpu(options)) ++ return false; ++ ++ // TODO(tsepez): enable namspace sandbox here once crashes are understood. ++ ++ errno = 0; ++ return true; ++} ++ ++} // namespace content diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__sandbox__hook__bsd.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__sandbox__hook__bsd.h new file mode 100644 index 000000000000..128ed7a19949 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__sandbox__hook__bsd.h @@ -0,0 +1,19 @@ +--- src/3rdparty/chromium/content/gpu/gpu_sandbox_hook_bsd.h.orig 2023-04-28 17:01:32 UTC ++++ src/3rdparty/chromium/content/gpu/gpu_sandbox_hook_bsd.h +@@ -0,0 +1,16 @@ ++// Copyright 2023 The Chromium Authors ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#ifndef CONTENT_GPU_GPU_SANDBOX_HOOK_BSD_H_ ++#define CONTENT_GPU_GPU_SANDBOX_HOOK_BSD_H_ ++ ++#include "sandbox/policy/sandbox.h" ++ ++namespace content { ++ ++bool GpuProcessPreSandboxHook(sandbox::policy::SandboxLinux::Options options); ++ ++} // namespace content ++ ++#endif // CONTENT_GPU_GPU_SANDBOX_HOOK_BSD_H_ diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__sandbox__hook__linux.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__sandbox__hook__linux.cc deleted file mode 100644 index 6920209bd382..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__sandbox__hook__linux.cc +++ /dev/null @@ -1,70 +0,0 @@ ---- src/3rdparty/chromium/content/gpu/gpu_sandbox_hook_linux.cc.orig 2023-04-05 11:05:06 UTC -+++ src/3rdparty/chromium/content/gpu/gpu_sandbox_hook_linux.cc -@@ -126,6 +126,7 @@ void AddStandardChromeOsPermissions( - } - } - -+#if !defined(OS_BSD) - void AddV4L2GpuPermissions( - std::vector<BrokerFilePermission>* permissions, - const sandbox::policy::SandboxSeccompBPF::Options& options) { -@@ -484,8 +485,10 @@ std::vector<BrokerFilePermission> FilePermissionsForGp - AddStandardGpuPermissions(&permissions); - return permissions; - } -+#endif - - void LoadArmGpuLibraries() { -+#if !defined(OS_BSD) - // Preload the Mali library. - if (UseChromecastSandboxAllowlist()) { - for (const char* path : kAllowedChromecastPaths) { -@@ -530,6 +533,7 @@ void LoadArmGpuLibraries() { - dlopen(driver_paths[i], dlopen_flag); - } - } -+#endif - } - - bool LoadAmdGpuLibraries() { -@@ -597,12 +601,14 @@ void LoadV4L2Libraries( - } - - void LoadChromecastV4L2Libraries() { -+#if !defined(OS_BSD) - for (const char* path : kAllowedChromecastPaths) { - const std::string library_path(std::string(path) + - std::string("libvpcodec.so")); - if (dlopen(library_path.c_str(), dlopen_flag)) - break; - } -+#endif - } - - bool LoadLibrariesForGpu( -@@ -629,6 +635,7 @@ bool LoadLibrariesForGpu( - return true; - } - -+#if !defined(OS_BSD) - sandbox::syscall_broker::BrokerCommandSet CommandSetForGPU( - const sandbox::policy::SandboxLinux::Options& options) { - sandbox::syscall_broker::BrokerCommandSet command_set; -@@ -652,13 +659,17 @@ bool BrokerProcessPreSandboxHook( - SetProcessTitleFromCommandLine(nullptr); - return true; - } -+#endif - - } // namespace - - bool GpuProcessPreSandboxHook(sandbox::policy::SandboxLinux::Options options) { -+ NOTIMPLEMENTED(); -+#if !defined(OS_BSD) - sandbox::policy::SandboxLinux::GetInstance()->StartBrokerProcess( - CommandSetForGPU(options), FilePermissionsForGpu(options), - base::BindOnce(BrokerProcessPreSandboxHook), options); -+#endif - - if (!LoadLibrariesForGpu(options)) - return false; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.cc index d5e6a99f12c2..f863f26662e2 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.cc.orig 2022-02-28 16:54:41 UTC +--- src/3rdparty/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.cc.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.cc @@ -20,7 +20,7 @@ @@ -18,7 +18,7 @@ mojo::PendingRemote<font_service::mojom::FontService> font_service; ChildThread::Get()->BindHostReceiver( font_service.InitWithNewPipeAndPassReceiver()); -@@ -53,7 +53,7 @@ PpapiBlinkPlatformImpl::~PpapiBlinkPlatformImpl() { +@@ -54,7 +54,7 @@ PpapiBlinkPlatformImpl::~PpapiBlinkPlatformImpl() { void PpapiBlinkPlatformImpl::Shutdown() {} blink::WebSandboxSupport* PpapiBlinkPlatformImpl::GetSandboxSupport() { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.h index de15ece47ec6..f5eb17471071 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.h @@ -1,15 +1,6 @@ ---- src/3rdparty/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.h.orig 2022-07-22 17:30:31 UTC +--- src/3rdparty/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.h.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.h -@@ -12,7 +12,7 @@ - #include "build/build_config.h" - #include "content/child/blink_platform_impl.h" - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "components/services/font/public/cpp/font_loader.h" - #include "third_party/skia/include/core/SkRefCnt.h" - #endif -@@ -38,11 +38,11 @@ class PpapiBlinkPlatformImpl : public BlinkPlatformImp +@@ -33,7 +33,7 @@ class PpapiBlinkPlatformImpl : public BlinkPlatformImp blink::WebString DefaultLocale() override; private: @@ -17,9 +8,4 @@ +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) std::unique_ptr<blink::WebSandboxSupport> sandbox_support_; #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - sk_sp<font_service::FontLoader> font_loader_; - #endif }; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__plugin__main.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__plugin__main.cc index 58b3d3f9e158..e70ef9f3685c 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__plugin__main.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__plugin__main.cc @@ -1,18 +1,18 @@ ---- src/3rdparty/chromium/content/ppapi_plugin/ppapi_plugin_main.cc.orig 2023-02-08 09:03:45 UTC +--- src/3rdparty/chromium/content/ppapi_plugin/ppapi_plugin_main.cc.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/content/ppapi_plugin/ppapi_plugin_main.cc @@ -54,6 +54,11 @@ #include "gin/v8_initializer.h" #endif -+#if BUILDFLAG(IS_OPENBSD) -+#include "sandbox/policy/openbsd/sandbox_openbsd.h" ++#if BUILDFLAG(IS_BSD) ++#include "sandbox/policy/sandbox.h" +#include "sandbox/policy/sandbox_type.h" +#endif + #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) #include <stdlib.h> #endif -@@ -148,7 +153,7 @@ int PpapiPluginMain(MainFunctionParams parameters) { +@@ -150,7 +155,7 @@ int PpapiPluginMain(MainFunctionParams parameters) { gin::V8Initializer::LoadV8Snapshot(); #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_public_browser_render__process__host.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_public_browser_render__process__host.h deleted file mode 100644 index cf9b4383ff71..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_public_browser_render__process__host.h +++ /dev/null @@ -1,20 +0,0 @@ ---- src/3rdparty/chromium/content/public/browser/render_process_host.h.orig 2023-08-16 19:50:41 UTC -+++ src/3rdparty/chromium/content/public/browser/render_process_host.h -@@ -53,7 +53,7 @@ - #include "content/public/browser/android/child_process_importance.h" - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "media/mojo/mojom/stable/stable_video_decoder.mojom-forward.h" - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) - -@@ -643,7 +643,7 @@ class CONTENT_EXPORT RenderProcessHost : public IPC::S - const blink::StorageKey& storage_key, - mojo::PendingReceiver<blink::mojom::WebSocketConnector> receiver) = 0; - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - virtual void CreateStableVideoDecoder( - mojo::PendingReceiver<media::stable::mojom::StableVideoDecoder> - receiver) = 0; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_public_common_common__param__traits__macros.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_public_common_common__param__traits__macros.h deleted file mode 100644 index 37d5f65f805d..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_public_common_common__param__traits__macros.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/content/public/common/common_param_traits_macros.h.orig 2023-02-08 09:03:45 UTC -+++ src/3rdparty/chromium/content/public/common/common_param_traits_macros.h -@@ -113,7 +113,7 @@ IPC_STRUCT_TRAITS_BEGIN(blink::RendererPreferences) - IPC_STRUCT_TRAITS_MEMBER(accept_languages) - IPC_STRUCT_TRAITS_MEMBER(plugin_fullscreen_allowed) - IPC_STRUCT_TRAITS_MEMBER(caret_browsing_enabled) --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - IPC_STRUCT_TRAITS_MEMBER(system_font_family_name) - #endif - #if BUILDFLAG(IS_WIN) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__features.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__features.cc index d592aeeaf729..3084de3ef633 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__features.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__features.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/public/common/content_features.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/content/public/common/content_features.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/content/public/common/content_features.cc -@@ -39,7 +39,7 @@ CONSTINIT const base::Feature kAudioServiceOutOfProces +@@ -53,7 +53,7 @@ CONSTINIT const base::Feature kAudioServiceOutOfProces "AudioServiceOutOfProcess", // TODO(crbug.com/1052397): Remove !IS_CHROMEOS_LACROS once lacros starts being // built with OS_CHROMEOS instead of OS_LINUX. @@ -9,7 +9,7 @@ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) base::FEATURE_ENABLED_BY_DEFAULT #else -@@ -51,7 +51,7 @@ CONSTINIT const base::Feature kAudioServiceSandbox( +@@ -65,7 +65,7 @@ CONSTINIT const base::Feature kAudioServiceSandbox( // kAudioServiceOutOfProcess feature is enabled. CONSTINIT const base::Feature kAudioServiceSandbox( "AudioServiceSandbox", @@ -18,7 +18,7 @@ base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -547,7 +547,7 @@ BASE_FEATURE(kGreaseUACH, "GreaseUACH", base::FEATURE_ +@@ -553,7 +553,7 @@ BASE_FEATURE(kGreaseUACH, "GreaseUACH", base::FEATURE_ // (activated by kUserAgentClientHint) BASE_FEATURE(kGreaseUACH, "GreaseUACH", base::FEATURE_ENABLED_BY_DEFAULT); @@ -27,7 +27,7 @@ // Supports proxying thread type changes of renderer processes to browser // process and having browser process handle adjusting thread properties (nice // value, c-group, latency sensitivity...) for renderers which have sandbox -@@ -1367,7 +1367,7 @@ CONSTINIT const base::Feature kWebAssemblyTrapHandler( +@@ -1463,7 +1463,7 @@ CONSTINIT const base::Feature kWebAssemblyTrapHandler( CONSTINIT const base::Feature kWebAssemblyTrapHandler( "WebAssemblyTrapHandler", #if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ @@ -36,7 +36,7 @@ defined(ARCH_CPU_X86_64)) || \ (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) base::FEATURE_ENABLED_BY_DEFAULT -@@ -1425,7 +1425,11 @@ BASE_FEATURE(kWebUICodeCache, +@@ -1515,7 +1515,11 @@ BASE_FEATURE(kWebUICodeCache, // Controls whether the WebUSB API is enabled: // https://wicg.github.io/webusb diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__features.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__features.h index de357c63ced2..d7ee045c1029 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__features.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__features.h @@ -1,8 +1,8 @@ ---- src/3rdparty/chromium/content/public/common/content_features.h.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/content/public/common/content_features.h.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/content/public/common/content_features.h -@@ -115,7 +115,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kFractionalScrollO - CONTENT_EXPORT BASE_DECLARE_FEATURE(kGetDisplayMediaSet); - CONTENT_EXPORT BASE_DECLARE_FEATURE(kGetDisplayMediaSetAutoSelectAllScreens); +@@ -120,7 +120,7 @@ CONTENT_EXPORT extern const base::FeatureParam<int> + kFledgeLimitNumAuctionsParam; + CONTENT_EXPORT BASE_DECLARE_FEATURE(kFractionalScrollOffsets); CONTENT_EXPORT BASE_DECLARE_FEATURE(kGreaseUACH); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__switches.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__switches.cc index 535f44c60e96..99948ec551ee 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__switches.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__switches.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/public/common/content_switches.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/content/public/common/content_switches.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/content/public/common/content_switches.cc -@@ -368,6 +368,8 @@ const char kEnableLogging[] = "enable- +@@ -367,6 +367,8 @@ const char kEnableLogging[] = "enable- // builds. const char kEnableLogging[] = "enable-logging"; @@ -9,7 +9,7 @@ // Enables the type, downlinkMax attributes of the NetInfo API. Also, enables // triggering of change attribute of the NetInfo API when there is a change in // the connection type. -@@ -997,7 +999,7 @@ const char kEnableAutomation[] = "enable-automation"; +@@ -994,7 +996,7 @@ const char kEnableAutomation[] = "enable-automation"; // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__switches.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__switches.h index ba30c2a1a589..ce4c47018ec3 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__switches.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__switches.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/public/common/content_switches.h.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/content/public/common/content_switches.h.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/content/public/common/content_switches.h -@@ -117,6 +117,7 @@ CONTENT_EXPORT extern const char kEnableLogging[]; +@@ -116,6 +116,7 @@ CONTENT_EXPORT extern const char kEnableLogging[]; CONTENT_EXPORT extern const char kEnableIsolatedWebAppsInRenderer[]; CONTENT_EXPORT extern const char kEnableLCDText[]; CONTENT_EXPORT extern const char kEnableLogging[]; @@ -8,12 +8,12 @@ CONTENT_EXPORT extern const char kEnableNetworkInformationDownlinkMax[]; CONTENT_EXPORT extern const char kEnableCanvas2DLayers[]; CONTENT_EXPORT extern const char kEnablePluginPlaceholderTesting[]; -@@ -269,7 +270,7 @@ CONTENT_EXPORT extern const char kRendererWaitForJavaD +@@ -267,7 +268,7 @@ CONTENT_EXPORT extern const char kRendererWaitForJavaD // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) CONTENT_EXPORT extern const char kEnableSpeechDispatcher[]; + CONTENT_EXPORT extern const char kLLVMProfileFile[]; #endif - diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_renderer_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_renderer_BUILD.gn index 4410e83b82ca..bf4e7b20e0a2 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_renderer_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_renderer_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/renderer/BUILD.gn.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/content/renderer/BUILD.gn.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/content/renderer/BUILD.gn -@@ -201,6 +201,13 @@ target(link_target_type, "renderer") { +@@ -202,6 +202,13 @@ target(link_target_type, "renderer") { ] } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_renderer_render__process__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_renderer_render__process__impl.cc index 14d4ad1a1c8d..af37d4bcacc1 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_renderer_render__process__impl.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_renderer_render__process__impl.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/renderer/render_process_impl.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/content/renderer/render_process_impl.cc.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/content/renderer/render_process_impl.cc -@@ -46,7 +46,7 @@ +@@ -45,7 +45,7 @@ #if BUILDFLAG(IS_WIN) #include "base/win/win_util.h" #endif @@ -9,9 +9,9 @@ #include "v8/include/v8-wasm-trap-handler-posix.h" #endif -@@ -223,7 +223,7 @@ RenderProcessImpl::RenderProcessImpl() - SetV8FlagIfNotFeature(features::kWebAssemblyDynamicTiering, - "--no-wasm-dynamic-tiering"); +@@ -211,7 +211,7 @@ RenderProcessImpl::RenderProcessImpl() + v8::V8::SetFlagsFromString(kSABPerContextFlag, sizeof(kSABPerContextFlag)); + } -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(ARCH_CPU_X86_64) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_X86_64) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_renderer_render__thread__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_renderer_render__thread__impl.cc index ffa541d18f0a..26b8b530e9d3 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_renderer_render__thread__impl.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_renderer_render__thread__impl.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/renderer/render_thread_impl.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/content/renderer/render_thread_impl.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/content/renderer/render_thread_impl.cc -@@ -201,6 +201,8 @@ +@@ -204,6 +204,8 @@ #if BUILDFLAG(IS_APPLE) #include <malloc/malloc.h> @@ -9,8 +9,8 @@ #else #include <malloc.h> #endif -@@ -1069,7 +1071,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: - kGpuStreamPriorityMedia); +@@ -1054,7 +1056,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: + kGpuStreamIdMedia, kGpuStreamPriorityMedia); const bool enable_video_decode_accelerator = -#if BUILDFLAG(IS_LINUX) @@ -18,7 +18,7 @@ base::FeatureList::IsEnabled(media::kVaapiVideoDecodeLinux) && #endif // BUILDFLAG(IS_LINUX) !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode) && -@@ -1078,7 +1080,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -1063,7 +1065,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: gpu::kGpuFeatureStatusEnabled); const bool enable_video_encode_accelerator = @@ -27,7 +27,7 @@ base::FeatureList::IsEnabled(media::kVaapiVideoEncodeLinux) && #else !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoEncode) && -@@ -1863,7 +1865,7 @@ std::unique_ptr<CodecFactory> RenderThreadImpl::Create +@@ -1835,7 +1837,7 @@ std::unique_ptr<CodecFactory> RenderThreadImpl::Create bool enable_video_encode_accelerator) { mojo::PendingRemote<media::mojom::VideoEncodeAcceleratorProvider> vea_provider; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.cc index 3bfa097f2559..060686c4c243 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.cc -@@ -111,7 +111,7 @@ +@@ -114,7 +114,7 @@ #if BUILDFLAG(IS_MAC) #include "content/child/child_process_sandbox_support_impl_mac.h" @@ -9,8 +9,15 @@ #include "content/child/child_process_sandbox_support_impl_linux.h" #endif -@@ -177,7 +177,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( +@@ -182,13 +182,13 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( + sudden_termination_disables_(0), + is_locked_to_site_(false), main_thread_scheduler_(main_thread_scheduler) { +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + sk_sp<font_service::FontLoader> font_loader; + #endif + // RenderThread may not exist in some tests. if (RenderThreadImpl::current()) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) @@ -18,7 +25,7 @@ mojo::PendingRemote<font_service::mojom::FontService> font_service; RenderThreadImpl::current()->BindHostReceiver( font_service.InitWithNewPipeAndPassReceiver()); -@@ -187,7 +187,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( +@@ -197,7 +197,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( #endif } @@ -27,7 +34,7 @@ if (sandboxEnabled()) { #if BUILDFLAG(IS_MAC) sandbox_support_ = std::make_unique<WebSandboxSupportMac>(); -@@ -245,7 +245,7 @@ void RendererBlinkPlatformImpl::SetThreadType(base::Pl +@@ -255,7 +255,7 @@ void RendererBlinkPlatformImpl::SetThreadType(base::Pl #endif blink::WebSandboxSupport* RendererBlinkPlatformImpl::GetSandboxSupport() { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.h index 2789c4d5a798..dcb3e128fd14 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.h @@ -1,15 +1,6 @@ ---- src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.h.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.h.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.h -@@ -32,7 +32,7 @@ - #include "third_party/blink/public/common/user_agent/user_agent_metadata.h" - #include "third_party/blink/public/mojom/cache_storage/cache_storage.mojom.h" - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "components/services/font/public/cpp/font_loader.h" // nogncheck - #include "third_party/skia/include/core/SkRefCnt.h" // nogncheck - #endif -@@ -245,7 +245,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi +@@ -238,7 +238,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi void Collect3DContextInformation(blink::Platform::GraphicsInfo* gl_info, const gpu::GPUInfo& gpu_info) const; @@ -18,12 +9,3 @@ std::unique_ptr<blink::WebSandboxSupport> sandbox_support_; #endif -@@ -265,7 +265,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi - mutable base::WaitableEvent io_thread_id_ready_event_; - base::PlatformThreadId io_thread_id_ = base::kInvalidThreadId; - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - sk_sp<font_service::FontLoader> font_loader_; - #endif - diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__main__platform__delegate__linux.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__main__platform__delegate__linux.cc index 1ebfc9a23937..b85856e382f0 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__main__platform__delegate__linux.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__main__platform__delegate__linux.cc @@ -1,10 +1,10 @@ ---- src/3rdparty/chromium/content/renderer/renderer_main_platform_delegate_linux.cc.orig 2022-02-28 16:54:41 UTC +--- src/3rdparty/chromium/content/renderer/renderer_main_platform_delegate_linux.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/content/renderer/renderer_main_platform_delegate_linux.cc @@ -44,6 +44,7 @@ bool RendererMainPlatformDelegate::EnableSandbox() { // any renderer has been started. // Here, we test that the status of SeccompBpf in the renderer is consistent // with what SandboxLinux::GetStatus() said we would do. -+#if !defined(OS_BSD) ++#if !BUILDFLAG(IS_BSD) auto* linux_sandbox = sandbox::policy::SandboxLinux::GetInstance(); if (linux_sandbox->GetStatus() & sandbox::policy::SandboxLinux::kSeccompBPF) { CHECK(linux_sandbox->seccomp_bpf_started()); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_shell_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_shell_BUILD.gn index a7caeb229c6f..f359dfb9b3cf 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_shell_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_shell_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/shell/BUILD.gn.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/content/shell/BUILD.gn.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/content/shell/BUILD.gn -@@ -968,7 +968,7 @@ group("content_shell_crash_test") { +@@ -1029,7 +1029,7 @@ group("content_shell_crash_test") { if (is_win) { data_deps += [ "//build/win:copy_cdb_to_output" ] } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_shell_app_shell__main__delegate.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_shell_app_shell__main__delegate.cc index 228b6a2a1272..e486515dc0f5 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_shell_app_shell__main__delegate.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_shell_app_shell__main__delegate.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/shell/app/shell_main_delegate.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/content/shell/app/shell_main_delegate.cc.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/content/shell/app/shell_main_delegate.cc -@@ -221,7 +221,7 @@ void ShellMainDelegate::PreSandboxStartup() { +@@ -223,7 +223,7 @@ void ShellMainDelegate::PreSandboxStartup() { // Reporting for sub-processes will be initialized in ZygoteForked. if (process_type != switches::kZygoteProcess) { crash_reporter::InitializeCrashpad(process_type.empty(), process_type); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_test_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_test_BUILD.gn index d395863a26de..3ab8bdf4ba9f 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_test_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_test_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/test/BUILD.gn.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/content/test/BUILD.gn.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/content/test/BUILD.gn -@@ -2129,7 +2129,7 @@ static_library("run_all_unittests") { +@@ -2235,7 +2235,7 @@ static_library("run_all_unittests") { ":test_support", "//base/test:test_support", ] @@ -9,7 +9,7 @@ deps += [ "//content/common:set_process_title_linux" ] } } -@@ -3162,7 +3162,7 @@ test("content_unittests") { +@@ -3304,7 +3304,7 @@ test("content_unittests") { deps += [ "//third_party/boringssl" ] } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_utility_services.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_utility_services.cc index 3466a1eababe..b9c83c39cd00 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_utility_services.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_utility_services.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/content/utility/services.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/content/utility/services.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/content/utility/services.cc @@ -64,7 +64,7 @@ extern sandbox::TargetServices* g_utility_target_services; @@ -18,7 +18,16 @@ (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) #include "media/mojo/services/stable_video_decoder_factory_process_service.h" // nogncheck #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && -@@ -215,7 +215,7 @@ auto RunAudio(mojo::PendingReceiver<audio::mojom::Audi +@@ -109,7 +109,7 @@ extern sandbox::TargetServices* g_utility_target_servi + #include "ui/accessibility/accessibility_features.h" + #endif // BUILDFLAG(ENABLE_ACCESSIBILITY_SERVICE) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #include "media/capture/capture_switches.h" + #include "services/viz/public/cpp/gpu/gpu.h" + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +@@ -226,7 +226,7 @@ auto RunAudio(mojo::PendingReceiver<audio::mojom::Audi << "task_policy_set TASK_QOS_POLICY"; #endif @@ -27,7 +36,16 @@ auto* command_line = base::CommandLine::ForCurrentProcess(); if (sandbox::policy::SandboxTypeFromCommandLine(*command_line) == sandbox::mojom::Sandbox::kNoSandbox) { -@@ -319,7 +319,7 @@ auto RunOOPArcVideoAcceleratorFactoryService( +@@ -308,7 +308,7 @@ auto RunVideoCapture( + mojo::PendingReceiver<video_capture::mojom::VideoCaptureService> receiver) { + auto service = std::make_unique<UtilityThreadVideoCaptureServiceImpl>( + std::move(receiver), base::SingleThreadTaskRunner::GetCurrentDefault()); +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + if (switches::IsVideoCaptureUseGpuMemoryBufferEnabled()) { + mojo::PendingRemote<viz::mojom::Gpu> remote_gpu; + content::UtilityThread::Get()->BindHostReceiver( +@@ -340,7 +340,7 @@ auto RunOOPArcVideoAcceleratorFactoryService( #endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) || // BUILDFLAG(USE_V4L2_CODEC)) @@ -36,7 +54,7 @@ (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) auto RunStableVideoDecoderFactoryProcessService( mojo::PendingReceiver< -@@ -330,7 +330,7 @@ auto RunStableVideoDecoderFactoryProcessService( +@@ -351,7 +351,7 @@ auto RunStableVideoDecoderFactoryProcessService( #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && // (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) @@ -45,7 +63,7 @@ auto RunVideoEncodeAcceleratorProviderFactory( mojo::PendingReceiver<media::mojom::VideoEncodeAcceleratorProviderFactory> receiver) { -@@ -388,13 +388,13 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -415,13 +415,13 @@ void RegisterMainThreadServices(mojo::ServiceFactory& #endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) || // BUILDFLAG(USE_V4L2_CODEC)) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_utility_speech_speech__recognition__sandbox__hook__linux.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_utility_speech_speech__recognition__sandbox__hook__linux.h index 47ea1e2db86d..2318cee151ab 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_utility_speech_speech__recognition__sandbox__hook__linux.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_utility_speech_speech__recognition__sandbox__hook__linux.h @@ -1,11 +1,13 @@ ---- src/3rdparty/chromium/content/utility/speech/speech_recognition_sandbox_hook_linux.h.orig 2022-02-07 13:39:41 UTC +--- src/3rdparty/chromium/content/utility/speech/speech_recognition_sandbox_hook_linux.h.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/content/utility/speech/speech_recognition_sandbox_hook_linux.h -@@ -5,7 +5,11 @@ +@@ -5,7 +5,13 @@ #ifndef CONTENT_UTILITY_SPEECH_SPEECH_RECOGNITION_SANDBOX_HOOK_LINUX_H_ #define CONTENT_UTILITY_SPEECH_SPEECH_RECOGNITION_SANDBOX_HOOK_LINUX_H_ -+#if defined(OS_BSD) -+#include "sandbox/policy/openbsd/sandbox_openbsd.h" ++#include "build/build_config.h" ++ ++#if BUILDFLAG(IS_BSD) ++#include "sandbox/policy/sandbox.h" +#else #include "sandbox/policy/linux/sandbox_linux.h" +#endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.cc index 6d1f254912d1..74a53a4cf400 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/content/utility/utility_blink_platform_with_sandbox_support_impl.cc.orig 2022-02-28 16:54:41 UTC +--- src/3rdparty/chromium/content/utility/utility_blink_platform_with_sandbox_support_impl.cc.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/content/utility/utility_blink_platform_with_sandbox_support_impl.cc @@ -9,7 +9,7 @@ @@ -18,7 +18,7 @@ mojo::PendingRemote<font_service::mojom::FontService> font_service; UtilityThread::Get()->BindHostReceiver( font_service.InitWithNewPipeAndPassReceiver()); -@@ -34,7 +34,7 @@ UtilityBlinkPlatformWithSandboxSupportImpl:: +@@ -35,7 +35,7 @@ UtilityBlinkPlatformWithSandboxSupportImpl:: blink::WebSandboxSupport* UtilityBlinkPlatformWithSandboxSupportImpl::GetSandboxSupport() { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.h index 2f75ecf9db8d..6d6a2dd0654e 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.h @@ -1,15 +1,6 @@ ---- src/3rdparty/chromium/content/utility/utility_blink_platform_with_sandbox_support_impl.h.orig 2022-02-28 16:54:41 UTC +--- src/3rdparty/chromium/content/utility/utility_blink_platform_with_sandbox_support_impl.h.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/content/utility/utility_blink_platform_with_sandbox_support_impl.h -@@ -10,7 +10,7 @@ - #include "build/build_config.h" - #include "third_party/blink/public/platform/platform.h" - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "components/services/font/public/cpp/font_loader.h" // nogncheck - #include "third_party/skia/include/core/SkRefCnt.h" // nogncheck - #endif -@@ -38,10 +38,10 @@ class UtilityBlinkPlatformWithSandboxSupportImpl : pub +@@ -33,7 +33,7 @@ class UtilityBlinkPlatformWithSandboxSupportImpl : pub blink::WebSandboxSupport* GetSandboxSupport() override; private: @@ -17,8 +8,4 @@ +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) std::unique_ptr<blink::WebSandboxSupport> sandbox_support_; #endif --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - sk_sp<font_service::FontLoader> font_loader_; - #endif }; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__main.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__main.cc index ec6534574ccd..686fe2e4cc1b 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__main.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__main.cc @@ -1,23 +1,26 @@ ---- src/3rdparty/chromium/content/utility/utility_main.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/content/utility/utility_main.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/content/utility/utility_main.cc -@@ -31,7 +31,7 @@ +@@ -34,7 +34,7 @@ #include "third_party/icu/source/common/unicode/unistr.h" #include "third_party/icu/source/i18n/unicode/timezone.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "base/file_descriptor_store.h" + #include "base/files/file_util.h" + #include "base/pickle.h" +@@ -42,7 +42,9 @@ #include "content/utility/speech/speech_recognition_sandbox_hook_linux.h" #include "gpu/config/gpu_info_collector.h" #include "media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.h" -@@ -42,15 +42,21 @@ - #if BUILDFLAG(ENABLE_PRINTING) - #include "printing/sandbox/print_backend_sandbox_hook_linux.h" - #endif +#if !BUILDFLAG(IS_BSD) #include "sandbox/policy/linux/sandbox_linux.h" +#endif #include "services/audio/audio_sandbox_hook_linux.h" #include "services/network/network_sandbox_hook_linux.h" + // gn check is not smart enough to realize that this include only applies to +@@ -54,10 +56,14 @@ + #endif #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) @@ -26,13 +29,13 @@ #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_BSD) -+#include "sandbox/policy/openbsd/sandbox_openbsd.h" ++#include "sandbox/policy/sandbox.h" +#endif + #if BUILDFLAG(IS_CHROMEOS_ASH) #include "chromeos/ash/components/assistant/buildflags.h" #include "chromeos/ash/services/ime/ime_sandbox_hook.h" -@@ -62,7 +68,7 @@ +@@ -69,7 +75,7 @@ #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if (BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) && \ @@ -41,12 +44,17 @@ #include "components/services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.h" // nogncheck #endif -@@ -83,10 +89,10 @@ namespace { +@@ -95,7 +101,7 @@ namespace { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + std::vector<std::string> GetNetworkContextsParentDirectories() { + base::MemoryMappedFile::Region region; + base::ScopedFD read_pipe_fd = base::FileDescriptorStore::GetInstance().TakeFD( +@@ -123,7 +129,7 @@ bool ShouldUseAmdGpuPolicy(sandbox::mojom::Sandbox san + bool ShouldUseAmdGpuPolicy(sandbox::mojom::Sandbox sandbox_type) { const bool obtain_gpu_info = -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) @@ -54,7 +62,7 @@ sandbox_type == sandbox::mojom::Sandbox::kHardwareVideoDecoding || #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) sandbox_type == sandbox::mojom::Sandbox::kHardwareVideoEncoding; -@@ -168,7 +174,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -239,7 +245,7 @@ int UtilityMain(MainFunctionParams parameters) { } } @@ -63,7 +71,7 @@ // Initializes the sandbox before any threads are created. // TODO(jorgelo): move this after GTK initialization when we enable a strict // Seccomp-BPF policy. -@@ -200,7 +206,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -272,7 +278,7 @@ int UtilityMain(MainFunctionParams parameters) { #endif break; #endif @@ -72,7 +80,7 @@ case sandbox::mojom::Sandbox::kHardwareVideoDecoding: pre_sandbox_hook = base::BindOnce(&media::HardwareVideoDecodingPreSandboxHook); -@@ -227,6 +233,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -299,6 +305,7 @@ int UtilityMain(MainFunctionParams parameters) { default: break; } @@ -80,7 +88,7 @@ if (!sandbox::policy::IsUnsandboxedSandboxType(sandbox_type) && (parameters.zygote_child || !pre_sandbox_hook.is_null())) { sandbox::policy::SandboxLinux::Options sandbox_options; -@@ -235,6 +242,11 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -307,6 +314,11 @@ int UtilityMain(MainFunctionParams parameters) { sandbox::policy::Sandbox::Initialize( sandbox_type, std::move(pre_sandbox_hook), sandbox_options); } @@ -89,6 +97,6 @@ + sandbox_type, std::move(pre_sandbox_hook), + sandbox::policy::SandboxLinux::Options()); +#endif - #elif BUILDFLAG(IS_WIN) - g_utility_target_services = parameters.sandbox_info->target_services; - #endif + + // Start the HangWatcher now that the sandbox is engaged, if it hasn't + // already been started. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_zygote_zygote__linux.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_zygote_zygote__linux.cc index 89dbfd1880d8..ef586f15e77a 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_zygote_zygote__linux.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_zygote_zygote__linux.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/content/zygote/zygote_linux.cc.orig 2023-02-08 09:03:45 UTC +--- src/3rdparty/chromium/content/zygote/zygote_linux.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/content/zygote/zygote_linux.cc @@ -1,6 +1,7 @@ // Copyright 2012 The Chromium Authors @@ -8,7 +8,7 @@ #include "content/zygote/zygote_linux.h" -@@ -706,3 +707,4 @@ void Zygote::HandleReinitializeLoggingRequest(base::Pi +@@ -707,3 +708,4 @@ void Zygote::HandleReinitializeLoggingRequest(base::Pi } } // namespace content diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_zygote_zygote__main__linux.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_zygote_zygote__main__linux.cc index c3951e0b9545..ec201757b5e7 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_zygote_zygote__main__linux.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_content_zygote_zygote__main__linux.cc @@ -1,10 +1,10 @@ ---- src/3rdparty/chromium/content/zygote/zygote_main_linux.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/content/zygote/zygote_main_linux.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/content/zygote/zygote_main_linux.cc @@ -11,7 +11,9 @@ #include <stddef.h> #include <stdint.h> #include <string.h> -+#if !defined(OS_BSD) ++#if !BUILDFLAG(IS_BSD) #include <sys/prctl.h> +#endif #include <sys/socket.h> @@ -14,33 +14,27 @@ #include "sandbox/linux/services/thread_helpers.h" #include "sandbox/linux/suid/client/setuid_sandbox_client.h" #include "sandbox/policy/linux/sandbox_debug_handling_linux.h" -+#if !defined(OS_BSD) ++#if !BUILDFLAG(IS_BSD) #include "sandbox/policy/linux/sandbox_linux.h" +#endif #include "sandbox/policy/sandbox.h" #include "sandbox/policy/switches.h" #include "third_party/icu/source/i18n/unicode/timezone.h" -@@ -50,6 +54,7 @@ namespace { +@@ -50,11 +54,13 @@ namespace { namespace { -+#if !defined(OS_BSD) ++#if !BUILDFLAG(IS_BSD) void CloseFds(const std::vector<int>& fds) { for (const auto& it : fds) { PCHECK(0 == IGNORE_EINTR(close(it))); -@@ -67,9 +72,11 @@ base::OnceClosure ClosureFromTwoClosures(base::OnceClo - }, - std::move(one), std::move(two)); + } } +#endif - } // namespace - -+#if !defined(OS_BSD) - // This function triggers the static and lazy construction of objects that need - // to be created before imposing the sandbox. - static void ZygotePreSandboxInit() { -@@ -176,9 +183,11 @@ static void EnterLayerOneSandbox(sandbox::policy::Sand + base::OnceClosure ClosureFromTwoClosures(base::OnceClosure one, + base::OnceClosure two) { +@@ -159,9 +165,11 @@ static void EnterLayerOneSandbox(sandbox::policy::Sand CHECK(!using_layer1_sandbox); } } @@ -48,11 +42,11 @@ bool ZygoteMain( std::vector<std::unique_ptr<ZygoteForkDelegate>> fork_delegates) { -+#if !defined(OS_BSD) ++#if !BUILDFLAG(IS_BSD) sandbox::SetAmZygoteOrRenderer(true, GetSandboxFD()); auto* linux_sandbox = sandbox::policy::SandboxLinux::GetInstance(); -@@ -244,6 +253,9 @@ bool ZygoteMain( +@@ -227,6 +235,9 @@ bool ZygoteMain( // This function call can return multiple times, once per fork(). return zygote.ProcessRequests(); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_device_bluetooth_bluetooth__adapter.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_device_bluetooth_bluetooth__adapter.cc index 55b7424dad44..852ac4023dd0 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_device_bluetooth_bluetooth__adapter.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_device_bluetooth_bluetooth__adapter.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/device/bluetooth/bluetooth_adapter.cc.orig 2022-07-28 06:05:58 UTC +--- src/3rdparty/chromium/device/bluetooth/bluetooth_adapter.cc.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/device/bluetooth/bluetooth_adapter.cc -@@ -32,7 +32,7 @@ BluetoothAdapter::ServiceOptions::ServiceOptions() = d +@@ -31,7 +31,7 @@ namespace device { + BluetoothAdapter::ServiceOptions::ServiceOptions() = default; BluetoothAdapter::ServiceOptions::~ServiceOptions() = default; - #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_MAC) && \ -- !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) -+ !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) +-#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) && \ ++#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) && \ + !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) // static scoped_refptr<BluetoothAdapter> BluetoothAdapter::CreateAdapter() { - return nullptr; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_api__browser__context__keyed__service__factories.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_api__browser__context__keyed__service__factories.cc index 0bf6af43124a..bc444409da16 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_api__browser__context__keyed__service__factories.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_api__browser__context__keyed__service__factories.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/extensions/browser/api/api_browser_context_keyed_service_factories.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/extensions/browser/api/api_browser_context_keyed_service_factories.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/extensions/browser/api/api_browser_context_keyed_service_factories.cc -@@ -108,7 +108,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt +@@ -118,7 +118,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt MessageService::GetFactoryInstance(); MessagingAPIMessageFilter::EnsureAssociatedFactoryBuilt(); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_messaging_message__service.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_messaging_message__service.cc index 572556abc8fb..bfbb3c283998 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_messaging_message__service.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_messaging_message__service.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/extensions/browser/api/messaging/message_service.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/extensions/browser/api/messaging/message_service.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/extensions/browser/api/messaging/message_service.cc -@@ -70,7 +70,7 @@ const char kReceivingEndDoesntExistError[] = +@@ -71,7 +71,7 @@ const char kReceivingEndDoesntExistError[] = const char kReceivingEndDoesntExistError[] = "Could not establish connection. Receiving end does not exist."; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ @@ -9,7 +9,7 @@ const char kMissingPermissionError[] = "Access to native messaging requires nativeMessaging permission."; const char kProhibitedByPoliciesError[] = -@@ -468,7 +468,7 @@ void MessageService::OpenChannelToNativeApp( +@@ -490,7 +490,7 @@ void MessageService::OpenChannelToNativeApp( return; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_networking__private_networking__private__delegate__factory.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_networking__private_networking__private__delegate__factory.cc index 15803e1f8aa5..49a77a57e9d3 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_networking__private_networking__private__delegate__factory.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_networking__private_networking__private__delegate__factory.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/extensions/browser/api/networking_private/networking_private_delegate_factory.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/extensions/browser/api/networking_private/networking_private_delegate_factory.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/extensions/browser/api/networking_private/networking_private_delegate_factory.cc @@ -14,7 +14,7 @@ #include "extensions/browser/api/networking_private/networking_private_chromeos.h" @@ -9,12 +9,12 @@ #include "extensions/browser/api/networking_private/networking_private_linux.h" #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) #include "components/wifi/wifi_service.h" -@@ -68,7 +68,7 @@ KeyedService* NetworkingPrivateDelegateFactory::BuildS - delegate = new NetworkingPrivateChromeOS(browser_context); +@@ -67,7 +67,7 @@ NetworkingPrivateDelegateFactory::BuildServiceInstance + delegate = std::make_unique<NetworkingPrivateChromeOS>(browser_context); #elif BUILDFLAG(IS_CHROMEOS_LACROS) - delegate = new NetworkingPrivateLacros(browser_context); + delegate = std::make_unique<NetworkingPrivateLacros>(browser_context); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - delegate = new NetworkingPrivateLinux(); + delegate = std::make_unique<NetworkingPrivateLinux>(); #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) std::unique_ptr<wifi::WiFiService> wifi_service(wifi::WiFiService::Create()); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_browser_extension__prefs.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_browser_extension__prefs.cc deleted file mode 100644 index 07b7480a08cf..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_browser_extension__prefs.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/extensions/browser/extension_prefs.cc.orig 2023-08-16 19:50:41 UTC -+++ src/3rdparty/chromium/extensions/browser/extension_prefs.cc -@@ -2230,7 +2230,7 @@ void ExtensionPrefs::RegisterProfilePrefs( - registry->RegisterListPref( - pref_names::kExtendedBackgroundLifetimeForPortConnectionsToUrls); - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - registry->RegisterBooleanPref(pref_names::kChromeAppsEnabled, false); - #endif - registry->RegisterBooleanPref( diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_browser_pref__names.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_browser_pref__names.cc deleted file mode 100644 index 9bd3fbe3ec8d..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_browser_pref__names.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/extensions/browser/pref_names.cc.orig 2023-04-05 11:05:06 UTC -+++ src/3rdparty/chromium/extensions/browser/pref_names.cc -@@ -53,7 +53,7 @@ const char kManifestV2Availability[] = "extensions.man - const char kPinnedExtensions[] = "extensions.pinned_extensions"; - const char kStorageGarbageCollect[] = "extensions.storage.garbagecollect"; - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - extern const char kChromeAppsEnabled[] = "extensions.chrome_apps_enabled"; - #endif - const char kChromeAppsWebViewPermissiveBehaviorAllowed[] = diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_browser_pref__names.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_browser_pref__names.h deleted file mode 100644 index 8d538f1e7198..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_browser_pref__names.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/extensions/browser/pref_names.h.orig 2023-04-05 11:05:06 UTC -+++ src/3rdparty/chromium/extensions/browser/pref_names.h -@@ -114,7 +114,7 @@ extern const char kPinnedExtensions[]; - extern const char kStorageGarbageCollect[]; - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - // A preference for whether Chrome Apps should be allowed. The default depends - // on the ChromeAppsDeprecation feature flag, and this pref can extend support - // for Chrome Apps by enterprise policy. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_common_api___permission__features.json b/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_common_api___permission__features.json index 6666f58735d2..8b64105a88f3 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_common_api___permission__features.json +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_common_api___permission__features.json @@ -1,15 +1,15 @@ ---- src/3rdparty/chromium/extensions/common/api/_permission_features.json.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/extensions/common/api/_permission_features.json.orig 2023-07-16 15:47:57 UTC +++ src/3rdparty/chromium/extensions/common/api/_permission_features.json -@@ -134,7 +134,7 @@ +@@ -138,7 +138,7 @@ { "channel": "stable", "extension_types": ["platform_app"], -- "platforms": ["chromeos", "win", "mac", "linux"], -+ "platforms": ["chromeos", "win", "mac", "linux", "openbsd", "freebsd"], +- "platforms": ["chromeos", "lacros", "win", "mac", "linux"], ++ "platforms": ["chromeos", "lacros", "win", "mac", "linux", "openbsd", "freebsd"], "allowlist": [ "1C93BD3CF875F4A73C0B2A163BB8FBDA8B8B3D80", // http://crbug.com/387169 "A3BC37E2148AC4E99BE4B16AF9D42DD1E592BBBE", // http://crbug.com/387169 -@@ -427,7 +427,7 @@ +@@ -432,7 +432,7 @@ }, { "channel": "stable", "extension_types": ["extension", "legacy_packaged_app", "platform_app"], @@ -18,7 +18,7 @@ "allowlist": [ "0DE0F05680A4A056BCEC864ED8DDA84296F82B40", // http://crbug.com/434651 "1C93BD3CF875F4A73C0B2A163BB8FBDA8B8B3D80", // http://crbug.com/293683 -@@ -469,7 +469,7 @@ +@@ -474,7 +474,7 @@ "networkingPrivate": { "channel": "stable", "extension_types": ["extension", "legacy_packaged_app", "platform_app"], diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_common_api_runtime.json b/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_common_api_runtime.json index a2bd4cf5a954..60c4d4bfbe25 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_common_api_runtime.json +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_common_api_runtime.json @@ -1,12 +1,10 @@ ---- src/3rdparty/chromium/extensions/common/api/runtime.json.orig 2022-08-31 12:19:35 UTC +--- src/3rdparty/chromium/extensions/common/api/runtime.json.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/extensions/common/api/runtime.json -@@ -86,7 +86,8 @@ - "cros", - "linux", - "openbsd", -- "fuchsia" -+ "fuchsia", -+ "freebsd" +@@ -89,6 +89,7 @@ + {"name": "cros", "description": "Specifies the Chrome operating system."}, + {"name": "linux", "description": "Specifies the Linux operating system."}, + {"name": "openbsd", "description": "Specifies the OpenBSD operating system."}, ++ {"name": "freebsd", "description": "Specifies the FreeBSD operating system."}, + {"name": "fuchsia", "description": "Specifies the Fuchsia operating system."} ] }, - { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_common_command.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_common_command.cc index cd2f112b6bbb..ba234ebaf7f5 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_common_command.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_common_command.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/extensions/common/command.cc.orig 2022-11-30 08:12:58 UTC +--- src/3rdparty/chromium/extensions/common/command.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/extensions/common/command.cc -@@ -280,7 +280,7 @@ std::string Command::CommandPlatform() { +@@ -282,7 +282,7 @@ std::string Command::CommandPlatform() { return values::kKeybindingPlatformMac; #elif BUILDFLAG(IS_CHROMEOS) return values::kKeybindingPlatformChromeOs; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_common_features_feature.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_common_features_feature.cc index 4711f762b9c2..14a43d6eddf2 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_common_features_feature.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_common_features_feature.cc @@ -1,10 +1,10 @@ ---- src/3rdparty/chromium/extensions/common/features/feature.cc.orig 2022-02-28 16:54:41 UTC +--- src/3rdparty/chromium/extensions/common/features/feature.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/extensions/common/features/feature.cc @@ -34,6 +34,8 @@ Feature::Platform Feature::GetCurrentPlatform() { return WIN_PLATFORM; #elif BUILDFLAG(IS_FUCHSIA) return FUCHSIA_PLATFORM; -+#elif defined(OS_BSD) ++#elif BUILDFLAG(IS_BSD) + return LINUX_PLATFORM; #else return UNSPECIFIED_PLATFORM; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_shell_browser_api_runtime_shell__runtime__api__delegate.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_shell_browser_api_runtime_shell__runtime__api__delegate.cc index 20c2b082fae7..478bd8df8e65 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_shell_browser_api_runtime_shell__runtime__api__delegate.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_extensions_shell_browser_api_runtime_shell__runtime__api__delegate.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/extensions/shell/browser/api/runtime/shell_runtime_api_delegate.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/extensions/shell/browser/api/runtime/shell_runtime_api_delegate.cc.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/extensions/shell/browser/api/runtime/shell_runtime_api_delegate.cc @@ -44,7 +44,7 @@ void ShellRuntimeAPIDelegate::OpenURL(const GURL& unin bool ShellRuntimeAPIDelegate::GetPlatformInfo(PlatformInfo* info) { #if BUILDFLAG(IS_CHROMEOS_ASH) - info->os = api::runtime::PLATFORM_OS_CROS; + info->os = api::runtime::PlatformOs::kCros; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - info->os = api::runtime::PLATFORM_OS_LINUX; + info->os = api::runtime::PlatformOs::kLinux; #endif return true; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_google__apis_gcm_engine_heartbeat__manager.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_google__apis_gcm_engine_heartbeat__manager.cc index 534926c686b0..abd723e1e979 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_google__apis_gcm_engine_heartbeat__manager.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_google__apis_gcm_engine_heartbeat__manager.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/google_apis/gcm/engine/heartbeat_manager.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/google_apis/gcm/engine/heartbeat_manager.cc.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/google_apis/gcm/engine/heartbeat_manager.cc -@@ -33,7 +33,7 @@ const int kMinClientHeartbeatIntervalMs = 1000 * 30; +@@ -32,7 +32,7 @@ const int kMinClientHeartbeatIntervalMs = 1000 * 30; // Minimum time spent sleeping before we force a new heartbeat. const int kMinSuspendTimeMs = 1000 * 10; // 10 seconds. @@ -9,7 +9,7 @@ // The period at which to check if the heartbeat time has passed. Used to // protect against platforms where the timer is delayed by the system being // suspended. Only needed on linux because the other OSes provide a standard -@@ -193,7 +193,7 @@ void HeartbeatManager::RestartTimer() { +@@ -191,7 +191,7 @@ void HeartbeatManager::RestartTimer() { base::BindRepeating(&HeartbeatManager::OnHeartbeatTriggered, weak_ptr_factory_.GetWeakPtr())); @@ -18,7 +18,7 @@ // Windows, Mac, Android, iOS, and Chrome OS all provide a way to be notified // when the system is suspending or resuming. The only one that does not is // Linux so we need to poll to check for missed heartbeats. -@@ -218,7 +218,7 @@ void HeartbeatManager::CheckForMissedHeartbeat() { +@@ -214,7 +214,7 @@ void HeartbeatManager::CheckForMissedHeartbeat() { return; } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_common_gpu__memory__buffer__support.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_common_gpu__memory__buffer__support.cc index 773d8d038c0b..12e6456454a5 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_common_gpu__memory__buffer__support.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_common_gpu__memory__buffer__support.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/gpu/command_buffer/common/gpu_memory_buffer_support.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/gpu/command_buffer/common/gpu_memory_buffer_support.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/gpu/command_buffer/common/gpu_memory_buffer_support.cc -@@ -173,7 +173,7 @@ uint32_t GetPlatformSpecificTextureTarget() { +@@ -182,7 +182,7 @@ uint32_t GetPlatformSpecificTextureTarget() { #if BUILDFLAG(IS_MAC) return macos_specific_texture_target; #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || \ @@ -9,7 +9,7 @@ return GL_TEXTURE_EXTERNAL_OES; #elif BUILDFLAG(IS_IOS) return GL_TEXTURE_2D; -@@ -208,7 +208,7 @@ GPU_EXPORT bool NativeBufferNeedsPlatformSpecificTextu +@@ -217,7 +217,7 @@ GPU_EXPORT bool NativeBufferNeedsPlatformSpecificTextu gfx::BufferFormat format, gfx::BufferPlane plane) { #if BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_dawn__context__provider.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_dawn__context__provider.cc new file mode 100644 index 000000000000..df5720390dd5 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_dawn__context__provider.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/gpu/command_buffer/service/dawn_context_provider.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/gpu/command_buffer/service/dawn_context_provider.cc +@@ -145,7 +145,7 @@ wgpu::BackendType DawnContextProvider::GetDefaultBacke + return base::FeatureList::IsEnabled(features::kSkiaGraphiteDawnUseD3D12) + ? wgpu::BackendType::D3D12 + : wgpu::BackendType::D3D11; +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + return wgpu::BackendType::Vulkan; + #elif BUILDFLAG(IS_APPLE) + return wgpu::BackendType::Metal; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_gles2__cmd__decoder.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_gles2__cmd__decoder.cc index 738ed7fdf341..c71dfc2e8b62 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_gles2__cmd__decoder.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_gles2__cmd__decoder.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/gpu/command_buffer/service/gles2_cmd_decoder.cc.orig 2023-09-11 15:16:04 UTC +--- src/3rdparty/chromium/gpu/command_buffer/service/gles2_cmd_decoder.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/gpu/command_buffer/service/gles2_cmd_decoder.cc -@@ -3462,7 +3462,7 @@ GLES2Decoder* GLES2Decoder::Create( +@@ -2982,7 +2982,7 @@ GLES2Decoder* GLES2Decoder::Create( // Fix for Qt WebEngine Crash when QSG_RHI_BACKEND=opengl // Allow linux to run fuzzers. #if BUILDFLAG(ENABLE_VALIDATING_COMMAND_DECODER) || BUILDFLAG(IS_LINUX) || \ diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_angle__vulkan__image__backing__factory.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_angle__vulkan__image__backing__factory.cc index bbacacb8268a..e7b1efc2ebbd 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_angle__vulkan__image__backing__factory.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_angle__vulkan__image__backing__factory.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/gpu/command_buffer/service/shared_image/angle_vulkan_image_backing_factory.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/gpu/command_buffer/service/shared_image/angle_vulkan_image_backing_factory.cc.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/gpu/command_buffer/service/shared_image/angle_vulkan_image_backing_factory.cc -@@ -20,7 +20,7 @@ namespace { +@@ -21,7 +21,7 @@ namespace { // TODO(penghuang): verify the scanout is the right usage for video playback. // crbug.com/1280798 constexpr uint32_t kSupportedUsage = diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_external__vk__image__backing.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_external__vk__image__backing.cc index 8182d2c3594c..46fe9b90ef76 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_external__vk__image__backing.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_external__vk__image__backing.cc @@ -1,20 +1,20 @@ ---- src/3rdparty/chromium/gpu/command_buffer/service/shared_image/external_vk_image_backing.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/gpu/command_buffer/service/shared_image/external_vk_image_backing.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/gpu/command_buffer/service/shared_image/external_vk_image_backing.cc -@@ -36,7 +36,7 @@ +@@ -47,7 +47,7 @@ #include "ui/gl/gl_version_info.h" #include "ui/gl/scoped_binders.h" --#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && BUILDFLAG(USE_DAWN) -+#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN) +-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DAWN) ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN) #include "gpu/command_buffer/service/shared_image/external_vk_image_dawn_representation.h" #endif -@@ -534,7 +534,7 @@ std::unique_ptr<DawnImageRepresentation> ExternalVkIma - WGPUDevice wgpuDevice, - WGPUBackendType backend_type, - std::vector<WGPUTextureFormat> view_formats) { --#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && BUILDFLAG(USE_DAWN) -+#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN) - auto wgpu_format = ToWGPUFormat(format()); +@@ -673,7 +673,7 @@ std::unique_ptr<DawnImageRepresentation> ExternalVkIma + const wgpu::Device& wgpuDevice, + wgpu::BackendType backend_type, + std::vector<wgpu::TextureFormat> view_formats) { +-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DAWN) ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN) + auto wgpu_format = ToDawnFormat(format()); - if (wgpu_format == WGPUTextureFormat_Undefined) { + if (wgpu_format == wgpu::TextureFormat::Undefined) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc new file mode 100644 index 000000000000..7e0e594df65b --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc +@@ -89,7 +89,7 @@ constexpr uint32_t kSupportedUsage = + } // namespace + + constexpr uint32_t kSupportedUsage = +-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DAWN) ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN) + SHARED_IMAGE_USAGE_WEBGPU | SHARED_IMAGE_USAGE_WEBGPU_SWAP_CHAIN_TEXTURE | + SHARED_IMAGE_USAGE_WEBGPU_STORAGE_TEXTURE | + #endif +@@ -258,7 +258,7 @@ bool ExternalVkImageBackingFactory::IsSupported( + return false; + } + +-#if BUILDFLAG(IS_LINUX) && !defined(TOOLKIT_QT) ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !defined(TOOLKIT_QT) + if (format.IsLegacyMultiplanar()) { + // ExternalVkImageBacking doesn't work properly with external sampler + // multi-planar formats on Linux, see https://crbug.com/1394888. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_shared__image__factory.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_shared__image__factory.cc new file mode 100644 index 000000000000..beaf9fc60a42 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_shared__image__factory.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/gpu/command_buffer/service/shared_image/shared_image_factory.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/gpu/command_buffer/service/shared_image/shared_image_factory.cc +@@ -142,7 +142,7 @@ gfx::GpuMemoryBufferType GetNativeBufferType() { + return gfx::GpuMemoryBufferType::IO_SURFACE_BUFFER; + #elif BUILDFLAG(IS_ANDROID) + return gfx::GpuMemoryBufferType::ANDROID_HARDWARE_BUFFER; +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + return gfx::GpuMemoryBufferType::NATIVE_PIXMAP; + #elif BUILDFLAG(IS_WIN) + return gfx::GpuMemoryBufferType::DXGI_SHARED_HANDLE; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_shared__image__manager.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_shared__image__manager.cc index c27a0d5a303c..ff053561c04e 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_shared__image__manager.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_shared__image__manager.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/gpu/command_buffer/service/shared_image/shared_image_manager.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/gpu/command_buffer/service/shared_image/shared_image_manager.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/gpu/command_buffer/service/shared_image/shared_image_manager.cc -@@ -481,7 +481,7 @@ bool SharedImageManager::SupportsScanoutImages() { +@@ -507,7 +507,7 @@ bool SharedImageManager::SupportsScanoutImages() { return true; #elif BUILDFLAG(IS_ANDROID) return base::AndroidHardwareBufferCompat::IsSupportAvailable(); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc index e5577a041f70..bb5a1de33a97 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc @@ -1,9 +1,9 @@ ---- src/3rdparty/chromium/gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc -@@ -181,7 +181,7 @@ bool WrappedSkImageBacking::Initialize() { - for (int plane = 0; plane < num_planes; ++plane) { - auto& texture = textures_[plane]; - gfx::Size plane_size = format().GetPlaneSize(plane, size()); +@@ -211,7 +211,7 @@ bool WrappedSkImageBacking::Initialize(const std::stri + + constexpr GrRenderable is_renderable = GrRenderable::kYes; + constexpr GrProtected is_protected = GrProtected::kNo; -#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX) +#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) // Blue for single-planar and magenta-ish for multi-planar. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_webgpu__decoder__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_webgpu__decoder__impl.cc index 26146461e135..118c8c18e993 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_webgpu__decoder__impl.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_webgpu__decoder__impl.cc @@ -1,11 +1,20 @@ ---- src/3rdparty/chromium/gpu/command_buffer/service/webgpu_decoder_impl.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/gpu/command_buffer/service/webgpu_decoder_impl.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/gpu/command_buffer/service/webgpu_decoder_impl.cc -@@ -1225,7 +1225,7 @@ void WebGPUDecoderImpl::RequestAdapterImpl( +@@ -1194,7 +1194,7 @@ void WebGPUDecoderImpl::RequestAdapterImpl( + force_fallback_adapter = true; + } - if (gr_context_type_ != GrContextType::kVulkan && - use_webgpu_adapter_ != WebGPUAdapterName::kCompat) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - callback(WGPURequestAdapterStatus_Unavailable, nullptr, - "WebGPU on Linux requires command-line flag " - "--enable-features=Vulkan", + if (!shared_context_state_->GrContextIsVulkan() && + !shared_context_state_->IsGraphiteDawnVulkan() && + use_webgpu_adapter_ != WebGPUAdapterName::kOpenGLES) { +@@ -1849,7 +1849,7 @@ WebGPUDecoderImpl::AssociateMailboxDawn( + } + + #if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_APPLE) && \ +- !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_LINUX) ++ !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + if (usage & wgpu::TextureUsage::StorageBinding) { + LOG(ERROR) << "AssociateMailbox: wgpu::TextureUsage::StorageBinding is NOT " + "supported yet on this platform."; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__control__list.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__control__list.cc index 4389712ef599..0aa02325b5b0 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__control__list.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__control__list.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/gpu/config/gpu_control_list.cc.orig 2022-06-17 14:20:10 UTC +--- src/3rdparty/chromium/gpu/config/gpu_control_list.cc.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/gpu/config/gpu_control_list.cc -@@ -302,7 +302,7 @@ bool GpuControlList::More::GLVersionInfoMismatch( +@@ -276,7 +276,7 @@ bool GpuControlList::More::GLVersionInfoMismatch( GpuControlList::GLType GpuControlList::More::GetDefaultGLType() { #if BUILDFLAG(IS_CHROMEOS) return kGLTypeGL; @@ -9,7 +9,7 @@ return kGLTypeGL; #elif BUILDFLAG(IS_MAC) return kGLTypeGL; -@@ -844,7 +844,7 @@ GpuControlList::OsType GpuControlList::GetOsType() { +@@ -817,7 +817,7 @@ GpuControlList::OsType GpuControlList::GetOsType() { return kOsAndroid; #elif BUILDFLAG(IS_FUCHSIA) return kOsFuchsia; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__finch__features.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__finch__features.cc index 614aa738dd8e..5d0e01de4b5b 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__finch__features.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__finch__features.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/gpu/config/gpu_finch_features.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/gpu/config/gpu_finch_features.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/gpu/config/gpu_finch_features.cc -@@ -57,7 +57,7 @@ CONSTINIT const base::Feature kUseGles2ForOopR( +@@ -58,7 +58,7 @@ CONSTINIT const base::Feature kUseGles2ForOopR( CONSTINIT const base::Feature kUseGles2ForOopR( "UseGles2ForOopR", #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ @@ -9,7 +9,7 @@ base::FEATURE_DISABLED_BY_DEFAULT #else base::FEATURE_ENABLED_BY_DEFAULT -@@ -135,7 +135,8 @@ CONSTINIT const base::Feature kDefaultEnableGpuRasteri +@@ -142,7 +142,8 @@ CONSTINIT const base::Feature kDefaultEnableGpuRasteri CONSTINIT const base::Feature kDefaultEnableGpuRasterization( "DefaultEnableGpuRasterization", #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || \ diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.cc index 2fd265e348df..4b96fd768921 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.cc.orig 2023-01-11 09:17:16 UTC +--- src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.cc.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.cc -@@ -21,7 +21,7 @@ +@@ -26,7 +26,7 @@ #include "ui/ozone/public/ozone_platform.h" #endif @@ -9,7 +9,7 @@ #include "gpu/ipc/common/gpu_memory_buffer_impl_native_pixmap.h" #endif -@@ -50,7 +50,7 @@ GpuMemoryBufferSupport::GetNativeGpuMemoryBufferType() +@@ -56,7 +56,7 @@ GpuMemoryBufferSupport::GetNativeGpuMemoryBufferType() return gfx::IO_SURFACE_BUFFER; #elif BUILDFLAG(IS_ANDROID) return gfx::ANDROID_HARDWARE_BUFFER; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.h index b72358947503..9744deb2ad0b 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.h.orig 2023-01-11 09:17:16 UTC +--- src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.h.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.h -@@ -18,7 +18,7 @@ +@@ -21,7 +21,7 @@ #include "ui/gfx/geometry/size.h" #include "ui/gfx/gpu_memory_buffer.h" @@ -8,4 +8,4 @@ +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_BSD) namespace gfx { class ClientNativePixmapFactory; - } + } // namespace gfx diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__init.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__init.cc index 735eb8c1d624..1e31e8949854 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__init.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__init.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/gpu/ipc/service/gpu_init.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/gpu/ipc/service/gpu_init.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/gpu/ipc/service/gpu_init.cc -@@ -357,7 +357,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -363,7 +363,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL enable_watchdog = false; #endif @@ -9,7 +9,7 @@ bool gpu_sandbox_start_early = gpu_preferences_.gpu_sandbox_start_early; #else // !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) // For some reasons MacOSX's VideoToolbox might crash when called after -@@ -393,7 +393,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -400,7 +400,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL } bool attempted_startsandbox = false; @@ -18,16 +18,7 @@ // On Chrome OS ARM Mali, GPU driver userspace creates threads when // initializing a GL context, so start the sandbox early. // TODO(zmo): Need to collect OS version before this. -@@ -442,7 +442,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL - - if (gl_initialized && gl_use_swiftshader_ && - !gl::IsSoftwareGLImplementation(gl::GetGLImplementationParts())) { --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - VLOG(1) << "Quit GPU process launch to fallback to SwiftShader cleanly " - << "on Linux"; - return false; -@@ -493,7 +493,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -457,7 +457,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL } } @@ -36,7 +27,7 @@ // The ContentSandboxHelper is currently the only one implementation of // GpuSandboxHelper and it has no dependency. Except on Linux where // VaapiWrapper checks the GL implementation to determine which display -@@ -579,7 +579,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -539,7 +539,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL command_line, gpu_feature_info_, gpu_preferences_.disable_software_rasterizer, false); if (gl_use_swiftshader_) { @@ -45,7 +36,7 @@ VLOG(1) << "Quit GPU process launch to fallback to SwiftShader cleanly " << "on Linux"; return false; -@@ -707,7 +707,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -692,7 +692,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL InitializePlatformOverlaySettings(&gpu_info_, gpu_feature_info_); @@ -54,8 +45,8 @@ // Driver may create a compatibility profile context when collect graphics // information on Linux platform. Try to collect graphics information // based on core profile context after disabling platform extensions. -@@ -759,7 +759,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL - gl_use_swiftshader_ = true; +@@ -746,7 +746,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL + } } } -#if BUILDFLAG(IS_LINUX) || \ @@ -63,7 +54,7 @@ (BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_CHROMEOS_DEVICE)) if (!gl_disabled && !gl_use_swiftshader_ && std::getenv("RUNNING_UNDER_RR")) { // https://rr-project.org/ is a Linux-only record-and-replay debugger that -@@ -903,7 +903,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -900,7 +900,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c } bool gl_disabled = gl::GetGLImplementation() == gl::kGLImplementationDisabled; @@ -72,9 +63,9 @@ (BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_CHROMEOS_DEVICE)) if (!gl_disabled && !gl_use_swiftshader_ && std::getenv("RUNNING_UNDER_RR")) { // https://rr-project.org/ is a Linux-only record-and-replay debugger that -@@ -973,7 +973,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c - - InitializePlatformOverlaySettings(&gpu_info_, gpu_feature_info_); +@@ -976,7 +976,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c + } + } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_generate__bindings.py b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_generate__bindings.py index 76b73961ae24..3fc4935c7a65 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_generate__bindings.py +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_generate__bindings.py @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/gpu/vulkan/generate_bindings.py.orig 2022-04-21 18:48:31 UTC +--- src/3rdparty/chromium/gpu/vulkan/generate_bindings.py.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/gpu/vulkan/generate_bindings.py -@@ -259,7 +259,7 @@ VULKAN_DEVICE_FUNCTIONS = [ +@@ -260,7 +260,7 @@ VULKAN_DEVICE_FUNCTIONS = [ ] }, { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_semaphore__handle.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_semaphore__handle.cc new file mode 100644 index 000000000000..a7b61ad210ab --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_semaphore__handle.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/gpu/vulkan/semaphore_handle.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/gpu/vulkan/semaphore_handle.cc +@@ -39,7 +39,7 @@ SemaphoreHandle::SemaphoreHandle(gfx::GpuFenceHandle f + // https://fuchsia.dev/reference/fidl/fuchsia.ui.scenic. + Init(VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA, + std::move(fence_handle.owned_event)); +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + Init(VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR, + std::move(fence_handle.owned_fd)); + #elif BUILDFLAG(IS_POSIX) +@@ -64,7 +64,7 @@ gfx::GpuFenceHandle SemaphoreHandle::ToGpuFenceHandle( + // VkSemaphore, which can then be used to submit present work, see + // https://fuchsia.dev/reference/fidl/fuchsia.ui.scenic. + fence_handle.owned_event = TakeHandle(); +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + if (type_ == VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR) { + fence_handle.owned_fd = TakeHandle(); + } else { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__device__queue.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__device__queue.cc index 1755a836be13..d67111ec0331 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__device__queue.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__device__queue.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/gpu/vulkan/vulkan_device_queue.cc.orig 2022-11-30 08:12:58 UTC +--- src/3rdparty/chromium/gpu/vulkan/vulkan_device_queue.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/gpu/vulkan/vulkan_device_queue.cc -@@ -89,7 +89,7 @@ bool VulkanDeviceQueue::Initialize( +@@ -121,7 +121,7 @@ bool VulkanDeviceQueue::Initialize( // In dual-CPU cases, we cannot detect the active GPU correctly on Linux, // so don't select GPU device based on the |gpu_info|. @@ -9,12 +9,12 @@ // If gpu_info is provided, the device should match it. if (gpu_info && (device_properties.vendorID != gpu_info->gpu.vendor_id || device_properties.deviceID != gpu_info->gpu.device_id)) { -@@ -229,7 +229,7 @@ bool VulkanDeviceQueue::Initialize( - enabled_device_features_2_ = {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2}; - - // Android, Fuchsia, and Linux(VaapiVideoDecoder) need YCbCr sampler support. --#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) +@@ -263,7 +263,7 @@ bool VulkanDeviceQueue::Initialize( + // Android, Fuchsia, Linux, and CrOS (VaapiVideoDecoder) need YCbCr sampler + // support. + #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (!physical_device_info.feature_sampler_ycbcr_conversion) { LOG(ERROR) << "samplerYcbcrConversion is not supported."; return false; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__device__queue.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__device__queue.h index d3f545db878e..bc33c334dbab 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__device__queue.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__device__queue.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/gpu/vulkan/vulkan_device_queue.h.orig 2022-09-24 10:57:32 UTC +--- src/3rdparty/chromium/gpu/vulkan/vulkan_device_queue.h.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/gpu/vulkan/vulkan_device_queue.h -@@ -158,7 +158,7 @@ class COMPONENT_EXPORT(VULKAN) VulkanDeviceQueue { - +@@ -166,7 +166,7 @@ class COMPONENT_EXPORT(VULKAN) VulkanDeviceQueue bool allow_protected_memory_ = false; --#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) VkPhysicalDeviceSamplerYcbcrConversionFeatures sampler_ycbcr_conversion_features_{ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES}; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__function__pointers.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__function__pointers.cc index bdc303a1f776..cfa5f590ebf5 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__function__pointers.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__function__pointers.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/gpu/vulkan/vulkan_function_pointers.cc.orig 2022-04-21 18:48:31 UTC +--- src/3rdparty/chromium/gpu/vulkan/vulkan_function_pointers.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/gpu/vulkan/vulkan_function_pointers.cc -@@ -1151,7 +1151,7 @@ bool VulkanFunctionPointers::BindDeviceFunctionPointer +@@ -1161,7 +1161,7 @@ bool VulkanFunctionPointers::BindDeviceFunctionPointer } } @@ -9,3 +9,12 @@ if (gfx::HasExtension(enabled_extensions, VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME)) { vkGetImageDrmFormatModifierPropertiesEXT = +@@ -1350,7 +1350,7 @@ void VulkanFunctionPointers::ResetForTesting() { + vkGetSwapchainImagesKHR = nullptr; + vkQueuePresentKHR = nullptr; + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + vkGetImageDrmFormatModifierPropertiesEXT = nullptr; + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__function__pointers.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__function__pointers.h index 4e7be2fb3567..8c52f65fe0a8 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__function__pointers.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__function__pointers.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/gpu/vulkan/vulkan_function_pointers.h.orig 2022-04-21 18:48:31 UTC +--- src/3rdparty/chromium/gpu/vulkan/vulkan_function_pointers.h.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/gpu/vulkan/vulkan_function_pointers.h -@@ -305,7 +305,7 @@ struct COMPONENT_EXPORT(VULKAN) VulkanFunctionPointers +@@ -311,7 +311,7 @@ struct COMPONENT_EXPORT(VULKAN) VulkanFunctionPointers VulkanFunction<PFN_vkGetSwapchainImagesKHR> vkGetSwapchainImagesKHR; VulkanFunction<PFN_vkQueuePresentKHR> vkQueuePresentKHR; @@ -9,7 +9,7 @@ VulkanFunction<PFN_vkGetImageDrmFormatModifierPropertiesEXT> vkGetImageDrmFormatModifierPropertiesEXT; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -1212,7 +1212,7 @@ ALWAYS_INLINE VkResult vkQueuePresentKHR(VkQueue queue +@@ -1235,7 +1235,7 @@ ALWAYS_INLINE VkResult vkQueuePresentKHR(VkQueue queue pPresentInfo); } @@ -18,7 +18,7 @@ ALWAYS_INLINE VkResult vkGetImageDrmFormatModifierPropertiesEXT( VkDevice device, VkImage image, -@@ -1222,4 +1222,4 @@ ALWAYS_INLINE VkResult vkGetImageDrmFormatModifierProp +@@ -1245,4 +1245,4 @@ ALWAYS_INLINE VkResult vkGetImageDrmFormatModifierProp } #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__image.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__image.cc deleted file mode 100644 index d00fc83963f5..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__image.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/gpu/vulkan/vulkan_image.cc.orig 2023-02-08 09:03:45 UTC -+++ src/3rdparty/chromium/gpu/vulkan/vulkan_image.cc -@@ -392,7 +392,7 @@ bool VulkanImage::InitializeWithExternalMemory( - - // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is - // complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - VkPhysicalDeviceImageDrmFormatModifierInfoEXT modifier_info = { - .sType = - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT, diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__util.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__util.cc index 8ff623025c71..16b86dba4c0b 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__util.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__util.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/gpu/vulkan/vulkan_util.cc.orig 2022-07-22 17:30:31 UTC +--- src/3rdparty/chromium/gpu/vulkan/vulkan_util.cc.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/gpu/vulkan/vulkan_util.cc -@@ -199,7 +199,7 @@ bool CheckVulkanCompabilities(const VulkanInfo& vulkan +@@ -343,7 +343,7 @@ bool CheckVulkanCompabilities(const VulkanInfo& vulkan } } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__browser__main__parts__posix.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__browser__main__parts__posix.cc index fc98746712ee..2579ca453b33 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__browser__main__parts__posix.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__browser__main__parts__posix.cc @@ -1,14 +1,14 @@ ---- src/3rdparty/chromium/headless/lib/browser/headless_browser_main_parts_posix.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/headless/lib/browser/headless_browser_main_parts_posix.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/headless/lib/browser/headless_browser_main_parts_posix.cc -@@ -19,13 +19,13 @@ +@@ -21,13 +21,13 @@ #include "content/public/browser/browser_thread.h" #include "headless/lib/browser/headless_browser_impl.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/command_line.h" - #include "components/os_crypt/key_storage_config_linux.h" - #include "components/os_crypt/os_crypt.h" + #include "components/os_crypt/sync/key_storage_config_linux.h" + #include "components/os_crypt/sync/os_crypt.h" #include "headless/public/switches.h" -#if defined(USE_DBUS) @@ -16,7 +16,7 @@ #include "device/bluetooth/dbus/bluez_dbus_manager.h" #endif -@@ -120,7 +120,7 @@ class BrowserShutdownHandler { +@@ -161,7 +161,7 @@ class BrowserShutdownHandler { } // namespace @@ -25,9 +25,9 @@ constexpr char kProductName[] = "HeadlessChrome"; #endif -@@ -128,9 +128,9 @@ void HeadlessBrowserMainParts::PostCreateMainMessageLo - BrowserShutdownHandler::Install( - base::BindOnce(&HeadlessBrowserImpl::Shutdown, browser_->GetWeakPtr())); +@@ -169,9 +169,9 @@ void HeadlessBrowserMainParts::PostCreateMainMessageLo + BrowserShutdownHandler::Install(base::BindOnce( + &HeadlessBrowserImpl::ShutdownWithExitCode, browser_->GetWeakPtr())); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__web__contents__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__web__contents__impl.cc index 00c2637191db..d3dd85b56342 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__web__contents__impl.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__web__contents__impl.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/headless/lib/browser/headless_web_contents_impl.cc.orig 2023-02-08 09:03:45 UTC +--- src/3rdparty/chromium/headless/lib/browser/headless_web_contents_impl.cc.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/headless/lib/browser/headless_web_contents_impl.cc -@@ -61,7 +61,7 @@ namespace headless { +@@ -60,7 +60,7 @@ namespace headless { namespace { void UpdatePrefsFromSystemSettings(blink::RendererPreferences* prefs) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_headless_lib_headless__content__main__delegate.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_headless_lib_headless__content__main__delegate.cc index 8205206723ff..85f9b3d5814d 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_headless_lib_headless__content__main__delegate.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_headless_lib_headless__content__main__delegate.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/headless/lib/headless_content_main_delegate.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/headless/lib/headless_content_main_delegate.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/headless/lib/headless_content_main_delegate.cc -@@ -327,7 +327,7 @@ void HeadlessContentMainDelegate::InitCrashReporter( +@@ -344,7 +344,7 @@ void HeadlessContentMainDelegate::InitCrashReporter( if (process_type != ::switches::kZygoteProcess) { g_headless_crash_client.Pointer()->set_crash_dumps_dir( command_line.GetSwitchValuePath(switches::kCrashDumpsDir)); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__message__utils.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__message__utils.cc index 36e6fd9f3df8..0b4fb6c20bac 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__message__utils.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__message__utils.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ipc/ipc_message_utils.cc.orig 2022-05-19 14:06:27 UTC +--- src/3rdparty/chromium/ipc/ipc_message_utils.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/ipc/ipc_message_utils.cc -@@ -359,7 +359,7 @@ void ParamTraits<unsigned int>::Log(const param_type& +@@ -393,7 +393,7 @@ void ParamTraits<unsigned int>::Log(const param_type& } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_BUILD.gn index b74a242be8ae..196ee0c0a3c4 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_BUILD.gn @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/media/BUILD.gn.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/media/BUILD.gn.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/media/BUILD.gn @@ -96,6 +96,9 @@ config("media_config") { defines += [ "DLOPEN_PULSEAUDIO" ] diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_audio_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_audio_BUILD.gn index 0aa9a075cc2d..db6fd122165c 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_audio_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_audio_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/media/audio/BUILD.gn.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/media/audio/BUILD.gn.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/media/audio/BUILD.gn -@@ -264,9 +264,20 @@ source_set("audio") { +@@ -278,9 +278,20 @@ jumbo_source_set("audio") { ] } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__input__device.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__input__device.cc index 7763c850bf22..5ca79c181554 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__input__device.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__input__device.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/media/audio/audio_input_device.cc.orig 2022-08-31 12:19:35 UTC +--- src/3rdparty/chromium/media/audio/audio_input_device.cc.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/media/audio/audio_input_device.cc -@@ -259,7 +259,7 @@ void AudioInputDevice::OnStreamCreated( +@@ -262,7 +262,7 @@ void AudioInputDevice::OnStreamCreated( // here. See comments in AliveChecker and PowerObserverHelper for details and // todos. if (detect_dead_stream_ == DeadStreamDetection::kEnabled) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_audio_sndio_sndio__input.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_audio_sndio_sndio__input.cc index bb502dad81a3..aebbac4f7a18 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_audio_sndio_sndio__input.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_audio_sndio_sndio__input.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/media/audio/sndio/sndio_input.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/media/audio/sndio/sndio_input.cc.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/media/audio/sndio/sndio_input.cc @@ -0,0 +1,200 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. @@ -196,7 +196,7 @@ + + + // invoke callback -+ callback->OnData(audio_bus.get(), base::TimeTicks::Now() - delay, 1.); ++ callback->OnData(audio_bus.get(), base::TimeTicks::Now() - delay, 1., {}); + } +} + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_base_cdm__promise__adapter.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_base_cdm__promise__adapter.cc new file mode 100644 index 000000000000..8661d571c150 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_base_cdm__promise__adapter.cc @@ -0,0 +1,16 @@ +--- src/3rdparty/chromium/media/base/cdm_promise_adapter.cc.orig 2023-08-17 07:33:31 UTC ++++ src/3rdparty/chromium/media/base/cdm_promise_adapter.cc +@@ -94,7 +94,13 @@ void CdmPromiseAdapter::RejectPromise(uint32_t promise + void CdmPromiseAdapter::Clear(ClearReason reason) { + // Reject all outstanding promises. + DCHECK(thread_checker_.CalledOnValidThread()); ++#if defined(__clang__) && (__clang_major__ >= 16) + for (auto& [promise_id, promise] : promises_) { ++#else ++ for (auto& [p_i, p_e] : promises_) { ++ auto& promise_id = p_i; ++ auto& promise = p_e; ++#endif + TRACE_EVENT_NESTABLE_ASYNC_END1( + "media", "CdmPromise", TRACE_ID_WITH_SCOPE("CdmPromise", promise_id), + "status", "cleared"); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_base_media__switches.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_base_media__switches.cc index 82fd131702ba..5cfee7ed784c 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_base_media__switches.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_base_media__switches.cc @@ -1,15 +1,15 @@ ---- src/3rdparty/chromium/media/base/media_switches.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/media/base/media_switches.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/media/base/media_switches.cc -@@ -12,7 +12,7 @@ - #include "components/system_media_controls/linux/buildflags/buildflags.h" - #include "media/media_buildflags.h" +@@ -17,7 +17,7 @@ + #include "ui/gl/gl_features.h" + #include "ui/gl/gl_utils.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/cpu.h" #endif -@@ -586,7 +586,7 @@ CONSTINIT const base::Feature kGlobalMediaControls( +@@ -673,7 +673,7 @@ CONSTINIT const base::Feature kGlobalMediaControls( // Show toolbar button that opens dialog for controlling media sessions. CONSTINIT const base::Feature kGlobalMediaControls( "GlobalMediaControls", @@ -18,7 +18,16 @@ base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -634,7 +634,7 @@ CONSTINIT const base::Feature kGlobalMediaControlsPict +@@ -696,7 +696,7 @@ CONSTINIT const base::Feature kMediaRemotingWithoutFul + // If enabled, users can request Media Remoting without fullscreen-in-tab. + CONSTINIT const base::Feature kMediaRemotingWithoutFullscreen( + "MediaRemotingWithoutFullscreen", +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + base::FEATURE_ENABLED_BY_DEFAULT + #else + base::FEATURE_DISABLED_BY_DEFAULT +@@ -708,7 +708,7 @@ CONSTINIT const base::Feature kGlobalMediaControlsPict CONSTINIT const base::Feature kGlobalMediaControlsPictureInPicture( "GlobalMediaControlsPictureInPicture", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ @@ -27,7 +36,7 @@ base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -678,7 +678,7 @@ BASE_FEATURE(kUnifiedAutoplay, +@@ -752,7 +752,7 @@ BASE_FEATURE(kUnifiedAutoplay, "UnifiedAutoplay", base::FEATURE_ENABLED_BY_DEFAULT); @@ -36,17 +45,18 @@ // Enable vaapi video decoding on linux. This is already enabled by default on // chromeos, but needs an experiment on linux. BASE_FEATURE(kVaapiVideoDecodeLinux, -@@ -1198,14 +1198,14 @@ BASE_FEATURE(kAllowClearDolbyVisionInMseWhenPlatformEn - base::FEATURE_DISABLED_BY_DEFAULT); - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // Spawn utility processes to perform hardware decode acceleration instead of - // using the GPU process. - const base::Feature MEDIA_EXPORT kUseOutOfProcessVideoDecoding{ - "UseOutOfProcessVideoDecoding", base::FEATURE_DISABLED_BY_DEFAULT}; - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +@@ -832,7 +832,7 @@ BASE_FEATURE(kVaapiVp9kSVCHWEncoding, + "VaapiVp9kSVCHWEncoding", + base::FEATURE_ENABLED_BY_DEFAULT); + #endif // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS) +-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Enables the new V4L2StatefulVideoDecoder instead of V4L2VideoDecoder. + BASE_FEATURE(kV4L2FlatStatelessVideoDecoder, + "V4L2FlatStatelessVideoDecoder", +@@ -1348,7 +1348,7 @@ const base::Feature MEDIA_EXPORT kUseOutOfProcessVideo + }; + #endif // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_base_media__switches.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_base_media__switches.h index a9a8002374ce..7bf6a2138bd1 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_base_media__switches.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_base_media__switches.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/media/base/media_switches.h.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/media/base/media_switches.h.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/media/base/media_switches.h -@@ -277,7 +277,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseDecoderStreamFor +@@ -305,7 +305,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseElementInsteadOf MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseFakeDeviceForMediaStream); MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseMediaHistoryStore); MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseR16Texture); @@ -9,14 +9,18 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoDecodeLinux); MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoDecodeLinuxGL); MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoEncodeLinux); -@@ -396,11 +396,11 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE( - kAllowClearDolbyVisionInMseWhenPlatformEncryptedDvEnabled); - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +@@ -323,7 +323,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiH264TemporalLa + MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp8TemporalLayerHWEncoding); + MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp9kSVCHWEncoding); + #endif // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS) +-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatStatelessVideoDecoder); + MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatStatefulVideoDecoder); + #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +@@ -443,7 +443,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kExposeOutOfProcessV MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVideoDecoding); - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + #endif // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_base_video__frame.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_base_video__frame.cc index f5821433164b..347d8ca3beab 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_base_video__frame.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_base_video__frame.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/media/base/video_frame.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/media/base/video_frame.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/media/base/video_frame.cc @@ -80,7 +80,7 @@ std::string VideoFrame::StorageTypeToString( return "OWNED_MEMORY"; @@ -18,7 +18,7 @@ // This is not strictly needed but makes explicit that, at VideoFrame // level, DmaBufs are not mappable from userspace. storage_type != VideoFrame::STORAGE_DMABUFS && -@@ -307,7 +307,7 @@ static absl::optional<VideoFrameLayout> GetDefaultLayo +@@ -306,7 +306,7 @@ static absl::optional<VideoFrameLayout> GetDefaultLayo return VideoFrameLayout::CreateWithPlanes(format, coded_size, planes); } @@ -27,7 +27,7 @@ // This class allows us to embed a vector<ScopedFD> into a scoped_refptr, and // thus to have several VideoFrames share the same set of DMABUF FDs. class VideoFrame::DmabufHolder -@@ -636,7 +636,7 @@ scoped_refptr<VideoFrame> VideoFrame::WrapExternalGpuM +@@ -635,7 +635,7 @@ scoped_refptr<VideoFrame> VideoFrame::WrapExternalGpuM for (size_t i = 0; i < num_planes; ++i) planes[i].stride = gpu_memory_buffer->stride(i); uint64_t modifier = gfx::NativePixmapHandle::kNoModifier; @@ -36,7 +36,7 @@ if (gpu_memory_buffer->GetType() == gfx::NATIVE_PIXMAP) { const auto gmb_handle = gpu_memory_buffer->CloneHandle(); if (gmb_handle.is_null() || -@@ -682,7 +682,7 @@ scoped_refptr<VideoFrame> VideoFrame::WrapExternalGpuM +@@ -681,7 +681,7 @@ scoped_refptr<VideoFrame> VideoFrame::WrapExternalGpuM return frame; } @@ -54,7 +54,7 @@ DCHECK(frame->dmabuf_fds_); // If there are any |dmabuf_fds_| plugged in, we should refer them too. wrapping_frame->dmabuf_fds_ = frame->dmabuf_fds_; -@@ -1302,7 +1302,7 @@ const gpu::MailboxHolder& VideoFrame::mailbox_holder( +@@ -1310,7 +1310,7 @@ const gpu::MailboxHolder& VideoFrame::mailbox_holder( : mailbox_holders_[texture_index]; } @@ -63,7 +63,7 @@ const std::vector<base::ScopedFD>& VideoFrame::DmabufFds() const { DCHECK_EQ(storage_type_, STORAGE_DMABUFS); -@@ -1415,7 +1415,7 @@ VideoFrame::VideoFrame(const VideoFrameLayout& layout, +@@ -1423,7 +1423,7 @@ VideoFrame::VideoFrame(const VideoFrameLayout& layout, storage_type_(storage_type), visible_rect_(Intersection(visible_rect, gfx::Rect(layout.coded_size()))), natural_size_(natural_size), diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_base_video__frame.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_base_video__frame.h index d764548e57fc..537115395142 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_base_video__frame.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_base_video__frame.h @@ -1,15 +1,15 @@ ---- src/3rdparty/chromium/media/base/video_frame.h.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/media/base/video_frame.h.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/media/base/video_frame.h @@ -44,7 +44,7 @@ - #include "base/mac/scoped_cftyperef.h" - #endif // BUILDFLAG(IS_MAC) + #include "base/apple/scoped_cftyperef.h" + #endif // BUILDFLAG(IS_APPLE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/files/scoped_file.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -113,7 +113,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -110,7 +110,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte STORAGE_UNOWNED_MEMORY = 2, // External, non owned data pointers. STORAGE_OWNED_MEMORY = 3, // VideoFrame has allocated its own data buffer. STORAGE_SHMEM = 4, // Backed by read-only shared memory. @@ -18,7 +18,7 @@ // TODO(mcasas): Consider turning this type into STORAGE_NATIVE // based on the idea of using this same enum value for both DMA // buffers on Linux and CVPixelBuffers on Mac (which currently use -@@ -308,7 +308,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -313,7 +313,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte ReleaseMailboxAndGpuMemoryBufferCB mailbox_holder_and_gmb_release_cb, base::TimeDelta timestamp); @@ -27,7 +27,7 @@ // Wraps provided dmabufs // (https://www.kernel.org/doc/html/latest/driver-api/dma-buf.html) with a // VideoFrame. The frame will take ownership of |dmabuf_fds|, and will -@@ -596,7 +596,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -593,7 +593,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte // mailbox, the caller must wait for the included sync point. const gpu::MailboxHolder& mailbox_holder(size_t texture_index) const; @@ -36,7 +36,7 @@ // Returns a vector containing the backing DmaBufs for this frame. The number // of returned DmaBufs will be equal or less than the number of planes of // the frame. If there are less, this means that the last FD contains the -@@ -809,7 +809,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -811,7 +811,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte // GPU memory buffer, if this frame is STORAGE_GPU_MEMORY_BUFFER. std::unique_ptr<gfx::GpuMemoryBuffer> gpu_memory_buffer_; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_fake__video__capture__device__factory.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_fake__video__capture__device__factory.cc index 3a78d3db1cd3..286f02368daf 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_fake__video__capture__device__factory.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_fake__video__capture__device__factory.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/media/capture/video/fake_video_capture_device_factory.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/media/capture/video/fake_video_capture_device_factory.cc.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/media/capture/video/fake_video_capture_device_factory.cc -@@ -213,7 +213,7 @@ void FakeVideoCaptureDeviceFactory::GetDevicesInfo( +@@ -229,7 +229,7 @@ void FakeVideoCaptureDeviceFactory::GetDevicesInfo( int entry_index = 0; for (const auto& entry : devices_config_) { VideoCaptureApi api = diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_fake__v4l2__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_fake__v4l2__impl.cc index caba3e655650..d5c23f1e1c31 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_fake__v4l2__impl.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_fake__v4l2__impl.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/media/capture/video/linux/fake_v4l2_impl.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/media/capture/video/linux/fake_v4l2_impl.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/media/capture/video/linux/fake_v4l2_impl.cc -@@ -486,7 +486,7 @@ int FakeV4L2Impl::close(int fd) { +@@ -560,7 +560,7 @@ int FakeV4L2Impl::close(int fd) { return kSuccessReturnValue; } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_fake__v4l2__impl.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_fake__v4l2__impl.h index 62da82dbf905..08dd4ff954b9 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_fake__v4l2__impl.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_fake__v4l2__impl.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/media/capture/video/linux/fake_v4l2_impl.h.orig 2022-03-01 11:59:41 UTC +--- src/3rdparty/chromium/media/capture/video/linux/fake_v4l2_impl.h.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/media/capture/video/linux/fake_v4l2_impl.h @@ -8,7 +8,13 @@ #include <map> @@ -14,7 +14,7 @@ #include "base/synchronization/lock.h" #include "media/capture/capture_export.h" -@@ -36,7 +42,7 @@ class CAPTURE_EXPORT FakeV4L2Impl : public V4L2Capture +@@ -38,7 +44,7 @@ class CAPTURE_EXPORT FakeV4L2Impl : public V4L2Capture // Implementation of V4L2CaptureDevice interface: int open(const char* device_name, int flags) override; int close(int fd) override; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.cc index a67fe37b61e0..2bbd51b2e2c5 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.cc @@ -1,30 +1,80 @@ ---- src/3rdparty/chromium/media/capture/video/linux/v4l2_capture_delegate.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/media/capture/video/linux/v4l2_capture_delegate.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/media/capture/video/linux/v4l2_capture_delegate.cc @@ -4,8 +4,10 @@ #include "media/capture/video/linux/v4l2_capture_delegate.h" -+#if !defined(OS_BSD) ++#if !BUILDFLAG(IS_BSD) #include <linux/version.h> #include <linux/videodev2.h> +#endif #include <poll.h> #include <sys/fcntl.h> #include <sys/ioctl.h> -@@ -29,10 +31,10 @@ +@@ -26,17 +28,19 @@ + #include "media/capture/video/blob_utils.h" + #include "media/capture/video/linux/video_capture_device_linux.h" + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "media/capture/capture_switches.h" + #include "media/capture/video/linux/v4l2_capture_delegate_gpu_helper.h" + #endif // BUILDFLAG(IS_LINUX) using media::mojom::MeteringMode; --#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) -+// #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) ++#if !BUILDFLAG(IS_BSD) + #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) // 16 bit depth, Realsense F200. #define V4L2_PIX_FMT_Z16 v4l2_fourcc('Z', '1', '6', ' ') --#endif -+// #endif + #endif ++#endif // TODO(aleksandar.stojiljkovic): Wrap this with kernel version check once the // format is introduced to kernel. -@@ -728,7 +730,7 @@ base::WeakPtr<V4L2CaptureDelegate> V4L2CaptureDelegate +@@ -46,6 +50,14 @@ using media::mojom::MeteringMode; + #define V4L2_PIX_FMT_INVZ v4l2_fourcc('I', 'N', 'V', 'Z') + #endif + ++#ifndef V4L2_COLORSPACE_OPRGB ++#define V4L2_COLORSPACE_OPRGB V4L2_COLORSPACE_ADOBERGB ++#endif ++ ++#ifndef V4L2_XFER_FUNC_OPRGB ++#define V4L2_XFER_FUNC_OPRGB V4L2_XFER_FUNC_ADOBERGB ++#endif ++ + namespace media { + + namespace { +@@ -260,7 +272,7 @@ bool V4L2CaptureDelegate::IsBlockedControl(int control + // static + bool V4L2CaptureDelegate::IsControllableControl( + int control_id, +- const base::RepeatingCallback<int(int, void*)>& do_ioctl) { ++ const base::RepeatingCallback<int(unsigned int, void*)>& do_ioctl) { + const int special_control_id = GetControllingSpecialControl(control_id); + if (!special_control_id) { + // The control is not controlled by a special control thus the control is +@@ -316,7 +328,7 @@ V4L2CaptureDelegate::V4L2CaptureDelegate( + is_capturing_(false), + timeout_count_(0), + rotation_(rotation) { +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + use_gpu_buffer_ = switches::IsVideoCaptureUseGpuMemoryBufferEnabled(); + #endif // BUILDFLAG(IS_LINUX) + } +@@ -443,7 +455,7 @@ void V4L2CaptureDelegate::AllocateAndStart( + + client_->OnStarted(); + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (use_gpu_buffer_) { + v4l2_gpu_helper_ = std::make_unique<V4L2CaptureDelegateGpuHelper>( + std::move(gmb_support_test_)); +@@ -793,7 +805,7 @@ void V4L2CaptureDelegate::SetGPUEnvironmentForTesting( V4L2CaptureDelegate::~V4L2CaptureDelegate() = default; @@ -33,7 +83,7 @@ int num_retries = 0; for (; DoIoctl(request, argp) < 0 && num_retries < kMaxIOCtrlRetries; ++num_retries) { -@@ -738,7 +740,7 @@ bool V4L2CaptureDelegate::RunIoctl(int request, void* +@@ -803,7 +815,7 @@ bool V4L2CaptureDelegate::RunIoctl(int request, void* return num_retries != kMaxIOCtrlRetries; } @@ -42,18 +92,15 @@ return HANDLE_EINTR(v4l2_->ioctl(device_fd_.get(), request, argp)); } -@@ -778,6 +780,10 @@ bool V4L2CaptureDelegate::IsControllableControl(int co +@@ -814,6 +826,7 @@ bool V4L2CaptureDelegate::IsControllableControl(int co } void V4L2CaptureDelegate::ReplaceControlEventSubscriptions() { -+// these ioctls are not implemented on *BSDs -+#if BUILDFLAG(IS_BSD) -+ NOTIMPLEMENTED(); -+#else ++#if !BUILDFLAG(IS_BSD) constexpr uint32_t kControlIds[] = {V4L2_CID_AUTO_EXPOSURE_BIAS, V4L2_CID_AUTO_WHITE_BALANCE, V4L2_CID_BRIGHTNESS, -@@ -805,6 +811,7 @@ void V4L2CaptureDelegate::ReplaceControlEventSubscript +@@ -841,6 +854,7 @@ void V4L2CaptureDelegate::ReplaceControlEventSubscript << ", {type = V4L2_EVENT_CTRL, id = " << control_id << "}"; } } @@ -61,3 +108,49 @@ } mojom::RangePtr V4L2CaptureDelegate::RetrieveUserControlRange(int control_id) { +@@ -1021,7 +1035,11 @@ void V4L2CaptureDelegate::DoCapture() { + + pollfd device_pfd = {}; + device_pfd.fd = device_fd_.get(); ++#if !BUILDFLAG(IS_BSD) + device_pfd.events = POLLIN | POLLPRI; ++#else ++ device_pfd.events = POLLIN; ++#endif + + const int result = + HANDLE_EINTR(v4l2_->poll(&device_pfd, 1, kCaptureTimeoutMs)); +@@ -1059,6 +1077,7 @@ void V4L2CaptureDelegate::DoCapture() { + timeout_count_ = 0; + } + ++#if !BUILDFLAG(IS_BSD) + // Dequeue events if the driver has filled in some. + if (device_pfd.revents & POLLPRI) { + bool controls_changed = false; +@@ -1093,6 +1112,7 @@ void V4L2CaptureDelegate::DoCapture() { + client_->OnCaptureConfigurationChanged(); + } + } ++#endif + + // Deenqueue, send and reenqueue a buffer if the driver has filled one in. + if (device_pfd.revents & POLLIN) { +@@ -1146,7 +1166,7 @@ void V4L2CaptureDelegate::DoCapture() { + // workable on Linux. + + // See http://crbug.com/959919. +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (use_gpu_buffer_) { + v4l2_gpu_helper_->OnIncomingCapturedData( + client_.get(), buffer_tracker->start(), +@@ -1219,7 +1239,7 @@ void V4L2CaptureDelegate::SetErrorState(VideoCaptureEr + client_->OnError(error, from_here, reason); + } + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + gfx::ColorSpace V4L2CaptureDelegate::BuildColorSpaceFromv4l2() { + v4l2_colorspace v4l2_primary = (v4l2_colorspace)video_fmt_.fmt.pix.colorspace; + v4l2_quantization v4l2_range = diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.h index 725ca9301f3b..543d9fb3ec80 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.h @@ -1,6 +1,24 @@ ---- src/3rdparty/chromium/media/capture/video/linux/v4l2_capture_delegate.h.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/media/capture/video/linux/v4l2_capture_delegate.h.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/media/capture/video/linux/v4l2_capture_delegate.h -@@ -87,10 +87,10 @@ class CAPTURE_EXPORT V4L2CaptureDelegate final { +@@ -35,7 +35,7 @@ class Location; + + namespace media { + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + class V4L2CaptureDelegateGpuHelper; + #endif // BUILDFLAG(IS_LINUX) + +@@ -86,7 +86,7 @@ class CAPTURE_EXPORT V4L2CaptureDelegate final { + static bool IsBlockedControl(int control_id); + static bool IsControllableControl( + int control_id, +- const base::RepeatingCallback<int(int, void*)>& do_ioctl); ++ const base::RepeatingCallback<int(unsigned int, void*)>& do_ioctl); + + void SetGPUEnvironmentForTesting( + std::unique_ptr<gpu::GpuMemoryBufferSupport> gmb_support); +@@ -100,10 +100,10 @@ class CAPTURE_EXPORT V4L2CaptureDelegate final { // device file descriptor or (re)starting streaming, can fail but works after // retrying (https://crbug.com/670262). Returns false if the |request| ioctl // fails too many times. @@ -13,3 +31,21 @@ // Check whether the control is controllable (and not changed automatically). bool IsControllableControl(int control_id); +@@ -133,7 +133,7 @@ class CAPTURE_EXPORT V4L2CaptureDelegate final { + const base::Location& from_here, + const std::string& reason); + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Systems which describe a "color space" usually map that to one or more of + // {primary, matrix, transfer, range}. BuildColorSpaceFromv4l2() will use the + // matched value as first priority. Otherwise, if there is no best matching +@@ -167,7 +167,7 @@ class CAPTURE_EXPORT V4L2CaptureDelegate final { + // Clockwise rotation in degrees. This value should be 0, 90, 180, or 270. + int rotation_; + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Support GPU memory buffer. + bool use_gpu_buffer_; + std::unique_ptr<V4L2CaptureDelegateGpuHelper> v4l2_gpu_helper_; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__factory__v4l2.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__factory__v4l2.cc index cd743a293f11..1bd27f575454 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__factory__v4l2.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__factory__v4l2.cc @@ -1,10 +1,10 @@ ---- src/3rdparty/chromium/media/capture/video/linux/video_capture_device_factory_v4l2.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/media/capture/video/linux/video_capture_device_factory_v4l2.cc.orig 2023-05-02 13:49:23 UTC +++ src/3rdparty/chromium/media/capture/video/linux/video_capture_device_factory_v4l2.cc @@ -75,6 +75,9 @@ class DevVideoFilePathsDeviceProvider : public VideoCaptureDeviceFactoryV4L2::DeviceProvider { public: void GetDeviceIds(std::vector<std::string>* target_container) override { -+#if defined(OS_OPENBSD) ++#if BUILDFLAG(IS_OPENBSD) + target_container->emplace_back("/dev/video"); +#else const base::FilePath path("/dev/"); @@ -18,7 +18,7 @@ } std::string GetDeviceModelId(const std::string& device_id) override { -+#if defined(OS_OPENBSD) ++#if BUILDFLAG(IS_OPENBSD) + return std::string(); +#endif const std::string file_name = ExtractFileNameFromDeviceId(device_id); @@ -28,7 +28,7 @@ } std::string GetDeviceDisplayName(const std::string& device_id) override { -+#if defined(OS_OPENBSD) ++#if BUILDFLAG(IS_OPENBSD) + return std::string(); +#endif const std::string file_name = ExtractFileNameFromDeviceId(device_id); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_video__capture__buffer__tracker__factory__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_video__capture__buffer__tracker__factory__impl.cc new file mode 100644 index 000000000000..bfa563fa7b66 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_video__capture__buffer__tracker__factory__impl.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/media/capture/video/video_capture_buffer_tracker_factory_impl.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/media/capture/video/video_capture_buffer_tracker_factory_impl.cc +@@ -14,7 +14,7 @@ + #include "media/capture/video/chromeos/gpu_memory_buffer_tracker_cros.h" + #elif BUILDFLAG(IS_APPLE) + #include "media/capture/video/apple/gpu_memory_buffer_tracker_apple.h" +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "media/capture/video/linux/v4l2_gpu_memory_buffer_tracker.h" + #elif BUILDFLAG(IS_WIN) + #include "media/capture/video/shared_memory_buffer_tracker.h" +@@ -43,7 +43,7 @@ VideoCaptureBufferTrackerFactoryImpl::CreateTracker( + return std::make_unique<GpuMemoryBufferTrackerCros>(); + #elif BUILDFLAG(IS_APPLE) + return std::make_unique<GpuMemoryBufferTrackerApple>(); +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return std::make_unique<V4L2GpuMemoryBufferTracker>(); + #elif BUILDFLAG(IS_WIN) + if (!dxgi_device_manager_) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_video__capture__device__client.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_video__capture__device__client.cc index 69f741431c9f..842b9dda9100 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_video__capture__device__client.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_capture_video_video__capture__device__client.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/media/capture/video/video_capture_device_client.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/media/capture/video/video_capture_device_client.cc.orig 2023-07-16 15:47:57 UTC +++ src/3rdparty/chromium/media/capture/video/video_capture_device_client.cc -@@ -322,7 +322,7 @@ void VideoCaptureDeviceClient::OnIncomingCapturedData( - // see http://linuxtv.org/downloads/v4l-dvb-apis/packed-rgb.html. - // Windows RGB24 defines blue at lowest byte, - // see https://msdn.microsoft.com/en-us/library/windows/desktop/dd407253 --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - fourcc_format = libyuv::FOURCC_RAW; - #elif BUILDFLAG(IS_WIN) - fourcc_format = libyuv::FOURCC_24BG; +@@ -149,7 +149,7 @@ FourccAndFlip GetFourccAndFlipFromPixelFormat( + CHECK(!is_width_odd && !is_height_odd); + return {libyuv::FOURCC_UYVY}; + case media::PIXEL_FORMAT_RGB24: +- if constexpr (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) { ++ if constexpr (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) { + // Linux RGB24 defines red at lowest byte address, + // see http://linuxtv.org/downloads/v4l-dvb-apis/packed-rgb.html. + return {libyuv::FOURCC_RAW}; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_cdm_library__cdm_cdm__paths.gni b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_cdm_library__cdm_cdm__paths.gni new file mode 100644 index 000000000000..02b8f3d6b112 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_cdm_library__cdm_cdm__paths.gni @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/media/cdm/library_cdm/cdm_paths.gni.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/media/cdm/library_cdm/cdm_paths.gni +@@ -15,7 +15,7 @@ assert(enable_library_cdms) + # Explicitly define what we use to avoid confusion. + if (is_chromeos) { + component_os = "cros" +-} else if (is_linux) { ++} else if (is_linux || is_bsd) { + component_os = "linux" + } else if (is_win) { + component_os = "win" diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_buffer__validation.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_buffer__validation.cc index 2bc969973e5a..68e7cc0f92f2 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_buffer__validation.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_buffer__validation.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/media/gpu/buffer_validation.cc.orig 2022-05-19 14:06:27 UTC +--- src/3rdparty/chromium/media/gpu/buffer_validation.cc.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/media/gpu/buffer_validation.cc @@ -15,7 +15,7 @@ #include "ui/gfx/geometry/size.h" @@ -18,7 +18,7 @@ if (fd < 0) { VLOG(1) << "Invalid file descriptor"; return false; -@@ -73,7 +73,7 @@ bool VerifyGpuMemoryBufferHandle( +@@ -76,7 +76,7 @@ bool VerifyGpuMemoryBufferHandle( VLOG(1) << "Unsupported: " << pixel_format; return false; } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_chromeos_video__decoder__pipeline.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_chromeos_video__decoder__pipeline.cc index 3eb5fcdfe8ba..2a6874c36898 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_chromeos_video__decoder__pipeline.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_chromeos_video__decoder__pipeline.cc @@ -1,15 +1,6 @@ ---- src/3rdparty/chromium/media/gpu/chromeos/video_decoder_pipeline.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/media/gpu/chromeos/video_decoder_pipeline.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/media/gpu/chromeos/video_decoder_pipeline.cc -@@ -213,7 +213,7 @@ std::unique_ptr<VideoDecoder> VideoDecoderPipeline::Cr - #if BUILDFLAG(USE_VAAPI) - create_decoder_function_cb = base::BindOnce(&VaapiVideoDecoder::Create); - #elif BUILDFLAG(USE_V4L2_CODEC) && \ -- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) -+ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) - create_decoder_function_cb = base::BindOnce(&V4L2VideoDecoder::Create); - #else - return nullptr; -@@ -860,14 +860,14 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -1026,14 +1026,14 @@ VideoDecoderPipeline::PickDecoderOutputFormat( } } @@ -26,7 +17,7 @@ // Linux w/ V4L2 should not use a custom allocator // Only tested with video_decode_accelerator_tests // TODO(wenst@) Test with full Chromium Browser -@@ -997,7 +997,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -1170,7 +1170,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( << " VideoFrames"; auxiliary_frame_pool_->set_parent_task_runner(decoder_task_runner_); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_gpu__video__encode__accelerator__factory.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_gpu__video__encode__accelerator__factory.cc index 84730e3c08b2..bad61d8e7bd2 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_gpu__video__encode__accelerator__factory.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_gpu__video__encode__accelerator__factory.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/media/gpu/gpu_video_encode_accelerator_factory.cc.orig 2023-02-08 09:03:45 UTC +--- src/3rdparty/chromium/media/gpu/gpu_video_encode_accelerator_factory.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/media/gpu/gpu_video_encode_accelerator_factory.cc -@@ -121,7 +121,7 @@ std::vector<VEAFactoryFunction> GetVEAFactoryFunctions +@@ -119,7 +119,7 @@ std::vector<VEAFactoryFunction> GetVEAFactoryFunctions return vea_factory_functions; #if BUILDFLAG(USE_VAAPI) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc index b054db0ad44b..1e2c2a8f7327 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.cc.orig 2023-02-08 09:03:45 UTC +--- src/3rdparty/chromium/media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.cc.orig 2023-07-16 15:47:57 UTC +++ src/3rdparty/chromium/media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.cc @@ -15,7 +15,9 @@ #include "media/gpu/vaapi/vaapi_wrapper.h" @@ -18,15 +18,15 @@ void AllowAccessToRenderNodes(std::vector<BrokerFilePermission>& permissions, bool include_sys_dev_char, bool read_write) { -@@ -160,6 +163,7 @@ bool HardwareVideoDecodingPreSandboxHookForV4L2( - return false; +@@ -165,6 +168,7 @@ bool HardwareVideoDecodingPreSandboxHookForV4L2( + NOTREACHED_NORETURN(); #endif // BUILDFLAG(USE_V4L2_CODEC) } +#endif } // namespace -@@ -175,6 +179,7 @@ bool HardwareVideoDecodingPreSandboxHookForV4L2( +@@ -180,6 +184,7 @@ bool HardwareVideoDecodingPreSandboxHookForV4L2( // (at least). bool HardwareVideoDecodingPreSandboxHook( sandbox::policy::SandboxLinux::Options options) { @@ -34,7 +34,7 @@ using HardwareVideoDecodingProcessPolicy = sandbox::policy::HardwareVideoDecodingProcessPolicy; using PolicyType = -@@ -212,6 +217,7 @@ bool HardwareVideoDecodingPreSandboxHook( +@@ -217,6 +222,7 @@ bool HardwareVideoDecodingPreSandboxHook( sandbox::policy::SandboxLinux::GetInstance()->StartBrokerProcess( command_set, permissions, sandbox::policy::SandboxLinux::PreSandboxHook(), options); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.h index 4063da78a1f8..3ef02d85160d 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.h.orig 2022-05-19 14:06:27 UTC +--- src/3rdparty/chromium/media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.h.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.h @@ -5,7 +5,13 @@ #ifndef MEDIA_GPU_SANDBOX_HARDWARE_VIDEO_DECODING_SANDBOX_HOOK_LINUX_H_ @@ -7,7 +7,7 @@ +#include "build/build_config.h" + +#if BUILDFLAG(IS_BSD) -+#include "sandbox/policy/openbsd/sandbox_openbsd.h" ++#include "sandbox/policy/sandbox.h" +#else #include "sandbox/policy/linux/sandbox_linux.h" +#endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.cc index 973bd9244d1a..881836be0cc9 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.cc.orig 2023-01-11 09:17:16 UTC +--- src/3rdparty/chromium/media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.cc @@ -18,12 +18,15 @@ #include "media/gpu/v4l2/v4l2_device.h" @@ -16,15 +16,11 @@ sandbox::syscall_broker::BrokerCommandSet command_set; std::vector<BrokerFilePermission> permissions; -@@ -125,8 +128,8 @@ bool HardwareVideoEncodingPreSandboxHook( - #endif // defined(__aarch64__) +@@ -121,6 +124,7 @@ bool HardwareVideoEncodingPreSandboxHook( + return false; + } } - #endif -- +#endif + #endif return true; } - --} // namespace media -\ No newline at end of file -+} // namespace media diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.h index 02783baff405..9cc18190d195 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.h.orig 2023-01-11 09:17:16 UTC +--- src/3rdparty/chromium/media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.h.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.h @@ -5,7 +5,13 @@ #ifndef MEDIA_GPU_SANDBOX_HARDWARE_VIDEO_ENCODING_SANDBOX_HOOK_LINUX_H_ @@ -7,7 +7,7 @@ +#include "build/build_config.h" + +#if BUILDFLAG(IS_BSD) -+#include "sandbox/policy/openbsd/sandbox_openbsd.h" ++#include "sandbox/policy/sandbox.h" +#else #include "sandbox/policy/linux/sandbox_linux.h" +#endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_vaapi_vaapi__video__decoder.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_vaapi_vaapi__video__decoder.cc index 3ac879eb290b..541298f16108 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_vaapi_vaapi__video__decoder.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_vaapi_vaapi__video__decoder.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/media/gpu/vaapi/vaapi_video_decoder.cc.orig 2023-10-03 19:49:54 UTC +--- src/3rdparty/chromium/media/gpu/vaapi/vaapi_video_decoder.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/media/gpu/vaapi/vaapi_video_decoder.cc -@@ -772,7 +772,7 @@ void VaapiVideoDecoder::ApplyResolutionChangeWithScree +@@ -782,7 +782,7 @@ void VaapiVideoDecoder::ApplyResolutionChangeWithScree const gfx::Size decoder_natural_size = aspect_ratio_.GetNaturalSize(decoder_visible_rect); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_vaapi_vaapi__wrapper.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_vaapi_vaapi__wrapper.cc new file mode 100644 index 000000000000..78386389a125 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_gpu_vaapi_vaapi__wrapper.cc @@ -0,0 +1,56 @@ +--- src/3rdparty/chromium/media/gpu/vaapi/vaapi_wrapper.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/media/gpu/vaapi/vaapi_wrapper.cc +@@ -70,7 +70,7 @@ + using media_gpu_vaapi::kModuleVa_prot; + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "base/files/file_util.h" + #include "base/strings/string_split.h" + #endif +@@ -1441,7 +1441,7 @@ bool IsVBREncodingSupported(VAProfile va_profile) { + return VASupportedProfiles::Get().IsProfileSupported(mode, va_profile); + } + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Some VA-API drivers (vdpau-va-driver) will crash if used with VA/DRM on + // NVIDIA GPUs. This function checks if such drivers are present. + bool IsBrokenNvidiaVaapiDriverPresent() { +@@ -1502,7 +1502,7 @@ void VADisplayStateSingleton::PreSandboxInitialization + VADisplayStateSingleton& va_display_state = GetInstance(); + base::AutoLock lock(va_display_state.lock_); + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + std::string va_driver_name; + auto env = base::Environment::Create(); + if (env->GetVar("LIBVA_DRIVER_NAME", &va_driver_name) && +@@ -1539,7 +1539,7 @@ void VADisplayStateSingleton::PreSandboxInitialization + if (base::EqualsCaseInsensitiveASCII(version_name, "vgem")) { + continue; + } +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Skip NVIDIA GPUs if the VA-API driver used for them is known for crashing + // with VA/DRM. + if (is_nvidia_va_drm_broken && +@@ -1572,7 +1572,7 @@ VADisplayStateHandle VADisplayStateSingleton::GetHandl + return {}; + } + +-#if BUILDFLAG(IS_OZONE) && BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_OZONE) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) + // TODO(crbug.com/1116701): add vaapi support for other Ozone platforms on + // Linux. See comment in OzonePlatform::PlatformProperties::supports_vaapi + // for more details. This will also require revisiting everything that's +@@ -2403,7 +2403,7 @@ scoped_refptr<VASurface> VaapiWrapper::CreateVASurface + return nullptr; + } + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // TODO(crbug.com/1326754): enable use DRIME_PRIME_2 API on Linux with the + // iHD driver. + const bool use_drm_prime_2 = false; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_media__options.gni b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_media__options.gni index 13d6f8e6fee3..737749461c1f 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_media__options.gni +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_media__options.gni @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/media/media_options.gni.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/media/media_options.gni.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/media/media_options.gni -@@ -196,12 +196,15 @@ declare_args() { +@@ -189,12 +189,15 @@ declare_args() { # Enables runtime selection of ALSA library for audio. use_alsa = false @@ -17,7 +17,7 @@ (!is_castos || (target_cpu == "x86" || target_cpu == "x64") || is_cast_audio_only)) { use_alsa = true -@@ -217,6 +220,10 @@ declare_args() { +@@ -210,6 +213,10 @@ declare_args() { if (!use_cras && !is_castos && !is_asan && !is_tsan) { use_pulseaudio = true } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.cc index 929095529690..32f0c1350902 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.cc @@ -1,15 +1,6 @@ ---- src/3rdparty/chromium/media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.cc -@@ -39,7 +39,7 @@ gfx::GpuMemoryBufferHandle GetVideoFrameGpuMemoryBuffe - gfx::GpuMemoryBufferHandle gpu_memory_buffer_handle = - input->GetGpuMemoryBuffer()->CloneHandle(); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - CHECK_EQ(gpu_memory_buffer_handle.type, gfx::NATIVE_PIXMAP); - CHECK(!gpu_memory_buffer_handle.native_pixmap_handle.planes.empty()); - #else -@@ -751,7 +751,7 @@ const gfx::GpuMemoryBufferId& StructTraits< +@@ -837,7 +837,7 @@ const gfx::GpuMemoryBufferId& StructTraits< return input.id; } @@ -18,7 +9,7 @@ // static gfx::NativePixmapHandle StructTraits< media::stable::mojom::NativeGpuMemoryBufferHandleDataView, -@@ -772,7 +772,7 @@ bool StructTraits<media::stable::mojom::NativeGpuMemor +@@ -858,7 +858,7 @@ bool StructTraits<media::stable::mojom::NativeGpuMemor output->type = gfx::NATIVE_PIXMAP; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.h index 58c76e3dad1f..badd3fb67fa7 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.h.orig 2022-09-24 10:57:32 UTC +--- src/3rdparty/chromium/media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.h.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.h -@@ -695,7 +695,7 @@ struct StructTraits<media::stable::mojom::NativeGpuMem +@@ -693,7 +693,7 @@ struct StructTraits<media::stable::mojom::NativeGpuMem static const gfx::GpuMemoryBufferId& id( const gfx::GpuMemoryBufferHandle& input); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_video_gpu__memory__buffer__video__frame__pool.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_video_gpu__memory__buffer__video__frame__pool.cc index 4ceffe452896..7330db5c2cd0 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_video_gpu__memory__buffer__video__frame__pool.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_video_gpu__memory__buffer__video__frame__pool.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/media/video/gpu_memory_buffer_video_frame_pool.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/media/video/gpu_memory_buffer_video_frame_pool.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/media/video/gpu_memory_buffer_video_frame_pool.cc @@ -727,7 +727,7 @@ void GpuMemoryBufferVideoFramePool::PoolImpl::CreateHa } @@ -9,8 +9,8 @@ is_software_backed_video_frame &= !video_frame->HasDmaBufs(); #endif -@@ -1158,7 +1158,7 @@ scoped_refptr<VideoFrame> GpuMemoryBufferVideoFramePoo - is_webgpu_compatible = (gpu_memory_buffer != nullptr); +@@ -1199,7 +1199,7 @@ scoped_refptr<VideoFrame> GpuMemoryBufferVideoFramePoo + } #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) @@ -18,7 +18,7 @@ is_webgpu_compatible = (gpu_memory_buffer != nullptr); if (is_webgpu_compatible) { is_webgpu_compatible &= -@@ -1177,7 +1177,7 @@ scoped_refptr<VideoFrame> GpuMemoryBufferVideoFramePoo +@@ -1218,7 +1218,7 @@ scoped_refptr<VideoFrame> GpuMemoryBufferVideoFramePoo gpu::SHARED_IMAGE_USAGE_DISPLAY_READ | gpu::SHARED_IMAGE_USAGE_SCANOUT; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_video_video__encode__accelerator__adapter.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_video_video__encode__accelerator__adapter.cc index 3975d337f8cb..035aa5896513 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_video_video__encode__accelerator__adapter.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_video_video__encode__accelerator__adapter.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/media/video/video_encode_accelerator_adapter.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/media/video/video_encode_accelerator_adapter.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/media/video/video_encode_accelerator_adapter.cc @@ -140,7 +140,7 @@ VideoEncodeAccelerator::Config SetUpVeaConfig( if (is_rgb) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_video_video__encode__accelerator__adapter__test.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_video_video__encode__accelerator__adapter__test.cc index 6ac94ed8b548..566d26253613 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_video_video__encode__accelerator__adapter__test.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_media_video_video__encode__accelerator__adapter__test.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/media/video/video_encode_accelerator_adapter_test.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/media/video/video_encode_accelerator_adapter_test.cc.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/media/video/video_encode_accelerator_adapter_test.cc -@@ -449,7 +449,7 @@ TEST_P(VideoEncodeAcceleratorAdapterTest, TwoFramesRes +@@ -459,7 +459,7 @@ TEST_P(VideoEncodeAcceleratorAdapterTest, TwoFramesRes CreateGreenFrame(large_size, pixel_format, base::Milliseconds(2)); VideoPixelFormat expected_input_format = PIXEL_FORMAT_I420; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_mojo_core_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_mojo_core_BUILD.gn index 3c99434c12d2..a96a138f0536 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_mojo_core_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_mojo_core_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/mojo/core/BUILD.gn.orig 2023-02-08 09:03:45 UTC +--- src/3rdparty/chromium/mojo/core/BUILD.gn.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/mojo/core/BUILD.gn -@@ -164,7 +164,7 @@ template("core_impl_source_set") { +@@ -166,7 +166,7 @@ template("core_impl_source_set") { ] } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_mojo_core_embedder_features.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_mojo_core_embedder_features.h index 9ed0dc06fcdd..e36f5ba80304 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_mojo_core_embedder_features.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_mojo_core_embedder_features.h @@ -1,9 +1,9 @@ ---- src/3rdparty/chromium/mojo/core/embedder/features.h.orig 2022-11-30 08:12:58 UTC +--- src/3rdparty/chromium/mojo/core/embedder/features.h.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/mojo/core/embedder/features.h -@@ -14,7 +14,7 @@ namespace mojo { - namespace core { +@@ -16,7 +16,7 @@ namespace core { - #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_MAC) + #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_NACL) && \ + !BUILDFLAG(MOJO_USE_APPLE_CHANNEL) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(MOJO_CORE_EMBEDDER_FEATURES) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_mojo_public_tools_bindings_mojom.gni b/www/qt6-webengine/files/patch-src_3rdparty_chromium_mojo_public_tools_bindings_mojom.gni index ddad9b308a12..da3560fe7f91 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_mojo_public_tools_bindings_mojom.gni +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_mojo_public_tools_bindings_mojom.gni @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/mojo/public/tools/bindings/mojom.gni.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/mojo/public/tools/bindings/mojom.gni.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/mojo/public/tools/bindings/mojom.gni -@@ -722,6 +722,16 @@ template("mojom") { +@@ -743,6 +743,16 @@ template("mojom") { enabled_features += [ "is_apple" ] } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_BUILD.gn index 3b132db0a7d7..b35ef2592495 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/net/BUILD.gn.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/net/BUILD.gn.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/net/BUILD.gn -@@ -108,7 +108,7 @@ net_configs = [ +@@ -126,7 +126,7 @@ net_configs = [ "//build/config/compiler:wexit_time_destructors", ] @@ -9,12 +9,16 @@ net_configs += [ "//build/config/linux:libresolv" ] } -@@ -1228,6 +1228,15 @@ component("net") { +@@ -1255,6 +1255,19 @@ component("net") { deps += [ "//third_party/xdg_shared_mime_info" ] } + if (is_bsd) { + sources -= [ ++ "base/address_map_cache_linux.cc", ++ "base/address_map_cache_linux.h", ++ "base/address_map_linux.cc", ++ "base/address_map_linux.h", + "base/address_tracker_linux.cc", + "base/address_tracker_linux.h", + "base/network_change_notifier_linux.cc", @@ -25,16 +29,7 @@ if (is_mac) { sources += [ "base/network_notification_thread_mac.cc", -@@ -1360,7 +1369,7 @@ component("net") { - } - } - -- if (is_android || is_chromeos) { -+ if (is_android || is_chromeos || is_bsd) { - sources += [ - "base/network_change_notifier_posix.cc", - "base/network_change_notifier_posix.h", -@@ -1393,7 +1402,7 @@ component("net") { +@@ -1410,7 +1423,7 @@ component("net") { } # Use getifaddrs() on POSIX platforms, except Linux. @@ -43,8 +38,8 @@ sources += [ "base/network_interfaces_getifaddrs.cc", "base/network_interfaces_getifaddrs.h", -@@ -2837,7 +2846,7 @@ test("net_unittests") { - sources += [ "proxy_resolution/proxy_config_service_linux_unittest.cc" ] +@@ -2905,7 +2918,7 @@ test("net_unittests") { + ] } - if (is_linux || is_chromeos) { @@ -52,7 +47,7 @@ sources += [ "base/address_tracker_linux_unittest.cc", "base/network_interfaces_linux_unittest.cc", -@@ -2909,6 +2918,10 @@ test("net_unittests") { +@@ -2973,6 +2986,10 @@ test("net_unittests") { "//url:buildflags", ] @@ -63,7 +58,7 @@ if (enable_websockets) { deps += [ "//net/server:tests" ] } -@@ -2976,7 +2989,7 @@ test("net_unittests") { +@@ -3055,7 +3072,7 @@ test("net_unittests") { ] } @@ -72,7 +67,7 @@ sources += [ "tools/quic/quic_simple_server_test.cc" ] } -@@ -3101,7 +3114,7 @@ test("net_unittests") { +@@ -3190,7 +3207,7 @@ test("net_unittests") { } # Use getifaddrs() on POSIX platforms, except Linux. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_base_features.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_base_features.cc new file mode 100644 index 000000000000..f9d3da04f73d --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_base_features.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/net/base/features.cc.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/net/base/features.cc +@@ -181,7 +181,7 @@ BASE_FEATURE(kChromeRootStoreUsed, + #if BUILDFLAG(CHROME_ROOT_STORE_OPTIONAL) + BASE_FEATURE(kChromeRootStoreUsed, + "ChromeRootStoreUsed", +-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) ++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + base::FEATURE_ENABLED_BY_DEFAULT + #else + base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_base_mock__network__change__notifier.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_base_mock__network__change__notifier.cc new file mode 100644 index 000000000000..54f65b481329 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_base_mock__network__change__notifier.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/net/base/mock_network_change_notifier.cc.orig 2023-08-17 07:33:31 UTC ++++ src/3rdparty/chromium/net/base/mock_network_change_notifier.cc +@@ -103,7 +103,7 @@ MockNetworkChangeNotifier::GetCurrentConnectionCost() + return connection_cost_; + } + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + AddressMapOwnerLinux* MockNetworkChangeNotifier::GetAddressMapOwnerInternal() { + return address_map_owner_; + } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_base_mock__network__change__notifier.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_base_mock__network__change__notifier.h new file mode 100644 index 000000000000..fa6daf99c99f --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_base_mock__network__change__notifier.h @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/net/base/mock_network_change_notifier.h.orig 2023-08-17 07:33:31 UTC ++++ src/3rdparty/chromium/net/base/mock_network_change_notifier.h +@@ -84,7 +84,7 @@ class MockNetworkChangeNotifier : public NetworkChange + // use_default_connection_cost_implementation is set to true. + ConnectionCost GetCurrentConnectionCost() override; + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void SetAddressMapOwnerLinux(AddressMapOwnerLinux* address_map_owner) { + address_map_owner_ = address_map_owner; + } +@@ -104,7 +104,7 @@ class MockNetworkChangeNotifier : public NetworkChange + bool use_default_connection_cost_implementation_ = false; + NetworkChangeNotifier::NetworkList connected_networks_; + std::unique_ptr<SystemDnsConfigChangeNotifier> dns_config_notifier_; +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + raw_ptr<AddressMapOwnerLinux> address_map_owner_ = nullptr; + #endif + }; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_base_network__change__notifier.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_base_network__change__notifier.cc index 614239a8ac70..54dd12bf63a8 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_base_network__change__notifier.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_base_network__change__notifier.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/net/base/network_change_notifier.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/net/base/network_change_notifier.cc.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/net/base/network_change_notifier.cc @@ -37,7 +37,7 @@ #include "net/base/network_change_notifier_linux.h" @@ -6,10 +6,10 @@ #include "net/base/network_change_notifier_mac.h" -#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) - #include "net/base/network_change_notifier_posix.h" + #include "net/base/network_change_notifier_passive.h" #elif BUILDFLAG(IS_FUCHSIA) #include "net/base/network_change_notifier_fuchsia.h" -@@ -327,6 +327,9 @@ std::unique_ptr<NetworkChangeNotifier> NetworkChangeNo +@@ -329,6 +329,9 @@ std::unique_ptr<NetworkChangeNotifier> NetworkChangeNo #elif BUILDFLAG(IS_FUCHSIA) return std::make_unique<NetworkChangeNotifierFuchsia>( /*require_wlan=*/false); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_base_network__change__notifier__posix.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_base_network__change__notifier__passive.cc index 19b2300e0bba..4ab4523fae18 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_base_network__change__notifier__posix.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_base_network__change__notifier__passive.cc @@ -1,8 +1,8 @@ ---- src/3rdparty/chromium/net/base/network_change_notifier_posix.cc.orig 2022-08-31 12:19:35 UTC -+++ src/3rdparty/chromium/net/base/network_change_notifier_posix.cc -@@ -92,7 +92,7 @@ void NetworkChangeNotifierPosix::GetCurrentMaxBandwidt +--- src/3rdparty/chromium/net/base/network_change_notifier_passive.cc.orig 2023-05-31 08:12:17 UTC ++++ src/3rdparty/chromium/net/base/network_change_notifier_passive.cc +@@ -107,7 +107,7 @@ NetworkChangeNotifierPassive::GetAddressMapOwnerIntern NetworkChangeNotifier::NetworkChangeCalculatorParams - NetworkChangeNotifierPosix::NetworkChangeCalculatorParamsPosix() { + NetworkChangeNotifierPassive::NetworkChangeCalculatorParamsPassive() { NetworkChangeCalculatorParams params; -#if BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_cert_cert__verifier.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_cert_cert__verifier.cc index 75371fc06d21..49de64966dff 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_cert_cert__verifier.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_cert_cert__verifier.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/net/cert/cert_verifier.cc.orig 2022-11-30 08:12:58 UTC +--- src/3rdparty/chromium/net/cert/cert_verifier.cc.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/net/cert/cert_verifier.cc -@@ -87,7 +87,7 @@ std::unique_ptr<CertVerifier> CertVerifier::CreateDefa - } - #endif - if (!verify_proc) { --#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - verify_proc = - CertVerifyProc::CreateBuiltinVerifyProc(std::move(cert_net_fetcher)); +@@ -40,7 +40,7 @@ class DefaultCertVerifyProcFactory : public net::CertV + return CertVerifyProc::CreateBuiltinWithChromeRootStore( + std::move(cert_net_fetcher), impl_params.crl_set, + base::OptionalToPtr(impl_params.root_store_data)); +-#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + return CertVerifyProc::CreateBuiltinVerifyProc(std::move(cert_net_fetcher), + impl_params.crl_set); #else diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_cert_cert__verify__proc.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_cert_cert__verify__proc.cc index 5da70a7c4a36..99e797965813 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_cert_cert__verify__proc.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_cert_cert__verify__proc.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/net/cert/cert_verify_proc.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/net/cert/cert_verify_proc.cc.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/net/cert/cert_verify_proc.cc -@@ -414,7 +414,7 @@ base::Value CertVerifyParams(X509Certificate* cert, +@@ -409,7 +409,7 @@ base::Value::Dict CertVerifyParams( } // namespace --#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) -+#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) +-#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ ++#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(CHROME_ROOT_STORE_ONLY)) // static scoped_refptr<CertVerifyProc> CertVerifyProc::CreateSystemVerifyProc( - scoped_refptr<CertNetFetcher> cert_net_fetcher) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_cert_cert__verify__proc.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_cert_cert__verify__proc.h index d2ff3390f0eb..9946d7f3a1f4 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_cert_cert__verify__proc.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_cert_cert__verify__proc.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/net/cert/cert_verify_proc.h.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/net/cert/cert_verify_proc.h.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/net/cert/cert_verify_proc.h -@@ -68,7 +68,7 @@ class NET_EXPORT CertVerifyProc +@@ -79,7 +79,7 @@ class NET_EXPORT CertVerifyProc kMaxValue = kChainLengthOne }; --#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) -+#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) +-#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ ++#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(CHROME_ROOT_STORE_ONLY)) // Creates and returns a CertVerifyProc that uses the system verifier. // |cert_net_fetcher| may not be used, depending on the implementation. - static scoped_refptr<CertVerifyProc> CreateSystemVerifyProc( diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_cert_pki_general__names.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_cert_pki_general__names.h new file mode 100644 index 000000000000..3beddde56ec9 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_cert_pki_general__names.h @@ -0,0 +1,10 @@ +--- src/3rdparty/chromium/net/cert/pki/general_names.h.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/net/cert/pki/general_names.h +@@ -8,6 +8,7 @@ + #include <memory> + #include <string_view> + #include <vector> ++#include <string> + + #include "net/base/net_export.h" + #include "net/cert/pki/cert_error_id.h" diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_disk__cache_blockfile_disk__format.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_disk__cache_blockfile_disk__format.h deleted file mode 100644 index f9ae7455c2f3..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_disk__cache_blockfile_disk__format.h +++ /dev/null @@ -1,12 +0,0 @@ ---- src/3rdparty/chromium/net/disk_cache/blockfile/disk_format.h.orig 2022-08-31 12:19:35 UTC -+++ src/3rdparty/chromium/net/disk_cache/blockfile/disk_format.h -@@ -153,7 +153,9 @@ struct RankingsNode { - }; - #pragma pack(pop) - -+#if !defined(OS_BSD) - static_assert(sizeof(RankingsNode) == 36, "bad RankingsNode"); -+#endif - - } // namespace disk_cache - diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_dns_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_dns_BUILD.gn index 93250dcd0367..3617747ac2ba 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_dns_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_dns_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/net/dns/BUILD.gn.orig 2023-02-08 09:03:45 UTC +--- src/3rdparty/chromium/net/dns/BUILD.gn.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/net/dns/BUILD.gn -@@ -124,7 +124,7 @@ source_set("dns") { +@@ -128,7 +128,7 @@ source_set("dns") { "dns_config_service_android.cc", "dns_config_service_android.h", ] @@ -9,16 +9,26 @@ sources += [ "dns_config_service_linux.cc", "dns_config_service_linux.h", -@@ -165,6 +165,7 @@ source_set("dns") { +@@ -162,6 +162,9 @@ source_set("dns") { + } + + deps = [ "//net:net_deps" ] ++ if (is_bsd) { ++ deps += [ "//components/services/screen_ai/buildflags" ] ++ } + + public_deps = [ + ":dns_client", +@@ -169,6 +172,7 @@ source_set("dns") { ":host_resolver_manager", ":mdns_client", "//net:net_public_deps", + "//printing/buildflags", ] - + allow_circular_includes_from = [ -@@ -428,9 +429,9 @@ source_set("tests") { - +@@ -436,9 +440,9 @@ source_set("tests") { + if (is_android) { sources += [ "dns_config_service_android_unittest.cc" ] - } else if (is_linux) { @@ -28,4 +38,4 @@ + } else if (is_posix && !is_bsd) { sources += [ "dns_config_service_posix_unittest.cc" ] } - + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_dns_address__info.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_dns_address__info.cc new file mode 100644 index 000000000000..645bc6db9596 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_dns_address__info.cc @@ -0,0 +1,16 @@ +--- src/3rdparty/chromium/net/dns/address_info.cc.orig 2023-09-29 10:14:06 UTC ++++ src/3rdparty/chromium/net/dns/address_info.cc +@@ -77,8 +77,12 @@ AddressInfo::AddressInfoAndResult AddressInfo::Get( + // error. + // http://crbug.com/134142 + err = ERR_NAME_NOT_RESOLVED; +-#elif BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_FREEBSD) ++#elif BUILDFLAG(IS_POSIX) ++#ifdef EAI_NODATA + if (os_error != EAI_NONAME && os_error != EAI_NODATA) ++#else ++ if (os_error != EAI_NONAME) ++#endif + err = ERR_NAME_RESOLUTION_FAILED; + #endif + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_dns_address__sorter__posix.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_dns_address__sorter__posix.cc index 6e159df9c59f..56f6e5420624 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_dns_address__sorter__posix.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_dns_address__sorter__posix.cc @@ -1,10 +1,10 @@ ---- src/3rdparty/chromium/net/dns/address_sorter_posix.cc.orig 2022-03-25 21:59:56 UTC +--- src/3rdparty/chromium/net/dns/address_sorter_posix.cc.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/net/dns/address_sorter_posix.cc -@@ -18,6 +18,7 @@ - #include <ifaddrs.h> - #include <net/if.h> +@@ -27,6 +27,7 @@ + #include "net/dns/netinet_in_var_ios.h" + #else #include <netinet/in_var.h> +#include <netinet6/in6_var.h> - #include <string.h> - #include <sys/ioctl.h> + #endif // BUILDFLAG(IS_IOS) #endif + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_http_http__auth__gssapi__posix.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_http_http__auth__gssapi__posix.cc index 981b7ed99ffb..56580ae1ca4e 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_http_http__auth__gssapi__posix.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_http_http__auth__gssapi__posix.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/net/http/http_auth_gssapi_posix.cc.orig 2022-08-31 12:19:35 UTC +--- src/3rdparty/chromium/net/http/http_auth_gssapi_posix.cc.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/net/http/http_auth_gssapi_posix.cc -@@ -368,8 +368,9 @@ base::NativeLibrary GSSAPISharedLibrary::LoadSharedLib +@@ -370,8 +370,9 @@ base::NativeLibrary GSSAPISharedLibrary::LoadSharedLib static const char* const kDefaultLibraryNames[] = { #if BUILDFLAG(IS_APPLE) "/System/Library/Frameworks/GSS.framework/GSS" diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_http_http__auth__handler__negotiate.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_http_http__auth__handler__negotiate.cc new file mode 100644 index 000000000000..8433aae87595 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_http_http__auth__handler__negotiate.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/net/http/http_auth_handler_negotiate.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/net/http/http_auth_handler_negotiate.cc +@@ -121,7 +121,7 @@ int HttpAuthHandlerNegotiate::Factory::CreateAuthHandl + #elif BUILDFLAG(IS_POSIX) + if (is_unsupported_) + return ERR_UNSUPPORTED_AUTH_SCHEME; +-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Note: Don't set is_unsupported_ = true here. AllowGssapiLibraryLoad() + // might change to true during a session. + if (!http_auth_preferences() || diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_http_http__auth__preferences.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_http_http__auth__preferences.cc new file mode 100644 index 000000000000..a4a4207ce0bf --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_http_http__auth__preferences.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/net/http/http_auth_preferences.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/net/http/http_auth_preferences.cc +@@ -39,7 +39,7 @@ std::string HttpAuthPreferences::AuthAndroidNegotiateA + } + #endif // BUILDFLAG(IS_ANDROID) + +-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + bool HttpAuthPreferences::AllowGssapiLibraryLoad() const { + return allow_gssapi_library_load_; + } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_http_http__auth__preferences.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_http_http__auth__preferences.h new file mode 100644 index 000000000000..7b8e4bdd586c --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_http_http__auth__preferences.h @@ -0,0 +1,29 @@ +--- src/3rdparty/chromium/net/http/http_auth_preferences.h.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/net/http/http_auth_preferences.h +@@ -50,7 +50,7 @@ class NET_EXPORT HttpAuthPreferences { + #if BUILDFLAG(IS_ANDROID) + virtual std::string AuthAndroidNegotiateAccountType() const; + #endif +-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + virtual bool AllowGssapiLibraryLoad() const; + #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) + virtual bool CanUseDefaultCredentials( +@@ -86,7 +86,7 @@ class NET_EXPORT HttpAuthPreferences { + } + #endif // BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) + +-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void set_allow_gssapi_library_load(bool allow_gssapi_library_load) { + allow_gssapi_library_load_ = allow_gssapi_library_load; + } +@@ -137,7 +137,7 @@ class NET_EXPORT HttpAuthPreferences { + std::string auth_android_negotiate_account_type_; + #endif // BUILDFLAG(IS_ANDROID) + +-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + bool allow_gssapi_library_load_ = true; + #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_proxy__resolution_proxy__config__service__linux.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_proxy__resolution_proxy__config__service__linux.cc index bed4b7b584a5..a9af59c8661f 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_proxy__resolution_proxy__config__service__linux.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_proxy__resolution_proxy__config__service__linux.cc @@ -1,10 +1,10 @@ ---- src/3rdparty/chromium/net/proxy_resolution/proxy_config_service_linux.cc.orig 2023-01-11 09:17:16 UTC +--- src/3rdparty/chromium/net/proxy_resolution/proxy_config_service_linux.cc.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/net/proxy_resolution/proxy_config_service_linux.cc @@ -6,7 +6,9 @@ #include <errno.h> #include <limits.h> -+#if !defined(OS_BSD) ++#if !BUILDFLAG(IS_BSD) #include <sys/inotify.h> +#endif #include <unistd.h> @@ -14,7 +14,7 @@ } #endif // defined(USE_GIO) -+#if !defined(OS_BSD) ++#if !BUILDFLAG(IS_BSD) // Converts |value| from a decimal string to an int. If there was a failure // parsing, returns |default_value|. int StringToIntOrDefault(base::StringPiece value, int default_value) { @@ -26,11 +26,11 @@ } // namespace -@@ -1248,9 +1252,11 @@ ProxyConfigServiceLinux::Delegate::Delegate( - case base::nix::DESKTOP_ENVIRONMENT_KDE3: +@@ -1249,9 +1253,11 @@ ProxyConfigServiceLinux::Delegate::Delegate( case base::nix::DESKTOP_ENVIRONMENT_KDE4: case base::nix::DESKTOP_ENVIRONMENT_KDE5: -+#if !defined(OS_BSD) + case base::nix::DESKTOP_ENVIRONMENT_KDE6: ++#if !BUILDFLAG(IS_BSD) setting_getter_ = std::make_unique<SettingGetterImplKDE>(env_var_getter_.get()); break; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_socket_tcp__socket__posix.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_socket_tcp__socket__posix.cc index a2eb5a7980c2..1e27146b95fe 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_socket_tcp__socket__posix.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_socket_tcp__socket__posix.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/net/socket/tcp_socket_posix.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/net/socket/tcp_socket_posix.cc.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/net/socket/tcp_socket_posix.cc -@@ -99,6 +99,17 @@ bool SetTCPKeepAlive(int fd, bool enable, int delay) { +@@ -98,6 +98,17 @@ bool SetTCPKeepAlive(int fd, bool enable, int delay) { PLOG(ERROR) << "Failed to set TCP_KEEPALIVE on fd: " << fd; return false; } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_socket_udp__socket__posix.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_socket_udp__socket__posix.cc index d6ad69879dbd..68a680130778 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_socket_udp__socket__posix.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_socket_udp__socket__posix.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/net/socket/udp_socket_posix.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/net/socket/udp_socket_posix.cc.orig 2023-07-16 15:47:57 UTC +++ src/3rdparty/chromium/net/socket/udp_socket_posix.cc -@@ -577,7 +577,7 @@ int UDPSocketPosix::SetDoNotFragment() { +@@ -591,7 +591,7 @@ int UDPSocketPosix::SetDoNotFragment() { } void UDPSocketPosix::SetMsgConfirm(bool confirm) { @@ -9,7 +9,7 @@ if (confirm) { sendto_flags_ |= MSG_CONFIRM; } else { -@@ -598,7 +598,7 @@ int UDPSocketPosix::SetBroadcast(bool broadcast) { +@@ -612,7 +612,7 @@ int UDPSocketPosix::SetBroadcast(bool broadcast) { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); int value = broadcast ? 1 : 0; int rv; @@ -18,7 +18,7 @@ // SO_REUSEPORT on OSX permits multiple processes to each receive // UDP multicast or broadcast datagrams destined for the bound // port. -@@ -911,7 +911,7 @@ int UDPSocketPosix::DoBind(const IPEndPoint& address) +@@ -925,7 +925,7 @@ int UDPSocketPosix::DoBind(const IPEndPoint& address) #if BUILDFLAG(IS_CHROMEOS_ASH) if (last_error == EINVAL) return ERR_ADDRESS_IN_USE; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_tools_cert__verify__tool_cert__verify__comparision__tool.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_tools_cert__verify__tool_cert__verify__comparision__tool.cc index 92fd48113d9e..c715ee91ed28 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_tools_cert__verify__tool_cert__verify__comparision__tool.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_tools_cert__verify__tool_cert__verify__comparision__tool.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/net/tools/cert_verify_tool/cert_verify_comparision_tool.cc.orig 2022-06-17 14:20:10 UTC +--- src/3rdparty/chromium/net/tools/cert_verify_tool/cert_verify_comparision_tool.cc.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/net/tools/cert_verify_tool/cert_verify_comparision_tool.cc @@ -35,7 +35,7 @@ #include "net/url_request/url_request_context_builder.h" @@ -18,12 +18,12 @@ // On Linux, use a fixed ProxyConfigService, since the default one // depends on glib. // -@@ -127,7 +127,7 @@ class CertVerifyImpl { +@@ -126,7 +126,7 @@ class CertVerifyImpl { std::unique_ptr<CertVerifyImpl> CreateCertVerifyImplFromName( base::StringPiece impl_name, scoped_refptr<net::CertNetFetcher> cert_net_fetcher) { --#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) -+#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) +-#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ ++#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(CHROME_ROOT_STORE_ONLY)) if (impl_name == "platform") { return std::make_unique<CertVerifyImpl>( - "CertVerifyProc (system)", net::CertVerifyProc::CreateSystemVerifyProc( diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_tools_cert__verify__tool_cert__verify__tool.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_tools_cert__verify__tool_cert__verify__tool.cc index 21a600136e64..4d2b90081384 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_tools_cert__verify__tool_cert__verify__tool.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_tools_cert__verify__tool_cert__verify__tool.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/net/tools/cert_verify_tool/cert_verify_tool.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/net/tools/cert_verify_tool/cert_verify_tool.cc.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/net/tools/cert_verify_tool/cert_verify_tool.cc @@ -31,7 +31,7 @@ #include "net/url_request/url_request_context_builder.h" @@ -18,21 +18,21 @@ // On Linux, use a fixed ProxyConfigService, since the default one // depends on glib. // -@@ -222,7 +222,7 @@ std::unique_ptr<CertVerifyImpl> CreateCertVerifyImplFr - base::StringPiece impl_name, +@@ -223,7 +223,7 @@ std::unique_ptr<CertVerifyImpl> CreateCertVerifyImplFr scoped_refptr<net::CertNetFetcher> cert_net_fetcher, + scoped_refptr<net::CRLSet> crl_set, RootStoreType root_store_type) { --#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) -+#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) +-#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ ++#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(CHROME_ROOT_STORE_ONLY)) if (impl_name == "platform") { if (root_store_type != RootStoreType::kSystem) { - std::cerr << "WARNING: platform verifier not supported with " -@@ -534,7 +534,7 @@ int main(int argc, char** argv) { +@@ -537,7 +537,7 @@ int main(int argc, char** argv) { std::string impls_str = command_line.GetSwitchValueASCII("impls"); if (impls_str.empty()) { // Default value. --#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) -+#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) +-#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ ++#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(CHROME_ROOT_STORE_ONLY)) impls_str = "platform,"; #endif - impls_str += "builtin,pathbuilder"; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_url__request_url__request__context__builder.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_url__request_url__request__context__builder.cc index 89ac3cd25dc2..1d82ab2392fc 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_url__request_url__request__context__builder.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_net_url__request_url__request__context__builder.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/net/url_request/url_request_context_builder.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/net/url_request/url_request_context_builder.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/net/url_request/url_request_context_builder.cc -@@ -443,7 +443,7 @@ std::unique_ptr<URLRequestContext> URLRequestContextBu +@@ -446,7 +446,7 @@ std::unique_ptr<URLRequestContext> URLRequestContextBu } if (!proxy_resolution_service_) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_pdf_pdfium_pdfium__engine.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_pdf_pdfium_pdfium__engine.cc index 150ef4b2664b..7bfd41e35275 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_pdf_pdfium_pdfium__engine.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_pdf_pdfium_pdfium__engine.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/pdf/pdfium/pdfium_engine.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/pdf/pdfium/pdfium_engine.cc.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/pdf/pdfium/pdfium_engine.cc -@@ -84,7 +84,7 @@ +@@ -83,7 +83,7 @@ #include "gin/public/cppgc.h" #endif @@ -9,7 +9,7 @@ #include "pdf/pdfium/pdfium_font_linux.h" #endif -@@ -526,7 +526,7 @@ void InitializeSDK(bool enable_v8, FontMappingMode fon +@@ -525,7 +525,7 @@ void InitializeSDK(bool enable_v8, FPDF_InitLibraryWithConfig(&config); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_backend_cups__helper.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_backend_cups__helper.cc deleted file mode 100644 index 5a90544a5b4f..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_backend_cups__helper.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/printing/backend/cups_helper.cc.orig 2023-04-05 11:05:06 UTC -+++ src/3rdparty/chromium/printing/backend/cups_helper.cc -@@ -127,7 +127,7 @@ void GetResolutionSettings(ppd_file_t* ppd, - // found. - #if BUILDFLAG(IS_MAC) - constexpr gfx::Size kDefaultMissingDpi(kDefaultMacDpi, kDefaultMacDpi); --#elif BUILDFLAG(IS_LINUX) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - constexpr gfx::Size kDefaultMissingDpi(kPixelsPerInch, kPixelsPerInch); - #else - constexpr gfx::Size kDefaultMissingDpi(kDefaultPdfDpi, kDefaultPdfDpi); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_backend_cups__ipp__helper.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_backend_cups__ipp__helper.cc index a0de02e92b31..e3b7090806f5 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_backend_cups__ipp__helper.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_backend_cups__ipp__helper.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/printing/backend/cups_ipp_helper.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/printing/backend/cups_ipp_helper.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/printing/backend/cups_ipp_helper.cc -@@ -210,7 +210,7 @@ void ExtractResolutions(const CupsOptionProvider& prin +@@ -215,7 +215,7 @@ void ExtractResolutions(const CupsOptionProvider& prin // Provide a default DPI if no valid DPI is found. #if BUILDFLAG(IS_MAC) constexpr gfx::Size kDefaultMissingDpi(kDefaultMacDpi, kDefaultMacDpi); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_mojom_printing__context__mojom__traits.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_mojom_printing__context__mojom__traits.cc index f7f14d9a11f0..5e70a52bef9b 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_mojom_printing__context__mojom__traits.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_mojom_printing__context__mojom__traits.cc @@ -1,15 +1,15 @@ ---- src/3rdparty/chromium/printing/mojom/printing_context_mojom_traits.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/printing/mojom/printing_context_mojom_traits.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/printing/mojom/printing_context_mojom_traits.cc -@@ -15,7 +15,7 @@ - #include "ui/gfx/geometry/mojom/geometry_mojom_traits.h" - #include "ui/gfx/geometry/size.h" +@@ -19,7 +19,7 @@ + #include "base/numerics/safe_conversions.h" + #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "mojo/public/mojom/base/values.mojom.h" #endif -@@ -150,7 +150,7 @@ bool StructTraits< +@@ -161,7 +161,7 @@ bool StructTraits< } out->set_pages_per_sheet(data.pages_per_sheet()); @@ -18,3 +18,12 @@ DCHECK(out->advanced_settings().empty()); if (!data.ReadAdvancedSettings(&out->advanced_settings())) return false; +@@ -239,7 +239,7 @@ bool StructTraits< + return false; + } + +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // The dictionary must contain three strings. + base::Value* value = system_print_dialog_data.Find( + printing::kLinuxSystemPrintDialogDataPrinter); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_mojom_printing__context__mojom__traits.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_mojom_printing__context__mojom__traits.h index aa26b6bb7df4..fcdfc946bf1f 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_mojom_printing__context__mojom__traits.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_mojom_printing__context__mojom__traits.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/printing/mojom/printing_context_mojom_traits.h.orig 2022-06-17 14:20:10 UTC +--- src/3rdparty/chromium/printing/mojom/printing_context_mojom_traits.h.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/printing/mojom/printing_context_mojom_traits.h -@@ -158,7 +158,7 @@ struct StructTraits<printing::mojom::PrintSettingsData +@@ -166,7 +166,7 @@ struct StructTraits<printing::mojom::PrintSettingsData return s.pages_per_sheet(); } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_print__settings.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_print__settings.cc index 363d83e8e5d5..a4f4d9d86d32 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_print__settings.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_print__settings.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/printing/print_settings.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/printing/print_settings.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/printing/print_settings.cc -@@ -314,7 +314,7 @@ PrintSettings& PrintSettings::operator=(const PrintSet +@@ -320,7 +320,7 @@ PrintSettings& PrintSettings::operator=(const PrintSet #endif is_modifiable_ = settings.is_modifiable_; pages_per_sheet_ = settings.pages_per_sheet_; @@ -9,7 +9,25 @@ for (const auto& item : settings.advanced_settings_) advanced_settings_.emplace(item.first, item.second.Clone()); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -405,7 +405,7 @@ void PrintSettings::Clear() { +@@ -350,7 +350,7 @@ bool PrintSettings::operator==(const PrintSettings& ot + #endif + is_modifiable_, requested_custom_margins_in_points_, + pages_per_sheet_ +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + , + advanced_settings_ + #endif +@@ -374,7 +374,7 @@ bool PrintSettings::operator==(const PrintSettings& ot + other.is_modifiable_, + other.requested_custom_margins_in_points_, + other.pages_per_sheet_ +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + , + other.advanced_settings_ + #endif +@@ -414,7 +414,7 @@ void PrintSettings::Clear() { #endif is_modifiable_ = true; pages_per_sheet_ = 1; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_print__settings.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_print__settings.h index bf497f113add..3d7d309de02d 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_print__settings.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_print__settings.h @@ -1,15 +1,24 @@ ---- src/3rdparty/chromium/printing/print_settings.h.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/printing/print_settings.h.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/printing/print_settings.h -@@ -21,7 +21,7 @@ - #include "ui/gfx/geometry/rect.h" - #include "ui/gfx/geometry/size.h" +@@ -25,7 +25,7 @@ + #include "base/values.h" + #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include <map> #include "base/values.h" -@@ -74,7 +74,7 @@ class COMPONENT_EXPORT(PRINTING) PrintSettings { +@@ -51,7 +51,7 @@ inline constexpr char kMacSystemPrintDialogDataPrintSe + "print_settings"; + #endif // BUILDFLAG(IS_MAC) + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + inline constexpr char kLinuxSystemPrintDialogDataPrinter[] = "printer_name"; + inline constexpr char kLinuxSystemPrintDialogDataPrintSettings[] = + "print_settings"; +@@ -101,7 +101,7 @@ class COMPONENT_EXPORT(PRINTING) PrintSettings { std::string vendor_id; }; @@ -18,7 +27,7 @@ using AdvancedSettings = std::map<std::string, base::Value>; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -241,7 +241,7 @@ class COMPONENT_EXPORT(PRINTING) PrintSettings { +@@ -276,7 +276,7 @@ class COMPONENT_EXPORT(PRINTING) PrintSettings { pages_per_sheet_ = pages_per_sheet; } @@ -27,7 +36,7 @@ AdvancedSettings& advanced_settings() { return advanced_settings_; } const AdvancedSettings& advanced_settings() const { return advanced_settings_; -@@ -372,7 +372,7 @@ class COMPONENT_EXPORT(PRINTING) PrintSettings { +@@ -429,7 +429,7 @@ class COMPONENT_EXPORT(PRINTING) PrintSettings { // Number of pages per sheet. int pages_per_sheet_; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_print__settings__conversion.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_print__settings__conversion.cc index 124d6ab84e9d..5da292797b4a 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_print__settings__conversion.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_print__settings__conversion.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/printing/print_settings_conversion.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/printing/print_settings_conversion.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/printing/print_settings_conversion.cc -@@ -277,7 +277,7 @@ std::unique_ptr<PrintSettings> PrintSettingsFromJobSet +@@ -287,7 +287,7 @@ std::unique_ptr<PrintSettings> PrintSettingsFromJobSet settings->set_is_modifiable(is_modifiable.value()); } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_printing__context__linux.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_printing__context__linux.cc index 5849f4064098..948fad7aa10e 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_printing__context__linux.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_printing__context__linux.cc @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/printing/printing_context_linux.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/printing/printing_context_linux.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/printing/printing_context_linux.cc -@@ -19,7 +19,7 @@ - #include "printing/units.h" +@@ -23,7 +23,7 @@ + #endif // Avoid using LinuxUi on Fuchsia. -#if BUILDFLAG(IS_LINUX) @@ -9,7 +9,7 @@ #include "ui/linux/linux_ui.h" #endif -@@ -68,7 +68,7 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSett +@@ -72,7 +72,7 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSett ResetSettings(); @@ -18,7 +18,7 @@ if (!ui::LinuxUi::instance()) return mojom::ResultCode::kSuccess; -@@ -84,7 +84,7 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSett +@@ -88,7 +88,7 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSett } gfx::Size PrintingContextLinux::GetPdfPaperSizeDeviceUnits() { @@ -27,7 +27,7 @@ if (ui::LinuxUi::instance()) return ui::LinuxUi::instance()->GetPdfPaperSize(this); #endif -@@ -97,7 +97,7 @@ mojom::ResultCode PrintingContextLinux::UpdatePrinterS +@@ -101,7 +101,7 @@ mojom::ResultCode PrintingContextLinux::UpdatePrinterS DCHECK(!printer_settings.show_system_dialog); DCHECK(!in_print_job_); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_sandbox_print__backend__sandbox__hook__linux.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_sandbox_print__backend__sandbox__hook__linux.cc index 3abb9b1db71f..8f2aa000c2c1 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_sandbox_print__backend__sandbox__hook__linux.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_sandbox_print__backend__sandbox__hook__linux.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/printing/sandbox/print_backend_sandbox_hook_linux.cc.orig 2023-02-08 09:03:45 UTC +--- src/3rdparty/chromium/printing/sandbox/print_backend_sandbox_hook_linux.cc.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/printing/sandbox/print_backend_sandbox_hook_linux.cc -@@ -10,21 +10,28 @@ +@@ -10,20 +10,27 @@ #include "base/path_service.h" #include "build/build_config.h" #include "printing/buildflags/buildflags.h" @@ -9,9 +9,8 @@ #include "sandbox/linux/syscall_broker/broker_file_permission.h" #include "sandbox/policy/export.h" #include "sandbox/policy/linux/sandbox_linux.h" - #include "services/network/network_sandbox_hook_linux.h" +#else -+#include "sandbox/policy/openbsd/sandbox_openbsd.h" ++#include "sandbox/policy/sandbox.h" +#endif #if BUILDFLAG(IS_CHROMEOS) && BUILDFLAG(USE_CUPS) @@ -29,7 +28,7 @@ namespace { sandbox::syscall_broker::BrokerCommandSet GetPrintBackendBrokerCommandSet() { -@@ -85,9 +92,11 @@ std::vector<BrokerFilePermission> GetPrintBackendFileP +@@ -76,9 +83,11 @@ std::vector<BrokerFilePermission> GetPrintBackendFileP } } // namespace @@ -41,7 +40,7 @@ #if BUILDFLAG(IS_CHROMEOS) && BUILDFLAG(USE_CUPS) // Create the socket connections to the CUPS server before engaging the // sandbox, since new connections cannot be made after that. -@@ -101,6 +110,7 @@ bool PrintBackendPreSandboxHook( +@@ -92,6 +101,7 @@ bool PrintBackendPreSandboxHook( sandbox::policy::SandboxLinux::PreSandboxHook(), options); instance->EngageNamespaceSandboxIfPossible(); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_sandbox_print__backend__sandbox__hook__linux.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_sandbox_print__backend__sandbox__hook__linux.h index 562558862c61..57c55c4add93 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_sandbox_print__backend__sandbox__hook__linux.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_printing_sandbox_print__backend__sandbox__hook__linux.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/printing/sandbox/print_backend_sandbox_hook_linux.h.orig 2022-02-07 13:39:41 UTC +--- src/3rdparty/chromium/printing/sandbox/print_backend_sandbox_hook_linux.h.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/printing/sandbox/print_backend_sandbox_hook_linux.h @@ -5,8 +5,13 @@ #ifndef PRINTING_SANDBOX_PRINT_BACKEND_SANDBOX_HOOK_LINUX_H_ @@ -6,8 +6,8 @@ +#include "build/build_config.h" #include "base/component_export.h" -+#if defined(OS_BSD) -+#include "sandbox/policy/openbsd/sandbox_openbsd.h" ++#if BUILDFLAG(IS_BSD) ++#include "sandbox/policy/sandbox.h" +#else #include "sandbox/policy/linux/sandbox_linux.h" +#endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_linux_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_linux_BUILD.gn index ee65ecf8a3a5..cfdee966f711 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_linux_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_linux_BUILD.gn @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/sandbox/linux/BUILD.gn.orig 2023-02-08 09:03:45 UTC +--- src/3rdparty/chromium/sandbox/linux/BUILD.gn.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/sandbox/linux/BUILD.gn @@ -12,11 +12,11 @@ if (is_android) { } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_linux_services_libc__interceptor.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_linux_services_libc__interceptor.cc index 1007bb73db43..7593efce8eed 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_linux_services_libc__interceptor.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_linux_services_libc__interceptor.cc @@ -1,10 +1,10 @@ ---- src/3rdparty/chromium/sandbox/linux/services/libc_interceptor.cc.orig 2023-01-11 09:17:16 UTC +--- src/3rdparty/chromium/sandbox/linux/services/libc_interceptor.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/sandbox/linux/services/libc_interceptor.cc @@ -12,7 +12,9 @@ #include <stddef.h> #include <stdint.h> #include <string.h> -+#if !defined(OS_BSD) ++#if !BUILDFLAG(IS_BSD) #include <sys/prctl.h> +#endif #include <sys/socket.h> diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_BUILD.gn index 3f5ef1a4abdd..2d970ec34ee7 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_BUILD.gn @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/sandbox/policy/BUILD.gn.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/sandbox/policy/BUILD.gn.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/sandbox/policy/BUILD.gn @@ -35,7 +35,7 @@ component("policy") { "//sandbox/policy/mojom", @@ -9,7 +9,7 @@ sources += [ "linux/bpf_audio_policy_linux.cc", "linux/bpf_audio_policy_linux.h", -@@ -103,6 +103,27 @@ component("policy") { +@@ -106,6 +106,27 @@ component("policy") { "//sandbox/linux:sandbox_services", "//sandbox/linux:seccomp_bpf", "//sandbox/linux:suid_sandbox_client", diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_features.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_features.cc index c85e54bcce00..b5c11fdb5f0b 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_features.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_features.cc @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/sandbox/policy/features.cc.orig 2022-11-30 08:12:58 UTC +--- src/3rdparty/chromium/sandbox/policy/features.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/sandbox/policy/features.cc -@@ -15,7 +15,11 @@ namespace sandbox::policy::features { - // (Only causes an effect when feature kNetworkService is enabled.) +@@ -19,7 +19,11 @@ namespace sandbox::policy::features { + // (Only causes an effect when feature kNetworkServiceInProcess is disabled.) BASE_FEATURE(kNetworkServiceSandbox, "NetworkServiceSandbox", +#if BUILDFLAG(IS_BSD) @@ -9,6 +9,6 @@ +#else base::FEATURE_DISABLED_BY_DEFAULT); +#endif - #endif // !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_FUCHSIA) - #if BUILDFLAG(IS_WIN) + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + // Enables a fine-grained seccomp-BPF syscall filter for the network service. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_freebsd_sandbox__freebsd.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_freebsd_sandbox__freebsd.cc index 113fe2c35295..2c31ebe63ce2 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_freebsd_sandbox__freebsd.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_freebsd_sandbox__freebsd.cc @@ -120,7 +120,7 @@ + base::FilePath cache_directory, local_directory; + + base::PathService::Get(base::DIR_CACHE, &cache_directory); -+ base::PathService::Get(base::DIR_HOME, &local_directory); ++ base::PathService::Get(base::DIR_HOME, &local_directory); + + cache_directory = cache_directory.AppendASCII("chromium"); + local_directory = local_directory.AppendASCII(".local").AppendASCII("share").AppendASCII("applications"); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_freebsd_sandbox__freebsd.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_freebsd_sandbox__freebsd.h index 63c091d8eaab..bf58da39099d 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_freebsd_sandbox__freebsd.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_freebsd_sandbox__freebsd.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/sandbox/policy/freebsd/sandbox_freebsd.h.orig 2022-11-30 08:12:58 UTC +--- src/3rdparty/chromium/sandbox/policy/freebsd/sandbox_freebsd.h.orig 2023-12-22 15:04:02 UTC +++ src/3rdparty/chromium/sandbox/policy/freebsd/sandbox_freebsd.h @@ -0,0 +1,278 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_mojom_sandbox.mojom b/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_mojom_sandbox.mojom index 8534b0cee625..39ac0d6e34b4 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_mojom_sandbox.mojom +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_mojom_sandbox.mojom @@ -1,8 +1,8 @@ ---- src/3rdparty/chromium/sandbox/policy/mojom/sandbox.mojom.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/sandbox/policy/mojom/sandbox.mojom.orig 2023-07-16 15:47:57 UTC +++ src/3rdparty/chromium/sandbox/policy/mojom/sandbox.mojom -@@ -76,6 +76,12 @@ enum Sandbox { - [EnableIf=is_win] - kFileUtil, +@@ -72,6 +72,12 @@ enum Sandbox { + [EnableIf=is_fuchsia] + kVideoCapture, + [EnableIf=is_openbsd] + kVideoCapture, diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_openbsd_sandbox__openbsd.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_openbsd_sandbox__openbsd.cc index 79833e898578..dbc297b8a2ab 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_openbsd_sandbox__openbsd.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_openbsd_sandbox__openbsd.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/sandbox/policy/openbsd/sandbox_openbsd.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/sandbox/policy/openbsd/sandbox_openbsd.cc.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/sandbox/policy/openbsd/sandbox_openbsd.cc -@@ -0,0 +1,399 @@ +@@ -0,0 +1,420 @@ +// Copyright (c) 2012 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. @@ -37,6 +37,8 @@ +#include "base/threading/thread.h" +#include "base/time/time.h" +#include "build/build_config.h" ++#include "crypto/crypto_buildflags.h" ++#include "ppapi/buildflags/buildflags.h" +#include "sandbox/constants.h" +#include "sandbox/linux/services/credentials.h" +#include "sandbox/linux/services/namespace_sandbox.h" @@ -55,7 +57,7 @@ +#include <sanitizer/common_interface_defs.h> +#endif + -+#if defined(USE_NSS_CERTS) ++#if BUILDFLAG(USE_NSS_CERTS) +#include "crypto/nss_util.h" +#endif + @@ -66,10 +68,7 @@ +#define MAXTOKENS 3 + +#define _UNVEIL_MAIN "/etc/chromium/unveil.main"; -+#define _UNVEIL_RENDERER "/etc/chromium/unveil.renderer"; +#define _UNVEIL_GPU "/etc/chromium/unveil.gpu"; -+#define _UNVEIL_PLUGIN "/etc/chromium/unveil.plugin"; -+#define _UNVEIL_UTILITY "/etc/chromium/unveil.utility"; +#define _UNVEIL_UTILITY_NETWORK "/etc/chromium/unveil.utility_network"; +#define _UNVEIL_UTILITY_AUDIO "/etc/chromium/unveil.utility_audio"; +#define _UNVEIL_UTILITY_VIDEO "/etc/chromium/unveil.utility_video"; @@ -118,40 +117,41 @@ + base::SysInfo::NumberOfProcessors(); + base::SysInfo::CPUModelName(); + -+#if defined(USE_NSS_CERTS) -+ // The main process has to initialize the ~/.pki dir which won't work -+ // after unveil(2). -+ if (process_type.empty()) -+ crypto::EnsureNSSInit(); ++ switch (sandbox_type) { ++ case sandbox::mojom::Sandbox::kNoSandbox: ++ { ++#if BUILDFLAG(USE_NSS_CERTS) ++ // The main process has to initialize the ~/.pki dir which won't work ++ // after unveil(2). ++ crypto::EnsureNSSInit(); +#endif ++ CRYPTO_pre_sandbox_init(); + -+ if (process_type.empty()) -+ CRYPTO_pre_sandbox_init(); ++ base::FilePath cache_directory, local_directory; + -+ if (process_type.empty()) { -+ base::FilePath cache_directory, local_directory; ++ base::PathService::Get(base::DIR_CACHE, &cache_directory); ++ base::PathService::Get(base::DIR_HOME, &local_directory); + -+ base::PathService::Get(base::DIR_CACHE, &cache_directory); -+ base::PathService::Get(base::DIR_HOME, &local_directory); ++ cache_directory = cache_directory.AppendASCII("chromium"); ++ local_directory = local_directory.AppendASCII(".local").AppendASCII("share").AppendASCII("applications"); + -+ cache_directory = cache_directory.AppendASCII("chromium"); -+ local_directory = local_directory.AppendASCII(".local").AppendASCII("share").AppendASCII("applications"); ++ if (!base::CreateDirectory(cache_directory)) { ++ LOG(ERROR) << "Failed to create " << cache_directory.value() << " directory."; ++ } + -+ if (!base::CreateDirectory(cache_directory)) { -+ LOG(ERROR) << "Failed to create " << cache_directory.value() << " directory."; -+ } ++ if (!base::CreateDirectory(local_directory)) { ++ LOG(ERROR) << "Failed to create " << local_directory.value() << " directory."; ++ } + -+ if (!base::CreateDirectory(local_directory)) { -+ LOG(ERROR) << "Failed to create " << local_directory.value() << " directory."; ++ break; + } ++ case sandbox::mojom::Sandbox::kRenderer: ++ gfx::InitializeFonts(); ++ break; ++ default: ++ break; + } + -+ if (process_type == switches::kRendererProcess) -+ gfx::InitializeFonts(); -+ -+ if (!command_line->HasSwitch(switches::kDisableUnveil)) -+ SetUnveil(process_type, sandbox_type); -+ + pre_initialized_ = true; +} + @@ -164,6 +164,7 @@ + if (pstring != NULL) { + if (pledge(pstring, NULL) == -1) + goto err; ++ VLOG(5) << "pledge " << pstring; + } else if (ppath != NULL) { + fp = fopen(ppath, "r"); + if (fp != NULL) { @@ -172,10 +173,11 @@ + s[strlen(s)-1] = '\0'; + if (pledge(s, NULL) == -1) + goto err; ++ VLOG(5) << "pledge " << s; + } + fclose(fp); + } else { -+ LOG(ERROR) << "fopen() failed, errno: " << errno; ++ LOG(ERROR) << "fopen(" << ppath << ") failed, errno: " << errno; + return false; + } + } @@ -192,24 +194,25 @@ + const char *ufile; + size_t len = 0, lineno = 0; + -+ if (process_type.empty()) { -+ ufile = _UNVEIL_MAIN; -+ } else if (process_type == switches::kRendererProcess) { -+ ufile = _UNVEIL_RENDERER; -+ } else if (process_type == switches::kGpuProcess) { -+ ufile = _UNVEIL_GPU; -+ } else if (process_type == switches::kPpapiPluginProcess) { -+ ufile = _UNVEIL_PLUGIN; -+ } else if (process_type == switches::kUtilityProcess) { -+ if (sandbox_type == sandbox::mojom::Sandbox::kNetwork) { ++ switch (sandbox_type) { ++ case sandbox::mojom::Sandbox::kNoSandbox: ++ ufile = _UNVEIL_MAIN; ++ break; ++ case sandbox::mojom::Sandbox::kGpu: ++ ufile = _UNVEIL_GPU; ++ break; ++ case sandbox::mojom::Sandbox::kNetwork: + ufile = _UNVEIL_UTILITY_NETWORK; -+ } else if (sandbox_type == sandbox::mojom::Sandbox::kAudio) { ++ break; ++ case sandbox::mojom::Sandbox::kAudio: + ufile = _UNVEIL_UTILITY_AUDIO; -+ } else if (sandbox_type == sandbox::mojom::Sandbox::kVideoCapture) { ++ break; ++ case sandbox::mojom::Sandbox::kVideoCapture: + ufile = _UNVEIL_UTILITY_VIDEO; -+ } else { -+ ufile = _UNVEIL_UTILITY; -+ } ++ break; ++ default: ++ unveil("/dev/null", "r"); ++ goto done; + } + + fp = fopen(ufile, "r"); @@ -259,7 +262,7 @@ + LOG(ERROR) << "failed unveiling " << path << " with permissions " << tokens[1]; + _exit(1); + } else { -+ VLOG(1) << "unveiling " << path << " with permissions " << tokens[1]; ++ VLOG(5) << "unveiling " << path << " with permissions " << tokens[1]; + } + } + fclose(fp); @@ -268,6 +271,7 @@ + _exit(1); + } + ++done: + unveil_initialized_ = true; + + return true; @@ -307,31 +311,46 @@ + PCHECK(limited_as); + } + -+ if (process_type.empty()) { -+ // XXX use a file for listing pledges of the main process for now -+ // XXX not having the file is not a fatal error -+ SetPledge(NULL, "/etc/chromium/pledge.main"); -+ } else if (process_type == switches::kRendererProcess) { -+ // prot_exec needed by v8 -+ // flock needed by sqlite3 locking -+ SetPledge("stdio rpath flock prot_exec recvfd sendfd ps", NULL); -+ } else if (process_type == switches::kGpuProcess) { -+ SetPledge("stdio rpath flock cpath wpath getpw drm prot_exec recvfd sendfd tmppath", NULL); -+ } else if (process_type == switches::kPpapiPluginProcess) { -+ // prot_exec needed by v8 -+ SetPledge("stdio rpath prot_exec recvfd sendfd", NULL); -+ } else if (process_type == switches::kUtilityProcess) { -+ if (sandbox_type == sandbox::mojom::Sandbox::kAudio) ++ if (hook) ++ CHECK(std::move(hook).Run(options)); ++ ++ if (!command_line->HasSwitch(switches::kDisableUnveil)) ++ SetUnveil(process_type, sandbox_type); ++ ++ switch(sandbox_type) { ++ case sandbox::mojom::Sandbox::kNoSandbox: ++ SetPledge(NULL, "/etc/chromium/pledge.main"); ++ break; ++ case sandbox::mojom::Sandbox::kRenderer: ++ // prot_exec needed by v8 ++ // flock needed by sqlite3 locking ++ SetPledge("stdio rpath flock prot_exec recvfd sendfd ps", NULL); ++ break; ++ case sandbox::mojom::Sandbox::kGpu: ++ SetPledge("stdio drm rpath flock cpath wpath prot_exec recvfd sendfd tmppath", NULL); ++ break; ++#if BUILDFLAG(ENABLE_PPAPI) ++ case sandbox::mojom::Sandbox::kPpapi: ++ // prot_exec needed by v8 ++ SetPledge("stdio rpath prot_exec recvfd sendfd", NULL); ++ break; ++#endif ++ case sandbox::mojom::Sandbox::kAudio: + SetPledge(NULL, "/etc/chromium/pledge.utility_audio"); -+ else if (sandbox_type == sandbox::mojom::Sandbox::kNetwork) ++ break; ++ case sandbox::mojom::Sandbox::kNetwork: + SetPledge(NULL, "/etc/chromium/pledge.utility_network"); -+ else if (sandbox_type == sandbox::mojom::Sandbox::kVideoCapture) ++ break; ++ case sandbox::mojom::Sandbox::kVideoCapture: + SetPledge(NULL, "/etc/chromium/pledge.utility_video"); -+ else ++ break; ++ case sandbox::mojom::Sandbox::kUtility: ++ case sandbox::mojom::Sandbox::kService: + SetPledge("stdio rpath cpath wpath fattr flock sendfd recvfd prot_exec", NULL); -+ } else { -+ LOG(ERROR) << "non-pledge()'d process: " << process_type; -+ return false; ++ break; ++ default: ++ LOG(ERROR) << "non-pledge()'d process: " << GetSandboxTypeInEnglish(sandbox_type); ++ break; + } + + return true; @@ -377,8 +396,10 @@ + return "Utility"; + case sandbox::mojom::Sandbox::kGpu: + return "GPU"; ++#if BUILDFLAG(ENABLE_PPAPI) + case sandbox::mojom::Sandbox::kPpapi: + return "PPAPI"; ++#endif + case sandbox::mojom::Sandbox::kNetwork: + return "Network"; + case sandbox::mojom::Sandbox::kCdm: diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_sandbox.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_sandbox.cc index 227228695db7..3adb46cdb0a8 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_sandbox.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_sandbox.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/sandbox/policy/sandbox.cc.orig 2022-11-30 08:12:58 UTC +--- src/3rdparty/chromium/sandbox/policy/sandbox.cc.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/sandbox/policy/sandbox.cc @@ -18,6 +18,10 @@ #include "sandbox/policy/linux/sandbox_linux.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_BSD) -+#include "sandbox/policy/openbsd/sandbox_openbsd.h" ++#include "sandbox/policy/sandbox.h" +#endif // BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_MAC) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_sandbox.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_sandbox.h index cd61caa4672c..4c335f283a21 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_sandbox.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_sandbox.h @@ -1,17 +1,19 @@ ---- src/3rdparty/chromium/sandbox/policy/sandbox.h.orig 2022-02-28 16:54:41 UTC +--- src/3rdparty/chromium/sandbox/policy/sandbox.h.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/sandbox/policy/sandbox.h -@@ -12,6 +12,10 @@ +@@ -12,6 +12,12 @@ #include "sandbox/policy/linux/sandbox_linux.h" #endif -+#if BUILDFLAG(IS_BSD) ++#if BUILDFLAG(IS_OPENBSD) +#include "sandbox/policy/openbsd/sandbox_openbsd.h" -+#endif ++#elif BUILDFLAG(IS_FREEBSD) ++#include "sandbox/policy/freebsd/sandbox_freebsd.h" ++#endif + namespace sandbox { namespace mojom { enum class Sandbox; -@@ -32,7 +36,7 @@ namespace policy { +@@ -32,7 +38,7 @@ namespace policy { class SANDBOX_POLICY_EXPORT Sandbox { public: diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_sandbox__type.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_sandbox__type.cc index 19c190830793..a9c05cd93b7d 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_sandbox__type.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_sandbox__type.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/sandbox/policy/sandbox_type.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/sandbox/policy/sandbox_type.cc.orig 2023-07-16 15:47:57 UTC +++ src/3rdparty/chromium/sandbox/policy/sandbox_type.cc -@@ -39,7 +39,7 @@ bool IsUnsandboxedSandboxType(Sandbox sandbox_type) { +@@ -38,7 +38,7 @@ bool IsUnsandboxedSandboxType(Sandbox sandbox_type) { #endif case Sandbox::kAudio: return false; @@ -9,7 +9,7 @@ case Sandbox::kVideoCapture: return false; #endif -@@ -62,7 +62,7 @@ bool IsUnsandboxedSandboxType(Sandbox sandbox_type) { +@@ -61,7 +61,7 @@ bool IsUnsandboxedSandboxType(Sandbox sandbox_type) { case Sandbox::kMirroring: case Sandbox::kNaClLoader: #endif @@ -18,7 +18,7 @@ case Sandbox::kHardwareVideoDecoding: #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -72,7 +72,7 @@ bool IsUnsandboxedSandboxType(Sandbox sandbox_type) { +@@ -71,7 +71,7 @@ bool IsUnsandboxedSandboxType(Sandbox sandbox_type) { case Sandbox::kLibassistant: #endif // BUILDFLAG(ENABLE_CROS_LIBASSISTANT) #endif // // BUILDFLAG(IS_CHROMEOS_ASH) @@ -27,7 +27,7 @@ case Sandbox::kZygoteIntermediateSandbox: case Sandbox::kHardwareVideoEncoding: #endif -@@ -128,7 +128,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi +@@ -127,7 +127,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi #endif case Sandbox::kPrintCompositor: case Sandbox::kAudio: @@ -36,9 +36,9 @@ case Sandbox::kVideoCapture: #endif #if BUILDFLAG(IS_WIN) -@@ -140,10 +140,10 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi +@@ -138,10 +138,10 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi + case Sandbox::kMediaFoundationCdm: case Sandbox::kWindowsSystemProxyResolver: - case Sandbox::kFileUtil: #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) @@ -49,7 +49,7 @@ case Sandbox::kHardwareVideoEncoding: #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -171,7 +171,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi +@@ -169,7 +169,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi case Sandbox::kNaClLoader: break; #endif // BUILDFLAG(IS_MAC) @@ -58,7 +58,7 @@ case Sandbox::kZygoteIntermediateSandbox: break; #endif -@@ -218,7 +218,7 @@ sandbox::mojom::Sandbox SandboxTypeFromCommandLine( +@@ -216,7 +216,7 @@ sandbox::mojom::Sandbox SandboxTypeFromCommandLine( if (process_type == switches::kNaClBrokerProcess) return Sandbox::kNoSandbox; @@ -67,7 +67,7 @@ // Intermediate process gains a sandbox later. if (process_type == switches::kZygoteProcessType) return Sandbox::kZygoteIntermediateSandbox; -@@ -262,7 +262,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb +@@ -260,7 +260,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb return switches::kUtilitySandbox; case Sandbox::kAudio: return switches::kAudioSandbox; @@ -76,7 +76,7 @@ case Sandbox::kVideoCapture: return switches::kVideoCaptureSandbox; #endif -@@ -292,11 +292,11 @@ std::string StringFromUtilitySandboxType(Sandbox sandb +@@ -290,11 +290,11 @@ std::string StringFromUtilitySandboxType(Sandbox sandb case Sandbox::kMirroring: return switches::kMirroringSandbox; #endif @@ -90,7 +90,7 @@ case Sandbox::kHardwareVideoEncoding: return switches::kHardwareVideoEncodingSandbox; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -320,7 +320,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb +@@ -314,7 +314,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb #if BUILDFLAG(IS_MAC) case Sandbox::kNaClLoader: #endif // BUILDFLAG(IS_MAC) @@ -99,7 +99,7 @@ case Sandbox::kZygoteIntermediateSandbox: #endif NOTREACHED(); -@@ -391,11 +391,11 @@ sandbox::mojom::Sandbox UtilitySandboxTypeFromString( +@@ -382,11 +382,11 @@ sandbox::mojom::Sandbox UtilitySandboxTypeFromString( if (sandbox_string == switches::kScreenAISandbox) return Sandbox::kScreenAI; #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_switches.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_switches.cc index 0bd48e0c9d4e..90b08ff08439 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_switches.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_switches.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/sandbox/policy/switches.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/sandbox/policy/switches.cc.orig 2023-07-16 15:47:57 UTC +++ src/3rdparty/chromium/sandbox/policy/switches.cc -@@ -54,10 +54,10 @@ const char kFileUtilSandbox[] = "file_util"; +@@ -53,10 +53,10 @@ const char kWindowsSystemProxyResolverSandbox[] = "pro const char kMirroringSandbox[] = "mirroring"; #endif // BUILDFLAG(IS_MAC) @@ -13,7 +13,7 @@ const char kHardwareVideoEncodingSandbox[] = "hardware_video_encoding"; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -104,7 +104,9 @@ const char kGpuSandboxFailuresFatal[] = "gpu-sandbox-f +@@ -95,7 +95,9 @@ const char kGpuSandboxFailuresFatal[] = "gpu-sandbox-f // Meant to be used as a browser-level switch for testing purposes only. const char kNoSandbox[] = "no-sandbox"; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_switches.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_switches.h index 7b40176617d3..592df44c1c2b 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_switches.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_sandbox_policy_switches.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/sandbox/policy/switches.h.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/sandbox/policy/switches.h.orig 2023-07-16 15:47:57 UTC +++ src/3rdparty/chromium/sandbox/policy/switches.h -@@ -57,10 +57,10 @@ SANDBOX_POLICY_EXPORT extern const char kFileUtilSandb +@@ -56,10 +56,10 @@ SANDBOX_POLICY_EXPORT extern const char kWindowsSystem SANDBOX_POLICY_EXPORT extern const char kMirroringSandbox[]; #endif // BUILDFLAG(IS_MAC) @@ -13,7 +13,7 @@ SANDBOX_POLICY_EXPORT extern const char kHardwareVideoEncodingSandbox[]; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -82,7 +82,8 @@ SANDBOX_POLICY_EXPORT extern const char kDisableSetuid +@@ -80,7 +80,8 @@ SANDBOX_POLICY_EXPORT extern const char kDisableSetuid SANDBOX_POLICY_EXPORT extern const char kGpuSandboxAllowSysVShm[]; SANDBOX_POLICY_EXPORT extern const char kGpuSandboxFailuresFatal[]; SANDBOX_POLICY_EXPORT extern const char kNoSandbox[]; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_audio_audio__sandbox__hook__linux.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_audio_audio__sandbox__hook__linux.cc index faadfc71d1b0..b1f86a21a7c0 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_audio_audio__sandbox__hook__linux.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_audio_audio__sandbox__hook__linux.cc @@ -1,10 +1,10 @@ ---- src/3rdparty/chromium/services/audio/audio_sandbox_hook_linux.cc.orig 2022-02-07 13:39:41 UTC +--- src/3rdparty/chromium/services/audio/audio_sandbox_hook_linux.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/services/audio/audio_sandbox_hook_linux.cc @@ -143,6 +143,7 @@ void AddPulseAudioFilePermissions( } #endif -+#if !defined(OS_BSD) ++#if !BUILDFLAG(IS_BSD) std::vector<BrokerFilePermission> GetAudioFilePermissions() { std::vector<BrokerFilePermission> permissions{ BrokerFilePermission::ReadOnly("/dev/urandom"), @@ -17,7 +17,7 @@ } // namespace bool AudioPreSandboxHook(sandbox::policy::SandboxLinux::Options options) { -+#if !defined(OS_BSD) ++#if !BUILDFLAG(IS_BSD) LoadAudioLibraries(); auto* instance = sandbox::policy::SandboxLinux::GetInstance(); instance->StartBrokerProcess(MakeBrokerCommandSet({ diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_audio_audio__sandbox__hook__linux.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_audio_audio__sandbox__hook__linux.h index 14582b531ce2..bbb595ea5940 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_audio_audio__sandbox__hook__linux.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_audio_audio__sandbox__hook__linux.h @@ -1,11 +1,13 @@ ---- src/3rdparty/chromium/services/audio/audio_sandbox_hook_linux.h.orig 2022-02-07 13:39:41 UTC +--- src/3rdparty/chromium/services/audio/audio_sandbox_hook_linux.h.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/services/audio/audio_sandbox_hook_linux.h -@@ -5,7 +5,11 @@ +@@ -5,7 +5,13 @@ #ifndef SERVICES_AUDIO_AUDIO_SANDBOX_HOOK_LINUX_H_ #define SERVICES_AUDIO_AUDIO_SANDBOX_HOOK_LINUX_H_ -+#if defined(OS_BSD) -+#include "sandbox/policy/openbsd/sandbox_openbsd.h" ++#include "build/build_config.h" ++ ++#if BUILDFLAG(IS_BSD) ++#include "sandbox/policy/sandbox.h" +#else #include "sandbox/policy/linux/sandbox_linux.h" +#endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_cert__verifier_cert__verifier__creation.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_cert__verifier_cert__verifier__creation.cc index 133b559de600..992107b54222 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_cert__verifier_cert__verifier__creation.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_cert__verifier_cert__verifier__creation.cc @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/services/cert_verifier/cert_verifier_creation.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/services/cert_verifier/cert_verifier_creation.cc.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/services/cert_verifier/cert_verifier_creation.cc -@@ -12,7 +12,7 @@ - #include "net/cert_net/cert_net_fetcher_url_request.h" +@@ -13,7 +13,7 @@ + #include "net/cert/multi_threaded_cert_verifier.h" #include "net/net_buildflags.h" -#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) @@ -9,16 +9,16 @@ #include "net/cert/cert_verify_proc_builtin.h" #include "net/cert/internal/system_trust_store.h" #endif -@@ -89,7 +89,7 @@ class OldDefaultCertVerifyProcFactory : public net::Ce +@@ -112,7 +112,7 @@ class CertVerifyProcFactoryImpl : public net::CertVeri user_slot_restriction_ ? crypto::ScopedPK11Slot(PK11_ReferenceSlot( user_slot_restriction_.get())) : nullptr)); -#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - verify_proc = net::CreateCertVerifyProcBuiltin( - std::move(cert_net_fetcher), net::CreateSslSystemTrustStore()); - #else -@@ -226,6 +226,7 @@ std::unique_ptr<net::CertVerifierWithUpdatableProc> Cr + return net::CreateCertVerifyProcBuiltin(std::move(cert_net_fetcher), + std::move(crl_set), + net::CreateSslSystemTrustStore()); +@@ -212,6 +212,7 @@ std::unique_ptr<net::CertVerifierWithUpdatableProc> Cr bool IsUsingCertNetFetcher() { #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || \ diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_compute__pressure_cpu__probe.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_compute__pressure_cpu__probe.cc index 401ce80fbf17..34292de6c8f9 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_compute__pressure_cpu__probe.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_compute__pressure_cpu__probe.cc @@ -1,8 +1,8 @@ ---- src/3rdparty/chromium/services/device/compute_pressure/cpu_probe.cc.orig 2022-11-30 08:12:58 UTC +--- src/3rdparty/chromium/services/device/compute_pressure/cpu_probe.cc.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/services/device/compute_pressure/cpu_probe.cc -@@ -29,6 +29,7 @@ std::unique_ptr<CpuProbe> CpuProbe::Create() { +@@ -44,6 +44,7 @@ std::unique_ptr<CpuProbe> CpuProbe::Create( #elif BUILDFLAG(IS_MAC) - return CpuProbeMac::Create(); + return CpuProbeMac::Create(sampling_interval, std::move(sampling_callback)); #else + NOTIMPLEMENTED(); return nullptr; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_geolocation_location__arbitrator.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_geolocation_location__arbitrator.cc index c62c8e44c171..118fd20757cb 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_geolocation_location__arbitrator.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_geolocation_location__arbitrator.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/services/device/geolocation/location_arbitrator.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/services/device/geolocation/location_arbitrator.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/services/device/geolocation/location_arbitrator.cc -@@ -162,7 +162,7 @@ LocationArbitrator::NewSystemLocationProvider() { +@@ -190,7 +190,7 @@ LocationArbitrator::NewSystemLocationProvider() { std::unique_ptr<LocationProvider> LocationArbitrator::NewSystemLocationProvider() { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_hid_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_hid_BUILD.gn index 5d27502e2a44..5ab6b092215f 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_hid_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_hid_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/services/device/hid/BUILD.gn.orig 2022-11-30 08:12:58 UTC +--- src/3rdparty/chromium/services/device/hid/BUILD.gn.orig 2023-07-16 15:47:57 UTC +++ src/3rdparty/chromium/services/device/hid/BUILD.gn -@@ -35,7 +35,26 @@ source_set("hid") { +@@ -34,7 +34,26 @@ source_set("hid") { "//services/device/public/mojom", ] diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_public_cpp_generic__sensor_sensor__reading.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_public_cpp_generic__sensor_sensor__reading.h new file mode 100644 index 000000000000..021f577d67fc --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_public_cpp_generic__sensor_sensor__reading.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/services/device/public/cpp/generic_sensor/sensor_reading.h.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/services/device/public/cpp/generic_sensor/sensor_reading.h +@@ -8,6 +8,8 @@ + #include <stddef.h> + #include <stdint.h> + ++#include <cstdint> ++ + #include <type_traits> + + namespace device { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_public_mojom_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_public_mojom_BUILD.gn index 0699fae497ce..88ef09f6821b 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_public_mojom_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_public_mojom_BUILD.gn @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/services/device/public/mojom/BUILD.gn.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/services/device/public/mojom/BUILD.gn.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/services/device/public/mojom/BUILD.gn -@@ -90,7 +90,7 @@ mojom("device_service") { - cpp_only = true +@@ -97,7 +97,7 @@ mojom("device_service") { + enable_js_fuzzing = false enabled_features = [] - if ((is_linux || is_chromeos) && use_udev) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_serial_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_serial_BUILD.gn new file mode 100644 index 000000000000..9496dbd69359 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_serial_BUILD.gn @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/services/device/serial/BUILD.gn.orig 2022-11-30 08:12:58 UTC ++++ src/3rdparty/chromium/services/device/serial/BUILD.gn +@@ -5,7 +5,7 @@ + import("//build/config/chromeos/ui_mode.gni") + import("//build/config/features.gni") + +-if (is_win || ((is_linux || is_chromeos) && use_udev) || is_mac) { ++if (is_win || ((!is_bsd && is_linux || is_chromeos) && use_udev) || is_mac) { + config("platform_support") { + visibility = [ ":serial" ] + if (is_win) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_serial_serial__device__enumerator.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_serial_serial__device__enumerator.cc new file mode 100644 index 000000000000..4551edb6aefa --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_serial_serial__device__enumerator.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/services/device/serial/serial_device_enumerator.cc.orig 2023-03-09 06:31:50 UTC ++++ src/3rdparty/chromium/services/device/serial/serial_device_enumerator.cc +@@ -12,7 +12,7 @@ + #include "build/build_config.h" + #include "components/device_event_log/device_event_log.h" + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "services/device/serial/serial_device_enumerator_linux.h" + #elif BUILDFLAG(IS_MAC) + #include "services/device/serial/serial_device_enumerator_mac.h" +@@ -25,7 +25,7 @@ namespace device { + // static + std::unique_ptr<SerialDeviceEnumerator> SerialDeviceEnumerator::Create( + scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + return SerialDeviceEnumeratorLinux::Create(); + #elif BUILDFLAG(IS_MAC) + return std::make_unique<SerialDeviceEnumeratorMac>(); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_serial_serial__io__handler__posix.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_serial_serial__io__handler__posix.cc new file mode 100644 index 000000000000..b3316232bea7 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_serial_serial__io__handler__posix.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/services/device/serial/serial_io_handler_posix.cc.orig 2023-03-09 06:31:50 UTC ++++ src/3rdparty/chromium/services/device/serial/serial_io_handler_posix.cc +@@ -68,7 +68,7 @@ bool BitrateToSpeedConstant(int bitrate, speed_t* spee + BITRATE_TO_SPEED_CASE(9600) + BITRATE_TO_SPEED_CASE(19200) + BITRATE_TO_SPEED_CASE(38400) +-#if !BUILDFLAG(IS_MAC) ++#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) + BITRATE_TO_SPEED_CASE(57600) + BITRATE_TO_SPEED_CASE(115200) + BITRATE_TO_SPEED_CASE(230400) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_time__zone__monitor_time__zone__monitor__linux.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_time__zone__monitor_time__zone__monitor__linux.cc index bb7e24c66c52..fce74f22c9bb 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_time__zone__monitor_time__zone__monitor__linux.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_time__zone__monitor_time__zone__monitor__linux.cc @@ -1,10 +1,10 @@ ---- src/3rdparty/chromium/services/device/time_zone_monitor/time_zone_monitor_linux.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/services/device/time_zone_monitor/time_zone_monitor_linux.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/services/device/time_zone_monitor/time_zone_monitor_linux.cc @@ -131,7 +131,11 @@ class TimeZoneMonitorLinuxImpl // false positives are harmless, assuming the false positive rate is // reasonable. const char* const kFilesToWatch[] = { -+#if defined(OS_BSD) ++#if BUILDFLAG(IS_BSD) + "/etc/localtime", +#else "/etc/localtime", "/etc/timezone", "/etc/TZ", diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_usb_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_usb_BUILD.gn index 4911a73de228..0f25748aedb0 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_usb_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_device_usb_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/services/device/usb/BUILD.gn.orig 2022-10-29 13:32:26 UTC +--- src/3rdparty/chromium/services/device/usb/BUILD.gn.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/services/device/usb/BUILD.gn -@@ -103,15 +103,17 @@ static_library("usb") { +@@ -89,15 +89,17 @@ static_library("usb") { deps += [ "//third_party/re2" ] } @@ -27,7 +27,7 @@ # These sources and deps are required for libusb. # TODO(https://crbug.com/1096743) Remove these sources. -@@ -135,6 +137,13 @@ static_library("usb") { +@@ -121,6 +123,13 @@ static_library("usb") { deps += [ "//third_party/libusb" ] } @@ -41,7 +41,7 @@ if (is_linux || is_chromeos) { sources += [ "usb_device_linux.cc", -@@ -152,7 +161,7 @@ static_library("usb") { +@@ -138,7 +147,7 @@ static_library("usb") { deps += [ "//device/udev_linux" ] } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_BUILD.gn index 8b746237f99b..dd715b10d896 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/services/network/BUILD.gn.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/services/network/BUILD.gn.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/services/network/BUILD.gn -@@ -339,7 +339,6 @@ if (is_linux || is_chromeos) { +@@ -393,7 +393,6 @@ if (is_linux || is_chromeos) { ] deps = [ "//base:base", diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_network__context.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_network__context.cc new file mode 100644 index 000000000000..5c50f6899215 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_network__context.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/services/network/network_context.cc.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/services/network/network_context.cc +@@ -447,7 +447,7 @@ NetworkContext::NetworkContextHttpAuthPreferences:: + NetworkContext::NetworkContextHttpAuthPreferences:: + ~NetworkContextHttpAuthPreferences() = default; + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + bool NetworkContext::NetworkContextHttpAuthPreferences::AllowGssapiLibraryLoad() + const { + if (network_service_) { +@@ -2322,7 +2322,7 @@ void NetworkContext::OnHttpAuthDynamicParamsChanged( + http_auth_dynamic_network_service_params->android_negotiate_account_type); + #endif // BUILDFLAG(IS_ANDROID) + +-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + http_auth_merged_preferences_.set_allow_gssapi_library_load( + http_auth_dynamic_network_service_params->allow_gssapi_library_load); + #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_network__context.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_network__context.h new file mode 100644 index 000000000000..ef65756f7dca --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_network__context.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/services/network/network_context.h.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/services/network/network_context.h +@@ -668,7 +668,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext + public: + explicit NetworkContextHttpAuthPreferences(NetworkService* network_service); + ~NetworkContextHttpAuthPreferences() override; +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + bool AllowGssapiLibraryLoad() const override; + #endif // BUILDFLAG(IS_LINUX) + private: diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.cc index ea09515f2353..a7e1ceef53df 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.cc @@ -1,26 +1,37 @@ ---- src/3rdparty/chromium/services/network/network_sandbox_hook_linux.cc.orig 2022-03-19 12:56:15 UTC +--- src/3rdparty/chromium/services/network/network_sandbox_hook_linux.cc.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/services/network/network_sandbox_hook_linux.cc -@@ -26,12 +26,15 @@ sandbox::syscall_broker::BrokerCommandSet GetNetworkBr - }); - } +@@ -14,11 +14,14 @@ + #include "sandbox/policy/features.h" + #include "third_party/abseil-cpp/absl/types/optional.h" -+#if !defined(OS_BSD) - std::vector<BrokerFilePermission> GetNetworkFilePermissions() { - // TODO(tsepez): remove universal permission under filesystem root. - return {BrokerFilePermission::ReadWriteCreateRecursive("/")}; - } ++#if !BUILDFLAG(IS_BSD) + using sandbox::syscall_broker::BrokerFilePermission; + using sandbox::syscall_broker::MakeBrokerCommandSet; +#endif - bool NetworkPreSandboxHook(sandbox::policy::SandboxLinux::Options options) { -+#if !defined(OS_BSD) - auto* instance = sandbox::policy::SandboxLinux::GetInstance(); + namespace network { - instance->StartBrokerProcess( -@@ -39,6 +42,7 @@ bool NetworkPreSandboxHook(sandbox::policy::SandboxLin - sandbox::policy::SandboxLinux::PreSandboxHook(), options); ++#if !BUILDFLAG(IS_BSD) + sandbox::syscall_broker::BrokerCommandSet GetNetworkBrokerCommandSet() { + return MakeBrokerCommandSet({ + sandbox::syscall_broker::COMMAND_ACCESS, +@@ -102,9 +105,11 @@ void LoadNetworkLibraries() { + } + } + #endif // BUILDFLAG(IS_CHROMEOS) ++#endif - instance->EngageNamespaceSandboxIfPossible(); + bool NetworkPreSandboxHook(std::vector<std::string> network_context_parent_dirs, + sandbox::policy::SandboxLinux::Options options) { ++#if !BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_CHROMEOS) + LoadNetworkLibraries(); + #endif +@@ -117,6 +122,7 @@ bool NetworkPreSandboxHook(std::vector<std::string> ne + GetNetworkBrokerCommandSet(), + GetNetworkFilePermissions(std::move(network_context_parent_dirs)), + sandbox::policy::SandboxLinux::PreSandboxHook(), options); +#endif + return true; } - diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.h index ebc2e1117b38..b7f9e169b92b 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/services/network/network_sandbox_hook_linux.h.orig 2022-02-07 13:39:41 UTC +--- src/3rdparty/chromium/services/network/network_sandbox_hook_linux.h.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/services/network/network_sandbox_hook_linux.h -@@ -10,7 +10,11 @@ +@@ -6,7 +6,11 @@ + #define SERVICES_NETWORK_NETWORK_SANDBOX_HOOK_LINUX_H_ + #include "base/component_export.h" - #include "sandbox/linux/syscall_broker/broker_command.h" - #include "sandbox/linux/syscall_broker/broker_file_permission.h" -+#if defined(OS_BSD) -+#include "sandbox/policy/openbsd/sandbox_openbsd.h" ++#if defined(__OpenBSD__) || defined(__FreeBSD__) ++#include "sandbox/policy/sandbox.h" +#else #include "sandbox/policy/linux/sandbox_linux.h" +#endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_network__service.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_network__service.cc index 41b2a15c06f6..0387004ccf70 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_network__service.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_network__service.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/services/network/network_service.cc.orig 2023-10-03 19:49:54 UTC +--- src/3rdparty/chromium/services/network/network_service.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/services/network/network_service.cc -@@ -92,7 +92,7 @@ +@@ -96,7 +96,7 @@ #include "third_party/boringssl/src/include/openssl/cpu.h" #endif @@ -8,4 +8,22 @@ +#if ((BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || BUILDFLAG(IS_BSD)) || \ BUILDFLAG(IS_CHROMEOS_LACROS) - #include "components/os_crypt/key_storage_config_linux.h" + #include "components/os_crypt/sync/key_storage_config_linux.h" +@@ -1003,7 +1003,7 @@ void NetworkService::SetExplicitlyAllowedPorts( + net::SetExplicitlyAllowedPorts(ports); + } + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void NetworkService::SetGssapiLibraryLoadObserver( + mojo::PendingRemote<mojom::GssapiLibraryLoadObserver> + gssapi_library_load_observer) { +@@ -1085,7 +1085,7 @@ NetworkService::CreateHttpAuthHandlerFactory(NetworkCo + ); + } + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void NetworkService::OnBeforeGssapiLibraryLoad() { + if (gssapi_library_load_observer_.is_bound()) { + gssapi_library_load_observer_->OnBeforeGssapiLibraryLoad(); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_network__service.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_network__service.h new file mode 100644 index 000000000000..49004dda8f15 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_network__service.h @@ -0,0 +1,29 @@ +--- src/3rdparty/chromium/services/network/network_service.h.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/services/network/network_service.h +@@ -235,7 +235,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService + mojo::PendingReceiver<mojom::NetworkServiceTest> receiver) override; + void SetFirstPartySets(net::GlobalFirstPartySets sets) override; + void SetExplicitlyAllowedPorts(const std::vector<uint16_t>& ports) override; +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void SetGssapiLibraryLoadObserver( + mojo::PendingRemote<mojom::GssapiLibraryLoadObserver> + gssapi_library_load_observer) override; +@@ -266,7 +266,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService + std::unique_ptr<net::HttpAuthHandlerFactory> CreateHttpAuthHandlerFactory( + NetworkContext* network_context); + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // This is called just before a GSSAPI library may be loaded. + void OnBeforeGssapiLibraryLoad(); + #endif // BUILDFLAG(IS_LINUX) +@@ -507,7 +507,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService + // leaking stale listeners between tests. + std::unique_ptr<net::NetworkChangeNotifier> mock_network_change_notifier_; + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + mojo::Remote<mojom::GssapiLibraryLoadObserver> gssapi_library_load_observer_; + #endif // BUILDFLAG(IS_LINUX) + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_public_cpp_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_public_cpp_BUILD.gn new file mode 100644 index 000000000000..98fa9af485a3 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_public_cpp_BUILD.gn @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/services/network/public/cpp/BUILD.gn.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/services/network/public/cpp/BUILD.gn +@@ -481,7 +481,7 @@ jumbo_component("cpp_base") { + sources += [ "transferable_directory_fuchsia.cc" ] + } + +- if (is_linux) { ++ if (is_linux && !is_bsd) { + sources += [ + "network_interface_change_listener_mojom_traits.cc", + "network_interface_change_listener_mojom_traits.h", diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_public_cpp_features.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_public_cpp_features.cc new file mode 100644 index 000000000000..d2cc30bdf15a --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_public_cpp_features.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/services/network/public/cpp/features.cc.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/services/network/public/cpp/features.cc +@@ -383,7 +383,7 @@ CONSTINIT const base::Feature kOutOfProcessSystemDnsRe + // that can be adequately sandboxed. + CONSTINIT const base::Feature kOutOfProcessSystemDnsResolution( + "OutOfProcessSystemDnsResolution", +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + base::FEATURE_ENABLED_BY_DEFAULT + #else + base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_public_mojom_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_public_mojom_BUILD.gn new file mode 100644 index 000000000000..05b8728422f8 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_public_mojom_BUILD.gn @@ -0,0 +1,25 @@ +--- src/3rdparty/chromium/services/network/public/mojom/BUILD.gn.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/services/network/public/mojom/BUILD.gn +@@ -515,11 +515,11 @@ mojom("url_loader_base") { + } + + enabled_features = [] +- if (is_android || is_chromeos || is_linux) { ++ if (!is_bsd && (is_android || is_chromeos || is_linux)) { + enabled_features += [ "network_change_notifier_in_browser" ] + } + +- if (is_linux) { ++ if (is_linux && !is_bsd) { + # TODO(crbug.com/1431866): Remove this once is_linux in the mojom IDL does + # not include lacros. + enabled_features += [ "use_network_interface_change_listener" ] +@@ -1435,7 +1435,7 @@ mojom("mojom") { + } + } + +- if (is_linux) { ++ if (is_linux && !is_bsd) { + # TODO(crbug.com/1431866): Remove this once is_linux in the mojom IDL does + # not include lacros. + enabled_features += [ "use_network_interface_change_listener" ] diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_shared__dictionary_shared__dictionary__writer__in__memory.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_shared__dictionary_shared__dictionary__writer__in__memory.h new file mode 100644 index 000000000000..be502691c819 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_shared__dictionary_shared__dictionary__writer__in__memory.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/services/network/shared_dictionary/shared_dictionary_writer_in_memory.h.orig 2023-08-17 07:33:31 UTC ++++ src/3rdparty/chromium/services/network/shared_dictionary/shared_dictionary_writer_in_memory.h +@@ -9,6 +9,8 @@ + #include <string> + #include <vector> + ++#include <vector> ++ + #include "base/component_export.h" + #include "base/functional/callback.h" + #include "crypto/secure_hash.h" diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc index 3b7b3cff2c06..13f892b50c1b 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc.orig 2022-11-30 08:12:58 UTC +--- src/3rdparty/chromium/services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc -@@ -54,7 +54,7 @@ uint32_t CalculatePrivateFootprintKb(const mojom::RawO +@@ -53,7 +53,7 @@ uint32_t CalculatePrivateFootprintKb(const mojom::RawO uint32_t shared_resident_kb) { DCHECK(os_dump.platform_private_footprint); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ @@ -9,7 +9,7 @@ uint64_t rss_anon_bytes = os_dump.platform_private_footprint->rss_anon_bytes; uint64_t vm_swap_bytes = os_dump.platform_private_footprint->vm_swap_bytes; return (rss_anon_bytes + vm_swap_bytes) / 1024; -@@ -82,7 +82,7 @@ memory_instrumentation::mojom::OSMemDumpPtr CreatePubl +@@ -81,7 +81,7 @@ memory_instrumentation::mojom::OSMemDumpPtr CreatePubl os_dump->is_peak_rss_resettable = internal_os_dump.is_peak_rss_resettable; os_dump->private_footprint_kb = CalculatePrivateFootprintKb(internal_os_dump, shared_resident_kb); @@ -18,7 +18,7 @@ os_dump->private_footprint_swap_kb = internal_os_dump.platform_private_footprint->vm_swap_bytes / 1024; #endif -@@ -261,7 +261,7 @@ void QueuedRequestDispatcher::SetUpAndDispatch( +@@ -217,7 +217,7 @@ void QueuedRequestDispatcher::SetUpAndDispatch( // On most platforms each process can dump data about their own process // so ask each process to do so Linux is special see below. @@ -27,7 +27,7 @@ request->pending_responses.insert({client_info.pid, ResponseType::kOSDump}); client->RequestOSMemoryDump(request->memory_map_option(), {base::kNullProcessId}, -@@ -276,7 +276,7 @@ void QueuedRequestDispatcher::SetUpAndDispatch( +@@ -232,7 +232,7 @@ void QueuedRequestDispatcher::SetUpAndDispatch( // In some cases, OS stats can only be dumped from a privileged process to // get around to sandboxing/selinux restrictions (see crbug.com/461788). @@ -36,7 +36,7 @@ std::vector<base::ProcessId> pids; mojom::ClientProcess* browser_client = nullptr; base::ProcessId browser_client_pid = base::kNullProcessId; -@@ -322,7 +322,7 @@ void QueuedRequestDispatcher::SetUpAndDispatchVmRegion +@@ -278,7 +278,7 @@ void QueuedRequestDispatcher::SetUpAndDispatchVmRegion const OsCallback& os_callback) { // On Linux, OS stats can only be dumped from a privileged process to // get around to sandboxing/selinux restrictions (see crbug.com/461788). @@ -45,7 +45,7 @@ mojom::ClientProcess* browser_client = nullptr; base::ProcessId browser_client_pid = 0; for (const auto& client_info : clients) { -@@ -372,7 +372,7 @@ QueuedRequestDispatcher::FinalizeVmRegionRequest( +@@ -328,7 +328,7 @@ QueuedRequestDispatcher::FinalizeVmRegionRequest( // each client process provides 1 OS dump, % the case where the client is // disconnected mid dump. OSMemDumpMap& extra_os_dumps = response.second.os_dumps; @@ -54,7 +54,7 @@ for (auto& kv : extra_os_dumps) { auto pid = kv.first == base::kNullProcessId ? original_pid : kv.first; DCHECK(results.find(pid) == results.end()); -@@ -434,7 +434,7 @@ void QueuedRequestDispatcher::Finalize(QueuedRequest* +@@ -389,7 +389,7 @@ void QueuedRequestDispatcher::Finalize(QueuedRequest* // crash). In the latter case (OS_LINUX) we expect the full map to come // from the browser process response. OSMemDumpMap& extra_os_dumps = response.second.os_dumps; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_BUILD.gn index 7a5ee75672b2..04cda496465e 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/services/resource_coordinator/public/cpp/memory_instrumentation/BUILD.gn.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/services/resource_coordinator/public/cpp/memory_instrumentation/BUILD.gn.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/services/resource_coordinator/public/cpp/memory_instrumentation/BUILD.gn -@@ -33,8 +33,12 @@ component("memory_instrumentation") { +@@ -29,8 +29,12 @@ component("memory_instrumentation") { sources += [ "os_metrics_win.cc" ] } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_tracing_public_cpp_stack__sampling_tracing__sampler__profiler.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_tracing_public_cpp_stack__sampling_tracing__sampler__profiler.cc index 98424621078e..da4d13bb211d 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_tracing_public_cpp_stack__sampling_tracing__sampler__profiler.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_tracing_public_cpp_stack__sampling_tracing__sampler__profiler.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.cc @@ -39,7 +39,7 @@ #include "third_party/perfetto/protos/perfetto/trace/track_event/process_descriptor.pbzero.h" diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_video__capture_video__capture__service__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_video__capture_video__capture__service__impl.cc new file mode 100644 index 000000000000..75a613c10a31 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_video__capture_video__capture__service__impl.cc @@ -0,0 +1,38 @@ +--- src/3rdparty/chromium/services/video_capture/video_capture_service_impl.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/services/video_capture/video_capture_service_impl.cc +@@ -40,7 +40,7 @@ + #include "services/video_capture/lacros/device_factory_adapter_lacros.h" + #endif // BUILDFLAG(IS_CHROMEOS_LACROS) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #include "media/capture/capture_switches.h" + #include "media/capture/video/video_capture_gpu_channel_host.h" + #include "services/viz/public/cpp/gpu/context_provider_command_buffer.h" +@@ -107,7 +107,7 @@ class VideoCaptureServiceImpl::GpuDependenciesContext + this}; + }; + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + // Intended usage of this class is to create viz::Gpu in utility process and + // connect to viz::GpuClient of browser process, which will call to Gpu service. + // Also, this class holds the viz::ContextProvider to listen and monitor Gpu +@@ -288,7 +288,7 @@ void VideoCaptureServiceImpl::LazyInitializeGpuDepende + if (!gpu_dependencies_context_) + gpu_dependencies_context_ = std::make_unique<GpuDependenciesContext>(); + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + if (switches::IsVideoCaptureUseGpuMemoryBufferEnabled()) { + if (!viz_gpu_context_provider_) { + viz_gpu_context_provider_ = +@@ -384,7 +384,7 @@ void VideoCaptureServiceImpl::OnGpuInfoUpdate(const CH + } + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + void VideoCaptureServiceImpl::SetVizGpu(std::unique_ptr<viz::Gpu> viz_gpu) { + viz_gpu_ = std::move(viz_gpu); + } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_video__capture_video__capture__service__impl.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_video__capture_video__capture__service__impl.h new file mode 100644 index 000000000000..acb5813fd8f4 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_video__capture_video__capture__service__impl.h @@ -0,0 +1,29 @@ +--- src/3rdparty/chromium/services/video_capture/video_capture_service_impl.h.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/services/video_capture/video_capture_service_impl.h +@@ -24,7 +24,7 @@ + #include "services/video_capture/ash/video_capture_device_factory_ash.h" + #endif // BUILDFLAG(IS_CHROMEOS_ASH) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #include "services/viz/public/cpp/gpu/gpu.h" + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) + +@@ -62,7 +62,7 @@ class VideoCaptureServiceImpl : public mojom::VideoCap + #if BUILDFLAG(IS_WIN) + void OnGpuInfoUpdate(const CHROME_LUID& luid) override; + #endif +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + void SetVizGpu(std::unique_ptr<viz::Gpu> viz_gpu); + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) + private: +@@ -87,7 +87,7 @@ class VideoCaptureServiceImpl : public mojom::VideoCap + factory_receivers_ash_; + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + class VizGpuContextProvider; + std::unique_ptr<VizGpuContextProvider> viz_gpu_context_provider_; + std::unique_ptr<viz::Gpu> viz_gpu_; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_skia_ext_SkMemory__new__handler.cpp b/www/qt6-webengine/files/patch-src_3rdparty_chromium_skia_ext_SkMemory__new__handler.cpp index 55bfcd8fe428..151e9652875e 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_skia_ext_SkMemory__new__handler.cpp +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_skia_ext_SkMemory__new__handler.cpp @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/skia/ext/SkMemory_new_handler.cpp.orig 2022-03-25 21:59:56 UTC +--- src/3rdparty/chromium/skia/ext/SkMemory_new_handler.cpp.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/skia/ext/SkMemory_new_handler.cpp -@@ -79,7 +79,7 @@ static void* malloc_nothrow(size_t size) { +@@ -86,7 +86,7 @@ static void* malloc_nothrow(size_t size) { // TODO(b.kelemen): we should always use UncheckedMalloc but currently it // doesn't work as intended everywhere. void* result; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_skia_ext_skcolorspace__trfn.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_skia_ext_skcolorspace__trfn.cc new file mode 100644 index 000000000000..cb22466885c4 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_skia_ext_skcolorspace__trfn.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/skia/ext/skcolorspace_trfn.cc.orig 2023-08-17 07:33:31 UTC ++++ src/3rdparty/chromium/skia/ext/skcolorspace_trfn.cc +@@ -2,6 +2,8 @@ + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. + ++#include <cmath> ++ + #include "skia/ext/skcolorspace_trfn.h" + + #include <cmath> diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_base_config.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_base_config.h index d0ca2bd9ca3f..f34a7506e942 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_base_config.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_base_config.h @@ -1,21 +1,21 @@ ---- src/3rdparty/chromium/third_party/abseil-cpp/absl/base/config.h.orig 2022-11-30 08:12:58 UTC +--- src/3rdparty/chromium/third_party/abseil-cpp/absl/base/config.h.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/third_party/abseil-cpp/absl/base/config.h -@@ -460,7 +460,8 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != - // POSIX.1-2001. +@@ -450,7 +450,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != #ifdef ABSL_HAVE_SCHED_YIELD #error ABSL_HAVE_SCHED_YIELD cannot be directly set --#elif defined(__linux__) || defined(__ros__) || defined(__native_client__) -+#elif defined(__linux__) || defined(__ros__) || defined(__native_client__) || \ -+ defined(__OpenBSD__) || defined(__FreeBSD__) + #elif defined(__linux__) || defined(__ros__) || defined(__native_client__) || \ +- defined(__VXWORKS__) ++ defined(__VXWORKS__) || defined(__OpenBSD__) || defined(__FreeBSD__) #define ABSL_HAVE_SCHED_YIELD 1 #endif -@@ -475,7 +476,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != +@@ -465,7 +465,8 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != // platforms. #ifdef ABSL_HAVE_SEMAPHORE_H #error ABSL_HAVE_SEMAPHORE_H cannot be directly set --#elif defined(__linux__) || defined(__ros__) -+#elif defined(__linux__) || defined(__ros__) || defined(__OpenBSD__) || defined(__FreeBSD__) +-#elif defined(__linux__) || defined(__ros__) || defined(__VXWORKS__) ++#elif defined(__linux__) || defined(__ros__) || defined(__VXWORKS__) || \ ++ defined(__OpenBSD__) || defined(__FreeBSD__) #define ABSL_HAVE_SEMAPHORE_H 1 #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_base_internal_raw__logging.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_base_internal_raw__logging.cc index ade86489b072..a00606557592 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_base_internal_raw__logging.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_base_internal_raw__logging.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/abseil-cpp/absl/base/internal/raw_logging.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/third_party/abseil-cpp/absl/base/internal/raw_logging.cc.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/third_party/abseil-cpp/absl/base/internal/raw_logging.cc -@@ -52,10 +52,12 @@ +@@ -56,10 +56,12 @@ // ABSL_HAVE_SYSCALL_WRITE is defined when the platform provides the syscall // syscall(SYS_write, /*int*/ fd, /*char* */ buf, /*size_t*/ len); // for low level operations that want to avoid libc. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_base_internal_sysinfo.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_base_internal_sysinfo.cc index 8b5c784ee738..b8e4d18eabb0 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_base_internal_sysinfo.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_base_internal_sysinfo.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/abseil-cpp/absl/base/internal/sysinfo.cc.orig 2022-11-30 08:12:58 UTC +--- src/3rdparty/chromium/third_party/abseil-cpp/absl/base/internal/sysinfo.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/third_party/abseil-cpp/absl/base/internal/sysinfo.cc -@@ -30,7 +30,7 @@ +@@ -30,10 +30,14 @@ #include <sys/syscall.h> #endif @@ -9,7 +9,30 @@ #include <sys/sysctl.h> #endif -@@ -310,9 +310,11 @@ static double GetNominalCPUFrequency() { ++#if defined(__FreeBSD__) ++#include <pthread_np.h> ++#endif ++ + #if defined(__myriad2__) + #include <rtems.h> + #endif +@@ -186,6 +190,7 @@ static double GetNominalCPUFrequency() { + + #else + ++#if !defined(__OpenBSD__) && !defined(__FreeBSD__) + // Helper function for reading a long from a file. Returns true if successful + // and the memory location pointed to by value is set to the value read. + static bool ReadLongFromFile(const char *file, long *value) { +@@ -218,6 +223,7 @@ static bool ReadLongFromFile(const char *file, long *v + } + return ret; + } ++#endif + + #if defined(ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY) + +@@ -317,9 +323,11 @@ static double GetNominalCPUFrequency() { // a new mode (turbo mode). Essentially, those frequencies cannot // always be relied upon. The same reasons apply to /proc/cpuinfo as // well. @@ -21,3 +44,35 @@ #if defined(ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY) // On these platforms, the TSC frequency is the nominal CPU +@@ -338,10 +346,12 @@ static double GetNominalCPUFrequency() { + // If CPU scaling is in effect, we want to use the *maximum* + // frequency, not whatever CPU speed some random processor happens + // to be using now. ++#if !defined(__OpenBSD__) && !defined(__FreeBSD__) // pledge violation + if (ReadLongFromFile("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq", + &freq)) { + return freq * 1e3; // Value is kHz. + } ++#endif + + return 1.0; + #endif // !ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY +@@ -439,6 +449,18 @@ pid_t GetTID() { + static_assert(sizeof(pid_t) == sizeof(thread), + "In NaCL int expected to be the same size as a pointer"); + return reinterpret_cast<pid_t>(thread); ++} ++ ++#elif defined(__OpenBSD__) ++ ++pid_t GetTID() { ++ return getthrid(); ++} ++ ++#elif defined(__FreeBSD__) ++ ++pid_t GetTID() { ++ return pthread_getthreadid_np(); + } + + #else diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.h index 44235736ba9a..d375d14c6dbe 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.h.orig 2022-08-31 12:19:35 UTC +--- src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.h.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.h -@@ -33,7 +33,7 @@ - +@@ -34,7 +34,7 @@ #if defined(__ELF__) && !defined(__OpenBSD__) && !defined(__QNX__) && \ !defined(__native_client__) && !defined(__asmjs__) && \ -- !defined(__wasm__) && !defined(__HAIKU__) -+ !defined(__wasm__) && !defined(__HAIKU__) && !defined(__FreeBSD__) + !defined(__wasm__) && !defined(__HAIKU__) && !defined(__sun) && \ +- !defined(__VXWORKS__) && !defined(__hexagon__) ++ !defined(__VXWORKS__) && !defined(__hexagon__) && !defined(__FreeBSD__) #define ABSL_HAVE_ELF_MEM_IMAGE 1 #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_time_internal_cctz_src_time__zone__format.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_time_internal_cctz_src_time__zone__format.cc deleted file mode 100644 index 4db0493638ae..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_time_internal_cctz_src_time__zone__format.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc.orig 2022-09-24 10:57:32 UTC -+++ src/3rdparty/chromium/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc -@@ -19,7 +19,7 @@ - #endif - - #if defined(HAS_STRPTIME) && HAS_STRPTIME --#if !defined(_XOPEN_SOURCE) && !defined(__OpenBSD__) -+#if !defined(_XOPEN_SOURCE) && !defined(__OpenBSD__) && !defined(__FreeBSD__) - #define _XOPEN_SOURCE // Definedness suffices for strptime. - #endif - #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_BUILD.gn index a611e87d0332..8829526ae674 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/angle/BUILD.gn.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/third_party/angle/BUILD.gn.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/third_party/angle/BUILD.gn -@@ -280,7 +280,6 @@ config("extra_warnings") { +@@ -325,7 +325,6 @@ config("extra_warnings") { "-Wtautological-type-limit-compare", "-Wundefined-reinterpret-cast", "-Wunneeded-internal-declaration", @@ -8,7 +8,7 @@ "-Wsuggest-destructor-override", "-Wsuggest-override", -@@ -451,7 +450,7 @@ template("angle_common_lib") { +@@ -496,7 +495,7 @@ template("angle_common_lib") { all_dependent_configs = [ ":angle_disable_pool_alloc" ] } @@ -17,7 +17,7 @@ libs = [ "dl" ] } -@@ -606,6 +605,9 @@ angle_static_library("angle_gpu_info_util") { +@@ -651,6 +650,9 @@ angle_static_library("angle_gpu_info_util") { "Xi", "Xext", ] diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_common_platform__helpers.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_common_platform__helpers.h new file mode 100644 index 000000000000..ba4eb7f74eee --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_common_platform__helpers.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/angle/src/common/platform_helpers.h.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/third_party/angle/src/common/platform_helpers.h +@@ -62,7 +62,7 @@ inline constexpr bool IsIOS() + + inline constexpr bool IsLinux() + { +-#if defined(ANGLE_PLATFORM_LINUX) ++#if defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) + return true; + #else + return false; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_common_vulkan_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_common_vulkan_BUILD.gn deleted file mode 100644 index 19c3b7997a88..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_common_vulkan_BUILD.gn +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/third_party/angle/src/common/vulkan/BUILD.gn.orig 2023-03-28 19:45:02 UTC -+++ src/3rdparty/chromium/third_party/angle/src/common/vulkan/BUILD.gn -@@ -33,7 +33,7 @@ if (angle_enable_vulkan || angle_build_vulkan_system_i - if (angle_shared_libvulkan) { - defines = [ "ANGLE_SHARED_LIBVULKAN=1" ] - } -- if (angle_use_wayland) { -+ if (angle_use_wayland && !use_system_libwayland) { - include_dirs = [ "$wayland_dir/src" ] - } - configs = [ "$angle_root:angle_vulkan_wayland_config" ] diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__internal.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__internal.h index 74ed5951c3cb..721f6c16dbde 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__internal.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__internal.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/angle/src/gpu_info_util/SystemInfo_internal.h.orig 2022-02-23 19:25:59 UTC +--- src/3rdparty/chromium/third_party/angle/src/gpu_info_util/SystemInfo_internal.h.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/third_party/angle/src/gpu_info_util/SystemInfo_internal.h -@@ -14,6 +14,13 @@ +@@ -15,6 +15,13 @@ namespace angle { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_Display.cpp b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_Display.cpp index 67f708c8ae60..8d52ddf1e027 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_Display.cpp +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_Display.cpp @@ -1,16 +1,16 @@ ---- src/3rdparty/chromium/third_party/angle/src/libANGLE/Display.cpp.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/third_party/angle/src/libANGLE/Display.cpp.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/third_party/angle/src/libANGLE/Display.cpp -@@ -55,7 +55,7 @@ - # include "libANGLE/renderer/gl/wgl/DisplayWGL.h" - # elif defined(ANGLE_PLATFORM_MACOS) || defined(ANGLE_PLATFORM_IOS) - # include "libANGLE/renderer/gl/apple/DisplayApple_api.h" +@@ -60,7 +60,7 @@ + # include "libANGLE/renderer/gl/cgl/DisplayCGL.h" + # elif ANGLE_ENABLE_EAGL + # include "libANGLE/renderer/gl/eagl/DisplayEAGL.h" -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) # include "libANGLE/renderer/gl/egl/DisplayEGL.h" # if defined(ANGLE_USE_X11) # include "libANGLE/renderer/gl/glx/DisplayGLX.h" -@@ -346,7 +346,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di - impl = rx::CreateDisplayCGLOrEAGL(state); +@@ -411,7 +411,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di + impl = new rx::DisplayEAGL(state); break; -# elif defined(ANGLE_PLATFORM_LINUX) @@ -18,16 +18,16 @@ # if defined(ANGLE_USE_GBM) if (platformType == 0) { -@@ -387,7 +387,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di +@@ -457,7 +457,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di #if defined(ANGLE_ENABLE_OPENGL) # if defined(ANGLE_PLATFORM_WINDOWS) impl = new rx::DisplayWGL(state); -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) # if defined(ANGLE_USE_GBM) - if (platformType == 0 || - platformType == EGL_PLATFORM_VULKAN_DISPLAY_MODE_HEADLESS_ANGLE) -@@ -436,7 +436,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di + if (platformType == 0) + { +@@ -508,7 +508,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di impl = rx::CreateVulkanWin32Display(state); } break; @@ -36,7 +36,7 @@ # if defined(ANGLE_USE_GBM) if (platformType == EGL_PLATFORM_GBM_KHR && rx::IsVulkanGbmDisplayAvailable()) { -@@ -2046,7 +2046,7 @@ static ClientExtensions GenerateClientExtensions() +@@ -2148,7 +2148,7 @@ static ClientExtensions GenerateClientExtensions() extensions.x11Visual = true; #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_formatutils.cpp b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_formatutils.cpp index d4a68f0b4eed..e59e83967111 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_formatutils.cpp +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_formatutils.cpp @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/angle/src/libANGLE/formatutils.cpp.orig 2023-04-20 13:16:39 UTC +--- src/3rdparty/chromium/third_party/angle/src/libANGLE/formatutils.cpp.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/third_party/angle/src/libANGLE/formatutils.cpp -@@ -1486,7 +1486,7 @@ static InternalFormatInfoMap BuildInternalFormatInfoMa +@@ -1475,7 +1475,7 @@ static InternalFormatInfoMap BuildInternalFormatInfoMa AddYUVFormat(&map, GL_G8_B8R8_2PLANE_420_UNORM_ANGLE, true, 8, 8, 8, 0, 0, GL_G8_B8R8_2PLANE_420_UNORM_ANGLE, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, RequireExt<&Extensions::yuvInternalFormatANGLE>, RequireExt<&Extensions::yuvInternalFormatANGLE>, RequireExt<&Extensions::yuvInternalFormatANGLE>, NeverSupported, NeverSupported); AddYUVFormat(&map, GL_G8_B8_R8_3PLANE_420_UNORM_ANGLE, true, 8, 8, 8, 0, 0, GL_G8_B8_R8_3PLANE_420_UNORM_ANGLE, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, RequireExt<&Extensions::yuvInternalFormatANGLE>, RequireExt<&Extensions::yuvInternalFormatANGLE>, RequireExt<&Extensions::yuvInternalFormatANGLE>, NeverSupported, NeverSupported); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_driver__utils.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_driver__utils.h deleted file mode 100644 index c83f0e5a4fb5..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_driver__utils.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/driver_utils.h.orig 2023-03-09 06:31:50 UTC -+++ src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/driver_utils.h -@@ -206,7 +206,7 @@ inline bool IsWindows() - - inline bool IsLinux() - { --#if defined(ANGLE_PLATFORM_LINUX) -+#if defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) - return true; - #else - return false; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_third__party_volk_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_third__party_volk_BUILD.gn deleted file mode 100644 index 8882c027c537..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_third__party_volk_BUILD.gn +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/third_party/angle/src/third_party/volk/BUILD.gn.orig 2023-03-28 19:45:02 UTC -+++ src/3rdparty/chromium/third_party/angle/src/third_party/volk/BUILD.gn -@@ -20,7 +20,7 @@ source_set("volk") { - public_configs = [ ":volk_config" ] - configs += [ "$angle_root:angle_no_cfi_icall" ] - public_deps = [ "$angle_vulkan_headers_dir:vulkan_headers" ] -- if (angle_use_wayland) { -+ if (angle_use_wayland && !use_system_libwayland) { - include_dirs = [ "$wayland_dir/src" ] - } - } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_util_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_util_BUILD.gn index bdcc8380c778..89e05cbb806f 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_util_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_angle_util_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/angle/util/BUILD.gn.orig 2023-02-08 09:03:45 UTC +--- src/3rdparty/chromium/third_party/angle/util/BUILD.gn.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/third_party/angle/util/BUILD.gn -@@ -292,7 +292,7 @@ foreach(is_shared_library, +@@ -311,7 +311,7 @@ foreach(is_shared_library, ] libs = [] diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_common_privacy__budget_active__sampling.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_common_privacy__budget_active__sampling.cc deleted file mode 100644 index 2498eff5ae1c..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_common_privacy__budget_active__sampling.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/third_party/blink/common/privacy_budget/active_sampling.cc.orig 2022-08-31 12:19:35 UTC -+++ src/3rdparty/chromium/third_party/blink/common/privacy_budget/active_sampling.cc -@@ -24,7 +24,7 @@ namespace blink { - bool IdentifiabilityActiveSampler::IsFontFamilyAvailable(const char* family, - SkFontMgr* fm) { - base::ScopedAllowBaseSyncPrimitives allow; --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - return !!fm->legacyMakeTypeface(family, SkFontStyle()); - #else - sk_sp<SkFontStyleSet> set(fm->matchFamily(family)); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_common_renderer__preferences_renderer__preferences__mojom__traits.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_common_renderer__preferences_renderer__preferences__mojom__traits.cc index 633d3d8166d0..9e33b07c62d0 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_common_renderer__preferences_renderer__preferences__mojom__traits.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_common_renderer__preferences_renderer__preferences__mojom__traits.cc @@ -1,8 +1,8 @@ ---- src/3rdparty/chromium/third_party/blink/common/renderer_preferences/renderer_preferences_mojom_traits.cc.orig 2022-03-25 21:59:56 UTC +--- src/3rdparty/chromium/third_party/blink/common/renderer_preferences/renderer_preferences_mojom_traits.cc.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/third_party/blink/common/renderer_preferences/renderer_preferences_mojom_traits.cc -@@ -64,7 +64,7 @@ bool StructTraits<blink::mojom::RendererPreferencesDat - if (!data.ReadAcceptLanguages(&out->accept_languages)) - return false; +@@ -66,7 +66,7 @@ bool StructTraits<blink::mojom::RendererPreferencesDat + + out->send_subresource_notification = data.send_subresource_notification(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_public_common_renderer__preferences_renderer__preferences.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_public_common_renderer__preferences_renderer__preferences.h index db513ac3f494..32cad4b736ee 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_public_common_renderer__preferences_renderer__preferences.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_public_common_renderer__preferences_renderer__preferences.h @@ -1,9 +1,9 @@ ---- src/3rdparty/chromium/third_party/blink/public/common/renderer_preferences/renderer_preferences.h.orig 2022-03-25 21:59:56 UTC +--- src/3rdparty/chromium/third_party/blink/public/common/renderer_preferences/renderer_preferences.h.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/third_party/blink/public/common/renderer_preferences/renderer_preferences.h -@@ -50,7 +50,7 @@ struct BLINK_COMMON_EXPORT RendererPreferences { - bool webrtc_allow_legacy_tls_protocols{false}; +@@ -64,7 +64,7 @@ struct BLINK_COMMON_EXPORT RendererPreferences { UserAgentOverride user_agent_override; std::string accept_languages; + bool send_subresource_notification{false}; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::string system_font_family_name; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h index e4805d43e10b..67169fd8511f 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h.orig 2022-03-25 21:59:56 UTC +--- src/3rdparty/chromium/third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h -@@ -157,7 +157,7 @@ struct BLINK_COMMON_EXPORT - return data.accept_languages; +@@ -162,7 +162,7 @@ struct BLINK_COMMON_EXPORT + return data.send_subresource_notification; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_public_platform_platform.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_public_platform_platform.h index 3b10091dc9cc..23a41de0d93b 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_public_platform_platform.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_public_platform_platform.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/blink/public/platform/platform.h.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/third_party/blink/public/platform/platform.h.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/third_party/blink/public/platform/platform.h -@@ -349,7 +349,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -338,7 +338,7 @@ class BLINK_PLATFORM_EXPORT Platform { return nullptr; } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_blink__initializer.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_blink__initializer.cc index 6bca1da72ea0..ac6d110766df 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_blink__initializer.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_blink__initializer.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/controller/blink_initializer.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/controller/blink_initializer.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/controller/blink_initializer.cc -@@ -74,12 +74,12 @@ +@@ -78,12 +78,12 @@ #include "third_party/blink/renderer/controller/private_memory_footprint_provider.h" #endif @@ -10,12 +10,12 @@ #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ -- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "third_party/blink/renderer/controller/highest_pmf_reporter.h" #include "third_party/blink/renderer/controller/user_level_memory_pressure_signal_generator.h" #endif -@@ -222,7 +222,7 @@ void BlinkInitializer::RegisterInterfaces(mojo::Binder +@@ -227,7 +227,7 @@ void BlinkInitializer::RegisterInterfaces(mojo::Binder main_thread_task_runner); #endif @@ -24,12 +24,12 @@ binders.Add<mojom::blink::MemoryUsageMonitorLinux>( ConvertToBaseRepeatingCallback( CrossThreadBindRepeating(&MemoryUsageMonitorPosix::Bind)), -@@ -255,7 +255,7 @@ void BlinkInitializer::RegisterMemoryWatchers() { +@@ -266,7 +266,7 @@ void BlinkInitializer::RegisterMemoryWatchers(Platform #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ -- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - // Initialize UserLevelMemoryPressureSignalGenerator so it starts monitoring. - UserLevelMemoryPressureSignalGenerator::Initialize(main_thread_task_runner); - +- BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + // Start reporting the highest private memory footprint after the first + // navigation. + HighestPmfReporter::Initialize(main_thread_task_runner); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_memory__usage__monitor__posix.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_memory__usage__monitor__posix.cc index 5feca7d63c91..4fcc364618f1 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_memory__usage__monitor__posix.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_memory__usage__monitor__posix.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/controller/memory_usage_monitor_posix.cc.orig 2022-06-17 14:20:10 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/controller/memory_usage_monitor_posix.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/controller/memory_usage_monitor_posix.cc -@@ -129,15 +129,17 @@ void MemoryUsageMonitorPosix::ResetFileDescriptors() { +@@ -128,15 +128,17 @@ void MemoryUsageMonitorPosix::ResetFileDescriptors() { void MemoryUsageMonitorPosix::SetProcFiles(base::File statm_file, base::File status_file) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_exported_web__view__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_exported_web__view__impl.cc index 3504310a3820..9687f1a1ba46 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_exported_web__view__impl.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_exported_web__view__impl.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/core/exported/web_view_impl.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/core/exported/web_view_impl.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -408,7 +408,7 @@ SkFontHinting RendererPreferencesToSkiaHinting( +@@ -421,7 +421,7 @@ SkFontHinting RendererPreferencesToSkiaHinting( const blink::RendererPreferences& prefs) { // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. @@ -9,7 +9,7 @@ if (!prefs.should_antialias_text) { // When anti-aliasing is off, GTK maps all non-zero hinting settings to // 'Normal' hinting so we do the same. Otherwise, folks who have 'Slight' -@@ -3344,7 +3344,7 @@ void WebViewImpl::UpdateFontRenderingFromRendererPrefs +@@ -3323,7 +3323,7 @@ void WebViewImpl::UpdateFontRenderingFromRendererPrefs renderer_preferences_.use_subpixel_positioning); // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_frame_web__frame__test.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_frame_web__frame__test.cc index fb2c5dc7e1f3..7f9ab08a9e53 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_frame_web__frame__test.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_frame_web__frame__test.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/core/frame/web_frame_test.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/core/frame/web_frame_test.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/core/frame/web_frame_test.cc -@@ -6439,7 +6439,7 @@ TEST_F(WebFrameTest, DISABLED_PositionForPointTest) { +@@ -6456,7 +6456,7 @@ TEST_F(WebFrameTest, DISABLED_PositionForPointTest) { } #if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ @@ -9,7 +9,7 @@ // TODO(crbug.com/1090246): Fix these tests on Fuchsia and re-enable. // TODO(crbug.com/1317375): Build these tests on all platforms. #define MAYBE_SelectRangeStaysHorizontallyAlignedWhenMoved \ -@@ -6847,7 +6847,7 @@ TEST_F(CompositedSelectionBoundsTest, LargeSelectionSc +@@ -6865,7 +6865,7 @@ TEST_F(CompositedSelectionBoundsTest, LargeSelectionSc TEST_F(CompositedSelectionBoundsTest, LargeSelectionNoScroll) { RunTest("composited_selection_bounds_large_selection_noscroll.html"); } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc index 911e3e5bdf4d..f11b44ff51f0 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc.orig 2022-05-19 14:06:27 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc -@@ -45,7 +45,7 @@ constexpr base::TimeDelta kEncodeRowSlackBeforeDeadlin +@@ -48,7 +48,7 @@ constexpr base::TimeDelta kEncodeRowSlackBeforeDeadlin /* The value is based on user statistics on Nov 2017. */ #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_inspector_inspector__memory__agent.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_inspector_inspector__memory__agent.cc index 400c6dcc4bf6..304806dd92eb 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_inspector_inspector__memory__agent.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_inspector_inspector__memory__agent.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/core/inspector/inspector_memory_agent.cc.orig 2022-06-17 14:20:10 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/core/inspector/inspector_memory_agent.cc.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/core/inspector/inspector_memory_agent.cc -@@ -190,7 +190,7 @@ InspectorMemoryAgent::GetSamplingProfileById(uint32_t +@@ -189,7 +189,7 @@ InspectorMemoryAgent::GetSamplingProfileById(uint32_t Vector<String> InspectorMemoryAgent::Symbolize( const WebVector<void*>& addresses) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_layout_layout__view.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_layout_ng_layout__ng__view.cc index bc56f72530fd..f850372415f1 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_layout_layout__view.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_layout_ng_layout__ng__view.cc @@ -1,17 +1,17 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/core/layout/layout_view.cc.orig 2023-04-05 11:05:06 UTC -+++ src/3rdparty/chromium/third_party/blink/renderer/core/layout/layout_view.cc -@@ -67,7 +67,7 @@ +--- src/3rdparty/chromium/third_party/blink/renderer/core/layout/ng/layout_ng_view.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/third_party/blink/renderer/core/layout/ng/layout_ng_view.cc +@@ -15,7 +15,7 @@ + #include "third_party/blink/renderer/core/svg/svg_document_extensions.h" #include "ui/display/screen_info.h" - #include "ui/gfx/geometry/quad_f.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "third_party/blink/renderer/platform/fonts/font_cache.h" #endif -@@ -365,7 +365,7 @@ void LayoutView::UpdateLayout() { - DCHECK(!layout_state_); - LayoutState root_layout_state(*this); +@@ -53,7 +53,7 @@ void LayoutNGView::UpdateLayout() { + fragmentation_context_.Clear(); + } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_paint_paint__layer.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_paint_paint__layer.cc index c621e73fe9ec..fba7e07799ee 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_paint_paint__layer.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_paint_paint__layer.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/core/paint/paint_layer.cc.orig 2023-02-08 09:03:45 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/core/paint/paint_layer.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/core/paint/paint_layer.cc -@@ -114,7 +114,7 @@ namespace blink { +@@ -118,7 +118,7 @@ namespace blink { namespace { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc index 9b232d22a2f2..66cc9a32e6e7 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc.orig 2022-10-24 13:33:33 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc @@ -155,7 +155,7 @@ bool ScrollbarThemeAura::SupportsDragSnapBack() const // is true for at least GTK and QT apps). @@ -9,7 +9,7 @@ return false; #else return true; -@@ -329,7 +329,7 @@ bool ScrollbarThemeAura::ShouldCenterOnThumb(const Scr +@@ -355,7 +355,7 @@ bool ScrollbarThemeAura::ShouldCenterOnThumb(const Scr const WebMouseEvent& event) { // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_canvas_canvas2d_canvas__style.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_canvas_canvas2d_canvas__style.cc new file mode 100644 index 000000000000..faf4d28f3312 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_canvas_canvas2d_canvas__style.cc @@ -0,0 +1,12 @@ +--- src/3rdparty/chromium/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc +@@ -76,6 +76,9 @@ void CanvasStyle::ApplyToFlags(cc::PaintFlags& flags, + + void CanvasStyle::ApplyToFlags(cc::PaintFlags& flags, + float global_alpha) const { ++#if defined(__clang__) && (__clang_major__ < 16) ++ SkColor4f custom_color = SkColor4f{0.0f, 0.0f, 0.0f, global_alpha}; ++#endif + switch (type_) { + case kColor: + ApplyColorToFlags(flags, global_alpha); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc index 96842118dc7d..0a7db99120cf 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc @@ -1,9 +1,9 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager_test.cc.orig 2022-11-30 08:12:58 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager_test.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager_test.cc -@@ -722,7 +722,7 @@ TEST_F(AudioRendererMixerManagerTest, MixerParamsLaten +@@ -724,7 +724,7 @@ TEST_F(AudioRendererMixerManagerTest, MixerParamsLaten mixer->get_output_params_for_testing().sample_rate()); - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_APPLE) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Use 10 ms buffer (441 frames per buffer). diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_ml_webnn_features.gni b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_ml_webnn_features.gni index f80bb2c5bc70..3486073555fc 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_ml_webnn_features.gni +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_ml_webnn_features.gni @@ -1,9 +1,11 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/modules/ml/webnn/features.gni.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/modules/ml/webnn/features.gni.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/modules/ml/webnn/features.gni -@@ -7,5 +7,5 @@ declare_args() { +@@ -7,7 +7,7 @@ declare_args() { # This enables building WebNN with XNNPACK. Currently only available for - # Windows on x64 or x86. + # Windows and Linux on x64 or x86. build_webnn_with_xnnpack = -- is_win && (current_cpu == "x64" || current_cpu == "x86") +- (is_linux || is_win) && (current_cpu == "x64" || current_cpu == "x86") + !is_bsd && (is_win && (current_cpu == "x64" || current_cpu == "x86")) - } + + # This build flag enables WebNN on ChromeOS platform to access hardware + # acceleration by using ModelLoader mojo interface. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_ml_webnn_ml__graph__xnnpack.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_ml_webnn_ml__graph__xnnpack.cc index 1bad3278c937..b232a528b725 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_ml_webnn_ml__graph__xnnpack.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_ml_webnn_ml__graph__xnnpack.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/modules/ml/webnn/ml_graph_xnnpack.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/modules/ml/webnn/ml_graph_xnnpack.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/modules/ml/webnn/ml_graph_xnnpack.cc -@@ -177,7 +177,7 @@ class SharedXnnpackContext : public ThreadSafeRefCount +@@ -191,7 +191,7 @@ class SharedXnnpackContext : public ThreadSafeRefCount ~SharedXnnpackContext() { base::AutoLock auto_lock(SharedXnnpackContextLock()); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc index f786e2c56e04..07b7f12fde5d 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/modules/peerconnection/webrtc_audio_renderer_test.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/modules/peerconnection/webrtc_audio_renderer_test.cc.orig 2023-07-16 15:47:57 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/modules/peerconnection/webrtc_audio_renderer_test.cc -@@ -290,7 +290,7 @@ TEST_F(WebRtcAudioRendererTest, DISABLED_VerifySinkPar +@@ -297,7 +297,7 @@ TEST_F(WebRtcAudioRendererTest, DISABLED_VerifySinkPar SetupRenderer(kDefaultOutputDeviceId); renderer_proxy_->Start(); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_APPLE) || \ diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc index 0bb8db1053a4..668add41a422 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc -@@ -6231,7 +6231,7 @@ void WebGLRenderingContextBase::TexImageHelperMediaVid +@@ -6321,7 +6321,7 @@ void WebGLRenderingContextBase::TexImageHelperMediaVid constexpr bool kAllowZeroCopyImages = true; #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_webgl_webgl__webcodecs__video__frame.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_webgl_webgl__webcodecs__video__frame.cc deleted file mode 100644 index 1f3d5b2d4492..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_webgl_webgl__webcodecs__video__frame.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/modules/webgl/webgl_webcodecs_video_frame.cc.orig 2023-04-05 11:05:06 UTC -+++ src/3rdparty/chromium/third_party/blink/renderer/modules/webgl/webgl_webcodecs_video_frame.cc -@@ -102,7 +102,7 @@ bool WebGLWebCodecsVideoFrame::Supported(WebGLRenderin - // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is - // complete. - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - // TODO(jie.a.chen@intel.com): Add Linux support. - return false; - #elif BUILDFLAG(IS_APPLE) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_webgpu_gpu__queue.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_webgpu_gpu__queue.cc index 4a16beaf548c..2d061233f1b7 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_webgpu_gpu__queue.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_webgpu_gpu__queue.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/modules/webgpu/gpu_queue.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/modules/webgpu/gpu_queue.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/modules/webgpu/gpu_queue.cc -@@ -707,7 +707,7 @@ bool GPUQueue::CopyFromCanvasSourceImage( - // platform requires interop supported. According to the bug, this change will - // be a long time task. So disable using webgpu mailbox texture uploading path +@@ -746,7 +746,7 @@ bool GPUQueue::CopyFromCanvasSourceImage( // on linux platform. + // TODO(crbug.com/1424119): using a webgpu mailbox texture on the OpenGLES + // backend is failing for unknown reasons. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - use_webgpu_mailbox_texture = false; - unaccelerated_image = image->MakeUnaccelerated(); - image = unaccelerated_image.get(); + bool forceReadback = true; + #elif BUILDFLAG(IS_WIN) + bool forceReadback = diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_BUILD.gn index 9e67a519c9bb..ca33eca74907 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/platform/BUILD.gn.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/platform/BUILD.gn.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/platform/BUILD.gn -@@ -1976,7 +1976,7 @@ jumbo_static_library("test_support") { +@@ -1975,7 +1975,7 @@ jumbo_static_library("test_support") { ] # fuzzed_data_provider may not work with a custom toolchain. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__cache.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__cache.cc index 62b9add21a53..0ebf2995f22c 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__cache.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__cache.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_cache.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_cache.cc.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_cache.cc @@ -72,7 +72,7 @@ extern const char kNotoColorEmojiCompat[] = "Noto Colo @@ -9,7 +9,7 @@ float FontCache::device_scale_factor_ = 1.0; #endif -@@ -119,7 +119,7 @@ FontPlatformData* FontCache::SystemFontPlatformData( +@@ -118,7 +118,7 @@ FontPlatformData* FontCache::SystemFontPlatformData( const FontDescription& font_description) { const AtomicString& family = FontCache::SystemFontFamily(); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || \ diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__cache.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__cache.h index 14048654d8b4..b3e27e71c678 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__cache.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__cache.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_cache.h.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_cache.h.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_cache.h -@@ -57,7 +57,7 @@ +@@ -56,7 +56,7 @@ #include "third_party/skia/include/core/SkFontMgr.h" #include "third_party/skia/include/core/SkRefCnt.h" @@ -9,7 +9,7 @@ #include "ui/gfx/font_fallback_linux.h" #endif -@@ -180,7 +180,7 @@ class PLATFORM_EXPORT FontCache final { +@@ -174,7 +174,7 @@ class PLATFORM_EXPORT FontCache final { static void PrewarmFamily(const AtomicString& family_name) {} #endif @@ -18,7 +18,7 @@ // These are needed for calling QueryRenderStyleForStrike, since // gfx::GetFontRenderParams makes distinctions based on DSF. static float DeviceScaleFactor() { return device_scale_factor_; } -@@ -264,7 +264,7 @@ class PLATFORM_EXPORT FontCache final { +@@ -250,7 +250,7 @@ class PLATFORM_EXPORT FontCache final { const char* locale_family_name); #endif // BUILDFLAG(IS_ANDROID) @@ -27,7 +27,7 @@ static bool GetFontForCharacter(UChar32, const char* preferred_locale, gfx::FallbackFontData*); -@@ -344,7 +344,7 @@ class PLATFORM_EXPORT FontCache final { +@@ -330,7 +330,7 @@ class PLATFORM_EXPORT FontCache final { const FontFaceCreationParams&, std::string& name); @@ -36,8 +36,8 @@ static AtomicString GetFamilyNameForCharacter(SkFontMgr*, UChar32, const FontDescription&, -@@ -387,7 +387,7 @@ class PLATFORM_EXPORT FontCache final { - std::unique_ptr<FallbackFamilyStyleCache> fallback_params_cache_; +@@ -368,7 +368,7 @@ class PLATFORM_EXPORT FontCache final { + bool is_test_font_mgr_ = false; #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__description.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__description.cc index 6e59b05a818a..21a42c1fcb59 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__description.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__description.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_description.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_description.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_description.cc @@ -39,7 +39,7 @@ #include "third_party/blink/renderer/platform/wtf/text/string_hash.h" @@ -9,7 +9,7 @@ #include "third_party/blink/renderer/platform/fonts/font_cache.h" #endif -@@ -275,7 +275,7 @@ FontCacheKey FontDescription::CacheKey( +@@ -274,7 +274,7 @@ FontCacheKey FontDescription::CacheKey( static_cast<unsigned>(fields_.orientation_) << 1 | // bit 2-3 static_cast<unsigned>(fields_.subpixel_text_position_); // bit 1 diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__palette.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__palette.h new file mode 100644 index 000000000000..74578b876a36 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__palette.h @@ -0,0 +1,28 @@ +--- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_palette.h.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_palette.h +@@ -96,7 +96,11 @@ class PLATFORM_EXPORT FontPalette : public RefCounted< + Color::ColorSpace color_interpolation_space, + absl::optional<Color::HueInterpolationMethod> hue_interpolation_method) { + return base::AdoptRef(new FontPalette( +- start, end, NonNormalizedPercentages{start_percentage, end_percentage}, ++#if defined(__clang__) && (__clang_major__ >= 16) ++ start, end, NonNormalizedPercentages(start_percentage, end_percentage), ++#else ++ start, end, NonNormalizedPercentages(NonNormalizedPercentages{start_percentage, end_percentage}), ++#endif + normalized_percentage, alpha_multiplier, color_interpolation_space, + hue_interpolation_method)); + } +@@ -170,7 +174,11 @@ class PLATFORM_EXPORT FontPalette : public RefCounted< + double normalized_percentage) { + double end_percentage = normalized_percentage * 100.0; + double start_percentage = 100.0 - end_percentage; +- return NonNormalizedPercentages{start_percentage, end_percentage}; ++#if defined(__clang__) && (__clang_major__ >= 16) ++ return NonNormalizedPercentages(start_percentage, end_percentage); ++#else ++ return NonNormalizedPercentages(NonNormalizedPercentages{start_percentage, end_percentage}); ++#endif + } + + double GetAlphaMultiplier() const { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__platform__data.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__platform__data.cc index 65b7bf46d0b1..f4fe74bacd65 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__platform__data.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__platform__data.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_platform_data.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_platform_data.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_platform_data.cc @@ -51,7 +51,7 @@ namespace { namespace blink { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_palette__interpolation.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_palette__interpolation.cc new file mode 100644 index 000000000000..65e93bb77bc0 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_palette__interpolation.cc @@ -0,0 +1,16 @@ +--- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/palette_interpolation.cc.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/palette_interpolation.cc +@@ -31,7 +31,12 @@ Vector<FontPalette::FontPaletteOverride> PaletteInterp + color_interpolation_space, hue_interpolation_method, start_color, + end_color, percentage, alpha_multiplier); + +- FontPalette::FontPaletteOverride result_color_record{(int)i, result_color}; ++#if defined(__clang__) && (__clang_major__ >= 16) ++ FontPalette::FontPaletteOverride result_color_record(i, result_color); ++#else ++ FontPalette::FontPaletteOverride fpo = { static_cast<int>(i), result_color }; ++ FontPalette::FontPaletteOverride result_color_record(fpo); ++#endif + result_color_records.push_back(result_color_record); + } + return result_color_records; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_skia_font__cache__skia.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_skia_font__cache__skia.cc index 041279edd07b..4041c0ad526e 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_skia_font__cache__skia.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_skia_font__cache__skia.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/skia/font_cache_skia.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/skia/font_cache_skia.cc.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/skia/font_cache_skia.cc -@@ -60,7 +60,7 @@ AtomicString ToAtomicString(const SkString& str) { +@@ -64,7 +64,7 @@ AtomicString ToAtomicString(const SkString& str) { return AtomicString::FromUTF8(str.c_str(), str.size()); } @@ -9,16 +9,7 @@ // This function is called on android or when we are emulating android fonts on // linux and the embedder has overriden the default fontManager with // WebFontRendering::setSkiaFontMgr. -@@ -235,7 +235,7 @@ sk_sp<SkTypeface> FontCache::CreateTypeface( - } - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - // On linux if the fontManager has been overridden then we should be calling - // the embedder provided font Manager rather than calling - // SkTypeface::CreateFromName which may redirect the call to the default font -@@ -262,7 +262,7 @@ std::unique_ptr<FontPlatformData> FontCache::CreateFon +@@ -246,7 +246,7 @@ std::unique_ptr<FontPlatformData> FontCache::CreateFon std::string name; sk_sp<SkTypeface> typeface; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_begin__frame__provider.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_begin__frame__provider.cc index 495ee9e234ce..b05f28ed8769 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_begin__frame__provider.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_begin__frame__provider.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/begin_frame_provider.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/begin_frame_provider.cc.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/begin_frame_provider.cc -@@ -77,8 +77,12 @@ void BeginFrameProvider::CreateCompositorFrameSinkIfNe +@@ -71,8 +71,12 @@ void BeginFrameProvider::CreateCompositorFrameSinkIfNe // Once we are using RAF, this thread is driving user interactive display // updates. Update priority accordingly. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_video__frame__submitter.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_video__frame__submitter.cc index 53474e91ff22..dc308173b771 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_video__frame__submitter.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_video__frame__submitter.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/video_frame_submitter.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/video_frame_submitter.cc.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/video_frame_submitter.cc -@@ -358,7 +358,7 @@ void VideoFrameSubmitter::OnBeginFrame( +@@ -356,7 +356,7 @@ void VideoFrameSubmitter::OnBeginFrame( continue; auto& feedback = timing_details.find(frame_token)->value.presentation_feedback; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_peerconnection_rtc__video__encoder__factory.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_peerconnection_rtc__video__encoder__factory.cc index 1ae8befc0f50..cfc8e3fbf7eb 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_peerconnection_rtc__video__encoder__factory.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_peerconnection_rtc__video__encoder__factory.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/platform/peerconnection/rtc_video_encoder_factory.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/platform/peerconnection/rtc_video_encoder_factory.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/platform/peerconnection/rtc_video_encoder_factory.cc -@@ -197,12 +197,12 @@ SupportedFormats GetSupportedFormatsInternal( +@@ -198,12 +198,12 @@ SupportedFormats GetSupportedFormatsInternal( supported_formats.scalability_modes.push_back(profile.scalability_modes); supported_formats.sdp_formats.push_back(std::move(*format)); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_runtime__enabled__features.json5 b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_runtime__enabled__features.json5 index 89970e0e44de..f729bbaa5d14 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_runtime__enabled__features.json5 +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_runtime__enabled__features.json5 @@ -1,15 +1,15 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/platform/runtime_enabled_features.json5.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/platform/runtime_enabled_features.json5.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -1531,7 +1531,7 @@ - depends_on: ["FileSystemAccessLocal"], - status: {"Android": "test", "default": "stable"}, - origin_trial_feature_name: "FileHandling", +@@ -2781,7 +2781,7 @@ + name: "PaymentHandlerMinimalHeaderUX", + origin_trial_feature_name: "PaymentHandlerMinimalHeaderUX", + origin_trial_allows_third_party: true, - origin_trial_os: ["win", "mac", "linux", "fuchsia", "chromeos"], + origin_trial_os: ["win", "mac", "linux", "fuchsia", "chromeos", "openbsd", "freebsd"], - base_feature: "FileHandlingAPI", }, { -@@ -3358,7 +3358,7 @@ + name: "PaymentInstruments", +@@ -3803,7 +3803,7 @@ name: "UnrestrictedSharedArrayBuffer", base_feature: "none", origin_trial_feature_name: "UnrestrictedSharedArrayBuffer", @@ -18,16 +18,7 @@ }, { name: "URLPatternCompareComponent", -@@ -3379,7 +3379,7 @@ - origin_trial_feature_name: "UserAgentReduction", - origin_trial_allows_third_party: true, - // iOS not included as it should not send a reduced User-Agent string. -- origin_trial_os: ["android", "chromeos", "fuchsia", "linux", "mac", "win"], -+ origin_trial_os: ["android", "chromeos", "fuchsia", "linux", "mac", "win", "openbsd", "freebsd"], - base_feature: "ReduceUserAgent", - }, - { -@@ -3553,12 +3553,12 @@ +@@ -4006,12 +4006,12 @@ status: "experimental", base_feature: "none", origin_trial_feature_name: "WebAppUrlHandling", diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_scheduler_common_thread.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_scheduler_common_thread.cc index cab2808e46a6..d8fc91ddadb8 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_scheduler_common_thread.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_scheduler_common_thread.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/platform/scheduler/common/thread.cc.orig 2022-10-24 13:33:33 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/platform/scheduler/common/thread.cc.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/platform/scheduler/common/thread.cc -@@ -87,7 +87,7 @@ void Thread::CreateAndSetCompositorThread() { +@@ -82,7 +82,7 @@ void Thread::CreateAndSetCompositorThread() { std::make_unique<scheduler::CompositorThread>(params); compositor_thread->Init(); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_video__capture_video__capture__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_video__capture_video__capture__impl.cc new file mode 100644 index 000000000000..ac8abe61fb37 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_video__capture_video__capture__impl.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/blink/renderer/platform/video_capture/video_capture_impl.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/third_party/blink/renderer/platform/video_capture/video_capture_impl.cc +@@ -621,7 +621,7 @@ bool VideoCaptureImpl::VideoFrameBufferPreparer::BindV + } + + const unsigned texture_target = +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Explicitly set GL_TEXTURE_EXTERNAL_OES as the + // `media::VideoFrame::RequiresExternalSampler()` requires it for NV12 + // format, while the `ImageTextureTarget()` will return GL_TEXTURE_2D. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_widget_compositing_blink__categorized__worker__pool__delegate.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_widget_compositing_blink__categorized__worker__pool__delegate.cc new file mode 100644 index 000000000000..a957cfd32446 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_widget_compositing_blink__categorized__worker__pool__delegate.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/blink/renderer/platform/widget/compositing/blink_categorized_worker_pool_delegate.cc.orig 2023-05-31 08:12:17 UTC ++++ src/3rdparty/chromium/third_party/blink/renderer/platform/widget/compositing/blink_categorized_worker_pool_delegate.cc +@@ -27,7 +27,7 @@ BlinkCategorizedWorkerPoolDelegate& BlinkCategorizedWo + + void BlinkCategorizedWorkerPoolDelegate::NotifyThreadWillRun( + base::PlatformThreadId tid) { +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + scoped_refptr<base::TaskRunner> task_runner = + Thread::MainThread()->GetTaskRunner(MainThreadTaskRunnerRestricted()); + task_runner->PostTask(FROM_HERE, base::BindOnce( diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_widget_compositing_categorized__worker__pool.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_widget_compositing_categorized__worker__pool.cc deleted file mode 100644 index b80eab4f0b29..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_widget_compositing_categorized__worker__pool.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/platform/widget/compositing/categorized_worker_pool.cc.orig 2023-03-09 06:31:50 UTC -+++ src/3rdparty/chromium/third_party/blink/renderer/platform/widget/compositing/categorized_worker_pool.cc -@@ -242,7 +242,7 @@ void CategorizedWorkerPoolImpl::Start(int max_concurre - "CompositorTileWorkerBackground", thread_options, this, - background_thread_prio_categories, - &has_task_for_background_priority_thread_cv_); --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - thread->SetBackgroundingCallback( - Thread::MainThread()->GetTaskRunner(MainThreadTaskRunnerRestricted()), - base::BindOnce([](base::PlatformThreadId thread_id) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_math__extras.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_math__extras.h index 54822740990c..0c99b83324b4 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_math__extras.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_math__extras.h @@ -1,17 +1,6 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/math_extras.h.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/math_extras.h.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/math_extras.h -@@ -128,6 +128,10 @@ constexpr float Grad2turn(float g) { - return g * (1.0f / 400.0f); - } - -+#if defined(OS_FREEBSD) -+#pragma clang diagnostic push -+#pragma clang diagnostic ignored "-Winvalid-constexpr" -+#endif - inline double RoundHalfTowardsPositiveInfinity(double value) { - return std::floor(value + 0.5); - } -@@ -135,6 +139,9 @@ inline float RoundHalfTowardsPositiveInfinity(float va +@@ -135,6 +135,9 @@ inline float RoundHalfTowardsPositiveInfinity(float va inline float RoundHalfTowardsPositiveInfinity(float value) { return std::floor(value + 0.5f); } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_BUILD.generated.gni b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_BUILD.generated.gni deleted file mode 100644 index f23df4066ad8..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_BUILD.generated.gni +++ /dev/null @@ -1,18 +0,0 @@ ---- src/3rdparty/chromium/third_party/boringssl/BUILD.generated.gni.orig 2023-09-07 16:02:00 UTC -+++ src/3rdparty/chromium/third_party/boringssl/BUILD.generated.gni -@@ -87,6 +87,7 @@ crypto_sources = [ - "src/crypto/cpu_aarch64_freebsd.c", - "src/crypto/cpu_aarch64_fuchsia.c", - "src/crypto/cpu_aarch64_linux.c", -+ "src/crypto/cpu_aarch64_openbsd.c", - "src/crypto/cpu_aarch64_win.c", - "src/crypto/cpu_arm.c", - "src/crypto/cpu_arm_freebsd.c", -@@ -193,6 +194,7 @@ crypto_sources = [ - "src/crypto/rand_extra/deterministic.c", - "src/crypto/rand_extra/forkunsafe.c", - "src/crypto/rand_extra/fuchsia.c", -+ "src/crypto/rand_extra/arc4random.c", - "src/crypto/rand_extra/passive.c", - "src/crypto/rand_extra/rand_extra.c", - "src/crypto/rand_extra/windows.c", diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_BUILD.gn deleted file mode 100644 index 7bc990a32f49..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_BUILD.gn +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/third_party/boringssl/BUILD.gn.orig 2022-03-25 21:59:56 UTC -+++ src/3rdparty/chromium/third_party/boringssl/BUILD.gn -@@ -92,7 +92,7 @@ if (is_win && !is_msan && current_cpu != "arm64") { - public_configs = [ ":no_asm_config" ] - } - } else if (current_cpu == "arm64") { -- if (is_linux || is_chromeos || is_android) { -+ if ((is_linux || is_chromeos || is_android) && !is_freebsd) { - sources += crypto_sources_linux_aarch64 - } else if (is_apple) { - sources += crypto_sources_apple_aarch64 diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_chacha_asm_chacha-x86__64.pl b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_chacha_asm_chacha-x86__64.pl deleted file mode 100644 index 0d7a6c505632..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_chacha_asm_chacha-x86__64.pl +++ /dev/null @@ -1,18 +0,0 @@ ---- src/3rdparty/chromium/third_party/boringssl/src/crypto/chacha/asm/chacha-x86_64.pl.orig 2023-02-08 09:03:45 UTC -+++ src/3rdparty/chromium/third_party/boringssl/src/crypto/chacha/asm/chacha-x86_64.pl -@@ -78,6 +78,7 @@ $code.=<<___; - - .extern OPENSSL_ia32cap_P - -+.rodata - .align 64 - .Lzero: - .long 0,0,0,0 -@@ -107,6 +108,7 @@ $code.=<<___; - .Lsixteen: - .long 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16 - .asciz "ChaCha20 for x86_64, CRYPTOGAMS by <appro\@openssl.org>" -+.previous - ___ - - sub AUTOLOAD() # thunk [simplified] 32-bit style perlasm diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_cipher__extra_asm_aes128gcmsiv-x86__64.pl b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_cipher__extra_asm_aes128gcmsiv-x86__64.pl deleted file mode 100644 index 23fc58a63e69..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_cipher__extra_asm_aes128gcmsiv-x86__64.pl +++ /dev/null @@ -1,19 +0,0 @@ ---- src/3rdparty/chromium/third_party/boringssl/src/crypto/cipher_extra/asm/aes128gcmsiv-x86_64.pl.orig 2023-02-08 09:03:45 UTC -+++ src/3rdparty/chromium/third_party/boringssl/src/crypto/cipher_extra/asm/aes128gcmsiv-x86_64.pl -@@ -32,7 +32,7 @@ open OUT,"| \"$^X\" \"$xlate\" $flavour \"$output\""; - *STDOUT=*OUT; - - $code.=<<___; --.data -+.rodata - - .align 16 - one: -@@ -66,6 +66,7 @@ con3: - .byte -1,-1,-1,-1,-1,-1,-1,-1,4,5,6,7,4,5,6,7 - and_mask: - .long 0,0xffffffff, 0xffffffff, 0xffffffff -+.previous - ___ - - $code.=<<___; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_cipher__extra_asm_chacha20__poly1305__x86__64.pl b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_cipher__extra_asm_chacha20__poly1305__x86__64.pl deleted file mode 100644 index a3bb3e648f9a..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_cipher__extra_asm_chacha20__poly1305__x86__64.pl +++ /dev/null @@ -1,18 +0,0 @@ ---- src/3rdparty/chromium/third_party/boringssl/src/crypto/cipher_extra/asm/chacha20_poly1305_x86_64.pl.orig 2023-02-08 09:03:45 UTC -+++ src/3rdparty/chromium/third_party/boringssl/src/crypto/cipher_extra/asm/chacha20_poly1305_x86_64.pl -@@ -42,6 +42,7 @@ $code.=<<___; - - chacha20_poly1305_constants: - -+.rodata - .align 64 - .Lchacha20_consts: - .byte 'e','x','p','a','n','d',' ','3','2','-','b','y','t','e',' ','k' -@@ -79,6 +80,7 @@ chacha20_poly1305_constants: - .byte 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00 - .byte 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00 - .byte 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff -+.previous - ___ - - my ($oup,$inp,$inl,$adp,$keyp,$itr1,$itr2,$adl)=("%rdi","%rsi","%rbx","%rcx","%r9","%rcx","%r8","%r8"); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_cpu__aarch64__openbsd.c b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_cpu__aarch64__openbsd.c deleted file mode 100644 index 60fd01169810..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_cpu__aarch64__openbsd.c +++ /dev/null @@ -1,60 +0,0 @@ ---- src/3rdparty/chromium/third_party/boringssl/src/crypto/cpu_aarch64_openbsd.c.orig 2022-03-25 21:59:56 UTC -+++ src/3rdparty/chromium/third_party/boringssl/src/crypto/cpu_aarch64_openbsd.c -@@ -0,0 +1,57 @@ -+/* Copyright (c) 2022, Robert Nagy <robert@openbsd.org> -+ * -+ * Permission to use, copy, modify, and/or distribute this software for any -+ * purpose with or without fee is hereby granted, provided that the above -+ * copyright notice and this permission notice appear in all copies. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -+ * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION -+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -+ -+#include <openssl/cpu.h> -+ -+#if defined(OPENSSL_AARCH64) && defined(OPENSSL_OPENBSD) && \ -+ !defined(OPENSSL_STATIC_ARMCAP) -+ -+#include <sys/sysctl.h> -+#include <machine/cpu.h> -+#include <machine/armreg.h> -+#include <stdio.h> -+ -+#include <openssl/arm_arch.h> -+ -+#include "internal.h" -+ -+extern uint32_t OPENSSL_armcap_P; -+ -+void OPENSSL_cpuid_setup(void) { -+ int isar0_mib[] = { CTL_MACHDEP, CPU_ID_AA64ISAR0 }; -+ size_t len = sizeof(uint64_t); -+ uint64_t cpu_id = 0; -+ -+ if (sysctl(isar0_mib, 2, &cpu_id, &len, NULL, 0) < 0) -+ return; -+ -+ OPENSSL_armcap_P |= ARMV7_NEON; -+ -+ if (ID_AA64ISAR0_AES(cpu_id) >= ID_AA64ISAR0_AES_BASE) -+ OPENSSL_armcap_P |= ARMV8_AES; -+ -+ if (ID_AA64ISAR0_AES(cpu_id) >= ID_AA64ISAR0_AES_PMULL) -+ OPENSSL_armcap_P |= ARMV8_PMULL; -+ -+ if (ID_AA64ISAR0_SHA1(cpu_id) >= ID_AA64ISAR0_SHA1_BASE) -+ OPENSSL_armcap_P |= ARMV8_SHA1; -+ -+ if (ID_AA64ISAR0_SHA2(cpu_id) >= ID_AA64ISAR0_SHA2_BASE) -+ OPENSSL_armcap_P |= ARMV8_SHA256; -+ -+ if (ID_AA64ISAR0_SHA2(cpu_id) >= ID_AA64ISAR0_SHA2_512) -+ OPENSSL_armcap_P |= ARMV8_SHA512; -+} -+ -+#endif // OPENSSL_AARCH64 && OPENSSL_OPENBSD && !OPENSSL_STATIC_ARMCAP diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_aes_asm_aesni-x86__64.pl b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_aes_asm_aesni-x86__64.pl deleted file mode 100644 index eec96103d4ec..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_aes_asm_aesni-x86__64.pl +++ /dev/null @@ -1,18 +0,0 @@ ---- src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/aes/asm/aesni-x86_64.pl.orig 2023-04-05 11:05:06 UTC -+++ src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/aes/asm/aesni-x86_64.pl -@@ -3778,6 +3778,7 @@ ___ - } - - $code.=<<___; -+.rodata - .align 64 - .Lbswap_mask: - .byte 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 -@@ -3800,6 +3801,7 @@ $code.=<<___; - - .asciz "AES for Intel AES-NI, CRYPTOGAMS by <appro\@openssl.org>" - .align 64 -+.previous - ___ - - # EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame, diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_aes_asm_vpaes-x86__64.pl b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_aes_asm_vpaes-x86__64.pl deleted file mode 100644 index a12e445991f2..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_aes_asm_vpaes-x86__64.pl +++ /dev/null @@ -1,10 +0,0 @@ ---- src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/aes/asm/vpaes-x86_64.pl.orig 2023-02-08 09:03:45 UTC -+++ src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/aes/asm/vpaes-x86_64.pl -@@ -1288,6 +1288,7 @@ _vpaes_preheat: - ## ## - ######################################################## - .type _vpaes_consts,\@object -+.rodata - .align 64 - _vpaes_consts: - .Lk_inv: # inv, inva diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_bn_asm_x86__64-mont5.pl b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_bn_asm_x86__64-mont5.pl deleted file mode 100644 index f7ef4e8e55ba..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_bn_asm_x86__64-mont5.pl +++ /dev/null @@ -1,16 +0,0 @@ ---- src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/bn/asm/x86_64-mont5.pl.orig 2023-02-08 09:03:45 UTC -+++ src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/bn/asm/x86_64-mont5.pl -@@ -3576,11 +3576,13 @@ $code.=<<___; - ___ - } - $code.=<<___; -+.rodata - .align 64 - .Linc: - .long 0,0, 1,1 - .long 2,2, 2,2 - .asciz "Montgomery Multiplication with scatter/gather for x86_64, CRYPTOGAMS by <appro\@openssl.org>" -+.previous - ___ - - # EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame, diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_ec_asm_p256-x86__64-asm.pl b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_ec_asm_p256-x86__64-asm.pl deleted file mode 100644 index 383c6889b710..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_ec_asm_p256-x86__64-asm.pl +++ /dev/null @@ -1,18 +0,0 @@ ---- src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/ec/asm/p256-x86_64-asm.pl.orig 2023-02-08 09:03:45 UTC -+++ src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/ec/asm/p256-x86_64-asm.pl -@@ -62,6 +62,7 @@ $code.=<<___; - .extern OPENSSL_ia32cap_P - - # The polynomial -+.rodata - .align 64 - .Lpoly: - .quad 0xffffffffffffffff, 0x00000000ffffffff, 0x0000000000000000, 0xffffffff00000001 -@@ -80,6 +81,7 @@ $code.=<<___; - .quad 0xf3b9cac2fc632551, 0xbce6faada7179e84, 0xffffffffffffffff, 0xffffffff00000000 - .LordK: - .quad 0xccd1c8aaee00bc4f -+.previous - ___ - - { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_modes_asm_aesni-gcm-x86__64.pl b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_modes_asm_aesni-gcm-x86__64.pl deleted file mode 100644 index e28864dfceb4..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_modes_asm_aesni-gcm-x86__64.pl +++ /dev/null @@ -1,18 +0,0 @@ ---- src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/modes/asm/aesni-gcm-x86_64.pl.orig 2023-04-05 11:05:06 UTC -+++ src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/modes/asm/aesni-gcm-x86_64.pl -@@ -1053,6 +1053,7 @@ $code.=<<___; - ___ - - $code.=<<___; -+.rodata - .align 64 - .Lbswap_mask: - .byte 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 -@@ -1066,6 +1067,7 @@ $code.=<<___; - .byte 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - .asciz "AES-NI GCM module for x86_64, CRYPTOGAMS by <appro\@openssl.org>" - .align 64 -+.previous - ___ - }}} else {{{ - $code=<<___; # assembler is too old diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_modes_asm_ghash-ssse3-x86__64.pl b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_modes_asm_ghash-ssse3-x86__64.pl deleted file mode 100644 index 2cea056c5b0c..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_modes_asm_ghash-ssse3-x86__64.pl +++ /dev/null @@ -1,18 +0,0 @@ ---- src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/modes/asm/ghash-ssse3-x86_64.pl.orig 2023-04-05 11:05:06 UTC -+++ src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/modes/asm/ghash-ssse3-x86_64.pl -@@ -331,6 +331,7 @@ $code .= <<____; - .seh_endproc - .size gcm_ghash_ssse3,.-gcm_ghash_ssse3 - -+.rodata - .align 16 - # .Lreverse_bytes is a permutation which, if applied with pshufb, reverses the - # bytes in an XMM register. -@@ -339,6 +340,7 @@ $code .= <<____; - # .Llow4_mask is an XMM mask which selects the low four bits of each byte. - .Llow4_mask: - .quad 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f -+.previous - ____ - - print $code; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_modes_asm_ghash-x86__64.pl b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_modes_asm_ghash-x86__64.pl deleted file mode 100644 index 4124a866436a..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_modes_asm_ghash-x86__64.pl +++ /dev/null @@ -1,18 +0,0 @@ ---- src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/modes/asm/ghash-x86_64.pl.orig 2023-04-05 11:05:06 UTC -+++ src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/modes/asm/ghash-x86_64.pl -@@ -1297,6 +1297,7 @@ ___ - } - - $code.=<<___; -+.rodata - .align 64 - .Lbswap_mask: - .byte 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 -@@ -1308,6 +1309,7 @@ $code.=<<___; - - .asciz "GHASH for x86_64, CRYPTOGAMS by <appro\@openssl.org>" - .align 64 -+.previous - ___ - - $code =~ s/\`([^\`]*)\`/eval($1)/gem; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_rand_internal.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_rand_internal.h deleted file mode 100644 index 29b0a6683006..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_rand_internal.h +++ /dev/null @@ -1,12 +0,0 @@ ---- src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/rand/internal.h.orig 2022-09-24 10:57:32 UTC -+++ src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/rand/internal.h -@@ -27,7 +27,8 @@ extern "C" { - - - #if !defined(OPENSSL_WINDOWS) && !defined(OPENSSL_FUCHSIA) && \ -- !defined(BORINGSSL_UNSAFE_DETERMINISTIC_MODE) && !defined(OPENSSL_TRUSTY) -+ !defined(BORINGSSL_UNSAFE_DETERMINISTIC_MODE) && !defined(OPENSSL_TRUSTY) && \ -+ !defined(OPENSSL_ARC4RANDOM) - #define OPENSSL_URANDOM - #endif - diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_sha_asm_sha1-x86__64.pl b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_sha_asm_sha1-x86__64.pl deleted file mode 100644 index 387ba2cba7af..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_sha_asm_sha1-x86__64.pl +++ /dev/null @@ -1,18 +0,0 @@ ---- src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/sha/asm/sha1-x86_64.pl.orig 2023-02-08 09:03:45 UTC -+++ src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/sha/asm/sha1-x86_64.pl -@@ -1815,6 +1815,7 @@ ___ - } - } - $code.=<<___; -+.rodata - .align 64 - K_XX_XX: - .long 0x5a827999,0x5a827999,0x5a827999,0x5a827999 # K_00_19 -@@ -1833,6 +1834,7 @@ ___ - $code.=<<___; - .asciz "SHA1 block transform for x86_64, CRYPTOGAMS by <appro\@openssl.org>" - .align 64 -+.previous - ___ - - # EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame, diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_sha_asm_sha512-x86__64.pl b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_sha_asm_sha512-x86__64.pl deleted file mode 100644 index 49553e42ba57..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_sha_asm_sha512-x86__64.pl +++ /dev/null @@ -1,30 +0,0 @@ ---- src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/sha/asm/sha512-x86_64.pl.orig 2023-02-08 09:03:45 UTC -+++ src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/sha/asm/sha512-x86_64.pl -@@ -404,6 +404,7 @@ ___ - - if ($SZ==4) { - $code.=<<___; -+.rodata - .align 64 - .type $TABLE,\@object - $TABLE: -@@ -447,9 +448,11 @@ $TABLE: - .long 0xffffffff,0xffffffff,0x03020100,0x0b0a0908 - .long 0xffffffff,0xffffffff,0x03020100,0x0b0a0908 - .asciz "SHA256 block transform for x86_64, CRYPTOGAMS by <appro\@openssl.org>" -+.previous - ___ - } else { - $code.=<<___; -+.rodata - .align 64 - .type $TABLE,\@object - $TABLE: -@@ -537,6 +540,7 @@ $TABLE: - .quad 0x0001020304050607,0x08090a0b0c0d0e0f - .quad 0x0001020304050607,0x08090a0b0c0d0e0f - .asciz "SHA512 block transform for x86_64, CRYPTOGAMS by <appro\@openssl.org>" -+.previous - ___ - } - diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_rand__extra_arc4random.c b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_rand__extra_arc4random.c deleted file mode 100644 index 0c920ae35733..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_rand__extra_arc4random.c +++ /dev/null @@ -1,36 +0,0 @@ ---- src/3rdparty/chromium/third_party/boringssl/src/crypto/rand_extra/arc4random.c.orig 2022-02-07 13:39:41 UTC -+++ src/3rdparty/chromium/third_party/boringssl/src/crypto/rand_extra/arc4random.c -@@ -0,0 +1,33 @@ -+/* Copyright (c) 2018, Robert Nagy <robert@openbsd.org> -+ * -+ * Permission to use, copy, modify, and/or distribute this software for any -+ * purpose with or without fee is hereby granted, provided that the above -+ * copyright notice and this permission notice appear in all copies. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -+ * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION -+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -+ -+#define _BSD_SOURCE 1 -+ -+#include <openssl/rand.h> -+ -+#if defined(OPENSSL_ARC4RANDOM) && !defined(BORINGSSL_UNSAFE_DETERMINISTIC_MODE) -+ -+#include <stdlib.h> -+ -+#include "../fipsmodule/rand/internal.h" -+ -+void CRYPTO_sysrand_for_seed(uint8_t *out, size_t requested) { -+ CRYPTO_sysrand(out, requested); -+} -+ -+void CRYPTO_sysrand(uint8_t *out, size_t requested) { -+ arc4random_buf(out, requested); -+} -+ -+#endif // OPENSSL_ARC4RANDOM && !BORINGSSL_UNSAFE_DETERMINISTIC_MODE diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_refcount__c11.c b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_refcount__c11.c deleted file mode 100644 index 25cae0821ee0..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_refcount__c11.c +++ /dev/null @@ -1,12 +0,0 @@ ---- src/3rdparty/chromium/third_party/boringssl/src/crypto/refcount_c11.c.orig 2022-09-24 10:57:32 UTC -+++ src/3rdparty/chromium/third_party/boringssl/src/crypto/refcount_c11.c -@@ -22,6 +22,9 @@ - #include <stdatomic.h> - #include <stdlib.h> - -+#if !defined(__cplusplus) && !defined(static_assert) -+#define static_assert _Static_assert -+#endif - - // See comment above the typedef of CRYPTO_refcount_t about these tests. - static_assert(alignof(CRYPTO_refcount_t) == alignof(_Atomic CRYPTO_refcount_t), diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_include_openssl_base.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_include_openssl_base.h deleted file mode 100644 index 209350e7f0a6..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_include_openssl_base.h +++ /dev/null @@ -1,14 +0,0 @@ ---- src/3rdparty/chromium/third_party/boringssl/src/include/openssl/base.h.orig 2023-04-05 11:05:06 UTC -+++ src/3rdparty/chromium/third_party/boringssl/src/include/openssl/base.h -@@ -151,6 +151,11 @@ extern "C" { - #define OPENSSL_FUCHSIA - #endif - -+#if defined(__OpenBSD__) -+#define OPENSSL_OPENBSD -+#define OPENSSL_ARC4RANDOM -+#endif -+ - #if defined(__TRUSTY__) - #define OPENSSL_TRUSTY - #define OPENSSL_NO_THREADS_CORRUPT_MEMORY_AND_LEAK_SECRETS_IF_THREADED diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_include_openssl_thread.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_include_openssl_thread.h deleted file mode 100644 index b62795e17f60..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_include_openssl_thread.h +++ /dev/null @@ -1,10 +0,0 @@ ---- src/3rdparty/chromium/third_party/boringssl/src/include/openssl/thread.h.orig 2022-05-19 14:06:27 UTC -+++ src/3rdparty/chromium/third_party/boringssl/src/include/openssl/thread.h -@@ -78,6 +78,7 @@ typedef union crypto_mutex_st { - void *handle; - } CRYPTO_MUTEX; - #elif !defined(__GLIBC__) -+#include <pthread.h> - typedef pthread_rwlock_t CRYPTO_MUTEX; - #else - // On glibc, |pthread_rwlock_t| is hidden under feature flags, and we can't diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_util_generate__build__files.py b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_util_generate__build__files.py index 3759a6f23805..3efd7510b554 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_util_generate__build__files.py +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_util_generate__build__files.py @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/boringssl/src/util/generate_build_files.py.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/third_party/boringssl/src/util/generate_build_files.py.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/third_party/boringssl/src/util/generate_build_files.py -@@ -785,10 +785,10 @@ def main(platforms): +@@ -766,10 +766,10 @@ def main(platforms): ] # Generate err_data.c @@ -15,7 +15,7 @@ crypto_c_files.append('err_data.c') crypto_c_files.sort() -@@ -801,11 +801,11 @@ def main(platforms): +@@ -780,11 +780,11 @@ def main(platforms): crypto_test_files = [] if EMBED_TEST_DATA: # Generate crypto_test_data.cc @@ -29,6 +29,6 @@ +# ['go', 'run', 'util/embed_test_data.go'] + cmake['CRYPTO_TEST_DATA'], +# cwd='src', +# stdout=out) - crypto_test_files += ['crypto_test_data.cc'] + crypto_test_files.append('crypto_test_data.cc') - crypto_test_files += FindCFiles(os.path.join('src', 'crypto'), OnlyTests) + crypto_test_files += PrefixWithSrc(cmake['CRYPTO_TEST_SOURCES']) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_cpuinfo_cpuinfo.gni b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_cpuinfo_cpuinfo.gni new file mode 100644 index 000000000000..fb61d3ecf290 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_cpuinfo_cpuinfo.gni @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/cpuinfo/cpuinfo.gni.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/third_party/cpuinfo/cpuinfo.gni +@@ -7,7 +7,7 @@ use_cpuinfo = + current_cpu != "ppc64" && current_cpu != "ppc64le" && + current_cpu != "s390" && current_cpu != "s390x" && + # cpuinfo is not supported on fuchsia. +- !is_fuchsia && ++ !is_fuchsia && !is_bsd && + # There's a few arm architectures that are not supported by cpuinfo, + # especially amongst ChromeOS devices. + # See //third_party/cpuinfo/src/src/arm/linux/cp.h. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_build_crashpad__buildconfig.gni b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_build_crashpad__buildconfig.gni new file mode 100644 index 000000000000..14c9411abecc --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_build_crashpad__buildconfig.gni @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/crashpad/crashpad/build/crashpad_buildconfig.gni.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/third_party/crashpad/crashpad/build/crashpad_buildconfig.gni +@@ -61,7 +61,7 @@ if (crashpad_is_in_chromium) { + crashpad_is_ios = is_ios + crashpad_is_apple = is_apple + crashpad_is_win = is_win +- crashpad_is_linux = is_linux || is_chromeos ++ crashpad_is_linux = (is_linux || is_chromeos) && !is_bsd + crashpad_is_android = is_android + crashpad_is_fuchsia = is_fuchsia + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_client_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_client_BUILD.gn new file mode 100644 index 000000000000..8964a52ea7f7 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_client_BUILD.gn @@ -0,0 +1,16 @@ +--- src/3rdparty/chromium/third_party/crashpad/crashpad/client/BUILD.gn.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/third_party/crashpad/crashpad/client/BUILD.gn +@@ -137,6 +137,13 @@ static_library("common") { + if (crashpad_is_win) { + sources += [ "crash_report_database_win.cc" ] + } ++ ++ if (crashpad_is_posix) { ++ sources += [ ++ "crashpad_client_posix.cc", ++ ] ++ } ++ + if (crashpad_is_linux || crashpad_is_android || crashpad_is_fuchsia) { + sources += [ + "crash_report_database_generic.cc", diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_client_crashpad__client__posix.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_client_crashpad__client__posix.cc new file mode 100644 index 000000000000..eaa3a41627ed --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_client_crashpad__client__posix.cc @@ -0,0 +1,43 @@ +--- src/3rdparty/chromium/third_party/crashpad/crashpad/client/crashpad_client_posix.cc.orig 2022-02-07 13:39:41 UTC ++++ src/3rdparty/chromium/third_party/crashpad/crashpad/client/crashpad_client_posix.cc +@@ -0,0 +1,40 @@ ++// Copyright 2017 The Crashpad Authors. All rights reserved. ++// ++// Licensed under the Apache License, Version 2.0 (the "License"); ++// you may not use this file except in compliance with the License. ++// You may obtain a copy of the License at ++// ++// http://www.apache.org/licenses/LICENSE-2.0 ++// ++// Unless required by applicable law or agreed to in writing, software ++// distributed under the License is distributed on an "AS IS" BASIS, ++// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++// See the License for the specific language governing permissions and ++// limitations under the License. ++ ++#include "client/crashpad_client.h" ++ ++#include "base/logging.h" ++#include "base/notreached.h" ++ ++namespace crashpad { ++ ++CrashpadClient::CrashpadClient() {} ++ ++CrashpadClient::~CrashpadClient() {} ++ ++bool CrashpadClient::StartHandler( ++ const base::FilePath& handler, ++ const base::FilePath& database, ++ const base::FilePath& metrics_dir, ++ const std::string& url, ++ const std::map<std::string, std::string>& annotations, ++ const std::vector<std::string>& arguments, ++ bool restartable, ++ bool asynchronous_start, ++ const std::vector<base::FilePath>& attachments) { ++ NOTREACHED(); // TODO(scottmg): https://crashpad.chromium.org/bug/196 ++ return false; ++} ++ ++} // namespace crashpad diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_minidump_minidump__misc__info__writer.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_minidump_minidump__misc__info__writer.cc new file mode 100644 index 000000000000..f337430eb9d6 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_minidump_minidump__misc__info__writer.cc @@ -0,0 +1,13 @@ +--- src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc.orig 2022-07-22 17:30:31 UTC ++++ src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc +@@ -159,6 +159,10 @@ std::string MinidumpMiscInfoDebugBuildString() { + static constexpr char kOS[] = "win"; + #elif BUILDFLAG(IS_FUCHSIA) + static constexpr char kOS[] = "fuchsia"; ++#elif defined(OS_OPENBSD) ++ static constexpr char kOS[] = "openbsd"; ++#elif defined(OS_FREEBSD) ++ static constexpr char kOS[] = "freebsd"; + #else + #error define kOS for this operating system + #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_address__types.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_address__types.h new file mode 100644 index 000000000000..ada89edcb833 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_address__types.h @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/address_types.h.orig 2022-02-28 16:54:41 UTC ++++ src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/address_types.h +@@ -25,7 +25,7 @@ + #include <mach/mach_types.h> + #elif BUILDFLAG(IS_WIN) + #include "util/win/address_types.h" +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + #include "util/linux/address_types.h" + #elif BUILDFLAG(IS_FUCHSIA) + #include <zircon/types.h> +@@ -55,7 +55,7 @@ using VMSize = mach_vm_size_t; + using VMAddress = WinVMAddress; + using VMSize = WinVMSize; + +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + + using VMAddress = LinuxVMAddress; + using VMSize = LinuxVMSize; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_capture__context.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_capture__context.h new file mode 100644 index 000000000000..fddd74c41f77 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_capture__context.h @@ -0,0 +1,22 @@ +--- src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/capture_context.h.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/capture_context.h +@@ -21,7 +21,8 @@ + #include <mach/mach.h> + #elif BUILDFLAG(IS_WIN) + #include <windows.h> +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ ++ BUILDFLAG(IS_FREEBSD) + #include <ucontext.h> + #endif // BUILDFLAG(IS_APPLE) + +@@ -35,7 +36,8 @@ using NativeCPUContext = arm_unified_thread_state; + #endif + #elif BUILDFLAG(IS_WIN) + using NativeCPUContext = CONTEXT; +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ ++ BUILDFLAG(IS_BSD) + using NativeCPUContext = ucontext_t; + #endif // BUILDFLAG(IS_APPLE) + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_metrics.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_metrics.cc new file mode 100644 index 000000000000..ae45aff49a98 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_metrics.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/metrics.cc.orig 2022-02-28 16:54:41 UTC ++++ src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/metrics.cc +@@ -25,7 +25,7 @@ + #define METRICS_OS_NAME "Win" + #elif BUILDFLAG(IS_ANDROID) + #define METRICS_OS_NAME "Android" +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #define METRICS_OS_NAME "Linux" + #elif BUILDFLAG(IS_FUCHSIA) + #define METRICS_OS_NAME "Fuchsia" diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_uuid.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_uuid.cc new file mode 100644 index 000000000000..022e44d4763e --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_uuid.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/uuid.cc.orig 2022-02-28 16:54:41 UTC ++++ src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/uuid.cc +@@ -101,7 +101,7 @@ bool UUID::InitializeWithNew() { + InitializeFromBytes(uuid); + return true; + #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ +- BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + // Linux, Android, and Fuchsia do not provide a UUID generator in a + // widely-available system library. On Linux and Android, uuid_generate() + // from libuuid is not available everywhere. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_close__multiple.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_close__multiple.cc new file mode 100644 index 000000000000..051d9df2784d --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_close__multiple.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/crashpad/crashpad/util/posix/close_multiple.cc.orig 2022-02-28 16:54:41 UTC ++++ src/3rdparty/chromium/third_party/crashpad/crashpad/util/posix/close_multiple.cc +@@ -72,7 +72,7 @@ void CloseNowOrOnExec(int fd, bool ebadf_ok) { + // This is an advantage over looping over all possible file descriptors, because + // no attempt needs to be made to close file descriptors that are not open. + bool CloseMultipleNowOrOnExecUsingFDDir(int min_fd, int preserve_fd) { +-#if BUILDFLAG(IS_APPLE) ++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) + static constexpr char kFDDir[] = "/dev/fd"; + #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + static constexpr char kFDDir[] = "/proc/self/fd"; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_drop__privileges.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_drop__privileges.cc new file mode 100644 index 000000000000..07d2646d3883 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_drop__privileges.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/crashpad/crashpad/util/posix/drop_privileges.cc.orig 2022-02-28 16:54:41 UTC ++++ src/3rdparty/chromium/third_party/crashpad/crashpad/util/posix/drop_privileges.cc +@@ -25,7 +25,7 @@ void DropPrivileges() { + gid_t gid = getgid(); + uid_t uid = getuid(); + +-#if BUILDFLAG(IS_APPLE) ++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) + // Based on the POSIX.1-2008 2013 edition documentation for setreuid() and + // setregid(), setreuid() and setregid() alone should be sufficient to drop + // privileges. The standard specifies that the saved ID should be set to the diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_signals.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_signals.cc new file mode 100644 index 000000000000..af3e3cb7d4d0 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_signals.cc @@ -0,0 +1,33 @@ +--- src/3rdparty/chromium/third_party/crashpad/crashpad/util/posix/signals.cc.orig 2022-08-31 12:19:35 UTC ++++ src/3rdparty/chromium/third_party/crashpad/crashpad/util/posix/signals.cc +@@ -51,7 +51,7 @@ constexpr int kCrashSignals[] = { + #if defined(SIGEMT) + SIGEMT, + #endif // defined(SIGEMT) +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + SIGXCPU, + SIGXFSZ, + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +@@ -91,7 +91,7 @@ constexpr int kTerminateSignals[] = { + SIGXCPU, + SIGXFSZ, + #endif // BUILDFLAG(IS_APPLE) +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + SIGIO, + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + }; +@@ -251,8 +251,12 @@ bool Signals::WillSignalReraiseAutonomously(const sigi + // remains. See 10.12.3 xnu-3789.41.3/bsd/kern/kern_sig.c + // psignal_internal(). + (code > 0 && ++#if defined(SI_ASYNCIO) + code != SI_ASYNCIO && ++#endif ++#if defined(SI_MESGQ) + code != SI_MESGQ && ++#endif + code != SI_QUEUE && + code != SI_TIMER && + code != SI_USER && diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_symbolic__constants__posix.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_symbolic__constants__posix.cc new file mode 100644 index 000000000000..4de23be51e5a --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_symbolic__constants__posix.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/third_party/crashpad/crashpad/util/posix/symbolic_constants_posix.cc.orig 2022-04-21 18:48:31 UTC ++++ src/3rdparty/chromium/third_party/crashpad/crashpad/util/posix/symbolic_constants_posix.cc +@@ -67,7 +67,7 @@ constexpr const char* kSignalNames[] = { + "INFO", + "USR1", + "USR2", +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + #if defined(ARCH_CPU_MIPS_FAMILY) + "HUP", + "INT", +@@ -138,7 +138,7 @@ constexpr const char* kSignalNames[] = { + #endif // defined(ARCH_CPU_MIPS_FAMILY) + #endif + }; +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + // NSIG is 64 to account for real-time signals. + static_assert(std::size(kSignalNames) == 32, "kSignalNames length"); + #else diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crc32c_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crc32c_BUILD.gn index 43f6c7e72760..f6bf968b709f 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crc32c_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_crc32c_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/crc32c/BUILD.gn.orig 2022-02-07 13:39:41 UTC +--- src/3rdparty/chromium/third_party/crc32c/BUILD.gn.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/third_party/crc32c/BUILD.gn -@@ -47,7 +47,7 @@ config("crc32c_config") { +@@ -46,7 +46,7 @@ config("crc32c_config") { } # Android added <sys/auxv.h> in API level 18. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_dawn_include_dawn_native_VulkanBackend.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_dawn_include_dawn_native_VulkanBackend.h index 790f62477c31..bb7e4435422f 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_dawn_include_dawn_native_VulkanBackend.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_dawn_include_dawn_native_VulkanBackend.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/dawn/include/dawn/native/VulkanBackend.h.orig 2022-11-30 08:12:58 UTC +--- src/3rdparty/chromium/third_party/dawn/include/dawn/native/VulkanBackend.h.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/third_party/dawn/include/dawn/native/VulkanBackend.h -@@ -82,7 +82,7 @@ struct ExternalImageExportInfoVk : ExternalImageExport +@@ -80,7 +80,7 @@ struct ExternalImageExportInfoVk : ExternalImageExport }; // Can't use DAWN_PLATFORM_IS(LINUX) since header included in both Dawn and Chrome diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_BUILD.gn new file mode 100644 index 000000000000..4917ac78d8ac --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_BUILD.gn @@ -0,0 +1,10 @@ +--- src/3rdparty/chromium/third_party/ffmpeg/BUILD.gn.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/third_party/ffmpeg/BUILD.gn +@@ -357,7 +357,6 @@ target(link_target_type, "ffmpeg_internal") { + libs += [ + "m", + "z", +- "rt", + ] + } + if (is_component_ffmpeg) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_chromium_scripts_build__ffmpeg.py b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_chromium_scripts_build__ffmpeg.py new file mode 100644 index 000000000000..7399348201c9 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_chromium_scripts_build__ffmpeg.py @@ -0,0 +1,121 @@ +--- src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py +@@ -32,7 +32,7 @@ NDK_ROOT_DIR = os.path.abspath( + SUCCESS_TOKEN = 'THIS_BUILD_WORKED' + + sys.path.append(os.path.join(CHROMIUM_ROOT_DIR, 'build')) +-import gn_helpers ++#import gn_helpers + + BRANDINGS = [ + 'Chrome', +@@ -45,6 +45,8 @@ ARCH_MAP = { + 'linux': [ + 'ia32', 'x64', 'noasm-x64', 'arm', 'arm-neon', 'arm64' + ], ++ 'openbsd': ['x64', 'arm64', 'ia32'], ++ 'freebsd': ['x64', 'arm64', 'ia32'], + 'mac': ['x64', 'arm64'], + 'win': ['ia32', 'x64', 'arm64'], + } +@@ -54,6 +56,8 @@ USAGE_END = """ + Valid combinations are android [%(android)s] + linux [%(linux)s] + mac [%(mac)s] ++ openbsd [%(openbsd)s] ++ freebsd [%(freebsd)s] + win [%(win)s] + + If no target architecture is specified all will be built. +@@ -126,6 +130,10 @@ def PrintAndCheckCall(argv, *args, **kwargs): + def DetermineHostOsAndArch(): + if platform.system() == 'Linux': + host_os = 'linux' ++ if platform.system() == 'OpenBSD': ++ host_os = 'openbsd' ++ elif platform.system() == 'FreeBSD': ++ host_os = 'freebsd' + elif platform.system() == 'Darwin': + host_os = 'mac' + elif platform.system() == 'Windows' or 'CYGWIN_NT' in platform.system(): +@@ -135,7 +143,7 @@ def DetermineHostOsAndArch(): + + if re.match(r'i.86', platform.machine()): + host_arch = 'ia32' +- elif platform.machine() == 'x86_64' or platform.machine() == 'AMD64': ++ elif platform.machine() == 'x86_64' or platform.machine() == 'AMD64' or platform.machine() == 'amd64': + host_arch = 'x64' + elif platform.machine() == 'aarch64': + host_arch = 'arm64' +@@ -152,7 +160,7 @@ def DetermineHostOsAndArch(): + + + def GetDsoName(target_os, dso_name, dso_version): +- if target_os in ('linux', 'linux-noasm', 'android'): ++ if target_os in ('linux', 'linux-noasm', 'android', 'openbsd', 'freebsd'): + return 'lib%s.so.%s' % (dso_name, dso_version) + elif target_os == 'mac': + return 'lib%s.%s.dylib' % (dso_name, dso_version) +@@ -495,7 +503,7 @@ def BuildFFmpeg(target_os, target_arch, host_os, host_ + # removing <sys/sysctl.h> soon, so this is needed to silence a deprecation + # #warning which will be converted to an error via -Werror. + # There is also no prctl.h +- if target_os in ['linux', 'linux-noasm']: ++ if target_os in ['linux', 'linux-noasm', 'openbsd', 'freebsd']: + pre_make_rewrites += [ + (r'(#define HAVE_SYSCTL [01])', + r'#define HAVE_SYSCTL 0 /* \1 -- forced to 0 for Fuchsia */'), +@@ -622,7 +630,7 @@ def main(argv): + configure_args = args[2:] + + +- if target_os not in ('android', 'linux', 'linux-noasm', 'mac', 'win', 'all'): ++ if target_os not in ('android', 'linux', 'linux-noasm', 'mac', 'win', 'all', 'openbsd', 'freebsd'): + parser.print_help() + return 1 + +@@ -744,7 +752,7 @@ def ConfigureAndBuild(target_arch, target_os, host_os, + '--enable-parser=vp3,vp8', + ]) + +- if target_os in ('linux', 'linux-noasm', 'android'): ++ if target_os in ('linux', 'linux-noasm', 'android', 'openbsd', 'freebsd'): + if target_arch == 'x64': + if target_os == 'android': + configure_flags['Common'].extend([ +@@ -754,7 +762,7 @@ def ConfigureAndBuild(target_arch, target_os, host_os, + configure_flags['Common'].extend([ + '--enable-lto', + '--arch=x86_64', +- '--target-os=linux', ++ '--target-os=' + target_os, + ]) + + if host_arch != 'x64': +@@ -845,7 +853,7 @@ def ConfigureAndBuild(target_arch, target_os, host_os, + '--extra-cflags=-mfpu=vfpv3-d16', + ]) + elif target_arch == 'arm64': +- if target_os != 'android': ++ if target_os != 'android' and target_os != 'openbsd' and target_os != 'freebsd': + if host_arch != 'arm64': + configure_flags['Common'].extend([ + '--enable-cross-compile', +@@ -910,7 +918,7 @@ def ConfigureAndBuild(target_arch, target_os, host_os, + '--disable-mips64r2', + '--enable-msa', + ]) +- if target_os == 'linux': ++ if target_os == 'Linux': + configure_flags['Common'].extend([ + '--enable-cross-compile', + '--target-os=linux', +@@ -1061,7 +1069,7 @@ def ConfigureAndBuild(target_arch, target_os, host_os, + 'Chrome', configure_flags['Common'] + configure_flags['ChromeAndroid'] + + configure_args) + +- if target_os in ['linux', 'linux-noasm']: ++ if target_os in ['linux', 'linux-noasm', 'openbsd', 'freebsd']: + # ChromeOS enables MPEG4 which requires error resilience :( + chrome_os_flags = ( + configure_flags['Common'] + configure_flags['Chrome'] + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_chromium_scripts_robo__lib_config.py b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_chromium_scripts_robo__lib_config.py new file mode 100644 index 000000000000..c75d668bf1be --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_chromium_scripts_robo__lib_config.py @@ -0,0 +1,53 @@ +--- src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/robo_lib/config.py.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/robo_lib/config.py +@@ -35,7 +35,7 @@ class RoboConfiguration: + self._patches_commit_title = "Chromium patches file" + # Title of the commit with README.chromium + self._readme_chromium_commit_title = "README.chromium file" +- self.EnsureHostInfo() ++ #self.EnsureHostInfo() + self.EnsureChromeSrc() + self.EnsureScriptDirectory() + +@@ -47,18 +47,15 @@ class RoboConfiguration: + self._llvm_path = os.path.join(self.chrome_src(), "third_party", + "llvm-build", "Release+Asserts", "bin") + +- self.EnsurePathContainsLLVM() +- self.EnsureNoMakeInfo() ++ #self.EnsurePathContainsLLVM() ++ #self.EnsureNoMakeInfo() + self.EnsureFFmpegHome() + self.EnsureASANConfig() +- self.ComputeBranchName() ++ #self.ComputeBranchName() + if not quiet: + shell.log(f"Using chrome src: {self.chrome_src()}") + shell.log(f"Using script dir: {self._script_directory}") + shell.log(f"Using ffmpeg home:{self.ffmpeg_home()}") +- shell.log(f"On branch: {self.branch_name()}") +- if self.sushi_branch_name(): +- shell.log(f"On sushi branch: {self.sushi_branch_name()}") + + # Filename that we'll ask generate_gn.py to write git commands to. + # TODO: Should this use script_directory, or stay with ffmpeg? As long as +@@ -149,7 +146,7 @@ class RoboConfiguration: + """Ensure that the host architecture and platform are set.""" + kernel, host, os, *rest = shell.output_or_error(["uname", "-a"]).split() + assert kernel in ("Linux", "linux") +- assert "x86_64" in rest ++ assert ("x86_64", "amd64") in rest + self._host_operating_system = "linux" + self._host_architecture = "x64" + +@@ -165,8 +162,8 @@ class RoboConfiguration: + wd = os.getcwd() + # Walk up the tree until we find src/AUTHORS + while wd != "/": +- if os.path.isfile(os.path.join(wd, "src", "AUTHORS")): +- self._chrome_src = os.path.join(wd, "src") ++ if os.path.isfile(os.path.join(wd, "third_party", "DEPS")): ++ self._chrome_src = wd + return + wd = os.path.dirname(wd) + raise Exception("could not find src/AUTHORS in any parent of the wd") diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_configure b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_configure new file mode 100644 index 000000000000..7978d8f99f43 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_configure @@ -0,0 +1,10 @@ +--- src/3rdparty/chromium/third_party/ffmpeg/configure.orig 2023-10-12 11:37:12 UTC ++++ src/3rdparty/chromium/third_party/ffmpeg/configure +@@ -5613,6 +5613,7 @@ case $target_os in + disable symver + ;; + freebsd) ++ enable section_data_rel_ro + ;; + bsd/os) + add_extralibs -lpoll -lgnugetopt diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_libavcodec_x86_cabac.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_libavcodec_x86_cabac.h new file mode 100644 index 000000000000..67db6588d1e4 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_libavcodec_x86_cabac.h @@ -0,0 +1,12 @@ +--- src/3rdparty/chromium/third_party/ffmpeg/libavcodec/x86/cabac.h.orig 2022-02-07 13:39:41 UTC ++++ src/3rdparty/chromium/third_party/ffmpeg/libavcodec/x86/cabac.h +@@ -31,7 +31,8 @@ + + #if (defined(__i386) && defined(__clang__) && (__clang_major__<2 || (__clang_major__==2 && __clang_minor__<10)))\ + || ( !defined(__clang__) && defined(__llvm__) && __GNUC__==4 && __GNUC_MINOR__==2 && __GNUC_PATCHLEVEL__<=1)\ +- || (defined(__INTEL_COMPILER) && defined(_MSC_VER)) ++ || (defined(__INTEL_COMPILER) && defined(_MSC_VER)) \ ++ || ((defined(__FreeBSD__) || defined(__OpenBSD__)) && defined(__i386)) + # define BROKEN_COMPILER 1 + #else + # define BROKEN_COMPILER 0 diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_libavcodec_x86_fft.asm b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_libavcodec_x86_fft.asm new file mode 100644 index 000000000000..54e1caaeae4e --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_libavcodec_x86_fft.asm @@ -0,0 +1,108 @@ +--- src/3rdparty/chromium/third_party/ffmpeg/libavcodec/x86/fft.asm.orig 2023-07-16 15:47:57 UTC ++++ src/3rdparty/chromium/third_party/ffmpeg/libavcodec/x86/fft.asm +@@ -296,6 +296,7 @@ INIT_YMM avx + %if HAVE_AVX_EXTERNAL + align 16 + fft8_avx: ++ _CET_ENDBR + mova m0, Z(0) + mova m1, Z(1) + T8_AVX m0, m1, m2, m3, m4 +@@ -306,6 +307,7 @@ fft8_avx: + + align 16 + fft16_avx: ++ _CET_ENDBR + mova m2, Z(2) + mova m3, Z(3) + T4_SSE m2, m3, m7 +@@ -343,6 +345,7 @@ fft16_avx: + + align 16 + fft32_avx: ++ _CET_ENDBR + call fft16_avx + + mova m0, Z(4) +@@ -367,6 +370,7 @@ fft32_avx: + ret + + fft32_interleave_avx: ++ _CET_ENDBR + call fft32_avx + mov r2d, 32 + .deint_loop: +@@ -390,6 +394,7 @@ INIT_XMM sse + align 16 + fft4_avx: + fft4_sse: ++ _CET_ENDBR + mova m0, Z(0) + mova m1, Z(1) + T4_SSE m0, m1, m2 +@@ -399,6 +404,7 @@ fft4_sse: + + align 16 + fft8_sse: ++ _CET_ENDBR + mova m0, Z(0) + mova m1, Z(1) + T4_SSE m0, m1, m2 +@@ -413,6 +419,7 @@ fft8_sse: + + align 16 + fft16_sse: ++ _CET_ENDBR + mova m0, Z(0) + mova m1, Z(1) + T4_SSE m0, m1, m2 +@@ -441,6 +448,7 @@ fft16_sse: + %macro DECL_PASS 2+ ; name, payload + align 16 + %1: ++ _CET_ENDBR + DEFINE_ARGS zc, w, n, o1, o3 + lea o3q, [nq*3] + lea o1q, [nq*8] +@@ -457,10 +465,6 @@ DEFINE_ARGS zc, w, n, o1, o3 + %macro FFT_DISPATCH 2; clobbers 5 GPRs, 8 XMMs + lea r2, [dispatch_tab%1] + mov r2, [r2 + (%2q-2)*gprsize] +-%ifdef PIC +- lea r3, [$$] +- add r2, r3 +-%endif + call r2 + %endmacro ; FFT_DISPATCH + +@@ -585,11 +589,7 @@ cglobal imdct_calc, 3,5,3 + jl .loop + RET + +-%ifdef PIC +-%define SECTION_REL - $$ +-%else + %define SECTION_REL +-%endif + + %macro DECL_FFT 1-2 ; nbits, suffix + %ifidn %0, 1 +@@ -613,6 +613,7 @@ cglobal imdct_calc, 3,5,3 + + align 16 + fft %+ n %+ fullsuffix: ++ _CET_ENDBR + call fft %+ n2 %+ SUFFIX + add r0, n*4 - (n&(-2<<%1)) + call fft %+ n4 %+ SUFFIX +@@ -627,8 +628,10 @@ fft %+ n %+ fullsuffix: + %endrep + %undef n + ++[SECTION .data.rel.ro write] + align 8 + dispatch_tab %+ fullsuffix: pointer list_of_fft ++__?SECT?__ + %endmacro ; DECL_FFT + + %if HAVE_AVX_EXTERNAL diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_cpu.c b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_cpu.c new file mode 100644 index 000000000000..bdf96b980918 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_cpu.c @@ -0,0 +1,14 @@ +--- src/3rdparty/chromium/third_party/ffmpeg/libavutil/cpu.c.orig 2022-07-22 17:30:31 UTC ++++ src/3rdparty/chromium/third_party/ffmpeg/libavutil/cpu.c +@@ -38,10 +38,7 @@ + #if HAVE_GETPROCESSAFFINITYMASK || HAVE_WINRT + #include <windows.h> + #endif +-#if HAVE_SYSCTL +-#if HAVE_SYS_PARAM_H +-#include <sys/param.h> +-#endif ++#if HAVE_SYSCTL && !defined(__OpenBSD__) + #include <sys/types.h> + #include <sys/sysctl.h> + #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_mem.c b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_mem.c new file mode 100644 index 000000000000..ee8d0e6f047f --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_mem.c @@ -0,0 +1,12 @@ +--- src/3rdparty/chromium/third_party/ffmpeg/libavutil/mem.c.orig 2022-05-19 14:06:27 UTC ++++ src/3rdparty/chromium/third_party/ffmpeg/libavutil/mem.c +@@ -33,9 +33,6 @@ + #include <stdlib.h> + #include <stdatomic.h> + #include <string.h> +-#if HAVE_MALLOC_H +-#include <malloc.h> +-#endif + + #include "attributes.h" + #include "avassert.h" diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_random__seed.c b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_random__seed.c new file mode 100644 index 000000000000..56f6d74cfa8e --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_random__seed.c @@ -0,0 +1,14 @@ +--- src/3rdparty/chromium/third_party/ffmpeg/libavutil/random_seed.c.orig 2023-09-13 13:13:30 UTC ++++ src/3rdparty/chromium/third_party/ffmpeg/libavutil/random_seed.c +@@ -35,6 +35,11 @@ + #elif CONFIG_OPENSSL + #include <openssl/rand.h> + #endif ++#if HAVE_ARC4RANDOM_BUF ++#undef __BSD_VISIBLE ++#define __BSD_VISIBLE 1 ++#include <stdlib.h> ++#endif + #include <fcntl.h> + #include <math.h> + #include <time.h> diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_x86_x86inc.asm b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_x86_x86inc.asm new file mode 100644 index 000000000000..b7c6baa11d8b --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_x86_x86inc.asm @@ -0,0 +1,23 @@ +--- src/3rdparty/chromium/third_party/ffmpeg/libavutil/x86/x86inc.asm.orig 2023-07-16 15:47:57 UTC ++++ src/3rdparty/chromium/third_party/ffmpeg/libavutil/x86/x86inc.asm +@@ -53,6 +53,12 @@ + %endif + %endif + ++%if ARCH_X86_64 ++ %define _CET_ENDBR endbr64 ++%else ++ %define _CET_ENDBR ++%endif ++ + %define WIN64 0 + %define UNIX64 0 + %if ARCH_X86_64 +@@ -768,6 +774,7 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, jnl, jnle, jg, + %endif + align function_align + %2: ++ _CET_ENDBR + RESET_MM_PERMUTATION ; needed for x86-64, also makes disassembly somewhat nicer + %xdefine rstk rsp ; copy of the original stack pointer, used when greater alignment than the known stack alignment is required + %assign stack_offset 0 ; stack pointer offset relative to the return address diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_fontconfig_include_config.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_fontconfig_include_config.h new file mode 100644 index 000000000000..5e821ba16c3d --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_fontconfig_include_config.h @@ -0,0 +1,89 @@ +--- src/3rdparty/chromium/third_party/fontconfig/include/config.h.orig 2023-04-05 11:05:06 UTC ++++ src/3rdparty/chromium/third_party/fontconfig/include/config.h +@@ -18,13 +18,13 @@ + #define ENABLE_NLS 1 + + /* Additional font directories */ +-#define FC_ADD_FONTS "yes" ++#define FC_ADD_FONTS "/usr/local/share/fonts" + + /* Architecture prefix to use for cache file names */ + /* #undef FC_ARCHITECTURE */ + + /* System font directory */ +-#define FC_DEFAULT_FONTS "<dir>/usr/share/fonts</dir>" ++#define FC_DEFAULT_FONTS "<dir>/usr/X11R6/lib/X11/fonts</dir>" + + /* The type of len parameter of the gperf hash/lookup function */ + #define FC_GPERF_SIZE_T size_t +@@ -99,7 +99,7 @@ + #define HAVE_GETPAGESIZE 1 + + /* Define to 1 if you have the `getprogname' function. */ +-/* #undef HAVE_GETPROGNAME */ ++#define HAVE_GETPROGNAME 1 + + /* Define if the GNU gettext() function is already present or preinstalled. */ + #define HAVE_GETTEXT 1 +@@ -141,7 +141,7 @@ + /* #undef HAVE_NDIR_H */ + + /* Define to 1 if you have the 'posix_fadvise' function. */ +-#define HAVE_POSIX_FADVISE 1 ++#define HAVE_POSIX_FADVISE 0 + + /* Have POSIX threads */ + #define HAVE_PTHREAD 1 +@@ -156,11 +156,14 @@ + #define HAVE_RANDOM 1 + + /* Define to 1 if you have the `random_r' function. */ +-#define HAVE_RANDOM_R 1 ++/* #undef HAVE_RANDOM_R */ + + /* Define to 1 if you have the `rand_r' function. */ + #define HAVE_RAND_R 1 + ++/* Define to 1 if you have the `arc4_random' function. */ ++#define HAVE_ARC4RANDOM 1 ++ + /* Define to 1 if you have the `readlink' function. */ + #define HAVE_READLINK 1 + +@@ -204,7 +207,7 @@ + #define HAVE_STRUCT_STATFS_F_FLAGS 1 + + /* Define to 1 if `f_fstypename' is a member of `struct statfs'. */ +-/* #undef HAVE_STRUCT_STATFS_F_FSTYPENAME */ ++#define HAVE_STRUCT_STATFS_F_FSTYPENAME 1 + + /* Define to 1 if `f_basetype' is a member of `struct statvfs'. */ + /* #undef HAVE_STRUCT_STATVFS_F_BASETYPE */ +@@ -230,7 +233,7 @@ + #define HAVE_SYS_PARAM_H 1 + + /* Define to 1 if you have the <sys/statfs.h> header file. */ +-#define HAVE_SYS_STATFS_H 1 ++/* #undef HAVE_SYS_STATFS_H */ + + /* Define to 1 if you have the <sys/statvfs.h> header file. */ + #define HAVE_SYS_STATVFS_H 1 +@@ -242,7 +245,7 @@ + #define HAVE_SYS_TYPES_H 1 + + /* Define to 1 if you have the <sys/vfs.h> header file. */ +-#define HAVE_SYS_VFS_H 1 ++/* #undef HAVE_SYS_VFS_H */ + + /* Define to 1 if you have the <unistd.h> header file. */ + #define HAVE_UNISTD_H 1 +@@ -265,7 +268,8 @@ + /* Define to 1 if you have the `_mktemp_s' function. */ + /* #undef HAVE__MKTEMP_S */ + +-/* Define to the sub-directory where libtool stores uninstalled libraries. */ ++/* Define to the sub-directory in which libtool stores uninstalled libraries. ++ */ + #define LT_OBJDIR ".libs/" + + /* Name of package */ diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_fontconfig_src_src_fccompat.c b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_fontconfig_src_src_fccompat.c new file mode 100644 index 000000000000..d61aaa4c78cc --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_fontconfig_src_src_fccompat.c @@ -0,0 +1,13 @@ +--- src/3rdparty/chromium/third_party/fontconfig/src/src/fccompat.c.orig 2023-04-05 11:05:06 UTC ++++ src/3rdparty/chromium/third_party/fontconfig/src/src/fccompat.c +@@ -184,7 +184,9 @@ FcRandom(void) + { + int32_t result; + +-#if HAVE_RANDOM_R ++#if HAVE_ARC4RANDOM ++ result = arc4random() & 0x7fffffff; ++#elif HAVE_RANDOM_R + static struct random_data fcrandbuf; + static char statebuf[256]; + static FcBool initialized = FcFalse; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ipcz_src_reference__drivers_random.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ipcz_src_reference__drivers_random.cc index 07420a924166..37f7dfaef0fc 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ipcz_src_reference__drivers_random.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_ipcz_src_reference__drivers_random.cc @@ -1,16 +1,16 @@ ---- src/3rdparty/chromium/third_party/ipcz/src/reference_drivers/random.cc.orig 2022-09-24 10:57:32 UTC +--- src/3rdparty/chromium/third_party/ipcz/src/reference_drivers/random.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/third_party/ipcz/src/reference_drivers/random.cc -@@ -15,7 +15,7 @@ - #include <limits> +@@ -14,7 +14,7 @@ + #include <windows.h> #elif BUILDFLAG(IS_FUCHSIA) #include <zircon/syscalls.h> -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include <asm/unistd.h> - #include <errno.h> #include <sys/syscall.h> -@@ -78,7 +78,7 @@ void RandomBytes(absl::Span<uint8_t> destination) { - ABSL_ASSERT(ok); + #include <unistd.h> +@@ -86,7 +86,7 @@ void RandomBytes(absl::Span<uint8_t> destination) { + process_prng_fn(destination.data(), destination.size()); #elif BUILDFLAG(IS_FUCHSIA) zx_cprng_draw(destination.data(), destination.size()); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_leveldatabase_env__chromium.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_leveldatabase_env__chromium.cc index c42f7036b5ad..d3327af989cd 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_leveldatabase_env__chromium.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_leveldatabase_env__chromium.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/leveldatabase/env_chromium.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/third_party/leveldatabase/env_chromium.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/third_party/leveldatabase/env_chromium.cc -@@ -318,7 +318,8 @@ ChromiumWritableFile::ChromiumWritableFile(const std:: +@@ -320,7 +320,8 @@ ChromiumWritableFile::ChromiumWritableFile(const std:: Status ChromiumWritableFile::SyncParent() { TRACE_EVENT0("leveldb", "SyncParent"); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_libaom_source_libaom_aom__ports_aarch64__cpudetect.c b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_libaom_source_libaom_aom__ports_aarch64__cpudetect.c new file mode 100644 index 000000000000..e9a5a5d7dccb --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_libaom_source_libaom_aom__ports_aarch64__cpudetect.c @@ -0,0 +1,39 @@ +--- src/3rdparty/chromium/third_party/libaom/source/libaom/aom_ports/aarch64_cpudetect.c.orig 2023-09-17 18:22:45 UTC ++++ src/3rdparty/chromium/third_party/libaom/source/libaom/aom_ports/aarch64_cpudetect.c +@@ -85,13 +85,35 @@ static int arm_get_cpu_caps(void) { + return flags; + } + +-#elif defined(ANDROID_USE_CPU_FEATURES_LIB) ++#elif defined(ANDROID_USE_CPU_FEATURES_LIB) || defined(__FreeBSD__) + + static int arm_get_cpu_caps(void) { + int flags = 0; + #if HAVE_NEON + flags |= HAS_NEON; // Neon is mandatory in Armv8.0-A. + #endif // HAVE_NEON ++ return flags; ++} ++ ++#elif defined(__OpenBSD__) ++#include <sys/sysctl.h> ++#include <machine/cpu.h> ++#include <machine/armreg.h> ++ ++static int arm_get_cpu_caps(void) { ++ int flags = 0; ++ int isar0_mib[] = { CTL_MACHDEP, CPU_ID_AA64ISAR0 }; ++ uint64_t cpu_id = 0; ++ size_t len = sizeof(cpu_id); ++ ++ flags |= HAS_NEON; // Neon is mandatory in Armv8.0-A. ++ ++ if (sysctl(isar0_mib, 2, &cpu_id, &len, NULL, 0) < 0) ++ return flags; ++ ++ if (ID_AA64ISAR0_AES(cpu_id) >= ID_AA64ISAR0_CRC32_BASE) ++ flags |= HAS_ARM_CRC32; ++ + return flags; + } + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_libsync_src_sync.c b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_libsync_src_sync.c index 4506da637606..7ea69d700512 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_libsync_src_sync.c +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_libsync_src_sync.c @@ -1,16 +1,16 @@ ---- src/3rdparty/chromium/third_party/libsync/src/sync.c.orig 2023-02-08 09:03:45 UTC +--- src/3rdparty/chromium/third_party/libsync/src/sync.c.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/third_party/libsync/src/sync.c -@@ -17,7 +17,9 @@ +@@ -17,8 +17,8 @@ */ #include <fcntl.h> -+#if !defined(__OpenBSD__) - #include <malloc.h> -+#endif +-#include <malloc.h> #include <stdint.h> ++#include <stdlib.h> #include <string.h> #include <errno.h> -@@ -29,6 +31,12 @@ + #include <poll.h> +@@ -29,6 +29,12 @@ #include <sync/sync.h> diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_libusb_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_libusb_BUILD.gn new file mode 100644 index 000000000000..22b7c68e1787 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_libusb_BUILD.gn @@ -0,0 +1,52 @@ +--- src/3rdparty/chromium/third_party/libusb/BUILD.gn.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/third_party/libusb/BUILD.gn +@@ -3,7 +3,7 @@ + # found in the LICENSE file. + + # libusb is only used by //services/device/usb on macOS. +-assert(is_mac) ++assert(is_mac || is_bsd) + + import("//build/config/chromeos/ui_mode.gni") + import("//build/config/features.gni") +@@ -103,7 +103,7 @@ static_library("libusb") { + ] + } + +- if (is_linux || is_chromeos) { ++ if ((is_linux || is_chromeos) && !is_bsd) { + sources += [ + "src/libusb/os/linux_usbfs.c", + "src/libusb/os/linux_usbfs.h", +@@ -114,11 +114,21 @@ static_library("libusb") { + ] + } + ++ if (is_openbsd) { ++ sources += [ ++ "src/libusb/os/openbsd_usb.c", ++ ] ++ defines += [ ++ "OS_OPENBSD=1", ++ "_GNU_SOURCE=1", ++ ] ++ } ++ + if (is_chromeos_ash) { + defines += [ "USBI_TIMERFD_AVAILABLE" ] + } + +- if (use_udev) { ++ if (use_udev && !is_bsd) { + sources += [ "src/libusb/os/linux_udev.cc" ] + defines += [ + "HAVE_LIBUDEV=1", +@@ -127,7 +137,7 @@ static_library("libusb") { + deps += [ "//build/linux/libudev" ] + } + +- if ((is_linux || is_chromeos) && !use_udev) { ++ if ((is_linux || is_chromeos) && !use_udev && !is_bsd) { + sources += [ "src/libusb/os/linux_netlink.c" ] + defines += [ "HAVE_LINUX_NETLINK_H" ] + } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_libusb_src_libusb_core.c b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_libusb_src_libusb_core.c new file mode 100644 index 000000000000..e26d42ffdd14 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_libusb_src_libusb_core.c @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/libusb/src/libusb/core.c.orig 2022-02-07 13:39:41 UTC ++++ src/3rdparty/chromium/third_party/libusb/src/libusb/core.c +@@ -448,7 +448,7 @@ libusb_free_device_list(list, 1); + * which grows when required. it can be freed once discovery has completed, + * eliminating the need for a list node in the libusb_device structure + * itself. */ +-#define DISCOVERED_DEVICES_SIZE_STEP 8 ++#define DISCOVERED_DEVICES_SIZE_STEP 16 + + static struct discovered_devs *discovered_devs_alloc(void) + { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_libusb_src_libusb_os_threads__posix.c b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_libusb_src_libusb_os_threads__posix.c new file mode 100644 index 000000000000..369d72508877 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_libusb_src_libusb_os_threads__posix.c @@ -0,0 +1,24 @@ +--- src/3rdparty/chromium/third_party/libusb/src/libusb/os/threads_posix.c.orig 2023-03-09 06:31:50 UTC ++++ src/3rdparty/chromium/third_party/libusb/src/libusb/os/threads_posix.c +@@ -19,9 +19,11 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +-#if defined(__linux__) || defined(__OpenBSD__) ++#if defined(__linux__) + # include <unistd.h> + # include <sys/syscall.h> ++#elif defined(__OpenBSD__) ++# include <unistd.h> + #elif defined(__APPLE__) + # include <mach/mach.h> + #elif defined(__CYGWIN__) +@@ -65,7 +67,7 @@ int usbi_get_tid(void) + #elif defined(__OpenBSD__) + /* The following only works with OpenBSD > 5.1 as it requires + real thread support. For 5.1 and earlier, -1 is returned. */ +- ret = syscall(SYS_getthrid); ++ ret = getthrid(); + #elif defined(__APPLE__) + ret = mach_thread_self(); + mach_port_deallocate(mach_task_self(), ret); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_libxml_linux_config.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_libxml_linux_config.h new file mode 100644 index 000000000000..34e828185f7b --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_libxml_linux_config.h @@ -0,0 +1,12 @@ +--- src/3rdparty/chromium/third_party/libxml/linux/config.h.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/third_party/libxml/linux/config.h +@@ -69,6 +69,9 @@ + /* Define to 1 if you have the <pthread.h> header file. */ + #define HAVE_PTHREAD_H /**/ + ++/* Define to 1 if you have the `arc4random' function. */ ++#define HAVE_ARC4RANDOM 1 ++ + /* Define to 1 if you have the `rand_r' function. */ + + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_libxml_src_dict.c b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_libxml_src_dict.c new file mode 100644 index 000000000000..ce42ad8fb0f6 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_libxml_src_dict.c @@ -0,0 +1,41 @@ +--- src/3rdparty/chromium/third_party/libxml/src/dict.c.orig 2023-03-09 06:31:50 UTC ++++ src/3rdparty/chromium/third_party/libxml/src/dict.c +@@ -133,7 +133,7 @@ struct _xmlDict { + static xmlMutex xmlDictMutex; + + #ifdef DICT_RANDOMIZATION +-#ifdef HAVE_RAND_R ++#if defined(HAVE_RAND_R) && !defined(HAVE_ARC4RANDOM) + /* + * Internal data for random function, protected by xmlDictMutex + */ +@@ -160,7 +160,7 @@ int xmlInitializeDict(void) { + int __xmlInitializeDict(void) { + xmlInitMutex(&xmlDictMutex); + +-#ifdef DICT_RANDOMIZATION ++#if defined(DICT_RANDOMIZATION) && !defined(HAVE_ARC4RANDOM) + #ifdef HAVE_RAND_R + rand_seed = time(NULL); + rand_r(& rand_seed); +@@ -175,13 +175,17 @@ int __xmlInitializeDict(void) { + int __xmlRandom(void) { + int ret; + ++#ifdef HAVE_ARC4RANDOM ++ ret = arc4random(); ++#else + xmlMutexLock(&xmlDictMutex); +-#ifdef HAVE_RAND_R ++# ifdef HAVE_RAND_R + ret = rand_r(& rand_seed); +-#else ++# else + ret = rand(); +-#endif ++# endif + xmlMutexUnlock(&xmlDictMutex); ++#endif + return(ret); + } + #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_lzma__sdk_C_CpuArch.c b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_lzma__sdk_C_CpuArch.c new file mode 100644 index 000000000000..de897e5ab5f8 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_lzma__sdk_C_CpuArch.c @@ -0,0 +1,44 @@ +--- src/3rdparty/chromium/third_party/lzma_sdk/C/CpuArch.c.orig 2022-09-04 11:56:14 UTC ++++ src/3rdparty/chromium/third_party/lzma_sdk/C/CpuArch.c +@@ -412,12 +412,40 @@ BoolInt CPU_IsSupported_SHA1(void) { return APPLE_CRYP + BoolInt CPU_IsSupported_SHA2(void) { return APPLE_CRYPTO_SUPPORT_VAL; } + BoolInt CPU_IsSupported_AES (void) { return APPLE_CRYPTO_SUPPORT_VAL; } + ++#elif defined(__OpenBSD__) + ++#include <sys/param.h> ++#include <sys/sysctl.h> ++#include <machine/cpu.h> ++#include <machine/armreg.h> ++ ++BoolInt CPU_IsSupported_NEON() { return 1; } ++ ++#define MY_HWCAP_CHECK_FUNC_2(name1, name2) \ ++ BoolInt CPU_IsSupported_ ## name1() { \ ++ int isar0_mib[] = { CTL_MACHDEP, CPU_ID_AA64ISAR0 }; \ ++ size_t len = sizeof(uint64_t); \ ++ uint64_t cpu_id = 0; \ ++ if (sysctl(isar0_mib, 2, &cpu_id, &len, NULL, 0) < 0) \ ++ return 0; \ ++ if (ID_AA64ISAR0_ ## name2(cpu_id) >= ID_AA64ISAR0_## name2 ##_BASE) \ ++ return 1; \ ++ return 0; \ ++ } ++ ++#define MY_HWCAP_CHECK_FUNC(name) \ ++ MY_HWCAP_CHECK_FUNC_2(name, name) ++ ++MY_HWCAP_CHECK_FUNC (CRC32) ++MY_HWCAP_CHECK_FUNC (SHA1) ++MY_HWCAP_CHECK_FUNC (SHA2) ++MY_HWCAP_CHECK_FUNC (AES) ++ + #else // __APPLE__ + + #include <sys/auxv.h> + +-#if !defined(ARMV8_OS_FUCHSIA) ++#if !defined(ARMV8_OS_FUCHSIA) && !defined(__FreeBSD__) + #define USE_HWCAP + #endif // !defined(ARMV8_OS_FUCHSIA) + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_maldoca_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_maldoca_BUILD.gn new file mode 100644 index 000000000000..22f2c7c85230 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_maldoca_BUILD.gn @@ -0,0 +1,13 @@ +--- src/3rdparty/chromium/third_party/maldoca/BUILD.gn.orig 2023-04-05 11:05:06 UTC ++++ src/3rdparty/chromium/third_party/maldoca/BUILD.gn +@@ -264,6 +264,10 @@ source_set("maldoca-public-headers") { + ":maldoca_chromium_config", + ":maldoca_flags", + ] ++ ++ if (is_bsd) { ++ libs = [ "iconv" ] ++ } + } + + static_library("maldoca") { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_maldoca_src_maldoca_base_get__runfiles__dir.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_maldoca_src_maldoca_base_get__runfiles__dir.cc new file mode 100644 index 000000000000..012d63151999 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_maldoca_src_maldoca_base_get__runfiles__dir.cc @@ -0,0 +1,32 @@ +--- src/3rdparty/chromium/third_party/maldoca/src/maldoca/base/get_runfiles_dir.cc.orig 2022-02-07 13:39:41 UTC ++++ src/3rdparty/chromium/third_party/maldoca/src/maldoca/base/get_runfiles_dir.cc +@@ -24,11 +24,6 @@ + #error "__APPLE__ not supported." + #endif + +-#if defined(__FreeBSD__) +-// TODO(#110) FreeBSD-specific headers. +-#error "__FreeBSD__ not supported." +-#endif +- + #if defined(_WIN32) + #include <windows.h> + #define PATH_MAX MAX_PATH +@@ -50,8 +45,6 @@ std::string GetExecutablePath() { + char exe_path[PATH_MAX] = {0}; + #ifdef __APPLE__ + #error "__APPLE__ not supported."; +-#elif defined(__FreeBSD__) +-#error "__FreeBSD__ not supported."; + #elif defined(_WIN32) + HMODULE hModule = GetModuleHandleW(NULL); + WCHAR wc_file_path[MAX_PATH] = {0}; +@@ -97,8 +90,6 @@ std::string GetExecutablePath() { + absl::Status IsDirectory(const std::string& name) { + #ifdef __APPLE__ + #error "__APPLE__ not supported."; +-#elif defined(__FreeBSD__) +-#error "__FreeBSD__ not supported."; + #else + struct stat sbuf; + if (stat(name.c_str(), &sbuf) != 0) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_maldoca_src_maldoca_service_common_process__doc__wrapper.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_maldoca_src_maldoca_service_common_process__doc__wrapper.cc new file mode 100644 index 000000000000..1124a33989b5 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_maldoca_src_maldoca_service_common_process__doc__wrapper.cc @@ -0,0 +1,29 @@ +--- src/3rdparty/chromium/third_party/maldoca/src/maldoca/service/common/process_doc_wrapper.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/third_party/maldoca/src/maldoca/service/common/process_doc_wrapper.cc +@@ -7,7 +7,7 @@ + #include "build/build_config.h" + + #include "base/files/file_util.h" +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || BUILDFLAG(IS_BSD) + #include "base/strings/string_util.h" + #else + #include "base/strings/string_util_win.h" +@@ -21,7 +21,7 @@ namespace third_party_maldoca { + + + bool ExtensionEqualInCaseSensitive(base::FilePath file_path, std::string extension){ +- #if defined(OS_LINUX) ++ #if defined(OS_LINUX) || BUILDFLAG(IS_BSD) + std::string file_extension = file_path.FinalExtension(); + return base::CompareCaseInsensitiveASCII(file_extension, extension) == 0; + #else +@@ -74,7 +74,7 @@ void AnalyzeOfficeDocument(base::File office_file, + maldoca::DocProcessor doc_processor(processor_config); + + maldoca::ProcessDocumentRequest process_doc_request; +- #if defined(OS_LINUX) ++ #if defined(OS_LINUX) || BUILDFLAG(IS_BSD) + const std::string file_name = file_path.BaseName().value().c_str(); + process_doc_request.set_file_name(file_name); + #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_material__color__utilities_src_cpp_palettes_tones.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_material__color__utilities_src_cpp_palettes_tones.cc new file mode 100644 index 000000000000..5756f922f7d5 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_material__color__utilities_src_cpp_palettes_tones.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/material_color_utilities/src/cpp/palettes/tones.cc.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/third_party/material_color_utilities/src/cpp/palettes/tones.cc +@@ -14,6 +14,8 @@ + * limitations under the License. + */ + ++#include <cmath> ++ + #include "cpp/palettes/tones.h" + + #include <cmath> diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_node_node.py b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_node_node.py new file mode 100644 index 000000000000..8252cc43cf87 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_node_node.py @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/node/node.py.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/third_party/node/node.py +@@ -35,6 +35,8 @@ def GetBinaryPath(): + return os_path.join(os_path.dirname(__file__), *{ + 'Darwin': ('mac', darwin_name, 'bin', 'node'), + 'Linux': ('linux', 'node-linux-x64', 'bin', 'node'), ++ 'OpenBSD': ('openbsd', 'node-openbsd', 'bin', 'node'), ++ 'FreeBSD': ('freebsd', 'node-freebsd', 'bin', 'node'), + 'Windows': ('win', 'node.exe'), + }[platform.system()]) + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_core_fxge_cfx__fontmapper.cpp b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_core_fxge_cfx__fontmapper.cpp index 841874419cc8..cefcd897251a 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_core_fxge_cfx__fontmapper.cpp +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_core_fxge_cfx__fontmapper.cpp @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/third_party/pdfium/core/fxge/cfx_fontmapper.cpp.orig 2022-09-24 10:57:32 UTC +--- src/3rdparty/chromium/third_party/pdfium/core/fxge/cfx_fontmapper.cpp.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/third_party/pdfium/core/fxge/cfx_fontmapper.cpp @@ -157,7 +157,7 @@ constexpr AltFontFamily kAltFontFamilies[] = { {"ForteMT", "Forte"}, diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_pdfium.gni b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_pdfium.gni index 5a5ccd520ed8..838db5141373 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_pdfium.gni +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_pdfium.gni @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/third_party/pdfium/pdfium.gni.orig 2023-02-08 09:03:45 UTC +--- src/3rdparty/chromium/third_party/pdfium/pdfium.gni.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/third_party/pdfium/pdfium.gni -@@ -42,7 +42,7 @@ declare_args() { - pdf_use_cxx20 = is_win && is_component_build - - # Build PDFium with PartitionAlloc as the memory allocator. +@@ -46,7 +46,7 @@ declare_args() { + # PDFium will use PartitionAlloc partitions to separate strings, scalars, + # etc. from other allocations. However, the use of PartitionAlloc for new or + # malloc is controlled by args in build_overrides/partition_alloc.gni. - pdf_use_partition_alloc = pdf_use_partition_alloc_override + pdf_use_partition_alloc = pdf_use_partition_alloc_override && use_partition_alloc_as_malloc - # Build PDFium to use Skia (experimental) for all PDFium graphics. - # If enabled, coexists in build with AGG graphics and the default + # Temporary config allowing chromium to switch its location of the + # partition_alloc library. https://crbug.com/1467773 diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_third__party_base_compiler__specific.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_third__party_base_compiler__specific.h new file mode 100644 index 000000000000..0479b60ec02a --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_third__party_base_compiler__specific.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/pdfium/third_party/base/compiler_specific.h.orig 2023-05-31 08:12:17 UTC ++++ src/3rdparty/chromium/third_party/pdfium/third_party/base/compiler_specific.h +@@ -17,7 +17,7 @@ + // Annotate a function indicating it should not be inlined. + // Use like: + // NOINLINE void DoStuff() { ... } +-#if defined(__clang__) && HAS_ATTRIBUTE(noinline) ++#if defined(__clang__) && (__clang_major__ >= 15) && HAS_ATTRIBUTE(noinline) + #define NOINLINE [[clang::noinline]] + #elif defined(COMPILER_GCC) && HAS_ATTRIBUTE(noinline) + #define NOINLINE __attribute__((noinline)) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_tracing_track__event__legacy.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_tracing_internal_track__event__legacy.h index 26507d13fb91..01cf9543d4f4 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_tracing_track__event__legacy.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_tracing_internal_track__event__legacy.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/track_event_legacy.h.orig 2023-04-05 11:59:13 UTC -+++ src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/track_event_legacy.h -@@ -267,7 +267,7 @@ class PERFETTO_EXPORT_COMPONENT LegacyTraceId { +--- src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/internal/track_event_legacy.h.orig 2023-04-28 17:01:32 UTC ++++ src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/internal/track_event_legacy.h +@@ -249,7 +249,7 @@ class PERFETTO_EXPORT_COMPONENT LegacyTraceId { // are different. E.g. on Mac size_t is considered a different type from // uint64_t even though it has the same size and signedness. // Below we add overloads for those types that are known to cause ambiguity. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_src_base_unix__socket.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_src_base_unix__socket.cc index 94ef36aa2b95..18afd297453e 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_src_base_unix__socket.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_src_base_unix__socket.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/perfetto/src/base/unix_socket.cc.orig 2022-10-24 13:33:33 UTC +--- src/3rdparty/chromium/third_party/perfetto/src/base/unix_socket.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/third_party/perfetto/src/base/unix_socket.cc -@@ -42,7 +42,7 @@ +@@ -44,7 +44,7 @@ #include <unistd.h> #endif @@ -9,7 +9,7 @@ #include <sys/ucred.h> #endif -@@ -803,9 +803,13 @@ void UnixSocket::ReadPeerCredentialsPosix() { +@@ -917,9 +917,13 @@ void UnixSocket::ReadPeerCredentialsPosix() { return; PERFETTO_CHECK(peer_cred_mode_ != SockPeerCredMode::kIgnore); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_src_trace__processor_db_storage_numeric__storage.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_src_trace__processor_db_storage_numeric__storage.cc new file mode 100644 index 000000000000..565f390bca05 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_src_trace__processor_db_storage_numeric__storage.cc @@ -0,0 +1,16 @@ +--- src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/storage/numeric_storage.cc.orig 2023-10-14 11:56:57 UTC ++++ src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/storage/numeric_storage.cc +@@ -245,8 +245,13 @@ BitVector NumericStorage::LinearSearch(FilterOp op, + } else if (const auto* i32 = std::get_if<int32_t>(&*val)) { + auto* start = static_cast<const int32_t*>(data_) + range.start; + TypedLinearSearch(*i32, start, op, builder); ++#if (defined(__OpenBSD__) || defined(__FreeBSD__)) && defined(__i386__) ++ } else if (const auto* db = std::get_if<long double>(&*val)) { ++ auto* start = static_cast<const long double*>(data_) + range.start; ++#else + } else if (const auto* db = std::get_if<double>(&*val)) { + auto* start = static_cast<const double*>(data_) + range.start; ++#endif + TypedLinearSearch(*db, start, op, builder); + } else { + PERFETTO_DFATAL("Invalid"); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_core_tracing__service__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_core_tracing__service__impl.cc index a9d978192472..6efdf1fe26fe 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_core_tracing__service__impl.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_core_tracing__service__impl.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/perfetto/src/tracing/core/tracing_service_impl.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/third_party/perfetto/src/tracing/core/tracing_service_impl.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/third_party/perfetto/src/tracing/core/tracing_service_impl.cc -@@ -3122,7 +3122,8 @@ bool TracingServiceImpl::SnapshotClocks( +@@ -3213,7 +3213,8 @@ bool TracingServiceImpl::SnapshotClocks( #if !PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) && \ !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) && \ diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_ipc_memfd.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_ipc_memfd.cc new file mode 100644 index 000000000000..fb3732693530 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_ipc_memfd.cc @@ -0,0 +1,12 @@ +--- src/3rdparty/chromium/third_party/perfetto/src/tracing/ipc/memfd.cc.orig 2023-09-13 18:23:44 UTC ++++ src/3rdparty/chromium/third_party/perfetto/src/tracing/ipc/memfd.cc +@@ -20,7 +20,8 @@ + + #define PERFETTO_MEMFD_ENABLED() \ + PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \ +- PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) ++ (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) && \ ++ !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)) + + #if PERFETTO_MEMFD_ENABLED() + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_track.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_track.cc new file mode 100644 index 000000000000..fdff02b8b3c7 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_track.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/perfetto/src/tracing/track.cc.orig 2023-05-31 08:12:17 UTC ++++ src/3rdparty/chromium/third_party/perfetto/src/tracing/track.cc +@@ -143,7 +143,7 @@ namespace internal { + namespace { + + uint64_t GetProcessStartTime() { +-#if !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) ++#if !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) && !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD) + std::string stat; + if (!base::ReadFile("/proc/self/stat", &stat)) + return 0u; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_core_SkCpu.cpp b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_core_SkCpu.cpp deleted file mode 100644 index 85318d909ea7..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_core_SkCpu.cpp +++ /dev/null @@ -1,69 +0,0 @@ ---- src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp.orig 2023-11-20 16:08:07 UTC -+++ src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp -@@ -73,6 +73,42 @@ - return features; - } - -+#elif defined(SK_CPU_ARM64) && defined(__OpenBSD__) -+ #include <sys/sysctl.h> -+ #include <machine/cpu.h> -+ #include <machine/armreg.h> -+ -+ static uint32_t read_cpu_features() { -+ int isar0_mib[] = { CTL_MACHDEP, CPU_ID_AA64ISAR0 }; -+ size_t len = sizeof(uint64_t); -+ uint64_t cpu_id = 0; -+ uint32_t features = 0; -+ -+ if (sysctl(isar0_mib, 2, &cpu_id, &len, NULL, 0) == 0) { -+ if (ID_AA64ISAR0_CRC32(cpu_id) >= ID_AA64ISAR0_CRC32_BASE) -+ features |= SkCpu::CRC32; -+ } -+ -+ return features; -+ } -+ -+#elif defined(SK_CPU_ARM64) && defined(__FreeBSD__) -+ #include <machine/armreg.h> -+ #ifndef ID_AA64ISAR0_CRC32_VAL -+ #define ID_AA64ISAR0_CRC32_VAL ID_AA64ISAR0_CRC32 -+ #endif -+ -+ static uint32_t read_cpu_features() { -+ uint32_t features = 0; -+ uint64_t id_aa64isar0; -+ -+ id_aa64isar0 = READ_SPECIALREG(id_aa64isar0_el1); -+ if (ID_AA64ISAR0_CRC32_VAL(id_aa64isar0) == ID_AA64ISAR0_CRC32_BASE) { -+ features |= SkCpu::CRC32; -+ } -+ return features; -+ } -+ - #elif defined(SK_CPU_ARM64) && __has_include(<sys/auxv.h>) - #include <sys/auxv.h> - -@@ -110,6 +146,23 @@ - if (std::size(buf) != midr_el1.read(buf, std::size(buf)) - || 0 == memcmp(kMongoose3, buf, std::size(buf))) { - features &= ~(SkCpu::ASIMDHP); -+ } -+ } -+ return features; -+ } -+ -+#elif defined(SK_CPU_ARM32) && defined(__FreeBSD__) -+ #include <sys/auxv.h> -+ -+ static uint32_t read_cpu_features() { -+ unsigned long hwcaps = 0; -+ uint32_t features = 0; -+ -+ elf_aux_info(AT_HWCAP, (void *)&hwcaps, sizeof hwcaps); -+ if (hwcaps & HWCAP_NEON) { -+ features |= SkCpu::NEON; -+ if (hwcaps & HWCAP_VFPv4) { -+ features |= SkCpu::NEON_FMA|SkCpu::VFP_FP16; - } - } - return features; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_sqlite_src_amalgamation_sqlite3.c b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_sqlite_src_amalgamation_sqlite3.c index a01061bd59ab..751b46f30d9d 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_sqlite_src_amalgamation_sqlite3.c +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_sqlite_src_amalgamation_sqlite3.c @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/sqlite/src/amalgamation/sqlite3.c.orig 2023-04-20 13:16:39 UTC +--- src/3rdparty/chromium/third_party/sqlite/src/amalgamation/sqlite3.c.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/third_party/sqlite/src/amalgamation/sqlite3.c -@@ -43595,7 +43595,12 @@ static int unixRandomness(sqlite3_vfs *NotUsed, int nB +@@ -43843,7 +43843,12 @@ static int unixRandomness(sqlite3_vfs *NotUsed, int nB memset(zBuf, 0, nBuf); randomnessPid = osGetpid(0); #if !defined(SQLITE_TEST) && !defined(SQLITE_OMIT_RANDOMNESS) @@ -13,7 +13,7 @@ int fd, got; fd = robust_open("/dev/urandom", O_RDONLY, 0); if( fd<0 ){ -@@ -43610,6 +43615,7 @@ static int unixRandomness(sqlite3_vfs *NotUsed, int nB +@@ -43858,6 +43863,7 @@ static int unixRandomness(sqlite3_vfs *NotUsed, int nB robust_close(0, fd, __LINE__); } } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_swiftshader_src_Reactor_Debug.cpp b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_swiftshader_src_Reactor_Debug.cpp new file mode 100644 index 000000000000..7a5739bd8b76 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_swiftshader_src_Reactor_Debug.cpp @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/swiftshader/src/Reactor/Debug.cpp.orig 2022-02-07 13:39:41 UTC ++++ src/3rdparty/chromium/third_party/swiftshader/src/Reactor/Debug.cpp +@@ -46,7 +46,7 @@ namespace { + + bool IsUnderDebugger() + { +-#if defined(PTRACE) && !defined(__APPLE__) && !defined(__MACH__) ++#if defined(PTRACE) && !defined(__APPLE__) && !defined(__MACH__) && !defined(__OpenBSD__) && !defined(__FreeBSD__) + static bool checked = false; + static bool res = false; + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_swiftshader_src_System_Configurator.cpp b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_swiftshader_src_System_Configurator.cpp new file mode 100644 index 000000000000..4f44dbe0672b --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_swiftshader_src_System_Configurator.cpp @@ -0,0 +1,12 @@ +--- src/3rdparty/chromium/third_party/swiftshader/src/System/Configurator.cpp.orig 2022-06-17 14:20:10 UTC ++++ src/3rdparty/chromium/third_party/swiftshader/src/System/Configurator.cpp +@@ -38,6 +38,9 @@ namespace sw { + + Configurator::Configurator(const std::string &filePath) + { ++#if defined(__OpenBSD__) || defined(__FreeBSD__) ++ return; ++#endif + std::fstream file(filePath, std::ios::in); + if(file.fail()) + { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_swiftshader_src_System_Linux_MemFd.cpp b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_swiftshader_src_System_Linux_MemFd.cpp new file mode 100644 index 000000000000..b29f4c1c736a --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_swiftshader_src_System_Linux_MemFd.cpp @@ -0,0 +1,37 @@ +--- src/3rdparty/chromium/third_party/swiftshader/src/System/Linux/MemFd.cpp.orig 2023-09-13 18:23:44 UTC ++++ src/3rdparty/chromium/third_party/swiftshader/src/System/Linux/MemFd.cpp +@@ -25,6 +25,7 @@ + # define MFD_CLOEXEC 0x0001U + #endif + ++#if !defined(__OpenBSD__) && !defined(__FreeBSD__) + #if __aarch64__ + # define __NR_memfd_create 279 + #elif __arm__ +@@ -36,6 +37,7 @@ + #elif __x86_64__ + # define __NR_memfd_create 319 + #endif /* __NR_memfd_create__ */ ++#endif + + LinuxMemFd::~LinuxMemFd() + { +@@ -63,13 +65,17 @@ bool LinuxMemFd::allocate(const char *name, size_t siz + { + close(); + +-#ifndef __NR_memfd_create ++#if !defined(__NR_memfd_create) || defined(__OpenBSD__) + TRACE("memfd_create() not supported on this system!"); + return false; + #else + // In the event of no system call this returns -1 with errno set + // as ENOSYS. ++#if defined(__FreeBSD__) ++ fd_ = memfd_create(name, MFD_CLOEXEC); ++#else + fd_ = syscall(__NR_memfd_create, name, MFD_CLOEXEC); ++#endif + if(fd_ < 0) + { + TRACE("memfd_create() returned %d: %s", errno, strerror(errno)); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_swiftshader_src_Vulkan_VkSemaphoreExternalLinux.hpp b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_swiftshader_src_Vulkan_VkSemaphoreExternalLinux.hpp new file mode 100644 index 000000000000..9abee3a057df --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_swiftshader_src_Vulkan_VkSemaphoreExternalLinux.hpp @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/third_party/swiftshader/src/Vulkan/VkSemaphoreExternalLinux.hpp.orig 2022-02-07 13:39:41 UTC ++++ src/3rdparty/chromium/third_party/swiftshader/src/Vulkan/VkSemaphoreExternalLinux.hpp +@@ -49,13 +49,17 @@ class SharedSemaphore (public) + { + pthread_mutexattr_t mattr; + pthread_mutexattr_init(&mattr); ++#if 0 + pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED); ++#endif + pthread_mutex_init(&mutex, &mattr); + pthread_mutexattr_destroy(&mattr); + + pthread_condattr_t cattr; + pthread_condattr_init(&cattr); ++#if 0 + pthread_condattr_setpshared(&cattr, PTHREAD_PROCESS_SHARED); ++#endif + pthread_cond_init(&cond, &cattr); + pthread_condattr_destroy(&cattr); + } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_swiftshader_src_WSI_libXCB.cpp b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_swiftshader_src_WSI_libXCB.cpp new file mode 100644 index 000000000000..befa5de154a5 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_swiftshader_src_WSI_libXCB.cpp @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/third_party/swiftshader/src/WSI/libXCB.cpp.orig 2023-03-09 06:31:50 UTC ++++ src/3rdparty/chromium/third_party/swiftshader/src/WSI/libXCB.cpp +@@ -57,7 +57,7 @@ LibXcbExports *LibXCB::loadExports() + } + else + { +- libxcb = loadLibrary("libxcb.so.1"); ++ libxcb = loadLibrary("libxcb.so"); + } + + if(getProcAddress(RTLD_DEFAULT, "xcb_shm_query_version")) // Search the global scope for pre-loaded XCB library. +@@ -66,7 +66,7 @@ LibXcbExports *LibXCB::loadExports() + } + else + { +- libshm = loadLibrary("libxcb-shm.so.0"); ++ libshm = loadLibrary("libxcb-shm.so"); + } + + return LibXcbExports(libxcb, libshm); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_test__fonts_fontconfig_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_test__fonts_fontconfig_BUILD.gn new file mode 100644 index 000000000000..0ec45d02194b --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_test__fonts_fontconfig_BUILD.gn @@ -0,0 +1,15 @@ +--- src/3rdparty/chromium/third_party/test_fonts/fontconfig/BUILD.gn.orig 2022-03-01 11:59:41 UTC ++++ src/3rdparty/chromium/third_party/test_fonts/fontconfig/BUILD.gn +@@ -26,7 +26,11 @@ if (is_linux || is_chromeos) { + + copy("fonts_conf") { + sources = [ "fonts.conf" ] +- outputs = [ "$root_out_dir/etc/fonts/{{source_file_part}}" ] ++ if (is_freebsd) { ++ outputs = [ "$root_out_dir/usr/local/etc/fonts/{{source_file_part}}" ] ++ } else { ++ outputs = [ "$root_out_dir/etc/fonts/{{source_file_part}}" ] ++ } + } + + if (current_toolchain == host_toolchain) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_test__fonts_fontconfig_fontconfig__util__linux.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_test__fonts_fontconfig_fontconfig__util__linux.cc new file mode 100644 index 000000000000..2166d1d0e2eb --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_test__fonts_fontconfig_fontconfig__util__linux.cc @@ -0,0 +1,27 @@ +--- src/3rdparty/chromium/third_party/test_fonts/fontconfig/fontconfig_util_linux.cc.orig 2022-03-25 21:59:56 UTC ++++ src/3rdparty/chromium/third_party/test_fonts/fontconfig/fontconfig_util_linux.cc +@@ -2,6 +2,8 @@ + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. + ++#include "build/build_config.h" ++ + #include "third_party/test_fonts/fontconfig/fontconfig_util_linux.h" + + #include <fontconfig/fontconfig.h> +@@ -15,11 +17,15 @@ + namespace test_fonts { + + std::string GetSysrootDir() { ++#if BUILDFLAG(IS_BSD) ++ return std::string("."); ++#else + char buf[PATH_MAX + 1]; + auto count = readlink("/proc/self/exe", buf, PATH_MAX); + assert(count > 0); + buf[count] = '\0'; + return dirname(buf); ++#endif + } + + void SetUpFontconfig() { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_test__fonts_fontconfig_generate__fontconfig__caches.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_test__fonts_fontconfig_generate__fontconfig__caches.cc new file mode 100644 index 000000000000..ba43c4f788ae --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_test__fonts_fontconfig_generate__fontconfig__caches.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc.orig 2023-04-05 11:05:06 UTC ++++ src/3rdparty/chromium/third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc +@@ -56,7 +56,7 @@ int main() { + FcFini(); + + // Check existence of intended fontconfig cache file. +- auto cache = fontconfig_caches + "/" + kCacheKey + "-le64.cache-9"; ++ auto cache = fontconfig_caches + "/" + kCacheKey + "-le64.cache-" + FC_CACHE_VERSION; + bool cache_exists = access(cache.c_str(), F_OK) == 0; + return !cache_exists; + } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_vulkan-deps_vulkan-loader_src_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_vulkan-deps_vulkan-loader_src_BUILD.gn index a10cd1178266..bf385233e1f8 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_vulkan-deps_vulkan-loader_src_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_vulkan-deps_vulkan-loader_src_BUILD.gn @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/third_party/vulkan-deps/vulkan-loader/src/BUILD.gn.orig 2023-01-11 09:17:16 UTC +--- src/3rdparty/chromium/third_party/vulkan-deps/vulkan-loader/src/BUILD.gn.orig 2023-07-16 15:47:57 UTC +++ src/3rdparty/chromium/third_party/vulkan-deps/vulkan-loader/src/BUILD.gn @@ -59,7 +59,7 @@ config("vulkan_internal_config") { defines += [ @@ -8,4 +8,4 @@ + "FALLBACK_DATA_DIRS=\"/usr/X11R6/share:/usr/local/share:/usr/share\"", ] } - } + if (!vulkan_loader_shared) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_vulkan-deps_vulkan-loader_src_loader_vk__loader__platform.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_vulkan-deps_vulkan-loader_src_loader_vk__loader__platform.h index 615a939c5599..78722a23698c 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_vulkan-deps_vulkan-loader_src_loader_vk__loader__platform.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_vulkan-deps_vulkan-loader_src_loader_vk__loader__platform.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/vulkan-deps/vulkan-loader/src/loader/vk_loader_platform.h.orig 2023-01-11 09:17:16 UTC +--- src/3rdparty/chromium/third_party/vulkan-deps/vulkan-loader/src/loader/vk_loader_platform.h.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/third_party/vulkan-deps/vulkan-loader/src/loader/vk_loader_platform.h -@@ -294,7 +294,15 @@ static inline char *loader_platform_executable_path(ch +@@ -304,7 +304,15 @@ static inline char *loader_platform_executable_path(ch return buffer; } @@ -15,5 +15,5 @@ +} +#elif defined(__Fuchsia__) static inline char *loader_platform_executable_path(char *buffer, size_t size) { return NULL; } - #elif defined(__QNXNTO__) + #elif defined(__QNX__) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_vulkan-deps_vulkan-validation-layers_src_layers_vk__mem__alloc.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_vulkan-deps_vulkan-validation-layers_src_layers_external_vma_vk__mem__alloc.h index d759643467ec..262b38b443fc 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_vulkan-deps_vulkan-validation-layers_src_layers_vk__mem__alloc.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_vulkan-deps_vulkan-validation-layers_src_layers_external_vma_vk__mem__alloc.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/third_party/vulkan-deps/vulkan-validation-layers/src/layers/vk_mem_alloc.h.orig 2023-03-09 06:31:50 UTC -+++ src/3rdparty/chromium/third_party/vulkan-deps/vulkan-validation-layers/src/layers/vk_mem_alloc.h -@@ -2703,7 +2703,7 @@ static void* vma_aligned_alloc(size_t alignment, size_ +--- src/3rdparty/chromium/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h.orig 2023-05-31 08:12:17 UTC ++++ src/3rdparty/chromium/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h +@@ -2740,7 +2740,7 @@ static void* vma_aligned_alloc(size_t alignment, size_ return memalign(alignment, size); } -#elif defined(__APPLE__) || defined(__ANDROID__) || (defined(__linux__) && defined(__GLIBCXX__) && !defined(_GLIBCXX_HAVE_ALIGNED_ALLOC)) +#elif defined(__APPLE__) || defined(__ANDROID__) || (defined(__linux__) && defined(__GLIBCXX__) && !defined(_GLIBCXX_HAVE_ALIGNED_ALLOC)) || defined(__OpenBSD__) || defined(__FreeBSD__) - #define ALIGNED_ALLOC_WITH_POSIX_MEMALIGN - #elif defined(__GNU_LIBRARY__) - # if !defined(__GLIBC_PREREQ) || !__GLIBC_PREREQ(2, 16) + #include <cstdlib> + + #if defined(__APPLE__) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_vulkan__memory__allocator_include_vk__mem__alloc.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_vulkan__memory__allocator_include_vk__mem__alloc.h index 51abae4160d2..79fb83e67a78 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_vulkan__memory__allocator_include_vk__mem__alloc.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_vulkan__memory__allocator_include_vk__mem__alloc.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h @@ -2507,7 +2507,7 @@ void *vma_aligned_alloc(size_t alignment, size_t size) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_wayland_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_wayland_BUILD.gn new file mode 100644 index 000000000000..e7d1cf81aa50 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_wayland_BUILD.gn @@ -0,0 +1,14 @@ +--- src/3rdparty/chromium/third_party/wayland/BUILD.gn.orig 2023-02-08 15:40:14 UTC ++++ src/3rdparty/chromium/third_party/wayland/BUILD.gn +@@ -22,6 +22,11 @@ config("wayland_config") { + "src/src", + ] + ++ if (is_bsd) { ++ include_dirs += [ "/usr/local/include/libepoll-shim" ] ++ libs = [ "epoll-shim" ] ++ } ++ + # Client/Server headers are automatically generated. Though, we still need + # to pass the path where these headers are located. + include_dirs += [ "$root_gen_dir/third_party/wayland/src/protocol" ] diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_BUILD.gn index 8b8bdc8af8aa..ab2fc3d5a55d 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/webrtc/BUILD.gn.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/third_party/webrtc/BUILD.gn.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/third_party/webrtc/BUILD.gn -@@ -211,6 +211,9 @@ config("common_inherited_config") { +@@ -216,6 +216,9 @@ config("common_inherited_config") { if (is_linux || is_chromeos) { defines += [ "WEBRTC_LINUX" ] } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_modules_audio__device_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_modules_audio__device_BUILD.gn index 9b9fabb12f88..bbb9e9aecb9a 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_modules_audio__device_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_modules_audio__device_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/webrtc/modules/audio_device/BUILD.gn.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/third_party/webrtc/modules/audio_device/BUILD.gn.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/third_party/webrtc/modules/audio_device/BUILD.gn -@@ -300,7 +300,7 @@ rtc_library("audio_device_impl") { +@@ -349,7 +349,7 @@ rtc_library("audio_device_impl") { if (rtc_use_dummy_audio_file_devices) { defines += [ "WEBRTC_DUMMY_FILE_DEVICES" ] } else { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc new file mode 100644 index 000000000000..d68e7a9f0a52 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc @@ -0,0 +1,18 @@ +--- src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc.orig 2023-08-23 11:41:11 UTC ++++ src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc +@@ -10,11 +10,15 @@ + + #include "modules/desktop_capture/linux/wayland/egl_dmabuf.h" + ++#if !defined(WEBRTC_BSD) + #include <asm/ioctl.h> ++#endif + #include <dlfcn.h> + #include <fcntl.h> + #include <libdrm/drm_fourcc.h> ++#if !defined(WEBRTC_BSD) + #include <linux/types.h> ++#endif + #include <spa/param/video/format-utils.h> + #include <unistd.h> + #include <xf86drm.h> diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_modules_desktop__capture_linux_x11_x__server__pixel__buffer.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_modules_desktop__capture_linux_x11_x__server__pixel__buffer.cc index c3a3263e64d8..ced8e98eea09 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_modules_desktop__capture_linux_x11_x__server__pixel__buffer.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_modules_desktop__capture_linux_x11_x__server__pixel__buffer.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc.orig 2022-02-28 16:54:41 UTC +--- src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc -@@ -212,6 +212,12 @@ bool XServerPixelBuffer::Init(XAtomCache* cache, Windo +@@ -203,6 +203,12 @@ bool XServerPixelBuffer::Init(XAtomCache* cache, Windo void XServerPixelBuffer::InitShm(const XWindowAttributes& attributes) { Visual* default_visual = attributes.visual; int default_depth = attributes.depth; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_pc_legacy__stats__collector.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_pc_legacy__stats__collector.cc index 7c8461b8c921..d2078c74e315 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_pc_legacy__stats__collector.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_pc_legacy__stats__collector.cc @@ -14,9 +14,9 @@ Date: 2023-12-21T14:08:26+01:00 Reviewed-by: Henrik Boström <hbos@webrtc.org> Cr-Commit-Position: refs/heads/main@{#41432} ---- src/3rdparty/chromium/third_party/webrtc/pc/legacy_stats_collector.cc.orig 2023-11-20 16:08:07 UTC +--- src/3rdparty/chromium/third_party/webrtc/pc/legacy_stats_collector.cc.orig 2024-02-10 00:27:53 UTC +++ src/3rdparty/chromium/third_party/webrtc/pc/legacy_stats_collector.cc -@@ -189,9 +189,10 @@ void ExtractStats(const cricket::VoiceReceiverInfo& in +@@ -188,9 +188,10 @@ void ExtractStats(const cricket::VoiceReceiverInfo& in {StatsReport::kStatsValueNameAccelerateRate, info.accelerate_rate}, {StatsReport::kStatsValueNamePreemptiveExpandRate, info.preemptive_expand_rate}, @@ -29,7 +29,7 @@ Date: 2023-12-21T14:08:26+01:00 const IntForAdd ints[] = { {StatsReport::kStatsValueNameCurrentDelayMs, info.delay_estimate_ms}, -@@ -245,9 +246,10 @@ void ExtractStats(const cricket::VoiceSenderInfo& info +@@ -244,9 +245,10 @@ void ExtractStats(const cricket::VoiceSenderInfo& info SetAudioProcessingStats(report, info.apm_statistics); const FloatForAdd floats[] = { @@ -42,7 +42,7 @@ Date: 2023-12-21T14:08:26+01:00 RTC_DCHECK_GE(info.audio_level, 0); const IntForAdd ints[] = { -@@ -341,7 +343,8 @@ void ExtractStats(const cricket::VideoReceiverInfo& in +@@ -340,7 +342,8 @@ void ExtractStats(const cricket::VideoReceiverInfo& in {StatsReport::kStatsValueNamePlisSent, info.plis_sent}, {StatsReport::kStatsValueNameRenderDelayMs, info.render_delay_ms}, {StatsReport::kStatsValueNameTargetDelayMs, info.target_delay_ms}, @@ -52,21 +52,21 @@ Date: 2023-12-21T14:08:26+01:00 }; for (const auto& i : ints) -@@ -385,15 +388,19 @@ void ExtractStats(const cricket::VideoSenderInfo& info +@@ -384,15 +387,19 @@ void ExtractStats(const cricket::VideoSenderInfo& info info.encode_usage_percent}, - {StatsReport::kStatsValueNameFirsReceived, info.firs_rcvd}, + {StatsReport::kStatsValueNameFirsReceived, info.firs_received}, {StatsReport::kStatsValueNameFrameHeightSent, info.send_frame_height}, - {StatsReport::kStatsValueNameFrameRateInput, round(info.framerate_input)}, + {StatsReport::kStatsValueNameFrameRateInput, + static_cast<int>(round(info.framerate_input))}, {StatsReport::kStatsValueNameFrameRateSent, info.framerate_sent}, {StatsReport::kStatsValueNameFrameWidthSent, info.send_frame_width}, -- {StatsReport::kStatsValueNameNacksReceived, info.nacks_rcvd}, +- {StatsReport::kStatsValueNameNacksReceived, info.nacks_received}, + {StatsReport::kStatsValueNameNacksReceived, -+ static_cast<int>(info.nacks_rcvd)}, ++ static_cast<int>(info.nacks_received)}, {StatsReport::kStatsValueNamePacketsLost, info.packets_lost}, {StatsReport::kStatsValueNamePacketsSent, info.packets_sent}, - {StatsReport::kStatsValueNamePlisReceived, info.plis_rcvd}, + {StatsReport::kStatsValueNamePlisReceived, info.plis_received}, - {StatsReport::kStatsValueNameFramesEncoded, info.frames_encoded}, - {StatsReport::kStatsValueNameHugeFramesSent, info.huge_frames_sent}, + {StatsReport::kStatsValueNameFramesEncoded, @@ -76,7 +76,7 @@ Date: 2023-12-21T14:08:26+01:00 }; for (const auto& i : ints) -@@ -782,19 +789,25 @@ StatsReport* LegacyStatsCollector::AddConnectionInfoRe +@@ -780,19 +787,25 @@ StatsReport* LegacyStatsCollector::AddConnectionInfoRe AddCandidateReport(remote_candidate_stats, false)->id()); const Int64ForAdd int64s[] = { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_net__test__helpers.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_net__test__helpers.cc new file mode 100644 index 000000000000..296ec5680e28 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_net__test__helpers.cc @@ -0,0 +1,10 @@ +--- src/3rdparty/chromium/third_party/webrtc/rtc_base/net_test_helpers.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/net_test_helpers.cc +@@ -21,6 +21,7 @@ + #endif + #if defined(WEBRTC_POSIX) && !defined(__native_client__) + #include <arpa/inet.h> ++#include <sys/socket.h> + #if defined(WEBRTC_ANDROID) + #include "rtc_base/ifaddrs_android.h" + #else diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_network.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_network.cc index 27858ffdac55..38d531526387 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_network.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_network.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/webrtc/rtc_base/network.cc.orig 2023-02-08 09:03:45 UTC +--- src/3rdparty/chromium/third_party/webrtc/rtc_base/network.cc.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/third_party/webrtc/rtc_base/network.cc -@@ -288,7 +288,12 @@ AdapterType GetAdapterTypeFromName(absl::string_view n +@@ -292,7 +292,12 @@ AdapterType GetAdapterTypeFromName(absl::string_view n } #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physical__socket__server.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physical__socket__server.cc index 240bdcbb2e31..b3621f020698 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physical__socket__server.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physical__socket__server.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc.orig 2023-01-11 09:17:16 UTC +--- src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc -@@ -54,7 +54,7 @@ +@@ -56,7 +56,7 @@ #include "rtc_base/time_utils.h" #include "system_wrappers/include/field_trial.h" @@ -9,7 +9,7 @@ #include <linux/sockios.h> #endif -@@ -73,7 +73,7 @@ typedef void* SockOptArg; +@@ -75,7 +75,7 @@ typedef void* SockOptArg; #endif // WEBRTC_POSIX @@ -18,7 +18,7 @@ int64_t GetSocketRecvTimestamp(int socket) { struct timeval tv_ioctl; -@@ -308,7 +308,7 @@ int PhysicalSocket::GetOption(Option opt, int* value) +@@ -310,7 +310,7 @@ int PhysicalSocket::GetOption(Option opt, int* value) return -1; } if (opt == OPT_DONTFRAGMENT) { @@ -27,7 +27,7 @@ *value = (*value != IP_PMTUDISC_DONT) ? 1 : 0; #endif } else if (opt == OPT_DSCP) { -@@ -326,7 +326,7 @@ int PhysicalSocket::SetOption(Option opt, int value) { +@@ -328,7 +328,7 @@ int PhysicalSocket::SetOption(Option opt, int value) { if (TranslateOption(opt, &slevel, &sopt) == -1) return -1; if (opt == OPT_DONTFRAGMENT) { @@ -36,7 +36,7 @@ value = (value) ? IP_PMTUDISC_DO : IP_PMTUDISC_DONT; #endif } else if (opt == OPT_DSCP) { -@@ -354,7 +354,7 @@ int PhysicalSocket::SetOption(Option opt, int value) { +@@ -356,7 +356,7 @@ int PhysicalSocket::SetOption(Option opt, int value) { int PhysicalSocket::Send(const void* pv, size_t cb) { int sent = DoSend( s_, reinterpret_cast<const char*>(pv), static_cast<int>(cb), @@ -45,7 +45,7 @@ // Suppress SIGPIPE. Without this, attempting to send on a socket whose // other end is closed will result in a SIGPIPE signal being raised to // our process, which by default will terminate the process, which we -@@ -383,7 +383,7 @@ int PhysicalSocket::SendTo(const void* buffer, +@@ -385,7 +385,7 @@ int PhysicalSocket::SendTo(const void* buffer, size_t len = addr.ToSockAddrStorage(&saddr); int sent = DoSendTo(s_, static_cast<const char*>(buffer), static_cast<int>(length), @@ -54,7 +54,7 @@ // Suppress SIGPIPE. See above for explanation. MSG_NOSIGNAL, #else -@@ -641,7 +641,7 @@ int PhysicalSocket::TranslateOption(Option opt, int* s +@@ -643,7 +643,7 @@ int PhysicalSocket::TranslateOption(Option opt, int* s *slevel = IPPROTO_IP; *sopt = IP_DONTFRAGMENT; break; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physical__socket__server.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physical__socket__server.h index d24fa878f15f..2ad61cfbad04 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physical__socket__server.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physical__socket__server.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.h.orig 2022-10-24 13:33:33 UTC +--- src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.h.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.h -@@ -12,7 +12,7 @@ - #define RTC_BASE_PHYSICAL_SOCKET_SERVER_H_ - +@@ -14,7 +14,7 @@ #include "api/units/time_delta.h" --#if defined(WEBRTC_POSIX) && defined(WEBRTC_LINUX) -+#if defined(WEBRTC_POSIX) && defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD) + + #if defined(WEBRTC_POSIX) +-#if defined(WEBRTC_LINUX) ++#if defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD) + // On Linux, use epoll. #include <sys/epoll.h> #define WEBRTC_USE_EPOLL 1 - #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_widevine_cdm_widevine.gni b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_widevine_cdm_widevine.gni new file mode 100644 index 000000000000..e47da639e240 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_widevine_cdm_widevine.gni @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/widevine/cdm/widevine.gni.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/third_party/widevine/cdm/widevine.gni +@@ -27,6 +27,8 @@ library_widevine_cdm_available = + (is_chromeos && + (target_cpu == "x64" || target_cpu == "arm" || target_cpu == "arm64")) || + (target_os == "linux" && target_cpu == "x64") || ++ (target_os == "openbsd" && target_cpu == "x64") || ++ (target_os == "freebsd" && target_cpu == "x64") || + (target_os == "mac" && (target_cpu == "x64" || target_cpu == "arm64")) || + (target_os == "win" && + (target_cpu == "x86" || target_cpu == "x64" || target_cpu == "arm64")) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn index b99d7342d389..d64f15ad9b82 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn @@ -1,6 +1,26 @@ ---- src/3rdparty/chromium/third_party/zlib/BUILD.gn.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/third_party/zlib/BUILD.gn.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/third_party/zlib/BUILD.gn -@@ -455,7 +455,7 @@ static_library("bundled_minizip") { +@@ -139,7 +139,7 @@ if (use_arm_neon_optimizations) { + defines = [ "CRC32_ARMV8_CRC32" ] + if (is_android) { + defines += [ "ARMV8_OS_ANDROID" ] +- } else if (is_linux || is_chromeos) { ++ } else if ((is_linux || is_chromeos) && !is_bsd) { + defines += [ "ARMV8_OS_LINUX" ] + } else if (is_mac) { + defines += [ "ARMV8_OS_MACOS" ] +@@ -149,6 +149,10 @@ if (use_arm_neon_optimizations) { + defines += [ "ARMV8_OS_FUCHSIA" ] + } else if (is_win) { + defines += [ "ARMV8_OS_WINDOWS" ] ++ } else if (is_openbsd) { ++ defines += [ "ARMV8_OS_OPENBSD" ] ++ } else if (is_freebsd) { ++ defines += [ "ARMV8_OS_FREEBSD" ] + } else { + assert(false, "Unsupported ARM OS") + } +@@ -462,7 +466,7 @@ static_library("bundled_minizip") { ] } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_zlib_cpu__features.c b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_zlib_cpu__features.c new file mode 100644 index 000000000000..38c136535f1c --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_zlib_cpu__features.c @@ -0,0 +1,50 @@ +--- src/3rdparty/chromium/third_party/zlib/cpu_features.c.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/third_party/zlib/cpu_features.c +@@ -35,7 +35,8 @@ int ZLIB_INTERNAL x86_cpu_enable_avx512 = 0; + + #ifndef CPU_NO_SIMD + +-#if defined(ARMV8_OS_ANDROID) || defined(ARMV8_OS_LINUX) || defined(ARMV8_OS_FUCHSIA) || defined(ARMV8_OS_IOS) ++#if defined(ARMV8_OS_ANDROID) || defined(ARMV8_OS_LINUX) || defined(ARMV8_OS_FUCHSIA) || defined(ARMV8_OS_IOS) || \ ++ defined(ARMV8_OS_OPENBSD) || defined(ARMV8_OS_FREEBSD) + #include <pthread.h> + #endif + +@@ -52,6 +53,10 @@ int ZLIB_INTERNAL x86_cpu_enable_avx512 = 0; + #include <windows.h> + #elif defined(ARMV8_OS_IOS) + #include <sys/sysctl.h> ++#elif defined(ARMV8_OS_OPENBSD) ++#include <sys/sysctl.h> ++#include <machine/cpu.h> ++#include <machine/armreg.h> + #elif !defined(_MSC_VER) + #include <pthread.h> + #else +@@ -62,7 +67,7 @@ static void _cpu_check_features(void); + static void _cpu_check_features(void); + #endif + +-#if defined(ARMV8_OS_ANDROID) || defined(ARMV8_OS_LINUX) || defined(ARMV8_OS_MACOS) || defined(ARMV8_OS_FUCHSIA) || defined(X86_NOT_WINDOWS) || defined(ARMV8_OS_IOS) || defined(__ARM_NEON__) || defined(__ARM_NEON) ++#if defined(ARMV8_OS_ANDROID) || defined(ARMV8_OS_LINUX) || defined(ARMV8_OS_MACOS) || defined(ARMV8_OS_FUCHSIA) || defined(X86_NOT_WINDOWS) || defined(ARMV8_OS_IOS) || defined(__ARM_NEON__) || defined(__ARM_NEON) || defined(ARMV8_OS_OPENBSD) || defined(ARMV8_OS_FREEBSD) + #if !defined(ARMV8_OS_MACOS) + // _cpu_check_features() doesn't need to do anything on mac/arm since all + // features are known at build time, so don't call it. +@@ -115,6 +120,17 @@ static void _cpu_check_features(void) + unsigned long features = getauxval(AT_HWCAP2); + arm_cpu_enable_crc32 = !!(features & HWCAP2_CRC32); + arm_cpu_enable_pmull = !!(features & HWCAP2_PMULL); ++#elif defined(ARMV8_OS_OPENBSD) ++ int isar0_mib[] = { CTL_MACHDEP, CPU_ID_AA64ISAR0 }; ++ uint64_t cpu_id = 0; ++ size_t len = sizeof(cpu_id); ++ if (sysctl(isar0_mib, 2, &cpu_id, &len, NULL, 0) < 0) ++ return; ++ if (ID_AA64ISAR0_AES(cpu_id) >= ID_AA64ISAR0_AES_PMULL) ++ arm_cpu_enable_pmull = 1; ++ ++ if (ID_AA64ISAR0_AES(cpu_id) >= ID_AA64ISAR0_CRC32_BASE) ++ arm_cpu_enable_crc32 = 1; + #elif defined(ARMV8_OS_FUCHSIA) + uint32_t features; + zx_status_t rc = zx_system_get_features(ZX_FEATURE_KIND_CPU, &features); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_tools_json__schema__compiler_feature__compiler.py b/www/qt6-webengine/files/patch-src_3rdparty_chromium_tools_json__schema__compiler_feature__compiler.py index abbee2641c5b..7b114a5793ba 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_tools_json__schema__compiler_feature__compiler.py +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_tools_json__schema__compiler_feature__compiler.py @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/tools/json_schema_compiler/feature_compiler.py.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/tools/json_schema_compiler/feature_compiler.py.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/tools/json_schema_compiler/feature_compiler.py -@@ -271,6 +271,8 @@ FEATURE_GRAMMAR = ({ +@@ -272,6 +272,8 @@ FEATURE_GRAMMAR = ({ 'linux': 'Feature::LINUX_PLATFORM', 'mac': 'Feature::MACOSX_PLATFORM', 'win': 'Feature::WIN_PLATFORM', diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_tools_licenses_licenses.py b/www/qt6-webengine/files/patch-src_3rdparty_chromium_tools_licenses_licenses.py index 0dfa9b3a4808..eece09516469 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_tools_licenses_licenses.py +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_tools_licenses_licenses.py @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/tools/licenses/licenses.py.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/tools/licenses/licenses.py.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/tools/licenses/licenses.py -@@ -618,6 +618,8 @@ def _GnBinary(): +@@ -751,6 +751,8 @@ def _GnBinary(): exe = 'gn' if sys.platform.startswith('linux'): subdir = 'linux64' diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_tools_perf_chrome__telemetry__build_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_tools_perf_chrome__telemetry__build_BUILD.gn index c6354c6a16d6..a6355ce7ed8d 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_tools_perf_chrome__telemetry__build_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_tools_perf_chrome__telemetry__build_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/tools/perf/chrome_telemetry_build/BUILD.gn.orig 2022-11-30 08:12:58 UTC +--- src/3rdparty/chromium/tools/perf/chrome_telemetry_build/BUILD.gn.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/tools/perf/chrome_telemetry_build/BUILD.gn -@@ -45,7 +45,7 @@ group("telemetry_chrome_test") { +@@ -47,7 +47,7 @@ group("telemetry_chrome_test") { data_deps += [ "//chrome:reorder_imports" ] } @@ -9,7 +9,7 @@ data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] # CrOS currently has issues with the locally compiled version of -@@ -186,7 +186,7 @@ group("telemetry_chrome_test_without_chrome") { +@@ -172,7 +172,7 @@ group("telemetry_chrome_test_without_chrome") { ] # Cr-Fuchsia doesn't support breakpad. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_tools_protoc__wrapper_protoc__wrapper.py b/www/qt6-webengine/files/patch-src_3rdparty_chromium_tools_protoc__wrapper_protoc__wrapper.py index 24c78f4641d1..30a967525268 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_tools_protoc__wrapper_protoc__wrapper.py +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_tools_protoc__wrapper_protoc__wrapper.py @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/tools/protoc_wrapper/protoc_wrapper.py.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/tools/protoc_wrapper/protoc_wrapper.py.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/tools/protoc_wrapper/protoc_wrapper.py -@@ -175,15 +175,19 @@ def main(argv): +@@ -179,15 +179,19 @@ def main(argv): if not options.exclude_imports: protoc_cmd += ["--include_imports"] diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_clipboard_clipboard__constants.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_clipboard_clipboard__constants.h index 7924af9905e5..d028631ecb43 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_clipboard_clipboard__constants.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_clipboard_clipboard__constants.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/ui/base/clipboard/clipboard_constants.h.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/ui/base/clipboard/clipboard_constants.h.orig 2023-02-08 09:03:45 UTC +++ src/3rdparty/chromium/ui/base/clipboard/clipboard_constants.h @@ -47,7 +47,7 @@ extern const char kMimeTypeDataTransferEndpoint[]; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_cursor_cursor__factory.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_cursor_cursor__factory.cc index 79de80575550..3c8c2dc646ff 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_cursor_cursor__factory.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_cursor_cursor__factory.cc @@ -1,8 +1,8 @@ ---- src/3rdparty/chromium/ui/base/cursor/cursor_factory.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/ui/base/cursor/cursor_factory.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/ui/base/cursor/cursor_factory.cc -@@ -89,7 +89,7 @@ void CursorFactory::ObserveThemeChanges() { - - void CursorFactory::SetDeviceScaleFactor(float scale) {} +@@ -98,7 +98,7 @@ void CursorFactory::ObserveThemeChanges() { + NOTIMPLEMENTED(); + } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_cursor_cursor__factory.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_cursor_cursor__factory.h index e07f7a7e8cea..a491a495b6dd 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_cursor_cursor__factory.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_cursor_cursor__factory.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/base/cursor/cursor_factory.h.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/ui/base/cursor/cursor_factory.h.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/ui/base/cursor/cursor_factory.h -@@ -88,7 +88,7 @@ class COMPONENT_EXPORT(UI_BASE_CURSOR) CursorFactory { +@@ -93,7 +93,7 @@ class COMPONENT_EXPORT(UI_BASE_CURSOR) CursorFactory { base::ObserverList<CursorFactoryObserver>::Unchecked observers_; }; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_dragdrop_os__exchange__data__provider__factory.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_dragdrop_os__exchange__data__provider__factory.cc index 6b838ecccde6..5edfe0015072 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_dragdrop_os__exchange__data__provider__factory.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_dragdrop_os__exchange__data__provider__factory.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/ui/base/dragdrop/os_exchange_data_provider_factory.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/ui/base/dragdrop/os_exchange_data_provider_factory.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/ui/base/dragdrop/os_exchange_data_provider_factory.cc @@ -7,7 +7,7 @@ #include "base/notreached.h" diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_ime_fake__text__input__client.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_ime_fake__text__input__client.cc index 138eaeb23614..d46504db82ba 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_ime_fake__text__input__client.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_ime_fake__text__input__client.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/base/ime/fake_text_input_client.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/ui/base/ime/fake_text_input_client.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/ui/base/ime/fake_text_input_client.cc -@@ -167,7 +167,7 @@ bool FakeTextInputClient::ShouldDoLearning() { +@@ -171,7 +171,7 @@ bool FakeTextInputClient::ShouldDoLearning() { return false; } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_ime_fake__text__input__client.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_ime_fake__text__input__client.h index 7a662ed6b560..9d7f2c1f6dc4 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_ime_fake__text__input__client.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_ime_fake__text__input__client.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/base/ime/fake_text_input_client.h.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/ui/base/ime/fake_text_input_client.h.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/ui/base/ime/fake_text_input_client.h -@@ -73,7 +73,7 @@ class FakeTextInputClient : public TextInputClient { +@@ -74,7 +74,7 @@ class FakeTextInputClient : public TextInputClient { void SetTextEditCommandForNextKeyEvent(TextEditCommand command) override; ukm::SourceId GetClientSourceForMetrics() const override; bool ShouldDoLearning() override; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_ime_text__input__client.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_ime_text__input__client.h index e9fc52934e5a..6c1bcf28e30b 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_ime_text__input__client.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_ime_text__input__client.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/base/ime/text_input_client.h.orig 2022-11-30 08:12:58 UTC +--- src/3rdparty/chromium/ui/base/ime/text_input_client.h.orig 2023-07-16 15:47:57 UTC +++ src/3rdparty/chromium/ui/base/ime/text_input_client.h -@@ -242,7 +242,7 @@ class COMPONENT_EXPORT(UI_BASE_IME) TextInputClient +@@ -265,7 +265,7 @@ class COMPONENT_EXPORT(UI_BASE_IME) TextInputClient // fields that are considered 'private' (e.g. in incognito tabs). virtual bool ShouldDoLearning() = 0; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_resource_resource__bundle.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_resource_resource__bundle.cc index 720099c22c09..06c7bc0d03bd 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_resource_resource__bundle.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_resource_resource__bundle.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/base/resource/resource_bundle.cc.orig 2023-02-08 09:03:45 UTC +--- src/3rdparty/chromium/ui/base/resource/resource_bundle.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/ui/base/resource/resource_bundle.cc -@@ -885,7 +885,7 @@ void ResourceBundle::ReloadFonts() { +@@ -926,7 +926,7 @@ void ResourceBundle::ReloadFonts() { } ResourceScaleFactor ResourceBundle::GetMaxResourceScaleFactor() const { @@ -8,4 +8,4 @@ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return max_scale_factor_; #else - return GetSupportedResourceScaleFactors().back(); + return GetMaxSupportedResourceScaleFactor(); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_ui__base__features.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_ui__base__features.cc index 5b1a5e7a453c..fe398bc13563 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_ui__base__features.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_ui__base__features.cc @@ -1,6 +1,15 @@ ---- src/3rdparty/chromium/ui/base/ui_base_features.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/ui/base/ui_base_features.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/ui/base/ui_base_features.cc -@@ -210,7 +210,7 @@ CONSTINIT const base::Feature kExperimentalFlingAnimat +@@ -135,7 +135,7 @@ bool AreF11AndF12ShortcutsEnabled() { + } + #endif // BUILDFLAG(IS_CHROMEOS_ASH) + +-#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + BASE_FEATURE(kRedundantImeCompositionClearing, + "RedundantImeCompositionClearing", + base::FEATURE_ENABLED_BY_DEFAULT); +@@ -234,7 +234,7 @@ CONSTINIT const base::Feature kExperimentalFlingAnimat "ExperimentalFlingAnimation", // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. @@ -9,7 +18,7 @@ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_ASH) && \ !BUILDFLAG(IS_CHROMEOS_LACROS)) base::FEATURE_ENABLED_BY_DEFAULT -@@ -315,7 +315,7 @@ CONSTINIT const base::Feature kEyeDropper( +@@ -346,7 +346,7 @@ CONSTINIT const base::Feature kEyeDropper( // milestones. CONSTINIT const base::Feature kEyeDropper( "EyeDropper", @@ -18,3 +27,12 @@ base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT +@@ -565,7 +565,7 @@ ChromeRefresh2023Level GetChromeRefresh2023Level() { + return level; + } + +-#if !BUILDFLAG(IS_LINUX) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + BASE_FEATURE(kWebUiSystemFont, + "WebUiSystemFont", + base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_ui__base__features.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_ui__base__features.h new file mode 100644 index 000000000000..b987c796364c --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_ui__base__features.h @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/ui/base/ui_base_features.h.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/ui/base/ui_base_features.h +@@ -138,7 +138,7 @@ BASE_DECLARE_FEATURE(kSupportF11AndF12KeyShortcuts); + COMPONENT_EXPORT(UI_BASE_FEATURES) bool AreF11AndF12ShortcutsEnabled(); + #endif // BUILDFLAG(IS_CHROMEOS_ASH) + +-#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + COMPONENT_EXPORT(UI_BASE_FEATURES) + BASE_DECLARE_FEATURE(kRedundantImeCompositionClearing); + #endif // BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) +@@ -273,7 +273,7 @@ enum class ChromeRefresh2023Level { + COMPONENT_EXPORT(UI_BASE_FEATURES) + ChromeRefresh2023Level GetChromeRefresh2023Level(); + +-#if !BUILDFLAG(IS_LINUX) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + COMPONENT_EXPORT(UI_BASE_FEATURES) BASE_DECLARE_FEATURE(kWebUiSystemFont); + #endif + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_ui__base__switches.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_ui__base__switches.cc new file mode 100644 index 000000000000..77cebb838ff9 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_ui__base__switches.cc @@ -0,0 +1,18 @@ +--- src/3rdparty/chromium/ui/base/ui_base_switches.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/ui/base/ui_base_switches.cc +@@ -31,13 +31,13 @@ const char kShowMacOverlayBorders[] = "show-mac-overla + const char kEnableResourcesFileSharing[] = "enable-resources-file-sharing"; + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // Specifies system font family name. Improves determenism when rendering + // pages in headless mode. + const char kSystemFontFamily[] = "system-font-family"; + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Specify the toolkit used to construct the Linux GUI. + const char kUiToolkitFlag[] = "ui-toolkit"; + #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_ui__base__switches.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_ui__base__switches.h new file mode 100644 index 000000000000..4c9288b0f702 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_ui__base__switches.h @@ -0,0 +1,16 @@ +--- src/3rdparty/chromium/ui/base/ui_base_switches.h.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/ui/base/ui_base_switches.h +@@ -27,11 +27,11 @@ COMPONENT_EXPORT(UI_BASE) extern const char kShowMacOv + COMPONENT_EXPORT(UI_BASE) extern const char kEnableResourcesFileSharing[]; + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + COMPONENT_EXPORT(UI_BASE) extern const char kSystemFontFamily[]; + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + COMPONENT_EXPORT(UI_BASE) extern const char kUiToolkitFlag[]; + #endif + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_webui_web__ui__util.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_webui_web__ui__util.cc index 12b5a81f1fd8..b5511aa3402b 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_webui_web__ui__util.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_webui_web__ui__util.cc @@ -1,6 +1,15 @@ ---- src/3rdparty/chromium/ui/base/webui/web_ui_util.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/ui/base/webui/web_ui_util.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/ui/base/webui/web_ui_util.cc -@@ -214,7 +214,7 @@ std::string GetFontFamily() { +@@ -41,7 +41,7 @@ std::string GetFontFamilyMd() { + constexpr float kMaxScaleFactor = 1000.0f; + + std::string GetFontFamilyMd() { +-#if !BUILDFLAG(IS_LINUX) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + if (base::FeatureList::IsEnabled(features::kWebUiSystemFont)) { + return GetFontFamily(); + } +@@ -221,7 +221,7 @@ std::string GetFontFamily() { // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_x_x11__cursor__factory.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_x_x11__cursor__factory.cc index 05cf581b5e9e..0553168d37d7 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_x_x11__cursor__factory.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_x_x11__cursor__factory.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/ui/base/x/x11_cursor_factory.cc.orig 2023-01-11 09:17:16 UTC +--- src/3rdparty/chromium/ui/base/x/x11_cursor_factory.cc.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/ui/base/x/x11_cursor_factory.cc @@ -13,7 +13,7 @@ #include "ui/gfx/geometry/point.h" @@ -9,7 +9,7 @@ #include "ui/linux/linux_ui.h" #endif -@@ -60,7 +60,7 @@ scoped_refptr<PlatformCursor> X11CursorFactory::Create +@@ -62,7 +62,7 @@ scoped_refptr<PlatformCursor> X11CursorFactory::Create } void X11CursorFactory::ObserveThemeChanges() { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_x_x11__cursor__factory.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_x_x11__cursor__factory.h index f9b74e96aca2..650ac821a0cb 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_x_x11__cursor__factory.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_x_x11__cursor__factory.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/ui/base/x/x11_cursor_factory.h.orig 2023-01-11 09:17:16 UTC +--- src/3rdparty/chromium/ui/base/x/x11_cursor_factory.h.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/ui/base/x/x11_cursor_factory.h @@ -20,7 +20,7 @@ namespace ui { class X11Cursor; @@ -9,7 +9,7 @@ class LinuxUi; #endif -@@ -59,7 +59,7 @@ class COMPONENT_EXPORT(UI_BASE_X) X11CursorFactory +@@ -60,7 +60,7 @@ class COMPONENT_EXPORT(UI_BASE_X) X11CursorFactory std::map<mojom::CursorType, scoped_refptr<X11Cursor>> default_cursors_; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_x_x11__cursor__loader.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_x_x11__cursor__loader.cc index e016355a3077..d525415d88bc 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_x_x11__cursor__loader.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_base_x_x11__cursor__loader.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/ui/base/x/x11_cursor_loader.cc.orig 2022-10-24 13:33:33 UTC +--- src/3rdparty/chromium/ui/base/x/x11_cursor_loader.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/ui/base/x/x11_cursor_loader.cc @@ -32,7 +32,7 @@ #include "ui/gfx/x/xproto.h" @@ -13,7 +13,7 @@ void operator()(void* ptr) const { dlclose(ptr); } }; -+#if defined(OS_BSD) ++#if BUILDFLAG(IS_BSD) + std::unique_ptr<void, DlCloser> lib(dlopen("libXcursor.so", RTLD_LAZY)); +#else std::unique_ptr<void, DlCloser> lib(dlopen("libXcursor.so.1", RTLD_LAZY)); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_color_color__id.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_color_color__id.h index 647b25e49a43..6abcc24d15b8 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_color_color__id.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_color_color__id.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/color/color_id.h.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/ui/color/color_id.h.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/ui/color/color_id.h -@@ -435,7 +435,7 @@ +@@ -567,7 +567,7 @@ E_CPONLY(kColorNativeColor6) \ E_CPONLY(kColorNativeBaseColor) \ E_CPONLY(kColorNativeSecondaryColor) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_compositor_compositor.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_compositor_compositor.cc index 6f1bdae0e629..f5f4dcb524d1 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_compositor_compositor.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_compositor_compositor.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/compositor/compositor.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/ui/compositor/compositor.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/ui/compositor/compositor.cc -@@ -886,7 +886,7 @@ void Compositor::OnResume() { +@@ -896,7 +896,7 @@ void Compositor::OnResume() { // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_compositor_compositor.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_compositor_compositor.h index 268a48a59e0d..73b1e1444a7c 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_compositor_compositor.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_compositor_compositor.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/compositor/compositor.h.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/ui/compositor/compositor.h.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/ui/compositor/compositor.h -@@ -453,7 +453,7 @@ class COMPOSITOR_EXPORT Compositor : public base::Powe +@@ -458,7 +458,7 @@ class COMPOSITOR_EXPORT Compositor : public base::Powe // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_events_devices_x11_device__data__manager__x11.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_events_devices_x11_device__data__manager__x11.cc index 6d82a0c801b0..a3c44d8dc29d 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_events_devices_x11_device__data__manager__x11.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_events_devices_x11_device__data__manager__x11.cc @@ -1,10 +1,10 @@ ---- src/3rdparty/chromium/ui/events/devices/x11/device_data_manager_x11.cc.orig 2023-01-11 09:17:16 UTC +--- src/3rdparty/chromium/ui/events/devices/x11/device_data_manager_x11.cc.orig 2023-07-16 15:47:57 UTC +++ src/3rdparty/chromium/ui/events/devices/x11/device_data_manager_x11.cc -@@ -875,6 +875,7 @@ void DeviceDataManagerX11::SetDisabledKeyboardAllowedK +@@ -876,6 +876,7 @@ void DeviceDataManagerX11::SetDisabledKeyboardAllowedK } void DeviceDataManagerX11::DisableDevice(x11::Input::DeviceId deviceid) { + NOTIMPLEMENTED(); blocked_devices_.set(static_cast<uint32_t>(deviceid), true); // TODO(rsadam@): Support blocking touchscreen devices. - std::vector<InputDevice> keyboards = GetKeyboardDevices(); + std::vector<KeyboardDevice> keyboards = GetKeyboardDevices(); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_events_event.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_events_event.cc index eb84a2adffd6..a25d4a145c88 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_events_event.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_events_event.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/events/event.cc.orig 2023-01-11 09:17:16 UTC +--- src/3rdparty/chromium/ui/events/event.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/ui/events/event.cc -@@ -419,7 +419,7 @@ std::string LocatedEvent::ToString() const { +@@ -427,7 +427,7 @@ std::string LocatedEvent::ToString() const { MouseEvent::MouseEvent(const PlatformEvent& native_event) : LocatedEvent(native_event), changed_button_flags_(GetChangedMouseButtonFlagsFromNative(native_event)), @@ -9,7 +9,7 @@ movement_(GetMouseMovementFromNative(native_event)), #endif pointer_details_(GetMousePointerDetailsFromNative(native_event)) { -@@ -674,7 +674,7 @@ std::unique_ptr<Event> MouseWheelEvent::Clone() const +@@ -676,7 +676,7 @@ std::unique_ptr<Event> MouseWheelEvent::Clone() const return std::make_unique<MouseWheelEvent>(*this); } @@ -18,7 +18,7 @@ // This value matches Windows, Fuchsia WHEEL_DELTA, and (roughly) Firefox on // Linux. // static -@@ -923,7 +923,7 @@ void KeyEvent::InitializeNative() { +@@ -936,7 +936,7 @@ void KeyEvent::InitializeNative() { if (synthesize_key_repeat_enabled_ && IsRepeated(GetLastKeyEvent())) set_flags(flags() | EF_IS_REPEAT); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_events_gesture__detection_motion__event__generic.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_events_gesture__detection_motion__event__generic.h new file mode 100644 index 000000000000..a67968ebae51 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_events_gesture__detection_motion__event__generic.h @@ -0,0 +1,10 @@ +--- src/3rdparty/chromium/ui/events/gesture_detection/motion_event_generic.h.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/ui/events/gesture_detection/motion_event_generic.h +@@ -7,6 +7,7 @@ + + #include <stddef.h> + #include <stdint.h> ++#include <vector> + + #include "base/time/time.h" + #include "third_party/abseil-cpp/absl/container/inlined_vector.h" diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_BUILD.gn index e508661c0172..5dfb92dcf6f8 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/gfx/BUILD.gn.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/ui/gfx/BUILD.gn.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/ui/gfx/BUILD.gn -@@ -611,7 +611,7 @@ jumbo_source_set("memory_buffer_sources") { +@@ -646,7 +646,7 @@ jumbo_source_set("memory_buffer_sources") { deps += [ "//build/config/linux/libdrm" ] } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_canvas__skia.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_canvas__skia.cc index 58dab0f666d0..e8d0097a48fd 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_canvas__skia.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_canvas__skia.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/gfx/canvas_skia.cc.orig 2022-02-28 16:54:41 UTC +--- src/3rdparty/chromium/ui/gfx/canvas_skia.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/ui/gfx/canvas_skia.cc -@@ -200,7 +200,7 @@ void Canvas::DrawStringRectWithFlags(const std::u16str +@@ -212,7 +212,7 @@ void Canvas::DrawStringRectWithFlags(const std::u16str Range range = StripAcceleratorChars(flags, &adjusted_text); bool elide_text = ((flags & NO_ELLIPSIS) == 0); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_codec_png__codec.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_codec_png__codec.cc index 49c8a36f170a..9a21e49de835 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_codec_png__codec.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_codec_png__codec.cc @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/ui/gfx/codec/png_codec.cc.orig 2022-02-07 13:39:41 UTC +--- src/3rdparty/chromium/ui/gfx/codec/png_codec.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/ui/gfx/codec/png_codec.cc -@@ -10,7 +10,7 @@ - #include "base/memory/raw_ptr.h" +@@ -12,7 +12,7 @@ + #include "base/metrics/histogram_macros.h" #include "base/notreached.h" #include "base/strings/string_util.h" -#include "third_party/libpng/png.h" diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_font__list.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_font__list.cc deleted file mode 100644 index ed0c71d87717..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_font__list.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/ui/gfx/font_list.cc.orig 2022-02-28 16:54:41 UTC -+++ src/3rdparty/chromium/ui/gfx/font_list.cc -@@ -27,7 +27,7 @@ base::LazyInstance<scoped_refptr<gfx::FontListImpl>>:: - bool g_default_impl_initialized = false; - - bool IsFontFamilyAvailable(const std::string& family, SkFontMgr* fontManager) { --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - return !!fontManager->legacyMakeTypeface(family.c_str(), SkFontStyle()); - #else - sk_sp<SkFontStyleSet> set(fontManager->matchFamily(family.c_str())); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_linux_client__native__pixmap__dmabuf.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_linux_client__native__pixmap__dmabuf.cc deleted file mode 100644 index d398efd7f79c..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_linux_client__native__pixmap__dmabuf.cc +++ /dev/null @@ -1,25 +0,0 @@ ---- src/3rdparty/chromium/ui/gfx/linux/client_native_pixmap_dmabuf.cc.orig 2022-02-07 13:39:41 UTC -+++ src/3rdparty/chromium/ui/gfx/linux/client_native_pixmap_dmabuf.cc -@@ -5,7 +5,9 @@ - #include "ui/gfx/linux/client_native_pixmap_dmabuf.h" - - #include <fcntl.h> -+#if !defined(__OpenBSD__) && !defined(__FreeBSD__) - #include <linux/version.h> -+#endif - #include <stddef.h> - #include <sys/ioctl.h> - #include <sys/mman.h> -@@ -27,11 +29,7 @@ - #include "ui/gfx/buffer_format_util.h" - #include "ui/gfx/switches.h" - --#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) --#include <linux/dma-buf.h> --#else --#include <linux/types.h> -- -+#if defined(__OpenBSD__) || defined(__FreeBSD__) - struct dma_buf_sync { - __u64 flags; - }; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_linux_dmabuf__uapi.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_linux_dmabuf__uapi.h new file mode 100644 index 000000000000..2746d1e87073 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_linux_dmabuf__uapi.h @@ -0,0 +1,36 @@ +--- src/3rdparty/chromium/ui/gfx/linux/dmabuf_uapi.h.orig 2023-12-12 22:08:45 UTC ++++ src/3rdparty/chromium/ui/gfx/linux/dmabuf_uapi.h +@@ -5,12 +5,11 @@ + #ifndef UI_GFX_LINUX_DMABUF_UAPI_H_ + #define UI_GFX_LINUX_DMABUF_UAPI_H_ + +-#include <linux/version.h> ++#include <sys/types.h> + +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) +-#include <linux/dma-buf.h> +-#else +-#include <linux/types.h> ++typedef int32_t __s32; ++typedef uint32_t __u32; ++typedef uint64_t __u64; + + struct dma_buf_sync { + __u64 flags; +@@ -26,9 +25,7 @@ constexpr unsigned long DMA_BUF_IOCTL_SYNC = + constexpr char DMA_BUF_BASE = 'b'; + constexpr unsigned long DMA_BUF_IOCTL_SYNC = + _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync); +-#endif + +-#ifndef DMA_BUF_IOCTL_EXPORT_SYNC_FILE + struct dma_buf_export_sync_file { + __u32 flags; + __s32 fd; +@@ -43,6 +40,5 @@ constexpr unsigned long DMA_BUF_IOCTL_IMPORT_SYNC_FILE + _IOWR(DMA_BUF_BASE, 2, struct dma_buf_export_sync_file); + constexpr unsigned long DMA_BUF_IOCTL_IMPORT_SYNC_FILE = + _IOW(DMA_BUF_BASE, 3, struct dma_buf_import_sync_file); +-#endif + + #endif // UI_GFX_LINUX_DMABUF_UAPI_H_ diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_native__pixmap__handle.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_native__pixmap__handle.cc index 650932b68276..d244dfdc7cfe 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_native__pixmap__handle.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_native__pixmap__handle.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/ui/gfx/native_pixmap_handle.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/ui/gfx/native_pixmap_handle.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/ui/gfx/native_pixmap_handle.cc @@ -11,7 +11,7 @@ #include "ui/gfx/buffer_format_util.h" diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_native__widget__types.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_native__widget__types.h index 401c8ea1d46b..de4ba874bf44 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_native__widget__types.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_native__widget__types.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/gfx/native_widget_types.h.orig 2022-02-28 16:54:41 UTC +--- src/3rdparty/chromium/ui/gfx/native_widget_types.h.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/ui/gfx/native_widget_types.h -@@ -106,7 +106,7 @@ class SkBitmap; +@@ -103,7 +103,7 @@ class SkBitmap; // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. @@ -8,13 +8,13 @@ +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) extern "C" { struct _AtkObject; - typedef struct _AtkObject AtkObject; -@@ -209,7 +209,7 @@ typedef NSFont* NativeFont; - typedef id NativeViewAccessible; + using AtkObject = struct _AtkObject; +@@ -221,7 +221,7 @@ using NativeViewAccessible = struct objc_object*; + #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Linux doesn't have a native font type. - typedef AtkObject* NativeViewAccessible; + using NativeViewAccessible = AtkObject*; #else diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_switches.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_switches.cc index 7b19c6ccc833..7e79bf0f77bb 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_switches.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_switches.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/gfx/switches.cc.orig 2023-01-11 09:17:16 UTC +--- src/3rdparty/chromium/ui/gfx/switches.cc.orig 2023-07-16 15:47:57 UTC +++ src/3rdparty/chromium/ui/gfx/switches.cc -@@ -33,7 +33,7 @@ const char kForcePrefersReducedMotion[] = "force-prefe +@@ -28,7 +28,7 @@ const char kForcePrefersReducedMotion[] = "force-prefe // Run in headless mode, i.e., without a UI or display server dependencies. const char kHeadless[] = "headless"; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_switches.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_switches.h index cb08def77887..3f2994715608 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_switches.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_switches.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/gfx/switches.h.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/ui/gfx/switches.h.orig 2023-07-16 15:47:57 UTC +++ src/3rdparty/chromium/ui/gfx/switches.h -@@ -19,7 +19,7 @@ GFX_SWITCHES_EXPORT extern const char kEnableNativeGpu +@@ -18,7 +18,7 @@ GFX_SWITCHES_EXPORT extern const char kEnableNativeGpu GFX_SWITCHES_EXPORT extern const char kForcePrefersReducedMotion[]; GFX_SWITCHES_EXPORT extern const char kHeadless[]; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_x_xlib__support.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_x_xlib__support.cc index 934f12ccb635..25f1781933fa 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_x_xlib__support.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gfx_x_xlib__support.cc @@ -1,17 +1,17 @@ ---- src/3rdparty/chromium/ui/gfx/x/xlib_support.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/ui/gfx/x/xlib_support.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/ui/gfx/x/xlib_support.cc @@ -42,10 +42,18 @@ void InitXlib() { if (xlib_loader->loaded()) return; -+#if defined(OS_BSD) ++#if BUILDFLAG(IS_BSD) + CHECK(xlib_loader->Load("libX11.so")); +#else CHECK(xlib_loader->Load("libX11.so.6")); +#endif auto* xlib_xcb_loader = GetXlibXcbLoader(); -+#if defined(OS_BSD) ++#if BUILDFLAG(IS_BSD) + CHECK(xlib_xcb_loader->Load("libX11-xcb.so")); +#else CHECK(xlib_xcb_loader->Load("libX11-xcb.so.1")); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gl_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gl_BUILD.gn index b75fb8ce4836..4173ed9ea7cf 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gl_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gl_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/gl/BUILD.gn.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/ui/gl/BUILD.gn.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/ui/gl/BUILD.gn -@@ -172,8 +172,6 @@ jumbo_component("gl") { +@@ -165,8 +165,6 @@ jumbo_component("gl") { defines += [ "GPU_ENABLE_SERVICE_LOGGING" ] } @@ -9,7 +9,7 @@ all_dependent_configs = [ ":gl_config" ] public_configs = [ "//third_party/khronos:khronos_headers" ] -@@ -190,7 +188,6 @@ jumbo_component("gl") { +@@ -183,7 +181,6 @@ jumbo_component("gl") { ] public_deps = [ "//base", @@ -17,7 +17,7 @@ "//ui/events/platform", "//ui/gfx", "//ui/gfx/geometry", -@@ -455,7 +452,6 @@ jumbo_component("gl") { +@@ -433,7 +430,6 @@ jumbo_component("gl") { data_deps += [ "//third_party/angle:libEGL", "//third_party/angle:libGLESv2", @@ -25,7 +25,7 @@ ] if (enable_swiftshader) { data_deps += [ -@@ -709,7 +705,6 @@ test("gl_unittests") { +@@ -648,7 +644,6 @@ test("gl_unittests") { data_deps = [ "//testing/buildbot/filters:gl_unittests_filters", diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gl_gl__context.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gl_gl__context.cc index 41a4c19bebb3..100b11319b17 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gl_gl__context.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gl_gl__context.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/gl/gl_context.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/ui/gl/gl_context.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/ui/gl/gl_context.cc -@@ -416,7 +416,7 @@ bool GLContext::MakeVirtuallyCurrent( +@@ -445,7 +445,7 @@ bool GLContext::MakeVirtuallyCurrent( DCHECK(virtual_context->IsCurrent(surface)); if (switched_real_contexts || virtual_context != current_virtual_context_) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gl_gl__fence.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gl_gl__fence.cc new file mode 100644 index 000000000000..6f776755ee17 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gl_gl__fence.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/ui/gl/gl_fence.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/ui/gl/gl_fence.cc +@@ -20,7 +20,7 @@ + #endif + + #if defined(USE_EGL) +-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #define USE_GL_FENCE_ANDROID_NATIVE_FENCE_SYNC + #include "ui/gl/gl_fence_android_native_fence_sync.h" + #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gl_gl__implementation.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gl_gl__implementation.cc index 4a3afa687cde..bae39201ddc7 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gl_gl__implementation.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gl_gl__implementation.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/gl/gl_implementation.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/ui/gl/gl_implementation.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/ui/gl/gl_implementation.cc -@@ -288,7 +288,7 @@ GetRequestedGLImplementationFromCommandLine( +@@ -291,7 +291,7 @@ GetRequestedGLImplementationFromCommandLine( *fallback_to_software_gl = false; bool overrideUseSoftwareGL = command_line->HasSwitch(switches::kOverrideUseSoftwareGLForTests); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gl_gl__switches.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gl_gl__switches.cc index c918d5c71f4a..71aa3de0060b 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gl_gl__switches.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gl_gl__switches.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/ui/gl/gl_switches.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/ui/gl/gl_switches.cc.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/ui/gl/gl_switches.cc @@ -12,7 +12,7 @@ #include "base/android/build_info.h" @@ -9,7 +9,7 @@ #include <vulkan/vulkan_core.h> #include "third_party/angle/src/gpu_info_util/SystemInfo.h" // nogncheck #endif -@@ -298,7 +298,7 @@ bool IsDefaultANGLEVulkan() { +@@ -297,7 +297,7 @@ bool IsDefaultANGLEVulkan() { base::android::SDK_VERSION_Q) return false; #endif // BUILDFLAG(IS_ANDROID) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gtk_gtk__compat.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gtk_gtk__compat.cc index 5e60d9bccb3f..fdd51d2768de 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gtk_gtk__compat.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gtk_gtk__compat.cc @@ -1,10 +1,10 @@ ---- src/3rdparty/chromium/ui/gtk/gtk_compat.cc.orig 2022-02-07 13:39:41 UTC +--- src/3rdparty/chromium/ui/gtk/gtk_compat.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/ui/gtk/gtk_compat.cc @@ -62,27 +62,47 @@ auto DlCast(void* symbol) { } void* GetLibGio() { -+#if defined(OS_BSD) ++#if BUILDFLAG(IS_BSD) + static void* libgio = DlOpen("libgio-2.0.so"); +#else static void* libgio = DlOpen("libgio-2.0.so.0"); @@ -13,7 +13,7 @@ } void* GetLibGdkPixbuf() { -+#if defined(OS_BSD) ++#if BUILDFLAG(IS_BSD) + static void* libgdk_pixbuf = DlOpen("libgdk_pixbuf-2.0.so"); +#else static void* libgdk_pixbuf = DlOpen("libgdk_pixbuf-2.0.so.0"); @@ -22,7 +22,7 @@ } void* GetLibGdk3() { -+#if defined(OS_BSD) ++#if BUILDFLAG(IS_BSD) + static void* libgdk3 = DlOpen("libgdk-3.so"); +#else static void* libgdk3 = DlOpen("libgdk-3.so.0"); @@ -31,7 +31,7 @@ } void* GetLibGtk3(bool check = true) { -+#if defined(OS_BSD) ++#if BUILDFLAG(IS_BSD) + static void* libgtk3 = DlOpen("libgtk-3.so", check); +#else static void* libgtk3 = DlOpen("libgtk-3.so.0", check); @@ -40,7 +40,7 @@ } void* GetLibGtk4(bool check = true) { -+#if defined(OS_BSD) ++#if BUILDFLAG(IS_BSD) + static void* libgtk4 = DlOpen("libgtk-4.so", check); +#else static void* libgtk4 = DlOpen("libgtk-4.so.1", check); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gtk_gtk__ui.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gtk_gtk__ui.cc new file mode 100644 index 000000000000..777ee2dbd431 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gtk_gtk__ui.cc @@ -0,0 +1,22 @@ +--- src/3rdparty/chromium/ui/gtk/gtk_ui.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/ui/gtk/gtk_ui.cc +@@ -955,11 +955,19 @@ ui::DisplayConfig GtkUi::GetDisplayConfig() const { + GdkRectangle geometry; + gdk_monitor_get_geometry(monitor, &geometry); + int monitor_scale = std::max(1, gdk_monitor_get_scale_factor(monitor)); ++#if defined(__clang__) && (__clang_major__ >= 16) + config.display_geometries.emplace_back( + gfx::Rect(monitor_scale * geometry.x, monitor_scale * geometry.y, + monitor_scale * geometry.width, + monitor_scale * geometry.height), + monitor_scale * font_scale); ++#else ++ config.display_geometries.emplace_back() = { ++ gfx::Rect(monitor_scale * geometry.x, monitor_scale * geometry.y, ++ monitor_scale * geometry.width, ++ monitor_scale * geometry.height), ++ static_cast<float>(monitor_scale * font_scale)}; ++#endif + } + return config; + } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gtk_printing_print__dialog__gtk.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gtk_printing_print__dialog__gtk.cc index b6194b735755..2d08cd914c58 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gtk_printing_print__dialog__gtk.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_gtk_printing_print__dialog__gtk.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/gtk/printing/print_dialog_gtk.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/ui/gtk/printing/print_dialog_gtk.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/ui/gtk/printing/print_dialog_gtk.cc -@@ -403,7 +403,7 @@ void PrintDialogGtk::ShowDialog( +@@ -440,7 +440,7 @@ void PrintDialogGtk::ShowDialog( GtkPrintCapabilities cap = static_cast<GtkPrintCapabilities>( GTK_PRINT_CAPABILITY_GENERATE_PDF | GTK_PRINT_CAPABILITY_PAGE_SET | GTK_PRINT_CAPABILITY_COPIES | GTK_PRINT_CAPABILITY_COLLATE | diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_native__theme_native__theme.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_native__theme_native__theme.h index dac2cd783482..3fa0142466ac 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_native__theme_native__theme.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_native__theme_native__theme.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/native_theme/native_theme.h.orig 2022-03-25 21:59:56 UTC +--- src/3rdparty/chromium/ui/native_theme/native_theme.h.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/ui/native_theme/native_theme.h -@@ -59,7 +59,7 @@ class NATIVE_THEME_EXPORT NativeTheme { +@@ -62,7 +62,7 @@ class NATIVE_THEME_EXPORT NativeTheme { kCheckbox, // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_native__theme_native__theme__base.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_native__theme_native__theme__base.cc index 9f5cbc157524..07bb9392d23e 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_native__theme_native__theme__base.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_native__theme_native__theme__base.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/ui/native_theme/native_theme_base.cc.orig 2023-02-08 09:03:45 UTC +--- src/3rdparty/chromium/ui/native_theme/native_theme_base.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/ui/native_theme/native_theme_base.cc -@@ -273,7 +273,7 @@ void NativeThemeBase::Paint(cc::PaintCanvas* canvas, +@@ -275,7 +275,7 @@ void NativeThemeBase::Paint(cc::PaintCanvas* canvas, break; // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) case kFrameTopArea: - PaintFrameTopArea(canvas, state, rect, extra.frame_top_area, - color_scheme); + PaintFrameTopArea(canvas, state, rect, + absl::get<FrameTopAreaExtraParams>(extra), diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_common_features.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_common_features.cc new file mode 100644 index 000000000000..9d319f36638e --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_common_features.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/ui/ozone/common/features.cc.orig 2023-05-31 08:12:17 UTC ++++ src/3rdparty/chromium/ui/ozone/common/features.cc +@@ -30,7 +30,7 @@ BASE_FEATURE(kWaylandSurfaceSubmissionInPixelCoordinat + // enabled. + BASE_FEATURE(kWaylandFractionalScaleV1, + "WaylandFractionalScaleV1", +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + base::FEATURE_ENABLED_BY_DEFAULT + #else + base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_headless_vulkan__implementation__headless.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_headless_vulkan__implementation__headless.cc index 33e247782197..91765f7c1d9e 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_headless_vulkan__implementation__headless.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_headless_vulkan__implementation__headless.cc @@ -1,6 +1,24 @@ ---- src/3rdparty/chromium/ui/ozone/platform/headless/vulkan_implementation_headless.cc.orig 2022-11-30 08:12:58 UTC +--- src/3rdparty/chromium/ui/ozone/platform/headless/vulkan_implementation_headless.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/ui/ozone/platform/headless/vulkan_implementation_headless.cc -@@ -155,7 +155,7 @@ VulkanImplementationHeadless::CreateImageFromGpuMemory +@@ -117,7 +117,7 @@ VulkanImplementationHeadless::ExportVkFenceToGpuFence( + + VkExternalSemaphoreHandleTypeFlagBits + VulkanImplementationHeadless::GetExternalSemaphoreHandleType() { +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT; + #else + return VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT; +@@ -127,7 +127,7 @@ VulkanImplementationHeadless::GetExternalSemaphoreHand + bool VulkanImplementationHeadless::CanImportGpuMemoryBuffer( + gpu::VulkanDeviceQueue* device_queue, + gfx::GpuMemoryBufferType memory_buffer_type) { +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + const auto& enabled_extensions = device_queue->enabled_extensions(); + return gfx::HasExtension(enabled_extensions, + VK_EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME) && +@@ -150,7 +150,7 @@ VulkanImplementationHeadless::CreateImageFromGpuMemory VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT; auto tiling = VK_IMAGE_TILING_OPTIMAL; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__toplevel__window.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__toplevel__window.cc index 8ee267a44110..028006979cbc 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__toplevel__window.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__toplevel__window.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/ozone/platform/wayland/host/wayland_toplevel_window.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/ui/ozone/platform/wayland/host/wayland_toplevel_window.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/ui/ozone/platform/wayland/host/wayland_toplevel_window.cc -@@ -448,7 +448,7 @@ void WaylandToplevelWindow::HandleAuraToplevelConfigur +@@ -539,7 +539,7 @@ void WaylandToplevelWindow::HandleAuraToplevelConfigur const bool did_active_change = is_active_ != window_states.is_activated; is_active_ = window_states.is_activated; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__toplevel__window.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__toplevel__window.h index 8ae031564f3a..f3e424c41695 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__toplevel__window.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__toplevel__window.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/ozone/platform/wayland/host/wayland_toplevel_window.h.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/ui/ozone/platform/wayland/host/wayland_toplevel_window.h.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/ui/ozone/platform/wayland/host/wayland_toplevel_window.h -@@ -250,7 +250,7 @@ class WaylandToplevelWindow : public WaylandWindow, +@@ -244,7 +244,7 @@ class WaylandToplevelWindow : public WaylandWindow, // Contains the previous state of the window. PlatformWindowState previous_state_ = PlatformWindowState::kUnknown; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__window.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__window.cc new file mode 100644 index 000000000000..c53ee9f8d1ce --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__window.cc @@ -0,0 +1,44 @@ +--- src/3rdparty/chromium/ui/ozone/platform/wayland/host/wayland_window.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/ui/ozone/platform/wayland/host/wayland_window.cc +@@ -233,7 +233,7 @@ void WaylandWindow::OnPointerFocusChanged(bool focused + // Whenever the window gets the pointer focus back, the cursor shape must be + // updated. Otherwise, it is invalidated upon wl_pointer::leave and is not + // restored by the Wayland compositor. +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (focused && async_cursor_) { + async_cursor_->AddCursorLoadedCallback( + base::BindOnce(&WaylandWindow::OnCursorLoaded, +@@ -490,7 +490,7 @@ bool WaylandWindow::ShouldUseNativeFrame() const { + void WaylandWindow::SetCursor(scoped_refptr<PlatformCursor> platform_cursor) { + DCHECK(platform_cursor); + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + auto async_cursor = WaylandAsyncCursor::FromPlatformCursor(platform_cursor); + + if (async_cursor_ == async_cursor) { +@@ -661,7 +661,7 @@ std::string WaylandWindow::WindowStates::ToString() co + } else { + base::TrimString(states, " ", &states); + } +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + states += "; tiled_edges: "; + std::string tiled = ""; + if (tiled_edges.left) { +@@ -1111,12 +1111,12 @@ void WaylandWindow::UpdateCursorShape(scoped_refptr<Bi + cursor->bitmaps(), hotspot_in_dips, + std::ceil(cursor->cursor_image_scale_factor())); + } +-#if !BUILDFLAG(IS_LINUX) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + cursor_ = cursor; + #endif + } + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void WaylandWindow::OnCursorLoaded(scoped_refptr<WaylandAsyncCursor> cursor, + scoped_refptr<BitmapCursor> bitmap_cursor) { + if (HasPointerFocus() && async_cursor_ == cursor && bitmap_cursor) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__window.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__window.h index 4dd51dee4908..eb31e1e1535d 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__window.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__window.h @@ -1,6 +1,15 @@ ---- src/3rdparty/chromium/ui/ozone/platform/wayland/host/wayland_window.h.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/ui/ozone/platform/wayland/host/wayland_window.h.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/ui/ozone/platform/wayland/host/wayland_window.h -@@ -231,7 +231,7 @@ class WaylandWindow : public PlatformWindow, +@@ -39,7 +39,7 @@ + #include "ui/platform_window/platform_window_init_properties.h" + #include "ui/platform_window/wm/wm_drag_handler.h" + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "ui/ozone/platform/wayland/host/wayland_async_cursor.h" + #endif + +@@ -241,7 +241,7 @@ class WaylandWindow : public PlatformWindow, bool is_snapped_primary = false; bool is_snapped_secondary = false; bool is_floated = false; @@ -8,4 +17,22 @@ +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) WindowTiledEdges tiled_edges; #endif - }; + +@@ -492,7 +492,7 @@ class WaylandWindow : public PlatformWindow, + + void UpdateCursorShape(scoped_refptr<BitmapCursor> cursor); + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void OnCursorLoaded(scoped_refptr<WaylandAsyncCursor> cursor, + scoped_refptr<BitmapCursor> bitmap_cursor); + #endif +@@ -551,7 +551,7 @@ class WaylandWindow : public PlatformWindow, + + wl::Object<zaura_surface> aura_surface_; + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // The current asynchronously loaded cursor (Linux specific). + scoped_refptr<WaylandAsyncCursor> async_cursor_; + #else diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_xdg__toplevel__wrapper__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_xdg__toplevel__wrapper__impl.cc index d46e1bcac45c..3c2a96a74fe6 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_xdg__toplevel__wrapper__impl.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_xdg__toplevel__wrapper__impl.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.cc -@@ -272,7 +272,7 @@ void XDGToplevelWrapperImpl::ConfigureTopLevel( +@@ -308,7 +308,7 @@ void XDGToplevelWrapperImpl::OnToplevelConfigure(void* CheckIfWlArrayHasValue(states, XDG_TOPLEVEL_STATE_ACTIVATED), }; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - if (xdg_toplevel_get_version(xdg_toplevel) >= + if (xdg_toplevel_get_version(toplevel) >= XDG_TOPLEVEL_STATE_TILED_LEFT_SINCE_VERSION) { // All four tiled states have the same since version, so it is enough to diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_zwp__text__input__wrapper__v1.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_zwp__text__input__wrapper__v1.cc new file mode 100644 index 000000000000..5f5cdc1f1626 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_zwp__text__input__wrapper__v1.cc @@ -0,0 +1,21 @@ +--- src/3rdparty/chromium/ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v1.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v1.cc +@@ -226,6 +226,10 @@ void ZWPTextInputWrapperV1::SetSurroundingText( + // so if it exceeds 16 bits, it may be broken. + static constexpr size_t kSizeLimit = 60000; + if (HasAdvancedSurroundingTextSupport() && text.length() > kSizeLimit) { ++#if defined(__FreeBSD_version) && __FreeBSD_version < 1300048 ++ PLOG(ERROR) << "memfd is not supported"; ++ return; ++#else + base::ScopedFD memfd(memfd_create("surrounding_text", MFD_CLOEXEC)); + if (!memfd.get()) { + PLOG(ERROR) << "Failed to create memfd"; +@@ -238,6 +242,7 @@ void ZWPTextInputWrapperV1::SetSurroundingText( + zcr_extended_text_input_v1_set_large_surrounding_text( + extended_obj_.get(), memfd.get(), text.length(), + selection_range.start(), selection_range.end()); ++#endif + } else { + zwp_text_input_v1_set_surrounding_text(obj_.get(), text.c_str(), + selection_range.start(), diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_ozone__platform__wayland.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_ozone__platform__wayland.cc index 223bac5db10c..07714b9614c1 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_ozone__platform__wayland.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_ozone__platform__wayland.cc @@ -1,7 +1,14 @@ ---- src/3rdparty/chromium/ui/ozone/platform/wayland/ozone_platform_wayland.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/ui/ozone/platform/wayland/ozone_platform_wayland.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/ui/ozone/platform/wayland/ozone_platform_wayland.cc -@@ -71,7 +71,7 @@ +@@ -66,13 +66,13 @@ + #include "ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h" + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/ozone/platform/wayland/host/wayland_cursor_factory.h" + #else + #include "ui/ozone/common/bitmap_cursor_factory.h" #endif -#if BUILDFLAG(IS_LINUX) @@ -9,7 +16,16 @@ #include "ui/ozone/platform/wayland/host/linux_ui_delegate_wayland.h" #endif -@@ -246,7 +246,7 @@ class OzonePlatformWayland : public OzonePlatform, +@@ -262,7 +262,7 @@ class OzonePlatformWayland : public OzonePlatform, + + buffer_manager_connector_ = std::make_unique<WaylandBufferManagerConnector>( + connection_->buffer_manager_host()); +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + cursor_factory_ = std::make_unique<WaylandCursorFactory>(connection_.get()); + #else + cursor_factory_ = std::make_unique<BitmapCursorFactory>(); +@@ -272,7 +272,7 @@ class OzonePlatformWayland : public OzonePlatform, supported_buffer_formats_ = connection_->buffer_manager_host()->GetSupportedBufferFormats(); @@ -18,7 +34,7 @@ linux_ui_delegate_ = std::make_unique<LinuxUiDelegateWayland>(connection_.get()); #endif -@@ -470,7 +470,7 @@ class OzonePlatformWayland : public OzonePlatform, +@@ -510,7 +510,7 @@ class OzonePlatformWayland : public OzonePlatform, DrmRenderNodePathFinder path_finder_; #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_x11_ozone__platform__x11.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_x11_ozone__platform__x11.cc index 77f27f258b14..69946fcd81ce 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_x11_ozone__platform__x11.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_x11_ozone__platform__x11.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/ui/ozone/platform/x11/ozone_platform_x11.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/ui/ozone/platform/x11/ozone_platform_x11.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/ui/ozone/platform/x11/ozone_platform_x11.cc @@ -196,7 +196,7 @@ class OzonePlatformX11 : public OzonePlatform, properties->supports_global_application_menus = true; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_x11_x11__screen__ozone.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_x11_x11__screen__ozone.cc new file mode 100644 index 000000000000..b28474d43445 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_x11_x11__screen__ozone.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/ui/ozone/platform/x11/x11_screen_ozone.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/ui/ozone/platform/x11/x11_screen_ozone.cc +@@ -235,7 +235,7 @@ base::Value::List X11ScreenOzone::GetGpuExtraInfo( + return result; + } + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void X11ScreenOzone::SetDisplayConfig(const DisplayConfig& display_config) { + display_config_ = &display_config; + // See DesktopScreenLinux, which sets the |device_scale_factor| before |this| diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_x11_x11__screen__ozone.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_x11_x11__screen__ozone.h new file mode 100644 index 000000000000..052a328150d7 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_platform_x11_x11__screen__ozone.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/ui/ozone/platform/x11/x11_screen_ozone.h.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/ui/ozone/platform/x11/x11_screen_ozone.h +@@ -61,7 +61,7 @@ class X11ScreenOzone : public PlatformScreen, + std::string GetCurrentWorkspace() override; + base::Value::List GetGpuExtraInfo( + const gfx::GpuExtraInfo& gpu_extra_info) override; +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void SetDisplayConfig(const DisplayConfig& display_config) override; + #endif + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_public_ozone__platform.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_public_ozone__platform.h index 69ac9d2ee115..a51739fee085 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_public_ozone__platform.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_public_ozone__platform.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/ozone/public/ozone_platform.h.orig 2022-11-30 08:12:58 UTC +--- src/3rdparty/chromium/ui/ozone/public/ozone_platform.h.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/ui/ozone/public/ozone_platform.h -@@ -144,7 +144,7 @@ class COMPONENT_EXPORT(OZONE) OzonePlatform { +@@ -143,7 +143,7 @@ class COMPONENT_EXPORT(OZONE) OzonePlatform { // back via gpu extra info. bool fetch_buffer_formats_for_gmb_on_gpu = false; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_public_platform__screen.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_public_platform__screen.cc new file mode 100644 index 000000000000..a81db05108b1 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_public_platform__screen.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/ui/ozone/public/platform_screen.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/ui/ozone/public/platform_screen.cc +@@ -61,7 +61,7 @@ display::TabletState PlatformScreen::GetTabletState() + } + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void PlatformScreen::SetDisplayConfig(const DisplayConfig& display_config) {} + #endif + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_public_platform__screen.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_public_platform__screen.h new file mode 100644 index 000000000000..0527962d31c0 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_ozone_public_platform__screen.h @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/ui/ozone/public/platform_screen.h.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/ui/ozone/public/platform_screen.h +@@ -15,7 +15,7 @@ + #include "ui/gfx/gpu_extra_info.h" + #include "ui/gfx/native_widget_types.h" + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "ui/linux/linux_ui.h" + #endif + +@@ -136,7 +136,7 @@ class COMPONENT_EXPORT(OZONE_BASE) PlatformScreen { + virtual base::Value::List GetGpuExtraInfo( + const gfx::GpuExtraInfo& gpu_extra_info); + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Sets device scale factor received from external sources such as toolkits. + virtual void SetDisplayConfig(const DisplayConfig& display_config); + #endif diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_platform__window_platform__window__delegate.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_platform__window_platform__window__delegate.cc index 3e295b22fc60..a234f6b09567 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_platform__window_platform__window__delegate.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_platform__window_platform__window__delegate.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/platform_window/platform_window_delegate.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/ui/platform_window/platform_window_delegate.cc.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/ui/platform_window/platform_window_delegate.cc -@@ -29,7 +29,7 @@ PlatformWindowDelegate::PlatformWindowDelegate() = def +@@ -36,7 +36,7 @@ PlatformWindowDelegate::PlatformWindowDelegate() = def PlatformWindowDelegate::~PlatformWindowDelegate() = default; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_platform__window_platform__window__delegate.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_platform__window_platform__window__delegate.h index 6c4c24b12e2f..8078b0e1a956 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_platform__window_platform__window__delegate.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_platform__window_platform__window__delegate.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/platform_window/platform_window_delegate.h.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/ui/platform_window/platform_window_delegate.h.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/ui/platform_window/platform_window_delegate.h -@@ -130,7 +130,7 @@ class COMPONENT_EXPORT(PLATFORM_WINDOW) PlatformWindow +@@ -134,7 +134,7 @@ class COMPONENT_EXPORT(PLATFORM_WINDOW) PlatformWindow virtual void OnWindowStateChanged(PlatformWindowState old_state, PlatformWindowState new_state) = 0; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_controls_textfield_textfield.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_controls_textfield_textfield.cc index aab08dfe6cb7..b7f5e5968daf 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_controls_textfield_textfield.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_controls_textfield_textfield.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/views/controls/textfield/textfield.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/ui/views/controls/textfield/textfield.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/ui/views/controls/textfield/textfield.cc -@@ -74,7 +74,7 @@ +@@ -79,7 +79,7 @@ #include "base/win/win_util.h" #endif @@ -9,7 +9,7 @@ #include "ui/base/ime/linux/text_edit_command_auralinux.h" #include "ui/linux/linux_ui.h" #endif -@@ -168,7 +168,7 @@ bool IsControlKeyModifier(int flags) { +@@ -173,7 +173,7 @@ bool IsControlKeyModifier(int flags) { // Control-modified key combination, but we cannot extend it to other platforms // as Control has different meanings and behaviors. // https://crrev.com/2580483002/#msg46 @@ -18,7 +18,7 @@ return flags & ui::EF_CONTROL_DOWN; #else return false; -@@ -706,7 +706,7 @@ bool Textfield::OnKeyPressed(const ui::KeyEvent& event +@@ -742,7 +742,7 @@ bool Textfield::OnKeyPressed(const ui::KeyEvent& event if (!textfield) return handled; @@ -27,7 +27,7 @@ auto* linux_ui = ui::LinuxUi::instance(); std::vector<ui::TextEditCommandAuraLinux> commands; if (!handled && linux_ui && -@@ -878,7 +878,7 @@ void Textfield::AboutToRequestFocusFromTabTraversal(bo +@@ -924,7 +924,7 @@ void Textfield::AboutToRequestFocusFromTabTraversal(bo } bool Textfield::SkipDefaultKeyEventProcessing(const ui::KeyEvent& event) { @@ -36,7 +36,7 @@ // Skip any accelerator handling that conflicts with custom keybindings. auto* linux_ui = ui::LinuxUi::instance(); std::vector<ui::TextEditCommandAuraLinux> commands; -@@ -1831,7 +1831,7 @@ bool Textfield::ShouldDoLearning() { +@@ -1929,7 +1929,7 @@ bool Textfield::ShouldDoLearning() { return false; } @@ -45,7 +45,7 @@ // TODO(https://crbug.com/952355): Implement this method to support Korean IME // reconversion feature on native text fields (e.g. find bar). bool Textfield::SetCompositionFromExistingText( -@@ -2344,14 +2344,14 @@ ui::TextEditCommand Textfield::GetCommandForKeyEvent( +@@ -2442,14 +2442,14 @@ ui::TextEditCommand Textfield::GetCommandForKeyEvent( #endif return ui::TextEditCommand::DELETE_BACKWARD; } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_controls_textfield_textfield.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_controls_textfield_textfield.h index a18da2326123..f57e7d05b71f 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_controls_textfield_textfield.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_controls_textfield_textfield.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/views/controls/textfield/textfield.h.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/ui/views/controls/textfield/textfield.h.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/ui/views/controls/textfield/textfield.h -@@ -42,7 +42,7 @@ +@@ -44,7 +44,7 @@ #include "ui/views/view.h" #include "ui/views/word_lookup_client.h" @@ -9,7 +9,7 @@ #include <vector> #endif -@@ -450,7 +450,7 @@ class VIEWS_EXPORT Textfield : public View, +@@ -452,7 +452,7 @@ class VIEWS_EXPORT Textfield : public View, // Set whether the text should be used to improve typing suggestions. void SetShouldDoLearning(bool value) { should_do_learning_ = value; } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_corewm_tooltip__aura.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_corewm_tooltip__aura.cc index 658dfa312d5e..20dd34306bb6 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_corewm_tooltip__aura.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_corewm_tooltip__aura.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/views/corewm/tooltip_aura.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/ui/views/corewm/tooltip_aura.cc.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/ui/views/corewm/tooltip_aura.cc -@@ -51,7 +51,7 @@ constexpr int kVerticalPaddingBottom = 5; +@@ -38,7 +38,7 @@ namespace { bool CanUseTranslucentTooltipWidget() { // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_focus_focus__manager.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_focus_focus__manager.cc index 01f65e8da5fa..56647f4fc04d 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_focus_focus__manager.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_focus_focus__manager.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/views/focus/focus_manager.cc.orig 2023-01-11 09:17:16 UTC +--- src/3rdparty/chromium/ui/views/focus/focus_manager.cc.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/ui/views/focus/focus_manager.cc -@@ -625,7 +625,7 @@ bool FocusManager::RedirectAcceleratorToBubbleAnchorWi +@@ -577,7 +577,7 @@ bool FocusManager::RedirectAcceleratorToBubbleAnchorWi // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. @@ -9,7 +9,7 @@ // Processing an accelerator can delete things. Because we // need these objects afterwards on Linux, save widget_ as weak pointer and // save the close_on_deactivate property value of widget_delegate in a -@@ -642,7 +642,7 @@ bool FocusManager::RedirectAcceleratorToBubbleAnchorWi +@@ -594,7 +594,7 @@ bool FocusManager::RedirectAcceleratorToBubbleAnchorWi // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.cc index c60c14fcaaa5..07d81668aa10 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.cc.orig 2023-01-11 09:17:16 UTC +--- src/3rdparty/chromium/ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.cc.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.cc @@ -194,7 +194,7 @@ DragOperation DesktopDragDropClientOzone::StartDragAnd return drag_operation_; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__window__tree__host__platform.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__window__tree__host__platform.cc index 27dde6a0455b..bf67f7ad257b 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__window__tree__host__platform.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__window__tree__host__platform.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc -@@ -43,7 +43,7 @@ +@@ -44,7 +44,7 @@ #include "ui/wm/core/window_util.h" #include "ui/wm/public/window_move_client.h" @@ -9,7 +9,7 @@ #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone_linux.h" #endif -@@ -257,7 +257,7 @@ void DesktopWindowTreeHostPlatform::Init(const Widget: +@@ -265,7 +265,7 @@ void DesktopWindowTreeHostPlatform::Init(const Widget: if (params.type == Widget::InitParams::TYPE_WINDOW) GetContentWindow()->SetProperty(aura::client::kAnimationsDisabledKey, true); @@ -18,7 +18,7 @@ const bool requires_accelerated_widget = params.requires_accelerated_widget; #else const bool requires_accelerated_widget = false; -@@ -329,7 +329,7 @@ std::unique_ptr<aura::client::DragDropClient> +@@ -346,7 +346,7 @@ std::unique_ptr<aura::client::DragDropClient> DesktopWindowTreeHostPlatform::CreateDragDropClient() { ui::WmDragHandler* drag_handler = ui::GetWmDragHandler(*(platform_window())); std::unique_ptr<DesktopDragDropClientOzone> drag_drop_client = @@ -27,7 +27,7 @@ std::make_unique<DesktopDragDropClientOzoneLinux>(window(), drag_handler); #else std::make_unique<DesktopDragDropClientOzone>(window(), drag_handler); -@@ -1039,7 +1039,7 @@ display::Display DesktopWindowTreeHostPlatform::GetDis +@@ -1081,7 +1081,7 @@ bool DesktopWindowTreeHostPlatform::RotateFocusForWidg // DesktopWindowTreeHost: // Linux subclasses this host and adds some Linux specific bits. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_widget_widget.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_widget_widget.cc index 90f4d3025dd4..819ebb710d6d 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_widget_widget.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_widget_widget.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/views/widget/widget.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/ui/views/widget/widget.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/ui/views/widget/widget.cc -@@ -52,7 +52,7 @@ +@@ -54,7 +54,7 @@ #include "ui/views/window/custom_frame_view.h" #include "ui/views/window/dialog_delegate.h" @@ -9,7 +9,7 @@ #include "ui/linux/linux_ui.h" #endif -@@ -1989,7 +1989,7 @@ const ui::NativeTheme* Widget::GetNativeTheme() const +@@ -2041,7 +2041,7 @@ const ui::NativeTheme* Widget::GetNativeTheme() const if (parent_) return parent_->GetNativeTheme(); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_widget_widget.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_widget_widget.h index 84a4e98c1e40..53a8abcb720d 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_widget_widget.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_widget_widget.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/views/widget/widget.h.orig 2023-01-11 09:17:16 UTC +--- src/3rdparty/chromium/ui/views/widget/widget.h.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/ui/views/widget/widget.h -@@ -408,7 +408,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWid +@@ -410,7 +410,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWid // If set, the widget was created in headless mode. bool headless_mode = false; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_window_dialog__delegate.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_window_dialog__delegate.cc index 5afcd6af4470..f4d7dfbe9cb1 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_window_dialog__delegate.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_window_dialog__delegate.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ui/views/window/dialog_delegate.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/ui/views/window/dialog_delegate.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/ui/views/window/dialog_delegate.cc -@@ -73,7 +73,7 @@ Widget* DialogDelegate::CreateDialogWidget( +@@ -78,7 +78,7 @@ Widget* DialogDelegate::CreateDialogWidget( // static bool DialogDelegate::CanSupportCustomFrame(gfx::NativeView parent) { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_window_frame__background.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_window_frame__background.cc index 4f644ce8b9bc..b34d95a6105f 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_window_frame__background.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_ui_views_window_frame__background.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/ui/views/window/frame_background.cc.orig 2022-02-28 16:54:41 UTC +--- src/3rdparty/chromium/ui/views/window/frame_background.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/ui/views/window/frame_background.cc @@ -110,7 +110,7 @@ void FrameBackground::PaintMaximized(gfx::Canvas* canv int width) const { @@ -7,5 +7,5 @@ -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ BUILDFLAG(ENABLE_DESKTOP_AURA) - ui::NativeTheme::ExtraParams params; - params.frame_top_area.use_custom_frame = use_custom_frame_; + ui::NativeTheme::FrameTopAreaExtraParams frame_top_area; + frame_top_area.use_custom_frame = use_custom_frame_; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_BUILD.gn b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_BUILD.gn index 14c7a8d8a55c..13e4649ae0be 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_BUILD.gn +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/v8/BUILD.gn.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/v8/BUILD.gn.orig 2023-12-12 22:08:45 UTC +++ src/3rdparty/chromium/v8/BUILD.gn -@@ -1305,6 +1305,14 @@ config("toolchain") { +@@ -1418,6 +1418,14 @@ config("toolchain") { } else if (target_os == "chromeos") { defines += [ "V8_HAVE_TARGET_OS" ] defines += [ "V8_TARGET_OS_CHROMEOS" ] @@ -15,7 +15,20 @@ } # TODO(infra): Support v8_enable_prof on Windows. -@@ -5777,7 +5785,7 @@ v8_component("v8_libbase") { +@@ -2381,6 +2389,12 @@ template("run_mksnapshot") { + if (!v8_enable_builtins_profiling && v8_enable_builtins_reordering) { + args += [ "--reorder-builtins" ] + } ++ ++ if (v8_current_cpu == "x86") { ++ args -= [ ++ "--abort-on-bad-builtin-profile-data", ++ ] ++ } + } + + # This is needed to distinguish between generating code for the simulator +@@ -6173,7 +6187,7 @@ v8_component("v8_libbase") { } } @@ -24,7 +37,7 @@ sources += [ "src/base/debug/stack_trace_posix.cc", "src/base/platform/platform-linux.cc", -@@ -5788,6 +5796,18 @@ v8_component("v8_libbase") { +@@ -6184,6 +6198,18 @@ v8_component("v8_libbase") { "dl", "rt", ] diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_include_v8-internal.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_include_v8-internal.h index 3e0eecb4313f..0c56f6f4652e 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_include_v8-internal.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_include_v8-internal.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/v8/include/v8-internal.h.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/v8/include/v8-internal.h.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/v8/include/v8-internal.h -@@ -176,7 +176,7 @@ using SandboxedPointer_t = Address; +@@ -172,7 +172,7 @@ using SandboxedPointer_t = Address; #ifdef V8_ENABLE_SANDBOX // Size of the sandbox, excluding the guard regions surrounding it. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_api_api.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_api_api.cc index 3254a55f7306..9f96f37381e7 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_api_api.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_api_api.cc @@ -1,15 +1,15 @@ ---- src/3rdparty/chromium/v8/src/api/api.cc.orig 2023-08-16 19:50:41 UTC +--- src/3rdparty/chromium/v8/src/api/api.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/v8/src/api/api.cc -@@ -142,7 +142,7 @@ +@@ -141,7 +141,7 @@ #include "src/wasm/wasm-serialization.h" #endif // V8_ENABLE_WEBASSEMBLY -#if V8_OS_LINUX || V8_OS_DARWIN || V8_OS_FREEBSD +#if V8_OS_LINUX || V8_OS_DARWIN || V8_OS_FREEBSD || V8_OS_OPENBSD #include <signal.h> + #include <unistd.h> - #if V8_ENABLE_WEBASSEMBLY -@@ -6354,7 +6354,7 @@ bool v8::V8::Initialize(const int build_config) { +@@ -6352,7 +6352,7 @@ bool v8::V8::Initialize(const int build_config) { return true; } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_base_atomicops.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_base_atomicops.h index 446117838b0a..51d11ee69264 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_base_atomicops.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_base_atomicops.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/v8/src/base/atomicops.h.orig 2022-06-17 14:20:10 UTC +--- src/3rdparty/chromium/v8/src/base/atomicops.h.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/v8/src/base/atomicops.h @@ -57,10 +57,10 @@ using Atomic64 = SbAtomic64; using Atomic8 = char; @@ -13,7 +13,7 @@ using Atomic64 = int64_t; #else using Atomic64 = intptr_t; -@@ -258,7 +258,7 @@ inline Atomic32 SeqCst_Load(volatile const Atomic32* p +@@ -266,7 +266,7 @@ inline Atomic32 SeqCst_Load(volatile const Atomic32* p std::memory_order_seq_cst); } diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_base_platform_platform-openbsd.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_base_platform_platform-openbsd.cc index 3e8509780585..bf245be77f38 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_base_platform_platform-openbsd.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_base_platform_platform-openbsd.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/v8/src/base/platform/platform-openbsd.cc.orig 2022-02-07 13:39:41 UTC +--- src/3rdparty/chromium/v8/src/base/platform/platform-openbsd.cc.orig 2023-04-28 17:01:32 UTC +++ src/3rdparty/chromium/v8/src/base/platform/platform-openbsd.cc @@ -6,6 +6,7 @@ // POSIX-compatible parts, the implementation is in platform-posix.cc. @@ -14,7 +14,7 @@ void OS::AdjustSchedulingParams() {} + +// static -+Stack::StackSlot Stack::GetStackStart() { ++Stack::StackSlot Stack::ObtainCurrentThreadStackStart() { + stack_t ss; + void *base; + if (pthread_stackseg_np(pthread_self(), &ss) != 0) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_base_platform_platform-posix.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_base_platform_platform-posix.cc index a6ab51a09133..b08c34559dd2 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_base_platform_platform-posix.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_base_platform_platform-posix.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc.orig 2023-03-09 06:31:50 UTC +--- src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc -@@ -53,7 +53,7 @@ +@@ -55,7 +55,7 @@ #if V8_OS_DARWIN #include <mach/mach.h> #include <malloc/malloc.h> @@ -9,7 +9,7 @@ #include <malloc.h> #endif -@@ -71,7 +71,7 @@ +@@ -73,7 +73,7 @@ #include <sys/syscall.h> #endif @@ -18,7 +18,7 @@ #define MAP_ANONYMOUS MAP_ANON #endif -@@ -297,8 +297,15 @@ void OS::SetRandomMmapSeed(int64_t seed) { +@@ -305,8 +305,15 @@ void OS::SetRandomMmapSeed(int64_t seed) { } } @@ -34,7 +34,7 @@ uintptr_t raw_addr; { MutexGuard guard(rng_mutex.Pointer()); -@@ -393,6 +400,7 @@ void* OS::GetRandomMmapAddr() { +@@ -401,6 +408,7 @@ void* OS::GetRandomMmapAddr() { #endif return reinterpret_cast<void*>(raw_addr); } @@ -42,7 +42,7 @@ // TODO(bbudge) Move Cygwin and Fuchsia stuff into platform-specific files. #if !V8_OS_CYGWIN && !V8_OS_FUCHSIA -@@ -661,7 +669,7 @@ void OS::DestroySharedMemoryHandle(PlatformSharedMemor +@@ -674,7 +682,7 @@ void OS::DestroySharedMemoryHandle(PlatformSharedMemor // static bool OS::HasLazyCommits() { @@ -51,12 +51,12 @@ return true; #else // TODO(bbudge) Return true for all POSIX platforms. -@@ -1238,7 +1246,7 @@ void Thread::SetThreadLocal(LocalStorageKey key, void* +@@ -1281,7 +1289,7 @@ void Thread::SetThreadLocal(LocalStorageKey key, void* // keep this version in POSIX as most Linux-compatible derivatives will // support it. MacOS and FreeBSD are different here. #if !defined(V8_OS_FREEBSD) && !defined(V8_OS_DARWIN) && !defined(_AIX) && \ - !defined(V8_OS_SOLARIS) + !defined(V8_OS_SOLARIS) && !defined(V8_OS_OPENBSD) - // static - Stack::StackSlot Stack::GetStackStart() { + namespace { + #if DEBUG diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_baseline_x64_baseline-assembler-x64-inl.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_baseline_x64_baseline-assembler-x64-inl.h new file mode 100644 index 000000000000..a21a55072cd9 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_baseline_x64_baseline-assembler-x64-inl.h @@ -0,0 +1,13 @@ +--- src/3rdparty/chromium/v8/src/baseline/x64/baseline-assembler-x64-inl.h.orig 2023-07-16 15:47:57 UTC ++++ src/3rdparty/chromium/v8/src/baseline/x64/baseline-assembler-x64-inl.h +@@ -73,9 +73,7 @@ MemOperand BaselineAssembler::FeedbackVectorOperand() + + void BaselineAssembler::Bind(Label* label) { __ bind(label); } + +-void BaselineAssembler::JumpTarget() { +- // NOP on x64. +-} ++void BaselineAssembler::JumpTarget() { __ endbr64(); } + + void BaselineAssembler::Jump(Label* target, Label::Distance distance) { + __ jmp(target, distance); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_builtins_x64_builtins-x64.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_builtins_x64_builtins-x64.cc new file mode 100644 index 000000000000..8aa573e775b6 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_builtins_x64_builtins-x64.cc @@ -0,0 +1,46 @@ +--- src/3rdparty/chromium/v8/src/builtins/x64/builtins-x64.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/v8/src/builtins/x64/builtins-x64.cc +@@ -44,6 +44,8 @@ namespace internal { + #define __ ACCESS_MASM(masm) + + void Builtins::Generate_Adaptor(MacroAssembler* masm, Address address) { ++ __ CodeEntry(); ++ + __ LoadAddress(kJavaScriptCallExtraArg1Register, + ExternalReference::Create(address)); + __ Jump(BUILTIN_CODE(masm->isolate(), AdaptorWithBuiltinExitFrame), +@@ -430,7 +432,7 @@ void Generate_JSEntryVariant(MacroAssembler* masm, Sta + // Jump to a faked try block that does the invoke, with a faked catch + // block that sets the pending exception. + __ jmp(&invoke); +- __ bind(&handler_entry); ++ __ BindExceptionHandler(&handler_entry); + + // Store the current pc as the handler offset. It's used later to create the + // handler table. +@@ -3327,6 +3329,9 @@ void SwitchBackAndReturnPromise(MacroAssembler* masm, + void GenerateExceptionHandlingLandingPad(MacroAssembler* masm, + Label* return_promise) { + int catch_handler = __ pc_offset(); ++ ++ __ endbr64(); ++ + // Restore rsp to free the reserved stack slots for the sections. + __ leaq(rsp, MemOperand(rbp, StackSwitchFrameConstants::kLastSpillOffset)); + +@@ -3658,6 +3663,7 @@ void Builtins::Generate_WasmSuspend(MacroAssembler* ma + LoadJumpBuffer(masm, jmpbuf, true); + __ Trap(); + __ bind(&resume); ++ __ endbr64(); + __ LeaveFrame(StackFrame::STACK_SWITCH); + __ ret(0); + } +@@ -3790,6 +3796,7 @@ void Generate_WasmResumeHelper(MacroAssembler* masm, w + } + __ Trap(); + __ bind(&suspend); ++ __ endbr64(); + __ LeaveFrame(StackFrame::STACK_SWITCH); + // Pop receiver + parameter. + __ ret(2 * kSystemPointerSize); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_codegen_x64_assembler-x64.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_codegen_x64_assembler-x64.cc new file mode 100644 index 000000000000..294357791729 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_codegen_x64_assembler-x64.cc @@ -0,0 +1,42 @@ +--- src/3rdparty/chromium/v8/src/codegen/x64/assembler-x64.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/v8/src/codegen/x64/assembler-x64.cc +@@ -1316,6 +1316,14 @@ void Assembler::hlt() { + emit(0xF4); + } + ++void Assembler::endbr64() { ++ EnsureSpace ensure_space(this); ++ emit(0xF3); ++ emit(0x0f); ++ emit(0x1e); ++ emit(0xfa); ++} ++ + void Assembler::emit_idiv(Register src, int size) { + EnsureSpace ensure_space(this); + emit_rex(src, size); +@@ -1583,16 +1591,22 @@ void Assembler::jmp(Handle<Code> target, RelocInfo::Mo + emitl(code_target_index); + } + +-void Assembler::jmp(Register target) { ++void Assembler::jmp(Register target, bool notrack) { + EnsureSpace ensure_space(this); ++ if (notrack) { ++ emit(0x3e); ++ } + // Opcode FF/4 r64. + emit_optional_rex_32(target); + emit(0xFF); + emit_modrm(0x4, target); + } + +-void Assembler::jmp(Operand src) { ++void Assembler::jmp(Operand src, bool notrack) { + EnsureSpace ensure_space(this); ++ if (notrack) { ++ emit(0x3e); ++ } + // Opcode FF/4 m64. + emit_optional_rex_32(src); + emit(0xFF); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_codegen_x64_assembler-x64.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_codegen_x64_assembler-x64.h new file mode 100644 index 000000000000..f455280dc92b --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_codegen_x64_assembler-x64.h @@ -0,0 +1,21 @@ +--- src/3rdparty/chromium/v8/src/codegen/x64/assembler-x64.h.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/v8/src/codegen/x64/assembler-x64.h +@@ -860,6 +860,7 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBa + void ret(int imm16); + void ud2(); + void setcc(Condition cc, Register reg); ++ void endbr64(); + + void pblendw(XMMRegister dst, Operand src, uint8_t mask); + void pblendw(XMMRegister dst, XMMRegister src, uint8_t mask); +@@ -917,8 +918,8 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBa + void jmp(Handle<Code> target, RelocInfo::Mode rmode); + + // Jump near absolute indirect (r64) +- void jmp(Register adr); +- void jmp(Operand src); ++ void jmp(Register adr, bool notrack = false); ++ void jmp(Operand src, bool notrack = false); + + // Unconditional jump relative to the current address. Low-level routine, + // use with caution! diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_codegen_x64_macro-assembler-x64.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_codegen_x64_macro-assembler-x64.cc new file mode 100644 index 000000000000..26cc3ba91684 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_codegen_x64_macro-assembler-x64.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/v8/src/codegen/x64/macro-assembler-x64.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/v8/src/codegen/x64/macro-assembler-x64.cc +@@ -51,6 +51,8 @@ Operand StackArgumentsAccessor::GetArgumentOperand(int + return Operand(rsp, kPCOnStackSize + index * kSystemPointerSize); + } + ++void MacroAssembler::CodeEntry() { endbr64(); } ++ + void MacroAssembler::Load(Register destination, ExternalReference source) { + if (root_array_available_ && options().enable_root_relative_access) { + intptr_t delta = RootRegisterOffsetForExternalReference(isolate(), source); +@@ -2046,7 +2048,7 @@ void MacroAssembler::Switch(Register scratch, Register + cmpq(reg, Immediate(num_labels)); + j(above_equal, &fallthrough); + leaq(table, MemOperand(&jump_table)); +- jmp(MemOperand(table, reg, times_8, 0)); ++ jmp(MemOperand(table, reg, times_8, 0), /*notrack=*/true); + // Emit the jump table inline, under the assumption that it's not too big. + Align(kSystemPointerSize); + bind(&jump_table); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_codegen_x64_macro-assembler-x64.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_codegen_x64_macro-assembler-x64.h new file mode 100644 index 000000000000..e230f6225052 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_codegen_x64_macro-assembler-x64.h @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/v8/src/codegen/x64/macro-assembler-x64.h.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/v8/src/codegen/x64/macro-assembler-x64.h +@@ -646,11 +646,14 @@ class V8_EXPORT_PRIVATE MacroAssembler + + // Define a function entrypoint. This doesn't emit any code for this + // architecture, as control-flow integrity is not supported for it. +- void CodeEntry() {} ++ void CodeEntry(); + // Define an exception handler. +- void ExceptionHandler() {} ++ void ExceptionHandler() { CodeEntry(); } + // Define an exception handler and bind a label. +- void BindExceptionHandler(Label* label) { bind(label); } ++ void BindExceptionHandler(Label* label) { ++ bind(label); ++ CodeEntry(); ++ } + + // --------------------------------------------------------------------------- + // Pointer compression support diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_compiler_backend_ia32_instruction-selector-ia32.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_compiler_backend_ia32_instruction-selector-ia32.cc deleted file mode 100644 index 080323f60714..000000000000 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_compiler_backend_ia32_instruction-selector-ia32.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- src/3rdparty/chromium/v8/src/compiler/backend/ia32/instruction-selector-ia32.cc.orig 2022-11-30 08:12:58 UTC -+++ src/3rdparty/chromium/v8/src/compiler/backend/ia32/instruction-selector-ia32.cc -@@ -3034,6 +3034,7 @@ void InstructionSelector::VisitI8x16Shuffle(Node* node - Emit(opcode, 1, &dst, input_count, inputs, temp_count, temps); - } - -+#if V8_ENABLE_WEBASSEMBLY - void InstructionSelector::VisitI8x16Swizzle(Node* node) { - InstructionCode op = kIA32I8x16Swizzle; - -@@ -3087,6 +3088,9 @@ void VisitMinOrMax(InstructionSelector* selector, Node - void InstructionSelector::VisitF32x4Pmin(Node* node) { - VisitMinOrMax(this, node, kIA32Minps, true); - } -+#else -+void InstructionSelector::VisitI8x16Swizzle(Node* node) { UNREACHABLE(); } -+#endif // V8_ENABLE_WEBASSEMBLY - - void InstructionSelector::VisitF32x4Pmax(Node* node) { - VisitMinOrMax(this, node, kIA32Maxps, true); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_compiler_backend_x64_code-generator-x64.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_compiler_backend_x64_code-generator-x64.cc new file mode 100644 index 000000000000..92ad4b47ce7f --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_compiler_backend_x64_code-generator-x64.cc @@ -0,0 +1,16 @@ +--- src/3rdparty/chromium/v8/src/compiler/backend/x64/code-generator-x64.cc.orig 2023-10-11 18:22:24 UTC ++++ src/3rdparty/chromium/v8/src/compiler/backend/x64/code-generator-x64.cc +@@ -6828,11 +6828,11 @@ void CodeGenerator::AssembleArchTableSwitch(Instructio + // target = table + (target - table) + __ addq(input, kScratchRegister); + // Jump to the target. +- __ jmp(input); ++ __ jmp(input, /*notrack=*/true); + } else { + // For non builtins, the value in the table is 'target_address' (8 bytes) + // jmp [table + index*8] +- __ jmp(Operand(kScratchRegister, input, times_8, 0)); ++ __ jmp(Operand(kScratchRegister, input, times_8, 0), /*notrack=*/true); + } + } + diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_deoptimizer_x64_deoptimizer-x64.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_deoptimizer_x64_deoptimizer-x64.cc new file mode 100644 index 000000000000..0fcb108f05d5 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_deoptimizer_x64_deoptimizer-x64.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/v8/src/deoptimizer/x64/deoptimizer-x64.cc.orig 2023-07-16 15:47:57 UTC ++++ src/3rdparty/chromium/v8/src/deoptimizer/x64/deoptimizer-x64.cc +@@ -21,7 +21,7 @@ ASSERT_OFFSET(Builtin::kDeoptimizationEntry_Lazy); + #undef ASSERT_OFFSET + + const int Deoptimizer::kEagerDeoptExitSize = 4; +-const int Deoptimizer::kLazyDeoptExitSize = 4; ++const int Deoptimizer::kLazyDeoptExitSize = 8; + + Float32 RegisterValues::GetFloatRegister(unsigned n) const { + return Float32::FromBits( diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_diagnostics_perf-jit.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_diagnostics_perf-jit.cc index 6b2abb31d0dd..fbe7e994da93 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_diagnostics_perf-jit.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_diagnostics_perf-jit.cc @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/v8/src/diagnostics/perf-jit.cc.orig 2022-06-17 14:20:10 UTC +--- src/3rdparty/chromium/v8/src/diagnostics/perf-jit.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/v8/src/diagnostics/perf-jit.cc -@@ -30,7 +30,7 @@ - #include "src/common/assert-scope.h" +@@ -31,7 +31,7 @@ + #include "src/flags/flags.h" // Only compile the {LinuxPerfJitLogger} on Linux. -#if V8_OS_LINUX diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_execution_isolate.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_execution_isolate.cc index 25ea084c2370..b10e18c34b65 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_execution_isolate.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_execution_isolate.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/v8/src/execution/isolate.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/v8/src/execution/isolate.cc.orig 2023-10-11 18:22:24 UTC +++ src/3rdparty/chromium/v8/src/execution/isolate.cc -@@ -146,6 +146,10 @@ +@@ -147,6 +147,10 @@ #include "src/execution/simulator-base.h" #endif @@ -11,7 +11,7 @@ extern "C" const uint8_t v8_Default_embedded_blob_code_[]; extern "C" uint32_t v8_Default_embedded_blob_code_size_; extern "C" const uint8_t v8_Default_embedded_blob_data_[]; -@@ -3849,6 +3853,11 @@ void Isolate::InitializeDefaultEmbeddedBlob() { +@@ -4034,6 +4038,11 @@ void Isolate::InitializeDefaultEmbeddedBlob() { uint32_t code_size = DefaultEmbeddedBlobCodeSize(); const uint8_t* data = DefaultEmbeddedBlobData(); uint32_t data_size = DefaultEmbeddedBlobDataSize(); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_flags_flags.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_flags_flags.cc new file mode 100644 index 000000000000..a704bb280780 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_flags_flags.cc @@ -0,0 +1,36 @@ +--- src/3rdparty/chromium/v8/src/flags/flags.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/v8/src/flags/flags.cc +@@ -12,6 +12,10 @@ + #include <iomanip> + #include <sstream> + ++#if V8_OS_OPENBSD ++#include <sys/mman.h> ++#endif ++ + #include "src/base/functional.h" + #include "src/base/logging.h" + #include "src/base/platform/platform.h" +@@ -31,7 +35,11 @@ + namespace v8::internal { + + // Define {v8_flags}, declared in flags.h. ++#if V8_OS_OPENBSD ++FlagValues v8_flags __attribute__((section(".openbsd.mutable"))); ++#else + FlagValues v8_flags; ++#endif + + // {v8_flags} needs to be aligned to a memory page, and the size needs to be a + // multiple of a page size. This is required for memory-protection of the memory +@@ -824,6 +832,10 @@ void FlagList::FreezeFlags() { + // Note that for string flags we only protect the pointer itself, but not the + // string storage. TODO(12887): Fix this. + base::OS::SetDataReadOnly(&v8_flags, sizeof(v8_flags)); ++#if V8_OS_OPENBSD ++ if (mimmutable(&v8_flags, sizeof(v8_flags)) == -1) ++ FATAL("unable to set immutability of v8_flags"); ++#endif + } + + // static diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_maglev_x64_maglev-assembler-x64-inl.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_maglev_x64_maglev-assembler-x64-inl.h new file mode 100644 index 000000000000..a38884e12313 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_maglev_x64_maglev-assembler-x64-inl.h @@ -0,0 +1,14 @@ +--- src/3rdparty/chromium/v8/src/maglev/x64/maglev-assembler-x64-inl.h.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/v8/src/maglev/x64/maglev-assembler-x64-inl.h +@@ -229,7 +229,10 @@ void MaglevAssembler::PushReverse(T... vals) { + detail::PushAllHelper<T...>::PushReverse(this, vals...); + } + +-inline void MaglevAssembler::BindJumpTarget(Label* label) { bind(label); } ++inline void MaglevAssembler::BindJumpTarget(Label* label) { ++ bind(label); ++ endbr64(); ++} + + inline void MaglevAssembler::BindBlock(BasicBlock* block) { + bind(block->label()); diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_maglev_x64_maglev-assembler-x64.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_maglev_x64_maglev-assembler-x64.cc new file mode 100644 index 000000000000..20252707ee65 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_maglev_x64_maglev-assembler-x64.cc @@ -0,0 +1,16 @@ +--- src/3rdparty/chromium/v8/src/maglev/x64/maglev-assembler-x64.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/v8/src/maglev/x64/maglev-assembler-x64.cc +@@ -433,10 +433,12 @@ void MaglevAssembler::OSRPrologue(Graph* graph) { + void MaglevAssembler::Prologue(Graph* graph) { + DCHECK(!graph->is_osr()); + ++ CodeEntry(); ++ + BailoutIfDeoptimized(rbx); + + if (graph->has_recursive_calls()) { +- bind(code_gen_state()->entry_label()); ++ BindJumpTarget(code_gen_state()->entry_label()); + } + + // Tiering support. diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_regexp_x64_regexp-macro-assembler-x64.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_regexp_x64_regexp-macro-assembler-x64.cc new file mode 100644 index 000000000000..8c27106d5ad1 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_regexp_x64_regexp-macro-assembler-x64.cc @@ -0,0 +1,22 @@ +--- src/3rdparty/chromium/v8/src/regexp/x64/regexp-macro-assembler-x64.cc.orig 2023-07-16 15:47:57 UTC ++++ src/3rdparty/chromium/v8/src/regexp/x64/regexp-macro-assembler-x64.cc +@@ -110,6 +110,7 @@ RegExpMacroAssemblerX64::RegExpMacroAssemblerX64(Isola + backtrack_label_(), + exit_label_() { + DCHECK_EQ(0, registers_to_save % 2); ++ __ CodeEntry(); + __ jmp(&entry_label_); // We'll write the entry code when we know more. + __ bind(&start_label_); // And then continue from here. + } +@@ -714,6 +715,11 @@ bool RegExpMacroAssemblerX64::CheckSpecialClassRanges( + // Match any character. + return true; + } ++} ++ ++void RegExpMacroAssemblerX64::BindJumpTarget(Label* label) { ++ Bind(label); ++ __ CodeEntry(); + } + + void RegExpMacroAssemblerX64::Fail() { diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_regexp_x64_regexp-macro-assembler-x64.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_regexp_x64_regexp-macro-assembler-x64.h new file mode 100644 index 000000000000..43fbe6a20691 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_regexp_x64_regexp-macro-assembler-x64.h @@ -0,0 +1,12 @@ +--- src/3rdparty/chromium/v8/src/regexp/x64/regexp-macro-assembler-x64.h.orig 2023-07-16 15:47:57 UTC ++++ src/3rdparty/chromium/v8/src/regexp/x64/regexp-macro-assembler-x64.h +@@ -59,6 +59,9 @@ class V8_EXPORT_PRIVATE RegExpMacroAssemblerX64 + void CheckPosition(int cp_offset, Label* on_outside_input) override; + bool CheckSpecialClassRanges(StandardCharacterSet type, + Label* on_no_match) override; ++ ++ void BindJumpTarget(Label* label) override; ++ + void Fail() override; + Handle<HeapObject> GetCode(Handle<String> source) override; + void GoTo(Label* label) override; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_snapshot_embedded_platform-embedded-file-writer-generic.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_snapshot_embedded_platform-embedded-file-writer-generic.cc index 956817daf095..8f34904e9bbe 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_snapshot_embedded_platform-embedded-file-writer-generic.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_snapshot_embedded_platform-embedded-file-writer-generic.cc @@ -1,8 +1,8 @@ ---- src/3rdparty/chromium/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.cc.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.cc.orig 2023-08-17 07:33:31 UTC +++ src/3rdparty/chromium/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.cc @@ -9,6 +9,10 @@ - #include "src/objects/code.h" + #include "src/objects/instruction-stream.h" +#if V8_OS_OPENBSD +#include <sys/param.h> diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_trap-handler_handler-inside-posix.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_trap-handler_handler-inside-posix.cc index dc0542162ea5..7ec4e44c855f 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_trap-handler_handler-inside-posix.cc +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_trap-handler_handler-inside-posix.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/v8/src/trap-handler/handler-inside-posix.cc.orig 2023-01-11 09:17:16 UTC +--- src/3rdparty/chromium/v8/src/trap-handler/handler-inside-posix.cc.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/v8/src/trap-handler/handler-inside-posix.cc -@@ -55,6 +55,8 @@ namespace trap_handler { +@@ -59,6 +59,8 @@ namespace trap_handler { #define CONTEXT_REG(reg, REG) &uc->uc_mcontext->__ss.__##reg #elif V8_OS_FREEBSD #define CONTEXT_REG(reg, REG) &uc->uc_mcontext.mc_##reg @@ -9,7 +9,7 @@ #else #error "Unsupported platform." #endif -@@ -64,8 +66,12 @@ bool IsKernelGeneratedSignal(siginfo_t* info) { +@@ -68,8 +70,12 @@ bool IsKernelGeneratedSignal(siginfo_t* info) { // si_code at its default of 0 for signals that don’t originate in hardware. // The other conditions are only relevant for Linux. return info->si_code > 0 && info->si_code != SI_USER && diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_trap-handler_trap-handler.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_trap-handler_trap-handler.h index d9d610892469..b22dfb97260a 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_trap-handler_trap-handler.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_trap-handler_trap-handler.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/v8/src/trap-handler/trap-handler.h.orig 2022-04-21 18:48:31 UTC +--- src/3rdparty/chromium/v8/src/trap-handler/trap-handler.h.orig 2023-05-31 08:12:17 UTC +++ src/3rdparty/chromium/v8/src/trap-handler/trap-handler.h @@ -20,7 +20,7 @@ namespace trap_handler { // X64 on Linux, Windows, MacOS, FreeBSD. @@ -7,5 +7,5 @@ - V8_OS_FREEBSD) + V8_OS_FREEBSD || V8_OS_OPENBSD) #define V8_TRAP_HANDLER_SUPPORTED true - // Arm64 (non-simulator) on Mac. - #elif V8_TARGET_ARCH_ARM64 && V8_HOST_ARCH_ARM64 && V8_OS_DARWIN + // Arm64 (non-simulator) on Mac and Linux. + #elif V8_TARGET_ARCH_ARM64 && V8_HOST_ARCH_ARM64 && \ diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_wasm_baseline_ia32_liftoff-assembler-ia32.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_wasm_baseline_ia32_liftoff-assembler-ia32.h index 174870543e59..3dc87904205c 100644 --- a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_wasm_baseline_ia32_liftoff-assembler-ia32.h +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_wasm_baseline_ia32_liftoff-assembler-ia32.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/v8/src/wasm/baseline/ia32/liftoff-assembler-ia32.h.orig 2023-04-05 11:05:06 UTC +--- src/3rdparty/chromium/v8/src/wasm/baseline/ia32/liftoff-assembler-ia32.h.orig 2023-09-13 12:11:42 UTC +++ src/3rdparty/chromium/v8/src/wasm/baseline/ia32/liftoff-assembler-ia32.h -@@ -424,7 +424,7 @@ void LiftoffAssembler::StoreTaggedPointer(Register dst +@@ -491,7 +491,7 @@ void LiftoffAssembler::StoreTaggedPointer(Register dst } void LiftoffAssembler::Load(LiftoffRegister dst, Register src_addr, @@ -9,7 +9,7 @@ LoadType type, uint32_t* protected_load_pc, bool /* is_load_mem */, bool /* i64_offset */, bool needs_shift) { -@@ -504,7 +504,7 @@ void LiftoffAssembler::Load(LiftoffRegister dst, Regis +@@ -571,7 +571,7 @@ void LiftoffAssembler::Load(LiftoffRegister dst, Regis } void LiftoffAssembler::Store(Register dst_addr, Register offset_reg, @@ -18,7 +18,7 @@ StoreType type, LiftoffRegList pinned, uint32_t* protected_store_pc, bool /* is_store_mem */, bool /* i64_offset */) { -@@ -573,7 +573,7 @@ void LiftoffAssembler::Store(Register dst_addr, Regist +@@ -651,7 +651,7 @@ void LiftoffAssembler::Store(Register dst_addr, Regist } void LiftoffAssembler::AtomicLoad(LiftoffRegister dst, Register src_addr, @@ -27,7 +27,7 @@ LoadType type, LiftoffRegList /* pinned */, bool /* i64_offset */) { if (type.value() != LoadType::kI64Load) { -@@ -593,7 +593,7 @@ void LiftoffAssembler::AtomicLoad(LiftoffRegister dst, +@@ -671,7 +671,7 @@ void LiftoffAssembler::AtomicLoad(LiftoffRegister dst, } void LiftoffAssembler::AtomicStore(Register dst_addr, Register offset_reg, @@ -36,7 +36,7 @@ StoreType type, LiftoffRegList pinned, bool /* i64_offset */) { DCHECK_NE(offset_reg, no_reg); -@@ -663,7 +663,7 @@ enum Binop { kAdd, kSub, kAnd, kOr, kXor, kExchange }; +@@ -741,7 +741,7 @@ enum Binop { kAdd, kSub, kAnd, kOr, kXor, kExchange }; inline void AtomicAddOrSubOrExchange32(LiftoffAssembler* lasm, Binop binop, Register dst_addr, Register offset_reg, @@ -45,7 +45,7 @@ LiftoffRegister value, LiftoffRegister result, StoreType type) { DCHECK_EQ(value, result); -@@ -730,7 +730,7 @@ inline void AtomicAddOrSubOrExchange32(LiftoffAssemble +@@ -808,7 +808,7 @@ inline void AtomicAddOrSubOrExchange32(LiftoffAssemble } inline void AtomicBinop32(LiftoffAssembler* lasm, Binop op, Register dst_addr, @@ -54,7 +54,7 @@ LiftoffRegister value, LiftoffRegister result, StoreType type) { DCHECK_EQ(value, result); -@@ -842,7 +842,7 @@ inline void AtomicBinop32(LiftoffAssembler* lasm, Bino +@@ -920,7 +920,7 @@ inline void AtomicBinop32(LiftoffAssembler* lasm, Bino } inline void AtomicBinop64(LiftoffAssembler* lasm, Binop op, Register dst_addr, @@ -63,7 +63,7 @@ LiftoffRegister value, LiftoffRegister result) { // We need {ebx} here, which is the root register. As the root register it // needs special treatment. As we use {ebx} directly in the code below, we -@@ -934,7 +934,7 @@ inline void AtomicBinop64(LiftoffAssembler* lasm, Bino +@@ -1012,7 +1012,7 @@ inline void AtomicBinop64(LiftoffAssembler* lasm, Bino } // namespace liftoff void LiftoffAssembler::AtomicAdd(Register dst_addr, Register offset_reg, @@ -72,7 +72,7 @@ LiftoffRegister result, StoreType type, bool /* i64_offset */) { if (type.value() == StoreType::kI64Store) { -@@ -948,7 +948,7 @@ void LiftoffAssembler::AtomicAdd(Register dst_addr, Re +@@ -1026,7 +1026,7 @@ void LiftoffAssembler::AtomicAdd(Register dst_addr, Re } void LiftoffAssembler::AtomicSub(Register dst_addr, Register offset_reg, @@ -81,7 +81,7 @@ LiftoffRegister result, StoreType type, bool /* i64_offset */) { if (type.value() == StoreType::kI64Store) { -@@ -961,7 +961,7 @@ void LiftoffAssembler::AtomicSub(Register dst_addr, Re +@@ -1039,7 +1039,7 @@ void LiftoffAssembler::AtomicSub(Register dst_addr, Re } void LiftoffAssembler::AtomicAnd(Register dst_addr, Register offset_reg, @@ -90,7 +90,7 @@ LiftoffRegister result, StoreType type, bool /* i64_offset */) { if (type.value() == StoreType::kI64Store) { -@@ -975,7 +975,7 @@ void LiftoffAssembler::AtomicAnd(Register dst_addr, Re +@@ -1053,7 +1053,7 @@ void LiftoffAssembler::AtomicAnd(Register dst_addr, Re } void LiftoffAssembler::AtomicOr(Register dst_addr, Register offset_reg, @@ -99,7 +99,7 @@ LiftoffRegister result, StoreType type, bool /* i64_offset */) { if (type.value() == StoreType::kI64Store) { -@@ -989,7 +989,7 @@ void LiftoffAssembler::AtomicOr(Register dst_addr, Reg +@@ -1067,7 +1067,7 @@ void LiftoffAssembler::AtomicOr(Register dst_addr, Reg } void LiftoffAssembler::AtomicXor(Register dst_addr, Register offset_reg, @@ -108,7 +108,7 @@ LiftoffRegister result, StoreType type, bool /* i64_offset */) { if (type.value() == StoreType::kI64Store) { -@@ -1003,7 +1003,7 @@ void LiftoffAssembler::AtomicXor(Register dst_addr, Re +@@ -1081,7 +1081,7 @@ void LiftoffAssembler::AtomicXor(Register dst_addr, Re } void LiftoffAssembler::AtomicExchange(Register dst_addr, Register offset_reg, @@ -117,7 +117,7 @@ LiftoffRegister value, LiftoffRegister result, StoreType type, bool /* i64_offset */) { -@@ -1018,7 +1018,7 @@ void LiftoffAssembler::AtomicExchange(Register dst_add +@@ -1096,7 +1096,7 @@ void LiftoffAssembler::AtomicExchange(Register dst_add } void LiftoffAssembler::AtomicCompareExchange( diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_wasm_jump-table-assembler.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_wasm_jump-table-assembler.cc new file mode 100644 index 000000000000..57c26827fc25 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_wasm_jump-table-assembler.cc @@ -0,0 +1,51 @@ +--- src/3rdparty/chromium/v8/src/wasm/jump-table-assembler.cc.orig 2023-07-16 15:47:57 UTC ++++ src/3rdparty/chromium/v8/src/wasm/jump-table-assembler.cc +@@ -52,15 +52,21 @@ void JumpTableAssembler::InitializeJumpsToLazyCompileT + #if V8_TARGET_ARCH_X64 + void JumpTableAssembler::EmitLazyCompileJumpSlot(uint32_t func_index, + Address lazy_compile_target) { ++ intptr_t displacement = ++ static_cast<intptr_t>(reinterpret_cast<uint8_t*>(lazy_compile_target) - ++ (pc_ + 9) - kNearJmpInstrSize); ++ if (!is_int32(displacement)) return; ++ CodeEntry(); // 4 bytes + // Use a push, because mov to an extended register takes 6 bytes. +- pushq_imm32(func_index); // 5 bytes +- EmitJumpSlot(lazy_compile_target); // 5 bytes ++ pushq_imm32(func_index); // 5 bytes ++ near_jmp(displacement, RelocInfo::NO_INFO); // 5 bytes + } + + bool JumpTableAssembler::EmitJumpSlot(Address target) { + intptr_t displacement = static_cast<intptr_t>( +- reinterpret_cast<uint8_t*>(target) - pc_ - kNearJmpInstrSize); ++ reinterpret_cast<uint8_t*>(target) - (pc_ + 4) - kNearJmpInstrSize); + if (!is_int32(displacement)) return false; ++ CodeEntry(); // 4 bytes + near_jmp(displacement, RelocInfo::NO_INFO); // 5 bytes + return true; + } +@@ -68,11 +74,12 @@ bool JumpTableAssembler::EmitJumpSlot(Address target) + void JumpTableAssembler::EmitFarJumpSlot(Address target) { + Label data; + int start_offset = pc_offset(); ++ CodeEntry(); // 4 bytes + jmp(Operand(&data)); // 6 bytes +- Nop(2); // 2 bytes ++ Nop(6); // 6 bytes + // The data must be properly aligned, so it can be patched atomically (see + // {PatchFarJumpSlot}). +- DCHECK_EQ(start_offset + kSystemPointerSize, pc_offset()); ++ DCHECK_EQ(start_offset + kFarJumpTableSlotOffset, pc_offset()); + USE(start_offset); + bind(&data); + dq(target); // 8 bytes +@@ -83,7 +90,7 @@ void JumpTableAssembler::PatchFarJumpSlot(Address slot + // The slot needs to be pointer-size aligned so we can atomically update it. + DCHECK(IsAligned(slot, kSystemPointerSize)); + // Offset of the target is at 8 bytes, see {EmitFarJumpSlot}. +- reinterpret_cast<std::atomic<Address>*>(slot + kSystemPointerSize) ++ reinterpret_cast<std::atomic<Address>*>(slot + kFarJumpTableSlotOffset) + ->store(target, std::memory_order_relaxed); + // The update is atomic because the address is properly aligned. + // Because of cache coherence, the data update will eventually be seen by all diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_wasm_jump-table-assembler.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_wasm_jump-table-assembler.h new file mode 100644 index 000000000000..b1f3d1d5539f --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_v8_src_wasm_jump-table-assembler.h @@ -0,0 +1,16 @@ +--- src/3rdparty/chromium/v8/src/wasm/jump-table-assembler.h.orig 2023-07-16 15:47:57 UTC ++++ src/3rdparty/chromium/v8/src/wasm/jump-table-assembler.h +@@ -185,9 +185,10 @@ class V8_EXPORT_PRIVATE JumpTableAssembler : public Ma + // boundaries. The jump table line size has been chosen to satisfy this. + #if V8_TARGET_ARCH_X64 + static constexpr int kJumpTableLineSize = 64; +- static constexpr int kJumpTableSlotSize = 5; +- static constexpr int kFarJumpTableSlotSize = 16; +- static constexpr int kLazyCompileTableSlotSize = 10; ++ static constexpr int kJumpTableSlotSize = 5 + 4; ++ static constexpr int kFarJumpTableSlotOffset = 2 * kSystemPointerSize; ++ static constexpr int kFarJumpTableSlotSize = 16 + 8; ++ static constexpr int kLazyCompileTableSlotSize = 10 + 4; + #elif V8_TARGET_ARCH_IA32 + static constexpr int kJumpTableLineSize = 64; + static constexpr int kJumpTableSlotSize = 5; diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_weblayer_browser_browser__main__parts__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_weblayer_browser_browser__main__parts__impl.cc new file mode 100644 index 000000000000..bc76caba35f0 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_weblayer_browser_browser__main__parts__impl.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/weblayer/browser/browser_main_parts_impl.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/weblayer/browser/browser_main_parts_impl.cc +@@ -82,7 +82,7 @@ + + // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is + // complete. +-#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) ++#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) + #include "ui/base/ime/init/input_method_initializer.h" + #endif + +@@ -201,7 +201,7 @@ int BrowserMainPartsImpl::PreEarlyInitialization() { + + // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is + // complete. +-#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) ++#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) + ui::InitializeInputMethodForTesting(); + #endif + #if BUILDFLAG(IS_ANDROID) diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_weblayer_browser_content__browser__client__impl.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_weblayer_browser_content__browser__client__impl.cc new file mode 100644 index 000000000000..e30491b9f28a --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_weblayer_browser_content__browser__client__impl.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/weblayer/browser/content_browser_client_impl.cc.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/weblayer/browser/content_browser_client_impl.cc +@@ -154,7 +154,7 @@ + // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is + // complete. + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ +- BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + #include "content/public/common/content_descriptors.h" + #endif + +@@ -1025,7 +1025,7 @@ SafeBrowsingService* ContentBrowserClientImpl::GetSafe + // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is + // complete. + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ +- BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + void ContentBrowserClientImpl::GetAdditionalMappedFilesForChildProcess( + const base::CommandLine& command_line, + int child_process_id, diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_weblayer_browser_content__browser__client__impl.h b/www/qt6-webengine/files/patch-src_3rdparty_chromium_weblayer_browser_content__browser__client__impl.h new file mode 100644 index 000000000000..bcf8fe116242 --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_weblayer_browser_content__browser__client__impl.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/weblayer/browser/content_browser_client_impl.h.orig 2023-09-13 12:11:42 UTC ++++ src/3rdparty/chromium/weblayer/browser/content_browser_client_impl.h +@@ -184,7 +184,7 @@ class ContentBrowserClientImpl : public content::Conte + // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is + // complete. + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ +- BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + void GetAdditionalMappedFilesForChildProcess( + const base::CommandLine& command_line, + int child_process_id, diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_weblayer_browser_system__network__context__manager.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_weblayer_browser_system__network__context__manager.cc new file mode 100644 index 000000000000..9b1ea960f8ef --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_weblayer_browser_system__network__context__manager.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/weblayer/browser/system_network_context_manager.cc.orig 2022-03-25 21:59:56 UTC ++++ src/3rdparty/chromium/weblayer/browser/system_network_context_manager.cc +@@ -69,7 +69,7 @@ void SystemNetworkContextManager::ConfigureDefaultNetw + network_context_params->user_agent = user_agent; + // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is + // complete. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + // We're not configuring the cookie encryption on these platforms yet. + network_context_params->enable_encrypted_cookies = false; + #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_weblayer_common_weblayer__paths.cc b/www/qt6-webengine/files/patch-src_3rdparty_chromium_weblayer_common_weblayer__paths.cc new file mode 100644 index 000000000000..80c3836c307c --- /dev/null +++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_weblayer_common_weblayer__paths.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/weblayer/common/weblayer_paths.cc.orig 2022-03-25 21:59:56 UTC ++++ src/3rdparty/chromium/weblayer/common/weblayer_paths.cc +@@ -18,7 +18,7 @@ + + #if BUILDFLAG(IS_WIN) + #include "base/base_paths_win.h" +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + #include "base/nix/xdg_util.h" + #endif + +@@ -36,7 +36,7 @@ bool GetDefaultUserDataDirectory(base::FilePath* resul + return false; + *result = result->AppendASCII("weblayer"); + return true; +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + std::unique_ptr<base::Environment> env(base::Environment::Create()); + base::FilePath config_dir(base::nix::GetXDGDirectory( + env.get(), base::nix::kXdgConfigHomeEnvVar, base::nix::kDotConfigDir)); diff --git a/www/qt6-webengine/files/patch-src_core_CMakeLists.txt b/www/qt6-webengine/files/patch-src_core_CMakeLists.txt index 2c1eeafc4734..ce8adebaa3df 100644 --- a/www/qt6-webengine/files/patch-src_core_CMakeLists.txt +++ b/www/qt6-webengine/files/patch-src_core_CMakeLists.txt @@ -1,6 +1,6 @@ ---- src/core/CMakeLists.txt.orig 2023-08-16 19:50:41 UTC +--- src/core/CMakeLists.txt.orig 2023-12-12 22:08:45 UTC +++ src/core/CMakeLists.txt -@@ -20,7 +20,7 @@ add_subdirectory(tools) +@@ -20,7 +20,7 @@ add_subdirectory(tools/qwebengine_convert_dict) # TOOLCHAIN SETUP ## @@ -9,7 +9,7 @@ setup_toolchains() endif() -@@ -405,7 +405,7 @@ foreach(arch ${archs}) +@@ -409,7 +409,7 @@ foreach(arch ${archs}) CONDITION QT_FEATURE_webengine_embedded_build ) @@ -18,7 +18,7 @@ list(APPEND gnArgArg use_gtk=false # GTK toolkit bindings use_qt=false # Qt5 toolkit bindings -@@ -415,7 +415,7 @@ foreach(arch ${archs}) +@@ -418,7 +418,7 @@ foreach(arch ${archs}) use_bundled_fontconfig=false use_glib=false use_bluez=false @@ -27,7 +27,7 @@ is_cfi=false use_ozone=true ozone_auto_platforms=false -@@ -474,6 +474,10 @@ foreach(arch ${archs}) +@@ -477,6 +477,10 @@ foreach(arch ${archs}) extend_gn_list(gnArgArg ARGS use_pulseaudio CONDITION QT_FEATURE_webengine_system_pulseaudio @@ -37,4 +37,4 @@ + CONDITION QT_FEATURE_webengine_system_sndio ) extend_gn_list(gnArgArg - ARGS use_vaapi + ARGS use_system_minigbm diff --git a/www/qt6-webengine/files/patch-src_core_api_configure.cmake b/www/qt6-webengine/files/patch-src_core_api_configure.cmake index 37bf6d26192b..ddeccc69e5bb 100644 --- a/www/qt6-webengine/files/patch-src_core_api_configure.cmake +++ b/www/qt6-webengine/files/patch-src_core_api_configure.cmake @@ -1,14 +1,14 @@ ---- src/core/api/configure.cmake.orig 2023-11-20 16:08:07 UTC +--- src/core/api/configure.cmake.orig 2023-12-12 22:08:45 UTC +++ src/core/api/configure.cmake @@ -10,6 +10,7 @@ if(NOT QT_CONFIGURE_RUNNING) - if(PkgConfig_FOUND) + if(PkgConfig_FOUND AND QT_FEATURE_pkg_config) pkg_check_modules(ALSA alsa IMPORTED_TARGET) pkg_check_modules(PULSEAUDIO libpulse>=0.9.10 libpulse-mainloop-glib) + pkg_check_modules(SNDIO libsndio) pkg_check_modules(XDAMAGE xdamage) pkg_check_modules(POPPLER_CPP poppler-cpp IMPORTED_TARGET) pkg_check_modules(GBM gbm) -@@ -84,6 +85,11 @@ qt_feature("webengine-printing-and-pdf" PRIVATE +@@ -90,6 +91,11 @@ qt_feature("webengine-printing-and-pdf" PRIVATE CONDITION TARGET Qt::PrintSupport AND QT_FEATURE_printer AND (CUPS_FOUND OR WIN32) ) @@ -20,7 +20,7 @@ qt_feature("webengine-pepper-plugins" PRIVATE LABEL "Pepper Plugins" PURPOSE "Enables use of Pepper plugins." -@@ -164,7 +170,7 @@ qt_feature("webengine-vaapi" PRIVATE +@@ -170,7 +176,7 @@ qt_feature("webengine-vaapi" PRIVATE PURPOSE "Enables support for VA-API hardware acceleration" AUTODETECT GBM_FOUND AND LIBVA_FOUND AND QT_FEATURE_vulkan # hardware accelerated encoding requires bundled libvpx @@ -29,7 +29,7 @@ ) # internal testing feature qt_feature("webengine-system-poppler" PRIVATE -@@ -199,15 +205,19 @@ qt_configure_add_summary_entry( +@@ -205,15 +211,19 @@ qt_configure_add_summary_entry( ) qt_configure_add_summary_entry( ARGS "webengine-vaapi" diff --git a/www/qt6-webengine/files/patch-src_pdf_CMakeLists.txt b/www/qt6-webengine/files/patch-src_pdf_CMakeLists.txt index 02f80b1dfddd..c5fd9473264d 100644 --- a/www/qt6-webengine/files/patch-src_pdf_CMakeLists.txt +++ b/www/qt6-webengine/files/patch-src_pdf_CMakeLists.txt @@ -1,16 +1,16 @@ ---- src/pdf/CMakeLists.txt.orig 2023-10-03 19:49:54 UTC +--- src/pdf/CMakeLists.txt.orig 2023-12-12 22:08:45 UTC +++ src/pdf/CMakeLists.txt @@ -71,7 +71,7 @@ add_dependencies(docs generate_pdf_attributions) # TOOLCHAIN SETUP ## --if(LINUX OR MINGW) -+if(LINUX OR MINGW OR FREEBSD) +-if(LINUX OR MINGW OR ANDROID) ++if(LINUX OR MINGW OR ANDROID OR FREEBSD) setup_toolchains() endif() -@@ -134,7 +134,7 @@ foreach(arch ${archs}) - strip_absolute_paths_from_debug_symbols=false +@@ -138,7 +138,7 @@ foreach(arch ${archs}) + v8_enable_webassembly=false ) - if(LINUX OR ANDROID) diff --git a/www/qt6-webengine/pkg-plist b/www/qt6-webengine/pkg-plist index 3a88087a9a7c..218e4c51ff94 100644 --- a/www/qt6-webengine/pkg-plist +++ b/www/qt6-webengine/pkg-plist @@ -2,6 +2,7 @@ %%QT_INCDIR%%/QtWebEngineCore/%%FULLVER%%/QtWebEngineCore/private/qtwebenginecoreglobal_p.h %%QT_INCDIR%%/QtWebEngineCore/%%FULLVER%%/QtWebEngineCore/private/qwebenginecontextmenurequest_p.h %%QT_INCDIR%%/QtWebEngineCore/%%FULLVER%%/QtWebEngineCore/private/qwebenginecookiestore_p.h +%%QT_INCDIR%%/QtWebEngineCore/%%FULLVER%%/QtWebEngineCore/private/qwebenginedesktopmediarequest_p.h %%QT_INCDIR%%/QtWebEngineCore/%%FULLVER%%/QtWebEngineCore/private/qwebenginedownloadrequest_p.h %%QT_INCDIR%%/QtWebEngineCore/%%FULLVER%%/QtWebEngineCore/private/qwebengineglobalsettings_p.h %%QT_INCDIR%%/QtWebEngineCore/%%FULLVER%%/QtWebEngineCore/private/qwebenginehistory_p.h @@ -11,11 +12,13 @@ %%QT_INCDIR%%/QtWebEngineCore/%%FULLVER%%/QtWebEngineCore/private/qwebengineprofile_p.h %%QT_INCDIR%%/QtWebEngineCore/%%FULLVER%%/QtWebEngineCore/private/qwebenginescriptcollection_p.h %%QT_INCDIR%%/QtWebEngineCore/%%FULLVER%%/QtWebEngineCore/private/qwebengineurlrequestinfo_p.h +%%QT_INCDIR%%/QtWebEngineCore/%%FULLVER%%/QtWebEngineCore/private/qwebenginewebauthuxrequest_p.h %%QT_INCDIR%%/QtWebEngineCore/QWebEngineCertificateError %%QT_INCDIR%%/QtWebEngineCore/QWebEngineClientCertificateSelection %%QT_INCDIR%%/QtWebEngineCore/QWebEngineClientCertificateStore %%QT_INCDIR%%/QtWebEngineCore/QWebEngineContextMenuRequest %%QT_INCDIR%%/QtWebEngineCore/QWebEngineCookieStore +%%QT_INCDIR%%/QtWebEngineCore/QWebEngineDesktopMediaRequest %%QT_INCDIR%%/QtWebEngineCore/QWebEngineDownloadRequest %%QT_INCDIR%%/QtWebEngineCore/QWebEngineFileSystemAccessRequest %%QT_INCDIR%%/QtWebEngineCore/QWebEngineFindTextResult @@ -41,6 +44,8 @@ %%QT_INCDIR%%/QtWebEngineCore/QWebEngineUrlRequestJob %%QT_INCDIR%%/QtWebEngineCore/QWebEngineUrlScheme %%QT_INCDIR%%/QtWebEngineCore/QWebEngineUrlSchemeHandler +%%QT_INCDIR%%/QtWebEngineCore/QWebEngineWebAuthPinRequest +%%QT_INCDIR%%/QtWebEngineCore/QWebEngineWebAuthUxRequest %%QT_INCDIR%%/QtWebEngineCore/QtWebEngineCore %%QT_INCDIR%%/QtWebEngineCore/QtWebEngineCoreDepends %%QT_INCDIR%%/QtWebEngineCore/QtWebEngineCoreVersion @@ -52,6 +57,7 @@ %%QT_INCDIR%%/QtWebEngineCore/qwebengineclientcertificatestore.h %%QT_INCDIR%%/QtWebEngineCore/qwebenginecontextmenurequest.h %%QT_INCDIR%%/QtWebEngineCore/qwebenginecookiestore.h +%%QT_INCDIR%%/QtWebEngineCore/qwebenginedesktopmediarequest.h %%QT_INCDIR%%/QtWebEngineCore/qwebenginedownloadrequest.h %%QT_INCDIR%%/QtWebEngineCore/qwebenginefilesystemaccessrequest.h %%QT_INCDIR%%/QtWebEngineCore/qwebenginefindtextresult.h @@ -75,6 +81,7 @@ %%QT_INCDIR%%/QtWebEngineCore/qwebengineurlrequestjob.h %%QT_INCDIR%%/QtWebEngineCore/qwebengineurlscheme.h %%QT_INCDIR%%/QtWebEngineCore/qwebengineurlschemehandler.h +%%QT_INCDIR%%/QtWebEngineCore/qwebenginewebauthuxrequest.h %%QT_INCDIR%%/QtWebEngineQuick/%%FULLVER%%/QtWebEngineQuick/private/qquickwebengineaction_p.h %%QT_INCDIR%%/QtWebEngineQuick/%%FULLVER%%/QtWebEngineQuick/private/qquickwebengineaction_p_p.h %%QT_INCDIR%%/QtWebEngineQuick/%%FULLVER%%/QtWebEngineQuick/private/qquickwebengineclientcertificateselection_p.h @@ -243,11 +250,13 @@ libdata/pkgconfig/Qt6WebEngineQuickDelegatesQml.pc libdata/pkgconfig/Qt6WebEngineWidgets.pc %%QT_TOOLDIR%%/QtWebEngineProcess %%QT_TOOLDIR%%/qwebengine_convert_dict +%%DRIVER%%%%QT_TOOLDIR%%/webenginedriver %%QT_DATADIR%%/modules/WebEngineCore.json %%QT_DATADIR%%/modules/WebEngineQuick.json %%QT_DATADIR%%/modules/WebEngineQuickDelegatesQml.json %%QT_DATADIR%%/modules/WebEngineWidgets.json %%QT_DATADIR%%/resources/icudtl.dat +@dir %%QT_DATADIR%%/resources/locales %%QT_DATADIR%%/resources/qtwebengine_devtools_resources.pak %%QT_DATADIR%%/resources/qtwebengine_resources.pak %%QT_DATADIR%%/resources/qtwebengine_resources_100p.pak |