From f8939f62bace4c254da538ab1d6ee936d47101f7 Mon Sep 17 00:00:00 2001 From: Peter Bui Date: Fri, 7 Feb 2020 07:28:21 -0500 Subject: [PATCH] chromium: update to 80.0.3987.116. [ci skip] - Builds for x86_64, x86_64-musl - Fails for i686 (std::bad_alloc), mark as broken - Remove jumbo_build option as upstream has deprecated it: https://chromium.googlesource.com/chromium/src/+/master/docs/jumbo.md --- .../dont-assume-secure-getenv.patch | 8 +- .../files/musl-patches/musl-crashpad.patch | 12 + .../files/musl-patches/musl-sync.patch | 30 +++ ...omium-swiftshader-default-visibility.patch | 20 -- .../patches/chromium-system-harfbuzz.patch | 19 -- .../chromium/patches/chromium-widevine.patch | 13 - .../create-extra-view-redefinition.patch | 20 -- srcpkgs/chromium/patches/ffmpeg-i686.patch | 15 -- ...remove-unsupported-compiler-warnings.patch | 38 ++- ...ch-service-Include-cmath-for-std-pow.patch | 35 +++ ...m-fix-building-with-unbundled-libxml.patch | 127 ++++++++++ ...ream-move-RemoteTreeNode-declaration.patch | 237 ++++++++++++++++++ ...x-frame-button-cache-when-activation.patch | 62 +++++ ...out-in-DesktopWindowTreeHostPlatform.patch | 64 +++++ ...-sync-enable-USSPasswords-by-default.patch | 28 +++ srcpkgs/chromium/template | 16 +- 16 files changed, 622 insertions(+), 122 deletions(-) create mode 100644 srcpkgs/chromium/files/musl-patches/musl-sync.patch delete mode 100644 srcpkgs/chromium/patches/chromium-swiftshader-default-visibility.patch delete mode 100644 srcpkgs/chromium/patches/chromium-system-harfbuzz.patch delete mode 100644 srcpkgs/chromium/patches/chromium-widevine.patch delete mode 100644 srcpkgs/chromium/patches/create-extra-view-redefinition.patch delete mode 100644 srcpkgs/chromium/patches/ffmpeg-i686.patch create mode 100644 srcpkgs/chromium/patches/upstream-cros-search-service-Include-cmath-for-std-pow.patch create mode 100644 srcpkgs/chromium/patches/upstream-fix-building-with-unbundled-libxml.patch create mode 100644 srcpkgs/chromium/patches/upstream-move-RemoteTreeNode-declaration.patch create mode 100644 srcpkgs/chromium/patches/upstream-rebuild-Linux-frame-button-cache-when-activation.patch create mode 100644 srcpkgs/chromium/patches/upstream-rename-Relayout-in-DesktopWindowTreeHostPlatform.patch create mode 100644 srcpkgs/chromium/patches/upstream-sync-enable-USSPasswords-by-default.patch diff --git a/srcpkgs/chromium/files/musl-patches/dont-assume-secure-getenv.patch b/srcpkgs/chromium/files/musl-patches/dont-assume-secure-getenv.patch index 9a75b104e19..abde598d8fd 100644 --- a/srcpkgs/chromium/files/musl-patches/dont-assume-secure-getenv.patch +++ b/srcpkgs/chromium/files/musl-patches/dont-assume-secure-getenv.patch @@ -1,8 +1,6 @@ ---- third_party/angle/third_party/vulkan-loader/BUILD.gn 2018-09-11 -21:11:45.000000000 +0200 -+++ third_party/angle/third_party/vulkan-loader/BUILD.gn.orig 2018-09-15 -13:20:11.933889339 +0200 -@@ -192,10 +192,6 @@ +--- third_party/angle/third_party/vulkan-loader/src/BUILD.gn.orig 2020-02-08 16:16:30.786747326 -0500 ++++ third_party/angle/third_party/vulkan-loader/src/BUILD.gn 2020-02-08 16:17:02.682797286 -0500 +@@ -59,10 +59,6 @@ if (is_win) { cflags = [ "/wd4201" ] } diff --git a/srcpkgs/chromium/files/musl-patches/musl-crashpad.patch b/srcpkgs/chromium/files/musl-patches/musl-crashpad.patch index 627a250bed1..03a0c06f3ca 100644 --- a/srcpkgs/chromium/files/musl-patches/musl-crashpad.patch +++ b/srcpkgs/chromium/files/musl-patches/musl-crashpad.patch @@ -9,3 +9,15 @@ namespace crashpad { +--- third_party/crashpad/crashpad/compat/linux/sys/ptrace.h ++++ third_party/crashpad/crashpad/compat/linux/sys/ptrace.h +@@ -17,7 +17,9 @@ + + #include_next + ++#if defined(__GLIBC__) + #include ++#endif + + // https://sourceware.org/bugzilla/show_bug.cgi?id=22433 + #if !defined(PTRACE_GET_THREAD_AREA) && !defined(PT_GET_THREAD_AREA) && \ diff --git a/srcpkgs/chromium/files/musl-patches/musl-sync.patch b/srcpkgs/chromium/files/musl-patches/musl-sync.patch new file mode 100644 index 00000000000..bc2fa1937bd --- /dev/null +++ b/srcpkgs/chromium/files/musl-patches/musl-sync.patch @@ -0,0 +1,30 @@ +--- third_party/libsync/src/include/sync/sync.h.orig 2020-02-21 07:43:33.748325175 -0500 ++++ third_party/libsync/src/include/sync/sync.h 2020-02-21 07:44:07.288328784 -0500 +@@ -19,12 +19,16 @@ + #ifndef __SYS_CORE_SYNC_H + #define __SYS_CORE_SYNC_H + ++#if defined(__GLIBC__) + #include ++#endif + #include + + #include + +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + struct sync_legacy_merge_data { + int32_t fd2; +@@ -158,6 +162,8 @@ + struct sync_pt_info *itr); + void sync_fence_info_free(struct sync_fence_info_data *info); + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* __SYS_CORE_SYNC_H */ diff --git a/srcpkgs/chromium/patches/chromium-swiftshader-default-visibility.patch b/srcpkgs/chromium/patches/chromium-swiftshader-default-visibility.patch deleted file mode 100644 index a930c0b6d8f..00000000000 --- a/srcpkgs/chromium/patches/chromium-swiftshader-default-visibility.patch +++ /dev/null @@ -1,20 +0,0 @@ -Source: Ubuntu -Upstream: No -https://bazaar.launchpad.net/~chromium-team/chromium-browser/cosmic-dev/view/1454/debian/patches/swiftshader-default-visibility.patch - -Description: partially revert https://swiftshader.googlesource.com/SwiftShader.git/+/c4972610c38bcf8478016572a92843f165d9bfb4 - to fix a build failure on cosmic/amd64 (which has binutils 2.31). -Bug-Ubuntu: https://launchpad.net/bugs/1784397 -Author: Olivier Tilloy - ---- third_party/swiftshader/src/OpenGL/libGLESv2/BUILD.gn -+++ third_party/swiftshader/src/OpenGL/libGLESv2/BUILD.gn -@@ -55,7 +55,7 @@ config("swiftshader_libGLESv2_private_co - cflags += [ "-fvisibility=protected" ] - defines += [ "GL_APICALL=__attribute__((no_sanitize(\"function\")))" ] - } else { -- defines += [ "GL_APICALL=__attribute__((visibility(\"protected\"))) __attribute__((no_sanitize(\"function\")))" ] -+ defines += [ "GL_APICALL=__attribute__((visibility(\"default\"))) __attribute__((no_sanitize(\"function\")))" ] - } - } - } diff --git a/srcpkgs/chromium/patches/chromium-system-harfbuzz.patch b/srcpkgs/chromium/patches/chromium-system-harfbuzz.patch deleted file mode 100644 index a2064cf75b7..00000000000 --- a/srcpkgs/chromium/patches/chromium-system-harfbuzz.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/components/paint_preview/common/subset_font.cc b/components/paint_preview/common/subset_font.cc -index a218d63..6a5bdae 100644 ---- components/paint_preview/common/subset_font.cc -+++ components/paint_preview/common/subset_font.cc -@@ -10,11 +10,12 @@ - #include "base/bind.h" - #include "base/callback.h" - #include "base/macros.h" --#include "third_party/harfbuzz-ng/src/src/hb-subset.h" --#include "third_party/harfbuzz-ng/src/src/hb.h" - #include "third_party/skia/include/core/SkStream.h" - #include "third_party/skia/include/core/SkTypeface.h" - -+#include -+#include -+ - namespace paint_preview { - - namespace { diff --git a/srcpkgs/chromium/patches/chromium-widevine.patch b/srcpkgs/chromium/patches/chromium-widevine.patch deleted file mode 100644 index 478898ea841..00000000000 --- a/srcpkgs/chromium/patches/chromium-widevine.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/third_party/widevine/cdm/BUILD.gn b/third_party/widevine/cdm/BUILD.gn -index ed0e2f5208b..5b431a030d5 100644 ---- third_party/widevine/cdm/BUILD.gn -+++ third_party/widevine/cdm/BUILD.gn -@@ -14,7 +14,7 @@ buildflag_header("buildflags") { - - flags = [ - "ENABLE_WIDEVINE=$enable_widevine", -- "BUNDLE_WIDEVINE_CDM=$bundle_widevine_cdm", -+ "BUNDLE_WIDEVINE_CDM=true", - "ENABLE_WIDEVINE_CDM_COMPONENT=$enable_widevine_cdm_component", - ] - } diff --git a/srcpkgs/chromium/patches/create-extra-view-redefinition.patch b/srcpkgs/chromium/patches/create-extra-view-redefinition.patch deleted file mode 100644 index d17a5941649..00000000000 --- a/srcpkgs/chromium/patches/create-extra-view-redefinition.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/browser/ui/views/accessibility/invert_bubble_view.cc.orig 2019-12-11 10:41:00.069472967 -0500 -+++ chrome/browser/ui/views/accessibility/invert_bubble_view.cc 2019-12-11 10:41:48.254466283 -0500 -@@ -47,7 +47,7 @@ - // Tag value used to uniquely identify the "learn more" (?) button. - constexpr int kLearnMoreButton = 100; - --std::unique_ptr CreateExtraView(views::ButtonListener* listener) { -+std::unique_ptr CreateExtraViewInternal(views::ButtonListener* listener) { - auto learn_more = views::CreateVectorImageButton(listener); - views::SetImageFromVectorIcon(learn_more.get(), - vector_icons::kHelpOutlineIcon); -@@ -95,7 +95,7 @@ - dark_theme_(nullptr) { - DialogDelegate::set_button_label(ui::DIALOG_BUTTON_OK, - l10n_util::GetStringUTF16(IDS_DONE)); -- DialogDelegate::SetExtraView(::CreateExtraView(this)); -+ DialogDelegate::SetExtraView(::CreateExtraViewInternal(this)); - set_margins(gfx::Insets()); - chrome::RecordDialogCreation(chrome::DialogIdentifier::INVERT); - } diff --git a/srcpkgs/chromium/patches/ffmpeg-i686.patch b/srcpkgs/chromium/patches/ffmpeg-i686.patch deleted file mode 100644 index 377115b3485..00000000000 --- a/srcpkgs/chromium/patches/ffmpeg-i686.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- third_party/ffmpeg/BUILD.gn.orig 2019-07-31 14:40:04.405966498 -0400 -+++ third_party/ffmpeg/BUILD.gn 2019-07-31 14:42:20.169442812 -0400 -@@ -264,11 +264,7 @@ - # Windows builds can't compile without EBP because we can't omit frame - # pointers like we do on posix. - if (current_cpu == "x86") { -- if (using_sanitizer || is_win || use_lld) { -- defines += [ "HAVE_EBP_AVAILABLE=0" ] -- } else { -- defines += [ "HAVE_EBP_AVAILABLE=1" ] -- } -+ defines += [ "HAVE_EBP_AVAILABLE=0" ] - - # Despite the name, this isn't fixing any bugs with the linker. It's just - # preventing ffmpeg from silently emitting text relocations. See discussion diff --git a/srcpkgs/chromium/patches/llvm-remove-unsupported-compiler-warnings.patch b/srcpkgs/chromium/patches/llvm-remove-unsupported-compiler-warnings.patch index df8aed86d9c..d2687fc5cbd 100644 --- a/srcpkgs/chromium/patches/llvm-remove-unsupported-compiler-warnings.patch +++ b/srcpkgs/chromium/patches/llvm-remove-unsupported-compiler-warnings.patch @@ -1,11 +1,6 @@ -Author: Olivier Tilloy -Description: Do not use warning flags that require a newer Clang - -Index: dev/build/config/compiler/BUILD.gn -=================================================================== ---- build/config/compiler/BUILD.gn -+++ build/config/compiler/BUILD.gn -@@ -693,14 +693,6 @@ config("compiler") { +--- build/config/compiler/BUILD.gn.orig 2020-02-03 20:56:08.000000000 -0500 ++++ build/config/compiler/BUILD.gn 2020-02-06 09:48:23.578421089 -0500 +@@ -708,14 +708,6 @@ ldflags += [ "-Wl,--no-rosegment" ] } @@ -20,7 +15,7 @@ Index: dev/build/config/compiler/BUILD.gn # Pass the same C/C++ flags to the objective C/C++ compiler. cflags_objc += cflags_c cflags_objcc += cflags_cc -@@ -1501,28 +1493,6 @@ config("default_warnings") { +@@ -1516,27 +1508,6 @@ if (current_toolchain == host_toolchain || !use_xcode_clang) { # Flags NaCl (Clang 3.7) and Xcode 9.2 (Clang clang-900.0.39.2) do not # recognize. @@ -32,20 +27,19 @@ Index: dev/build/config/compiler/BUILD.gn - # TODO(https://crbug.com/989932): Evaluate and possibly enable. - "-Wno-implicit-int-float-conversion", - -- # TODO(https://crbug.com/999871): Decide if we want to clean up the -- # codebase or just disable this. Doesn't seem super useful, but -- # also fires in only 4 files. -- "-Wno-c99-designator", -- -- # This is a side effect of -Wc99-designator; easier to clean up. -- "-Wno-reorder-init-list", -- - # TODO(https://crbug.com/999886): Clean up, enable. - "-Wno-final-dtor-non-final-class", - -- # TODO(https://crbug.com/1002945): Evaluate and possibly enable. -- "-Wno-sizeof-array-div", +- # TODO(https://crbug.com/1016947) Clean up, enable. +- "-Wno-bitwise-conditional-parentheses", +- +- # TODO(https://crbug.com/1016945) Clean up, enable. +- "-Wno-builtin-assume-aligned-alignment", +- +- # TODO(https://crbug.com/1028110): Evaluate and possible enable. +- "-Wno-deprecated-copy", - ] - - cflags_c += [ - # TODO(https://crbug.com/995993): Clean up and enable. +- + if (is_fuchsia) { + cflags += [ + # TODO(https://crbug.com/999871): Clean up, enable. diff --git a/srcpkgs/chromium/patches/upstream-cros-search-service-Include-cmath-for-std-pow.patch b/srcpkgs/chromium/patches/upstream-cros-search-service-Include-cmath-for-std-pow.patch new file mode 100644 index 00000000000..200478e607d --- /dev/null +++ b/srcpkgs/chromium/patches/upstream-cros-search-service-Include-cmath-for-std-pow.patch @@ -0,0 +1,35 @@ +From 8273f4d3130e06fd8b6bef87b07c936304b971d9 Mon Sep 17 00:00:00 2001 +From: Raphael Kubo da Costa +Date: Tue, 10 Dec 2019 20:59:57 +0000 +Subject: [PATCH] [cros search service]: Include for std::pow() + +IWYU. Follow up to commit 2b2ea3c09b ("[cros search service] Move shared +string matching functions to //chrome"), which broke the libstdc++ build: + + ../../chrome/common/string_matching/fuzzy_tokenized_string_match.cc:199:14: error: no member named 'pow' in namespace 'std' + std::pow(partial_match_penalty_rate, long_start - current - 1); + ~~~~~^ + +Bug: 957519 +Change-Id: I66f61cb4f93cfa0bfa3d1b00ba391ddd8f31a7fb +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1960310 +Auto-Submit: Raphael Kubo da Costa +Reviewed-by: Jia Meng +Commit-Queue: Raphael Kubo da Costa +Cr-Commit-Position: refs/heads/master@{#723499} +--- + chrome/common/string_matching/fuzzy_tokenized_string_match.cc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/chrome/common/string_matching/fuzzy_tokenized_string_match.cc b/chrome/common/string_matching/fuzzy_tokenized_string_match.cc +index 8351fa701e4..884ef638c61 100644 +--- chrome/common/string_matching/fuzzy_tokenized_string_match.cc ++++ chrome/common/string_matching/fuzzy_tokenized_string_match.cc +@@ -5,6 +5,7 @@ + #include "chrome/common/string_matching/fuzzy_tokenized_string_match.h" + + #include ++#include + #include + + #include "base/i18n/case_conversion.h" diff --git a/srcpkgs/chromium/patches/upstream-fix-building-with-unbundled-libxml.patch b/srcpkgs/chromium/patches/upstream-fix-building-with-unbundled-libxml.patch new file mode 100644 index 00000000000..68e8bf44d1d --- /dev/null +++ b/srcpkgs/chromium/patches/upstream-fix-building-with-unbundled-libxml.patch @@ -0,0 +1,127 @@ +From d3afade220ddb307e16a6dd4f2b0ec88b2af91e7 Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Tue, 28 Jan 2020 18:16:54 +0000 +Subject: [PATCH] Fix building with unbundled libxml + +Add new targets to libxml.gn that were added in + https://chromium-review.googlesource.com/c/chromium/src/+/1894877 +Adjust includes to use system libxml headers too + +Bug: 1043042 +Change-Id: I948c063e212e49b9e7f42fed2b8bf7f4af042ca7 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2007110 +Reviewed-by: Robert Sesek +Reviewed-by: Daniel Cheng +Reviewed-by: Nico Weber +Commit-Queue: Robert Sesek +Cr-Commit-Position: refs/heads/master@{#735957} +--- + build/linux/unbundle/libxml.gn | 41 ++++++++++++++++++++-- + third_party/libxml/chromium/libxml_utils.h | 4 +-- + third_party/libxml/chromium/xml_reader.cc | 3 +- + third_party/libxml/chromium/xml_writer.cc | 3 +- + 4 files changed, 45 insertions(+), 6 deletions(-) + +diff --git build/linux/unbundle/libxml.gn build/linux/unbundle/libxml.gn +index c481bd3547b..3587881eea8 100644 +--- build/linux/unbundle/libxml.gn ++++ build/linux/unbundle/libxml.gn +@@ -8,11 +8,48 @@ pkg_config("system_libxml") { + packages = [ "libxml-2.0" ] + } + +-static_library("libxml") { ++source_set("libxml") { ++ public_configs = [ ":system_libxml" ] ++} ++ ++static_library("libxml_utils") { ++ # Do not expand this visibility list without first consulting with the ++ # Security Team. ++ visibility = [ ++ ":xml_reader", ++ ":xml_writer", ++ "//base/test:test_support", ++ "//services/data_decoder:xml_parser_fuzzer", ++ ] + sources = [ + "chromium/libxml_utils.cc", + "chromium/libxml_utils.h", + ] +- + public_configs = [ ":system_libxml" ] + } ++ ++static_library("xml_reader") { ++ # Do not expand this visibility list without first consulting with the ++ # Security Team. ++ visibility = [ ++ "//base/test:test_support", ++ "//components/policy/core/common:unit_tests", ++ "//services/data_decoder:*", ++ "//tools/traffic_annotation/auditor:auditor_sources", ++ ] ++ sources = [ ++ "chromium/xml_reader.cc", ++ "chromium/xml_reader.h", ++ ] ++ deps = [ ":libxml_utils" ] ++} ++ ++static_library("xml_writer") { ++ # The XmlWriter is considered safe to use from any target. ++ visibility = [ "*" ] ++ sources = [ ++ "chromium/xml_writer.cc", ++ "chromium/xml_writer.h", ++ ] ++ deps = [ ":libxml_utils" ] ++} +diff --git third_party/libxml/chromium/libxml_utils.h third_party/libxml/chromium/libxml_utils.h +index ff969fab540..8b2383f9c8b 100644 +--- third_party/libxml/chromium/libxml_utils.h ++++ third_party/libxml/chromium/libxml_utils.h +@@ -5,9 +5,9 @@ + #ifndef THIRD_PARTY_LIBXML_CHROMIUM_LIBXML_UTILS_H_ + #define THIRD_PARTY_LIBXML_CHROMIUM_LIBXML_UTILS_H_ + +-#include ++#include + +-#include "third_party/libxml/src/include/libxml/xmlreader.h" ++#include + + // libxml uses a global error function pointer for reporting errors. + // A ScopedXmlErrorFunc object lets you change the global error pointer +diff --git third_party/libxml/chromium/xml_reader.cc third_party/libxml/chromium/xml_reader.cc +index 92464f4cbcc..899ccefb7c8 100644 +--- third_party/libxml/chromium/xml_reader.cc ++++ third_party/libxml/chromium/xml_reader.cc +@@ -4,10 +4,11 @@ + + #include "third_party/libxml/chromium/xml_reader.h" + ++#include ++ + #include + + #include "third_party/libxml/chromium/libxml_utils.h" +-#include "third_party/libxml/src/include/libxml/xmlreader.h" + + using internal::XmlStringToStdString; + +diff --git third_party/libxml/chromium/xml_writer.cc third_party/libxml/chromium/xml_writer.cc +index 51fce8ebeb1..7c58031fe2d 100644 +--- third_party/libxml/chromium/xml_writer.cc ++++ third_party/libxml/chromium/xml_writer.cc +@@ -4,8 +4,9 @@ + + #include "third_party/libxml/chromium/xml_writer.h" + ++#include ++ + #include "third_party/libxml/chromium/libxml_utils.h" +-#include "third_party/libxml/src/include/libxml/xmlwriter.h" + + XmlWriter::XmlWriter() : writer_(nullptr), buffer_(nullptr) {} + diff --git a/srcpkgs/chromium/patches/upstream-move-RemoteTreeNode-declaration.patch b/srcpkgs/chromium/patches/upstream-move-RemoteTreeNode-declaration.patch new file mode 100644 index 00000000000..81b7b0038a8 --- /dev/null +++ b/srcpkgs/chromium/patches/upstream-move-RemoteTreeNode-declaration.patch @@ -0,0 +1,237 @@ +From cdf3e81ff49b200213d67d65558f2919222b60ab Mon Sep 17 00:00:00 2001 +From: Raphael Kubo da Costa +Date: Mon, 16 Dec 2019 11:39:11 +0000 +Subject: [PATCH] BookmarkModelMerger: Move RemoteTreeNode declaration to + header. + +This fixes the build with libstdc++ after commit 8f5dad93e58 ("Fix CHECK +failure due to untracked local nodes"): + +/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/stl_pair.h:215:11: error: field has incomplete type 'sync_bookmarks::BookmarkModelMerger::RemoteTreeNode' + _T2 second; /// @c second is a copy of the second object + ^ +/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/ext/aligned_buffer.h:91:28: note: in instantiation of template class 'std::pair, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode>' requested here + : std::aligned_storage + ^ +/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/hashtable_policy.h:233:43: note: in instantiation of template class '__gnu_cxx::__aligned_buffer, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode> >' requested here + __gnu_cxx::__aligned_buffer<_Value> _M_storage; + ^ +/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/hashtable_policy.h:264:39: note: in instantiation of template class 'std::__detail::_Hash_node_value_base, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode> >' requested here + struct _Hash_node<_Value, true> : _Hash_node_value_base<_Value> + ^ +/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/hashtable_policy.h:2028:25: note: in instantiation of template class 'std::__detail::_Hash_node, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode>, true>' requested here + rebind_traits; + ^ +/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/hashtable.h:184:15: note: in instantiation of template class 'std::__detail::_Hashtable_alloc, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode>, true> > > +' requested here + private __detail::_Hashtable_alloc< + ^ +/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/unordered_map.h:105:18: note: in instantiation of template class 'std::_Hashtable, std::pair, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode>, std::allocator, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode> >, std::__detail::_Select1st, std::equal_to >, std::hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__deta +il::_Hashtable_traits >' requested here + _Hashtable _M_h; + ^ +../../components/sync_bookmarks/bookmark_model_merger.h:146:22: note: in instantiation of template class 'std::unordered_map, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode, std::hash, std::equal_to >, std::allocator, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode> > >' requested here + const RemoteForest remote_forest_; + ^ +../../components/sync_bookmarks/bookmark_model_merger.h:53:9: note: forward declaration of 'sync_bookmarks::BookmarkModelMerger::RemoteTreeNode' + class RemoteTreeNode; + ^ + +Essentially, the problem is that libstdc++'s std::unordered_map +implementation requires both T and U to be fully declared. I raised the +problem in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92770, and GCC's +position is that we are relying on undefined behavior according to the C++ +standard (https://eel.is/c++draft/requirements#res.on.functions-2.5). + +Bug: 957519 +Change-Id: Ife7e435e516932a795bfbe05b2c910c3272878f0 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1960156 +Commit-Queue: Raphael Kubo da Costa +Reviewed-by: Mikel Astiz +Auto-Submit: Raphael Kubo da Costa +Cr-Commit-Position: refs/heads/master@{#725070} +--- + .../sync_bookmarks/bookmark_model_merger.cc | 89 +++++++------------ + .../sync_bookmarks/bookmark_model_merger.h | 48 +++++++++- + 2 files changed, 80 insertions(+), 57 deletions(-) + +diff --git a/components/sync_bookmarks/bookmark_model_merger.cc b/components/sync_bookmarks/bookmark_model_merger.cc +index eae153eff95..579848ee664 100644 +--- components/sync_bookmarks/bookmark_model_merger.cc ++++ components/sync_bookmarks/bookmark_model_merger.cc +@@ -5,7 +5,6 @@ + #include "components/sync_bookmarks/bookmark_model_merger.h" + + #include +-#include + #include + #include + #include +@@ -205,66 +204,44 @@ UpdatesPerParentId GroupValidUpdatesByParentId( + + } // namespace + +-class BookmarkModelMerger::RemoteTreeNode final { +- public: +- // Constructs a tree given |update| as root and recursively all descendants by +- // traversing |*updates_per_parent_id|. |update| and |updates_per_parent_id| +- // must not be null. All updates |*updates_per_parent_id| must represent valid +- // updates. Updates corresponding from descendant nodes are moved away from +- // |*updates_per_parent_id|. +- static RemoteTreeNode BuildTree( +- std::unique_ptr update, +- UpdatesPerParentId* updates_per_parent_id); +- +- ~RemoteTreeNode() = default; +- +- // Allow moves, useful during construction. +- RemoteTreeNode(RemoteTreeNode&&) = default; +- RemoteTreeNode& operator=(RemoteTreeNode&&) = default; +- +- const syncer::EntityData& entity() const { return *update_->entity; } +- int64_t response_version() const { return update_->response_version; } +- +- // Direct children nodes, sorted by ascending unique position. These are +- // guaranteed to be valid updates (e.g. IsValidBookmarkSpecifics()). +- const std::vector& children() const { return children_; } +- +- // Recursively emplaces all GUIDs (this node and descendants) into +- // |*guid_to_remote_node_map|, which must not be null. +- void EmplaceSelfAndDescendantsByGUID( +- std::unordered_map* +- guid_to_remote_node_map) const { +- DCHECK(guid_to_remote_node_map); +- +- const std::string& guid = entity().specifics.bookmark().guid(); +- if (!guid.empty()) { +- DCHECK(base::IsValidGUID(guid)); +- +- // Duplicate GUIDs have been sorted out before. +- bool success = guid_to_remote_node_map->emplace(guid, this).second; +- DCHECK(success); +- } ++BookmarkModelMerger::RemoteTreeNode::RemoteTreeNode() = default; + +- for (const RemoteTreeNode& child : children_) { +- child.EmplaceSelfAndDescendantsByGUID(guid_to_remote_node_map); +- } +- } ++BookmarkModelMerger::RemoteTreeNode::~RemoteTreeNode() = default; ++ ++BookmarkModelMerger::RemoteTreeNode::RemoteTreeNode( ++ BookmarkModelMerger::RemoteTreeNode&&) = default; ++BookmarkModelMerger::RemoteTreeNode& BookmarkModelMerger::RemoteTreeNode:: ++operator=(BookmarkModelMerger::RemoteTreeNode&&) = default; ++ ++void BookmarkModelMerger::RemoteTreeNode::EmplaceSelfAndDescendantsByGUID( ++ std::unordered_map* ++ guid_to_remote_node_map) const { ++ DCHECK(guid_to_remote_node_map); ++ ++ const std::string& guid = entity().specifics.bookmark().guid(); ++ if (!guid.empty()) { ++ DCHECK(base::IsValidGUID(guid)); + +- private: +- static bool UniquePositionLessThan(const RemoteTreeNode& lhs, +- const RemoteTreeNode& rhs) { +- const syncer::UniquePosition a_pos = +- syncer::UniquePosition::FromProto(lhs.entity().unique_position); +- const syncer::UniquePosition b_pos = +- syncer::UniquePosition::FromProto(rhs.entity().unique_position); +- return a_pos.LessThan(b_pos); ++ // Duplicate GUIDs have been sorted out before. ++ bool success = guid_to_remote_node_map->emplace(guid, this).second; ++ DCHECK(success); + } + +- RemoteTreeNode() = default; ++ for (const RemoteTreeNode& child : children_) { ++ child.EmplaceSelfAndDescendantsByGUID(guid_to_remote_node_map); ++ } ++} + +- std::unique_ptr update_; +- std::vector children_; +-}; ++// static ++bool BookmarkModelMerger::RemoteTreeNode::UniquePositionLessThan( ++ const RemoteTreeNode& lhs, ++ const RemoteTreeNode& rhs) { ++ const syncer::UniquePosition a_pos = ++ syncer::UniquePosition::FromProto(lhs.entity().unique_position); ++ const syncer::UniquePosition b_pos = ++ syncer::UniquePosition::FromProto(rhs.entity().unique_position); ++ return a_pos.LessThan(b_pos); ++} + + // static + BookmarkModelMerger::RemoteTreeNode +diff --git a/components/sync_bookmarks/bookmark_model_merger.h b/components/sync_bookmarks/bookmark_model_merger.h +index 9b592000dc5..bf0783ecf8e 100644 +--- components/sync_bookmarks/bookmark_model_merger.h ++++ components/sync_bookmarks/bookmark_model_merger.h +@@ -5,6 +5,7 @@ + #ifndef COMPONENTS_SYNC_BOOKMARKS_BOOKMARK_MODEL_MERGER_H_ + #define COMPONENTS_SYNC_BOOKMARKS_BOOKMARK_MODEL_MERGER_H_ + ++#include + #include + #include + #include +@@ -50,7 +51,52 @@ class BookmarkModelMerger { + + private: + // Internal representation of a remote tree, composed of nodes. +- class RemoteTreeNode; ++ class RemoteTreeNode final { ++ private: ++ using UpdatesPerParentId = ++ std::unordered_map; ++ ++ public: ++ // Constructs a tree given |update| as root and recursively all descendants ++ // by traversing |*updates_per_parent_id|. |update| and ++ // |updates_per_parent_id| must not be null. All updates ++ // |*updates_per_parent_id| must represent valid updates. Updates ++ // corresponding from descendant nodes are moved away from ++ // |*updates_per_parent_id|. ++ static RemoteTreeNode BuildTree( ++ std::unique_ptr update, ++ UpdatesPerParentId* updates_per_parent_id); ++ ++ ~RemoteTreeNode(); ++ ++ // Allow moves, useful during construction. ++ RemoteTreeNode(RemoteTreeNode&&); ++ RemoteTreeNode& operator=(RemoteTreeNode&&); ++ ++ const syncer::EntityData& entity() const { return *update_->entity; } ++ int64_t response_version() const { return update_->response_version; } ++ ++ // Direct children nodes, sorted by ascending unique position. These are ++ // guaranteed to be valid updates (e.g. IsValidBookmarkSpecifics()). ++ const std::vector& children() const { return children_; } ++ ++ // Recursively emplaces all GUIDs (this node and descendants) into ++ // |*guid_to_remote_node_map|, which must not be null. ++ void EmplaceSelfAndDescendantsByGUID( ++ std::unordered_map* ++ guid_to_remote_node_map) const; ++ ++ private: ++ static bool UniquePositionLessThan(const RemoteTreeNode& lhs, ++ const RemoteTreeNode& rhs); ++ ++ RemoteTreeNode(); ++ ++ std::unique_ptr update_; ++ std::vector children_; ++ }; + + // A forest composed of multiple trees where the root of each tree represents + // a permanent node, keyed by server-defined unique tag of the root. diff --git a/srcpkgs/chromium/patches/upstream-rebuild-Linux-frame-button-cache-when-activation.patch b/srcpkgs/chromium/patches/upstream-rebuild-Linux-frame-button-cache-when-activation.patch new file mode 100644 index 00000000000..e334cde0561 --- /dev/null +++ b/srcpkgs/chromium/patches/upstream-rebuild-Linux-frame-button-cache-when-activation.patch @@ -0,0 +1,62 @@ +From d10f885b9327399be9348b780967ebd6b7f2c4bc Mon Sep 17 00:00:00 2001 +From: Tom Anderson +Date: Fri, 7 Feb 2020 22:44:54 +0000 +Subject: [PATCH] Rebuild Linux frame button cache when activation state + changes + +This fixes an issue where the frame buttons would always render in an +inactive state on Linux (see repro steps in bug 1049258). + +Bug: 1049258 +R=sky +CC=pkasting + +Change-Id: Ic5af33199003e1d1cdf6cedf506e32388ea11fa9 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2044538 +Auto-Submit: Thomas Anderson +Commit-Queue: Scott Violet +Reviewed-by: Scott Violet +Cr-Commit-Position: refs/heads/master@{#739585} +--- + .../ui/views/frame/desktop_linux_browser_frame_view.cc | 6 +++--- + .../desktop_aura/desktop_window_tree_host_platform.cc | 3 +++ + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/chrome/browser/ui/views/frame/desktop_linux_browser_frame_view.cc b/chrome/browser/ui/views/frame/desktop_linux_browser_frame_view.cc +index 954e776057f..4f579955675 100644 +--- chrome/browser/ui/views/frame/desktop_linux_browser_frame_view.cc ++++ chrome/browser/ui/views/frame/desktop_linux_browser_frame_view.cc +@@ -22,13 +22,13 @@ DesktopLinuxBrowserFrameView::DesktopLinuxBrowserFrameView( + : OpaqueBrowserFrameView(frame, browser_view, layout), + nav_button_provider_(std::move(nav_button_provider)) {} + +-DesktopLinuxBrowserFrameView::~DesktopLinuxBrowserFrameView() {} ++DesktopLinuxBrowserFrameView::~DesktopLinuxBrowserFrameView() = default; + + void DesktopLinuxBrowserFrameView::Layout() { + // Calling MaybeUpdateCachedFrameButtonImages() from Layout() is sufficient to + // catch all cases that could update the appearance, since +- // DesktopWindowTreeHostPlatform::OnWindowStateChanged() does a layout any +- // time any properties change. ++ // DesktopWindowTreeHostPlatform::On{Window,Activation}StateChanged() does a ++ // layout any time the maximized and activation state changes, respectively. + MaybeUpdateCachedFrameButtonImages(); + OpaqueBrowserFrameView::Layout(); + } +diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc +index 9c695d8e5b1..9662f19aa90 100644 +--- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc ++++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc +@@ -677,9 +677,12 @@ void DesktopWindowTreeHostPlatform::OnCloseRequest() { + } + + void DesktopWindowTreeHostPlatform::OnActivationChanged(bool active) { ++ if (is_active_ == active) ++ return; + is_active_ = active; + aura::WindowTreeHostPlatform::OnActivationChanged(active); + desktop_native_widget_aura_->HandleActivationChanged(active); ++ ScheduleRelayout(); + } + + base::Optional diff --git a/srcpkgs/chromium/patches/upstream-rename-Relayout-in-DesktopWindowTreeHostPlatform.patch b/srcpkgs/chromium/patches/upstream-rename-Relayout-in-DesktopWindowTreeHostPlatform.patch new file mode 100644 index 00000000000..554919b59d1 --- /dev/null +++ b/srcpkgs/chromium/patches/upstream-rename-Relayout-in-DesktopWindowTreeHostPlatform.patch @@ -0,0 +1,64 @@ +From 5a2cd2409c7d65c019ad9f4595a4e85315857ac4 Mon Sep 17 00:00:00 2001 +From: Tom Anderson +Date: Mon, 3 Feb 2020 23:18:46 +0000 +Subject: [PATCH] Rename Relayout() in DesktopWindowTreeHostPlatform to + ScheduleRelayout() + +R=sky + +Bug: None +Change-Id: I680cafd25935e59a280e3b2baac754d3d5f13a35 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2036553 +Auto-Submit: Thomas Anderson +Reviewed-by: Scott Violet +Commit-Queue: Thomas Anderson +Cr-Commit-Position: refs/heads/master@{#737974} +--- + .../desktop_aura/desktop_window_tree_host_platform.cc | 6 +++--- + .../widget/desktop_aura/desktop_window_tree_host_platform.h | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc +index 6c00d49eb3f..9c695d8e5b1 100644 +--- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc ++++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc +@@ -556,7 +556,7 @@ void DesktopWindowTreeHostPlatform::SetFullscreen(bool fullscreen) { + DCHECK_EQ(fullscreen, IsFullscreen()); + + if (IsFullscreen() == fullscreen) +- Relayout(); ++ ScheduleRelayout(); + // Else: the widget will be relaid out either when the window bounds change + // or when |platform_window|'s fullscreen state changes. + } +@@ -669,7 +669,7 @@ void DesktopWindowTreeHostPlatform::OnWindowStateChanged( + // Now that we have different window properties, we may need to relayout the + // window. (The windows code doesn't need this because their window change is + // synchronous.) +- Relayout(); ++ ScheduleRelayout(); + } + + void DesktopWindowTreeHostPlatform::OnCloseRequest() { +@@ -712,7 +712,7 @@ gfx::Rect DesktopWindowTreeHostPlatform::ToPixelRect( + return gfx::ToEnclosingRect(rect_in_pixels); + } + +-void DesktopWindowTreeHostPlatform::Relayout() { ++void DesktopWindowTreeHostPlatform::ScheduleRelayout() { + Widget* widget = native_widget_delegate_->AsWidget(); + NonClientView* non_client_view = widget->non_client_view(); + // non_client_view may be NULL, especially during creation. +diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.h +index 89beb8d2245..75a401e02a7 100644 +--- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.h ++++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.h +@@ -129,7 +129,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostPlatform + gfx::Rect ToPixelRect(const gfx::Rect& rect_in_dip) const; + + private: +- void Relayout(); ++ void ScheduleRelayout(); + + Widget* GetWidget(); + const Widget* GetWidget() const; diff --git a/srcpkgs/chromium/patches/upstream-sync-enable-USSPasswords-by-default.patch b/srcpkgs/chromium/patches/upstream-sync-enable-USSPasswords-by-default.patch new file mode 100644 index 00000000000..5f3131c9009 --- /dev/null +++ b/srcpkgs/chromium/patches/upstream-sync-enable-USSPasswords-by-default.patch @@ -0,0 +1,28 @@ +From eb997db5527c01fd12c321a6abc52b7cff882e50 Mon Sep 17 00:00:00 2001 +From: Mohamed Amir Yosef +Date: Thu, 9 Jan 2020 21:22:19 +0000 +Subject: [PATCH] [Sync] Enable USSPasswords by default + +Change-Id: I021cd952d7a2917a8fb7203cabdac612251193df +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1963804 +Auto-Submit: Mohamed Amir Yosef +Reviewed-by: Mikel Astiz +Commit-Queue: Mohamed Amir Yosef +Cr-Commit-Position: refs/heads/master@{#729902} +--- + components/sync/driver/sync_driver_switches.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/components/sync/driver/sync_driver_switches.cc b/components/sync/driver/sync_driver_switches.cc +index ddff8b91419..999384aa68a 100644 +--- components/sync/driver/sync_driver_switches.cc ++++ components/sync/driver/sync_driver_switches.cc +@@ -55,7 +55,7 @@ const base::Feature kStopSyncInPausedState{"StopSyncInPausedState", + + // Enable USS implementation of Passwords datatype. + const base::Feature kSyncUSSPasswords{"SyncUSSPasswords", +- base::FEATURE_DISABLED_BY_DEFAULT}; ++ base::FEATURE_ENABLED_BY_DEFAULT}; + + // Enable USS implementation of Nigori datatype. + const base::Feature kSyncUSSNigori{"SyncUSSNigori", diff --git a/srcpkgs/chromium/template b/srcpkgs/chromium/template index dda4313007e..4d7c21d17b5 100644 --- a/srcpkgs/chromium/template +++ b/srcpkgs/chromium/template @@ -1,7 +1,7 @@ # Template file for 'chromium' pkgname=chromium # See http://www.chromium.org/developers/calendar for the latest version -version=79.0.3945.130 +version=80.0.3987.116 revision=1 archs="i686 x86_64*" short_desc="Google's attempt at creating a safer, faster, and more stable browser" @@ -9,15 +9,14 @@ maintainer="Enno Boland " license="BSD-3-Clause" homepage="https://www.chromium.org/" distfiles="https://commondatastorage.googleapis.com/chromium-browser-official/${pkgname}-${version}.tar.xz" -checksum=56193431ab9d1193773b133d86b419bfae8d8b9196eea253660895e0e8f87ba0 +checksum=65c5d9bc510b712170c6013acd3bbb07d770a1ce02d64d01890386e9e5678901 lib32disabled=yes nodebug=yes nopie=yes # contains tools that are not PIE, enables PIE itself -build_options="clang jumbo_build js_optimize" +build_options="clang js_optimize" desc_option_clang="Use clang to build" -desc_option_jumbo_build="Do a jumbo build, needs way more RAM but builds way faster" desc_option_js_optimize="Optimize the JS used for Chromium's UI" hostmakedepends="$(vopt_if clang clang) yasm python pkgconf perl gperf bison ninja nodejs hwids @@ -34,12 +33,16 @@ makedepends="libpng-devel gtk+-devel gtk+3-devel nss-devel pciutils-devel ffmpeg-devel libva-devel" depends="libexif hwids desktop-file-utils hicolor-icon-theme xdg-utils" -build_options_default="jumbo_build clang" +build_options_default="clang" case "${XBPS_TARGET_MACHINE}" in x86_64|i686) build_options_default+=" js_optimize" ;; esac +case "${XBPS_TARGET_MACHINE}" in + i686) broken="what(): std::bad_alloc during linking" ;; +esac + post_extract() { case "${XBPS_TARGET_MACHINE}" in *-musl) @@ -161,9 +164,6 @@ do_configure() { 'is_desktop_linux=true' ) - # Jumbo/Unity builds: https://chromium.googlesource.com/chromium/src/+/master/docs/jumbo.md - conf+=( "use_jumbo_build=$(vopt_if jumbo_build true false)" ) - conf+=( "closure_compile=$(vopt_if js_optimize true false)" )