From 0c8c16bcbd27ce5593911a5368dd7d45892b5306 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 10 Mar 2020 07:18:00 +0000 Subject: community/chromium: fix build and upgrade to 80.0.3987.122 --- community/chromium/APKBUILD | 25 ++- community/chromium/musl-fixes.patch | 10 +- community/chromium/musl-hacks.patch | 12 ++ community/chromium/remove_third_party_checks.patch | 105 --------- ...-search-service-Include-cmath-for-std-pow.patch | 35 +++ ...stream-fix-building-with-unbundled-libxml.patch | 127 +++++++++++ .../upstream-move-RemoteTreeNode-declaration.patch | 237 +++++++++++++++++++++ ...-Linux-frame-button-cache-when-activation.patch | 62 ++++++ ...Relayout-in-DesktopWindowTreeHostPlatform.patch | 64 ++++++ ...tream-sync-enable-USSPasswords-by-default.patch | 28 +++ 10 files changed, 588 insertions(+), 117 deletions(-) delete mode 100644 community/chromium/remove_third_party_checks.patch create mode 100644 community/chromium/upstream-cros-search-service-Include-cmath-for-std-pow.patch create mode 100644 community/chromium/upstream-fix-building-with-unbundled-libxml.patch create mode 100644 community/chromium/upstream-move-RemoteTreeNode-declaration.patch create mode 100644 community/chromium/upstream-rebuild-Linux-frame-button-cache-when-activation.patch create mode 100644 community/chromium/upstream-rename-Relayout-in-DesktopWindowTreeHostPlatform.patch create mode 100644 community/chromium/upstream-sync-enable-USSPasswords-by-default.patch diff --git a/community/chromium/APKBUILD b/community/chromium/APKBUILD index 4aa6cf4f8e..fe221ebc21 100644 --- a/community/chromium/APKBUILD +++ b/community/chromium/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Carlo Landmeter # Maintainer: Natanael Copa pkgname=chromium -pkgver=80.0.3987.122 +pkgver=80.0.3987.132 pkgrel=0 pkgdesc="Chromium web browser" url="https://www.chromium.org/Home" @@ -84,6 +84,13 @@ source="https://commondatastorage.googleapis.com/chromium-browser-official/chrom chromium.desktop google-api.keys + upstream-cros-search-service-Include-cmath-for-std-pow.patch + upstream-fix-building-with-unbundled-libxml.patch + upstream-move-RemoteTreeNode-declaration.patch + upstream-rebuild-Linux-frame-button-cache-when-activation.patch + upstream-rename-Relayout-in-DesktopWindowTreeHostPlatform.patch + upstream-sync-enable-USSPasswords-by-default.patch + default-pthread-stacksize.patch musl-fixes.patch musl-fixes-breakpad.patch @@ -109,7 +116,6 @@ source="https://commondatastorage.googleapis.com/chromium-browser-official/chrom elf-arm.patch gn_bootstrap_ninja.patch - remove_third_party_checks.patch " # secfixes: @@ -329,16 +335,22 @@ chromedriver() { mv "$pkgdir"/usr/bin/chromedriver "$subpkgdir"/usr/bin } -sha512sums="3a022c55f5745f2cfb7e28efb113f78ff686da638cd02f0585ef1ae8620f81ece864bc27b4e0a88daf3f409ff565a9b80b8859d1fd7d62c8b1d26cb8b311acc5 chromium-80.0.3987.122.tar.xz +sha512sums="10bf0d1efdf2ead9e94de90971ec135f5370f8c949acfd75ca953aed706510cc3a1464f1ff3c40275921bb24953d8ce65d095e38cb0d56488ccc2c7fa27516d4 chromium-80.0.3987.132.tar.xz a3bb959c65944ae2fb765725cedcffd743a58bc0c2cd1f1999d15fe79801d00f3474b08b4ed7b48859ed921eb57093d0ad09d90f201d729ed9b8a419a591ed29 pstables-2.8.h b9a810416dd7a8ffc3a5ced85ad9acebda1665bd08a57eec7b189698cc5f74d2c3fd69044e20fcb83297a43214b2772a1312b2c6122ea0eb716abacf39524d60 chromium-launcher.sh f6d962b9e4c22dd42183df3db5d3202dab33eccecafb1bf63ca678147289581262db1e5e64cbe8f9c212beefb0a6717bb8d311e497f56b55fe95b8bab2db493f chromium.conf e182c998a43d22d1c76a86c561619afd1fca8c2be668265ad5e2f81a3806f7a154272cc027a2f8b370fb69446892c69e5967a4be76082325c14245ee7915234c chromium.desktop 2d8237a940ea691bd10b08315429677a587f7ef9692a0cca53bfd066eae82998a6c71f402a8669e9de39f94d7f3280745d1628ea6eac5d76ca7116844d4e0dac google-api.keys +75b93ccb6730ba6f516edef179a497275db623f4a8270d2cc9cd26548e0e41e6ee2d600438af8cbd7be3ebc9ad562cac2f58792eb4d2d2be2cf59f45a0253811 upstream-cros-search-service-Include-cmath-for-std-pow.patch +7e700b6c33188f562bdb77aea795abd44d6d0a874c65192d2f81584cb34ca142b4d1117626a7cfd209729865a82d605aaf81390af6fa406ed3b1423511815131 upstream-fix-building-with-unbundled-libxml.patch +902d7b08a25323551c1ca671cd2c1889bce0a9b017d4bc8f4abb7ccc654a3cbfb7b2b0652e17f182e018c1d1e3b35328a428e394691c38408e637613a9c76bbc upstream-move-RemoteTreeNode-declaration.patch +ad0e7e32e5eadbc935abd8f01a360e04133e387c6dc669ca350eaa586cce901682afeb2a61abd8c6380bcc919a76e16a9f1fe516c780bb0af78ed1c9d4327bc2 upstream-rebuild-Linux-frame-button-cache-when-activation.patch +082bc4340b49c12b519e217f0580ce94cb9bf35901f94ae19f9069530efce3ff3f03b39338724f3f517c3deb724e84d7c95f83b07419b847e245459056c465e2 upstream-rename-Relayout-in-DesktopWindowTreeHostPlatform.patch +59c9bf861caf06e6fe2f69214f55f73753008930716f35a0d5c2cc18f0b5178f7cb104922031a58f4831fcefebd31c9921706f3dbda32ba029487555d52d2254 upstream-sync-enable-USSPasswords-by-default.patch b726ef2ecfe7d471e60d67de1e05847d214df6093b41bb2055652a9028327af19a8b10e7175467240f4dfec9e3ae97a6c4666bfd2cd6cb436c54656a085653ae default-pthread-stacksize.patch -f119056919f0922ac8fcaddd860e5ba09a550e747fff03940a686f02a6bac208a465e6cd5644b1ed0d79a97ebc5867f65cfe68ec2f172dd7c245bf5dd65a8aad musl-fixes.patch +5c61e97621606a43ea91ab64b7432943cceeb8af951f10f6db07d9cb8f8d925e5f5e4c55618d0075e68397464e2315b5c47564e9c4c046652c5636a496f4a335 musl-fixes.patch ecb4bf5653bf3d987970d6c708f179bfc4b7d370b59d412bdf20d1f993585ee2f619caf202e7f239cb47111c8a72557c364cf60b7dd17e172e6629792eea8f29 musl-fixes-breakpad.patch -ddacc7ab0374eaa110a392c9d0912c250eb102f060cac284b170902fa9358f8670cbe26676582208d1291662058761e31795ebac75115b38a1e3ad8681895b38 musl-hacks.patch +d78479bdea1c847d6e1506421a3eb716031cd24aa979f0e653c0406b507a5a89924d15e6c603e291f1b17751fb0788571f42699214fd1462334c0daabd584ffe musl-hacks.patch 919f13a2cd65673f267321cf95c5410e65bc5264d6704d0791b25d39111282bedb425bd9824dde3b67422cfb874c86a9383ded686e39cfd4aac239edaf41cfc8 musl-libc++.patch bc71ae06efd780bd79f29a69bb6f05e6ef8353bcfa50042bb2dcda433642fa1935bf05856dd2effb1e6adb5b0594341552f453a2b846237b4e79d79049040329 musl-sandbox.patch 129ec746fd951ee6d0bf0b4389b7c988523870507de1f92f5706f4eb49039d4a49ed30e92b0634e3ae521fc3e129adc1c6edc7435922fc91658d8c087520c707 no-execinfo.patch @@ -356,5 +368,4 @@ fca59f9728aa05253688b2ba8d6a610832bc28bd3057636c95e64759d5b006c80e84c549b6037f7d 4a7ea09356823392f75ce188973422c8978fd84f238ed0f533376c50030210323b27e8401749bfb8ebe7d02d29c4b6067259f0a1fa55f0916e9c82c29ff3a420 gcc-arm.patch 7f81d97cce25d5530a2cb84105247e3707e344a285b0ac73c2f9275eae4bcc5aea6ff27307ec6607f95c13e9e724fab0e15e6fb8a33b3a9bfe0b3dbfdfb33ae6 aarch64-fixes.patch bddf4ddaed63fbea15083d7a9e19173aa204fcdce9b4fdde2f673df71c79e56c313325a090af86e3df03034188c83c40e96b497f1f83057ed6bbbe8343490d4a elf-arm.patch -834e732959dd4a1c5ec847185c8f025307c7f2b79d9e87079a7bea0cbc0b7324cb660e302a462879309e95220117acac1d31c8eb276c78b5c400b2db2d59fda8 gn_bootstrap_ninja.patch -54afa10d50b609c48b3b2f59212fa6ebc6990f977ba40e09c8b9eab5f72c499055aa7df454a9fb660b344410f3cf83e6a1948a31997d22f71b99d3217c4cb175 remove_third_party_checks.patch" +834e732959dd4a1c5ec847185c8f025307c7f2b79d9e87079a7bea0cbc0b7324cb660e302a462879309e95220117acac1d31c8eb276c78b5c400b2db2d59fda8 gn_bootstrap_ninja.patch" diff --git a/community/chromium/musl-fixes.patch b/community/chromium/musl-fixes.patch index b776d1d394..be2dcb4e60 100644 --- a/community/chromium/musl-fixes.patch +++ b/community/chromium/musl-fixes.patch @@ -63,15 +63,15 @@ #include "base/linux_util.h" #include "base/strings/string_split.h" -@@ -255,7 +257,7 @@ - shell_integration::NUM_DEFAULT_STATES); - } +@@ -365,7 +367,7 @@ void RecordLinuxDistro() { + #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) + void RecordLinuxGlibcVersion() { -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if defined(__GLIBC__) && !defined(OS_CHROMEOS) - void RecordLinuxDistro() { - UMALinuxDistro distro_result = UMA_LINUX_DISTRO_UNKNOWN; + base::Version version(gnu_get_libc_version()); + UMALinuxGlibcVersion glibc_version_result = UMA_LINUX_GLIBC_NOT_PARSEABLE; --- ./base/logging.cc +++ ./base/logging.cc @@ -621,8 +621,7 @@ diff --git a/community/chromium/musl-hacks.patch b/community/chromium/musl-hacks.patch index b5373f1e96..45d938b78f 100644 --- a/community/chromium/musl-hacks.patch +++ b/community/chromium/musl-hacks.patch @@ -20,3 +20,15 @@ int result = HANDLE_EINTR(Sendmmsg(fd, &msgvec[0], buffers.size(), 0)); SendResult send_result(0, 0, std::move(buffers)); if (result < 0) { +diff --git a/chrome/common/string_matching/fuzzy_tokenized_string_match.cc b/chrome/common/string_matching/fuzzy_tokenized_string_match.cc +index 8351fa7..7ace813 100644 +--- ./chrome/common/string_matching/fuzzy_tokenized_string_match.cc ++++ ./chrome/common/string_matching/fuzzy_tokenized_string_match.cc +@@ -6,6 +6,7 @@ + + #include + #include ++#include + + #include "base/i18n/case_conversion.h" + #include "base/metrics/field_trial_params.h" diff --git a/community/chromium/remove_third_party_checks.patch b/community/chromium/remove_third_party_checks.patch deleted file mode 100644 index 46d1ba7f9c..0000000000 --- a/community/chromium/remove_third_party_checks.patch +++ /dev/null @@ -1,105 +0,0 @@ ---- base/test/BUILD.gn -+++ base/test/BUILD.gn -@@ -225,9 +225,6 @@ - "//base/third_party/dynamic_annotations", - "//testing/gmock", - "//testing/gtest", -- "//third_party/icu:icuuc", -- "//third_party/libxml:libxml_utils", -- "//third_party/libxml:xml_reader", - ] - - if (is_posix || is_fuchsia) { -@@ -300,9 +297,6 @@ - ] - public_deps -= [ "//base:i18n" ] - deps -= [ -- "//third_party/icu:icuuc", -- "//third_party/libxml:libxml_utils", -- "//third_party/libxml:xml_reader", - ] - } - } ---- components/policy/core/common/BUILD.gn -+++ components/policy/core/common/BUILD.gn -@@ -173,8 +173,6 @@ - "//net", - "//services/identity/public/cpp:cpp_types", - "//services/network/public/cpp", -- "//third_party/libxml:xml_writer", -- "//third_party/re2", - "//url", - ] - -@@ -422,7 +420,6 @@ - "//services/network:test_support", - "//testing/gmock", - "//testing/gtest", -- "//third_party/libxml:xml_reader", - ] - } - ---- components/wifi/BUILD.gn -+++ components/wifi/BUILD.gn -@@ -26,8 +26,6 @@ - if (is_win) { - libs = [ "iphlpapi.lib" ] - deps += [ -- "//third_party/libxml:xml_reader", # Safe, data come from system. -- "//third_party/libxml:xml_writer", - ] - } - ---- services/data_decoder/BUILD.gn -+++ services/data_decoder/BUILD.gn -@@ -33,7 +33,6 @@ - "//mojo/public/cpp/bindings", - "//net", - "//skia", -- "//third_party/libxml:xml_reader", - "//ui/gfx", - "//ui/gfx/geometry", - ] -@@ -117,8 +116,6 @@ - deps = [ - ":lib", - "//base", -- "//third_party/libxml:libxml_utils", -- "//third_party/libxml:xml_reader", - ] - dict = "//third_party/libxml/fuzz/xml.dict" - seed_corpus = "//third_party/libxml/fuzz/seed_corpus" ---- tools/traffic_annotation/auditor/BUILD.gn -+++ tools/traffic_annotation/auditor/BUILD.gn -@@ -26,7 +26,6 @@ - - deps = [ - "//components/policy:full_runtime_code_generate", -- "//third_party/protobuf:protobuf_full", - ] - } - -@@ -70,10 +69,6 @@ - ":traffic_annotation", - "//base", - "//net/traffic_annotation", -- "//third_party/libxml:xml_reader", # Safe, consumes Chromium-produced file. -- "//third_party/libxml:xml_writer", -- "//third_party/protobuf:protobuf_full", -- "//third_party/re2", - ] - } - ---- chrome/browser/BUILD.gn -+++ chrome/browser/BUILD.gn -@@ -2221,10 +2221,8 @@ - "//third_party/icu", - "//third_party/leveldatabase", - "//third_party/libaddressinput", -- "//third_party/libxml:xml_writer", - "//third_party/libyuv", - "//third_party/metrics_proto", -- "//third_party/re2", - "//third_party/smhasher:cityhash", - "//third_party/webrtc_overrides:webrtc_component", - "//third_party/widevine/cdm:buildflags", diff --git a/community/chromium/upstream-cros-search-service-Include-cmath-for-std-pow.patch b/community/chromium/upstream-cros-search-service-Include-cmath-for-std-pow.patch new file mode 100644 index 0000000000..200478e607 --- /dev/null +++ b/community/chromium/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/community/chromium/upstream-fix-building-with-unbundled-libxml.patch b/community/chromium/upstream-fix-building-with-unbundled-libxml.patch new file mode 100644 index 0000000000..68e8bf44d1 --- /dev/null +++ b/community/chromium/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/community/chromium/upstream-move-RemoteTreeNode-declaration.patch b/community/chromium/upstream-move-RemoteTreeNode-declaration.patch new file mode 100644 index 0000000000..81b7b0038a --- /dev/null +++ b/community/chromium/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/community/chromium/upstream-rebuild-Linux-frame-button-cache-when-activation.patch b/community/chromium/upstream-rebuild-Linux-frame-button-cache-when-activation.patch new file mode 100644 index 0000000000..e334cde056 --- /dev/null +++ b/community/chromium/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/community/chromium/upstream-rename-Relayout-in-DesktopWindowTreeHostPlatform.patch b/community/chromium/upstream-rename-Relayout-in-DesktopWindowTreeHostPlatform.patch new file mode 100644 index 0000000000..554919b59d --- /dev/null +++ b/community/chromium/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/community/chromium/upstream-sync-enable-USSPasswords-by-default.patch b/community/chromium/upstream-sync-enable-USSPasswords-by-default.patch new file mode 100644 index 0000000000..5f3131c900 --- /dev/null +++ b/community/chromium/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", -- cgit v1.2.3