From 8e53e58ac77d2cbc779917a851d1363e0da3f415 Mon Sep 17 00:00:00 2001 From: Idris Kalp Date: Tue, 5 Jan 2021 22:15:22 +0300 Subject: [PATCH] chromium-browser 87.0.4280.109 --- network/web/chromium-browser/actions.py | 19 +- ...-78-protobuf-RepeatedPtrField-export.patch | 13 ++ .../chromium-79-gcc-protobuf-alignas.patch | 81 ++++++++ ...romium-84-blink-disable-clang-format.patch | 33 ++++ .../chromium-87-CursorFactory-include.patch | 36 ++++ ...-87-ServiceWorkerContainerHost-crash.patch | 22 +++ .../files/patches/chromium-87-compiler.patch | 178 ++++++++++++++++++ .../chromium-87-openscreen-include.patch | 25 +++ .../patches/chromium-88-vaapi-attribute.patch | 39 ++++ .../patches/chromium-fix-char_traits.patch | 14 ++ ...ixel-anti-aliasing-in-FreeType-2.8.1.patch | 100 ++++++++++ .../chromium-browser/files/wayland-egl.patch | 58 ++++++ network/web/chromium-browser/pspec.xml | 29 ++- 13 files changed, 634 insertions(+), 13 deletions(-) create mode 100644 network/web/chromium-browser/files/patches/chromium-78-protobuf-RepeatedPtrField-export.patch create mode 100644 network/web/chromium-browser/files/patches/chromium-79-gcc-protobuf-alignas.patch create mode 100644 network/web/chromium-browser/files/patches/chromium-84-blink-disable-clang-format.patch create mode 100644 network/web/chromium-browser/files/patches/chromium-87-CursorFactory-include.patch create mode 100644 network/web/chromium-browser/files/patches/chromium-87-ServiceWorkerContainerHost-crash.patch create mode 100644 network/web/chromium-browser/files/patches/chromium-87-compiler.patch create mode 100644 network/web/chromium-browser/files/patches/chromium-87-openscreen-include.patch create mode 100644 network/web/chromium-browser/files/patches/chromium-88-vaapi-attribute.patch create mode 100644 network/web/chromium-browser/files/patches/chromium-fix-char_traits.patch create mode 100644 network/web/chromium-browser/files/subpixel-anti-aliasing-in-FreeType-2.8.1.patch create mode 100644 network/web/chromium-browser/files/wayland-egl.patch diff --git a/network/web/chromium-browser/actions.py b/network/web/chromium-browser/actions.py index 4529c8223b..952557083f 100644 --- a/network/web/chromium-browser/actions.py +++ b/network/web/chromium-browser/actions.py @@ -31,9 +31,12 @@ def setup(): third_party/blink/renderer/core/xml/parser/xml_document_parser.cc \ third_party/libxml/chromium/libxml_utils.cc") - opt = 'use_sysroot=false \ + opt = 'custom_toolchain="//build/toolchain/linux/unbundle:default" \ + host_toolchain="//build/toolchain/linux/unbundle:default" \ + use_sysroot=false \ enable_nacl=true \ enable_nacl_nonsfi=true \ + rtc_use_pipewire=true \ use_custom_libcxx=true \ clang_use_chrome_plugins=false \ is_official_build=true \ @@ -56,21 +59,25 @@ def setup(): link_pulseaudio=true \ enable_swiftshader=false \ use_vaapi=true \ - closure_compile=false' + closure_compile=false \ + symbol_level=0' #clangpath = "%s/chromium-%s/third_party/llvm-build/Release+Asserts/bin/" %(get.workDIR(), get.srcVERSION()) shelltools.export("CC", "clang" ) shelltools.export("CXX", "clang++" ) - #shelltools.export("AR", "llvm-ar" ) + shelltools.export("AR", "ar" ) + shelltools.export("NM", "nm" ) + shelltools.export("RANLIB", "ranlib" ) - shelltools.export("CFLAGS", "-Wno-builtin-macro-redefined") - shelltools.export("CXXFLAGS", "-Wno-builtin-macro-redefined") + shelltools.export("CFLAGS", "-Wno-builtin-macro-redefined -Wno-unknown-warning-option") + shelltools.export("CXXFLAGS", "-Wno-builtin-macro-redefined -Wno-unknown-warning-option") + shelltools.export("LDFLAGS", " -fuse-ld=lld") shelltools.export("CPPFLAGS", "-D__DATE__= -D__TIME__= -D__TIMESTAMP__=") shelltools.system("/usr/bin/python3 build/download_nacl_toolchains.py --packages nacl_x86_newlib,pnacl_newlib,pnacl_translator sync --extract") - shelltools.system("/usr/bin/python3 tools/clang/scripts/update.py") + #shelltools.system("/usr/bin/python3 tools/clang/scripts/update.py") shelltools.system("/usr/bin/python3 tools/gn/bootstrap/bootstrap.py --gn-gen-args '%s'"% opt) shelltools.system("out/Release/gn gen out/Release --args='%s'"% opt) diff --git a/network/web/chromium-browser/files/patches/chromium-78-protobuf-RepeatedPtrField-export.patch b/network/web/chromium-browser/files/patches/chromium-78-protobuf-RepeatedPtrField-export.patch new file mode 100644 index 0000000000..ddb9e80eef --- /dev/null +++ b/network/web/chromium-browser/files/patches/chromium-78-protobuf-RepeatedPtrField-export.patch @@ -0,0 +1,13 @@ +diff --git a/third_party/protobuf/src/google/protobuf/repeated_field.h b/third_party/protobuf/src/google/protobuf/repeated_field.h +index b5b193c..4434854 100644 +--- a/third_party/protobuf/src/google/protobuf/repeated_field.h ++++ b/third_party/protobuf/src/google/protobuf/repeated_field.h +@@ -804,7 +804,7 @@ class StringTypeHandler { + // RepeatedPtrField is like RepeatedField, but used for repeated strings or + // Messages. + template +-class RepeatedPtrField final : private internal::RepeatedPtrFieldBase { ++class PROTOBUF_EXPORT RepeatedPtrField final : private internal::RepeatedPtrFieldBase { + public: + RepeatedPtrField(); + explicit RepeatedPtrField(Arena* arena); diff --git a/network/web/chromium-browser/files/patches/chromium-79-gcc-protobuf-alignas.patch b/network/web/chromium-browser/files/patches/chromium-79-gcc-protobuf-alignas.patch new file mode 100644 index 0000000000..20180c473d --- /dev/null +++ b/network/web/chromium-browser/files/patches/chromium-79-gcc-protobuf-alignas.patch @@ -0,0 +1,81 @@ +From 5d66d5907ac3e76d1e382b8a8e8afe653bd00f4c Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Sun, 31 May 2020 13:59:15 +0000 +Subject: [PATCH] Fix GCC build with PROTOBUF_USE_DLLS enabled + +GCC does not allow mixing __attribute__(()) syntax and alignas() +syntax. Re-use approach from chromium base/compiler_specific.h +--- + .../protobuf/src/google/protobuf/arena.h | 2 +- + .../protobuf/src/google/protobuf/port_def.inc | 29 +++++++++++++++++++ + .../src/google/protobuf/port_undef.inc | 1 + + 3 files changed, 31 insertions(+), 1 deletion(-) + +diff --git a/third_party/protobuf/src/google/protobuf/arena.h b/third_party/protobuf/src/google/protobuf/arena.h +index dedc221..a8515ce 100644 +--- a/third_party/protobuf/src/google/protobuf/arena.h ++++ b/third_party/protobuf/src/google/protobuf/arena.h +@@ -245,7 +245,7 @@ struct ArenaOptions { + // well as protobuf container types like RepeatedPtrField and Map. The protocol + // is internal to protobuf and is not guaranteed to be stable. Non-proto types + // should not rely on this protocol. +-class PROTOBUF_EXPORT alignas(8) Arena final { ++class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final { + public: + // Arena constructor taking custom options. See ArenaOptions below for + // descriptions of the options available. +diff --git a/third_party/protobuf/src/google/protobuf/port_def.inc b/third_party/protobuf/src/google/protobuf/port_def.inc +index f1bd85d..6d02b53 100644 +--- a/third_party/protobuf/src/google/protobuf/port_def.inc ++++ b/third_party/protobuf/src/google/protobuf/port_def.inc +@@ -528,6 +528,35 @@ PROTOBUF_EXPORT_TEMPLATE_TEST(DEFAULT, __declspec(dllimport)); + #undef IN + #endif // _MSC_VER + ++// Specify memory alignment for structs, classes, etc. ++// Use like: ++// class PROTOBUF_ALIGNAS(16) MyClass { ... } ++// PROTOBUF_ALIGNAS(16) int array[4]; ++// ++// In most places you can use the C++11 keyword "alignas", which is preferred. ++// ++// But compilers have trouble mixing __attribute__((...)) syntax with ++// alignas(...) syntax. ++// ++// Doesn't work in clang or gcc: ++// struct alignas(16) __attribute__((packed)) S { char c; }; ++// Works in clang but not gcc: ++// struct __attribute__((packed)) alignas(16) S2 { char c; }; ++// Works in clang and gcc: ++// struct alignas(16) S3 { char c; } __attribute__((packed)); ++// ++// There are also some attributes that must be specified *before* a class ++// definition: visibility (used for exporting functions/classes) is one of ++// these attributes. This means that it is not possible to use alignas() with a ++// class that is marked as exported. ++#if defined(_MSC_VER) ++#define PROTOBUF_ALIGNAS(byte_alignment) __declspec(align(byte_alignment)) ++#elif defined(__GNUC__) ++#define PROTOBUF_ALIGNAS(byte_alignment) __attribute__((aligned(byte_alignment))) ++#else ++#define PROTOBUF_ALIGNAS(byte_alignment) alignas(byte_alignment) ++#endif ++ + #if defined(__clang__) + #pragma clang diagnostic push + // TODO(gerbens) ideally we cleanup the code. But a cursory try shows many +diff --git a/third_party/protobuf/src/google/protobuf/port_undef.inc b/third_party/protobuf/src/google/protobuf/port_undef.inc +index b7e67fe..ba1fffc 100644 +--- a/third_party/protobuf/src/google/protobuf/port_undef.inc ++++ b/third_party/protobuf/src/google/protobuf/port_undef.inc +@@ -80,6 +80,7 @@ + #undef PROTOBUF_EXPORT_TEMPLATE_STYLE_MATCH_foj3FJo5StF0OvIzl7oMxA__declspec + #undef PROTOBUF_EXPORT_TEMPLATE_STYLE_MATCH_DECLSPEC_dllexport + #undef PROTOBUF_EXPORT_TEMPLATE_STYLE_MATCH_DECLSPEC_dllimport ++#undef PROTOBUF_ALIGNAS + + + +-- +2.26.2 + diff --git a/network/web/chromium-browser/files/patches/chromium-84-blink-disable-clang-format.patch b/network/web/chromium-browser/files/patches/chromium-84-blink-disable-clang-format.patch new file mode 100644 index 0000000000..c573db8259 --- /dev/null +++ b/network/web/chromium-browser/files/patches/chromium-84-blink-disable-clang-format.patch @@ -0,0 +1,33 @@ +From 08ac7188f414218ac9d764e29e7aa64a6bfc2f96 Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Sun, 31 May 2020 10:02:03 +0000 +Subject: [PATCH] disable clang-format for generated code in blink + +For GCC builds clang-format might be not available. Additionally, +current scripts look for clang-format within chromium sources and +don't consider system clang-format. +--- + .../bindings/scripts/bind_gen/codegen_utils.py | 10 +--------- + 1 file changed, 1 insertion(+), 9 deletions(-) + +diff --git a/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_utils.py b/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_utils.py +index 7021f1a..33bf5bf 100644 +--- a/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_utils.py ++++ b/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_utils.py +@@ -150,12 +150,4 @@ def write_code_node_to_file(code_node, filepath): + + rendered_text = render_code_node(code_node) + +- format_result = style_format.auto_format(rendered_text, filename=filepath) +- if not format_result.did_succeed: +- raise RuntimeError("Style-formatting failed: filename = {filename}\n" +- "---- stderr ----\n" +- "{stderr}:".format( +- filename=format_result.filename, +- stderr=format_result.error_message)) +- +- web_idl.file_io.write_to_file_if_changed(filepath, format_result.contents) ++ web_idl.file_io.write_to_file_if_changed(filepath, rendered_text) +-- +2.26.2 + diff --git a/network/web/chromium-browser/files/patches/chromium-87-CursorFactory-include.patch b/network/web/chromium-browser/files/patches/chromium-87-CursorFactory-include.patch new file mode 100644 index 0000000000..98cb9cf70d --- /dev/null +++ b/network/web/chromium-browser/files/patches/chromium-87-CursorFactory-include.patch @@ -0,0 +1,36 @@ +From c4f6e8cd34a245c3640b86a91c9694d69594d80b Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Wed, 16 Sep 2020 15:05:02 +0000 +Subject: [PATCH] IWYU: ui::CursorFactory is now required independent from + Ozone + +--- + .../ui/views/chrome_browser_main_extra_parts_views_linux.cc | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc +index 5a97d61..ccedd2a 100644 +--- a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc ++++ b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc +@@ -7,6 +7,7 @@ + #include "chrome/browser/themes/theme_service_aura_linux.h" + #include "chrome/browser/ui/browser_list.h" + #include "chrome/browser/ui/views/theme_profile_key.h" ++#include "ui/base/cursor/cursor_factory.h" + #include "ui/display/screen.h" + #include "ui/views/linux_ui/linux_ui.h" + +@@ -15,10 +16,6 @@ + #include "ui/gtk/gtk_ui_delegate.h" + #endif + +-#if defined(USE_OZONE) +-#include "ui/base/cursor/cursor_factory.h" +-#endif +- + #if defined(USE_X11) + #include "ui/gfx/x/connection.h" // nogncheck + #if BUILDFLAG(USE_GTK) +-- +2.26.2 + diff --git a/network/web/chromium-browser/files/patches/chromium-87-ServiceWorkerContainerHost-crash.patch b/network/web/chromium-browser/files/patches/chromium-87-ServiceWorkerContainerHost-crash.patch new file mode 100644 index 0000000000..5efc460c10 --- /dev/null +++ b/network/web/chromium-browser/files/patches/chromium-87-ServiceWorkerContainerHost-crash.patch @@ -0,0 +1,22 @@ +Bug: https://bugs.gentoo.org/750038 +Upstream bug: https://crbug.com/1135070 + +--- a/content/browser/service_worker/service_worker_container_host.cc ++++ b/content/browser/service_worker/service_worker_container_host.cc +@@ -626,6 +626,16 @@ + int64_t registration_id) { + DCHECK_CURRENTLY_ON(ServiceWorkerContext::GetCoreThreadId()); + DCHECK(base::Contains(registration_object_hosts_, registration_id)); ++ ++ // ServiceWorkerRegistrationObjectHost to be deleted may have the last reference to ++ // ServiceWorkerRegistration that indirectly owns this ServiceWorkerContainerHost. ++ // If we erase the object host directly from the map, |this| could be deleted ++ // during the map operation and may crash. To avoid the case, we take the ++ // ownership of the object host from the map first, and then erase the entry ++ // from the map. See https://crbug.com/1135070 for details. ++ std::unique_ptr to_be_deleted = ++ std::move(registration_object_hosts_[registration_id]); ++ DCHECK(to_be_deleted); + registration_object_hosts_.erase(registration_id); + } + diff --git a/network/web/chromium-browser/files/patches/chromium-87-compiler.patch b/network/web/chromium-browser/files/patches/chromium-87-compiler.patch new file mode 100644 index 0000000000..c2f6a16d8d --- /dev/null +++ b/network/web/chromium-browser/files/patches/chromium-87-compiler.patch @@ -0,0 +1,178 @@ +From f4d0b0eb899005b4b8b6388e1d8bb82cc0018fc8 Mon Sep 17 00:00:00 2001 +From: Mike Gilbert +Date: Thu, 1 Oct 2020 18:14:51 +0000 +Subject: [PATCH] Disable various compiler configs + +--- + build/config/compiler/BUILD.gn | 71 ++++++++-------------------------- + 1 file changed, 17 insertions(+), 54 deletions(-) + +diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn +index 4f6461b..b5d2c77 100644 +--- a/build/config/compiler/BUILD.gn ++++ b/build/config/compiler/BUILD.gn +@@ -254,8 +254,6 @@ config("compiler") { + + configs += [ + # See the definitions below. +- ":clang_revision", +- ":compiler_cpu_abi", + ":compiler_codegen", + ":compiler_deterministic", + ] +@@ -480,36 +478,6 @@ config("compiler") { + ldflags += [ "-Wl,-z,keep-text-section-prefix" ] + } + +- if (is_clang && !is_nacl && !use_xcode_clang) { +- cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ] +- +- cflags += [ +- # TODO(hans): Remove this once Clang generates better optimized debug info +- # by default. https://crbug.com/765793 +- "-mllvm", +- "-instcombine-lower-dbg-declare=0", +- ] +- +- # Pinned clang has enable-dse-memoryssa enabled by default but it's broken, +- # so we have to force it off. +- # Trunk clang has it disabled by default but it might work, so we force it +- # on so the ToT bots can check if it works now. +- if (!llvm_force_head_revision) { +- cflags += [ +- # TODO(https://crbug.com/1127713): Investigate, remove. +- "-mllvm", +- "-enable-dse-memoryssa=false", +- ] +- } +- if (llvm_force_head_revision) { +- cflags += [ +- # TODO(https://crbug.com/1127713): Investigate, remove. +- "-mllvm", +- "-enable-dse-memoryssa=true", +- ] +- } +- } +- + # C11/C++11 compiler flags setup. + # --------------------------- + if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) || +@@ -1571,7 +1539,7 @@ config("chromium_code") { + defines = [ "_HAS_NODISCARD" ] + } + } else { +- cflags = [ "-Wall" ] ++ cflags = [] + if (treat_warnings_as_errors) { + cflags += [ "-Werror" ] + +@@ -1580,10 +1548,6 @@ config("chromium_code") { + # well. + ldflags = [ "-Werror" ] + } +- if (is_clang) { +- # Enable extra warnings for chromium_code when we control the compiler. +- cflags += [ "-Wextra" ] +- } + + # In Chromium code, we define __STDC_foo_MACROS in order to get the + # C99 macros on Mac and Linux. +@@ -1592,15 +1556,6 @@ config("chromium_code") { + "__STDC_FORMAT_MACROS", + ] + +- if (!is_debug && !using_sanitizer && current_cpu != "s390x" && +- current_cpu != "s390" && current_cpu != "ppc64" && +- current_cpu != "mips" && current_cpu != "mips64") { +- # Non-chromium code is not guaranteed to compile cleanly with +- # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are +- # disabled, so only do that for Release build. +- defines += [ "_FORTIFY_SOURCE=2" ] +- } +- + if (is_mac) { + cflags_objc = [ "-Wobjc-missing-property-synthesis" ] + cflags_objcc = [ "-Wobjc-missing-property-synthesis" ] +@@ -1998,7 +1953,8 @@ config("default_stack_frames") { + } + + # Default "optimization on" config. +-config("optimize") { ++config("optimize") { } ++config("xoptimize") { + if (is_win) { + if (chrome_pgo_phase != 2) { + # Favor size over speed, /O1 must be before the common flags. +@@ -2033,7 +1989,8 @@ config("optimize") { + } + + # Turn off optimizations. +-config("no_optimize") { ++config("no_optimize") { } ++config("xno_optimize") { + if (is_win) { + cflags = [ + "/Od", # Disable optimization. +@@ -2073,7 +2030,8 @@ config("no_optimize") { + # Turns up the optimization level. On Windows, this implies whole program + # optimization and link-time code generation which is very expensive and should + # be used sparingly. +-config("optimize_max") { ++config("optimize_max") { } ++config("xoptimize_max") { + if (is_nacl && is_nacl_irt) { + # The NaCl IRT is a special case and always wants its own config. + # Various components do: +@@ -2105,7 +2063,8 @@ config("optimize_max") { + # + # TODO(crbug.com/621335) - rework how all of these configs are related + # so that we don't need this disclaimer. +-config("optimize_speed") { ++config("optimize_speed") { } ++config("xoptimize_speed") { + if (is_nacl && is_nacl_irt) { + # The NaCl IRT is a special case and always wants its own config. + # Various components do: +@@ -2130,7 +2089,8 @@ config("optimize_speed") { + } + } + +-config("optimize_fuzzing") { ++config("optimize_fuzzing") { } ++config("xoptimize_fuzzing") { + cflags = [ "-O1" ] + common_optimize_on_cflags + ldflags = common_optimize_on_ldflags + visibility = [ ":default_optimization" ] +@@ -2247,7 +2207,8 @@ config("win_pdbaltpath") { + } + + # Full symbols. +-config("symbols") { ++config("symbols") { } ++config("xsymbols") { + if (is_win) { + if (is_clang) { + cflags = [ "/Z7" ] # Debug information in the .obj files. +@@ -2355,7 +2316,8 @@ config("symbols") { + # Minimal symbols. + # This config guarantees to hold symbol for stack trace which are shown to user + # when crash happens in unittests running on buildbot. +-config("minimal_symbols") { ++config("minimal_symbols") { } ++config("xminimal_symbols") { + if (is_win) { + # Functions, files, and line tables only. + cflags = [] +@@ -2408,7 +2370,8 @@ config("minimal_symbols") { + # This configuration contains function names only. That is, the compiler is + # told to not generate debug information and the linker then just puts function + # names in the final debug information. +-config("no_symbols") { ++config("no_symbols") { } ++config("xno_symbols") { + if (is_win) { + ldflags = [ "/DEBUG" ] + +-- +2.26.2 + diff --git a/network/web/chromium-browser/files/patches/chromium-87-openscreen-include.patch b/network/web/chromium-browser/files/patches/chromium-87-openscreen-include.patch new file mode 100644 index 0000000000..42545a8cc1 --- /dev/null +++ b/network/web/chromium-browser/files/patches/chromium-87-openscreen-include.patch @@ -0,0 +1,25 @@ +From 0c0af4cabb7490db473cd2c28f069956974a4d98 Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Fri, 2 Oct 2020 12:11:58 +0000 +Subject: [PATCH] IWYU: uint8_t is defined in stdint.h + +--- + third_party/openscreen/src/util/crypto/random_bytes.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/third_party/openscreen/src/util/crypto/random_bytes.h b/third_party/openscreen/src/util/crypto/random_bytes.h +index 3cb2fa8..025b52c 100644 +--- a/third_party/openscreen/src/util/crypto/random_bytes.h ++++ b/third_party/openscreen/src/util/crypto/random_bytes.h +@@ -7,6 +7,8 @@ + + #include + ++#include ++ + namespace openscreen { + + std::array GenerateRandomBytes16(); +-- +2.26.2 + diff --git a/network/web/chromium-browser/files/patches/chromium-88-vaapi-attribute.patch b/network/web/chromium-browser/files/patches/chromium-88-vaapi-attribute.patch new file mode 100644 index 0000000000..c524a3150e --- /dev/null +++ b/network/web/chromium-browser/files/patches/chromium-88-vaapi-attribute.patch @@ -0,0 +1,39 @@ +From 4f4604877f3b666ac7a373ae443e3c3795424569 Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Fri, 6 Nov 2020 11:18:42 +0000 +Subject: [PATCH] GCC: fix attribute on function definition + +GCC does not accept attributes at the end for function definitions. +Solution is to move it before function name. Otherwise GCC fails like +this: + +../../base/compiler_specific.h:97:28: error: attributes are not allowed +on a function-definition + 97 | #define WARN_UNUSED_RESULT __attribute__((warn_unused_result)) + | ^~~~~~~~~~~~~ + ../../media/gpu/vaapi/vaapi_wrapper.h:322:36: note: in + expansion of macro 'WARN_UNUSED_RESULT' + 322 | const T* data) WARN_UNUSED_RESULT { + | ^~~~~~~~~~~~~~~~~~ +--- + media/gpu/vaapi/vaapi_wrapper.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/media/gpu/vaapi/vaapi_wrapper.h b/media/gpu/vaapi/vaapi_wrapper.h +index fd1fd82..deeda1f 100644 +--- a/media/gpu/vaapi/vaapi_wrapper.h ++++ b/media/gpu/vaapi/vaapi_wrapper.h +@@ -318,8 +318,8 @@ class MEDIA_GPU_EXPORT VaapiWrapper + // Convenient templatized version of SubmitBuffer() where |size| is deduced to + // be the size of the type of |*data|. + template +- bool SubmitBuffer(VABufferType va_buffer_type, +- const T* data) WARN_UNUSED_RESULT { ++ bool WARN_UNUSED_RESULT SubmitBuffer(VABufferType va_buffer_type, ++ const T* data) { + return SubmitBuffer(va_buffer_type, sizeof(T), data); + } + // Batch-version of SubmitBuffer(), where the lock for accessing libva is +-- +2.26.2 + diff --git a/network/web/chromium-browser/files/patches/chromium-fix-char_traits.patch b/network/web/chromium-browser/files/patches/chromium-fix-char_traits.patch new file mode 100644 index 0000000000..4cb9503a93 --- /dev/null +++ b/network/web/chromium-browser/files/patches/chromium-fix-char_traits.patch @@ -0,0 +1,14 @@ +--- a/base/strings/char_traits.h ++++ b/base/strings/char_traits.h +@@ -67,9 +67,9 @@ + return __builtin_memcmp(s1, s2, n); + #else + for (; n; --n, ++s1, ++s2) { +- if (*s1 < *s2) ++ if ((unsigned char)*s1 < (unsigned char)*s2) + return -1; +- if (*s1 > *s2) ++ if ((unsigned char)*s1 > (unsigned char)*s2) + return 1; + } + return 0; diff --git a/network/web/chromium-browser/files/subpixel-anti-aliasing-in-FreeType-2.8.1.patch b/network/web/chromium-browser/files/subpixel-anti-aliasing-in-FreeType-2.8.1.patch new file mode 100644 index 0000000000..d7109f9932 --- /dev/null +++ b/network/web/chromium-browser/files/subpixel-anti-aliasing-in-FreeType-2.8.1.patch @@ -0,0 +1,100 @@ +From f25787b72c20e97cdeb74e037dc1ff56a88b45c6 Mon Sep 17 00:00:00 2001 +From: Ben Wagner +Date: Tue, 1 Dec 2020 20:22:00 -0500 +Subject: [PATCH] Subpixel anti-aliasing in FreeType 2.8.1+ + +FreeType 2.8.1 and later always provide some form of subpixel +anti-aliasing. + +Bug: skia:10950,skia:6663 +Change-Id: I666cc942e73b73073cdabf900c25faa10d9aaf0f +Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339861 +Reviewed-by: Herb Derby +Commit-Queue: Ben Wagner +--- + src/ports/SkFontHost_FreeType.cpp | 33 ++++++++++++++++++++----------- + 1 file changed, 22 insertions(+), 11 deletions(-) + +diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp +index 990eff4f5e..c0aeb792da 100644 +--- a/third_party/skia/src/ports/SkFontHost_FreeType.cpp ++++ b/third_party/skia/src/ports/SkFontHost_FreeType.cpp +@@ -32,6 +32,7 @@ + #include "src/utils/SkMatrix22.h" + + #include ++#include + + #include + #include FT_ADVANCES_H +@@ -147,13 +148,16 @@ public: + // *reinterpret_cast(&procPtr) = dlsym(self, "proc"); + // because clang has not implemented DR573. See http://clang.llvm.org/cxx_dr_status.html . + +- FT_Int major, minor, patch; +- FT_Library_Version(fLibrary, &major, &minor, &patch); ++ using Version = std::tuple; ++ Version version; ++ FT_Library_Version(fLibrary, &std::get<0>(version), ++ &std::get<1>(version), ++ &std::get<2>(version)); + + #if SK_FREETYPE_MINIMUM_RUNTIME_VERSION >= 0x02070100 + fGetVarDesignCoordinates = FT_Get_Var_Design_Coordinates; + #elif SK_FREETYPE_MINIMUM_RUNTIME_VERSION & SK_FREETYPE_DLOPEN +- if (major > 2 || ((major == 2 && minor > 7) || (major == 2 && minor == 7 && patch >= 0))) { ++ if (Version(2,7,0) <= version) { + //The FreeType library is already loaded, so symbols are available in process. + void* self = dlopen(nullptr, RTLD_LAZY); + if (self) { +@@ -166,7 +170,7 @@ public: + #if SK_FREETYPE_MINIMUM_RUNTIME_VERSION >= 0x02070200 + FT_Set_Default_Properties(fLibrary); + #elif SK_FREETYPE_MINIMUM_RUNTIME_VERSION & SK_FREETYPE_DLOPEN +- if (major > 2 || ((major == 2 && minor > 7) || (major == 2 && minor == 7 && patch >= 1))) { ++ if (Version(2,7,1) <= version) { + //The FreeType library is already loaded, so symbols are available in process. + void* self = dlopen(nullptr, RTLD_LAZY); + if (self) { +@@ -185,7 +189,7 @@ public: + #if SK_FREETYPE_MINIMUM_RUNTIME_VERSION >= 0x02080000 + fLightHintingIsYOnly = true; + #else +- if (major > 2 || ((major == 2 && minor > 8) || (major == 2 && minor == 8 && patch >= 0))) { ++ if (Version(2,8,0) <= version) { + fLightHintingIsYOnly = true; + } + #endif +@@ -194,7 +198,7 @@ public: + #if SK_FREETYPE_MINIMUM_RUNTIME_VERSION >= 0x02080100 + fGetVarAxisFlags = FT_Get_Var_Axis_Flags; + #elif SK_FREETYPE_MINIMUM_RUNTIME_VERSION & SK_FREETYPE_DLOPEN +- if (major > 2 || ((major == 2 && minor > 7) || (major == 2 && minor == 7 && patch >= 0))) { ++ if (Version(2,7,0) <= version) { + //The FreeType library is already loaded, so symbols are available in process. + void* self = dlopen(nullptr, RTLD_LAZY); + if (self) { +@@ -204,11 +208,18 @@ public: + } + #endif + +- // Setup LCD filtering. This reduces color fringes for LCD smoothed glyphs. +- // The default has changed over time, so this doesn't mean the same thing to all users. +- if (FT_Library_SetLcdFilter(fLibrary, FT_LCD_FILTER_DEFAULT) == 0) { +- fIsLCDSupported = true; +- fLCDExtra = 2; //Using a filter adds one full pixel to each side. ++ fIsLCDSupported = ++ // Subpixel anti-aliasing may be unfiltered until the LCD filter is set. ++ // Newer versions may still need this, so this test with side effects must come first. ++ // The default has changed over time, so this doesn't mean the same thing to all users. ++ (FT_Library_SetLcdFilter(fLibrary, FT_LCD_FILTER_DEFAULT) == 0) || ++ ++ // In 2.8.1 and later FreeType always provides some form of subpixel anti-aliasing. ++ ((SK_FREETYPE_MINIMUM_RUNTIME_VERSION) >= 0x02080100) || ++ (Version(2,8,1) <= version); ++ ++ if (fIsLCDSupported) { ++ fLCDExtra = 2; // Using a filter may require up to one full pixel to each side. + } + } + ~FreeTypeLibrary() { diff --git a/network/web/chromium-browser/files/wayland-egl.patch b/network/web/chromium-browser/files/wayland-egl.patch new file mode 100644 index 0000000000..34e274e6c3 --- /dev/null +++ b/network/web/chromium-browser/files/wayland-egl.patch @@ -0,0 +1,58 @@ +--- a/media/gpu/vaapi/vaapi_video_decode_accelerator.cc 2020-10-07 09:38:47.000000000 -0700 ++++ b/media/gpu/vaapi/vaapi_video_decode_accelerator.cc 2020-10-08 14:09:34.550174093 -0700 +@@ -698,7 +698,6 @@ + // The X11/ANGLE implementation can use |vaapi_wrapper_| to copy from an + // internal libva buffer into an X Pixmap without having to use a processing + // wrapper. +-#if !defined(USE_X11) + // If we aren't in BufferAllocationMode::kNone, we have to allocate a + // |vpp_vaapi_wrapper_| for VaapiPicture to DownloadFromSurface() the VA's + // internal decoded frame. +@@ -708,6 +707,7 @@ + VaapiWrapper::kVideoProcess, VAProfileNone, + base::Bind(&ReportVaapiErrorToUMA, + "Media.VaapiVideoDecodeAccelerator.Vpp.VAAPIError")); ++#if !defined(USE_X11) + RETURN_AND_NOTIFY_ON_FAILURE(vpp_vaapi_wrapper_, + "Failed to initialize VppVaapiWrapper", + PLATFORM_FAILURE, ); +@@ -715,11 +715,15 @@ + RETURN_AND_NOTIFY_ON_FAILURE( + vpp_vaapi_wrapper_->CreateContext(gfx::Size()), + "Failed to create Context", PLATFORM_FAILURE, ); ++#else ++ if (vpp_vaapi_wrapper_) ++ vpp_vaapi_wrapper_->CreateContext(gfx::Size()); ++#endif // !defined(USE_X11) + } +- vaapi_wrapper_for_picture = vpp_vaapi_wrapper_; ++ vaapi_wrapper_for_picture = (vpp_vaapi_wrapper_)? ++ vpp_vaapi_wrapper_:vaapi_wrapper_for_picture; + } + +-#endif // !defined(USE_X11) + + for (size_t i = 0; i < buffers.size(); ++i) { + // TODO(b/139460315): Create with buffers[i] once the AMD driver issue is +--- a/ui/gl/gl_image_native_pixmap.cc 2020-05-18 11:40:06.000000000 -0700 ++++ b/ui/gl/gl_image_native_pixmap.cc 2020-05-22 02:07:16.007770442 -0700 +@@ -288,6 +288,8 @@ + std::move(scoped_fd)); + } + ++ handle.planes[0].size = size_.GetArea(); ++ + return handle; + #endif // !defined(OS_FUCHSIA) + } +--- a/gpu/command_buffer/service/error_state.cc 2020-05-18 11:39:22.000000000 -0700 ++++ b/gpu/command_buffer/service/error_state.cc 2020-05-22 13:43:09.181180388 -0700 +@@ -115,6 +115,8 @@ + // buffer. + error = GL_NO_ERROR; + } ++ if (error == GL_INVALID_ENUM) ++ error = GL_NO_ERROR; + return error; + } + diff --git a/network/web/chromium-browser/pspec.xml b/network/web/chromium-browser/pspec.xml index 87677c2057..6f49641511 100644 --- a/network/web/chromium-browser/pspec.xml +++ b/network/web/chromium-browser/pspec.xml @@ -13,7 +13,7 @@ app:gui A WebKit powered web browser Chromium-browser is an open-source web browser, powered by WebKit. - http://gsdview.appspot.com/chromium-browser-official/chromium-81.0.4044.122.tar.xz + http://gsdview.appspot.com/chromium-browser-official/chromium-87.0.4280.109.tar.xz alsa-lib-devel at-spi2-atk-devel @@ -64,6 +64,7 @@ libxcb-devel libxslt-devel llvm-clang-devel + lld-devel minizip-devel mit-kerberos ninja @@ -94,12 +95,19 @@ mesa-devel - chromium-skia-harmony.patch - chromium-widevine.patch - rebuild-Linux-frame-button-cache-when-activation.patch - rename-Relayout-in-DesktopWindowTreeHostPlatform.patch - vaapi-build-fix.patch - vdpau-support.patch + subpixel-anti-aliasing-in-FreeType-2.8.1.patch + wayland-egl.patch + + + patches/chromium-78-protobuf-RepeatedPtrField-export.patch + patches/chromium-79-gcc-protobuf-alignas.patch + patches/chromium-84-blink-disable-clang-format.patch + patches/chromium-87-CursorFactory-include.patch + patches/chromium-87-ServiceWorkerContainerHost-crash.patch + patches/chromium-87-compiler.patch + patches/chromium-87-openscreen-include.patch + patches/chromium-88-vaapi-attribute.patch + patches/chromium-fix-char_traits.patch @@ -178,6 +186,13 @@ + + 2021-01-05 + 87.0.4280.109 + Version Bump + Idris Kalp + idriskalp@gmail.com + 2020-04-29 81.0.4044.122