From 9f19b52f042f931110f492e595dbb9cf10b8f0be Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 17:09:00 +0100 Subject: [PATCH] update to 5.15.7 [release 5.15.7-1mamba;Fri Dec 24 2021] --- README.md | 2 + qt5-qtwebengine-5.15.7-SIOCGSTAMP.patch | 16 + qt5-qtwebengine-5.15.7-aarch64-new-stat.patch | 12 + ...-5.15.7-chromium-glibc-2.34-breakpad.patch | 72 + ...webengine-5.15.7-chromium-glibc-2.34.patch | 13 + qt5-qtwebengine-5.15.7-chromium-python3.patch | 1771 +++++++++++++++++ qt5-qtwebengine-5.15.7-no-icudtl-dat.patch | 33 + qt5-qtwebengine-5.15.7-python3.patch | 150 ++ qt5-qtwebengine.spec | 316 +++ qtwebengine-5.15.2-chromium-icu-68.2-2.patch | 11 + qtwebengine-5.15.2-chromium-icu-68.patch | 302 +++ 11 files changed, 2698 insertions(+) create mode 100644 qt5-qtwebengine-5.15.7-SIOCGSTAMP.patch create mode 100644 qt5-qtwebengine-5.15.7-aarch64-new-stat.patch create mode 100644 qt5-qtwebengine-5.15.7-chromium-glibc-2.34-breakpad.patch create mode 100644 qt5-qtwebengine-5.15.7-chromium-glibc-2.34.patch create mode 100644 qt5-qtwebengine-5.15.7-chromium-python3.patch create mode 100644 qt5-qtwebengine-5.15.7-no-icudtl-dat.patch create mode 100644 qt5-qtwebengine-5.15.7-python3.patch create mode 100644 qt5-qtwebengine.spec create mode 100644 qtwebengine-5.15.2-chromium-icu-68.2-2.patch create mode 100644 qtwebengine-5.15.2-chromium-icu-68.patch diff --git a/README.md b/README.md index 910ad74..63ee8c1 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # qt5-qtwebengine +Qt5 WebEngine component. + diff --git a/qt5-qtwebengine-5.15.7-SIOCGSTAMP.patch b/qt5-qtwebengine-5.15.7-SIOCGSTAMP.patch new file mode 100644 index 0000000..7609f85 --- /dev/null +++ b/qt5-qtwebengine-5.15.7-SIOCGSTAMP.patch @@ -0,0 +1,16 @@ +diff --git a/src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc b/src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc +index c38d7fdfa..0a8b0fd8b 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc ++++ b/src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc +@@ -72,6 +72,11 @@ typedef void* SockOptArg; + + #if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(__native_client__) + ++// Seems that kernel 5.2.0 renames this define to SIOCGSTAMP_OLD ++#ifndef SIOCGSTAMP ++#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ ++#endif ++ + int64_t GetSocketRecvTimestamp(int socket) { + struct timeval tv_ioctl; + int ret = ioctl(socket, SIOCGSTAMP, &tv_ioctl); diff --git a/qt5-qtwebengine-5.15.7-aarch64-new-stat.patch b/qt5-qtwebengine-5.15.7-aarch64-new-stat.patch new file mode 100644 index 0000000..2b17be4 --- /dev/null +++ b/qt5-qtwebengine-5.15.7-aarch64-new-stat.patch @@ -0,0 +1,12 @@ +diff -up qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/sandbox/linux/system_headers/arm64_linux_syscalls.h.aarch64-new-stat qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/sandbox/linux/system_headers/arm64_linux_syscalls.h +--- qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/sandbox/linux/system_headers/arm64_linux_syscalls.h.aarch64-new-stat 2018-11-19 12:55:45.000000000 -0600 ++++ qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/sandbox/linux/system_headers/arm64_linux_syscalls.h 2018-12-08 21:16:39.931896244 -0600 +@@ -5,6 +5,8 @@ + #ifndef SANDBOX_LINUX_SYSTEM_HEADERS_ARM64_LINUX_SYSCALLS_H_ + #define SANDBOX_LINUX_SYSTEM_HEADERS_ARM64_LINUX_SYSCALLS_H_ + ++#define __ARCH_WANT_NEW_STAT ++ + #include + + #if !defined(__NR_io_setup) diff --git a/qt5-qtwebengine-5.15.7-chromium-glibc-2.34-breakpad.patch b/qt5-qtwebengine-5.15.7-chromium-glibc-2.34-breakpad.patch new file mode 100644 index 0000000..8e3b844 --- /dev/null +++ b/qt5-qtwebengine-5.15.7-chromium-glibc-2.34-breakpad.patch @@ -0,0 +1,72 @@ +From a3bc792bdc116806a50e022d9102914c8daf6210 Mon Sep 17 00:00:00 2001 +From: Martin Jansa +Date: Wed, 4 Aug 2021 19:11:06 +0200 +Subject: [PATCH] chromium: breakpad: fix build with glibc-2.34 + +* fixes: +[218/24061] CXX obj/third_party/breakpad/client/exception_handler.o +FAILED: obj/third_party/breakpad/client/exception_handler.o +/OE/build/luneos-honister/webos-ports/tmp-glibc/work/core2-64-webos-linux/qtwebengine/5.15.4+gitAUTOINC+dd7f7a9166_555f348ae8-r0/recipe-sysroot-native/usr/bin/x86_64-webos-linux/x86_64-webos-linux-g++ -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -Wdate-time --sysroot=/OE/build/luneos-honister/webos-ports/tmp-glibc/work/core2-64-webos-linux/qtwebengine/5.15.4+gitAUTOINC+dd7f7a9166_555f348ae8-r0/recipe-sysroot -MMD -MF obj/third_party/breakpad/client/exception_handler.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -DCR_SYSROOT_HASH=5f64b417e1018dcf8fcc81dc2714e0f264b9b911 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -I../../../../git/src/3rdparty/chromium/third_party/breakpad -I../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src -I../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client -I../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/third_party/linux/include -Igen -I../../../../git/src/3rdparty/chromium -I../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -m64 -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g1 -fvisibility=hidden -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-packed-not-aligned -Wno-dangling-else -Wno-missing-field-initializers -Wno-unused-parameter -std=gnu++14 -fno-exceptions -fno-rtti --sysroot=../../../../recipe-sysroot -fvisibility-inlines-hidden -Wno-narrowing -Wno-class-memaccess -Wno-attributes -Wno-class-memaccess -Wno-subobject-linkage -Wno-invalid-offsetof -Wno-return-type -Wno-deprecated-copy -c ../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc -o obj/third_party/breakpad/client/exception_handler.o +../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc: In function 'void google_breakpad::{anonymous}::InstallAlternateStackLocked()': +../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc:141:49: error: no matching function for call to 'max(int, long int)' + 141 | static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); + | ~~~~~~~~^~~~~~~~~~~~~~~~~ +In file included from ../../../../recipe-sysroot/usr/include/c++/11.2.0/bits/char_traits.h:39, + from ../../../../recipe-sysroot/usr/include/c++/11.2.0/string:40, + from ../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h:38, + from ../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc:66: +../../../../recipe-sysroot/usr/include/c++/11.2.0/bits/stl_algobase.h:254:5: note: candidate: 'template constexpr const _Tp& std::max(const _Tp&, const _Tp&)' + 254 | max(const _Tp& __a, const _Tp& __b) + | ^~~ +../../../../recipe-sysroot/usr/include/c++/11.2.0/bits/stl_algobase.h:254:5: note: template argument deduction/substitution failed: +../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc:141:49: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'long int') + 141 | static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); + | ~~~~~~~~^~~~~~~~~~~~~~~~~ +In file included from ../../../../recipe-sysroot/usr/include/c++/11.2.0/bits/char_traits.h:39, + from ../../../../recipe-sysroot/usr/include/c++/11.2.0/string:40, + from ../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h:38, + from ../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc:66: +../../../../recipe-sysroot/usr/include/c++/11.2.0/bits/stl_algobase.h:300:5: note: candidate: 'template constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)' + 300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp) + | ^~~ +../../../../recipe-sysroot/usr/include/c++/11.2.0/bits/stl_algobase.h:300:5: note: template argument deduction/substitution failed: +../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc:141:49: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'long int') + 141 | static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); + | ~~~~~~~~^~~~~~~~~~~~~~~~~ +In file included from ../../../../recipe-sysroot/usr/include/c++/11.2.0/algorithm:62, + from ../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc:85: +../../../../recipe-sysroot/usr/include/c++/11.2.0/bits/stl_algo.h:3461:5: note: candidate: 'template constexpr _Tp std::max(std::initializer_list<_Tp>)' + 3461 | max(initializer_list<_Tp> __l) + | ^~~ +../../../../recipe-sysroot/usr/include/c++/11.2.0/bits/stl_algo.h:3461:5: note: template argument deduction/substitution failed: +../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc:141:49: note: mismatched types 'std::initializer_list<_Tp>' and 'int' + 141 | static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); + | ~~~~~~~~^~~~~~~~~~~~~~~~~ +In file included from ../../../../recipe-sysroot/usr/include/c++/11.2.0/algorithm:62, + from ../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc:85: +../../../../recipe-sysroot/usr/include/c++/11.2.0/bits/stl_algo.h:3467:5: note: candidate: 'template constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)' + 3467 | max(initializer_list<_Tp> __l, _Compare __comp) + | ^~~ +../../../../recipe-sysroot/usr/include/c++/11.2.0/bits/stl_algo.h:3467:5: note: template argument deduction/substitution failed: +../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc:141:49: note: mismatched types 'std::initializer_list<_Tp>' and 'int' + 141 | static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); + | ~~~~~~~~^~~~~~~~~~~~~~~~~ + +Signed-off-by: Martin Jansa +--- + .../breakpad/src/client/linux/handler/exception_handler.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc b/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc +index ca353c40997..2e43ba6fc04 100644 +--- a/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc ++++ b/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc +@@ -138,7 +138,7 @@ void InstallAlternateStackLocked() { + // SIGSTKSZ may be too small to prevent the signal handlers from overrunning + // the alternative stack. Ensure that the size of the alternative stack is + // large enough. +- static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); ++ static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); + + // Only set an alternative stack if there isn't already one, or if the current + // one is too small. diff --git a/qt5-qtwebengine-5.15.7-chromium-glibc-2.34.patch b/qt5-qtwebengine-5.15.7-chromium-glibc-2.34.patch new file mode 100644 index 0000000..0b19200 --- /dev/null +++ b/qt5-qtwebengine-5.15.7-chromium-glibc-2.34.patch @@ -0,0 +1,13 @@ +diff --git a/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc b/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc +index 5d13bdbbbd1..150a43f2660 100644 +--- a/src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc ++++ b/src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc +@@ -135,7 +135,7 @@ static bool SetupAlternateStackOnce() { + #else + const size_t page_mask = sysconf(_SC_PAGESIZE) - 1; + #endif +- size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask; ++ size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask; + #if defined(ABSL_HAVE_ADDRESS_SANITIZER) || \ + defined(ABSL_HAVE_MEMORY_SANITIZER) || defined(ABSL_HAVE_THREAD_SANITIZER) + // Account for sanitizer instrumentation requiring additional stack space. diff --git a/qt5-qtwebengine-5.15.7-chromium-python3.patch b/qt5-qtwebengine-5.15.7-chromium-python3.patch new file mode 100644 index 0000000..225aa04 --- /dev/null +++ b/qt5-qtwebengine-5.15.7-chromium-python3.patch @@ -0,0 +1,1771 @@ +diff --git a/chromium/components/resources/protobufs/binary_proto_generator.py b/chromium/components/resources/protobufs/binary_proto_generator.py +index 7422ead9697..16365515f26 100755 +--- a/chromium/components/resources/protobufs/binary_proto_generator.py ++++ b/chromium/components/resources/protobufs/binary_proto_generator.py +@@ -7,7 +7,7 @@ + Converts a given ASCII proto into a binary resource. + + """ +- ++from __future__ import print_function + import abc + import imp + import optparse +@@ -196,12 +196,12 @@ class BinaryProtoGenerator: + self._ImportProtoModules(opts.path) + + if not self.VerifyArgs(opts): +- print "Wrong arguments" ++ print("Wrong arguments") + return 1 + + try: + self._GenerateBinaryProtos(opts) + except Exception as e: +- print "ERROR: Failed to render binary version of %s:\n %s\n%s" % ( +- opts.infile, str(e), traceback.format_exc()) ++ print("ERROR: Failed to render binary version of %s:\n %s\n%s" % ++ (opts.infile, str(e), traceback.format_exc())) + return 1 +diff --git a/chromium/content/browser/tracing/generate_trace_viewer_grd.py b/chromium/content/browser/tracing/generate_trace_viewer_grd.py +index 037f9497dc2..be393d21f90 100755 +--- a/chromium/content/browser/tracing/generate_trace_viewer_grd.py ++++ b/chromium/content/browser/tracing/generate_trace_viewer_grd.py +@@ -74,7 +74,7 @@ def main(argv): + for filename in parsed_args.source_files: + add_file_to_grd(doc, os.path.basename(filename)) + +- with open(parsed_args.output_filename, 'w') as output_file: ++ with open(parsed_args.output_filename, 'wb') as output_file: + output_file.write(doc.toxml(encoding='UTF-8')) + + +diff --git a/chromium/mojo/public/tools/bindings/BUILD.gn b/chromium/mojo/public/tools/bindings/BUILD.gn +index fc04b5dd0b1..708958e438b 100644 +--- a/chromium/mojo/public/tools/bindings/BUILD.gn ++++ b/chromium/mojo/public/tools/bindings/BUILD.gn +@@ -2,9 +2,11 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/python.gni") + import("//mojo/public/tools/bindings/mojom.gni") + import("//third_party/jinja2/jinja2.gni") + ++# TODO(crbug.com/1194274): Investigate nondeterminism in Py3 builds. + action("precompile_templates") { + sources = mojom_generator_sources + sources += [ +diff --git a/chromium/mojo/public/tools/bindings/gen_data_files_list.py b/chromium/mojo/public/tools/bindings/gen_data_files_list.py +index 79c9e50efce..8b78d092418 100644 +--- a/chromium/mojo/public/tools/bindings/gen_data_files_list.py ++++ b/chromium/mojo/public/tools/bindings/gen_data_files_list.py +@@ -18,7 +18,6 @@ import os + import re + import sys + +-from cStringIO import StringIO + from optparse import OptionParser + + sys.path.insert( +@@ -41,12 +40,9 @@ def main(): + pattern = re.compile(options.pattern) + files = [f for f in os.listdir(options.directory) if pattern.match(f)] + +- stream = StringIO() +- for f in files: +- print(f, file=stream) ++ contents = '\n'.join(f for f in files) + '\n' ++ WriteFile(contents, options.output) + +- WriteFile(stream.getvalue(), options.output) +- stream.close() + + if __name__ == '__main__': + sys.exit(main()) +diff --git a/chromium/mojo/public/tools/bindings/generators/mojom_java_generator.py b/chromium/mojo/public/tools/bindings/generators/mojom_java_generator.py +index 96b2fdfae0c..00b9dccd00c 100644 +--- a/chromium/mojo/public/tools/bindings/generators/mojom_java_generator.py ++++ b/chromium/mojo/public/tools/bindings/generators/mojom_java_generator.py +@@ -25,6 +25,10 @@ sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, + 'build', 'android', 'gyp')) + from util import build_utils + ++# TODO(crbug.com/1174969): Remove this once Python2 is obsoleted. ++if sys.version_info.major != 2: ++ basestring = str ++ long = int + + GENERATOR_PREFIX = 'java' + +diff --git a/chromium/mojo/public/tools/mojom/mojom/generate/generator.py b/chromium/mojo/public/tools/mojom/mojom/generate/generator.py +index de62260a5c9..4a1c73fcf82 100644 +--- a/chromium/mojo/public/tools/mojom/mojom/generate/generator.py ++++ b/chromium/mojo/public/tools/mojom/mojom/generate/generator.py +@@ -136,9 +136,14 @@ class Stylizer(object): + + def WriteFile(contents, full_path): + # If |contents| is same with the file content, we skip updating. ++ if not isinstance(contents, bytes): ++ data = contents.encode('utf8') ++ else: ++ data = contents ++ + if os.path.isfile(full_path): + with open(full_path, 'rb') as destination_file: +- if destination_file.read() == contents: ++ if destination_file.read() == data: + return + + # Make sure the containing directory exists. +@@ -146,11 +151,8 @@ def WriteFile(contents, full_path): + fileutil.EnsureDirectoryExists(full_dir) + + # Dump the data to disk. +- with open(full_path, "wb") as f: +- if not isinstance(contents, bytes): +- f.write(contents.encode('utf-8')) +- else: +- f.write(contents) ++ with open(full_path, 'wb') as f: ++ f.write(data) + + + def AddComputedData(module): +diff --git a/chromium/mojo/public/tools/mojom/mojom/generate/module.py b/chromium/mojo/public/tools/mojom/mojom/generate/module.py +index ebbc9b322ea..3d026429bbc 100644 +--- a/chromium/mojo/public/tools/mojom/mojom/generate/module.py ++++ b/chromium/mojo/public/tools/mojom/mojom/generate/module.py +@@ -398,7 +398,8 @@ class Field(object): + + + class StructField(Field): +- pass ++ def __hash__(self): ++ return super(Field, self).__hash__() + + + class UnionField(Field): +diff --git a/chromium/mojo/public/tools/mojom/mojom/generate/template_expander.py b/chromium/mojo/public/tools/mojom/mojom/generate/template_expander.py +index 7a300560246..8d9e26fb7f6 100644 +--- a/chromium/mojo/public/tools/mojom/mojom/generate/template_expander.py ++++ b/chromium/mojo/public/tools/mojom/mojom/generate/template_expander.py +@@ -75,9 +75,9 @@ def PrecompileTemplates(generator_modules, output_dir): + os.path.dirname(module.__file__), generator.GetTemplatePrefix()) + ])) + jinja_env.filters.update(generator.GetFilters()) +- jinja_env.compile_templates( +- os.path.join(output_dir, "%s.zip" % generator.GetTemplatePrefix()), +- extensions=["tmpl"], +- zip="stored", +- py_compile=True, +- ignore_errors=False) ++ jinja_env.compile_templates(os.path.join( ++ output_dir, "%s.zip" % generator.GetTemplatePrefix()), ++ extensions=["tmpl"], ++ zip="stored", ++ py_compile=sys.version_info.major < 3, ++ ignore_errors=False) +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/blink_v8_bridge.py b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/blink_v8_bridge.py +index 3225ecca6e4..fc078d31b55 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/blink_v8_bridge.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/blink_v8_bridge.py +@@ -344,7 +344,7 @@ def make_default_value_expr(idl_type, default_value): + """ + assert default_value.is_type_compatible_with(idl_type) + +- class DefaultValueExpr: ++ class DefaultValueExpr(object): + _ALLOWED_SYMBOLS_IN_DEPS = ("isolate") + + def __init__(self, initializer_expr, initializer_deps, +@@ -502,7 +502,7 @@ def make_v8_to_blink_value(blink_var_name, + assert isinstance(blink_var_name, str) + assert isinstance(v8_value_expr, str) + assert isinstance(idl_type, web_idl.IdlType) +- assert (argument_index is None or isinstance(argument_index, (int, long))) ++ assert (argument_index is None or isinstance(argument_index, int)) + assert (default_value is None + or isinstance(default_value, web_idl.LiteralConstant)) + +@@ -622,7 +622,7 @@ def make_v8_to_blink_value_variadic(blink_var_name, v8_array, + """ + assert isinstance(blink_var_name, str) + assert isinstance(v8_array, str) +- assert isinstance(v8_array_start_index, (int, long)) ++ assert isinstance(v8_array_start_index, int) + assert isinstance(idl_type, web_idl.IdlType) + + pattern = ("auto&& ${{{_1}}} = " +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/callback_interface.py b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/callback_interface.py +index 4a6df513068..8b51f23a409 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/callback_interface.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/callback_interface.py +@@ -177,7 +177,7 @@ def generate_callback_interface(callback_interface_identifier): + prop_install_mode=PropInstallMode.UNCONDITIONAL, + trampoline_var_name=None, + attribute_entries=[], +- constant_entries=filter(is_unconditional, constant_entries), ++ constant_entries=list(filter(is_unconditional, constant_entries)), + exposed_construct_entries=[], + operation_entries=[]) + (install_interface_template_decl, install_interface_template_def, +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/code_node.py b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/code_node.py +index 52972fefe20..e5ae9d9629e 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/code_node.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/code_node.py +@@ -503,13 +503,13 @@ class CompositeNode(CodeNode): + gensym_kwargs = {} + template_vars = {} + for arg in args: +- assert isinstance(arg, (CodeNode, int, long, str)) ++ assert isinstance(arg, (CodeNode, int, str)) + gensym = CodeNode.gensym() + gensym_args.append("${{{}}}".format(gensym)) + template_vars[gensym] = arg + for key, value in kwargs.items(): +- assert isinstance(key, (int, long, str)) +- assert isinstance(value, (CodeNode, int, long, str)) ++ assert isinstance(key, (int, str)) ++ assert isinstance(value, (CodeNode, int, str)) + gensym = CodeNode.gensym() + gensym_kwargs[key] = "${{{}}}".format(gensym) + template_vars[gensym] = value +@@ -602,7 +602,7 @@ class ListNode(CodeNode): + def insert(self, index, node): + if node is None: + return +- assert isinstance(index, (int, long)) ++ assert isinstance(index, int) + assert isinstance(node, CodeNode) + assert node.outer is None and node.prev is None + +@@ -721,7 +721,7 @@ class SymbolScopeNode(SequenceNode): + if not scope_chains: + return counts + +- self_index = iter(scope_chains).next().index(self) ++ self_index = next(iter(scope_chains)).index(self) + scope_chains = map( + lambda scope_chain: scope_chain[self_index + 1:], scope_chains) + scope_to_likeliness = {} +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_expr.py b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_expr.py +index a229a6c71c9..5fa288dabf2 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_expr.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_expr.py +@@ -109,7 +109,7 @@ def expr_and(terms): + + if any(term.is_always_false for term in terms): + return _Expr(False) +- terms = filter(lambda x: not x.is_always_true, terms) ++ terms = list(filter(lambda x: not x.is_always_true, terms)) + if not terms: + return _Expr(True) + if len(terms) == 1: +@@ -124,7 +124,7 @@ def expr_or(terms): + + if any(term.is_always_true for term in terms): + return _Expr(True) +- terms = filter(lambda x: not x.is_always_false, terms) ++ terms = list(filter(lambda x: not x.is_always_false, terms)) + if not terms: + return _Expr(False) + if len(terms) == 1: +@@ -222,7 +222,7 @@ def expr_from_exposure(exposure, + elif exposure.only_in_secure_contexts is False: + secure_context_term = _Expr(True) + else: +- terms = map(ref_enabled, exposure.only_in_secure_contexts) ++ terms = list(map(ref_enabled, exposure.only_in_secure_contexts)) + secure_context_term = expr_or( + [_Expr("${is_in_secure_context}"), + expr_not(expr_and(terms))]) +@@ -275,10 +275,11 @@ def expr_from_exposure(exposure, + + # [ContextEnabled] + if exposure.context_enabled_features: +- terms = map( +- lambda feature: _Expr( +- "${{context_feature_settings}}->is{}Enabled()".format( +- feature)), exposure.context_enabled_features) ++ terms = list( ++ map( ++ lambda feature: _Expr( ++ "${{context_feature_settings}}->is{}Enabled()".format( ++ feature)), exposure.context_enabled_features)) + context_enabled_terms.append( + expr_and([_Expr("${context_feature_settings}"), + expr_or(terms)])) +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_format.py b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_format.py +index 87d26eec3ca..f3e9d38247e 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_format.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_format.py +@@ -23,7 +23,7 @@ class _TemplateFormatter(string.Formatter): + self._template_formatter_indexing_count_ = 0 + + def get_value(self, key, args, kwargs): +- if isinstance(key, (int, long)): ++ if isinstance(key, int): + return args[key] + assert isinstance(key, str) + if not key: +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_utils.py b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_utils.py +index 2bcc4fed49a..e72282aa696 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_utils.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_utils.py +@@ -116,4 +116,4 @@ def write_code_node_to_file(code_node, filepath): + # 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) ++ web_idl.file_io.write_to_file_if_changed(filepath, rendered_text.encode('utf-8')) +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/dictionary.py b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/dictionary.py +index b39f0100410..4d68202296b 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/dictionary.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/dictionary.py +@@ -993,7 +993,7 @@ def make_dict_trace_func(cg_context): + _2 = _blink_member_name(member).value_var + return TextNode(_format(pattern, _1=_1, _2=_2)) + +- body.extend(map(make_trace_member_node, own_members)) ++ body.extend(list(map(make_trace_member_node, own_members))) + body.append(TextNode("BaseClass::Trace(visitor);")) + + return func_decl, func_def +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py +index 10ff30656ad..bfdf7128aac 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py +@@ -582,7 +582,7 @@ def _make_blink_api_call(code_node, + overriding_args=None): + assert isinstance(code_node, SymbolScopeNode) + assert isinstance(cg_context, CodeGenContext) +- assert num_of_args is None or isinstance(num_of_args, (int, long)) ++ assert num_of_args is None or isinstance(num_of_args, int) + assert (overriding_args is None + or (isinstance(overriding_args, (list, tuple)) + and all(isinstance(arg, str) for arg in overriding_args))) +@@ -1196,8 +1196,10 @@ def make_overload_dispatcher(cg_context): + did_use_break = did_use_break or can_fail + + conditional = expr_or( +- map(lambda item: expr_from_exposure(item.function_like.exposure), +- items)) ++ list( ++ map( ++ lambda item: expr_from_exposure(item.function_like.exposure ++ ), items))) + if not conditional.is_always_true: + node = CxxUnlikelyIfNode(cond=conditional, body=node) + +@@ -4642,7 +4644,7 @@ class _PropEntryConstructorGroup(_PropEntryBase): + def __init__(self, is_context_dependent, exposure_conditional, world, + constructor_group, ctor_callback_name, ctor_func_length): + assert isinstance(ctor_callback_name, str) +- assert isinstance(ctor_func_length, (int, long)) ++ assert isinstance(ctor_func_length, int) + + _PropEntryBase.__init__(self, is_context_dependent, + exposure_conditional, world, constructor_group) +@@ -4670,7 +4672,7 @@ class _PropEntryOperationGroup(_PropEntryBase): + op_func_length, + no_alloc_direct_callback_name=None): + assert isinstance(op_callback_name, str) +- assert isinstance(op_func_length, (int, long)) ++ assert isinstance(op_func_length, int) + + _PropEntryBase.__init__(self, is_context_dependent, + exposure_conditional, world, operation_group) +@@ -5175,9 +5177,9 @@ def make_install_interface_template(cg_context, function_name, class_name, api_c + ]) + + if class_like.identifier == "CSSStyleDeclaration": +- css_properties = filter( +- lambda attr: "CSSProperty" in attr.extended_attributes, +- class_like.attributes) ++ css_properties = list( ++ filter(lambda attr: "CSSProperty" in attr.extended_attributes, ++ class_like.attributes)) + if css_properties: + prop_name_list = "".join( + map(lambda attr: "\"{}\", ".format(attr.identifier), +@@ -5567,8 +5569,8 @@ ${instance_object} = ${v8_context}->Global()->GetPrototype().As();\ + "V8DOMConfiguration::InstallConstants(${isolate}, " + "${interface_template}, ${prototype_template}, " + "kConstantCallbackTable, base::size(kConstantCallbackTable));") +- constant_callback_entries = filter(lambda entry: entry.const_callback_name, +- constant_entries) ++ constant_callback_entries = list(filter(lambda entry: entry.const_callback_name, ++ constant_entries)) + install_properties(table_name, constant_callback_entries, + _make_constant_callback_registration_table, + installer_call_text) +@@ -5584,8 +5586,8 @@ ${instance_object} = ${v8_context}->Global()->GetPrototype().As();\ + "V8DOMConfiguration::InstallConstants(${isolate}, " + "${interface_template}, ${prototype_template}, " + "kConstantValueTable, base::size(kConstantValueTable));") +- constant_value_entries = filter( +- lambda entry: not entry.const_callback_name, constant_entries) ++ constant_value_entries = list(filter( ++ lambda entry: not entry.const_callback_name, constant_entries)) + install_properties(table_name, constant_value_entries, + _make_constant_value_registration_table, + installer_call_text) +@@ -6336,8 +6338,8 @@ def make_v8_context_snapshot_api(cg_context, component, attribute_entries, + assert isinstance(component, web_idl.Component) + + derived_interfaces = cg_context.interface.deriveds +- derived_names = map(lambda interface: interface.identifier, +- derived_interfaces) ++ derived_names = list( ++ map(lambda interface: interface.identifier, derived_interfaces)) + derived_names.append(cg_context.interface.identifier) + if not ("Window" in derived_names or "HTMLDocument" in derived_names): + return None, None +@@ -6411,9 +6413,11 @@ def _make_v8_context_snapshot_get_reference_table_function( + collect_callbacks(named_properties_object_callback_defs) + collect_callbacks(cross_origin_property_callback_defs) + +- entry_nodes = map( +- lambda name: TextNode("reinterpret_cast({}),".format(name)), +- filter(None, callback_names)) ++ entry_nodes = list( ++ map( ++ lambda name: TextNode("reinterpret_cast({}),".format(name ++ )), ++ filter(None, callback_names))) + table_node = ListNode([ + TextNode("using namespace ${class_name}Callbacks;"), + TextNode("static const intptr_t kReferenceTable[] = {"), +@@ -6451,10 +6455,11 @@ def _make_v8_context_snapshot_install_props_per_context_function( + class_name=None, + prop_install_mode=PropInstallMode.V8_CONTEXT_SNAPSHOT, + trampoline_var_name=None, +- attribute_entries=filter(selector, attribute_entries), +- constant_entries=filter(selector, constant_entries), +- exposed_construct_entries=filter(selector, exposed_construct_entries), +- operation_entries=filter(selector, operation_entries)) ++ attribute_entries=list(filter(selector, attribute_entries)), ++ constant_entries=list(filter(selector, constant_entries)), ++ exposed_construct_entries=list( ++ filter(selector, exposed_construct_entries)), ++ operation_entries=list(filter(selector, operation_entries))) + + return func_decl, func_def + +@@ -6810,11 +6815,11 @@ def generate_interface(interface_identifier): + class_name=impl_class_name, + prop_install_mode=PropInstallMode.UNCONDITIONAL, + trampoline_var_name=tp_install_unconditional_props, +- attribute_entries=filter(is_unconditional, attribute_entries), +- constant_entries=filter(is_unconditional, constant_entries), +- exposed_construct_entries=filter(is_unconditional, +- exposed_construct_entries), +- operation_entries=filter(is_unconditional, operation_entries)) ++ attribute_entries=list(filter(is_unconditional, attribute_entries)), ++ constant_entries=list(filter(is_unconditional, constant_entries)), ++ exposed_construct_entries=list( ++ filter(is_unconditional, exposed_construct_entries)), ++ operation_entries=list(filter(is_unconditional, operation_entries))) + (install_context_independent_props_decl, + install_context_independent_props_def, + install_context_independent_props_trampoline) = make_install_properties( +@@ -6823,11 +6828,14 @@ def generate_interface(interface_identifier): + class_name=impl_class_name, + prop_install_mode=PropInstallMode.CONTEXT_INDEPENDENT, + trampoline_var_name=tp_install_context_independent_props, +- attribute_entries=filter(is_context_independent, attribute_entries), +- constant_entries=filter(is_context_independent, constant_entries), +- exposed_construct_entries=filter(is_context_independent, +- exposed_construct_entries), +- operation_entries=filter(is_context_independent, operation_entries)) ++ attribute_entries=list( ++ filter(is_context_independent, attribute_entries)), ++ constant_entries=list(filter(is_context_independent, ++ constant_entries)), ++ exposed_construct_entries=list( ++ filter(is_context_independent, exposed_construct_entries)), ++ operation_entries=list( ++ filter(is_context_independent, operation_entries))) + (install_context_dependent_props_decl, install_context_dependent_props_def, + install_context_dependent_props_trampoline) = make_install_properties( + cg_context, +@@ -6835,11 +6843,13 @@ def generate_interface(interface_identifier): + class_name=impl_class_name, + prop_install_mode=PropInstallMode.CONTEXT_DEPENDENT, + trampoline_var_name=tp_install_context_dependent_props, +- attribute_entries=filter(is_context_dependent, attribute_entries), +- constant_entries=filter(is_context_dependent, constant_entries), +- exposed_construct_entries=filter(is_context_dependent, +- exposed_construct_entries), +- operation_entries=filter(is_context_dependent, operation_entries)) ++ attribute_entries=list(filter(is_context_dependent, ++ attribute_entries)), ++ constant_entries=list(filter(is_context_dependent, constant_entries)), ++ exposed_construct_entries=list( ++ filter(is_context_dependent, exposed_construct_entries)), ++ operation_entries=list(filter(is_context_dependent, ++ operation_entries))) + (install_interface_template_decl, install_interface_template_def, + install_interface_template_trampoline) = make_install_interface_template( + cg_context, +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/mako_renderer.py b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/mako_renderer.py +index b4c70553863..f3a2fcd772d 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/mako_renderer.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/mako_renderer.py +@@ -105,7 +105,7 @@ class MakoRenderer(object): + on_error = self._caller_stack_on_error + if (len(current) <= len(on_error) + and all(current[i] == on_error[i] +- for i in xrange(len(current)))): ++ for i in range(len(current)))): + pass # Error happened in a deeper caller. + else: + self._caller_stack_on_error = list(self._caller_stack) +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py +index dc3493cc394..017d3d47bb3 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py +@@ -70,8 +70,13 @@ def gn_format(contents, filename=None): + + + def _invoke_format_command(command_line, filename, contents): +- proc = subprocess.Popen( +- command_line, stdin=subprocess.PIPE, stdout=subprocess.PIPE) ++ kwargs = {} ++ if sys.version_info.major != 2: ++ kwargs['encoding'] = 'utf-8' ++ proc = subprocess.Popen(command_line, ++ stdin=subprocess.PIPE, ++ stdout=subprocess.PIPE, ++ **kwargs) + stdout_output, stderr_output = proc.communicate(input=contents) + exit_code = proc.wait() + +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/task_queue.py b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/task_queue.py +index 0d8f4c0f303..e666a9b668e 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/task_queue.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/task_queue.py +@@ -2,6 +2,7 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import functools + import multiprocessing + + from .package_initializer import package_initializer +@@ -76,7 +77,7 @@ class TaskQueue(object): + if not report_progress: + return + +- done_count = reduce( ++ done_count = functools.reduce( + lambda count, worker_task: count + bool(worker_task.ready()), + self._worker_tasks, 0) + report_progress(len(self._worker_tasks), done_count) +@@ -85,4 +86,4 @@ class TaskQueue(object): + def _task_queue_run_tasks(tasks): + for task in tasks: + func, args, kwargs = task +- apply(func, args, kwargs) ++ func(*args, **kwargs) +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/code_generator.py b/chromium/third_party/blink/renderer/bindings/scripts/code_generator.py +index e8280be7213..e49e6eb965e 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/code_generator.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/code_generator.py +@@ -13,6 +13,7 @@ import re + import sys + + from idl_types import set_ancestors, IdlType ++from itertools import groupby + from v8_globals import includes + from v8_interface import constant_filters + from v8_types import set_component_dirs +@@ -43,6 +44,7 @@ TEMPLATES_DIR = os.path.normpath( + # after path[0] == invoking script dir + sys.path.insert(1, THIRD_PARTY_DIR) + import jinja2 ++from jinja2.filters import make_attrgetter, environmentfilter + + + def generate_indented_conditional(code, conditional): +@@ -88,6 +90,13 @@ def runtime_enabled_if(code, name): + return generate_indented_conditional(code, function) + + ++@environmentfilter ++def do_stringify_key_group_by(environment, value, attribute): ++ expr = make_attrgetter(environment, attribute) ++ key = lambda item: '' if expr(item) is None else str(expr(item)) ++ return groupby(sorted(value, key=key), expr) ++ ++ + def initialize_jinja_env(cache_dir): + jinja_env = jinja2.Environment( + loader=jinja2.FileSystemLoader(TEMPLATES_DIR), +@@ -117,6 +126,7 @@ def initialize_jinja_env(cache_dir): + }) + jinja_env.filters.update(constant_filters()) + jinja_env.filters.update(method_filters()) ++ jinja_env.filters["stringifykeygroupby"] = do_stringify_key_group_by + return jinja_env + + +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/generate_origin_trial_features.py b/chromium/third_party/blink/renderer/bindings/scripts/generate_origin_trial_features.py +index 130004eae83..04c0fabcef2 100755 +--- a/chromium/third_party/blink/renderer/bindings/scripts/generate_origin_trial_features.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/generate_origin_trial_features.py +@@ -80,7 +80,7 @@ def read_idl_file(reader, idl_filename): + assert len(interfaces) == 1, ( + "Expected one interface in file %r, found %d" % + (idl_filename, len(interfaces))) +- return (interfaces.values()[0], includes) ++ return (list(interfaces.values())[0], includes) + + + def interface_is_global(interface): +@@ -281,7 +281,7 @@ def main(): + + info_provider = create_component_info_provider( + os.path.normpath(options.info_dir), options.target_component) +- idl_filenames = map(str.strip, open(options.idl_files_list)) ++ idl_filenames = list(map(str.strip, open(options.idl_files_list))) + + generate_origin_trial_features(info_provider, options, idl_filenames) + return 0 +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/idl_definitions.py b/chromium/third_party/blink/renderer/bindings/scripts/idl_definitions.py +index 14e6e9d3f87..b027818aef2 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/idl_definitions.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/idl_definitions.py +@@ -394,7 +394,8 @@ class IdlInterface(object): + else: + raise ValueError('Unrecognized node class: %s' % child_class) + +- if len(filter(None, [self.iterable, self.maplike, self.setlike])) > 1: ++ if len(list(filter(None, ++ [self.iterable, self.maplike, self.setlike]))) > 1: + raise ValueError( + 'Interface can only have one of iterable<>, maplike<> and setlike<>.' + ) +@@ -512,6 +513,9 @@ class IdlAttribute(TypedObject): + def accept(self, visitor): + visitor.visit_attribute(self) + ++ def __lt__(self, other): ++ return self.name < other.name ++ + + ################################################################################ + # Constants +@@ -852,7 +856,7 @@ class IdlIncludes(object): + ################################################################################ + + +-class Exposure: ++class Exposure(object): + """An Exposure holds one Exposed or RuntimeEnabled condition. + Each exposure has two properties: exposed and runtime_enabled. + Exposure(e, r) corresponds to [Exposed(e r)]. Exposure(e) corresponds to +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/idl_reader.py b/chromium/third_party/blink/renderer/bindings/scripts/idl_reader.py +index 8d72865a6ca..b80eebdcd61 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/idl_reader.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/idl_reader.py +@@ -55,8 +55,8 @@ def validate_blink_idl_definitions(idl_filename, idl_file_basename, + definitions. There is no filename convention in this case. + - Otherwise, an IDL file is invalid. + """ +- targets = ( +- definitions.interfaces.values() + definitions.dictionaries.values()) ++ targets = (list(definitions.interfaces.values()) + ++ list(definitions.dictionaries.values())) + number_of_targets = len(targets) + if number_of_targets > 1: + raise Exception( +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/idl_types.py b/chromium/third_party/blink/renderer/bindings/scripts/idl_types.py +index cd4f0c3513b..ab95e9c0b08 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/idl_types.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/idl_types.py +@@ -349,7 +349,7 @@ class IdlUnionType(IdlTypeBase): + return True + + def single_matching_member_type(self, predicate): +- matching_types = filter(predicate, self.flattened_member_types) ++ matching_types = list(filter(predicate, self.flattened_member_types)) + if len(matching_types) > 1: + raise ValueError('%s is ambiguous.' % self.name) + return matching_types[0] if matching_types else None +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/utilities.py b/chromium/third_party/blink/renderer/bindings/scripts/utilities.py +index e1677ee7bd6..3c5006f064f 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/utilities.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/utilities.py +@@ -196,8 +196,9 @@ class ComponentInfoProviderModules(ComponentInfoProvider): + + @property + def callback_functions(self): +- return dict(self._component_info_core['callback_functions'].items() + +- self._component_info_modules['callback_functions'].items()) ++ return dict( ++ list(self._component_info_core['callback_functions'].items()) + ++ list(self._component_info_modules['callback_functions'].items())) + + @property + def specifier_for_export(self): +@@ -209,8 +210,8 @@ class ComponentInfoProviderModules(ComponentInfoProvider): + + + def load_interfaces_info_overall_pickle(info_dir): +- with open(os.path.join(info_dir, +- 'interfaces_info.pickle')) as interface_info_file: ++ with open(os.path.join(info_dir, 'interfaces_info.pickle'), ++ mode='rb') as interface_info_file: + return pickle.load(interface_info_file) + + +@@ -236,23 +237,20 @@ def merge_dict_recursively(target, diff): + + def create_component_info_provider_core(info_dir): + interfaces_info = load_interfaces_info_overall_pickle(info_dir) +- with open( +- os.path.join(info_dir, 'core', +- 'component_info_core.pickle')) as component_info_file: ++ with open(os.path.join(info_dir, 'core', 'component_info_core.pickle'), ++ mode='rb') as component_info_file: + component_info = pickle.load(component_info_file) + return ComponentInfoProviderCore(interfaces_info, component_info) + + + def create_component_info_provider_modules(info_dir): + interfaces_info = load_interfaces_info_overall_pickle(info_dir) +- with open( +- os.path.join(info_dir, 'core', +- 'component_info_core.pickle')) as component_info_file: ++ with open(os.path.join(info_dir, 'core', 'component_info_core.pickle'), ++ mode='rb') as component_info_file: + component_info_core = pickle.load(component_info_file) +- with open( +- os.path.join( +- info_dir, 'modules', +- 'component_info_modules.pickle')) as component_info_file: ++ with open(os.path.join(info_dir, 'modules', ++ 'component_info_modules.pickle'), ++ mode='rb') as component_info_file: + component_info_modules = pickle.load(component_info_file) + return ComponentInfoProviderModules(interfaces_info, component_info_core, + component_info_modules) +@@ -356,7 +354,7 @@ def write_pickle_file(pickle_filename, data): + pickle_filename = abs(pickle_filename) + # If |data| is same with the file content, we skip updating. + if os.path.isfile(pickle_filename): +- with open(pickle_filename) as pickle_file: ++ with open(pickle_filename, 'rb') as pickle_file: + try: + if pickle.load(pickle_file) == data: + return +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/v8_interface.py b/chromium/third_party/blink/renderer/bindings/scripts/v8_interface.py +index a43260414db..a85b03abe75 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/v8_interface.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/v8_interface.py +@@ -189,7 +189,7 @@ def context_enabled_features(attributes): + return sorted([ + member for member in members + if member.get(KEY) and not member.get('exposed_test') +- ]) ++ ], key=lambda item: item['name']) + + def member_filter_by_name(members, name): + return [member for member in members if member[KEY] == name] +@@ -612,7 +612,8 @@ def interface_context(interface, interfaces, component_info): + sorted( + origin_trial_features(interface, context['constants'], + context['attributes'], context['methods']) + +- context_enabled_features(context['attributes'])), ++ context_enabled_features(context['attributes']), ++ key=lambda item: item['name']), + }) + if context['optional_features']: + includes.add('platform/bindings/v8_per_context_data.h') +@@ -1356,9 +1357,9 @@ def resolution_tests_methods(effective_overloads): + + # Extract argument and IDL type to simplify accessing these in each loop. + arguments = [method['arguments'][index] for method in methods] +- arguments_methods = zip(arguments, methods) ++ arguments_methods = list(zip(arguments, methods)) + idl_types = [argument['idl_type_object'] for argument in arguments] +- idl_types_methods = zip(idl_types, methods) ++ idl_types_methods = list(zip(idl_types, methods)) + + # We can’t do a single loop through all methods or simply sort them, because + # a method may be listed in multiple steps of the resolution algorithm, and +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/v8_methods.py b/chromium/third_party/blink/renderer/bindings/scripts/v8_methods.py +index 5f1f89a3def..6ee8a407798 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/v8_methods.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/v8_methods.py +@@ -46,6 +46,10 @@ import v8_types + import v8_utilities + from v8_utilities import (has_extended_attribute_value, is_unforgeable) + ++# TODO: Remove this once Python2 is obsoleted. ++if sys.version_info.major != 2: ++ basestring = str ++ + + def method_is_visible(method, interface_is_partial): + if 'overloads' in method: +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/v8_utilities.py b/chromium/third_party/blink/renderer/bindings/scripts/v8_utilities.py +index 2ecd6923320..fcfc48371b1 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/v8_utilities.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/v8_utilities.py +@@ -271,7 +271,7 @@ EXPOSED_WORKERS = set([ + ]) + + +-class ExposureSet: ++class ExposureSet(object): + """An ExposureSet is a collection of Exposure instructions.""" + + def __init__(self, exposures=None): +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/web_idl/callback_interface.py b/chromium/third_party/blink/renderer/bindings/scripts/web_idl/callback_interface.py +index 13fb7c7068d..b73b7710687 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/web_idl/callback_interface.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/web_idl/callback_interface.py +@@ -91,11 +91,13 @@ class CallbackInterface(UserDefinedType, WithExtendedAttributes, + for operation_ir in ir.operations + ]) + self._operation_groups = tuple([ +- OperationGroup( +- operation_group_ir, +- filter(lambda x: x.identifier == operation_group_ir.identifier, +- self._operations), +- owner=self) for operation_group_ir in ir.operation_groups ++ OperationGroup(operation_group_ir, ++ list( ++ filter( ++ lambda x: x.identifier == operation_group_ir ++ .identifier, self._operations)), ++ owner=self) ++ for operation_group_ir in ir.operation_groups + ]) + + @property +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/web_idl/database.py b/chromium/third_party/blink/renderer/bindings/scripts/web_idl/database.py +index c92cf48eb2a..f5d59129449 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/web_idl/database.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/web_idl/database.py +@@ -156,4 +156,4 @@ class Database(object): + return self._view_by_kind(Database._Kind.UNION) + + def _view_by_kind(self, kind): +- return self._impl.find_by_kind(kind).values() ++ return list(self._impl.find_by_kind(kind).values()) +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/web_idl/exposure.py b/chromium/third_party/blink/renderer/bindings/scripts/web_idl/exposure.py +index abaeef39c30..e36cf7439ae 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/web_idl/exposure.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/web_idl/exposure.py +@@ -8,8 +8,11 @@ from .runtime_enabled_features import RuntimeEnabledFeatures + class _Feature(str): + """Represents a runtime-enabled feature.""" + ++ def __new__(cls, value): ++ return str.__new__(cls, value) ++ + def __init__(self, value): +- str.__init__(self, value) ++ str.__init__(self) + self._is_context_dependent = ( + RuntimeEnabledFeatures.is_context_dependent(self)) + +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/web_idl/function_like.py b/chromium/third_party/blink/renderer/bindings/scripts/web_idl/function_like.py +index 648c70d803d..1712f19c672 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/web_idl/function_like.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/web_idl/function_like.py +@@ -71,8 +71,9 @@ class FunctionLike(WithIdentifier): + def num_of_required_arguments(self): + """Returns the number of required arguments.""" + return len( +- filter(lambda arg: not (arg.is_optional or arg.is_variadic), +- self.arguments)) ++ list( ++ filter(lambda arg: not (arg.is_optional or arg.is_variadic), ++ self.arguments))) + + + class OverloadGroup(WithIdentifier): +@@ -171,8 +172,7 @@ class OverloadGroup(WithIdentifier): + Returns the effective overload set. + https://heycam.github.io/webidl/#compute-the-effective-overload-set + """ +- assert argument_count is None or isinstance(argument_count, +- (int, long)) ++ assert argument_count is None or isinstance(argument_count, int) + + N = argument_count + S = [] +@@ -188,21 +188,21 @@ class OverloadGroup(WithIdentifier): + + S.append( + OverloadGroup.EffectiveOverloadItem( +- X, map(lambda arg: arg.idl_type, X.arguments), +- map(lambda arg: arg.optionality, X.arguments))) ++ X, list(map(lambda arg: arg.idl_type, X.arguments)), ++ list(map(lambda arg: arg.optionality, X.arguments)))) + + if X.is_variadic: +- for i in xrange(n, max(maxarg, N)): +- t = map(lambda arg: arg.idl_type, X.arguments) +- o = map(lambda arg: arg.optionality, X.arguments) +- for _ in xrange(n, i + 1): ++ for i in range(n, max(maxarg, N)): ++ t = list(map(lambda arg: arg.idl_type, X.arguments)) ++ o = list(map(lambda arg: arg.optionality, X.arguments)) ++ for _ in range(n, i + 1): + t.append(X.arguments[-1].idl_type) + o.append(X.arguments[-1].optionality) + S.append(OverloadGroup.EffectiveOverloadItem(X, t, o)) + +- t = map(lambda arg: arg.idl_type, X.arguments) +- o = map(lambda arg: arg.optionality, X.arguments) +- for i in xrange(n - 1, -1, -1): ++ t = list(map(lambda arg: arg.idl_type, X.arguments)) ++ o = list(map(lambda arg: arg.optionality, X.arguments)) ++ for i in range(n - 1, -1, -1): + if X.arguments[i].optionality == IdlType.Optionality.REQUIRED: + break + S.append(OverloadGroup.EffectiveOverloadItem(X, t[:i], o[:i])) +@@ -222,7 +222,7 @@ class OverloadGroup(WithIdentifier): + for item in items) + assert len(items) > 1 + +- for index in xrange(len(items[0].type_list)): ++ for index in range(len(items[0].type_list)): + # Assume that the given items are valid, and we only need to test + # the two types. + if OverloadGroup.are_distinguishable_types( +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/web_idl/idl_compiler.py b/chromium/third_party/blink/renderer/bindings/scripts/web_idl/idl_compiler.py +index c5ee2bd8a3d..58315072480 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/web_idl/idl_compiler.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/web_idl/idl_compiler.py +@@ -149,8 +149,8 @@ class IdlCompiler(object): + for old_ir in old_irs: + new_ir = make_copy(old_ir) + self._ir_map.add(new_ir) +- new_ir.attributes = filter(not_disabled, new_ir.attributes) +- new_ir.operations = filter(not_disabled, new_ir.operations) ++ new_ir.attributes = list(filter(not_disabled, new_ir.attributes)) ++ new_ir.operations = list(filter(not_disabled, new_ir.operations)) + + def _record_defined_in_partial_and_mixin(self): + old_irs = self._ir_map.irs_of_kinds( +@@ -231,7 +231,7 @@ class IdlCompiler(object): + only_to_members_of_partial_or_mixin=False) + propagate_to_exposure(propagate) + +- map(process_member_like, ir.iter_all_members()) ++ list(map(process_member_like, ir.iter_all_members())) + + def process_member_like(ir): + propagate = functools.partial(propagate_extattr, ir=ir) +@@ -257,7 +257,7 @@ class IdlCompiler(object): + + self._ir_map.move_to_new_phase() + +- map(process_interface_like, old_irs) ++ list(map(process_interface_like, old_irs)) + + def _determine_blink_headers(self): + irs = self._ir_map.irs_of_kinds( +@@ -422,9 +422,9 @@ class IdlCompiler(object): + assert not new_interface.deriveds + derived_set = identifier_to_derived_set.get( + new_interface.identifier, set()) +- new_interface.deriveds = map( +- lambda id_: self._ref_to_idl_def_factory.create(id_), +- sorted(derived_set)) ++ new_interface.deriveds = list( ++ map(lambda id_: self._ref_to_idl_def_factory.create(id_), ++ sorted(derived_set))) + + def _supplement_missing_html_constructor_operation(self): + # Temporary mitigation of misuse of [HTMLConstructor] +@@ -553,7 +553,8 @@ class IdlCompiler(object): + self._ir_map.add(new_ir) + + for group in new_ir.iter_all_overload_groups(): +- exposures = map(lambda overload: overload.exposure, group) ++ exposures = list(map(lambda overload: overload.exposure, ++ group)) + + # [Exposed] + if any(not exposure.global_names_and_features +@@ -653,8 +654,8 @@ class IdlCompiler(object): + constructs = set() + for global_name in global_names: + constructs.update(exposed_map.get(global_name, [])) +- new_ir.exposed_constructs = map( +- self._ref_to_idl_def_factory.create, sorted(constructs)) ++ new_ir.exposed_constructs = list( ++ map(self._ref_to_idl_def_factory.create, sorted(constructs))) + + assert not new_ir.legacy_window_aliases + if new_ir.identifier != 'Window': +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/web_idl/interface.py b/chromium/third_party/blink/renderer/bindings/scripts/web_idl/interface.py +index 65d24e529d1..067ef2eb0b2 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/web_idl/interface.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/web_idl/interface.py +@@ -180,8 +180,9 @@ class Interface(UserDefinedType, WithExtendedAttributes, WithCodeGeneratorInfo, + self._constructor_groups = tuple([ + ConstructorGroup( + group_ir, +- filter(lambda x: x.identifier == group_ir.identifier, +- self._constructors), ++ list( ++ filter(lambda x: x.identifier == group_ir.identifier, ++ self._constructors)), + owner=self) for group_ir in ir.constructor_groups + ]) + assert len(self._constructor_groups) <= 1 +@@ -192,8 +193,9 @@ class Interface(UserDefinedType, WithExtendedAttributes, WithCodeGeneratorInfo, + self._named_constructor_groups = tuple([ + ConstructorGroup( + group_ir, +- filter(lambda x: x.identifier == group_ir.identifier, +- self._named_constructors), ++ list( ++ filter(lambda x: x.identifier == group_ir.identifier, ++ self._named_constructors)), + owner=self) for group_ir in ir.named_constructor_groups + ]) + self._operations = tuple([ +@@ -203,22 +205,23 @@ class Interface(UserDefinedType, WithExtendedAttributes, WithCodeGeneratorInfo, + self._operation_groups = tuple([ + OperationGroup( + group_ir, +- filter(lambda x: x.identifier == group_ir.identifier, +- self._operations), ++ list( ++ filter(lambda x: x.identifier == group_ir.identifier, ++ self._operations)), + owner=self) for group_ir in ir.operation_groups + ]) + self._exposed_constructs = tuple(ir.exposed_constructs) + self._legacy_window_aliases = tuple(ir.legacy_window_aliases) + self._indexed_and_named_properties = None +- indexed_and_named_property_operations = filter( +- lambda x: x.is_indexed_or_named_property_operation, +- self._operations) ++ indexed_and_named_property_operations = list( ++ filter(lambda x: x.is_indexed_or_named_property_operation, ++ self._operations)) + if indexed_and_named_property_operations: + self._indexed_and_named_properties = IndexedAndNamedProperties( + indexed_and_named_property_operations, owner=self) + self._stringifier = None +- stringifier_operation_irs = filter(lambda x: x.is_stringifier, +- ir.operations) ++ stringifier_operation_irs = list( ++ filter(lambda x: x.is_stringifier, ir.operations)) + if stringifier_operation_irs: + assert len(stringifier_operation_irs) == 1 + op_ir = make_copy(stringifier_operation_irs[0]) +@@ -231,8 +234,9 @@ class Interface(UserDefinedType, WithExtendedAttributes, WithCodeGeneratorInfo, + attribute = None + if operation.stringifier_attribute: + attr_id = operation.stringifier_attribute +- attributes = filter(lambda x: x.identifier == attr_id, +- self._attributes) ++ attributes = list( ++ filter(lambda x: x.identifier == attr_id, ++ self._attributes)) + assert len(attributes) == 1 + attribute = attributes[0] + self._stringifier = Stringifier(operation, attribute, owner=self) +@@ -578,8 +582,9 @@ class Iterable(WithDebugInfo): + self._operation_groups = tuple([ + OperationGroup( + group_ir, +- filter(lambda x: x.identifier == group_ir.identifier, +- self._operations), ++ list( ++ filter(lambda x: x.identifier == group_ir.identifier, ++ self._operations)), + owner=owner) for group_ir in ir.operation_groups + ]) + +@@ -666,8 +671,9 @@ class Maplike(WithDebugInfo): + self._operation_groups = tuple([ + OperationGroup( + group_ir, +- filter(lambda x: x.identifier == group_ir.identifier, +- self._operations), ++ list( ++ filter(lambda x: x.identifier == group_ir.identifier, ++ self._operations)), + owner=owner) for group_ir in ir.operation_groups + ]) + +@@ -755,8 +761,9 @@ class Setlike(WithDebugInfo): + self._operation_groups = tuple([ + OperationGroup( + group_ir, +- filter(lambda x: x.identifier == group_ir.identifier, +- self._operations), ++ list( ++ filter(lambda x: x.identifier == group_ir.identifier, ++ self._operations)), + owner=owner) for group_ir in ir.operation_groups + ]) + +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/web_idl/ir_builder.py b/chromium/third_party/blink/renderer/bindings/scripts/web_idl/ir_builder.py +index e9aeff4ab82..d80554d603e 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/web_idl/ir_builder.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/web_idl/ir_builder.py +@@ -2,6 +2,8 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import sys ++ + from .argument import Argument + from .ast_group import AstGroup + from .attribute import Attribute +@@ -30,6 +32,11 @@ from .operation import Operation + from .typedef import Typedef + + ++# TODO: Remove this once Python2 is obsoleted. ++if sys.version_info.major != 2: ++ long = int ++ ++ + def load_and_register_idl_definitions(filepaths, register_ir, + create_ref_to_idl_def, idl_type_factory): + """ +@@ -160,7 +167,7 @@ class _IRBuilder(object): + child_nodes = list(node.GetChildren()) + extended_attributes = self._take_extended_attributes(child_nodes) + +- members = map(self._build_interface_member, child_nodes) ++ members = list(map(self._build_interface_member, child_nodes)) + attributes = [] + constants = [] + operations = [] +@@ -302,7 +309,7 @@ class _IRBuilder(object): + child_nodes = list(node.GetChildren()) + inherited = self._take_inheritance(child_nodes) + extended_attributes = self._take_extended_attributes(child_nodes) +- own_members = map(self._build_dictionary_member, child_nodes) ++ own_members = list(map(self._build_dictionary_member, child_nodes)) + + return Dictionary.IR( + identifier=Identifier(node.GetName()), +@@ -336,7 +343,7 @@ class _IRBuilder(object): + + child_nodes = list(node.GetChildren()) + extended_attributes = self._take_extended_attributes(child_nodes) +- members = map(self._build_interface_member, child_nodes) ++ members = list(map(self._build_interface_member, child_nodes)) + constants = [] + operations = [] + for member in members: +@@ -456,8 +463,8 @@ class _IRBuilder(object): + assert len(child_nodes) == 1 + child = child_nodes[0] + if child.GetClass() == 'Arguments': +- arguments = map(build_extattr_argument, +- child.GetChildren()) ++ arguments = list( ++ map(build_extattr_argument, child.GetChildren())) + elif child.GetClass() == 'Call': + assert len(child.GetChildren()) == 1 + grand_child = child.GetChildren()[0] +@@ -486,7 +493,9 @@ class _IRBuilder(object): + + assert node.GetClass() == 'ExtAttributes' + return ExtendedAttributes( +- filter(None, map(build_extended_attribute, node.GetChildren()))) ++ list( ++ filter(None, map(build_extended_attribute, ++ node.GetChildren())))) + + def _build_inheritance(self, node): + assert node.GetClass() == 'Inherit' +@@ -506,7 +515,7 @@ class _IRBuilder(object): + + def _build_iterable(self, node): + assert node.GetClass() == 'Iterable' +- types = map(self._build_type, node.GetChildren()) ++ types = list(map(self._build_type, node.GetChildren())) + assert len(types) == 1 or len(types) == 2 + if len(types) == 1: # value iterator + key_type, value_type = (None, types[0]) +@@ -584,7 +593,7 @@ class _IRBuilder(object): + def _build_maplike(self, node, interface_identifier): + assert node.GetClass() == 'Maplike' + assert isinstance(interface_identifier, Identifier) +- types = map(self._build_type, node.GetChildren()) ++ types = list(map(self._build_type, node.GetChildren())) + assert len(types) == 2 + key_type, value_type = types + is_readonly = bool(node.GetProperty('READONLY')) +@@ -676,7 +685,7 @@ class _IRBuilder(object): + def _build_setlike(self, node, interface_identifier): + assert node.GetClass() == 'Setlike' + assert isinstance(interface_identifier, Identifier) +- types = map(self._build_type, node.GetChildren()) ++ types = list(map(self._build_type, node.GetChildren())) + assert len(types) == 1 + value_type = types[0] + is_readonly = bool(node.GetProperty('READONLY')) +@@ -838,7 +847,7 @@ class _IRBuilder(object): + + def build_union_type(node, extended_attributes): + return self._idl_type_factory.union_type( +- member_types=map(self._build_type, node.GetChildren()), ++ member_types=list(map(self._build_type, node.GetChildren())), + is_optional=is_optional, + extended_attributes=extended_attributes, + debug_info=self._build_debug_info(node)) +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/web_idl/make_copy.py b/chromium/third_party/blink/renderer/bindings/scripts/web_idl/make_copy.py +index a7a2b11f3f0..2f6b61300ff 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/web_idl/make_copy.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/web_idl/make_copy.py +@@ -3,6 +3,13 @@ + # found in the LICENSE file. + + ++import sys ++ ++# TODO: Remove this once Python2 is obsoleted. ++if sys.version_info.major != 2: ++ long = int ++ basestring = str ++ + def make_copy(obj, memo=None): + """ + Creates a copy of the given object, which should be an IR or part of IR. +diff --git a/chromium/third_party/blink/renderer/bindings/scripts/web_idl/namespace.py b/chromium/third_party/blink/renderer/bindings/scripts/web_idl/namespace.py +index eeabef97cbe..bd7e98907f3 100644 +--- a/chromium/third_party/blink/renderer/bindings/scripts/web_idl/namespace.py ++++ b/chromium/third_party/blink/renderer/bindings/scripts/web_idl/namespace.py +@@ -107,11 +107,13 @@ class Namespace(UserDefinedType, WithExtendedAttributes, WithCodeGeneratorInfo, + for operation_ir in ir.operations + ]) + self._operation_groups = tuple([ +- OperationGroup( +- operation_group_ir, +- filter(lambda x: x.identifier == operation_group_ir.identifier, +- self._operations), +- owner=self) for operation_group_ir in ir.operation_groups ++ OperationGroup(operation_group_ir, ++ list( ++ filter( ++ lambda x: x.identifier == operation_group_ir ++ .identifier, self._operations)), ++ owner=self) ++ for operation_group_ir in ir.operation_groups + ]) + + @property +diff --git a/chromium/third_party/blink/renderer/bindings/templates/dictionary_v8.cc.tmpl b/chromium/third_party/blink/renderer/bindings/templates/dictionary_v8.cc.tmpl +index 0add9c45a38..dc910f6d227 100644 +--- a/chromium/third_party/blink/renderer/bindings/templates/dictionary_v8.cc.tmpl ++++ b/chromium/third_party/blink/renderer/bindings/templates/dictionary_v8.cc.tmpl +@@ -59,9 +59,9 @@ void {{v8_class}}::ToImpl(v8::Isolate* isolate, v8::Local v8_value, { + DCHECK(executionContext); + {% endif %}{# has_origin_trial_members #} + {% endif %}{# members #} +- {% for origin_trial_test, origin_trial_member_list in members | groupby('origin_trial_feature_name') %} ++ {% for origin_trial_test, origin_trial_member_list in members | stringifykeygroupby('origin_trial_feature_name') %} + {% filter origin_trial_enabled(origin_trial_test, "executionContext") %} +- {% for feature_name, member_list in origin_trial_member_list | groupby('runtime_enabled_feature_name') %} ++ {% for feature_name, member_list in origin_trial_member_list | stringifykeygroupby('runtime_enabled_feature_name') %} + {% filter runtime_enabled(feature_name) %} + {% for member in member_list %} + v8::Local {{member.v8_value}}; +@@ -147,9 +147,9 @@ bool toV8{{cpp_class}}(const {{cpp_class}}* impl, v8::Local dictiona + DCHECK(executionContext); + {% endif %}{# has_origin_trial_members #} + {% endif %}{# members #} +- {% for origin_trial_test, origin_trial_member_list in members | groupby('origin_trial_feature_name') %} ++ {% for origin_trial_test, origin_trial_member_list in members | stringifykeygroupby('origin_trial_feature_name') %} + {% filter origin_trial_enabled(origin_trial_test, "executionContext") %} +- {% for feature_name, member_list in origin_trial_member_list | groupby('runtime_enabled_feature_name') %} ++ {% for feature_name, member_list in origin_trial_member_list | stringifykeygroupby('runtime_enabled_feature_name') %} + {% filter runtime_enabled(feature_name) %} + {% for member in member_list %} + v8::Local {{member.v8_value}}; +diff --git a/chromium/third_party/blink/renderer/build/scripts/core/css/make_style_shorthands.py b/chromium/third_party/blink/renderer/build/scripts/core/css/make_style_shorthands.py +index 1799cd5a153..5f43ffabc26 100755 +--- a/chromium/third_party/blink/renderer/build/scripts/core/css/make_style_shorthands.py ++++ b/chromium/third_party/blink/renderer/build/scripts/core/css/make_style_shorthands.py +@@ -71,7 +71,7 @@ class Expansion(object): + def enabled_longhands(self): + include = lambda longhand: not longhand[ + 'runtime_flag'] or self.is_enabled(longhand['runtime_flag']) +- return filter(include, self._longhands) ++ return list(filter(include, self._longhands)) + + @property + def index(self): +@@ -87,8 +87,9 @@ class Expansion(object): + + def create_expansions(longhands): + flags = collect_runtime_flags(longhands) +- expansions = map(lambda mask: Expansion(longhands, flags, mask), +- range(1 << len(flags))) ++ expansions = list( ++ map(lambda mask: Expansion(longhands, flags, mask), ++ range(1 << len(flags)))) + assert len(expansions) > 0 + # We generate 2^N expansions for N flags, so enforce some limit. + assert len(flags) <= 4, 'Too many runtime flags for a single shorthand' +@@ -114,14 +115,14 @@ class StylePropertyShorthandWriter(json5_generator.Writer): + + self._longhand_dictionary = defaultdict(list) + for property_ in json5_properties.shorthands: +- property_['longhand_enum_keys'] = map(enum_key_for_css_property, +- property_['longhands']) +- property_['longhand_property_ids'] = map(id_for_css_property, +- property_['longhands']) +- +- longhands = map( +- lambda name: json5_properties.properties_by_name[name], +- property_['longhands']) ++ property_['longhand_enum_keys'] = list( ++ map(enum_key_for_css_property, property_['longhands'])) ++ property_['longhand_property_ids'] = list( ++ map(id_for_css_property, property_['longhands'])) ++ ++ longhands = list( ++ map(lambda name: json5_properties.properties_by_name[name], ++ property_['longhands'])) + property_['expansions'] = create_expansions(longhands) + for longhand_enum_key in property_['longhand_enum_keys']: + self._longhand_dictionary[longhand_enum_key].append(property_) +diff --git a/chromium/third_party/blink/renderer/build/scripts/core/css/properties/make_css_property_instances.py b/chromium/third_party/blink/renderer/build/scripts/core/css/properties/make_css_property_instances.py +index 75030ac577e..f72aadee17d 100755 +--- a/chromium/third_party/blink/renderer/build/scripts/core/css/properties/make_css_property_instances.py ++++ b/chromium/third_party/blink/renderer/build/scripts/core/css/properties/make_css_property_instances.py +@@ -42,8 +42,8 @@ class CSSPropertyInstancesWriter(json5_generator.Writer): + aliases = self._css_properties.aliases + + # Lists of PropertyClassData. +- self._property_classes_by_id = map(self.get_class, properties) +- self._alias_classes_by_id = map(self.get_class, aliases) ++ self._property_classes_by_id = list(map(self.get_class, properties)) ++ self._alias_classes_by_id = list(map(self.get_class, aliases)) + + # Sort by enum value. + self._property_classes_by_id.sort(key=lambda t: t.enum_value) +diff --git a/chromium/third_party/blink/renderer/build/scripts/gperf.py b/chromium/third_party/blink/renderer/build/scripts/gperf.py +index 5ee49056be4..db72660d471 100644 +--- a/chromium/third_party/blink/renderer/build/scripts/gperf.py ++++ b/chromium/third_party/blink/renderer/build/scripts/gperf.py +@@ -95,7 +95,7 @@ def main(): + + open(args.output_file, 'wb').write( + generate_gperf(gperf_path, +- open(infile).read(), gperf_args)) ++ open(infile).read(), gperf_args).encode('utf-8')) + + + if __name__ == '__main__': +diff --git a/chromium/third_party/blink/renderer/build/scripts/in_file.py b/chromium/third_party/blink/renderer/build/scripts/in_file.py +index 28adc050f1e..58113483e57 100644 +--- a/chromium/third_party/blink/renderer/build/scripts/in_file.py ++++ b/chromium/third_party/blink/renderer/build/scripts/in_file.py +@@ -66,7 +66,7 @@ class InFile(object): + self._defaults = defaults + self._valid_values = copy.deepcopy( + valid_values if valid_values else {}) +- self._parse(map(str.strip, lines)) ++ self._parse(list(map(str.strip, lines))) + + @classmethod + def load_from_files(self, file_paths, defaults, valid_values, +diff --git a/chromium/third_party/blink/renderer/build/scripts/in_generator.py b/chromium/third_party/blink/renderer/build/scripts/in_generator.py +index e46740a2e85..ab1981ad1e3 100644 +--- a/chromium/third_party/blink/renderer/build/scripts/in_generator.py ++++ b/chromium/third_party/blink/renderer/build/scripts/in_generator.py +@@ -32,10 +32,15 @@ import os + import os.path + import shlex + import shutil ++import sys + import optparse + + from in_file import InFile + ++# TODO: Remove this once Python2 is obsoleted. ++if sys.version_info.major != 2: ++ basestring = str ++ + + ######################################################### + # This is now deprecated - use json5_generator.py instead +diff --git a/chromium/third_party/blink/renderer/build/scripts/make_runtime_features.py b/chromium/third_party/blink/renderer/build/scripts/make_runtime_features.py +index cafe8d94a8e..6925a4fa580 100755 +--- a/chromium/third_party/blink/renderer/build/scripts/make_runtime_features.py ++++ b/chromium/third_party/blink/renderer/build/scripts/make_runtime_features.py +@@ -138,7 +138,7 @@ class RuntimeFeatureWriter(BaseRuntimeFeatureWriter): + except Exception: + # If trouble unpickling, overwrite + pass +- with open(os.path.abspath(file_name), 'w') as pickle_file: ++ with open(os.path.abspath(file_name), 'wb') as pickle_file: + pickle.dump(features_map, pickle_file) + + def _template_inputs(self): +diff --git a/chromium/third_party/blink/renderer/build/scripts/templates/element_factory.cc.tmpl b/chromium/third_party/blink/renderer/build/scripts/templates/element_factory.cc.tmpl +index dc3f44c5b10..3eefcf9f0ee 100644 +--- a/chromium/third_party/blink/renderer/build/scripts/templates/element_factory.cc.tmpl ++++ b/chromium/third_party/blink/renderer/build/scripts/templates/element_factory.cc.tmpl +@@ -26,7 +26,7 @@ using {{namespace}}FunctionMap = HashMapGetExecutionContext())) { +diff --git a/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.h.tmpl b/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.h.tmpl +index 1b5297d52dc..edecc81d9d4 100644 +--- a/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.h.tmpl ++++ b/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.h.tmpl +@@ -15,7 +15,7 @@ namespace blink { + class Document; + + // Type checking. +-{% for tag in tags|sort if not tag.multipleTagNames and not tag.noTypeHelpers %} ++{% for tag in tags|sort(attribute='name') if not tag.multipleTagNames and not tag.noTypeHelpers %} + class {{tag.interface}}; + template <> + inline bool IsElementOfType(const Node& node) { +diff --git a/chromium/third_party/blink/renderer/build/scripts/templates/macros.tmpl b/chromium/third_party/blink/renderer/build/scripts/templates/macros.tmpl +index 0244433af2e..dcdbb02a56c 100644 +--- a/chromium/third_party/blink/renderer/build/scripts/templates/macros.tmpl ++++ b/chromium/third_party/blink/renderer/build/scripts/templates/macros.tmpl +@@ -25,7 +25,7 @@ + + + {% macro trie_leaf(index, object, return_macro, lowercase_data) %} +-{% set name, value = object.items()[0] %} ++{% set name, value = (object.items()|list)[0] %} + {% if name|length %} + if ( + {%- for c in name -%} +@@ -45,7 +45,7 @@ return {{ return_macro(value) }}; + + + {% macro trie_switch(trie, index, return_macro, lowercase_data) %} +-{% if trie|length == 1 and trie.values()[0] is string %} ++{% if trie|length == 1 and (trie.values()|list)[0] is string %} + {{ trie_leaf(index, trie, return_macro, lowercase_data) -}} + {% else %} + {% if lowercase_data %} +diff --git a/chromium/third_party/blink/renderer/build/scripts/templates/make_qualified_names.h.tmpl b/chromium/third_party/blink/renderer/build/scripts/templates/make_qualified_names.h.tmpl +index cb05c6c4315..bd5566b03e7 100644 +--- a/chromium/third_party/blink/renderer/build/scripts/templates/make_qualified_names.h.tmpl ++++ b/chromium/third_party/blink/renderer/build/scripts/templates/make_qualified_names.h.tmpl +@@ -24,12 +24,12 @@ namespace {{cpp_namespace}} { + {{symbol_export}}extern const WTF::AtomicString& {{namespace_prefix}}NamespaceURI; + + // Tags +-{% for tag in tags|sort %} ++{% for tag in tags|sort(attribute='name') %} + {{symbol_export}}extern const blink::{{namespace}}QualifiedName& {{tag|symbol}}Tag; + {% endfor %} + + // Attributes +-{% for attr in attrs|sort %} ++{% for attr in attrs|sort(attribute='name') %} + {{symbol_export}}extern const blink::QualifiedName& {{attr|symbol}}Attr; + {% endfor %} + +diff --git a/chromium/third_party/dawn/generator/generator_lib.py b/chromium/third_party/dawn/generator/generator_lib.py +index 5e3734d7833..e3d46bd194f 100644 +--- a/chromium/third_party/dawn/generator/generator_lib.py ++++ b/chromium/third_party/dawn/generator/generator_lib.py +@@ -201,6 +201,10 @@ def _compute_python_dependencies(root_dir=None): + + paths = set() + for path in module_paths: ++ # Builtin/namespaced modules may return None for the file path. ++ if not path: ++ continue ++ + path = os.path.abspath(path) + + if not path.startswith(root_dir): +diff --git a/chromium/third_party/devtools-frontend/src/BUILD.gn b/chromium/third_party/devtools-frontend/src/BUILD.gn +index cd488e88b60..ea1dc3d9a79 100644 +--- a/chromium/third_party/devtools-frontend/src/BUILD.gn ++++ b/chromium/third_party/devtools-frontend/src/BUILD.gn +@@ -2,6 +2,8 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//build/config/python.gni") ++ + import("//third_party/blink/public/public_features.gni") + import("./all_devtools_files.gni") + import("./all_devtools_modules.gni") +diff --git a/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py b/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py +index d6666e8b74f..0f7a661e632 100644 +--- a/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py ++++ b/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py +@@ -45,7 +45,8 @@ def rollup(input_path, output_path, filename, max_size, rollup_plugin): + ['--format', 'iife', '-n', 'InspectorOverlay'] + ['--input', target] + + ['--plugin', rollup_plugin], + stdout=subprocess.PIPE, +- stderr=subprocess.PIPE) ++ stderr=subprocess.PIPE, ++ text=True) + out, error = rollup_process.communicate() + if not out: + raise Exception("rollup failed: " + error) +diff --git a/chromium/third_party/devtools-frontend/src/scripts/build/build_release_applications.py b/chromium/third_party/devtools-frontend/src/scripts/build/build_release_applications.py +index fa8e73d34af..7d0b84b2171 100644 +--- a/chromium/third_party/devtools-frontend/src/scripts/build/build_release_applications.py ++++ b/chromium/third_party/devtools-frontend/src/scripts/build/build_release_applications.py +@@ -10,7 +10,7 @@ Builds applications in release mode: + and the application loader into a single script. + """ + +-from cStringIO import StringIO ++from io import StringIO + from os import path + from os.path import join + import copy +@@ -145,8 +145,7 @@ class ReleaseBuilder(object): + resource_content = read_file(path.join(self.application_dir, resource_name)) + if not (resource_name.endswith('.html') + or resource_name.endswith('md')): +- resource_content += resource_source_url(resource_name).encode( +- 'utf-8') ++ resource_content += resource_source_url(resource_name) + resource_content = resource_content.replace('\\', '\\\\') + resource_content = resource_content.replace('\n', '\\n') + resource_content = resource_content.replace('"', '\\"') +@@ -173,7 +172,9 @@ class ReleaseBuilder(object): + def _concatenate_application_script(self, output): + output.write('Root.allDescriptors.push(...%s);' % self._release_module_descriptors()) + if self.descriptors.extends: +- output.write('Root.applicationDescriptor.modules.push(...%s);' % json.dumps(self.descriptors.application.values())) ++ output.write( ++ 'Root.applicationDescriptor.modules.push(...%s);' % ++ json.dumps(list(self.descriptors.application.values()))) + else: + output.write('Root.applicationDescriptor = %s;' % self.descriptors.application_json()) + +diff --git a/chromium/third_party/devtools-frontend/src/scripts/build/generate_devtools_grd.py b/chromium/third_party/devtools-frontend/src/scripts/build/generate_devtools_grd.py +index be510c48d76..c6a59c90298 100644 +--- a/chromium/third_party/devtools-frontend/src/scripts/build/generate_devtools_grd.py ++++ b/chromium/third_party/devtools-frontend/src/scripts/build/generate_devtools_grd.py +@@ -123,7 +123,7 @@ def main(argv): + + try: + os.makedirs(path.join(output_directory, 'Images')) +- except OSError, e: ++ except OSError as e: + if e.errno != errno.EEXIST: + raise e + +@@ -147,7 +147,7 @@ def main(argv): + shutil.copy(path.join(dirname, filename), path.join(output_directory, 'Images')) + add_file_to_grd(doc, path.join('Images', filename)) + +- with open(parsed_args.output_filename, 'w') as output_file: ++ with open(parsed_args.output_filename, 'wb') as output_file: + output_file.write(doc.toxml(encoding='UTF-8')) + + +diff --git a/chromium/third_party/devtools-frontend/src/scripts/build/modular_build.py b/chromium/third_party/devtools-frontend/src/scripts/build/modular_build.py +index 0ba695d3810..bb1da2f9f8d 100644 +--- a/chromium/third_party/devtools-frontend/src/scripts/build/modular_build.py ++++ b/chromium/third_party/devtools-frontend/src/scripts/build/modular_build.py +@@ -7,6 +7,8 @@ + Utilities for the modular DevTools build. + """ + ++from __future__ import print_function ++ + import collections + from os import path + import os +@@ -40,7 +42,7 @@ def load_and_parse_json(filename): + try: + return json.loads(read_file(filename)) + except: +- print 'ERROR: Failed to parse %s' % filename ++ print('ERROR: Failed to parse %s' % filename) + raise + + class Descriptors: +@@ -57,7 +59,7 @@ class Descriptors: + + def application_json(self): + result = dict() +- result['modules'] = self.application.values() ++ result['modules'] = list(self.application.values()) + return json.dumps(result) + + def all_compiled_files(self): +diff --git a/chromium/tools/metrics/ukm/gen_builders.py b/chromium/tools/metrics/ukm/gen_builders.py +index f9f61d90a56..44e46fae8cc 100755 +--- a/chromium/tools/metrics/ukm/gen_builders.py ++++ b/chromium/tools/metrics/ukm/gen_builders.py +@@ -48,9 +48,10 @@ def ReadFilteredData(path): + data = ukm_model.UKM_XML_TYPE.Parse(ukm_file.read()) + event_tag = ukm_model._EVENT_TYPE.tag + metric_tag = ukm_model._METRIC_TYPE.tag +- data[event_tag] = filter(ukm_model.IsNotObsolete, data[event_tag]) ++ data[event_tag] = list(filter(ukm_model.IsNotObsolete, data[event_tag])) + for event in data[event_tag]: +- event[metric_tag] = filter(ukm_model.IsNotObsolete, event[metric_tag]) ++ event[metric_tag] = list( ++ filter(ukm_model.IsNotObsolete, event[metric_tag])) + return data + + +diff --git a/chromium/ui/ozone/generate_constructor_list.py b/chromium/ui/ozone/generate_constructor_list.py +index 8d800636c97..04fa18e93df 100755 +--- a/chromium/ui/ozone/generate_constructor_list.py ++++ b/chromium/ui/ozone/generate_constructor_list.py +@@ -45,12 +45,15 @@ Example Output: ./ui/ozone/generate_constructor_list.py \ + } // namespace ui + """ + ++try: ++ from StringIO import StringIO # for Python 2 ++except ImportError: ++ from io import StringIO # for Python 3 + import optparse + import os + import collections + import re + import sys +-import string + + + def GetTypedefName(typename): +@@ -68,7 +71,7 @@ def GetConstructorName(typename, platform): + This is just "Create" + typename + platform. + """ + +- return 'Create' + typename + string.capitalize(platform) ++ return 'Create' + typename + platform.capitalize() + + + def GenerateConstructorList(out, namespace, export, typenames, platforms, +@@ -163,12 +166,14 @@ def main(argv): + sys.exit(1) + + # Write to standard output or file specified by --output_cc. +- out_cc = sys.stdout ++ out_cc = getattr(sys.stdout, 'buffer', sys.stdout) + if options.output_cc: + out_cc = open(options.output_cc, 'wb') + +- GenerateConstructorList(out_cc, options.namespace, options.export, ++ out_cc_str = StringIO() ++ GenerateConstructorList(out_cc_str, options.namespace, options.export, + typenames, platforms, includes, usings) ++ out_cc.write(out_cc_str.getvalue().encode('utf-8')) + + if options.output_cc: + out_cc.close() +diff --git a/chromium/ui/ozone/generate_ozone_platform_list.py b/chromium/ui/ozone/generate_ozone_platform_list.py +index d47c398259b..2702b68b9bd 100755 +--- a/chromium/ui/ozone/generate_ozone_platform_list.py ++++ b/chromium/ui/ozone/generate_ozone_platform_list.py +@@ -49,12 +49,15 @@ Example Output: ./generate_ozone_platform_list.py --default wayland dri wayland + + """ + ++try: ++ from StringIO import StringIO # for Python 2 ++except ImportError: ++ from io import StringIO # for Python 3 + import optparse + import os + import collections + import re + import sys +-import string + + + def GetConstantName(name): +@@ -63,7 +66,7 @@ def GetConstantName(name): + We just capitalize the platform name and prepend "CreateOzonePlatform". + """ + +- return 'kPlatform' + string.capitalize(name) ++ return 'kPlatform' + name.capitalize() + + + def GeneratePlatformListText(out, platforms): +@@ -149,9 +152,9 @@ def main(argv): + platforms.insert(0, options.default) + + # Write to standard output or file specified by --output_{cc,h}. +- out_cc = sys.stdout +- out_h = sys.stdout +- out_txt = sys.stdout ++ out_cc = getattr(sys.stdout, 'buffer', sys.stdout) ++ out_h = getattr(sys.stdout, 'buffer', sys.stdout) ++ out_txt = getattr(sys.stdout, 'buffer', sys.stdout) + if options.output_cc: + out_cc = open(options.output_cc, 'wb') + if options.output_h: +@@ -159,9 +162,16 @@ def main(argv): + if options.output_txt: + out_txt = open(options.output_txt, 'wb') + +- GeneratePlatformListText(out_txt, platforms) +- GeneratePlatformListHeader(out_h, platforms) +- GeneratePlatformListSource(out_cc, platforms) ++ out_txt_str = StringIO() ++ out_h_str = StringIO() ++ out_cc_str = StringIO() ++ ++ GeneratePlatformListText(out_txt_str, platforms) ++ out_txt.write(out_txt_str.getvalue().encode('utf-8')) ++ GeneratePlatformListHeader(out_h_str, platforms) ++ out_h.write(out_h_str.getvalue().encode('utf-8')) ++ GeneratePlatformListSource(out_cc_str, platforms) ++ out_cc.write(out_cc_str.getvalue().encode('utf-8')) + + if options.output_cc: + out_cc.close() diff --git a/qt5-qtwebengine-5.15.7-no-icudtl-dat.patch b/qt5-qtwebengine-5.15.7-no-icudtl-dat.patch new file mode 100644 index 0000000..a83367e --- /dev/null +++ b/qt5-qtwebengine-5.15.7-no-icudtl-dat.patch @@ -0,0 +1,33 @@ +diff -up qtwebengine-everywhere-src-5.15.5/src/core/web_engine_library_info.cpp.no-icudtl-dat qtwebengine-everywhere-src-5.15.5/src/core/web_engine_library_info.cpp +--- qtwebengine-everywhere-src-5.15.5/src/core/web_engine_library_info.cpp.no-icudtl-dat 2021-06-24 07:26:58.976486102 -0500 ++++ qtwebengine-everywhere-src-5.15.5/src/core/web_engine_library_info.cpp 2021-06-24 07:32:19.272863523 -0500 +@@ -273,7 +273,6 @@ QString dictionariesPath() + + QString resourcesDataPath() + { +- static bool initialized = false; + static QString potentialResourcesPath = + #if defined(OS_MAC) && defined(QT_MAC_FRAMEWORK_BUILD) + getResourcesPath(frameworkBundle()); +@@ -282,21 +281,6 @@ QString resourcesDataPath() + #else + QLibraryInfo::location(QLibraryInfo::DataPath) % QLatin1String("/resources"); + #endif +- if (!initialized) { +- initialized = true; +- if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/qtwebengine_resources.pak"))) { +- qWarning("Qt WebEngine resources not found at %s. Trying parent directory...", qPrintable(potentialResourcesPath)); +- potentialResourcesPath = QLibraryInfo::location(QLibraryInfo::DataPath); +- } +- if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/qtwebengine_resources.pak"))) { +- qWarning("Qt WebEngine resources not found at %s. Trying application directory...", qPrintable(potentialResourcesPath)); +- potentialResourcesPath = QCoreApplication::applicationDirPath(); +- } +- if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/qtwebengine_resources.pak"))) { +- qWarning("Qt WebEngine resources not found at %s. Trying fallback directory... The application MAY NOT work.", qPrintable(potentialResourcesPath)); +- potentialResourcesPath = fallbackDir(); +- } +- } + + return potentialResourcesPath; + } diff --git a/qt5-qtwebengine-5.15.7-python3.patch b/qt5-qtwebengine-5.15.7-python3.patch new file mode 100644 index 0000000..037ff53 --- /dev/null +++ b/qt5-qtwebengine-5.15.7-python3.patch @@ -0,0 +1,150 @@ +diff --git a/configure.pri b/configure.pri +index e072961f..5efe30bc 100644 +--- a/configure.pri ++++ b/configure.pri +@@ -12,10 +12,6 @@ defineTest(isPythonVersionSupported) { + python_version ~= s/[()]//g + python_version = $$split(python_version, ',') + python_major_version = $$first(python_version) +- greaterThan(python_major_version, 2) { +- qtLog("Python version 3 is not supported by Chromium.") +- return(false) +- } + python_minor_version = $$member(python_version, 1) + python_patch_version = $$member(python_version, 2) + greaterThan(python_major_version, 1): greaterThan(python_minor_version, 6): greaterThan(python_patch_version, 4): return(true) +@@ -52,10 +48,10 @@ defineTest(qtConfReport_jumboBuild) { + qtConfReportPadded($${1}, $$mergeLimit) + } + +-defineTest(qtConfTest_detectPython2) { +- python = $$qtConfFindInPath("python2$$EXE_SUFFIX") ++defineTest(qtConfTest_detectPython) { ++ python = $$qtConfFindInPath("python$$EXE_SUFFIX") + isEmpty(python) { +- qtLog("'python2$$EXE_SUFFIX' not found in PATH. Checking for 'python$$EXE_SUFFIX'.") ++ qtLog("'python$$EXE_SUFFIX' not found in PATH. Checking for 'python$$EXE_SUFFIX'.") + python = $$qtConfFindInPath("python$$EXE_SUFFIX") + } + isEmpty(python) { +@@ -63,11 +59,11 @@ defineTest(qtConfTest_detectPython2) { + return(false) + } + !isPythonVersionSupported($$python) { +- qtLog("A suitable Python 2 executable could not be located.") ++ qtLog("A suitable Python executable could not be located.") + return(false) + } + +- # Make tests.python2.location available in configure.json. ++ # Make tests.python.location available in configure.json. + $${1}.location = $$clean_path($$python) + export($${1}.location) + $${1}.cache += location +diff --git a/mkspecs/features/functions.prf b/mkspecs/features/functions.prf +index 2750d707..9fda13d0 100644 +--- a/mkspecs/features/functions.prf ++++ b/mkspecs/features/functions.prf +@@ -39,11 +39,11 @@ defineReplace(which) { + + # Returns the unquoted path to the python executable. + defineReplace(pythonPath) { +- isEmpty(QMAKE_PYTHON2) { ++ isEmpty(QMAKE_PYTHON) { + # Fallback for building QtWebEngine with Qt < 5.8 +- QMAKE_PYTHON2 = python ++ QMAKE_PYTHON = python + } +- return($$QMAKE_PYTHON2) ++ return($$QMAKE_PYTHON) + } + + # Returns the python executable for use with shell / make targets. +diff --git a/src/buildtools/config/support.pri b/src/buildtools/config/support.pri +index e7f869a1..1bf2c5d7 100644 +--- a/src/buildtools/config/support.pri ++++ b/src/buildtools/config/support.pri +@@ -21,7 +21,7 @@ defineReplace(qtwebengine_checkWebEngineCoreError) { + !qtwebengine_checkForGperf(QtWebEngine):return(false) + !qtwebengine_checkForBison(QtWebEngine):return(false) + !qtwebengine_checkForFlex(QtWebEngine):return(false) +- !qtwebengine_checkForPython2(QtWebEngine):return(false) ++ !qtwebengine_checkForPython(QtWebEngine):return(false) + !qtwebengine_checkForNodejs(QtWebEngine):return(false) + !qtwebengine_checkForSanitizer(QtWebEngine):return(false) + linux:!qtwebengine_checkForPkgCfg(QtWebEngine):return(false) +@@ -51,7 +51,7 @@ defineReplace(qtwebengine_checkPdfError) { + !qtwebengine_checkForGperf(QtPdf):return(false) + !qtwebengine_checkForBison(QtPdf):return(false) + !qtwebengine_checkForFlex(QtPdf):return(false) +- !qtwebengine_checkForPython2(QtPdf):return(false) ++ !qtwebengine_checkForPython(QtPdf):return(false) + !qtwebengine_checkForSanitizer(QtPdf):return(false) + linux:!qtwebengine_checkForPkgCfg(QtPdf):return(false) + linux:!qtwebengine_checkForHostPkgCfg(QtPdf):return(false) +@@ -143,10 +143,10 @@ defineTest(qtwebengine_checkForFlex) { + return(true) + } + +-defineTest(qtwebengine_checkForPython2) { ++defineTest(qtwebengine_checkForPython) { + module = $$1 +- !qtConfig(webengine-python2) { +- qtwebengine_skipBuild("Python version 2 (2.7.5 or later) is required to build $${module}.") ++ !qtConfig(webengine-python) { ++ qtwebengine_skipBuild("Python is required to build $${module}.") + return(false) + } + return(true) +diff --git a/src/buildtools/configure.json b/src/buildtools/configure.json +index 88d1790c..032aa665 100644 +--- a/src/buildtools/configure.json ++++ b/src/buildtools/configure.json +@@ -295,9 +295,9 @@ + "label": "system ninja", + "type": "detectNinja" + }, +- "webengine-python2": { +- "label": "python2", +- "type": "detectPython2", ++ "webengine-python": { ++ "label": "python", ++ "type": "detectPython", + "log": "location" + }, + "webengine-winversion": { +@@ -374,7 +374,7 @@ + && features.webengine-gperf + && features.webengine-bison + && features.webengine-flex +- && features.webengine-python2 ++ && features.webengine-python + && features.webengine-nodejs + && (!config.sanitizer || features.webengine-sanitizer) + && (!config.linux || features.pkg-config) +@@ -400,7 +400,7 @@ + && features.webengine-gperf + && features.webengine-bison + && features.webengine-flex +- && features.webengine-python2 ++ && features.webengine-python + && (!config.sanitizer || features.webengine-sanitizer) + && (!config.linux || features.pkg-config) + && (!config.linux || features.webengine-host-pkg-config) +@@ -423,12 +423,12 @@ + "autoDetect": "features.private_tests", + "output": [ "privateFeature" ] + }, +- "webengine-python2": { +- "label": "python2", +- "condition": "tests.webengine-python2", ++ "webengine-python": { ++ "label": "python", ++ "condition": "tests.webengine-python", + "output": [ + "privateFeature", +- { "type": "varAssign", "name": "QMAKE_PYTHON2", "value": "tests.webengine-python2.location" } ++ { "type": "varAssign", "name": "QMAKE_PYTHON", "value": "tests.webengine-python.location" } + ] + }, + "webengine-gperf": { diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec new file mode 100644 index 0000000..52e95d4 --- /dev/null +++ b/qt5-qtwebengine.spec @@ -0,0 +1,316 @@ +%define majver %(echo %version | cut -d. -f1-2) +Name: qt5-qtwebengine +Version: 5.15.7 +Release: 1mamba +Summary: Qt5 WebEngine component +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: https://www.qt.io/ +Source: https://github.com/qt/qtwebengine.git/v%{version}-lts/qtwebengine-%{version}.tar.bz2 +Patch8: qtwebengine-5.15.2-chromium-icu-68.patch +Patch9: qtwebengine-5.15.2-chromium-icu-68.2-2.patch +Patch10: qt5-qtwebengine-5.15.7-chromium-python3.patch +Patch11: qt5-qtwebengine-5.15.7-python3.patch +Patch12: qt5-qtwebengine-5.15.7-chromium-glibc-2.34.patch +Patch13: qt5-qtwebengine-5.15.7-chromium-glibc-2.34-breakpad.patch +Patch14: qt5-qtwebengine-5.15.7-aarch64-new-stat.patch +Patch15: qt5-qtwebengine-5.15.7-no-icudtl-dat.patch +Patch16: qt5-qtwebengine-5.15.7-SIOCGSTAMP.patch +License: GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libQt5Positioning-devel +BuildRequires: libQt5WebChannel-devel +BuildRequires: libX11-devel +BuildRequires: libXcomposite-devel +BuildRequires: libXdamage-devel +BuildRequires: libXext-devel +BuildRequires: libXfixes-devel +BuildRequires: libXrandr-devel +BuildRequires: libXrender-devel +BuildRequires: libXtst-devel +BuildRequires: libalsa-devel +BuildRequires: libavcodec-ffmpeg-devel +BuildRequires: libavformat-ffmpeg-devel +BuildRequires: libavutil-ffmpeg-devel +BuildRequires: libdbus-devel +BuildRequires: libevent-devel +BuildRequires: libexpat-devel +BuildRequires: libfontconfig-devel +BuildRequires: libfreetype-devel +BuildRequires: libgcc +BuildRequires: libglib-devel +BuildRequires: libglvnd-devel +BuildRequires: libharfbuzz-devel +BuildRequires: libicu-devel +BuildRequires: libjpeg-devel +BuildRequires: liblcms2-devel +BuildRequires: libminizip1-devel +BuildRequires: libnspr-devel +BuildRequires: libnss-devel +BuildRequires: libopus-devel +BuildRequires: libpci-devel +BuildRequires: libpng-devel +BuildRequires: libre2-devel +BuildRequires: libsnappy-devel +BuildRequires: libstdc++6-devel +BuildRequires: libvpx-devel +BuildRequires: libwebp-devel +BuildRequires: libxcb-devel +BuildRequires: libxkbcommon-devel +BuildRequires: libz-devel +BuildRequires: qt5-qtbase-devel +BuildRequires: qt5-qtdeclarative-devel +BuildRequires: qt5-qttools-devel +## AUTOBUILDREQ-END +#BuildRequires: libpipewire02-devel +#BuildConflicts: libQt5WebEngine-devel +Requires(post): %{__install_info} +Requires(preun): %{__install_info} +Provides: qtwebengine +Obsoletes: qtwebengine <= 5.15.2 + +%description +Qt5 WebEngine component. + +%package -n libQt5WebEngine +Group: System/Libraries +Summary: Shared libraries for %{name} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description -n libQt5WebEngine +This package contains shared libraries for %{name}. + +%package -n libQt5WebEngine-devel +Group: Development/Libraries +Summary: Development files for %{name} +Requires: libQt5WebEngine = %{?epoch:%epoch:}%{version}-%{release} +Requires: pkg-config + +%description -n libQt5WebEngine-devel +This package contains libraries and header files for developing applications that use %{name}. + +%debug_package + +%prep +%setup -q -n qtwebengine-%{version} +#-D -T +#:<< _EOF +cd src/3rdparty +#%patch10 -p1 -b .chromium-python3 +%patch13 -p1 -b .chromium-glibc-2.34-breakpad +cd ../.. +%patch9 -p1 +#%patch11 -p1 -b .python3 +%patch12 -p1 -b .chromium-glibc-2.34 +%patch14 -p1 -b .aarch64-new-stat +%patch15 -p1 -b .no-icudtl-dat +%patch16 -p1 -b .SIOCGSTAMP + +## Update catapult for python3 compatibility +#mv catapult-%{version} catapult +#rm -rf src/3rdparty/chromium/third_party/catapult +#mv catapult src/3rdparty/chromium/third_party + + +# fix/workaround +# fatal error: QtWebEngineCore/qtwebenginecoreglobal.h: No such file or directory +if [ ! -f "./include/QtWebEngineCore/qtwebenginecoreglobal.h" ]; then +%_qt5_bindir/syncqt.pl -version %{version} +fi + +## Workaround for: +## qtwebengine-5.15.7/src/core/net/qrc_url_scheme_handler.h:43:10: fatal error: QtWebEngineCore/private/qtwebenginecoreglobal_p.h: No such file or directory +#cp ./src/core/api/qtwebenginecoreglobal_p.h include/QtWebEngineCore/%{version}/QtWebEngineCore/private/ +#cp ./src/webengine/api/qtwebengineglobal_p.h include/QtWebEngine/5.15.7/QtWebEngine/private/ + +%build +#:<< _EOF +# Prevent build server slowness/crash due to memory +%ifarch arm +export NINJAFLAGS="-j1" +%else +export NINJAFLAGS="-j2" +%endif + +%ifarch %{ix86} aarch64 +export CXXFLAGS+="%{optflags} -Os -s -ffunction-sections -fdata-sections -Wl,--gc-sections -Wl,--no-keep-memory -fPIC -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2 -Wl,--no-fatal-warnings" +%else +export CXXFLAGS+="%{optflags} -fPIC -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2 -Wl,--no-fatal-warnings" +%endif + +qmake-qt5 -- \ + -proprietary-codecs \ + -system-ffmpeg \ + -webengine-icu \ + -webengine-kerberos \ + -webengine-webrtc-pipewire \ + -webp \ + -spellchecker + +PATH=%{_bindir}:$PATH %make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +PATH=%{_bindir}:$PATH %makeinstall INSTALL_ROOT=%{buildroot} STRIP=/bin/true + +#%find_lang %{name}5_qt --with-qt --all-name || touch %{name}5_qt.lang + +rm -f %{buildroot}%{_libdir}/Qt5WebEngineCore.la + +# Fix cmake dependency versions +sed -e "s|%{version}\ |5.15.2 |" -i %{buildroot}%{_libdir}/cmake/*/*Config.cmake + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -n libQt5WebEngine -p /sbin/ldconfig +%postun -n libQt5WebEngine -p /sbin/ldconfig + +%files +#-f %{name}.lang +%defattr(-,root,root) +%{_datadir}/qt5/resources/qtwebengine_devtools_resources.pak +%{_datadir}/qt5/resources/qtwebengine_resources.pak +%{_datadir}/qt5/resources/qtwebengine_resources_100p.pak +%{_datadir}/qt5/resources/qtwebengine_resources_200p.pak +#%{_datadir}/qt5/resources/icudtl.dat +%dir %{_datadir}/qt5/translations/qtwebengine_locales +%{_datadir}/qt5/translations/qtwebengine_locales/*.pak +%doc LICENSE.GPL3 LICENSE.GPL3-EXCEPT + +%files -n libQt5WebEngine +%defattr(-,root,root) +%{_libdir}/libQt5WebEngine.so.* +%{_libdir}/libQt5WebEngineCore.so.* +%{_libdir}/libQt5WebEngineWidgets.so.* +%{_libdir}/libQt5Pdf.so.* +%{_libdir}/libQt5PdfWidgets.so.* +%{_libdir}/qt5/bin/qwebengine_convert_dict +%{_libdir}/qt5/libexec/QtWebEngineProcess +%{_libdir}/qt5/plugins/designer/libqwebengineview.so +%{_libdir}/qt5/plugins/imageformats/libqpdf.so +%dir %{_libdir}/qt5/qml/QtWebEngine +%{_libdir}/qt5/qml/QtWebEngine/* +%dir %{_libdir}/qt5/qml/QtQuick +%{_libdir}/qt5/qml/QtQuick/* +%doc LICENSE.LGPL3 LICENSE.Chromium LICENSE.FDL + +%files -n libQt5WebEngine-devel +%defattr(-,root,root) +%dir %{_includedir}/qt5/QtWebEngine +%{_includedir}/qt5/QtWebEngine/* +%dir %{_includedir}/qt5/QtWebEngineCore +%{_includedir}/qt5/QtWebEngineCore/* +%dir %{_includedir}/qt5/QtWebEngineWidgets +%{_includedir}/qt5/QtWebEngineWidgets/* +%dir %{_includedir}/qt5/QtPdf +%{_includedir}/qt5/QtPdf/* +%dir %{_includedir}/qt5/QtPdfWidgets +%{_includedir}/qt5/QtPdfWidgets/* +%dir %{_libdir}/cmake/Qt5WebEngine +%{_libdir}/cmake/Qt5WebEngine/*.cmake +%dir %{_libdir}/cmake/Qt5WebEngineCore +%{_libdir}/cmake/Qt5WebEngineCore/*.cmake +%dir %{_libdir}/cmake/Qt5WebEngineWidgets +%dir %{_libdir}/cmake/Qt5Gui +%{_libdir}/cmake/Qt5Gui/Qt5Gui_QPdfPlugin.cmake +%dir %{_libdir}/cmake/Qt5Pdf +%{_libdir}/cmake/Qt5Pdf/Qt5PdfConfig*.cmake +%{_libdir}/cmake/Qt5PdfWidgets/Qt5PdfWidgetsConfig*.cmake +%{_libdir}/libQt5WebEngine.la +%{_libdir}/libQt5WebEngine.prl +%{_libdir}/libQt5WebEngine.so +%{_libdir}/libQt5WebEngineCore.la +%{_libdir}/libQt5WebEngineCore.prl +%{_libdir}/libQt5WebEngineCore.so +%{_libdir}/libQt5WebEngineWidgets.la +%{_libdir}/libQt5WebEngineWidgets.prl +%{_libdir}/libQt5WebEngineWidgets.so +%{_libdir}/libQt5Pdf.la +%{_libdir}/libQt5Pdf.prl +%{_libdir}/libQt5Pdf.so +%{_libdir}/libQt5PdfWidgets.la +%{_libdir}/libQt5PdfWidgets.prl +%{_libdir}/libQt5PdfWidgets.so +%{_libdir}/qt5/mkspecs/modules/qt_lib_webengine*.pri +%{_libdir}/qt5/mkspecs/modules/qt_lib_pdf*.pri +%{_libdir}/pkgconfig/Qt5WebEngine.pc +%{_libdir}/pkgconfig/Qt5WebEngineCore.pc +%{_libdir}/pkgconfig/Qt5WebEngineWidgets.pc +%{_libdir}/pkgconfig/Qt5Pdf.pc +%{_libdir}/pkgconfig/Qt5PdfWidgets.pc +%{_libdir}/cmake/Qt5WebEngineWidgets/*.cmake +%{_libdir}/cmake/Qt5Designer/Qt5Designer_QWebEngineViewPlugin.cmake + +%changelog +* Fri Dec 24 2021 Silvan Calarco 5.15.7-1mamba +- update to 5.15.7 + +* Sat Jan 02 2021 Silvan Calarco 5.15.2-1mamba +- update to 5.15.2 + +* Mon Oct 19 2020 Silvan Calarco 5.15.1-1mamba +- update to 5.15.1 + +* Mon Aug 31 2020 Silvan Calarco 5.15.0-2mamba +- rebuilt with system ffmpeg and icu + +* Fri Aug 28 2020 Silvan Calarco 5.15.0-1mamba +- update to 5.15.0 + +* Tue Apr 07 2020 Silvan Calarco 5.14.2-1mamba +- update to 5.14.2 + +* Wed Oct 23 2019 Silvan Calarco 5.13.1-1mamba +- update to 5.13.1 + +* Sun Jun 23 2019 Silvan Calarco 5.13.0-1mamba +- update to 5.13.0 + +* Tue May 07 2019 Silvan Calarco 5.12.3-1mamba +- update to 5.12.3 + +* Tue Mar 19 2019 Silvan Calarco 5.12.2-1mamba +- update to 5.12.2 + +* Sun Feb 10 2019 Silvan Calarco 5.12.1-1mamba +- update to 5.12.1 + +* Sun Dec 30 2018 Automatic Build System 5.12.0-1mamba +- automatic version update by autodist + +* Sat Nov 03 2018 Silvan Calarco 5.11.2-1mamba +- update to 5.11.2 + +* Sat Jul 21 2018 Silvan Calarco 5.11.1-1mamba +- update to 5.11.1 + +* Wed Jun 06 2018 Silvan Calarco 5.11.0-1mamba +- update to 5.11.0 + +* Sat Feb 24 2018 Silvan Calarco 5.10.1-1mamba +- update to 5.10.1 + +* Sat Jan 27 2018 Silvan Calarco 5.10.0-1mamba +- update to 5.10.0 + +* Thu Oct 19 2017 Silvan Calarco 5.9.2-1mamba +- update to 5.9.2 + +* Fri Dec 16 2016 Silvan Calarco 5.7.1-1mamba +- update to 5.7.1 + +* Thu Dec 15 2016 Silvan Calarco 5.7.0-4mamba +- rebuilt with gcc + +* Thu Dec 15 2016 Silvan Calarco 5.7.0-3mamba +- rebuilt with -fno-delete-null-pointer-checks CXXFLAGS and use_system_ffmpeg + +* Thu Dec 15 2016 Silvan Calarco 5.7.0-2mamba +- bump release to allow update with qt5 release update + +* Sat Jul 16 2016 Silvan Calarco 5.7.0-1mamba +- package created using the webbuild interface diff --git a/qtwebengine-5.15.2-chromium-icu-68.2-2.patch b/qtwebengine-5.15.2-chromium-icu-68.2-2.patch new file mode 100644 index 0000000..600dd3f --- /dev/null +++ b/qtwebengine-5.15.2-chromium-icu-68.2-2.patch @@ -0,0 +1,11 @@ +--- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/libxml/src/encoding.c.orig 2021-01-03 10:11:46.380887963 +0100 ++++ qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/libxml/src/encoding.c 2021-01-03 10:12:18.541212665 +0100 +@@ -1958,7 +1958,7 @@ + #ifdef LIBXML_ICU_ENABLED + else if (handler->uconv_out != NULL) { + ret = xmlUconvWrapper(handler->uconv_out, 0, out, outlen, in, inlen, +- TRUE); ++ true); + } + #endif /* LIBXML_ICU_ENABLED */ + else { diff --git a/qtwebengine-5.15.2-chromium-icu-68.patch b/qtwebengine-5.15.2-chromium-icu-68.patch new file mode 100644 index 0000000..366a38d --- /dev/null +++ b/qtwebengine-5.15.2-chromium-icu-68.patch @@ -0,0 +1,302 @@ +From 9236b21c883360482bd2c06929bfdecbc47f186c Mon Sep 17 00:00:00 2001 +From: Allan Sandfeld Jensen +Date: Mon, 16 Nov 2020 13:16:13 +0100 +Subject: Fix build with system ICU 68 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes: QTBUG-88116 +Change-Id: I935babf51c2670fad7cc7950a2fe07eb2829c4cb +Reviewed-by: Jüri Valdmann +--- + chromium/base/i18n/string_compare.cc | 4 ++-- + chromium/base/i18n/time_formatting.cc | 2 +- + .../components/autofill/core/common/autofill_regexes.cc | 8 ++++---- + .../spellcheck/renderer/spellcheck_worditerator.cc | 2 +- + .../url_formatter/spoof_checks/idn_spoof_checker.cc | 4 ++-- + .../url_formatter/spoof_checks/skeleton_generator.cc | 2 +- + chromium/services/service_manager/zygote/zygote_linux.cc | 2 +- + .../blink/renderer/platform/text/locale_icu.cc | 4 ++-- + .../renderer/platform/text/text_break_iterator_icu.cc | 16 ++++++++-------- + .../blink/renderer/platform/text/unicode_utilities.cc | 2 +- + .../blink/renderer/platform/wtf/text/text_codec_icu.cc | 2 +- + chromium/ui/base/l10n/formatter.cc | 6 +++--- + 12 files changed, 27 insertions(+), 27 deletions(-) + +diff --git a/chromium/base/i18n/string_compare.cc b/chromium/base/i18n/string_compare.cc +index 6cd59b98f49..a5fa502b53f 100644 +--- a/chromium/base/i18n/string_compare.cc ++++ b/chromium/base/i18n/string_compare.cc +@@ -18,8 +18,8 @@ UCollationResult CompareString16WithCollator(const icu::Collator& collator, + StringPiece16 rhs) { + UErrorCode error = U_ZERO_ERROR; + UCollationResult result = collator.compare( +- icu::UnicodeString(FALSE, lhs.data(), static_cast(lhs.length())), +- icu::UnicodeString(FALSE, rhs.data(), static_cast(rhs.length())), ++ icu::UnicodeString(false, lhs.data(), static_cast(lhs.length())), ++ icu::UnicodeString(false, rhs.data(), static_cast(rhs.length())), + error); + DCHECK(U_SUCCESS(error)); + return result; +diff --git a/chromium/base/i18n/time_formatting.cc b/chromium/base/i18n/time_formatting.cc +index 1a6c1389ba0..106dd0e5b47 100644 +--- a/chromium/base/i18n/time_formatting.cc ++++ b/chromium/base/i18n/time_formatting.cc +@@ -236,7 +236,7 @@ bool TimeDurationFormatWithSeconds(const TimeDelta time, + icu::FieldPosition ignore(icu::FieldPosition::DONT_CARE); + measure_format.formatMeasures(measures, 3, formatted, ignore, status); + *out = i18n::UnicodeStringToString16(formatted); +- return U_SUCCESS(status) == TRUE; ++ return U_SUCCESS(status) == true; + } + + string16 DateIntervalFormat(const Time& begin_time, +diff --git a/chromium/components/autofill/core/common/autofill_regexes.cc b/chromium/components/autofill/core/common/autofill_regexes.cc +index b141cb2d0f6..a8a688d50c7 100644 +--- a/chromium/components/autofill/core/common/autofill_regexes.cc ++++ b/chromium/components/autofill/core/common/autofill_regexes.cc +@@ -43,7 +43,7 @@ class AutofillRegexes { + icu::RegexMatcher* AutofillRegexes::GetMatcher(const base::string16& pattern) { + auto it = matchers_.find(pattern); + if (it == matchers_.end()) { +- const icu::UnicodeString icu_pattern(FALSE, pattern.data(), ++ const icu::UnicodeString icu_pattern(false, pattern.data(), + pattern.length()); + + UErrorCode status = U_ZERO_ERROR; +@@ -70,20 +70,20 @@ bool MatchesPattern(const base::string16& input, + base::AutoLock lock(*g_lock); + + icu::RegexMatcher* matcher = g_autofill_regexes->GetMatcher(pattern); +- icu::UnicodeString icu_input(FALSE, input.data(), input.length()); ++ icu::UnicodeString icu_input(false, input.data(), input.length()); + matcher->reset(icu_input); + + UErrorCode status = U_ZERO_ERROR; + UBool matched = matcher->find(0, status); + DCHECK(U_SUCCESS(status)); + +- if (matched == TRUE && match) { ++ if (matched == true && match) { + icu::UnicodeString match_unicode = matcher->group(0, status); + DCHECK(U_SUCCESS(status)); + *match = base::i18n::UnicodeStringToString16(match_unicode); + } + +- return matched == TRUE; ++ return matched == true; + } + + } // namespace autofill +diff --git a/chromium/components/spellcheck/renderer/spellcheck_worditerator.cc b/chromium/components/spellcheck/renderer/spellcheck_worditerator.cc +index 8fe8a6df381..e3a65580c08 100644 +--- a/chromium/components/spellcheck/renderer/spellcheck_worditerator.cc ++++ b/chromium/components/spellcheck/renderer/spellcheck_worditerator.cc +@@ -424,7 +424,7 @@ bool SpellcheckWordIterator::Normalize(size_t input_start, + // spellchecker and we need manual normalization as well. The normalized + // text does not have to be NUL-terminated since its characters are copied to + // string16, which adds a NUL character when we need. +- icu::UnicodeString input(FALSE, &text_[input_start], ++ icu::UnicodeString input(false, &text_[input_start], + base::checked_cast(input_length)); + UErrorCode status = U_ZERO_ERROR; + icu::UnicodeString output; +diff --git a/chromium/components/url_formatter/spoof_checks/idn_spoof_checker.cc b/chromium/components/url_formatter/spoof_checks/idn_spoof_checker.cc +index 1964793fd3e..c4e01026c38 100644 +--- a/chromium/components/url_formatter/spoof_checks/idn_spoof_checker.cc ++++ b/chromium/components/url_formatter/spoof_checks/idn_spoof_checker.cc +@@ -347,7 +347,7 @@ bool IDNSpoofChecker::SafeToDisplayAsUnicode( + if (U_FAILURE(status) || (result & USPOOF_ALL_CHECKS)) + return false; + +- icu::UnicodeString label_string(FALSE /* isTerminated */, label.data(), ++ icu::UnicodeString label_string(false /* isTerminated */, label.data(), + base::checked_cast(label.size())); + + // A punycode label with 'xn--' prefix is not subject to the URL +@@ -677,7 +677,7 @@ bool IDNSpoofChecker::IsWholeScriptConfusableAllowedForTLD( + base::StringPiece tld, + base::StringPiece16 tld_unicode) { + icu::UnicodeString tld_string( +- FALSE /* isTerminated */, tld_unicode.data(), ++ false /* isTerminated */, tld_unicode.data(), + base::checked_cast(tld_unicode.size())); + // Allow if the TLD contains any letter from the script, in which case it's + // likely to be a TLD in that script. +diff --git a/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc b/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc +index 41485914007..b8c1c2f547a 100644 +--- a/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc ++++ b/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc +@@ -117,7 +117,7 @@ SkeletonGenerator::~SkeletonGenerator() = default; + Skeletons SkeletonGenerator::GetSkeletons(base::StringPiece16 hostname) { + Skeletons skeletons; + size_t hostname_length = hostname.length() - (hostname.back() == '.' ? 1 : 0); +- icu::UnicodeString host(FALSE, hostname.data(), hostname_length); ++ icu::UnicodeString host(false, hostname.data(), hostname_length); + // If input has any characters outside Latin-Greek-Cyrillic and [0-9._-], + // there is no point in getting rid of diacritics because combining marks + // attached to non-LGC characters are already blocked. +diff --git a/chromium/services/service_manager/zygote/zygote_linux.cc b/chromium/services/service_manager/zygote/zygote_linux.cc +index aa601ab28d7..920438e5b50 100644 +--- a/chromium/services/service_manager/zygote/zygote_linux.cc ++++ b/chromium/services/service_manager/zygote/zygote_linux.cc +@@ -564,7 +564,7 @@ base::ProcessId Zygote::ReadArgsAndFork(base::PickleIterator iter, + if (!iter.ReadString16(&timezone_id)) + return -1; + icu::TimeZone::adoptDefault(icu::TimeZone::createTimeZone( +- icu::UnicodeString(FALSE, timezone_id.data(), timezone_id.length()))); ++ icu::UnicodeString(false, timezone_id.data(), timezone_id.length()))); + + if (!iter.ReadInt(&numfds)) + return -1; +diff --git a/chromium/third_party/blink/renderer/platform/text/locale_icu.cc b/chromium/third_party/blink/renderer/platform/text/locale_icu.cc +index abff1b1d809..57f1286d4e4 100644 +--- a/chromium/third_party/blink/renderer/platform/text/locale_icu.cc ++++ b/chromium/third_party/blink/renderer/platform/text/locale_icu.cc +@@ -169,12 +169,12 @@ static String GetDateFormatPattern(const UDateFormat* date_format) { + return g_empty_string; + + UErrorCode status = U_ZERO_ERROR; +- int32_t length = udat_toPattern(date_format, TRUE, nullptr, 0, &status); ++ int32_t length = udat_toPattern(date_format, true, nullptr, 0, &status); + if (status != U_BUFFER_OVERFLOW_ERROR || !length) + return g_empty_string; + StringBuffer buffer(length); + status = U_ZERO_ERROR; +- udat_toPattern(date_format, TRUE, buffer.Characters(), length, &status); ++ udat_toPattern(date_format, true, buffer.Characters(), length, &status); + if (U_FAILURE(status)) + return g_empty_string; + return String::Adopt(buffer); +diff --git a/chromium/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc b/chromium/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc +index a257cd75ccf..898d0c47bb1 100644 +--- a/chromium/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc ++++ b/chromium/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc +@@ -311,13 +311,13 @@ static inline bool TextInChunkOrOutOfRange(UText* text, + text->chunkOffset = offset <= std::numeric_limits::max() + ? static_cast(offset) + : 0; +- is_accessible = TRUE; ++ is_accessible = true; + return true; + } + if (native_index >= native_length && + text->chunkNativeLimit == native_length) { + text->chunkOffset = text->chunkLength; +- is_accessible = FALSE; ++ is_accessible = false; + return true; + } + } else { +@@ -330,12 +330,12 @@ static inline bool TextInChunkOrOutOfRange(UText* text, + text->chunkOffset = offset <= std::numeric_limits::max() + ? static_cast(offset) + : 0; +- is_accessible = TRUE; ++ is_accessible = true; + return true; + } + if (native_index <= 0 && !text->chunkNativeStart) { + text->chunkOffset = 0; +- is_accessible = FALSE; ++ is_accessible = false; + return true; + } + } +@@ -346,7 +346,7 @@ static UBool TextLatin1Access(UText* text, + int64_t native_index, + UBool forward) { + if (!text->context) +- return FALSE; ++ return false; + int64_t native_length = TextNativeLength(text); + UBool is_accessible; + if (TextInChunkOrOutOfRange(text, native_index, native_length, forward, +@@ -370,7 +370,7 @@ static UBool TextLatin1Access(UText* text, + DCHECK_EQ(new_context, kPriorContext); + TextLatin1SwitchToPriorContext(text, native_index, native_length, forward); + } +- return TRUE; ++ return true; + } + + static const struct UTextFuncs kTextLatin1Funcs = { +@@ -510,7 +510,7 @@ static void TextUTF16SwitchToPriorContext(UText* text, + + static UBool TextUTF16Access(UText* text, int64_t native_index, UBool forward) { + if (!text->context) +- return FALSE; ++ return false; + int64_t native_length = TextNativeLength(text); + UBool is_accessible; + if (TextInChunkOrOutOfRange(text, native_index, native_length, forward, +@@ -532,7 +532,7 @@ static UBool TextUTF16Access(UText* text, int64_t native_index, UBool forward) { + DCHECK_EQ(new_context, kPriorContext); + TextUTF16SwitchToPriorContext(text, native_index, native_length, forward); + } +- return TRUE; ++ return true; + } + + static const struct UTextFuncs kTextUTF16Funcs = { +diff --git a/chromium/third_party/blink/renderer/platform/text/unicode_utilities.cc b/chromium/third_party/blink/renderer/platform/text/unicode_utilities.cc +index 2cefd5390b6..b8c4515dc13 100644 +--- a/chromium/third_party/blink/renderer/platform/text/unicode_utilities.cc ++++ b/chromium/third_party/blink/renderer/platform/text/unicode_utilities.cc +@@ -300,7 +300,7 @@ void NormalizeCharactersIntoNFCForm(const UChar* characters, + DCHECK(U_SUCCESS(status)); + int32_t input_length = static_cast(length); + // copy-on-write. +- icu::UnicodeString normalized(FALSE, characters, input_length); ++ icu::UnicodeString normalized(false, characters, input_length); + // In the vast majority of cases, input is already NFC. Run a quick check + // to avoid normalizing the entire input unnecessarily. + int32_t normalized_prefix_length = +diff --git a/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc b/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc +index 810d1cd9181..9074b640fff 100644 +--- a/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc ++++ b/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc +@@ -326,7 +326,7 @@ void TextCodecICU::CreateICUConverter() const { + DLOG_IF(ERROR, err == U_AMBIGUOUS_ALIAS_WARNING) + << "ICU ambiguous alias warning for encoding: " << encoding_.GetName(); + if (converter_icu_) +- ucnv_setFallback(converter_icu_, TRUE); ++ ucnv_setFallback(converter_icu_, true); + } + + int TextCodecICU::DecodeToBuffer(UChar* target, +diff --git a/chromium/ui/base/l10n/formatter.cc b/chromium/ui/base/l10n/formatter.cc +index 486a3a029cb..d7a41724628 100644 +--- a/chromium/ui/base/l10n/formatter.cc ++++ b/chromium/ui/base/l10n/formatter.cc +@@ -232,7 +232,7 @@ void Formatter::Format(Unit unit, + int value, + icu::UnicodeString* formatted_string) const { + DCHECK(simple_format_[unit]); +- DCHECK(formatted_string->isEmpty() == TRUE); ++ DCHECK(formatted_string->isEmpty() == true); + UErrorCode error = U_ZERO_ERROR; + FormatNumberInPlural(*simple_format_[unit], + value, formatted_string, &error); +@@ -248,7 +248,7 @@ void Formatter::Format(TwoUnits units, + << "Detailed() not implemented for your (format, length) combination!"; + DCHECK(detailed_format_[units][1]) + << "Detailed() not implemented for your (format, length) combination!"; +- DCHECK(formatted_string->isEmpty() == TRUE); ++ DCHECK(formatted_string->isEmpty() == true); + UErrorCode error = U_ZERO_ERROR; + FormatNumberInPlural(*detailed_format_[units][0], value_1, + formatted_string, &error); +@@ -281,7 +281,7 @@ std::unique_ptr Formatter::InitFormat( + base::string16 pattern = l10n_util::GetStringUTF16(pluralities.id); + UErrorCode error = U_ZERO_ERROR; + std::unique_ptr format(new icu::MessageFormat( +- icu::UnicodeString(FALSE, pattern.data(), pattern.length()), error)); ++ icu::UnicodeString(false, pattern.data(), pattern.length()), error)); + DCHECK(U_SUCCESS(error)); + if (format.get()) + return format; +-- +cgit v1.2.1 +