diff options
author | cpm <cpm@FreeBSD.org> | 2018-07-22 18:28:49 +0800 |
---|---|---|
committer | cpm <cpm@FreeBSD.org> | 2018-07-22 18:28:49 +0800 |
commit | dd58a310c74e357174b6604ab724ea296cf246a5 (patch) | |
tree | 029b1a5de0832499b90c4e4c54ec7bbff32684c1 /www | |
parent | b30535b46dd27a53117ecf7fd08a4f785c7b8eff (diff) | |
download | freebsd-ports-gnome-dd58a310c74e357174b6604ab724ea296cf246a5.tar.gz freebsd-ports-gnome-dd58a310c74e357174b6604ab724ea296cf246a5.tar.zst freebsd-ports-gnome-dd58a310c74e357174b6604ab724ea296cf246a5.zip |
www/chromium: update to 67.0.3396.87
Changelog: https://chromium.googlesource.com/chromium/src/+log/65.0.3325.181..67.0.3396.87?pretty=fuller&n=10000
MFH: 2018Q3
Security: https://vuxml.freebsd.org/freebsd/36ff7a74-47b1-11e8-a7d6-54e1ad544088.html
Security: https://vuxml.freebsd.org/freebsd/006bee4e-4c49-11e8-9c32-54ee754af08e.html
Security: https://vuxml.freebsd.org/freebsd/e457978b-5484-11e8-9b85-54ee754af08e.html
Security: https://vuxml.freebsd.org/freebsd/427b0f58-644c-11e8-9e1b-e8e0b747a45a.html
Security: https://vuxml.freebsd.org/freebsd/4cb49a23-6c89-11e8-8b33-e8e0b747a45a.html
Diffstat (limited to 'www')
165 files changed, 2112 insertions, 1329 deletions
diff --git a/www/chromium/Makefile b/www/chromium/Makefile index cdecd7234d7d..cf8ec63a1d3b 100644 --- a/www/chromium/Makefile +++ b/www/chromium/Makefile @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= chromium -PORTVERSION= 65.0.3325.181 -PORTREVISION= 6 +PORTVERSION= 67.0.3396.87 CATEGORIES?= www MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/ DISTFILES= ${DISTNAME}${EXTRACT_SUFX} @@ -19,7 +18,8 @@ BUILD_DEPENDS= bash:shells/bash \ ${PYTHON_PKGNAMEPREFIX}ply>0:devel/py-ply@${PY_FLAVOR} \ .if !defined(GN_ONLY) -BUILD_DEPENDS+= gperf:devel/gperf \ +BUILD_DEPENDS+= git:devel/git \ + gperf:devel/gperf \ yasm:devel/yasm \ ffmpeg>=3.2.2,1:multimedia/ffmpeg \ flock:sysutils/flock \ @@ -49,7 +49,6 @@ LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-atk \ libpng.so:graphics/png \ libwebp.so:graphics/webp \ libavcodec.so:multimedia/ffmpeg \ - libvpx.so:multimedia/libvpx \ libopenh264.so:multimedia/openh264 \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ @@ -121,7 +120,6 @@ GN_ARGS+= clang_use_chrome_plugins=false \ use_system_freetype=true \ use_system_harfbuzz=true \ use_system_libjpeg=true \ - use_system_sqlite=false \ extra_cxxflags="-I${LOCALBASE}/include" \ extra_ldflags="-L${LOCALBASE}/lib" # TODO: investigate building with these options: @@ -243,7 +241,7 @@ pre-configure: #./build/linux/unbundle/remove_bundled_libraries.py [list of preserved] cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} \ ./build/linux/unbundle/replace_gn_files.py --system-libraries \ - ffmpeg flac freetype harfbuzz-ng libdrm libvpx libwebp libxml libxslt openh264 opus snappy yasm || ${FALSE} + ffmpeg flac freetype harfbuzz-ng libdrm libusb libwebp libxml libxslt openh264 opus snappy yasm || ${FALSE} .endif do-configure: diff --git a/www/chromium/distinfo b/www/chromium/distinfo index e6c679a2da1d..301e2d681692 100644 --- a/www/chromium/distinfo +++ b/www/chromium/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1521889794 -SHA256 (chromium-65.0.3325.181.tar.xz) = 93666448c6b96ec83e6a35a64cff40db4eb92a154fe1db4e7dab4761d0e38687 -SIZE (chromium-65.0.3325.181.tar.xz) = 570386836 -SHA256 (chromium-65.0.3325.181-testdata.tar.xz) = 03018143ffe8c96ca2710e0c48bb19f1e122cf07394f15b73a814c2f6b2a3cdb -SIZE (chromium-65.0.3325.181-testdata.tar.xz) = 252462976 +TIMESTAMP = 1531563535 +SHA256 (chromium-67.0.3396.87.tar.xz) = 5d27a72f0cb8247343034f63fdd9747ff388c05b9fceb541668dd04fb372db1d +SIZE (chromium-67.0.3396.87.tar.xz) = 591491608 +SHA256 (chromium-67.0.3396.87-testdata.tar.xz) = 091923fca8baca0e949d1d8e490cabdec0a536c3af3d67d398c6465b67c5fb3c +SIZE (chromium-67.0.3396.87-testdata.tar.xz) = 261857908 diff --git a/www/chromium/files/audio_manager_openbsd.cc b/www/chromium/files/audio_manager_openbsd.cc index ffcd9eef94fb..1b021dd0833a 100644 --- a/www/chromium/files/audio_manager_openbsd.cc +++ b/www/chromium/files/audio_manager_openbsd.cc @@ -167,10 +167,10 @@ std::unique_ptr<media::AudioManager> CreateAudioManager( DLOG(WARNING) << "CreateAudioManager"; #if defined(USE_SNDIO) UMA_HISTOGRAM_ENUMERATION("Media.OpenBSDAudioIO", kSndio, kAudioIOMax + 1); - return base::MakeUnique<AudioManagerOpenBSD>(std::move(audio_thread), + return std::make_unique<AudioManagerOpenBSD>(std::move(audio_thread), audio_log_factory); #else - return base::MakeUnique<FakeAudioManager>(std::move(audio_thread), + return std::make_unique<FakeAudioManager>(std::move(audio_thread), audio_log_factory); #endif diff --git a/www/chromium/files/extra-patch-llvm-base b/www/chromium/files/extra-patch-llvm-base index 9a32190d6ad9..434eeac7b442 100644 --- a/www/chromium/files/extra-patch-llvm-base +++ b/www/chromium/files/extra-patch-llvm-base @@ -43,3 +43,79 @@ forward_variables_from(invoker, [ +--- build/config/compiler/BUILD.gn.orig 2018-06-13 00:10:02.000000000 +0200 ++++ build/config/compiler/BUILD.gn 2018-07-21 13:05:54.418405000 +0200 +@@ -51,7 +51,7 @@ + # only two architectures that are currently checked in). Turn this off when + # you are using a custom toolchain and need to control -B in cflags. + linux_use_bundled_binutils = +- linux_use_bundled_binutils_override && is_linux && ++ linux_use_bundled_binutils_override && (is_linux && !is_bsd) && + (current_cpu == "x64" || current_cpu == "x86") + binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", + root_build_dir) +@@ -375,8 +375,6 @@ + "-Wl,-z,relro", + ] + if (!using_sanitizer) { +- ldflags += [ "-Wl,-z,defs" ] +- + # Functions interposed by the sanitizers can make ld think + # that some libraries aren't needed when they actually are, + # http://crbug.com/234010. As workaround, disable --as-needed. +@@ -467,7 +465,7 @@ + # TODO(hans): Remove this once Clang generates better optimized debug info by + # default. https://crbug.com/765793 + if (is_clang && !is_nacl && current_toolchain == host_toolchain && +- target_os != "chromeos") { ++ target_os != "chromeos" && !is_bsd) { + cflags += [ + "-Xclang", + "-mllvm", +@@ -708,7 +706,7 @@ + cflags += [ "-mtune=$arm_tune" ] + } + } else if (current_cpu == "arm64") { +- if (is_clang && !is_android && !is_nacl && !is_fuchsia) { ++ if (is_clang && !is_android && !is_nacl && !is_fuchsia && !is_bsd) { + cflags += [ "--target=aarch64-linux-gnu" ] + ldflags += [ "--target=aarch64-linux-gnu" ] + } +@@ -1387,10 +1385,6 @@ + + # TODO(hans): https://crbug.com/766891 + "-Wno-null-pointer-arithmetic", +- +- # Ignore warnings about MSVC optimization pragmas. +- # TODO(thakis): Only for no_chromium_code? http://crbug.com/505314 +- "-Wno-ignored-pragma-optimize", + ] + if (llvm_force_head_revision) { + cflags += [ +@@ -2096,7 +2090,7 @@ + # [1] crrev.com/a81d5ade0b043208e06ad71a38bcf9c348a1a52f + cflags += [ "-gdwarf-3" ] + } +- cflags += [ "-g2" ] ++ cflags += [ "-g0" ] + } + if (use_debug_fission && !is_nacl) { + cflags += [ "-gsplit-dwarf" ] +@@ -2110,7 +2104,7 @@ + # DWARF info may be corrupt; offsets in a range list entry are in different + # sections" there. Maybe just a bug in nacl_switch_32.S. + if (!is_mac && !is_ios && !is_nacl && target_cpu != "x86" && +- (use_gold || use_lld)) { ++ (use_gold || use_lld) && !is_bsd) { + if (is_clang) { + # This flag enables the GNU-format pubnames and pubtypes sections, + # which lld needs in order to generate a correct GDB index. +@@ -2207,7 +2201,7 @@ + if (!is_win && fatal_linker_warnings && + !(is_chromeos && current_cpu == "arm") && + !(is_android && use_order_profiling) && !is_mac && !is_ios && +- current_os != "aix") { ++ current_os != "aix" && !is_bsd) { + # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 + # TODO(lizeb,pasko): Fix link errors when linking with order_profiling=1 + # crbug.com/485542 diff --git a/www/chromium/files/extra-patch-llvm-port b/www/chromium/files/extra-patch-llvm-port index 1e59c7000b4c..a1ef24de0b17 100644 --- a/www/chromium/files/extra-patch-llvm-port +++ b/www/chromium/files/extra-patch-llvm-port @@ -1,6 +1,6 @@ ---- build/toolchain/gcc_toolchain.gni.orig 2017-06-05 19:03:01 UTC -+++ build/toolchain/gcc_toolchain.gni -@@ -19,6 +19,11 @@ analyzer_wrapper = +--- build/toolchain/gcc_toolchain.gni.orig 2018-06-13 00:10:02.000000000 +0200 ++++ build/toolchain/gcc_toolchain.gni 2018-07-21 12:38:45.107087000 +0200 +@@ -25,6 +25,11 @@ rebase_path("//build/toolchain/clang_static_analyzer_wrapper.py", root_build_dir) + " --mode=clang" @@ -12,7 +12,22 @@ # This template defines a toolchain for something that works like gcc # (including clang). # -@@ -548,13 +553,22 @@ template("clang_toolchain") { +@@ -343,12 +348,12 @@ + # We use slightly different arflags for AIX. + extra_arflags = "-r -c -s" + } else { +- extra_arflags = "-r -c -s -D" ++ extra_arflags = "rcsD" + } + + # Almost all targets build with //build/config/compiler:thin_archive which + # adds -T to arflags. +- command = "$python_path \"$ar_wrapper\"$whitelist_flag --output={{output}} --ar=\"$ar\" \"{{arflags}} $extra_arflags\" @\"$rspfile\"" ++ command = "$python_path \"$ar_wrapper\"$whitelist_flag --output={{output}} --ar=\"$ar\" {{arflags}} $extra_arflags @\"$rspfile\"" + description = "AR {{output}}" + rspfile_content = "{{inputs}}" + outputs = [ +@@ -608,13 +613,22 @@ } gcc_toolchain(target_name) { @@ -42,3 +57,92 @@ forward_variables_from(invoker, [ +--- build/config/compiler/BUILD.gn.orig 2018-06-13 00:10:02.000000000 +0200 ++++ build/config/compiler/BUILD.gn 2018-07-21 12:57:03.823912000 +0200 +@@ -51,7 +51,7 @@ + # only two architectures that are currently checked in). Turn this off when + # you are using a custom toolchain and need to control -B in cflags. + linux_use_bundled_binutils = +- linux_use_bundled_binutils_override && is_linux && ++ linux_use_bundled_binutils_override && (is_linux && !is_bsd) && + (current_cpu == "x64" || current_cpu == "x86") + binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", + root_build_dir) +@@ -375,8 +375,6 @@ + "-Wl,-z,relro", + ] + if (!using_sanitizer) { +- ldflags += [ "-Wl,-z,defs" ] +- + # Functions interposed by the sanitizers can make ld think + # that some libraries aren't needed when they actually are, + # http://crbug.com/234010. As workaround, disable --as-needed. +@@ -467,7 +465,7 @@ + # TODO(hans): Remove this once Clang generates better optimized debug info by + # default. https://crbug.com/765793 + if (is_clang && !is_nacl && current_toolchain == host_toolchain && +- target_os != "chromeos") { ++ target_os != "chromeos" && !is_bsd) { + cflags += [ + "-Xclang", + "-mllvm", +@@ -708,7 +706,7 @@ + cflags += [ "-mtune=$arm_tune" ] + } + } else if (current_cpu == "arm64") { +- if (is_clang && !is_android && !is_nacl && !is_fuchsia) { ++ if (is_clang && !is_android && !is_nacl && !is_fuchsia && !is_bsd) { + cflags += [ "--target=aarch64-linux-gnu" ] + ldflags += [ "--target=aarch64-linux-gnu" ] + } +@@ -1387,10 +1385,6 @@ + + # TODO(hans): https://crbug.com/766891 + "-Wno-null-pointer-arithmetic", +- +- # Ignore warnings about MSVC optimization pragmas. +- # TODO(thakis): Only for no_chromium_code? http://crbug.com/505314 +- "-Wno-ignored-pragma-optimize", + ] + if (llvm_force_head_revision) { + cflags += [ +@@ -1572,9 +1566,9 @@ + if ((is_posix && !is_nacl) || is_fuchsia) { + # TODO(thomasanderson): Enable on ChromeOS builds once + # https://crbug.com/829956 is fixed. +- if (default_toolchain != "//build/toolchain/cros:target") { +- arflags = [ "-T" ] +- } ++ # if (default_toolchain != "//build/toolchain/cros:target") { ++ # arflags = [ "-T" ] ++ # } + } + } + +@@ -2096,7 +2090,7 @@ + # [1] crrev.com/a81d5ade0b043208e06ad71a38bcf9c348a1a52f + cflags += [ "-gdwarf-3" ] + } +- cflags += [ "-g2" ] ++ cflags += [ "-g0" ] + } + if (use_debug_fission && !is_nacl) { + cflags += [ "-gsplit-dwarf" ] +@@ -2110,7 +2104,7 @@ + # DWARF info may be corrupt; offsets in a range list entry are in different + # sections" there. Maybe just a bug in nacl_switch_32.S. + if (!is_mac && !is_ios && !is_nacl && target_cpu != "x86" && +- (use_gold || use_lld)) { ++ (use_gold || use_lld) && !is_bsd) { + if (is_clang) { + # This flag enables the GNU-format pubnames and pubtypes sections, + # which lld needs in order to generate a correct GDB index. +@@ -2207,7 +2201,7 @@ + if (!is_win && fatal_linker_warnings && + !(is_chromeos && current_cpu == "arm") && + !(is_android && use_order_profiling) && !is_mac && !is_ios && +- current_os != "aix") { ++ current_os != "aix" && !is_bsd) { + # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 + # TODO(lizeb,pasko): Fix link errors when linking with order_profiling=1 + # crbug.com/485542 diff --git a/www/chromium/files/patch-BUILD.gn b/www/chromium/files/patch-BUILD.gn index 3ddf88089fb8..1d5eff6a4857 100644 --- a/www/chromium/files/patch-BUILD.gn +++ b/www/chromium/files/patch-BUILD.gn @@ -1,6 +1,6 @@ ---- BUILD.gn.orig 2018-02-24 16:25:08.000000000 +0100 -+++ BUILD.gn 2018-03-03 19:04:30.972689000 +0100 -@@ -361,7 +361,7 @@ +--- BUILD.gn.orig 2018-06-13 00:09:58.000000000 +0200 ++++ BUILD.gn 2018-07-14 12:26:56.482016000 +0200 +@@ -359,7 +359,7 @@ } } @@ -9,16 +9,16 @@ deps += [ "//third_party/breakpad:breakpad_unittests", "//third_party/breakpad:core-2-minidump", -@@ -406,8 +406,6 @@ +@@ -401,8 +401,6 @@ "//net:disk_cache_memory_test", "//net:quic_client", "//net:quic_server", - "//sandbox/linux:chrome_sandbox", - "//sandbox/linux:sandbox_linux_unittests", + "//testing:empty_main", ] - if (use_dbus) { -@@ -464,10 +462,6 @@ +@@ -460,10 +458,6 @@ "//chrome/test/chromedriver:chromedriver", "//chrome/test/chromedriver:chromedriver_tests", "//components/sync:run_sync_testserver", @@ -29,8 +29,8 @@ "//media/cast:generate_barcode_video", "//media/cast:generate_timecode_audio", "//net:crash_cache", -@@ -522,10 +516,6 @@ - "//mojo/edk/test:mojo_public_system_perftests", +@@ -519,10 +513,6 @@ + "//mojo:mojo_perftests", "//services/service_manager/public/cpp", "//testing/gmock:gmock_main", - "//third_party/breakpad:dump_syms($host_toolchain)", @@ -40,16 +40,16 @@ ] if (!is_android) { -@@ -593,7 +583,7 @@ - deps += - [ "//chrome/installer/mini_installer:next_version_mini_installer" ] +@@ -598,7 +588,7 @@ + host_os == "win") { + deps += [ "//chrome/test/mini_installer:mini_installer_tests" ] } - } else if (!is_android && !is_ios && !is_fuchsia) { + } else if (!is_android && !is_ios && !is_fuchsia && !is_bsd) { deps += [ "//third_party/breakpad:symupload($host_toolchain)" ] } -@@ -835,7 +825,6 @@ +@@ -818,7 +808,6 @@ "//ppapi/examples/video_decode", "//sandbox/linux:chrome_sandbox", "//sandbox/linux:sandbox_linux_unittests", @@ -57,7 +57,7 @@ # Blocked on https://github.com/catapult-project/catapult/issues/2297 #"//third_party/catapult/telemetry:bitmaptools", -@@ -939,7 +928,7 @@ +@@ -921,7 +910,7 @@ ] } @@ -66,7 +66,7 @@ data_deps += [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] } -@@ -948,7 +937,7 @@ +@@ -930,7 +919,7 @@ data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } @@ -75,7 +75,7 @@ data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } -@@ -1064,9 +1053,6 @@ +@@ -1055,9 +1044,6 @@ if (is_win) { data_deps += [ "//chrome/installer/mini_installer:mini_installer" ] @@ -84,4 +84,4 @@ - [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] } if (is_win || is_android) { - data_deps += [ "//chrome/test:angle_perftests" ] + data_deps += [ diff --git a/www/chromium/files/patch-base_files_file__path__watcher__stub.cc b/www/chromium/files/patch-base_files_file__path__watcher__stub.cc new file mode 100644 index 000000000000..cba69a675117 --- /dev/null +++ b/www/chromium/files/patch-base_files_file__path__watcher__stub.cc @@ -0,0 +1,51 @@ +--- base/files/file_path_watcher_stub.cc.orig 2018-07-19 23:00:07.807326000 +0200 ++++ base/files/file_path_watcher_stub.cc 2018-07-19 23:05:24.785603000 +0200 +@@ -1,14 +1,15 @@ +-// Copyright (c) 2012 The Chromium Authors. All rights reserved. ++// Copyright 2014 The Chromium Authors. All rights reserved. + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. + +-// This file exists for Unix systems which don't have the inotify headers, and +-// thus cannot build file_watcher_inotify.cc + +-#include "base/files/file_path_watcher.h" ++#include <memory> + ++#include "base/files/file_path_watcher.h" ++#include "base/files/file_path_watcher_kqueue.h" + #include "base/macros.h" + #include "base/memory/ptr_util.h" ++#include "build/build_config.h" + + namespace base { + +@@ -22,12 +23,26 @@ + bool Watch(const FilePath& path, + bool recursive, + const FilePathWatcher::Callback& callback) override { +- return false; ++ DCHECK(!impl_.get()); ++ if (recursive) { ++ if (!FilePathWatcher::RecursiveWatchAvailable()) ++ return false; ++ } else { ++ impl_ = std::make_unique<FilePathWatcherKQueue>(); ++ } ++ DCHECK(impl_.get()); ++ return impl_->Watch(path, recursive, callback); + } + +- void Cancel() override {} ++ void Cancel() override { ++ if (impl_.get()) ++ impl_->Cancel(); ++ set_cancelled(); ++ } + + private: ++ std::unique_ptr<PlatformDelegate> impl_; ++ + DISALLOW_COPY_AND_ASSIGN(FilePathWatcherImpl); + }; + diff --git a/www/chromium/files/patch-base_process_kill.h b/www/chromium/files/patch-base_process_kill.h new file mode 100644 index 000000000000..b8da5df6eb71 --- /dev/null +++ b/www/chromium/files/patch-base_process_kill.h @@ -0,0 +1,11 @@ +--- base/process/kill.h.orig 2018-07-19 22:11:43.638992000 +0200 ++++ base/process/kill.h 2018-07-19 22:12:06.613065000 +0200 +@@ -111,7 +111,7 @@ + BASE_EXPORT TerminationStatus GetKnownDeadTerminationStatus( + ProcessHandle handle, int* exit_code); + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + // Spawns a thread to wait asynchronously for the child |process| to exit + // and then reaps it. + BASE_EXPORT void EnsureProcessGetsReaped(Process process); diff --git a/www/chromium/files/patch-base_process_kill_posix.cc b/www/chromium/files/patch-base_process_kill_posix.cc new file mode 100644 index 000000000000..0f24fdcd8226 --- /dev/null +++ b/www/chromium/files/patch-base_process_kill_posix.cc @@ -0,0 +1,11 @@ +--- base/process/kill_posix.cc.orig 2018-07-19 22:11:49.327358000 +0200 ++++ base/process/kill_posix.cc 2018-07-19 22:12:22.837132000 +0200 +@@ -167,7 +167,7 @@ + 0, new BackgroundReaper(std::move(process), TimeDelta::FromSeconds(2))); + } + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + void EnsureProcessGetsReaped(Process process) { + DCHECK(!process.is_current()); + diff --git a/www/chromium/files/patch-base_process_process__handle.cc b/www/chromium/files/patch-base_process_process__handle.cc new file mode 100644 index 000000000000..5ba037371727 --- /dev/null +++ b/www/chromium/files/patch-base_process_process__handle.cc @@ -0,0 +1,11 @@ +--- base/process/process_handle.cc.orig 2018-07-19 22:31:30.212555000 +0200 ++++ base/process/process_handle.cc 2018-07-19 22:32:27.185612000 +0200 +@@ -39,7 +39,7 @@ + return g_unique_id; + } + +-#if defined(OS_LINUX) || defined(OS_AIX) ++#if defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) + + void InitUniqueIdForProcessInPidNamespace(ProcessId pid_outside_of_namespace) { + g_unique_id = MangleProcessId(pid_outside_of_namespace); diff --git a/www/chromium/files/patch-base_process_process__handle.h b/www/chromium/files/patch-base_process_process__handle.h new file mode 100644 index 000000000000..a445193a491d --- /dev/null +++ b/www/chromium/files/patch-base_process_process__handle.h @@ -0,0 +1,11 @@ +--- base/process/process_handle.h.orig 2018-07-19 22:31:39.988330000 +0200 ++++ base/process/process_handle.h 2018-07-19 22:32:06.977544000 +0200 +@@ -64,7 +64,7 @@ + // a process's PID. + BASE_EXPORT uint32_t GetUniqueIdForProcess(); + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + // When a process is started in a different PID namespace from the browser + // process, this function must be called with the process's PID in the browser's + // PID namespace in order to initialize its unique ID. Not thread safe. diff --git a/www/chromium/files/patch-base_process_process__metrics__freebsd.cc b/www/chromium/files/patch-base_process_process__metrics__freebsd.cc index 22259506b400..26b1ceef669b 100644 --- a/www/chromium/files/patch-base_process_process__metrics__freebsd.cc +++ b/www/chromium/files/patch-base_process_process__metrics__freebsd.cc @@ -1,8 +1,8 @@ ---- base/process/process_metrics_freebsd.cc.orig 2018-02-24 16:25:08.000000000 +0100 -+++ base/process/process_metrics_freebsd.cc 2018-03-03 19:25:40.067505000 +0100 -@@ -12,6 +12,10 @@ - #include "base/macros.h" +--- base/process/process_metrics_freebsd.cc.orig 2018-06-13 00:10:01.000000000 +0200 ++++ base/process/process_metrics_freebsd.cc 2018-07-20 00:07:42.005261000 +0200 +@@ -13,6 +13,10 @@ #include "base/memory/ptr_util.h" + #include "base/process/process_metrics_iocounters.h" +#include <unistd.h> /* getpagesize() */ +#include <fcntl.h> /* O_RDONLY */ @@ -11,19 +11,7 @@ namespace base { ProcessMetrics::ProcessMetrics(ProcessHandle process) -@@ -25,6 +29,11 @@ - return WrapUnique(new ProcessMetrics(process)); - } - -+bool GetVmStatInfo(VmStatInfo* vmstat) { -+ NOTIMPLEMENTED(); -+ return false; -+} -+ - size_t ProcessMetrics::GetPagefileUsage() const { - struct kinfo_proc info; - int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process_ }; -@@ -118,6 +127,60 @@ +@@ -61,6 +65,65 @@ pagesize = getpagesize(); return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize); @@ -81,6 +69,11 @@ + meminfo->swap_free = (swap_total - swap_used) * pagesizeKB; + + return true; ++} ++ ++uint64_t ProcessMetrics::GetVmSwapBytes() const { ++ NOTIMPLEMENTED(); ++ return 0; } } // namespace base diff --git a/www/chromium/files/patch-build_config_allocator.gni b/www/chromium/files/patch-build_config_allocator.gni index ef4e8f3b8031..d963319c4622 100644 --- a/www/chromium/files/patch-build_config_allocator.gni +++ b/www/chromium/files/patch-build_config_allocator.gni @@ -1,15 +1,15 @@ ---- build/config/allocator.gni.orig 2017-07-25 21:04:48.000000000 +0200 -+++ build/config/allocator.gni 2017-08-01 23:13:58.535952000 +0200 -@@ -7,7 +7,7 @@ +--- build/config/allocator.gni.orig 2018-06-13 00:10:02.000000000 +0200 ++++ build/config/allocator.gni 2018-07-14 13:12:35.947359000 +0200 +@@ -6,7 +6,7 @@ + # Temporarily disable tcmalloc on arm64 linux to get rid of compilation errors. - if (is_android || current_cpu == "mipsel" || is_mac || is_ios || is_asan || - is_lsan || is_tsan || is_msan || is_win || is_syzyasan || is_fuchsia || -- (is_linux && target_cpu == "arm64")) { -+ (is_linux && target_cpu == "arm64") || is_bsd) { + if (is_android || is_mac || is_ios || is_asan || is_lsan || is_tsan || +- is_msan || is_win || is_fuchsia || (is_linux && target_cpu == "arm64")) { ++ is_msan || is_win || is_fuchsia || (is_linux && target_cpu == "arm64") || is_bsd) { _default_allocator = "none" } else { _default_allocator = "tcmalloc" -@@ -18,7 +18,7 @@ +@@ -17,7 +17,7 @@ # against the debug CRT with "is_nacl=false". if ((is_linux || is_android || is_mac || (is_win && !is_component_build && !is_debug)) && !is_asan && !is_lsan && diff --git a/www/chromium/files/patch-build_config_compiler_BUILD.gn b/www/chromium/files/patch-build_config_compiler_BUILD.gn deleted file mode 100644 index 143285f0120b..000000000000 --- a/www/chromium/files/patch-build_config_compiler_BUILD.gn +++ /dev/null @@ -1,93 +0,0 @@ ---- build/config/compiler/BUILD.gn.orig 2018-03-20 23:05:14.000000000 +0100 -+++ build/config/compiler/BUILD.gn 2018-03-24 12:40:43.469299000 +0100 -@@ -48,7 +48,7 @@ - # only two architectures that are currently checked in). Turn this off when - # you are using a custom toolchain and need to control -B in cflags. - linux_use_bundled_binutils = -- linux_use_bundled_binutils_override && is_linux && -+ linux_use_bundled_binutils_override && (is_linux && !is_bsd) && - (current_cpu == "x64" || current_cpu == "x86") - binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", - root_build_dir) -@@ -365,8 +365,6 @@ - "-Wl,-z,relro", - ] - if (!using_sanitizer) { -- ldflags += [ "-Wl,-z,defs" ] -- - # Functions interposed by the sanitizers can make ld think - # that some libraries aren't needed when they actually are, - # http://crbug.com/234010. As workaround, disable --as-needed. -@@ -469,7 +467,7 @@ - # TODO(hans): Remove this once Clang generates better optimized debug info by - # default. https://crbug.com/765793 - if (is_clang && !is_nacl && current_toolchain == host_toolchain && -- target_os != "chromeos") { -+ target_os != "chromeos" && !is_bsd) { - cflags += [ - "-Xclang", - "-mllvm", -@@ -667,7 +665,7 @@ - cflags += [ "-mtune=$arm_tune" ] - } - } else if (current_cpu == "arm64") { -- if (is_clang && !is_android && !is_nacl && !is_fuchsia) { -+ if (is_clang && !is_android && !is_nacl && !is_fuchsia && !is_bsd) { - cflags += [ "--target=aarch64-linux-gnu" ] - ldflags += [ "--target=aarch64-linux-gnu" ] - } -@@ -1317,27 +1315,8 @@ - # TODO(hans): https://crbug.com/637306 - "-Wno-address-of-packed-member", - -- # TODO(hans): https://crbug.com/681136 -- "-Wno-unused-lambda-capture", -- - # TODO(thakis ): https://crbug.com/683349 - "-Wno-user-defined-warnings", -- -- # TODO(thakis): https://crbug.com/753973 -- "-Wno-enum-compare-switch", -- -- # TODO(hans): https://crbug.com/763392 -- "-Wno-tautological-unsigned-zero-compare", -- -- # TODO(hans): https://crbug.com/766891 -- "-Wno-null-pointer-arithmetic", -- -- # TODO(hans): https://crbug.com/767059 -- # Disable -Wtautological-constant-compare (and implicitly also -- # -Wtautological-unsigned-enum-zero-compare), but re-enable -- # useful sub-diagnostics in that group. -- "-Wno-tautological-constant-compare", -- "-Wtautological-constant-out-of-range-compare", - ] - } else if (use_xcode_clang) { - cflags += [ -@@ -1952,7 +1931,7 @@ - # [1] crrev.com/a81d5ade0b043208e06ad71a38bcf9c348a1a52f - cflags += [ "-gdwarf-3" ] - } -- cflags += [ "-g2" ] -+ cflags += [ "-g0" ] - } - if (use_debug_fission && !is_nacl) { - cflags += [ "-gsplit-dwarf" ] -@@ -1966,7 +1945,7 @@ - # DWARF info may be corrupt; offsets in a range list entry are in different - # sections" there. Maybe just a bug in nacl_switch_32.S. - if (!is_mac && !is_ios && !is_nacl && target_cpu != "x86" && -- (use_gold || use_lld)) { -+ (use_gold || use_lld) && !is_bsd) { - if (is_clang) { - # This flag enables the GNU-format pubnames and pubtypes sections, - # which lld needs in order to generate a correct GDB index. -@@ -2052,7 +2031,7 @@ - if (!is_win && fatal_linker_warnings && - !(is_chromeos && current_cpu == "arm") && - !(is_android && use_order_profiling) && !is_mac && !is_ios && -- current_os != "aix") { -+ current_os != "aix" && !is_bsd) { - # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 - # TODO(lizeb,pasko): Fix link errors when linking with order_profiling=1 - # crbug.com/485542 diff --git a/www/chromium/files/patch-build_config_linux_BUILD.gn b/www/chromium/files/patch-build_config_linux_BUILD.gn new file mode 100644 index 000000000000..8622d398e2d8 --- /dev/null +++ b/www/chromium/files/patch-build_config_linux_BUILD.gn @@ -0,0 +1,11 @@ +--- build/config/linux/BUILD.gn.orig 2018-07-19 22:09:59.968726000 +0200 ++++ build/config/linux/BUILD.gn 2018-07-19 22:10:16.334896000 +0200 +@@ -28,7 +28,7 @@ + } + + if ((!is_chromeos || default_toolchain != "//build/toolchain/cros:target") && +- (!use_custom_libcxx || current_cpu == "mipsel")) { ++ (!use_custom_libcxx || current_cpu == "mipsel") && !is_bsd) { + libs = [ "atomic" ] + } + } diff --git a/www/chromium/files/patch-build_linux_unbundle_ffmpeg.gn b/www/chromium/files/patch-build_linux_unbundle_ffmpeg.gn new file mode 100644 index 000000000000..54b990f5fc64 --- /dev/null +++ b/www/chromium/files/patch-build_linux_unbundle_ffmpeg.gn @@ -0,0 +1,22 @@ +--- build/linux/unbundle/ffmpeg.gn.orig 2018-07-20 01:03:59.604084000 +0200 ++++ build/linux/unbundle/ffmpeg.gn 2018-07-20 01:04:45.406745000 +0200 +@@ -14,8 +14,8 @@ + ] + } + +-buildflag_header("ffmpeg_buildflags") { +- header = "ffmpeg_buildflags.h" ++buildflag_header("ffmpeg_features") { ++ header = "ffmpeg_features.h" + flags = [ "USE_SYSTEM_FFMPEG=true" ] + } + +@@ -30,7 +30,7 @@ + + source_set("ffmpeg") { + deps = [ +- ":ffmpeg_buildflags", ++ ":ffmpeg_features", + ":ffmpeg_shim", + ] + public_configs = [ ":system_ffmpeg" ] diff --git a/www/chromium/files/patch-build_linux_unbundle_libusb.gn b/www/chromium/files/patch-build_linux_unbundle_libusb.gn new file mode 100644 index 000000000000..55c6dbb7f971 --- /dev/null +++ b/www/chromium/files/patch-build_linux_unbundle_libusb.gn @@ -0,0 +1,27 @@ +--- build/linux/unbundle/libusb.gn.orig 2018-07-20 03:07:05.793992000 +0200 ++++ build/linux/unbundle/libusb.gn 2018-07-20 03:07:35.792417000 +0200 +@@ -0,0 +1,24 @@ ++# Copyright 2016 The Chromium Authors. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//build/config/linux/pkg_config.gni") ++import("//build/shim_headers.gni") ++ ++pkg_config("system_libusb") { ++ packages = [ "libusb-1.0" ] ++} ++ ++shim_headers("libusb_shim") { ++ root_path = "src/libusb" ++ headers = [ ++ "libusb.h", ++ ] ++} ++ ++source_set("libusb") { ++ deps = [ ++ ":libusb_shim", ++ ] ++ public_configs = [ ":system_libusb" ] ++} diff --git a/www/chromium/files/patch-build_linux_unbundle_replace_gn_files.py b/www/chromium/files/patch-build_linux_unbundle_replace_gn_files.py new file mode 100644 index 000000000000..5dd7a9d2391a --- /dev/null +++ b/www/chromium/files/patch-build_linux_unbundle_replace_gn_files.py @@ -0,0 +1,10 @@ +--- build/linux/unbundle/replace_gn_files.py.orig 2018-07-20 03:07:59.446131000 +0200 ++++ build/linux/unbundle/replace_gn_files.py 2018-07-20 03:08:31.519350000 +0200 +@@ -27,6 +27,7 @@ + 'libevent': 'base/third_party/libevent/BUILD.gn', + 'libjpeg': 'third_party/libjpeg.gni', + 'libpng': 'third_party/libpng/BUILD.gn', ++ 'libusb': 'third_party/libusb/BUILD.gn', + 'libvpx': 'third_party/libvpx/BUILD.gn', + 'libwebp': 'third_party/libwebp/BUILD.gn', + 'libxml': 'third_party/libxml/BUILD.gn', diff --git a/www/chromium/files/patch-chrome_browser_about__flags.cc b/www/chromium/files/patch-chrome_browser_about__flags.cc index 91c193713dba..13cdee68690f 100644 --- a/www/chromium/files/patch-chrome_browser_about__flags.cc +++ b/www/chromium/files/patch-chrome_browser_about__flags.cc @@ -1,6 +1,15 @@ ---- chrome/browser/about_flags.cc.orig 2018-03-20 23:05:16.000000000 +0100 -+++ chrome/browser/about_flags.cc 2018-03-24 13:04:35.001279000 +0100 -@@ -2429,12 +2429,12 @@ +--- chrome/browser/about_flags.cc.orig 2018-06-13 00:10:04.000000000 +0200 ++++ chrome/browser/about_flags.cc 2018-07-20 16:41:11.196156000 +0200 +@@ -593,7 +593,7 @@ + switches::kForceDirectionRTL}, + }; + +-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) ++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD) + // Feature used to enable the identification of open tabs given URLs in + // suggestions, and converting those suggestions to ones that allow switching to + // the tab if found. Currently only on the desktop. Includes button option +@@ -2441,12 +2441,12 @@ flag_descriptions::kEnableMaterialDesignExtensionsDescription, kOsDesktop, FEATURE_VALUE_TYPE(features::kMaterialDesignExtensions)}, #endif // ENABLE_EXTENSIONS @@ -15,7 +24,7 @@ {"enable-origin-trials", flag_descriptions::kOriginTrialsName, flag_descriptions::kOriginTrialsDescription, kOsAll, FEATURE_VALUE_TYPE(features::kOriginTrials)}, -@@ -3047,7 +3047,7 @@ +@@ -3058,7 +3058,7 @@ flag_descriptions::kLeftToRightUrlsDescription, kOsDesktop, FEATURE_VALUE_TYPE(features::kLeftToRightUrls)}, @@ -24,7 +33,7 @@ {"omnibox-entity-suggestions", flag_descriptions::kOmniboxEntitySuggestionsName, flag_descriptions::kOmniboxEntitySuggestionsDescription, kOsDesktop, -@@ -3066,7 +3066,7 @@ +@@ -3077,7 +3077,7 @@ {"enable-new-app-menu-icon", flag_descriptions::kEnableNewAppMenuIconName, flag_descriptions::kEnableNewAppMenuIconDescription, kOsDesktop, FEATURE_VALUE_TYPE(features::kAnimatedAppMenuIcon)}, diff --git a/www/chromium/files/patch-chrome_browser_browser__process__impl.cc b/www/chromium/files/patch-chrome_browser_browser__process__impl.cc index 672652837c66..bae35a6d02aa 100644 --- a/www/chromium/files/patch-chrome_browser_browser__process__impl.cc +++ b/www/chromium/files/patch-chrome_browser_browser__process__impl.cc @@ -1,6 +1,6 @@ ---- chrome/browser/browser_process_impl.cc.orig 2017-12-15 02:04:08.000000000 +0100 -+++ chrome/browser/browser_process_impl.cc 2017-12-24 00:34:24.918627000 +0100 -@@ -170,7 +170,7 @@ +--- chrome/browser/browser_process_impl.cc.orig 2018-06-13 00:10:04.000000000 +0200 ++++ chrome/browser/browser_process_impl.cc 2018-07-14 13:27:02.197056000 +0200 +@@ -180,7 +180,7 @@ #include "chrome/browser/media/webrtc/webrtc_log_uploader.h" #endif @@ -9,12 +9,12 @@ #include "chrome/browser/resource_coordinator/tab_manager.h" #endif -@@ -813,7 +813,7 @@ +@@ -856,7 +856,7 @@ resource_coordinator::TabManager* BrowserProcessImpl::GetTabManager() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); -#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) - if (!tab_manager_) - tab_manager_ = base::MakeUnique<resource_coordinator::TabManager>(); - return tab_manager_.get(); + if (!tab_manager_) { + tab_manager_ = std::make_unique<resource_coordinator::TabManager>(); + tab_lifecycle_unit_source_ = diff --git a/www/chromium/files/patch-chrome_browser_browser__resources.grd b/www/chromium/files/patch-chrome_browser_browser__resources.grd index da2dd81c114e..c3bd477966d3 100644 --- a/www/chromium/files/patch-chrome_browser_browser__resources.grd +++ b/www/chromium/files/patch-chrome_browser_browser__resources.grd @@ -1,24 +1,6 @@ ---- chrome/browser/browser_resources.grd.orig 2018-02-24 16:25:09.000000000 +0100 -+++ chrome/browser/browser_resources.grd 2018-03-04 09:28:51.895810000 +0100 -@@ -77,7 +77,7 @@ - </if> - </structures> - <includes> -- <if expr="is_win or is_macosx or is_linux"> -+ <if expr="is_win or is_macosx or is_posix"> - <include name="IDR_ABOUT_DISCARDS_CSS" file="resources\discards\discards.css" type="BINDATA" /> - <include name="IDR_ABOUT_DISCARDS_HTML" file="resources\discards\discards.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" /> - <include name="IDR_ABOUT_DISCARDS_JS" file="resources\discards\discards.js" type="BINDATA" /> -@@ -369,7 +369,7 @@ - <if expr="chromeos"> - <include name="IDR_PLUGIN_DB_JSON" file="resources\plugin_metadata\plugins_chromeos.json" type="BINDATA" /> - </if> -- <if expr="desktop_linux or (is_android and enable_plugins)"> -+ <if expr="desktop_linux or (is_android and enable_plugins) or is_posix"> - <include name="IDR_PLUGIN_DB_JSON" file="resources\plugin_metadata\plugins_linux.json" type="BINDATA" /> - </if> - <if expr="is_android"> -@@ -619,7 +619,7 @@ +--- chrome/browser/browser_resources.grd.orig 2018-06-13 00:10:04.000000000 +0200 ++++ chrome/browser/browser_resources.grd 2018-07-14 13:48:09.392254000 +0200 +@@ -634,7 +634,7 @@ <include name="IDR_WELCOME_WIN10_PIN_WEBP" file="resources\welcome\pin.webp" type="BINDATA" /> </if> <include name="IDR_SSL_ERROR_ASSISTANT_PB" file="${root_gen_dir}/chrome/browser/resources/ssl/ssl_error_assistant/ssl_error_assistant.pb" use_base_dir="false" type="BINDATA" /> diff --git a/www/chromium/files/patch-chrome_browser_chrome__browser__main.cc b/www/chromium/files/patch-chrome_browser_chrome__browser__main.cc index 6cc2d0b19350..b94d601d1cb5 100644 --- a/www/chromium/files/patch-chrome_browser_chrome__browser__main.cc +++ b/www/chromium/files/patch-chrome_browser_chrome__browser__main.cc @@ -1,6 +1,6 @@ ---- chrome/browser/chrome_browser_main.cc.orig 2018-03-20 23:05:16.000000000 +0100 -+++ chrome/browser/chrome_browser_main.cc 2018-03-24 22:37:46.110352000 +0100 -@@ -206,7 +206,7 @@ +--- chrome/browser/chrome_browser_main.cc.orig 2018-06-13 00:10:04.000000000 +0200 ++++ chrome/browser/chrome_browser_main.cc 2018-07-14 13:55:52.288113000 +0200 +@@ -211,7 +211,7 @@ #include "chromeos/settings/cros_settings_names.h" #endif // defined(OS_CHROMEOS) @@ -9,7 +9,7 @@ #include "chrome/browser/first_run/upgrade_util_linux.h" #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) -@@ -244,7 +244,7 @@ +@@ -251,7 +251,7 @@ #endif // defined(OS_WIN) #if defined(OS_WIN) || defined(OS_MACOSX) || \ @@ -18,8 +18,21 @@ #include "chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h" #endif -@@ -737,7 +737,7 @@ - field_trial_synchronizer_ = new FieldTrialSynchronizer(); +@@ -1342,10 +1342,10 @@ + } + #endif // !defined(OS_ANDROID) && !defined(OS_CHROMEOS) + +-#if defined(OS_LINUX) || defined(OS_OPENBSD) ++#if defined(OS_LINUX) + // Set the product channel for crash reports. + breakpad::SetChannelCrashKey(chrome::GetChannelName()); +-#endif // defined(OS_LINUX) || defined(OS_OPENBSD) ++#endif // defined(OS_LINUX) + + #if defined(OS_MACOSX) + // Get the Keychain API to register for distributed notifications on the main +@@ -1369,7 +1369,7 @@ + } #if defined(OS_WIN) || defined(OS_MACOSX) || \ - (defined(OS_LINUX) && !defined(OS_CHROMEOS)) @@ -27,16 +40,7 @@ metrics::DesktopSessionDurationTracker::Initialize(); #endif metrics::RendererUptimeTracker::Initialize(); -@@ -1145,7 +1145,7 @@ - } - #endif // !defined(OS_ANDROID) && !defined(OS_CHROMEOS) - --#if defined(OS_LINUX) || defined(OS_OPENBSD) -+#if defined(OS_LINUX) - // Set the product channel for crash reports. - breakpad::SetChannelCrashKey(chrome::GetChannelString()); - #endif // defined(OS_LINUX) || defined(OS_OPENBSD) -@@ -1351,7 +1351,7 @@ +@@ -1514,7 +1514,7 @@ // Start the tab manager here so that we give the most amount of time for the // other services to start up before we start adjusting the oom priority. diff --git a/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.cc b/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.cc index f2e640f9788f..4e67be0738ae 100644 --- a/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.cc +++ b/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.cc @@ -1,15 +1,15 @@ ---- chrome/browser/chrome_content_browser_client.cc.orig 2018-02-24 16:25:09.000000000 +0100 -+++ chrome/browser/chrome_content_browser_client.cc 2018-03-03 20:34:31.799512000 +0100 -@@ -281,7 +281,7 @@ +--- chrome/browser/chrome_content_browser_client.cc.orig 2018-06-13 00:10:04.000000000 +0200 ++++ chrome/browser/chrome_content_browser_client.cc 2018-07-14 14:04:47.872292000 +0200 +@@ -305,7 +305,7 @@ #include "chromeos/chromeos_switches.h" #include "components/user_manager/user_manager.h" - #include "services/service_manager/public/interfaces/interface_provider_spec.mojom.h" + #include "services/service_manager/public/mojom/interface_provider_spec.mojom.h" -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) #include "chrome/browser/chrome_browser_main_linux.h" #elif defined(OS_ANDROID) #include "base/android/application_status_listener.h" -@@ -316,7 +316,7 @@ +@@ -342,7 +342,7 @@ #include "chrome/common/importer/profile_import.mojom.h" #endif @@ -18,7 +18,7 @@ #include "chrome/browser/webshare/share_service_impl.h" #endif -@@ -330,7 +330,7 @@ +@@ -356,7 +356,7 @@ #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h" #endif @@ -27,7 +27,7 @@ #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h" #endif -@@ -912,7 +912,7 @@ +@@ -1033,7 +1033,7 @@ main_parts = new ChromeBrowserMainPartsMac(parameters); #elif defined(OS_CHROMEOS) main_parts = new chromeos::ChromeBrowserMainPartsChromeos(parameters); @@ -36,7 +36,7 @@ main_parts = new ChromeBrowserMainPartsLinux(parameters); #elif defined(OS_ANDROID) main_parts = new ChromeBrowserMainPartsAndroid(parameters); -@@ -928,7 +928,7 @@ +@@ -1049,7 +1049,7 @@ // Construct additional browser parts. Stages are called in the order in // which they are added. #if defined(TOOLKIT_VIEWS) @@ -45,7 +45,7 @@ main_parts->AddParts(new ChromeBrowserMainExtraPartsViewsLinux()); #else main_parts->AddParts(new ChromeBrowserMainExtraPartsViews()); -@@ -1651,7 +1651,7 @@ +@@ -1789,7 +1789,7 @@ command_line->AppendSwitchASCII(switches::kMetricsClientID, client_info->client_id); } @@ -54,7 +54,7 @@ bool enable_crash_reporter = breakpad::IsCrashReporterEnabled(); #if defined(OS_CHROMEOS) // Chrome OS uses the OS-level crash_reporter for mash services, so disable -@@ -2913,7 +2913,7 @@ +@@ -3096,7 +3096,7 @@ } } @@ -63,7 +63,7 @@ void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( const base::CommandLine& command_line, int child_process_id, -@@ -2949,7 +2949,7 @@ +@@ -3132,7 +3132,7 @@ } #endif // defined(OS_ANDROID) } @@ -72,7 +72,7 @@ #if defined(OS_WIN) base::string16 ChromeContentBrowserClient::GetAppContainerSidForSandboxType( -@@ -3630,7 +3630,7 @@ +@@ -3806,7 +3806,7 @@ #if defined(OS_ANDROID) frame_interfaces_parameterized_->AddInterface(base::Bind( &ForwardToJavaWebContentsRegistry<blink::mojom::ShareService>)); diff --git a/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.h b/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.h index 462f310457ca..70e8ec6942f9 100644 --- a/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.h +++ b/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.h @@ -1,9 +1,9 @@ ---- chrome/browser/chrome_content_browser_client.h.orig 2017-12-15 02:04:08.000000000 +0100 -+++ chrome/browser/chrome_content_browser_client.h 2017-12-24 00:50:35.917227000 +0100 -@@ -291,12 +291,12 @@ +--- chrome/browser/chrome_content_browser_client.h.orig 2018-06-13 00:10:04.000000000 +0200 ++++ chrome/browser/chrome_content_browser_client.h 2018-07-14 14:13:02.407023000 +0200 +@@ -299,12 +299,12 @@ + void OverridePageVisibilityState( content::RenderFrameHost* render_frame_host, - blink::WebPageVisibilityState* visibility_state) override; - + blink::mojom::PageVisibilityState* visibility_state) override; -#if defined(OS_POSIX) && !defined(OS_MACOSX) +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD) void GetAdditionalMappedFilesForChildProcess( diff --git a/www/chromium/files/patch-chrome_browser_download_download__commands.cc b/www/chromium/files/patch-chrome_browser_download_download__commands.cc index bd4a290c0dbc..4533799135cf 100644 --- a/www/chromium/files/patch-chrome_browser_download_download__commands.cc +++ b/www/chromium/files/patch-chrome_browser_download_download__commands.cc @@ -1,6 +1,6 @@ ---- chrome/browser/download/download_commands.cc.orig 2017-06-05 19:03:02 UTC -+++ chrome/browser/download/download_commands.cc -@@ -219,7 +219,7 @@ bool DownloadCommands::IsCommandChecked(Command comman +--- chrome/browser/download/download_commands.cc.orig 2018-06-13 00:10:05.000000000 +0200 ++++ chrome/browser/download/download_commands.cc 2018-07-14 14:30:03.853964000 +0200 +@@ -249,7 +249,7 @@ return download_item_->GetOpenWhenComplete() || download_crx_util::IsExtensionDownload(*download_item_); case ALWAYS_OPEN_TYPE: @@ -8,17 +8,17 @@ +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) if (CanOpenPdfInSystemViewer()) { DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext( - download_item_->GetBrowserContext()); -@@ -263,7 +263,7 @@ void DownloadCommands::ExecuteCommand(Command command) + content::DownloadItemUtils::GetBrowserContext(download_item_)); +@@ -293,7 +293,7 @@ bool is_checked = IsCommandChecked(ALWAYS_OPEN_TYPE); DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext( - download_item_->GetBrowserContext()); + content::DownloadItemUtils::GetBrowserContext(download_item_)); -#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) if (CanOpenPdfInSystemViewer()) { prefs->SetShouldOpenPdfInSystemReader(!is_checked); DownloadItemModel(download_item_) -@@ -376,7 +376,7 @@ Browser* DownloadCommands::GetBrowser() const { +@@ -408,7 +408,7 @@ return browser_displayer.browser(); } @@ -27,7 +27,7 @@ bool DownloadCommands::IsDownloadPdf() const { base::FilePath path = download_item_->GetTargetFilePath(); return path.MatchesExtension(FILE_PATH_LITERAL(".pdf")); -@@ -393,7 +393,7 @@ bool DownloadCommands::CanOpenPdfInSystemViewer() cons +@@ -425,7 +425,7 @@ return IsDownloadPdf() && (IsAdobeReaderDefaultPDFViewer() ? is_adobe_pdf_reader_up_to_date : true); diff --git a/www/chromium/files/patch-chrome_browser_download_download__query.cc b/www/chromium/files/patch-chrome_browser_download_download__query.cc index 9bc543bcb3f6..b7bc9b8160b6 100644 --- a/www/chromium/files/patch-chrome_browser_download_download__query.cc +++ b/www/chromium/files/patch-chrome_browser_download_download__query.cc @@ -1,9 +1,9 @@ ---- chrome/browser/download/download_query.cc.orig 2017-04-19 19:06:29 UTC -+++ chrome/browser/download/download_query.cc +--- chrome/browser/download/download_query.cc.orig 2018-06-13 00:10:05.000000000 +0200 ++++ chrome/browser/download/download_query.cc 2018-07-15 13:01:15.987418000 +0200 @@ -27,7 +27,11 @@ + #include "components/download/public/common/download_item.h" #include "components/url_formatter/url_formatter.h" #include "content/public/browser/content_browser_client.h" - #include "content/public/browser/download_item.h" +#if defined(OS_BSD) +#include <re2/re2.h> +#else @@ -11,4 +11,4 @@ +#endif #include "url/gurl.h" - using content::DownloadDangerType; + using download::DownloadDangerType; diff --git a/www/chromium/files/patch-chrome_browser_download_download__status__updater.cc b/www/chromium/files/patch-chrome_browser_download_download__status__updater.cc index 01d364277b4f..db4acbe84cf1 100644 --- a/www/chromium/files/patch-chrome_browser_download_download__status__updater.cc +++ b/www/chromium/files/patch-chrome_browser_download_download__status__updater.cc @@ -1,5 +1,5 @@ ---- chrome/browser/download/download_status_updater.cc.orig 2017-06-05 19:03:02 UTC -+++ chrome/browser/download/download_status_updater.cc +--- chrome/browser/download/download_status_updater.cc.orig 2018-06-13 00:10:05.000000000 +0200 ++++ chrome/browser/download/download_status_updater.cc 2018-07-15 13:07:15.012034000 +0200 @@ -13,7 +13,7 @@ #include "base/memory/ptr_util.h" #include "build/build_config.h" @@ -9,10 +9,10 @@ #include "ui/views/linux_ui/linux_ui.h" #endif -@@ -136,7 +136,7 @@ void DownloadStatusUpdater::OnDownloadUpdated( +@@ -136,7 +136,7 @@ #if defined(OS_ANDROID) || (defined(USE_AURA) && !defined(OS_WIN)) void DownloadStatusUpdater::UpdateAppIconDownloadProgress( - content::DownloadItem* download) { + download::DownloadItem* download) { -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) const views::LinuxUI* linux_ui = views::LinuxUI::instance(); diff --git a/www/chromium/files/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc b/www/chromium/files/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc index 04582a63eefa..a7bdd4c23fb6 100644 --- a/www/chromium/files/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc +++ b/www/chromium/files/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc @@ -1,15 +1,15 @@ ---- chrome/browser/extensions/browser_context_keyed_service_factories.cc.orig 2017-09-05 21:05:12.000000000 +0200 -+++ chrome/browser/extensions/browser_context_keyed_service_factories.cc 2017-09-06 18:14:17.437338000 +0200 -@@ -61,7 +61,7 @@ - #include "chrome/browser/chromeos/extensions/input_method_api.h" +--- chrome/browser/extensions/browser_context_keyed_service_factories.cc.orig 2018-06-13 00:10:06.000000000 +0200 ++++ chrome/browser/extensions/browser_context_keyed_service_factories.cc 2018-07-15 13:15:07.666902000 +0200 +@@ -57,7 +57,7 @@ #include "chrome/browser/chromeos/extensions/media_player_api.h" #include "chrome/browser/extensions/api/input_ime/input_ime_api.h" + #include "chrome/browser/extensions/api/screenlock_private/screenlock_private_api.h" -#elif defined(OS_LINUX) || defined(OS_WIN) +#elif defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) #include "chrome/browser/extensions/api/input_ime/input_ime_api.h" #endif -@@ -105,7 +105,7 @@ +@@ -99,7 +99,7 @@ #if defined(OS_CHROMEOS) extensions::InputImeAPI::GetFactoryInstance(); extensions::InputMethodAPI::GetFactoryInstance(); diff --git a/www/chromium/files/patch-chrome_browser_media_router_providers_wired_display_wired_display_media_route_provider.cc b/www/chromium/files/patch-chrome_browser_media_router_providers_wired_display_wired_display_media_route_provider.cc new file mode 100644 index 000000000000..6d25ec73df5d --- /dev/null +++ b/www/chromium/files/patch-chrome_browser_media_router_providers_wired_display_wired_display_media_route_provider.cc @@ -0,0 +1,22 @@ +--- chrome/browser/media/router/providers/wired_display/wired_display_media_route_provider.cc.orig 2018-07-21 15:25:50.187627000 +0200 ++++ chrome/browser/media/router/providers/wired_display/wired_display_media_route_provider.cc 2018-07-21 15:28:47.631030000 +0200 +@@ -111,6 +111,11 @@ + bool incognito, + CreateRouteCallback callback) { + DCHECK(!base::ContainsKey(presentations_, presentation_id)); ++#if defined(OS_BSD) // XXX ++ std::move(callback).Run(base::nullopt, std::string("Not implemented"), ++ RouteRequestResult::UNKNOWN_ERROR); ++ return; ++#else + base::Optional<Display> display = GetDisplayBySinkId(sink_id); + if (!display) { + std::move(callback).Run(base::nullopt, std::string("Display not found"), +@@ -135,6 +140,7 @@ + presentation.receiver()->Start(presentation_id, GURL(media_source)); + std::move(callback).Run(route, base::nullopt, RouteRequestResult::OK); + NotifyRouteObservers(); ++#endif + } + + void WiredDisplayMediaRouteProvider::JoinRoute( diff --git a/www/chromium/files/patch-chrome_browser_media_webrtc_webrtc_event_log_uploader.cc b/www/chromium/files/patch-chrome_browser_media_webrtc_webrtc_event_log_uploader.cc new file mode 100644 index 000000000000..3a42fb397348 --- /dev/null +++ b/www/chromium/files/patch-chrome_browser_media_webrtc_webrtc_event_log_uploader.cc @@ -0,0 +1,11 @@ +--- chrome/browser/media/webrtc/webrtc_event_log_uploader.cc.orig 2018-07-19 22:14:21.658215000 +0200 ++++ chrome/browser/media/webrtc/webrtc_event_log_uploader.cc 2018-07-19 22:14:37.578585000 +0200 +@@ -51,7 +51,7 @@ + const char kProduct[] = "Chrome"; + #elif defined(OS_MACOSX) + const char kProduct[] = "Chrome_Mac"; +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + const char kProduct[] = "Chrome_Linux"; + #elif defined(OS_ANDROID) + const char kProduct[] = "Chrome_Android"; diff --git a/www/chromium/files/patch-chrome_browser_memory__details__linux.cc b/www/chromium/files/patch-chrome_browser_memory__details__linux.cc index e7bc28cd3b78..4ac38bb3b945 100644 --- a/www/chromium/files/patch-chrome_browser_memory__details__linux.cc +++ b/www/chromium/files/patch-chrome_browser_memory__details__linux.cc @@ -1,14 +1,13 @@ ---- chrome/browser/memory_details_linux.cc.orig 2017-06-05 19:03:02 UTC -+++ chrome/browser/memory_details_linux.cc -@@ -71,9 +71,10 @@ ProcessData GetProcessDataMemoryInformation( +--- chrome/browser/memory_details_linux.cc.orig 2018-06-13 00:10:06.000000000 +0200 ++++ chrome/browser/memory_details_linux.cc 2018-07-20 00:12:53.799188000 +0200 +@@ -70,8 +70,10 @@ + std::unique_ptr<base::ProcessMetrics> metrics( base::ProcessMetrics::CreateProcessMetrics(pid)); - metrics->GetWorkingSetKBytes(&pmi.working_set); +#if !defined(OS_BSD) pmi.num_open_fds = metrics->GetOpenFdCount(); pmi.open_fds_soft_limit = metrics->GetOpenFdSoftLimit(); -- +#endif + process_data.processes.push_back(pmi); } - return process_data; diff --git a/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html b/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html index 0c5236895e9d..327593c0e576 100644 --- a/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html +++ b/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html @@ -1,15 +1,15 @@ ---- chrome/browser/resources/settings/appearance_page/appearance_page.html.orig 2017-12-15 02:04:10.000000000 +0100 -+++ chrome/browser/resources/settings/appearance_page/appearance_page.html 2017-12-24 02:04:05.313610000 +0100 -@@ -77,7 +77,7 @@ +--- chrome/browser/resources/settings/appearance_page/appearance_page.html.orig 2018-06-13 00:10:07.000000000 +0200 ++++ chrome/browser/resources/settings/appearance_page/appearance_page.html 2018-07-15 13:34:27.093948000 +0200 +@@ -75,7 +75,7 @@ hidden="[[!pageVisibility.setTheme]]" label="$i18n{themes}" sub-label="[[themeSublabel_]]" - on-tap="openThemeUrl_"></button> + on-click="openThemeUrl_"></cr-link-row> -<if expr="not is_linux or chromeos"> +<if expr="not is_posix or chromeos"> <template is="dom-if" if="[[prefs.extensions.theme.id.value]]"> <div class="separator"></div> - <paper-button id="useDefault" on-tap="onUseDefaultTap_" -@@ -86,7 +86,7 @@ + <paper-button id="useDefault" on-click="onUseDefaultTap_" +@@ -84,7 +84,7 @@ </paper-button> </template> </if> @@ -18,7 +18,7 @@ <div class="settings-row continuation" hidden="[[!showThemesSecondary_( prefs.extensions.theme.id.value, useSystemTheme_)]]" -@@ -151,7 +151,7 @@ +@@ -149,7 +149,7 @@ pref="{{prefs.bookmark_bar.show_on_all_tabs}}" label="$i18n{showBookmarksBar}"> </settings-toggle-button> diff --git a/www/chromium/files/patch-chrome_browser_safe__browsing_permission__reporter.cc b/www/chromium/files/patch-chrome_browser_safe__browsing_permission__reporter.cc deleted file mode 100644 index 9f2d83681516..000000000000 --- a/www/chromium/files/patch-chrome_browser_safe__browsing_permission__reporter.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/safe_browsing/permission_reporter.cc.orig 2017-06-05 19:03:03 UTC -+++ chrome/browser/safe_browsing/permission_reporter.cc -@@ -188,7 +188,7 @@ bool PermissionReporter::BuildReport(const PermissionR - #if defined(OS_ANDROID) - report.set_platform_type(PermissionReport::ANDROID_PLATFORM); - #elif defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_CHROMEOS) || \ -- defined(OS_LINUX) -+ defined(OS_LINUX) || defined(OS_BSD) - report.set_platform_type(PermissionReport::DESKTOP_PLATFORM); - #else - #error Unsupported platform. diff --git a/www/chromium/files/patch-chrome_browser_ui_views_profiles_avatar_button.cc b/www/chromium/files/patch-chrome_browser_ui_views_profiles_avatar_button.cc index b91d782f6228..fd6a9e1d46ce 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_profiles_avatar_button.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_profiles_avatar_button.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/profiles/avatar_button.cc.orig 2018-02-24 16:25:10.000000000 +0100 -+++ chrome/browser/ui/views/profiles/avatar_button.cc 2018-03-03 22:06:11.687961000 +0100 -@@ -211,7 +211,7 @@ - label()->font_list().DeriveWithHeightUpperBound(kDisplayFontHeight)); - - bool apply_ink_drop = IsCondensible(); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - DCHECK_EQ(AvatarButtonStyle::THEMED, button_style); - apply_ink_drop = true; - #endif -@@ -229,7 +229,7 @@ +--- chrome/browser/ui/views/profiles/avatar_button.cc.orig 2018-06-13 00:10:08.000000000 +0200 ++++ chrome/browser/ui/views/profiles/avatar_button.cc 2018-07-18 22:53:21.770071000 +0200 +@@ -250,7 +250,7 @@ } else if (apply_ink_drop) { SetInkDropMode(InkDropMode::ON); SetFocusPainter(nullptr); -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) set_ink_drop_base_color(SK_ColorWHITE); - SetBorder(base::MakeUnique<AvatarButtonThemedBorder>()); + SetBorder(std::make_unique<AvatarButtonThemedBorder>()); generic_avatar_ = +@@ -544,7 +544,7 @@ + #endif + } + bool AvatarButton::ShouldApplyInkDrop() const { +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + DCHECK_EQ(AvatarButtonStyle::THEMED, button_style_); + return true; + #elif defined(OS_MACOSX) diff --git a/www/chromium/files/patch-chrome_browser_ui_webui_settings_appearance__handler.cc b/www/chromium/files/patch-chrome_browser_ui_webui_settings_appearance__handler.cc index fdddd8abb41f..03e3af1d34b1 100644 --- a/www/chromium/files/patch-chrome_browser_ui_webui_settings_appearance__handler.cc +++ b/www/chromium/files/patch-chrome_browser_ui_webui_settings_appearance__handler.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/webui/settings/appearance_handler.cc.orig 2017-12-24 02:59:37.041407000 +0100 -+++ chrome/browser/ui/webui/settings/appearance_handler.cc 2017-12-24 03:00:20.310448000 +0100 -@@ -33,7 +33,7 @@ +--- chrome/browser/ui/webui/settings/appearance_handler.cc.orig 2018-06-13 00:10:09.000000000 +0200 ++++ chrome/browser/ui/webui/settings/appearance_handler.cc 2018-07-18 23:00:36.362422000 +0200 +@@ -31,7 +31,7 @@ "useDefaultTheme", - base::Bind(&AppearanceHandler::HandleUseDefaultTheme, - base::Unretained(this))); + base::BindRepeating(&AppearanceHandler::HandleUseDefaultTheme, + base::Unretained(this))); -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) -+#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_BSD) && !defined(OS_CHROMEOS) web_ui()->RegisterMessageCallback( "useSystemTheme", - base::Bind(&AppearanceHandler::HandleUseSystemTheme, -@@ -61,7 +61,7 @@ + base::BindRepeating(&AppearanceHandler::HandleUseSystemTheme, +@@ -59,7 +59,7 @@ ThemeServiceFactory::GetForProfile(profile_)->UseDefaultTheme(); } -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) -+#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_BSD) && !defined(OS_CHROMEOS) void AppearanceHandler::HandleUseSystemTheme(const base::ListValue* args) { if (profile_->IsSupervised()) NOTREACHED(); diff --git a/www/chromium/files/patch-chrome_browser_vr_sample_queue.cc b/www/chromium/files/patch-chrome_browser_vr_sample_queue.cc deleted file mode 100644 index 755e356aff10..000000000000 --- a/www/chromium/files/patch-chrome_browser_vr_sample_queue.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/vr/sample_queue.cc.orig 2018-03-24 12:29:50.123017000 +0100 -+++ chrome/browser/vr/sample_queue.cc 2018-03-24 12:30:25.632912000 +0100 -@@ -2,6 +2,8 @@ - // Use of this source code is governed by a BSD-style license that can be - // found in the LICENSE file. - -+#include <stdint.h> -+ - #include "chrome/browser/vr/sample_queue.h" - - namespace vr { diff --git a/www/chromium/files/patch-chrome_common_chrome__features.cc b/www/chromium/files/patch-chrome_common_chrome__features.cc index 7d67d7b0a3d2..402f15a1d862 100644 --- a/www/chromium/files/patch-chrome_common_chrome__features.cc +++ b/www/chromium/files/patch-chrome_common_chrome__features.cc @@ -1,6 +1,6 @@ ---- chrome/common/chrome_features.cc.orig 2017-09-07 15:16:44.309916000 +0200 -+++ chrome/common/chrome_features.cc 2017-09-07 15:17:16.971600000 +0200 -@@ -57,13 +57,13 @@ +--- chrome/common/chrome_features.cc.orig 2018-06-13 00:10:09.000000000 +0200 ++++ chrome/common/chrome_features.cc 2018-07-20 16:33:58.698475000 +0200 +@@ -85,13 +85,13 @@ base::FEATURE_ENABLED_BY_DEFAULT}; #endif // defined(OS_WIN) || defined(OS_MACOSX) @@ -16,3 +16,12 @@ // Enables or disables whether permission prompts are automatically blocked // after the user has explicitly dismissed them too many times. +@@ -142,7 +142,7 @@ + base::FEATURE_ENABLED_BY_DEFAULT}; + #endif + +-#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX) ++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX) || defined(OS_BSD) + // Enables the dual certificate verification trial feature. + // https://crbug.com/649026 + const base::Feature kCertDualVerificationTrialFeature{ diff --git a/www/chromium/files/patch-chrome_common_chrome__features.h b/www/chromium/files/patch-chrome_common_chrome__features.h index 0acfa26ea21c..9aa01cd8236c 100644 --- a/www/chromium/files/patch-chrome_common_chrome__features.h +++ b/www/chromium/files/patch-chrome_common_chrome__features.h @@ -1,6 +1,6 @@ ---- chrome/common/chrome_features.h.orig 2017-09-07 15:16:51.725565000 +0200 -+++ chrome/common/chrome_features.h 2017-09-07 15:17:47.995642000 +0200 -@@ -43,9 +43,9 @@ +--- chrome/common/chrome_features.h.orig 2018-06-13 00:10:09.000000000 +0200 ++++ chrome/common/chrome_features.h 2018-07-20 16:34:38.434106000 +0200 +@@ -52,9 +52,9 @@ extern const base::Feature kAutomaticTabDiscarding; #endif // defined(OS_WIN) || defined(OS_MACOSX) @@ -12,3 +12,12 @@ extern const base::Feature kBlockPromptsIfDismissedOften; extern const base::Feature kBlockPromptsIfIgnoredOften; +@@ -76,7 +76,7 @@ + extern const base::Feature kTabStripKeyboardFocus; + #endif // defined(OS_MACOSX) + +-#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX) ++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX) || defined(OS_BSD) + extern const base::Feature kCertDualVerificationTrialFeature; + #endif + diff --git a/www/chromium/files/patch-chromecast_browser_cast__content__browser__client.cc b/www/chromium/files/patch-chromecast_browser_cast__content__browser__client.cc index 8ede7ca55ce6..84de5e3e12af 100644 --- a/www/chromium/files/patch-chromecast_browser_cast__content__browser__client.cc +++ b/www/chromium/files/patch-chromecast_browser_cast__content__browser__client.cc @@ -1,9 +1,9 @@ ---- chromecast/browser/cast_content_browser_client.cc.orig 2017-06-05 19:03:05 UTC -+++ chromecast/browser/cast_content_browser_client.cc -@@ -316,7 +316,7 @@ void CastContentBrowserClient::AppendExtraCommandLineS - command_line->AppendSwitch(switches::kAllowHiddenMediaPlayback); - } - +--- chromecast/browser/cast_content_browser_client.cc.orig 2018-06-13 00:10:12.000000000 +0200 ++++ chromecast/browser/cast_content_browser_client.cc 2018-07-18 23:13:48.741141000 +0200 +@@ -416,7 +416,7 @@ + switches::kAudioOutputChannels)); + } + } else if (process_type == switches::kGpuProcess) { -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) // Necessary for accelerated 2d canvas. By default on Linux, Chromium assumes diff --git a/www/chromium/files/patch-components_assist_ranker_ranker_example_util.cc b/www/chromium/files/patch-components_assist_ranker_ranker_example_util.cc deleted file mode 100644 index 46b7fe2cda96..000000000000 --- a/www/chromium/files/patch-components_assist_ranker_ranker_example_util.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- components/assist_ranker/ranker_example_util.cc.orig 2018-03-24 12:31:52.824752000 +0100 -+++ components/assist_ranker/ranker_example_util.cc 2018-03-24 12:32:32.654498000 +0100 -@@ -2,6 +2,8 @@ - // Use of this source code is governed by a BSD-style license that can be - // found in the LICENSE file. - -+#include <math.h> -+ - #include "components/assist_ranker/ranker_example_util.h" - #include "base/bit_cast.h" - #include "base/format_macros.h" diff --git a/www/chromium/files/patch-components_autofill_content_renderer_password__form__conversion__utils.cc b/www/chromium/files/patch-components_autofill_content_renderer_password__form__conversion__utils.cc index 48ab77eb41e0..dfdbc32bb27b 100644 --- a/www/chromium/files/patch-components_autofill_content_renderer_password__form__conversion__utils.cc +++ b/www/chromium/files/patch-components_autofill_content_renderer_password__form__conversion__utils.cc @@ -1,9 +1,9 @@ ---- components/autofill/content/renderer/password_form_conversion_utils.cc.orig 2017-09-05 21:05:17.000000000 +0200 -+++ components/autofill/content/renderer/password_form_conversion_utils.cc 2017-09-06 19:05:07.569456000 +0200 -@@ -31,7 +31,11 @@ - #include "third_party/WebKit/public/web/WebFormControlElement.h" - #include "third_party/WebKit/public/web/WebInputElement.h" - #include "third_party/WebKit/public/web/WebLocalFrame.h" +--- components/autofill/content/renderer/password_form_conversion_utils.cc.orig 2018-06-13 00:10:12.000000000 +0200 ++++ components/autofill/content/renderer/password_form_conversion_utils.cc 2018-07-18 23:26:07.424533000 +0200 +@@ -34,7 +34,11 @@ + #include "third_party/blink/public/web/web_form_control_element.h" + #include "third_party/blink/public/web/web_input_element.h" + #include "third_party/blink/public/web/web_local_frame.h" +#if defined(OS_BSD) +#include <re2/re2.h> +#else diff --git a/www/chromium/files/patch-components_crash_content_app_BUILD.gn b/www/chromium/files/patch-components_crash_content_app_BUILD.gn index 08cd251384dd..c1fdab0f9c7e 100644 --- a/www/chromium/files/patch-components_crash_content_app_BUILD.gn +++ b/www/chromium/files/patch-components_crash_content_app_BUILD.gn @@ -1,18 +1,18 @@ ---- components/crash/content/app/BUILD.gn.orig 2018-02-24 16:25:12.000000000 +0100 -+++ components/crash/content/app/BUILD.gn 2018-03-03 22:43:15.726779000 +0100 -@@ -34,7 +34,7 @@ - - if (is_mac || is_win) { +--- components/crash/content/app/BUILD.gn.orig 2018-06-13 00:10:13.000000000 +0200 ++++ components/crash/content/app/BUILD.gn 2018-07-18 23:31:26.635837000 +0200 +@@ -36,7 +36,7 @@ sources += [ "crashpad.cc" ] -- } else if (is_android || is_linux) { -+ } else if (is_android || is_linux && !is_bsd) { + } + +- if (is_android || is_linux) { ++ if (is_android || is_linux && !is_bsd) { # Want these files on both Linux and Android. set_sources_assignment_filter([]) sources += [ -@@ -64,7 +64,6 @@ - "//components/crash/core/common", +@@ -73,7 +73,6 @@ "//content/public/common:content_descriptors", "//content/public/common:result_codes", + "//sandbox", - "//third_party/breakpad:client", ] diff --git a/www/chromium/files/patch-components_crash_content_app_crashpad.cc b/www/chromium/files/patch-components_crash_content_app_crashpad.cc new file mode 100644 index 000000000000..6d9612a5ee03 --- /dev/null +++ b/www/chromium/files/patch-components_crash_content_app_crashpad.cc @@ -0,0 +1,32 @@ +--- components/crash/content/app/crashpad.cc.orig 2018-07-19 00:30:58.065324000 +0200 ++++ components/crash/content/app/crashpad.cc 2018-07-19 00:32:11.350482000 +0200 +@@ -119,7 +119,7 @@ + // as processed by the backend. + DCHECK(browser_process || process_type == "Chrome Installer" || + process_type == "notification-helper"); +-#elif defined(OS_LINUX) || defined(OS_ANDROID) ++#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + DCHECK(browser_process); + #else + #error Port. +@@ -184,7 +184,7 @@ + // other "main, first process" to initialize things. There is no "relauncher" + // on Windows, so this is synonymous with initial_client. + const bool should_initialize_database_and_set_upload_policy = initial_client; +-#elif defined(OS_LINUX) || defined(OS_ANDROID) ++#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + const bool should_initialize_database_and_set_upload_policy = browser_process; + #endif + if (should_initialize_database_and_set_upload_policy) { +@@ -253,7 +253,11 @@ + } + + void DumpWithoutCrashing() { ++#if defined(OS_BSD) ++ NOTIMPLEMENTED(); ++#else + CRASHPAD_SIMULATE_CRASH(); ++#endif + } + + void GetReports(std::vector<Report>* reports) { diff --git a/www/chromium/files/patch-components_crash_content_browser_BUILD.gn b/www/chromium/files/patch-components_crash_content_browser_BUILD.gn index ed72e88d927a..99ff4da3a8fe 100644 --- a/www/chromium/files/patch-components_crash_content_browser_BUILD.gn +++ b/www/chromium/files/patch-components_crash_content_browser_BUILD.gn @@ -1,5 +1,5 @@ ---- components/crash/content/browser/BUILD.gn.orig 2017-12-15 02:04:14.000000000 +0100 -+++ components/crash/content/browser/BUILD.gn 2017-12-24 11:42:34.318970000 +0100 +--- components/crash/content/browser/BUILD.gn.orig 2018-06-13 00:10:13.000000000 +0200 ++++ components/crash/content/browser/BUILD.gn 2018-07-18 23:37:00.046473000 +0200 @@ -24,10 +24,9 @@ "//components/crash/content/app", "//content/public/browser", @@ -16,8 +16,8 @@ # This is not in the GYP build but this target includes breakpad client # headers, so add the dependency here. -- if (is_posix && !is_ios) { -+ if (is_posix && !is_ios && !is_bsd) { +- if ((is_posix && !is_ios) || is_fuchsia) { ++ if ((is_posix && !is_ios && !is_bsd) || is_fuchsia) { configs += [ "//third_party/breakpad:client_config" ] public_configs = [ "//third_party/breakpad:client_config" ] } diff --git a/www/chromium/files/patch-components_download_quarantine_quarantine_linux.cc b/www/chromium/files/patch-components_download_quarantine_quarantine_linux.cc new file mode 100644 index 000000000000..a9ad97c67ce8 --- /dev/null +++ b/www/chromium/files/patch-components_download_quarantine_quarantine_linux.cc @@ -0,0 +1,49 @@ +--- components/download/quarantine/quarantine_linux.cc.orig 2018-07-19 22:21:43.332341000 +0200 ++++ components/download/quarantine/quarantine_linux.cc 2018-07-19 22:24:04.361819000 +0200 +@@ -2,11 +2,15 @@ + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. + ++#include "build/build_config.h" ++ + #include "components/download/quarantine/quarantine.h" + + #include <stddef.h> + #include <sys/types.h> ++#if !defined(OS_BSD) + #include <sys/xattr.h> ++#endif + + #include "base/files/file_path.h" + #include "base/files/file_util.h" +@@ -29,17 +33,20 @@ + size_t value_size, + int flags) { + base::AssertBlockingAllowed(); ++#if !defined(OS_BSD) + int result = setxattr(path, name, value, value_size, flags); + if (result) { + DPLOG(ERROR) << "Could not set extended attribute " << name << " on file " + << path; + return false; + } ++#endif + return true; + } + + std::string GetExtendedFileAttribute(const char* path, const char* name) { + base::AssertBlockingAllowed(); ++#if !defined(OS_BSD) + ssize_t len = getxattr(path, name, nullptr, 0); + if (len <= 0) + return std::string(); +@@ -49,6 +56,9 @@ + if (len < static_cast<ssize_t>(buffer.size())) + return std::string(); + return std::string(buffer.begin(), buffer.end()); ++#else ++ return std::string(); ++#endif + } + + } // namespace diff --git a/www/chromium/files/patch-components_gcm__driver_gcm__client.h b/www/chromium/files/patch-components_gcm__driver_gcm__client.h index e05ba84a6f97..776b370d5cb0 100644 --- a/www/chromium/files/patch-components_gcm__driver_gcm__client.h +++ b/www/chromium/files/patch-components_gcm__driver_gcm__client.h @@ -1,10 +1,10 @@ ---- components/gcm_driver/gcm_client.h.orig 2017-04-19 19:06:32 UTC -+++ components/gcm_driver/gcm_client.h -@@ -82,6 +82,7 @@ class GCMClient { +--- components/gcm_driver/gcm_client.h.orig 2018-06-13 00:10:13.000000000 +0200 ++++ components/gcm_driver/gcm_client.h 2018-07-18 23:49:52.697459000 +0200 +@@ -82,6 +82,7 @@ PLATFORM_CROS, PLATFORM_IOS, PLATFORM_ANDROID, + PLATFORM_BSD, - PLATFORM_UNKNOWN + PLATFORM_UNSPECIFIED }; diff --git a/www/chromium/files/patch-components_gcm__driver_gcm__client__impl.cc b/www/chromium/files/patch-components_gcm__driver_gcm__client__impl.cc index 3c9641eb52c0..14405d76b15a 100644 --- a/www/chromium/files/patch-components_gcm__driver_gcm__client__impl.cc +++ b/www/chromium/files/patch-components_gcm__driver_gcm__client__impl.cc @@ -1,12 +1,12 @@ ---- components/gcm_driver/gcm_client_impl.cc.orig 2017-04-19 19:06:32 UTC -+++ components/gcm_driver/gcm_client_impl.cc -@@ -136,6 +136,9 @@ void ToCheckinProtoVersion( +--- components/gcm_driver/gcm_client_impl.cc.orig 2018-06-13 00:10:13.000000000 +0200 ++++ components/gcm_driver/gcm_client_impl.cc 2018-07-18 23:56:44.202609000 +0200 +@@ -152,6 +152,9 @@ case GCMClient::PLATFORM_CROS: platform = checkin_proto::ChromeBuildProto_Platform_PLATFORM_CROS; break; -+ case GCMClient::PLATFORM_BSD: // TODO what the hell are those? ++ case GCMClient::PLATFORM_BSD: + platform = checkin_proto::ChromeBuildProto_Platform_PLATFORM_LINUX; + break; - case GCMClient::PLATFORM_UNKNOWN: + case GCMClient::PLATFORM_UNSPECIFIED: // For unknown platform, return as LINUX. platform = checkin_proto::ChromeBuildProto_Platform_PLATFORM_LINUX; diff --git a/www/chromium/files/patch-components_plugins_renderer_plugin__placeholder.cc b/www/chromium/files/patch-components_plugins_renderer_plugin__placeholder.cc index e91036d176df..f188f9ef0136 100644 --- a/www/chromium/files/patch-components_plugins_renderer_plugin__placeholder.cc +++ b/www/chromium/files/patch-components_plugins_renderer_plugin__placeholder.cc @@ -1,9 +1,9 @@ ---- components/plugins/renderer/plugin_placeholder.cc.orig 2017-04-19 19:06:33 UTC -+++ components/plugins/renderer/plugin_placeholder.cc +--- components/plugins/renderer/plugin_placeholder.cc.orig 2018-06-13 00:10:13.000000000 +0200 ++++ components/plugins/renderer/plugin_placeholder.cc 2018-07-19 00:02:51.619981000 +0200 @@ -11,7 +11,11 @@ #include "gin/object_template_builder.h" - #include "third_party/WebKit/public/web/WebElement.h" - #include "third_party/WebKit/public/web/WebPluginContainer.h" + #include "third_party/blink/public/web/web_element.h" + #include "third_party/blink/public/web/web_plugin_container.h" +#if defined(OS_BSD) +#include <re2/re2.h> +#else diff --git a/www/chromium/files/patch-components_filesystem_file__system__app.cc b/www/chromium/files/patch-components_services_filesystem_file_system_app.cc index 8114d01e7535..2c62ef86be6a 100644 --- a/www/chromium/files/patch-components_filesystem_file__system__app.cc +++ b/www/chromium/files/patch-components_services_filesystem_file_system_app.cc @@ -1,6 +1,6 @@ ---- components/filesystem/file_system_app.cc.orig 2017-06-05 19:03:05 UTC -+++ components/filesystem/file_system_app.cc -@@ -22,7 +22,7 @@ +--- components/services/filesystem/file_system_app.cc.orig 2018-07-18 23:43:08.740779000 +0200 ++++ components/services/filesystem/file_system_app.cc 2018-07-18 23:43:41.614940000 +0200 +@@ -20,7 +20,7 @@ #elif defined(OS_ANDROID) #include "base/base_paths_android.h" #include "base/path_service.h" @@ -9,12 +9,12 @@ #include "base/environment.h" #include "base/nix/xdg_util.h" #elif defined(OS_MACOSX) -@@ -78,7 +78,7 @@ base::FilePath FileSystemApp::GetUserDataDir() { +@@ -75,7 +75,7 @@ CHECK(PathService::Get(base::DIR_APP_DATA, &path)); #elif defined(OS_ANDROID) CHECK(PathService::Get(base::DIR_ANDROID_APP_DATA, &path)); -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) std::unique_ptr<base::Environment> env(base::Environment::Create()); - path = base::nix::GetXDGDirectory(env.get(), - base::nix::kXdgConfigHomeEnvVar, + path = base::nix::GetXDGDirectory( + env.get(), base::nix::kXdgConfigHomeEnvVar, base::nix::kDotConfigDir); diff --git a/www/chromium/files/patch-components_webcrypto_algorithms_test__helpers.cc b/www/chromium/files/patch-components_webcrypto_algorithms_test__helpers.cc index 83f54165e96b..9a74c3a7fd29 100644 --- a/www/chromium/files/patch-components_webcrypto_algorithms_test__helpers.cc +++ b/www/chromium/files/patch-components_webcrypto_algorithms_test__helpers.cc @@ -1,9 +1,9 @@ ---- components/webcrypto/algorithms/test_helpers.cc.orig 2017-04-19 19:06:33 UTC -+++ components/webcrypto/algorithms/test_helpers.cc +--- components/webcrypto/algorithms/test_helpers.cc.orig 2018-06-13 00:10:16.000000000 +0200 ++++ components/webcrypto/algorithms/test_helpers.cc 2018-07-19 00:07:52.270703000 +0200 @@ -25,7 +25,11 @@ #include "components/webcrypto/status.h" - #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" - #include "third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h" + #include "third_party/blink/public/platform/web_crypto_algorithm_params.h" + #include "third_party/blink/public/platform/web_crypto_key_algorithm.h" +#if defined(OS_BSD) +#include <re2/re2.h> +#else diff --git a/www/chromium/files/patch-content_app_content__main__runner.cc b/www/chromium/files/patch-content_app_content__main__runner.cc index d7a1b3e21e2a..b1d52e71dc4e 100644 --- a/www/chromium/files/patch-content_app_content__main__runner.cc +++ b/www/chromium/files/patch-content_app_content__main__runner.cc @@ -1,6 +1,6 @@ ---- content/app/content_main_runner.cc.orig 2018-02-24 16:25:14.000000000 +0100 -+++ content/app/content_main_runner.cc 2018-03-03 23:04:17.370076000 +0100 -@@ -82,10 +82,10 @@ +--- content/app/content_main_runner.cc.orig 2018-06-13 00:10:16.000000000 +0200 ++++ content/app/content_main_runner.cc 2018-07-19 00:17:30.909304000 +0200 +@@ -84,10 +84,10 @@ #include "base/posix/global_descriptors.h" #include "content/public/common/content_descriptors.h" @@ -11,18 +11,18 @@ -#if !defined(OS_MACOSX) && !defined(OS_ANDROID) +#if !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD) #include "content/zygote/zygote_main.h" + #include "sandbox/linux/services/libc_interceptor.h" #endif - -@@ -429,7 +429,7 @@ - } - - #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && \ -- !defined(OS_FUCHSIA) -+ !defined(OS_FUCHSIA) && !defined(OS_BSD) - // Zygote startup is special -- see RunZygote comments above - // for why we don't use ZygoteMain directly. - if (process_type == switches::kZygoteProcess) -@@ -499,10 +499,10 @@ +@@ -153,7 +153,7 @@ + namespace content { + extern int GpuMain(const content::MainFunctionParams&); + #if BUILDFLAG(ENABLE_PLUGINS) +-#if !defined(OS_LINUX) ++#if !defined(OS_LINUX) && !defined(OS_BSD) + extern int PluginMain(const content::MainFunctionParams&); + #endif + extern int PpapiPluginMain(const MainFunctionParams&); +@@ -702,10 +702,10 @@ kFieldTrialDescriptor + base::GlobalDescriptors::kBaseDescriptor); #endif // !OS_ANDROID diff --git a/www/chromium/files/patch-content_browser_browser__main__loop.cc b/www/chromium/files/patch-content_browser_browser__main__loop.cc index fe1340923490..65f818d6fdd9 100644 --- a/www/chromium/files/patch-content_browser_browser__main__loop.cc +++ b/www/chromium/files/patch-content_browser_browser__main__loop.cc @@ -1,15 +1,15 @@ ---- content/browser/browser_main_loop.cc.orig 2018-03-20 23:05:23.000000000 +0100 -+++ content/browser/browser_main_loop.cc 2018-03-24 14:03:10.531359000 +0100 -@@ -212,7 +212,7 @@ +--- content/browser/browser_main_loop.cc.orig 2018-06-13 00:10:16.000000000 +0200 ++++ content/browser/browser_main_loop.cc 2018-07-19 00:30:26.119970000 +0200 +@@ -205,7 +205,7 @@ #include "base/fuchsia/default_job.h" #endif // defined(OS_FUCHSIA) -#if defined(OS_POSIX) && !defined(OS_MACOSX) +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD) #include "content/browser/sandbox_host_linux.h" - #include "content/browser/zygote_host/zygote_host_impl_linux.h" + #endif -@@ -254,6 +254,11 @@ +@@ -240,6 +240,11 @@ #include "services/ui/common/image_cursors_set.h" #endif @@ -21,15 +21,10 @@ // One of the linux specific headers defines this as a macro. #ifdef DestroyAll #undef DestroyAll -@@ -655,10 +660,15 @@ - TRACE_EVENT0("startup", "BrowserMainLoop::EarlyInitialization"); - - #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && \ -- !defined(OS_FUCHSIA) -+ !defined(OS_FUCHSIA) && !defined(OS_BSD) - // No thread should be created before this call, as SetupSandbox() - // will end-up using fork(). - SetupSandbox(parsed_command_line_); +@@ -548,6 +553,11 @@ + // by now since a thread to start the ServiceManager has been created + // before the browser main loop starts. + DCHECK(SandboxHostLinux::GetInstance()->IsInitialized()); +#elif defined(OS_BSD) + SandboxHostLinux::GetInstance()->Init(); + base::FileHandleMappingVector fds_to_map; diff --git a/www/chromium/files/patch-content_browser_download_base__file.cc b/www/chromium/files/patch-content_browser_download_base__file.cc deleted file mode 100644 index 9fbb9a4edc1a..000000000000 --- a/www/chromium/files/patch-content_browser_download_base__file.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- content/browser/download/base_file.cc.orig 2017-06-05 19:03:06 UTC -+++ content/browser/download/base_file.cc -@@ -387,7 +387,7 @@ DownloadInterruptReason BaseFile::LogInterruptReason( - return reason; - } - --#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) - - namespace { - -@@ -470,7 +470,7 @@ DownloadInterruptReason BaseFile::AnnotateWithSourceIn - } - return DOWNLOAD_INTERRUPT_REASON_FILE_FAILED; - } --#else // !OS_WIN && !OS_MACOSX && !OS_LINUX -+#else // !OS_WIN && !OS_MACOSX && !OS_LINUX && !OS_BSD - DownloadInterruptReason BaseFile::AnnotateWithSourceInformation( - const std::string& client_guid, - const GURL& source_url, diff --git a/www/chromium/files/patch-content_browser_memory_swap_metrics_driver_impl_linux.cc b/www/chromium/files/patch-content_browser_memory_swap_metrics_driver_impl_linux.cc new file mode 100644 index 000000000000..6d5736168798 --- /dev/null +++ b/www/chromium/files/patch-content_browser_memory_swap_metrics_driver_impl_linux.cc @@ -0,0 +1,16 @@ +--- content/browser/memory/swap_metrics_driver_impl_linux.cc.orig 2018-06-13 00:10:16.000000000 +0200 ++++ content/browser/memory/swap_metrics_driver_impl_linux.cc 2018-07-21 00:28:47.747286000 +0200 +@@ -44,9 +44,13 @@ + SwapMetricsDriver::SwapMetricsUpdateResult + SwapMetricsDriverImplLinux::UpdateMetricsInternal(base::TimeDelta interval) { + base::VmStatInfo vmstat; ++#if !defined(OS_BSD) + if (!base::GetVmStatInfo(&vmstat)) { + return SwapMetricsDriver::SwapMetricsUpdateResult::kSwapMetricsUpdateFailed; + } ++#else ++ return SwapMetricsDriver::SwapMetricsUpdateResult::kSwapMetricsUpdateFailed; ++#endif + + uint64_t in_counts = vmstat.pswpin - last_pswpin_; + uint64_t out_counts = vmstat.pswpout - last_pswpout_; diff --git a/www/chromium/files/patch-content_browser_renderer__host_render__message__filter.cc b/www/chromium/files/patch-content_browser_renderer__host_render__message__filter.cc index 438b3fe9d50b..b83deb938730 100644 --- a/www/chromium/files/patch-content_browser_renderer__host_render__message__filter.cc +++ b/www/chromium/files/patch-content_browser_renderer__host_render__message__filter.cc @@ -1,7 +1,7 @@ ---- content/browser/renderer_host/render_message_filter.cc.orig 2018-02-24 16:25:14.000000000 +0100 -+++ content/browser/renderer_host/render_message_filter.cc 2018-03-04 01:08:51.920706000 +0100 -@@ -80,7 +80,7 @@ - #include "content/common/mac/font_loader.h" +--- content/browser/renderer_host/render_message_filter.cc.orig 2018-06-13 00:10:17.000000000 +0200 ++++ content/browser/renderer_host/render_message_filter.cc 2018-07-19 11:46:53.426069000 +0200 +@@ -76,7 +76,7 @@ + #if defined(OS_MACOSX) #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" #endif -#if defined(OS_LINUX) @@ -9,8 +9,8 @@ #include "base/linux_util.h" #include "base/threading/platform_thread.h" #endif -@@ -211,7 +211,7 @@ - #endif // defined(OS_MACOSX) +@@ -194,7 +194,7 @@ + std::move(callback).Run(route_id); } -#if defined(OS_LINUX) @@ -18,12 +18,12 @@ void RenderMessageFilter::SetThreadPriorityOnFileThread( base::PlatformThreadId ns_tid, base::ThreadPriority priority) { -@@ -234,7 +234,7 @@ +@@ -215,7 +215,7 @@ + } + #endif - void RenderMessageFilter::SetThreadPriority(int32_t ns_tid, - base::ThreadPriority priority) { -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) + void RenderMessageFilter::SetThreadPriority(int32_t ns_tid, + base::ThreadPriority priority) { constexpr base::TaskTraits kTraits = { - base::MayBlock(), base::TaskPriority::USER_BLOCKING, - base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}; diff --git a/www/chromium/files/patch-content_browser_renderer__host_render__message__filter.h b/www/chromium/files/patch-content_browser_renderer__host_render__message__filter.h index e9e6a4e50189..c0edfd2507bf 100644 --- a/www/chromium/files/patch-content_browser_renderer__host_render__message__filter.h +++ b/www/chromium/files/patch-content_browser_renderer__host_render__message__filter.h @@ -1,11 +1,19 @@ ---- content/browser/renderer_host/render_message_filter.h.orig 2017-06-05 19:03:07 UTC -+++ content/browser/renderer_host/render_message_filter.h -@@ -130,7 +130,7 @@ class CONTENT_EXPORT RenderMessageFilter - bool has_gpu); +--- content/browser/renderer_host/render_message_filter.h.orig 2018-06-13 00:10:17.000000000 +0200 ++++ content/browser/renderer_host/render_message_filter.h 2018-07-20 17:25:54.254096000 +0200 +@@ -114,14 +114,14 @@ + const url::Origin& cache_storage_origin, + const std::string& cache_storage_cache_name) override; + void HasGpuProcess(HasGpuProcessCallback callback) override; +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + void SetThreadPriority(int32_t ns_tid, + base::ThreadPriority priority) override; + #endif + void OnResolveProxy(const GURL& url, IPC::Message* reply_msg); -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) void SetThreadPriorityOnFileThread(base::PlatformThreadId ns_tid, base::ThreadPriority priority); - void OnSetThreadPriority(base::PlatformThreadId ns_tid, + #endif diff --git a/www/chromium/files/patch-content_browser_webui_web_ui_data_source_impl.cc b/www/chromium/files/patch-content_browser_webui_web_ui_data_source_impl.cc new file mode 100644 index 000000000000..384527871162 --- /dev/null +++ b/www/chromium/files/patch-content_browser_webui_web_ui_data_source_impl.cc @@ -0,0 +1,69 @@ +--- content/browser/webui/web_ui_data_source_impl.cc.orig 2018-07-19 22:40:51.613006000 +0200 ++++ content/browser/webui/web_ui_data_source_impl.cc 2018-07-19 22:47:18.163395000 +0200 +@@ -112,24 +112,24 @@ + WebUIDataSourceImpl::~WebUIDataSourceImpl() { + } + +-void WebUIDataSourceImpl::AddString(base::StringPiece name, ++void WebUIDataSourceImpl::AddString(const std::string& name, + const base::string16& value) { + // TODO(dschuyler): Share only one copy of these strings. + localized_strings_.SetKey(name, base::Value(value)); +- replacements_[name.as_string()] = base::UTF16ToUTF8(value); ++ replacements_[name] = base::UTF16ToUTF8(value); + } + +-void WebUIDataSourceImpl::AddString(base::StringPiece name, ++void WebUIDataSourceImpl::AddString(const std::string& name, + const std::string& value) { + localized_strings_.SetKey(name, base::Value(value)); +- replacements_[name.as_string()] = value; ++ replacements_[name] = value; + } + +-void WebUIDataSourceImpl::AddLocalizedString(base::StringPiece name, int ids) { ++void WebUIDataSourceImpl::AddLocalizedString(const std::string& name, int ids) { + std::string utf8_str = + base::UTF16ToUTF8(GetContentClient()->GetLocalizedString(ids)); + localized_strings_.SetKey(name, base::Value(utf8_str)); +- replacements_[name.as_string()] = utf8_str; ++ replacements_[name] = utf8_str; + } + + void WebUIDataSourceImpl::AddLocalizedStrings( +@@ -139,7 +139,7 @@ + &replacements_); + } + +-void WebUIDataSourceImpl::AddBoolean(base::StringPiece name, bool value) { ++void WebUIDataSourceImpl::AddBoolean(const std::string& name, bool value) { + localized_strings_.SetBoolean(name, value); + // TODO(dschuyler): Change name of |localized_strings_| to |load_time_data_| + // or similar. These values haven't been found as strings for +@@ -148,21 +148,21 @@ + // replacements. + } + +-void WebUIDataSourceImpl::AddInteger(base::StringPiece name, int32_t value) { ++void WebUIDataSourceImpl::AddInteger(const std::string& name, int32_t value) { + localized_strings_.SetInteger(name, value); + } + +-void WebUIDataSourceImpl::SetJsonPath(base::StringPiece path) { ++void WebUIDataSourceImpl::SetJsonPath(const std::string& path) { + DCHECK(json_path_.empty()); + DCHECK(!path.empty()); + +- json_path_ = path.as_string(); ++ json_path_ = path; + excluded_paths_.insert(json_path_); + } + +-void WebUIDataSourceImpl::AddResourcePath(base::StringPiece path, ++void WebUIDataSourceImpl::AddResourcePath(const std::string &path, + int resource_id) { +- path_to_idr_map_[path.as_string()] = resource_id; ++ path_to_idr_map_[path] = resource_id; + } + + void WebUIDataSourceImpl::SetDefaultResource(int resource_id) { diff --git a/www/chromium/files/patch-content_browser_webui_web_ui_data_source_impl.h b/www/chromium/files/patch-content_browser_webui_web_ui_data_source_impl.h new file mode 100644 index 000000000000..a1f1441e3a7b --- /dev/null +++ b/www/chromium/files/patch-content_browser_webui_web_ui_data_source_impl.h @@ -0,0 +1,25 @@ +--- content/browser/webui/web_ui_data_source_impl.h.orig 2018-07-19 22:41:03.715788000 +0200 ++++ content/browser/webui/web_ui_data_source_impl.h 2018-07-19 22:49:20.849552000 +0200 +@@ -30,15 +30,15 @@ + public WebUIDataSource { + public: + // WebUIDataSource implementation: +- void AddString(base::StringPiece name, const base::string16& value) override; +- void AddString(base::StringPiece name, const std::string& value) override; +- void AddLocalizedString(base::StringPiece name, int ids) override; ++ void AddString(const std::string& name, const base::string16& value) override; ++ void AddString(const std::string& name, const std::string& value) override; ++ void AddLocalizedString(const std::string& name, int ids) override; + void AddLocalizedStrings( + const base::DictionaryValue& localized_strings) override; +- void AddBoolean(base::StringPiece name, bool value) override; +- void AddInteger(base::StringPiece name, int32_t value) override; +- void SetJsonPath(base::StringPiece path) override; +- void AddResourcePath(base::StringPiece path, int resource_id) override; ++ void AddBoolean(const std::string& name, bool value) override; ++ void AddInteger(const std::string& name, int32_t value) override; ++ void SetJsonPath(const std::string& path) override; ++ void AddResourcePath(const std::string& path, int resource_id) override; + void SetDefaultResource(int resource_id) override; + void SetRequestFilter( + const WebUIDataSource::HandleRequestCallback& callback) override; diff --git a/www/chromium/files/patch-content_browser_webui_web_ui_impl.cc b/www/chromium/files/patch-content_browser_webui_web_ui_impl.cc new file mode 100644 index 000000000000..5f95a35d8bab --- /dev/null +++ b/www/chromium/files/patch-content_browser_webui_web_ui_impl.cc @@ -0,0 +1,14 @@ +--- content/browser/webui/web_ui_impl.cc.orig 2018-07-19 22:41:18.526274000 +0200 ++++ content/browser/webui/web_ui_impl.cc 2018-07-19 22:50:47.735965000 +0200 +@@ -247,9 +247,9 @@ + ExecuteJavascript(GetJavascriptCall(function_name, args)); + } + +-void WebUIImpl::RegisterMessageCallback(base::StringPiece message, ++void WebUIImpl::RegisterMessageCallback(const std::string &message, + const MessageCallback& callback) { +- message_callbacks_.emplace(message, callback); ++ message_callbacks_.insert(std::make_pair(message, callback)); + } + + void WebUIImpl::ProcessWebUIMessage(const GURL& source_url, diff --git a/www/chromium/files/patch-content_browser_webui_web_ui_impl.h b/www/chromium/files/patch-content_browser_webui_web_ui_impl.h new file mode 100644 index 000000000000..3fdc1a8d2d00 --- /dev/null +++ b/www/chromium/files/patch-content_browser_webui_web_ui_impl.h @@ -0,0 +1,11 @@ +--- content/browser/webui/web_ui_impl.h.orig 2018-07-19 22:41:27.362717000 +0200 ++++ content/browser/webui/web_ui_impl.h 2018-07-19 22:51:17.719203000 +0200 +@@ -52,7 +52,7 @@ + int GetBindings() const override; + void SetBindings(int bindings) override; + void AddMessageHandler(std::unique_ptr<WebUIMessageHandler> handler) override; +- void RegisterMessageCallback(base::StringPiece message, ++ void RegisterMessageCallback(const std::string& message, + const MessageCallback& callback) override; + void ProcessWebUIMessage(const GURL& source_url, + const std::string& message, diff --git a/www/chromium/files/patch-content_browser_zygote_host_zygote_host_impl_linux.cc b/www/chromium/files/patch-content_browser_zygote_host_zygote_host_impl_linux.cc new file mode 100644 index 000000000000..b29320544585 --- /dev/null +++ b/www/chromium/files/patch-content_browser_zygote_host_zygote_host_impl_linux.cc @@ -0,0 +1,40 @@ +--- content/browser/zygote_host/zygote_host_impl_linux.cc.orig 2018-07-19 11:56:14.006818000 +0200 ++++ content/browser/zygote_host/zygote_host_impl_linux.cc 2018-07-19 11:58:05.834024000 +0200 +@@ -72,6 +72,7 @@ + } + + void ZygoteHostImpl::Init(const base::CommandLine& command_line) { ++#if !defined(OS_BSD) + if (command_line.HasSwitch(switches::kNoSandbox)) { + return; + } +@@ -130,6 +131,7 @@ + "you can try using --" + << switches::kNoSandbox << "."; + } ++#endif + } + + void ZygoteHostImpl::AddZygotePid(pid_t pid) { +@@ -154,6 +156,7 @@ + base::CommandLine* cmd_line, + base::ScopedFD* control_fd, + base::FileHandleMappingVector additional_remapped_fds) { ++#if !defined(OS_BSD) + int fds[2]; + CHECK_EQ(0, socketpair(AF_UNIX, SOCK_SEQPACKET, 0, fds)); + CHECK(base::UnixDomainSocket::EnableReceiveProcessId(fds[0])); +@@ -218,9 +221,12 @@ + + AddZygotePid(pid); + return pid; ++#else ++ return 0; ++#endif + } + +-#if !defined(OS_OPENBSD) ++#if !defined(OS_BSD) + void ZygoteHostImpl::AdjustRendererOOMScore(base::ProcessHandle pid, + int score) { + // 1) You can't change the oom_score_adj of a non-dumpable process diff --git a/www/chromium/files/patch-content_browser_zygote_host_zygote_host_impl_linux.h b/www/chromium/files/patch-content_browser_zygote_host_zygote_host_impl_linux.h index b3af7e20bb91..8716bf887686 100644 --- a/www/chromium/files/patch-content_browser_zygote_host_zygote_host_impl_linux.h +++ b/www/chromium/files/patch-content_browser_zygote_host_zygote_host_impl_linux.h @@ -1,10 +1,10 @@ ---- content/browser/zygote_host/zygote_host_impl_linux.h.orig 2017-09-07 23:31:20.865003000 +0200 -+++ content/browser/zygote_host/zygote_host_impl_linux.h 2017-09-07 23:32:15.495651000 +0200 -@@ -37,8 +37,10 @@ - int GetRendererSandboxStatus() const override; +--- content/browser/zygote_host/zygote_host_impl_linux.h.orig 2018-06-13 00:10:17.000000000 +0200 ++++ content/browser/zygote_host/zygote_host_impl_linux.h 2018-07-19 11:55:28.795795000 +0200 +@@ -41,8 +41,10 @@ + base::ScopedFD* control_fd, + base::FileHandleMappingVector additional_remapped_fds); - pid_t LaunchZygote(base::CommandLine* cmd_line, base::ScopedFD* control_fd); -+#if !defined(OS_FREEBSD) ++#if !defined(OS_BSD) void AdjustRendererOOMScore(base::ProcessHandle process_handle, int score) override; +#endif diff --git a/www/chromium/files/patch-content_common_BUILD.gn b/www/chromium/files/patch-content_common_BUILD.gn index 41dec10672cf..6ebd6237de44 100644 --- a/www/chromium/files/patch-content_common_BUILD.gn +++ b/www/chromium/files/patch-content_common_BUILD.gn @@ -1,12 +1,11 @@ ---- content/common/BUILD.gn.orig 2018-03-20 23:05:24.000000000 +0100 -+++ content/common/BUILD.gn 2018-03-29 12:47:23.480593000 +0200 -@@ -431,6 +431,13 @@ +--- content/common/BUILD.gn.orig 2018-06-13 00:10:17.000000000 +0200 ++++ content/common/BUILD.gn 2018-07-20 00:38:14.267181000 +0200 +@@ -430,6 +430,12 @@ libs += [ "android" ] } + if (is_bsd) { + sources -= [ -+ "quarantine/quarantine_linux.cc", + "sandbox_init_linux.cc", + ] + } diff --git a/www/chromium/files/patch-content_gpu_BUILD.gn b/www/chromium/files/patch-content_gpu_BUILD.gn index cbb78ee65c9e..66bc40d92c15 100644 --- a/www/chromium/files/patch-content_gpu_BUILD.gn +++ b/www/chromium/files/patch-content_gpu_BUILD.gn @@ -1,11 +1,11 @@ ---- content/gpu/BUILD.gn.orig 2018-03-04 17:22:26.995017000 +0100 -+++ content/gpu/BUILD.gn 2018-03-04 17:22:46.556822000 +0100 -@@ -121,7 +121,7 @@ - } +--- content/gpu/BUILD.gn.orig 2018-06-13 00:10:17.000000000 +0200 ++++ content/gpu/BUILD.gn 2018-07-19 12:07:20.670815000 +0200 +@@ -127,7 +127,7 @@ # Use DRI on desktop Linux builds. -- if (is_desktop_linux && (!is_chromecast || is_cast_desktop_build)) { -+ if (is_desktop_linux && (!is_chromecast || is_cast_desktop_build) && !is_bsd) { + if (current_cpu != "s390x" && current_cpu != "ppc64" && is_desktop_linux && +- (!is_chromecast || is_cast_desktop_build)) { ++ (!is_chromecast || is_cast_desktop_build) && !is_bsd) { configs += [ "//build/config/linux/dri" ] } } diff --git a/www/chromium/files/patch-content_network_BUILD.gn b/www/chromium/files/patch-content_network_BUILD.gn deleted file mode 100644 index 407510624222..000000000000 --- a/www/chromium/files/patch-content_network_BUILD.gn +++ /dev/null @@ -1,13 +0,0 @@ ---- content/network/BUILD.gn.orig 2018-03-29 12:51:25.325665000 +0200 -+++ content/network/BUILD.gn 2018-03-29 12:56:34.023437000 +0200 -@@ -75,6 +75,10 @@ - "url_request_context_builder_mojo.cc", - ] - -+ if (is_bsd) { -+ sources -= [ "network_sandbox_hook_linux.cc" ] -+ } -+ - configs += [ "//content:content_implementation" ] - - deps = [ diff --git a/www/chromium/files/patch-content_public_browser_web_ui.h b/www/chromium/files/patch-content_public_browser_web_ui.h new file mode 100644 index 000000000000..900db61288d8 --- /dev/null +++ b/www/chromium/files/patch-content_public_browser_web_ui.h @@ -0,0 +1,19 @@ +--- content/public/browser/web_ui.h.orig 2018-07-20 15:49:47.533832000 +0200 ++++ content/public/browser/web_ui.h 2018-07-20 15:50:46.750401000 +0200 +@@ -9,7 +9,6 @@ + + #include "base/callback.h" + #include "base/strings/string16.h" +-#include "base/strings/string_piece.h" + #include "content/common/content_export.h" + #include "ui/base/page_transition_types.h" + +@@ -73,7 +72,7 @@ + // Used by WebUIMessageHandlers. If the given message is already registered, + // the call has no effect. + using MessageCallback = base::RepeatingCallback<void(const base::ListValue*)>; +- virtual void RegisterMessageCallback(base::StringPiece message, ++ virtual void RegisterMessageCallback(const std::string& message, + const MessageCallback& callback) = 0; + + // This is only needed if an embedder overrides handling of a WebUIMessage and diff --git a/www/chromium/files/patch-content_public_browser_web_ui_data_source.h b/www/chromium/files/patch-content_public_browser_web_ui_data_source.h new file mode 100644 index 000000000000..7451607d73ad --- /dev/null +++ b/www/chromium/files/patch-content_public_browser_web_ui_data_source.h @@ -0,0 +1,51 @@ +--- content/public/browser/web_ui_data_source.h.orig 2018-07-20 15:50:02.520469000 +0200 ++++ content/public/browser/web_ui_data_source.h 2018-07-20 15:53:16.811577000 +0200 +@@ -13,7 +13,6 @@ + + #include "base/callback.h" + #include "base/strings/string16.h" +-#include "base/strings/string_piece.h" + #include "content/common/content_export.h" + + namespace base { +@@ -45,33 +44,33 @@ + std::unique_ptr<base::DictionaryValue> update); + + // Adds a string keyed to its name to our dictionary. +- virtual void AddString(base::StringPiece name, ++ virtual void AddString(const std::string& name, + const base::string16& value) = 0; + + // Adds a string keyed to its name to our dictionary. +- virtual void AddString(base::StringPiece name, const std::string& value) = 0; ++ virtual void AddString(const std::string& name, const std::string& value) = 0; + + // Adds a localized string with resource |ids| keyed to its name to our + // dictionary. +- virtual void AddLocalizedString(base::StringPiece name, int ids) = 0; ++ virtual void AddLocalizedString(const std::string& name, int ids) = 0; + + // Add strings from |localized_strings| to our dictionary. + virtual void AddLocalizedStrings( + const base::DictionaryValue& localized_strings) = 0; + + // Adds a boolean keyed to its name to our dictionary. +- virtual void AddBoolean(base::StringPiece name, bool value) = 0; ++ virtual void AddBoolean(const std::string& name, bool value) = 0; + + // Adds a signed 32-bit integer keyed to its name to our dictionary. Larger + // integers may not be exactly representable in JavaScript. See + // MAX_SAFE_INTEGER in /v8/src/globals.h. +- virtual void AddInteger(base::StringPiece name, int32_t value) = 0; ++ virtual void AddInteger(const std::string& name, int32_t value) = 0; + + // Sets the path which will return the JSON strings. +- virtual void SetJsonPath(base::StringPiece path) = 0; ++ virtual void SetJsonPath(const std::string& path) = 0; + + // Adds a mapping between a path name and a resource to return. +- virtual void AddResourcePath(base::StringPiece path, int resource_id) = 0; ++ virtual void AddResourcePath(const std::string& path, int resource_id) = 0; + + // Sets the resource to returned when no other paths match. + virtual void SetDefaultResource(int resource_id) = 0; diff --git a/www/chromium/files/patch-content_renderer_media_stream_processed__local__audio__source.cc b/www/chromium/files/patch-content_renderer_media_stream_processed__local__audio__source.cc new file mode 100644 index 000000000000..6601575b8643 --- /dev/null +++ b/www/chromium/files/patch-content_renderer_media_stream_processed__local__audio__source.cc @@ -0,0 +1,11 @@ +--- content/renderer/media/stream/processed_local_audio_source.cc.orig 2018-07-19 12:34:51.152323000 +0200 ++++ content/renderer/media/stream/processed_local_audio_source.cc 2018-07-19 12:35:37.574081000 +0200 +@@ -282,7 +282,7 @@ + bool key_pressed) { + #if defined(OS_WIN) || defined(OS_MACOSX) + DCHECK_LE(volume, 1.0); +-#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_OPENBSD) ++#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) + // We have a special situation on Linux where the microphone volume can be + // "higher than maximum". The input volume slider in the sound preference + // allows the user to set a scaling that is higher than 100%. It means that diff --git a/www/chromium/files/patch-content_renderer_media_webrtc_processed__local__audio__source.cc b/www/chromium/files/patch-content_renderer_media_webrtc_processed__local__audio__source.cc deleted file mode 100644 index 3807a66249d4..000000000000 --- a/www/chromium/files/patch-content_renderer_media_webrtc_processed__local__audio__source.cc +++ /dev/null @@ -1,13 +0,0 @@ ---- content/renderer/media/webrtc/processed_local_audio_source.cc.orig 2017-06-05 19:03:07 UTC -+++ content/renderer/media/webrtc/processed_local_audio_source.cc -@@ -269,8 +269,8 @@ void ProcessedLocalAudioSource::Capture(const media::A - bool key_pressed) { - #if defined(OS_WIN) || defined(OS_MACOSX) - DCHECK_LE(volume, 1.0); --#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_OPENBSD) -- // We have a special situation on Linux where the microphone volume can be -+#elif defined(OS_POSIX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID) -+ // We have a special situation on POSIX where the microphone volume can be - // "higher than maximum". The input volume slider in the sound preference - // allows the user to set a scaling that is higher than 100%. It means that - // even if the reported maximum levels is N, the actual microphone level can diff --git a/www/chromium/files/patch-content_renderer_render__thread__impl.cc b/www/chromium/files/patch-content_renderer_render__thread__impl.cc index bf2a7a9516b5..9138489c204c 100644 --- a/www/chromium/files/patch-content_renderer_render__thread__impl.cc +++ b/www/chromium/files/patch-content_renderer_render__thread__impl.cc @@ -1,6 +1,6 @@ ---- content/renderer/render_thread_impl.cc.orig 2018-02-24 16:25:14.000000000 +0100 -+++ content/renderer/render_thread_impl.cc 2018-03-04 01:40:50.991485000 +0100 -@@ -224,12 +224,22 @@ +--- content/renderer/render_thread_impl.cc.orig 2018-06-13 00:10:17.000000000 +0200 ++++ content/renderer/render_thread_impl.cc 2018-07-19 12:51:34.446042000 +0200 +@@ -214,12 +214,21 @@ #include "content/common/external_ipc_dumper.h" #endif @@ -17,13 +17,12 @@ +#include <stdint.h> +#include <sys/param.h> +#include <sys/sysctl.h> -+#include <sys/user.h> +#endif + using base::ThreadRestrictions; using blink::WebDocument; using blink::WebFrame; -@@ -973,7 +983,7 @@ +@@ -1096,7 +1105,7 @@ GetConnector()->BindInterface(mojom::kBrowserServiceName, mojo::MakeRequest(&storage_partition_service_)); @@ -32,17 +31,17 @@ render_message_filter()->SetThreadPriority( ChildProcess::current()->io_thread_id(), base::ThreadPriority::DISPLAY); render_message_filter()->SetThreadPriority( -@@ -1184,7 +1194,7 @@ - FROM_HERE, - base::BindOnce(base::IgnoreResult(&ThreadRestrictions::SetIOAllowed), +@@ -1304,7 +1313,7 @@ false)); + GetContentClient()->renderer()->PostCompositorThreadCreated( + compositor_task_runner_.get()); -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) render_message_filter()->SetThreadPriority(compositor_thread_->ThreadId(), base::ThreadPriority::DISPLAY); #endif -@@ -1499,7 +1509,7 @@ - !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode); +@@ -1584,7 +1593,7 @@ + gpu::kGpuFeatureStatusEnabled); const bool enable_gpu_memory_buffer_video_frames = !is_gpu_compositing_disabled_ && -#if defined(OS_MACOSX) || defined(OS_LINUX) @@ -50,30 +49,3 @@ !cmd_line->HasSwitch(switches::kDisableGpuMemoryBufferVideoFrames); #elif defined(OS_WIN) !cmd_line->HasSwitch(switches::kDisableGpuMemoryBufferVideoFrames) && -@@ -1847,7 +1857,26 @@ - blink_stats.blink_gc_total_allocated_bytes / 1024; - std::unique_ptr<base::ProcessMetrics> metric( - base::ProcessMetrics::CreateCurrentProcessMetrics()); -+#if defined(OS_BSD) -+ struct kinfo_proc *info; -+ size_t length, malloc_usage = 0; -+ int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid(), -+ sizeof(struct kinfo_proc), 0 }; -+ -+ if (sysctl(mib, arraysize(mib), NULL, &length, NULL, 0) < 0) -+ return -1; -+ -+ info = (struct kinfo_proc *)malloc(length); -+ -+ mib[5] = (length / sizeof(struct kinfo_proc)); -+ -+ if (!sysctl(mib, arraysize(mib), info, &length, NULL, 0)) -+ malloc_usage = (((unsigned long long)(info->ki_tsize + info->ki_dsize + info->ki_ssize)*getpagesize())); -+ -+ free(info); -+#else - size_t malloc_usage = metric->GetMallocUsage(); -+#endif - memory_metrics->malloc_mb = malloc_usage / 1024 / 1024; - - discardable_memory::ClientDiscardableSharedMemoryManager::Statistics diff --git a/www/chromium/files/patch-content_renderer_renderer__blink__platform__impl.cc b/www/chromium/files/patch-content_renderer_renderer__blink__platform__impl.cc index cdc120291d08..86bea927e1d2 100644 --- a/www/chromium/files/patch-content_renderer_renderer__blink__platform__impl.cc +++ b/www/chromium/files/patch-content_renderer_renderer__blink__platform__impl.cc @@ -1,6 +1,6 @@ ---- content/renderer/renderer_blink_platform_impl.cc.orig 2017-12-15 02:04:18.000000000 +0100 -+++ content/renderer/renderer_blink_platform_impl.cc 2017-12-31 05:15:48.537395000 +0100 -@@ -124,7 +124,7 @@ +--- content/renderer/renderer_blink_platform_impl.cc.orig 2018-06-13 00:10:17.000000000 +0200 ++++ content/renderer/renderer_blink_platform_impl.cc 2018-07-19 13:00:02.053483000 +0200 +@@ -136,7 +136,7 @@ #if defined(OS_POSIX) #include "base/file_descriptor_posix.h" @@ -9,7 +9,7 @@ #include <map> #include <string> -@@ -225,7 +225,7 @@ +@@ -249,7 +249,7 @@ scoped_refptr<mojom::ThreadSafeFileUtilitiesHostPtr> file_utilities_host_; }; @@ -18,16 +18,16 @@ class RendererBlinkPlatformImpl::SandboxSupport : public blink::WebSandboxSupport { public: -@@ -267,7 +267,7 @@ - default_task_runner_(renderer_scheduler->DefaultTaskRunner()), +@@ -293,7 +293,7 @@ + default_task_runner_(main_thread_scheduler->DefaultTaskRunner()), web_scrollbar_behavior_(new WebScrollbarBehaviorImpl), - renderer_scheduler_(renderer_scheduler) { + main_thread_scheduler_(main_thread_scheduler) { -#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_FUCHSIA) +#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_FUCHSIA) && !defined(OS_BSD) if (g_sandbox_enabled && sandboxEnabled()) { sandbox_support_.reset(new RendererBlinkPlatformImpl::SandboxSupport); } else { -@@ -316,7 +316,7 @@ +@@ -341,7 +341,7 @@ } void RendererBlinkPlatformImpl::Shutdown() { @@ -36,7 +36,7 @@ // SandboxSupport contains a map of WebFallbackFont objects, which hold // WebStrings and WebVectors, which become invalidated when blink is shut // down. Hence, we need to clear that map now, just before blink::shutdown() -@@ -417,7 +417,7 @@ +@@ -449,7 +449,7 @@ } blink::WebSandboxSupport* RendererBlinkPlatformImpl::GetSandboxSupport() { @@ -45,8 +45,8 @@ // These platforms do not require sandbox support. return NULL; #else -@@ -610,7 +610,7 @@ - return FontLoader::CGFontRefFromBuffer(font_data, font_data_size, out); +@@ -657,7 +657,7 @@ + return content::LoadFont(src_font, out, font_id); } -#elif defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_FUCHSIA) diff --git a/www/chromium/files/patch-device_sensors_data__fetcher__shared__memory.h b/www/chromium/files/patch-device_sensors_data__fetcher__shared__memory.h deleted file mode 100644 index bf3eebcad482..000000000000 --- a/www/chromium/files/patch-device_sensors_data__fetcher__shared__memory.h +++ /dev/null @@ -1,11 +0,0 @@ ---- device/sensors/data_fetcher_shared_memory.h.orig 2017-06-05 19:03:07 UTC -+++ device/sensors/data_fetcher_shared_memory.h -@@ -44,7 +44,7 @@ class DEVICE_SENSOR_EXPORT DataFetcherSharedMemory - bool Start(ConsumerType consumer_type, void* buffer) override; - bool Stop(ConsumerType consumer_type) override; - --#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) -+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD) - #if !defined(OS_CHROMEOS) - DeviceMotionHardwareBuffer* motion_buffer_ = nullptr; - DeviceOrientationHardwareBuffer* orientation_buffer_ = nullptr; diff --git a/www/chromium/files/patch-device_usb_usb__context.cc b/www/chromium/files/patch-device_usb_usb__context.cc index 5de6fef3bf71..1e07396fa3a4 100644 --- a/www/chromium/files/patch-device_usb_usb__context.cc +++ b/www/chromium/files/patch-device_usb_usb__context.cc @@ -1,20 +1,6 @@ ---- device/usb/usb_context.cc.orig 2017-06-05 19:03:07 UTC -+++ device/usb/usb_context.cc -@@ -9,8 +9,13 @@ - #include "base/macros.h" - #include "base/threading/simple_thread.h" - #include "device/usb/usb_error.h" -+#if defined(OS_FREEBSD) -+#include "libusb.h" -+#define LIBUSB_CALL -+#else - #include "third_party/libusb/src/libusb/interrupt.h" - #include "third_party/libusb/src/libusb/libusb.h" -+#endif - - namespace device { - -@@ -58,7 +63,9 @@ void UsbContext::UsbEventHandler::Run() { +--- device/usb/usb_context.cc.orig 2018-06-13 00:10:18.000000000 +0200 ++++ device/usb/usb_context.cc 2018-07-20 12:52:29.240720000 +0200 +@@ -58,7 +58,9 @@ void UsbContext::UsbEventHandler::Stop() { base::subtle::Release_Store(&running_, 0); diff --git a/www/chromium/files/patch-device_usb_usb__context__unittest.cc b/www/chromium/files/patch-device_usb_usb__context__unittest.cc deleted file mode 100644 index f54b7d76f1ab..000000000000 --- a/www/chromium/files/patch-device_usb_usb__context__unittest.cc +++ /dev/null @@ -1,14 +0,0 @@ ---- device/usb/usb_context_unittest.cc.orig 2017-04-19 19:06:34 UTC -+++ device/usb/usb_context_unittest.cc -@@ -7,7 +7,11 @@ - #include "build/build_config.h" - #include "device/usb/usb_context.h" - #include "testing/gtest/include/gtest/gtest.h" -+#if defined(OS_FREEBSD) -+#include "libusb.h" -+#else - #include "third_party/libusb/src/libusb/libusb.h" -+#endif - - namespace device { - diff --git a/www/chromium/files/patch-device_usb_usb__device__handle__impl.cc b/www/chromium/files/patch-device_usb_usb__device__handle__impl.cc deleted file mode 100644 index 6661aae28be6..000000000000 --- a/www/chromium/files/patch-device_usb_usb__device__handle__impl.cc +++ /dev/null @@ -1,14 +0,0 @@ ---- device/usb/usb_device_handle_impl.cc.orig 2018-03-20 23:05:25.000000000 +0100 -+++ device/usb/usb_device_handle_impl.cc 2018-03-24 17:28:45.532305000 +0100 -@@ -25,7 +25,11 @@ - #include "device/usb/usb_device_impl.h" - #include "device/usb/usb_error.h" - #include "device/usb/usb_service.h" -+#if defined(OS_FREEBSD) -+#include "libusb.h" -+#else - #include "third_party/libusb/src/libusb/libusb.h" -+#endif - - namespace device { - diff --git a/www/chromium/files/patch-device_usb_usb__device__handle__impl.h b/www/chromium/files/patch-device_usb_usb__device__handle__impl.h deleted file mode 100644 index 4cf2a1875c27..000000000000 --- a/www/chromium/files/patch-device_usb_usb__device__handle__impl.h +++ /dev/null @@ -1,15 +0,0 @@ ---- device/usb/usb_device_handle_impl.h.orig 2017-04-19 19:06:34 UTC -+++ device/usb/usb_device_handle_impl.h -@@ -18,7 +18,12 @@ - #include "base/memory/ref_counted.h" - #include "base/threading/thread_checker.h" - #include "device/usb/usb_device_handle.h" -+#if defined(OS_FREEBSD) -+#include "libusb.h" -+#define LIBUSB_CALL -+#else - #include "third_party/libusb/src/libusb/libusb.h" -+#endif - - namespace base { - class SequencedTaskRunner; diff --git a/www/chromium/files/patch-device_usb_usb__device__impl.cc b/www/chromium/files/patch-device_usb_usb__device__impl.cc deleted file mode 100644 index 74bee847e140..000000000000 --- a/www/chromium/files/patch-device_usb_usb__device__impl.cc +++ /dev/null @@ -1,14 +0,0 @@ ---- device/usb/usb_device_impl.cc.orig 2017-07-25 21:04:56.000000000 +0200 -+++ device/usb/usb_device_impl.cc 2017-08-02 13:51:03.580494000 +0200 -@@ -24,7 +24,11 @@ - #include "device/usb/usb_device_handle_impl.h" - #include "device/usb/usb_error.h" - #include "device/usb/usb_service.h" -+#if defined(OS_FREEBSD) -+#include "libusb.h" -+#else - #include "third_party/libusb/src/libusb/libusb.h" -+#endif - - namespace device { - diff --git a/www/chromium/files/patch-device_usb_usb__error.cc b/www/chromium/files/patch-device_usb_usb__error.cc index 13c239d676ee..56ead98022de 100644 --- a/www/chromium/files/patch-device_usb_usb__error.cc +++ b/www/chromium/files/patch-device_usb_usb__error.cc @@ -1,14 +1,11 @@ ---- device/usb/usb_error.cc.orig 2017-04-19 19:06:34 UTC -+++ device/usb/usb_error.cc -@@ -4,7 +4,11 @@ - - #include "device/usb/usb_error.h" - -+#if defined(OS_FREEBSD) -+#include "libusb.h" -+#else - #include "third_party/libusb/src/libusb/libusb.h" -+#endif - +--- device/usb/usb_error.cc.orig 2018-06-13 00:10:18.000000000 +0200 ++++ device/usb/usb_error.cc 2018-07-20 12:55:34.901660000 +0200 +@@ -9,7 +9,7 @@ namespace device { + std::string ConvertPlatformUsbErrorToString(int errcode) { +- return libusb_strerror(static_cast<libusb_error>(errcode)); ++ return ""; + } + + } // namespace device diff --git a/www/chromium/files/patch-device_usb_usb__service__impl.cc b/www/chromium/files/patch-device_usb_usb__service__impl.cc index bf899301ad01..9b37f5c8bd92 100644 --- a/www/chromium/files/patch-device_usb_usb__service__impl.cc +++ b/www/chromium/files/patch-device_usb_usb__service__impl.cc @@ -1,18 +1,6 @@ ---- device/usb/usb_service_impl.cc.orig 2018-03-20 23:05:25.000000000 +0100 -+++ device/usb/usb_service_impl.cc 2018-03-24 17:34:53.453193000 +0100 -@@ -27,7 +27,11 @@ - #include "device/usb/usb_device_handle.h" - #include "device/usb/usb_error.h" - #include "device/usb/webusb_descriptors.h" -+#if defined(OS_FREEBSD) -+#include "libusb.h" -+#else - #include "third_party/libusb/src/libusb/libusb.h" -+#endif - - #if defined(OS_WIN) - #define INITGUID -@@ -227,8 +231,10 @@ +--- device/usb/usb_service_impl.cc.orig 2018-06-13 00:10:18.000000000 +0200 ++++ device/usb/usb_service_impl.cc 2018-07-20 12:49:59.699912000 +0200 +@@ -239,8 +239,10 @@ } UsbServiceImpl::~UsbServiceImpl() { @@ -20,10 +8,10 @@ if (hotplug_enabled_) libusb_hotplug_deregister_callback(context_->context(), hotplug_handle_); +#endif // !defined(OS_FREEBSD) - for (auto* platform_device : ignored_devices_) - libusb_unref_device(platform_device); } -@@ -285,6 +291,7 @@ + + void UsbServiceImpl::GetDevices(const GetDevicesCallback& callback) { +@@ -295,6 +297,7 @@ context_ = std::move(context); @@ -31,7 +19,7 @@ int rv = libusb_hotplug_register_callback( context_->context(), static_cast<libusb_hotplug_event>(LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED | -@@ -297,6 +304,7 @@ +@@ -307,6 +310,7 @@ // This will call any enumeration callbacks queued while initializing. RefreshDevices(); @@ -39,19 +27,19 @@ #if defined(OS_WIN) DeviceMonitorWin* device_monitor = DeviceMonitorWin::GetForAllInterfaces(); -@@ -496,6 +504,7 @@ +@@ -503,6 +507,7 @@ device->OnDisconnect(); } +#if !defined(OS_FREEBSD) // static int LIBUSB_CALL UsbServiceImpl::HotplugCallback(libusb_context* context, - PlatformUsbDevice device, -@@ -526,6 +535,7 @@ + libusb_device* device_raw, +@@ -537,6 +542,7 @@ return 0; } +#endif // !defined(OS_FREEBSD) - void UsbServiceImpl::OnPlatformDeviceAdded(PlatformUsbDevice platform_device) { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + void UsbServiceImpl::OnPlatformDeviceAdded( + ScopedLibusbDeviceRef platform_device) { diff --git a/www/chromium/files/patch-device_usb_usb__service__impl.h b/www/chromium/files/patch-device_usb_usb__service__impl.h index f0cced5c3aac..a59648c035d4 100644 --- a/www/chromium/files/patch-device_usb_usb__service__impl.h +++ b/www/chromium/files/patch-device_usb_usb__service__impl.h @@ -1,35 +1,20 @@ ---- device/usb/usb_service_impl.h.orig 2017-06-05 19:03:07 UTC -+++ device/usb/usb_service_impl.h -@@ -15,8 +15,14 @@ - #include "build/build_config.h" - #include "device/usb/usb_context.h" - #include "device/usb/usb_device_impl.h" -+#if defined(OS_FREEBSD) -+#include "libusb.h" -+#define LIBUSB_CALL -+#else - #include "third_party/libusb/src/libusb/libusb.h" -+#endif - -+ - #if defined(OS_WIN) - #include "base/scoped_observer.h" - #include "device/base/device_monitor_win.h" -@@ -73,11 +79,13 @@ class UsbServiceImpl : +--- device/usb/usb_service_impl.h.orig 2018-06-13 00:10:18.000000000 +0200 ++++ device/usb/usb_service_impl.h 2018-07-20 12:47:42.413625000 +0200 +@@ -73,11 +73,13 @@ scoped_refptr<UsbDeviceImpl> device); void RemoveDevice(scoped_refptr<UsbDeviceImpl> device); +#if !defined(OS_FREEBSD) // Handle hotplug events from libusb. static int LIBUSB_CALL HotplugCallback(libusb_context* context, - PlatformUsbDevice device, + libusb_device* device, libusb_hotplug_event event, void* user_data); +#endif // These functions release a reference to the provided platform device. - void OnPlatformDeviceAdded(PlatformUsbDevice platform_device); - void OnPlatformDeviceRemoved(PlatformUsbDevice platform_device); -@@ -94,7 +102,9 @@ class UsbServiceImpl : + void OnPlatformDeviceAdded(ScopedLibusbDeviceRef platform_device); + void OnPlatformDeviceRemoved(ScopedLibusbDeviceRef platform_device); +@@ -95,7 +97,9 @@ // connected instead of only when a full enumeration is requested. // TODO(reillyg): Support this on all platforms. crbug.com/411715 bool hotplug_enabled_ = false; diff --git a/www/chromium/files/patch-extensions_browser_api_web__request_form__data__parser.cc b/www/chromium/files/patch-extensions_browser_api_web__request_form__data__parser.cc index 64959cb94e89..86bde7e99dd7 100644 --- a/www/chromium/files/patch-extensions_browser_api_web__request_form__data__parser.cc +++ b/www/chromium/files/patch-extensions_browser_api_web__request_form__data__parser.cc @@ -1,9 +1,9 @@ ---- extensions/browser/api/web_request/form_data_parser.cc.orig 2017-04-19 19:06:34 UTC -+++ extensions/browser/api/web_request/form_data_parser.cc +--- extensions/browser/api/web_request/form_data_parser.cc.orig 2018-06-13 00:10:18.000000000 +0200 ++++ extensions/browser/api/web_request/form_data_parser.cc 2018-07-19 13:36:19.375722000 +0200 @@ -15,7 +15,11 @@ #include "base/values.h" #include "net/base/escape.h" - #include "net/url_request/url_request.h" + #include "net/http/http_request_headers.h" +#if defined(OS_BSD) +#include <re2/re2.h> +#else diff --git a/www/chromium/files/patch-gpu_config_gpu__info__collector__freebsd.cc b/www/chromium/files/patch-gpu_config_gpu__info__collector__freebsd.cc index 501f100b0b0b..83f161f6c251 100644 --- a/www/chromium/files/patch-gpu_config_gpu__info__collector__freebsd.cc +++ b/www/chromium/files/patch-gpu_config_gpu__info__collector__freebsd.cc @@ -1,6 +1,6 @@ ---- gpu/config/gpu_info_collector_freebsd.cc.orig 2018-03-26 13:34:20.147630000 +0200 -+++ gpu/config/gpu_info_collector_freebsd.cc 2018-03-26 13:35:09.089367000 +0200 -@@ -0,0 +1,28 @@ +--- gpu/config/gpu_info_collector_freebsd.cc.orig 2018-07-20 13:47:10.021258000 +0200 ++++ gpu/config/gpu_info_collector_freebsd.cc 2018-07-20 15:44:42.380444000 +0200 +@@ -0,0 +1,20 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -9,23 +9,15 @@ + +namespace gpu { + -+CollectInfoResult CollectContextGraphicsInfo(GPUInfo* gpu_info) { ++bool CollectContextGraphicsInfo(GPUInfo* gpu_info) { + NOTIMPLEMENTED(); -+ return kCollectInfoFatalFailure; ++ return false; +} + -+CollectInfoResult CollectBasicGraphicsInfo(GPUInfo* gpu_info) { ++bool CollectBasicGraphicsInfo(GPUInfo* gpu_info) { + NOTIMPLEMENTED(); -+ return kCollectInfoFatalFailure; ++ return false; +} + -+CollectInfoResult CollectDriverInfoGL(GPUInfo* gpu_info) { -+ NOTIMPLEMENTED(); -+ return kCollectInfoFatalFailure; -+} -+ -+void MergeGPUInfo(GPUInfo* basic_gpu_info, const GPUInfo& context_gpu_info) { -+ MergeGPUInfoGL(basic_gpu_info, context_gpu_info); -+} + +} // namespace gpu diff --git a/www/chromium/files/patch-gpu_ipc_client_gpu_memory_buffer_impl.cc b/www/chromium/files/patch-gpu_ipc_client_gpu_memory_buffer_impl.cc deleted file mode 100644 index cf41fc2c284f..000000000000 --- a/www/chromium/files/patch-gpu_ipc_client_gpu_memory_buffer_impl.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- gpu/ipc/client/gpu_memory_buffer_impl.cc.orig 2017-08-02 17:20:25.306294000 +0200 -+++ gpu/ipc/client/gpu_memory_buffer_impl.cc 2017-08-02 17:20:50.656124000 +0200 -@@ -12,7 +12,7 @@ - #include "gpu/ipc/client/gpu_memory_buffer_impl_io_surface.h" - #endif - --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - #include "gpu/ipc/client/gpu_memory_buffer_impl_native_pixmap.h" - #endif - -@@ -50,7 +50,7 @@ - return GpuMemoryBufferImplIOSurface::CreateFromHandle( - handle, size, format, usage, callback); - #endif --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - case gfx::NATIVE_PIXMAP: - return GpuMemoryBufferImplNativePixmap::CreateFromHandle( - handle, size, format, usage, callback); diff --git a/www/chromium/files/patch-gpu_ipc_common_gpu_memory_buffer_support.cc b/www/chromium/files/patch-gpu_ipc_common_gpu_memory_buffer_support.cc index 4424136b7c74..8b240314dd01 100644 --- a/www/chromium/files/patch-gpu_ipc_common_gpu_memory_buffer_support.cc +++ b/www/chromium/files/patch-gpu_ipc_common_gpu_memory_buffer_support.cc @@ -1,15 +1,31 @@ ---- gpu/ipc/common/gpu_memory_buffer_support.cc.orig 2018-02-24 16:25:15.000000000 +0100 -+++ gpu/ipc/common/gpu_memory_buffer_support.cc 2018-03-04 02:34:29.021605000 +0100 -@@ -7,7 +7,7 @@ - #include "base/logging.h" - #include "build/build_config.h" +--- gpu/ipc/common/gpu_memory_buffer_support.cc.orig 2018-06-13 00:10:19.000000000 +0200 ++++ gpu/ipc/common/gpu_memory_buffer_support.cc 2018-07-19 13:54:11.502121000 +0200 +@@ -12,7 +12,7 @@ + #include "gpu/ipc/common/gpu_memory_buffer_impl_io_surface.h" + #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) + #include "gpu/ipc/common/gpu_memory_buffer_impl_native_pixmap.h" #include "ui/gfx/client_native_pixmap_factory.h" + #include "ui/gfx/linux/client_native_pixmap_factory_dmabuf.h" +@@ -36,13 +36,13 @@ + GpuMemoryBufferSupport::GpuMemoryBufferSupport() { + #if defined(USE_OZONE) + client_native_pixmap_factory_ = ui::CreateClientNativePixmapFactoryOzone(); +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + client_native_pixmap_factory_.reset( + gfx::CreateClientNativePixmapFactoryDmabuf()); #endif + } -@@ -22,7 +22,7 @@ +-#if defined(OS_LINUX) || defined(USE_OZONE) ++#if defined(OS_LINUX) || defined(USE_OZONE) || defined(OS_BSD) + GpuMemoryBufferSupport::GpuMemoryBufferSupport( + std::unique_ptr<gfx::ClientNativePixmapFactory> + client_native_pixmap_factory) +@@ -57,7 +57,7 @@ return gfx::IO_SURFACE_BUFFER; #elif defined(OS_ANDROID) return gfx::ANDROID_HARDWARE_BUFFER; @@ -18,12 +34,21 @@ return gfx::NATIVE_PIXMAP; #elif defined(OS_WIN) return gfx::DXGI_SHARED_HANDLE; -@@ -81,7 +81,7 @@ - } - NOTREACHED(); +@@ -112,7 +112,7 @@ return false; + #elif defined(USE_OZONE) + return client_native_pixmap_factory_->IsConfigurationSupported(format, usage); -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) - if (!gfx::ClientNativePixmapFactory::GetInstance()) { - // unittests don't have to set ClientNativePixmapFactory. - return false; + return false; // TODO(julian.isorce): Add linux support. + #elif defined(OS_WIN) + switch (usage) { +@@ -168,7 +168,7 @@ + return GpuMemoryBufferImplIOSurface::CreateFromHandle( + handle, size, format, usage, callback); + #endif +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + case gfx::NATIVE_PIXMAP: + return GpuMemoryBufferImplNativePixmap::CreateFromHandle( + client_native_pixmap_factory(), handle, size, format, usage, diff --git a/www/chromium/files/patch-gpu_ipc_common_gpu_memory_buffer_support.h b/www/chromium/files/patch-gpu_ipc_common_gpu_memory_buffer_support.h new file mode 100644 index 000000000000..aa670d3a2fee --- /dev/null +++ b/www/chromium/files/patch-gpu_ipc_common_gpu_memory_buffer_support.h @@ -0,0 +1,38 @@ +--- gpu/ipc/common/gpu_memory_buffer_support.h.orig 2018-07-19 13:55:08.335420000 +0200 ++++ gpu/ipc/common/gpu_memory_buffer_support.h 2018-07-19 13:56:28.243213000 +0200 +@@ -17,7 +17,7 @@ + #include "ui/gfx/geometry/size.h" + #include "ui/gfx/gpu_memory_buffer.h" + +-#if defined(OS_LINUX) || defined(USE_OZONE) ++#if defined(OS_LINUX) || defined(OS_BSD) || defined(USE_OZONE) + namespace gfx { + class ClientNativePixmapFactory; + } +@@ -29,7 +29,7 @@ + class GPU_EXPORT GpuMemoryBufferSupport { + public: + GpuMemoryBufferSupport(); +-#if defined(OS_LINUX) || defined(USE_OZONE) ++#if defined(OS_LINUX) || defined(OS_BSD) || defined(USE_OZONE) + GpuMemoryBufferSupport(std::unique_ptr<gfx::ClientNativePixmapFactory> + client_native_pixmap_factory); + #endif +@@ -43,7 +43,7 @@ + bool IsNativeGpuMemoryBufferConfigurationSupported(gfx::BufferFormat format, + gfx::BufferUsage usage); + +-#if defined(OS_LINUX) || defined(USE_OZONE) ++#if defined(OS_LINUX) || defined(OS_BSD) || defined(USE_OZONE) + gfx::ClientNativePixmapFactory* client_native_pixmap_factory() { + return client_native_pixmap_factory_.get(); + } +@@ -66,7 +66,7 @@ + const GpuMemoryBufferImpl::DestructionCallback& callback); + + private: +-#if defined(OS_LINUX) || defined(USE_OZONE) ++#if defined(OS_LINUX) || defined(OS_BSD) || defined(USE_OZONE) + std::unique_ptr<gfx::ClientNativePixmapFactory> client_native_pixmap_factory_; + #endif + diff --git a/www/chromium/files/patch-gpu_ipc_service_gpu__init.cc b/www/chromium/files/patch-gpu_ipc_service_gpu__init.cc index 0b3973c1819f..a3ded293c128 100644 --- a/www/chromium/files/patch-gpu_ipc_service_gpu__init.cc +++ b/www/chromium/files/patch-gpu_ipc_service_gpu__init.cc @@ -1,24 +1,15 @@ ---- gpu/ipc/service/gpu_init.cc.orig 2018-03-20 23:05:26.000000000 +0100 -+++ gpu/ipc/service/gpu_init.cc 2018-03-26 13:24:11.299258000 +0200 -@@ -41,7 +41,7 @@ - #if !defined(OS_MACOSX) - void CollectGraphicsInfo(GPUInfo* gpu_info) { - DCHECK(gpu_info); --#if defined(OS_FUCHSIA) -+#if defined(OS_FUCHSIA) || defined(OS_BSD) - // TODO(crbug.com/707031): Implement this. - NOTIMPLEMENTED(); - return; -@@ -84,7 +84,7 @@ +--- gpu/ipc/service/gpu_init.cc.orig 2018-06-13 00:10:19.000000000 +0200 ++++ gpu/ipc/service/gpu_init.cc 2018-07-19 14:45:14.322631000 +0200 +@@ -70,7 +70,7 @@ } #endif // defined(OS_MACOSX) --#if defined(OS_LINUX) && !defined(OS_CHROMEOS) -+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_BSD) +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(IS_CHROMECAST) ++#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(IS_CHROMECAST) && !defined(OS_BSD) bool CanAccessNvidiaDeviceFile() { bool res = true; base::AssertBlockingAllowed(); -@@ -120,7 +120,7 @@ +@@ -106,7 +106,7 @@ // crash during feature collection. gpu::SetKeysForCrashLogging(gpu_info_); @@ -27,7 +18,7 @@ if (gpu_info_.gpu.vendor_id == 0x10de && // NVIDIA gpu_info_.driver_vendor == "NVIDIA" && !CanAccessNvidiaDeviceFile()) return false; -@@ -179,7 +179,7 @@ +@@ -172,7 +172,7 @@ sandbox_helper_->PreSandboxStartup(); bool attempted_startsandbox = false; diff --git a/www/chromium/files/patch-media_base_decoder__buffer.h b/www/chromium/files/patch-media_base_decoder__buffer.h deleted file mode 100644 index 301e78b7cdf2..000000000000 --- a/www/chromium/files/patch-media_base_decoder__buffer.h +++ /dev/null @@ -1,13 +0,0 @@ -https://chromium.googlesource.com/chromium/src/+/a568ded46a67%5E%21/ - ---- media/base/decoder_buffer.h.orig 2018-03-20 22:05:27 UTC -+++ media/base/decoder_buffer.h -@@ -37,7 +37,7 @@ class MEDIA_EXPORT DecoderBuffer - : public base::RefCountedThreadSafe<DecoderBuffer> { - public: - enum { -- kPaddingSize = 32, -+ kPaddingSize = 64, - #if defined(ARCH_CPU_ARM_FAMILY) - kAlignmentSize = 16 - #else diff --git a/www/chromium/files/patch-media_capture_BUILD.gn b/www/chromium/files/patch-media_capture_BUILD.gn deleted file mode 100644 index df3d1fe0fbfb..000000000000 --- a/www/chromium/files/patch-media_capture_BUILD.gn +++ /dev/null @@ -1,19 +0,0 @@ ---- media/capture/BUILD.gn.orig 2017-06-05 19:03:08 UTC -+++ media/capture/BUILD.gn -@@ -160,6 +160,16 @@ component("capture_lib") { - ] - } - -+ if (is_bsd) { -+ sources -= [ -+ "video/linux/video_capture_device_linux.cc", -+ "video/linux/video_capture_device_linux.h", -+ "video/linux/video_capture_device_factory_linux.cc", -+ "video/linux/video_capture_device_factory_linux.h", -+ "video/linux/v4l2_capture_delegate.cc", -+ ] -+ } -+ - if (is_win) { - deps += [ "//media/base/win" ] - libs = [ diff --git a/www/chromium/files/patch-media_capture_video_video__capture__device__factory.cc b/www/chromium/files/patch-media_capture_video_video__capture__device__factory.cc index 925abf3974ae..ec4a0d78e064 100644 --- a/www/chromium/files/patch-media_capture_video_video__capture__device__factory.cc +++ b/www/chromium/files/patch-media_capture_video_video__capture__device__factory.cc @@ -1,9 +1,9 @@ ---- media/capture/video/video_capture_device_factory.cc.orig 2017-12-15 02:04:21.000000000 +0100 -+++ media/capture/video/video_capture_device_factory.cc 2017-12-24 17:18:54.671292000 +0100 -@@ -19,6 +19,10 @@ - VideoCaptureDeviceFactory::CreateFactory( - scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, - gpu::GpuMemoryBufferManager* gpu_buffer_manager) { +--- media/capture/video/video_capture_device_factory.cc.orig 2018-06-13 00:10:20.000000000 +0200 ++++ media/capture/video/video_capture_device_factory.cc 2018-07-20 21:26:51.824846000 +0200 +@@ -21,6 +21,10 @@ + gpu::GpuMemoryBufferManager* gpu_buffer_manager, + MojoJpegDecodeAcceleratorFactoryCB jda_factory, + MojoJpegEncodeAcceleratorFactoryCB jea_factory) { +#if defined(OS_BSD) + return std::unique_ptr<VideoCaptureDeviceFactory>( + new media::FakeVideoCaptureDeviceFactory()); @@ -11,16 +11,16 @@ const base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); // Use a Fake or File Video Device Factory if the command line flags are -@@ -43,6 +47,7 @@ - return std::unique_ptr<VideoCaptureDeviceFactory>( - CreateVideoCaptureDeviceFactory(ui_task_runner, gpu_buffer_manager)); +@@ -47,6 +51,7 @@ + std::move(jda_factory), + std::move(jea_factory))); } +#endif } VideoCaptureDeviceFactory::VideoCaptureDeviceFactory() { -@@ -52,7 +57,7 @@ - VideoCaptureDeviceFactory::~VideoCaptureDeviceFactory() {} +@@ -56,7 +61,7 @@ + VideoCaptureDeviceFactory::~VideoCaptureDeviceFactory() = default; #if !defined(OS_MACOSX) && !defined(OS_LINUX) && !defined(OS_ANDROID) && \ - !defined(OS_WIN) diff --git a/www/chromium/files/patch-media_ffmpeg_ffmpeg_common.h b/www/chromium/files/patch-media_ffmpeg_ffmpeg_common.h new file mode 100644 index 000000000000..5ed0123cc34a --- /dev/null +++ b/www/chromium/files/patch-media_ffmpeg_ffmpeg_common.h @@ -0,0 +1,21 @@ +--- media/ffmpeg/ffmpeg_common.h.orig 2018-07-20 02:33:15.643297000 +0200 ++++ media/ffmpeg/ffmpeg_common.h 2018-07-20 02:34:16.943706000 +0200 +@@ -28,9 +28,6 @@ + MSVC_PUSH_DISABLE_WARNING(4244); + #include <libavcodec/avcodec.h> + #include <libavformat/avformat.h> +-#if !BUILDFLAG(USE_SYSTEM_FFMPEG) +-#include <libavformat/internal.h> +-#endif // !BUILDFLAG(USE_SYSTEM_FFMPEG) + #include <libavformat/avio.h> + #include <libavutil/avutil.h> + #include <libavutil/imgutils.h> +@@ -41,6 +38,8 @@ + } // extern "C" + + namespace media { ++ ++constexpr int64_t kNoFFmpegTimestamp = static_cast<int64_t>(AV_NOPTS_VALUE); + + class AudioDecoderConfig; + class EncryptionScheme; diff --git a/www/chromium/files/patch-media_filters_ffmpeg_demuxer.cc b/www/chromium/files/patch-media_filters_ffmpeg_demuxer.cc new file mode 100644 index 000000000000..26f522181511 --- /dev/null +++ b/www/chromium/files/patch-media_filters_ffmpeg_demuxer.cc @@ -0,0 +1,139 @@ +--- media/filters/ffmpeg_demuxer.cc.orig 2018-06-13 00:10:20.000000000 +0200 ++++ media/filters/ffmpeg_demuxer.cc 2018-07-20 16:10:50.322176000 +0200 +@@ -85,29 +85,26 @@ + frames * base::Time::kMicrosecondsPerSecond / sample_rate); + } + +-static base::TimeDelta ExtractStartTime(AVStream* stream, +- base::TimeDelta start_time_estimate) { +- DCHECK(start_time_estimate != kNoTimestamp); +- if (stream->start_time == static_cast<int64_t>(AV_NOPTS_VALUE)) { +- return start_time_estimate == kInfiniteDuration ? base::TimeDelta() +- : start_time_estimate; +- } ++static base::TimeDelta ExtractStartTime(AVStream* stream) { ++ // The default start time is zero. ++ base::TimeDelta start_time; + +- // First try the lower of the estimate and the |start_time| value. +- base::TimeDelta start_time = +- std::min(ConvertFromTimeBase(stream->time_base, stream->start_time), +- start_time_estimate); ++ // First try to use the |start_time| value as is. ++ if (stream->start_time != kNoFFmpegTimestamp) ++ start_time = ConvertFromTimeBase(stream->time_base, stream->start_time); + +- // Next see if the first buffered pts value is usable. +- if (stream->pts_buffer[0] != static_cast<int64_t>(AV_NOPTS_VALUE)) { +- const base::TimeDelta buffered_pts = +- ConvertFromTimeBase(stream->time_base, stream->pts_buffer[0]); +- if (buffered_pts < start_time) +- start_time = buffered_pts; ++ // Next try to use the first DTS value, for codecs where we know PTS == DTS ++ // (exclude all H26x codecs). The start time must be returned in PTS. ++ if (stream->first_dts != kNoFFmpegTimestamp && ++ stream->codecpar->codec_id != AV_CODEC_ID_HEVC && ++ stream->codecpar->codec_id != AV_CODEC_ID_H264 && ++ stream->codecpar->codec_id != AV_CODEC_ID_MPEG4) { ++ const base::TimeDelta first_pts = ++ ConvertFromTimeBase(stream->time_base, stream->first_dts); ++ if (first_pts < start_time) ++ start_time = first_pts; + } + +- // NOTE: Do not use AVStream->first_dts since |start_time| should be a +- // presentation timestamp. + return start_time; + } + +@@ -514,7 +511,7 @@ + buffer->set_duration(kNoTimestamp); + } + +- // Note: If pts is AV_NOPTS_VALUE, stream_timestamp will be kNoTimestamp. ++ // Note: If pts is kNoFFmpegTimestamp, stream_timestamp will be kNoTimestamp. + const base::TimeDelta stream_timestamp = + ConvertStreamTimestamp(stream_->time_base, packet->pts); + +@@ -557,8 +554,8 @@ + // code paths below; otherwise they should be treated as a parse error. + if ((!fixup_chained_ogg_ || last_packet_timestamp_ == kNoTimestamp) && + buffer->timestamp() < base::TimeDelta()) { +- MEDIA_LOG(DEBUG, media_log_) +- << "FFmpegDemuxer: unfixable negative timestamp"; ++ MEDIA_LOG(ERROR, media_log_) ++ << "FFmpegDemuxer: unfixable negative timestamp."; + demuxer_->NotifyDemuxerError(DEMUXER_ERROR_COULD_NOT_PARSE); + return; + } +@@ -871,7 +868,7 @@ + base::TimeDelta FFmpegDemuxerStream::ConvertStreamTimestamp( + const AVRational& time_base, + int64_t timestamp) { +- if (timestamp == static_cast<int64_t>(AV_NOPTS_VALUE)) ++ if (timestamp == kNoFFmpegTimestamp) + return kNoTimestamp; + + return ConvertFromTimeBase(time_base, timestamp); +@@ -1271,42 +1268,6 @@ + AVFormatContext* format_context = glue_->format_context(); + streams_.resize(format_context->nb_streams); + +- // Estimate the start time for each stream by looking through the packets +- // buffered during avformat_find_stream_info(). These values will be +- // considered later when determining the actual stream start time. +- // +- // These packets haven't been completely processed yet, so only look through +- // these values if the AVFormatContext has a valid start time. +- // +- // If no estimate is found, the stream entry will be kInfiniteDuration. +- std::vector<base::TimeDelta> start_time_estimates(format_context->nb_streams, +- kInfiniteDuration); +-#if !BUILDFLAG(USE_SYSTEM_FFMPEG) +- const AVFormatInternal* internal = format_context->internal; +- if (internal && internal->packet_buffer && +- format_context->start_time != static_cast<int64_t>(AV_NOPTS_VALUE)) { +- struct AVPacketList* packet_buffer = internal->packet_buffer; +- while (packet_buffer != internal->packet_buffer_end) { +- DCHECK_LT(static_cast<size_t>(packet_buffer->pkt.stream_index), +- start_time_estimates.size()); +- const AVStream* stream = +- format_context->streams[packet_buffer->pkt.stream_index]; +- if (packet_buffer->pkt.pts != static_cast<int64_t>(AV_NOPTS_VALUE)) { +- const base::TimeDelta packet_pts = +- ConvertFromTimeBase(stream->time_base, packet_buffer->pkt.pts); +- // We ignore kNoTimestamp here since -int64_t::min() is possible; see +- // https://crbug.com/700501. Technically this is a valid value, but in +- // practice shouldn't occur, so just ignore it when estimating. +- if (packet_pts != kNoTimestamp && packet_pts != kInfiniteDuration && +- packet_pts < start_time_estimates[stream->index]) { +- start_time_estimates[stream->index] = packet_pts; +- } +- } +- packet_buffer = packet_buffer->next; +- } +- } +-#endif // !BUILDFLAG(USE_SYSTEM_FFMPEG) +- + std::unique_ptr<MediaTracks> media_tracks(new MediaTracks()); + + DCHECK(track_id_to_demux_stream_map_.empty()); +@@ -1455,8 +1416,7 @@ + + max_duration = std::max(max_duration, streams_[i]->duration()); + +- base::TimeDelta start_time = +- ExtractStartTime(stream, start_time_estimates[i]); ++ base::TimeDelta start_time = ExtractStartTime(stream); + + // Note: This value is used for seeking, so we must take the true value and + // not the one possibly clamped to zero below. +@@ -1494,7 +1454,7 @@ + if (text_enabled_) + AddTextStreams(); + +- if (format_context->duration != static_cast<int64_t>(AV_NOPTS_VALUE)) { ++ if (format_context->duration != kNoFFmpegTimestamp) { + // If there is a duration value in the container use that to find the + // maximum between it and the duration from A/V streams. + const AVRational av_time_base = {1, AV_TIME_BASE}; diff --git a/www/chromium/files/patch-media_filters_ffmpeg_demuxer_unittest.cc b/www/chromium/files/patch-media_filters_ffmpeg_demuxer_unittest.cc new file mode 100644 index 000000000000..4da754c6844e --- /dev/null +++ b/www/chromium/files/patch-media_filters_ffmpeg_demuxer_unittest.cc @@ -0,0 +1,56 @@ +--- media/filters/ffmpeg_demuxer_unittest.cc.orig 2018-07-20 03:38:14.345859000 +0200 ++++ media/filters/ffmpeg_demuxer_unittest.cc 2018-07-20 03:43:52.359278000 +0200 +@@ -724,12 +724,9 @@ + ReadUntilEndOfStream(GetStream(DemuxerStream::AUDIO)); + } + +-// TODO(dalecurtis): Test is disabled since FFmpeg does not currently guarantee +-// the order of demuxed packets in OGG containers. Re-enable and fix key frame +-// expectations once we decide to either workaround it or attempt a fix +-// upstream. See http://crbug.com/387996. +-TEST_F(FFmpegDemuxerTest, +- DISABLED_Read_AudioNegativeStartTimeAndOggDiscard_Bear) { ++// Android has no Theora support, so these tests doesn't work. ++#if !defined(OS_ANDROID) ++TEST_F(FFmpegDemuxerTest, Read_AudioNegativeStartTimeAndOggDiscard_Bear) { + // Many ogg files have negative starting timestamps, so ensure demuxing and + // seeking work correctly with a negative start time. + CreateDemuxer("bear.ogv"); +@@ -739,8 +736,12 @@ + DemuxerStream* video = GetStream(DemuxerStream::VIDEO); + DemuxerStream* audio = GetStream(DemuxerStream::AUDIO); + +- // Run the test twice with a seek in between. +- for (int i = 0; i < 2; ++i) { ++ // Run the test once (should be twice..., see note) with a seek in between. ++ // ++ // TODO(dalecurtis): We only run the test once since FFmpeg does not currently ++ // guarantee the order of demuxed packets in OGG containers. See ++ // http://crbug.com/387996 ++ for (int i = 0; i < 1; ++i) { + audio->Read( + NewReadCBWithCheckedDiscard(FROM_HERE, 40, 0, kInfiniteDuration, true)); + base::RunLoop().Run(); +@@ -759,10 +760,10 @@ + video->Read(NewReadCB(FROM_HERE, 5751, 0, true)); + base::RunLoop().Run(); + +- video->Read(NewReadCB(FROM_HERE, 846, 33367, true)); ++ video->Read(NewReadCB(FROM_HERE, 846, 33367, false)); + base::RunLoop().Run(); + +- video->Read(NewReadCB(FROM_HERE, 1255, 66733, true)); ++ video->Read(NewReadCB(FROM_HERE, 1255, 66733, false)); + base::RunLoop().Run(); + + // Seek back to the beginning and repeat the test. +@@ -775,9 +776,6 @@ + // Same test above, but using sync2.ogv which has video stream muxed before the + // audio stream, so seeking based only on start time will fail since ffmpeg is + // essentially just seeking based on file position. +-// +-// Android has no Theora support, so this test doesn't work. +-#if !defined(OS_ANDROID) + TEST_F(FFmpegDemuxerTest, Read_AudioNegativeStartTimeAndOggDiscard_Sync) { + // Many ogg files have negative starting timestamps, so ensure demuxing and + // seeking work correctly with a negative start time. diff --git a/www/chromium/files/patch-net_base_address__tracker__linux.cc b/www/chromium/files/patch-net_base_address__tracker__linux.cc index 6f0926f45068..2146beb80cd8 100644 --- a/www/chromium/files/patch-net_base_address__tracker__linux.cc +++ b/www/chromium/files/patch-net_base_address__tracker__linux.cc @@ -1,15 +1,6 @@ ---- net/base/address_tracker_linux.cc.orig 2018-01-21 13:54:41.810603000 +0100 -+++ net/base/address_tracker_linux.cc 2018-01-21 14:00:43.013272000 +0100 -@@ -5,7 +5,7 @@ - #include "net/base/address_tracker_linux.h" - - #include <errno.h> --#include <linux/if.h> -+#include <net/if.h> - #include <stdint.h> - #include <sys/ioctl.h> - -@@ -18,96 +18,9 @@ +--- net/base/address_tracker_linux.cc.orig 2018-06-13 00:10:21.000000000 +0200 ++++ net/base/address_tracker_linux.cc 2018-07-19 15:22:53.324530000 +0200 +@@ -19,96 +19,10 @@ namespace net { namespace internal { @@ -103,11 +94,12 @@ - if (ioctl(ioctl_socket.get(), SIOCGIFNAME, &ifr) == 0) - strncpy(buf, ifr.ifr_name, IFNAMSIZ - 1); - return buf; ++ NOTIMPLEMENTED(); + return NULL; } AddressTrackerLinux::AddressTrackerLinux() -@@ -150,93 +63,8 @@ +@@ -151,93 +65,8 @@ } void AddressTrackerLinux::Init() { @@ -191,7 +183,7 @@ - - if (tracking_) { - rv = base::MessageLoopForIO::current()->WatchFileDescriptor( -- netlink_fd_, true, base::MessageLoopForIO::WATCH_READ, &watcher_, this); +- netlink_fd_, true, base::MessagePumpForIO::WATCH_READ, &watcher_, this); - if (rv < 0) { - PLOG(ERROR) << "Could not watch NETLINK socket"; - AbortAndForceOnline(); @@ -203,7 +195,7 @@ } void AddressTrackerLinux::AbortAndForceOnline() { -@@ -247,25 +75,6 @@ +@@ -248,25 +77,6 @@ connection_type_initialized_cv_.Broadcast(); } @@ -229,7 +221,7 @@ NetworkChangeNotifier::ConnectionType AddressTrackerLinux::GetCurrentConnectionType() { // http://crbug.com/125097 -@@ -316,102 +125,7 @@ +@@ -317,102 +127,7 @@ bool* address_changed, bool* link_changed, bool* tunnel_changed) { @@ -333,7 +325,7 @@ } void AddressTrackerLinux::OnFileCanReadWithoutBlocking(int fd) { -@@ -443,34 +157,7 @@ +@@ -449,34 +164,7 @@ } void AddressTrackerLinux::UpdateCurrentConnectionType() { diff --git a/www/chromium/files/patch-net_http_http__network__session.cc b/www/chromium/files/patch-net_http_http__network__session.cc index c915a54ccfc1..215c47d5c3d3 100644 --- a/www/chromium/files/patch-net_http_http__network__session.cc +++ b/www/chromium/files/patch-net_http_http__network__session.cc @@ -1,9 +1,9 @@ ---- net/http/http_network_session.cc.orig 2017-04-19 19:06:36 UTC -+++ net/http/http_network_session.cc -@@ -23,7 +23,9 @@ +--- net/http/http_network_session.cc.orig 2018-06-13 00:10:22.000000000 +0200 ++++ net/http/http_network_session.cc 2018-07-19 15:24:13.890886000 +0200 +@@ -20,7 +20,9 @@ + #include "base/trace_event/memory_dump_request_args.h" #include "base/trace_event/process_memory_dump.h" #include "base/values.h" - #include "net/base/network_throttle_manager_impl.h" +#if defined(USE_KERBEROS) #include "net/http/http_auth_handler_factory.h" +#endif diff --git a/www/chromium/files/patch-net_proxy_proxy__service.cc b/www/chromium/files/patch-net_proxy_proxy__service.cc deleted file mode 100644 index a5171ba10d50..000000000000 --- a/www/chromium/files/patch-net_proxy_proxy__service.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- net/proxy/proxy_service.cc.orig 2017-12-15 02:04:23.000000000 +0100 -+++ net/proxy/proxy_service.cc 2017-12-24 17:38:51.402197000 +0100 -@@ -46,7 +46,7 @@ - #elif defined(OS_MACOSX) - #include "net/proxy/proxy_config_service_mac.h" - #include "net/proxy/proxy_resolver_mac.h" --#elif defined(OS_LINUX) && !defined(OS_CHROMEOS) -+#elif (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) - #include "net/proxy/proxy_config_service_linux.h" - #elif defined(OS_ANDROID) - #include "net/proxy/proxy_config_service_android.h" -@@ -1496,7 +1496,7 @@ - << "profile_io_data.cc::CreateProxyConfigService and this should " - << "be used only for examples."; - return std::make_unique<UnsetProxyConfigService>(); --#elif defined(OS_LINUX) -+#elif defined(OS_LINUX) || defined(OS_BSD) - std::unique_ptr<ProxyConfigServiceLinux> linux_config_service( - new ProxyConfigServiceLinux()); - diff --git a/www/chromium/files/patch-net_proxy_proxy__config__service__linux.cc b/www/chromium/files/patch-net_proxy_resolution_proxy_config_service_linux.cc index 73a6974430ef..edfbb560c6a8 100644 --- a/www/chromium/files/patch-net_proxy_proxy__config__service__linux.cc +++ b/www/chromium/files/patch-net_proxy_resolution_proxy_config_service_linux.cc @@ -1,5 +1,5 @@ ---- net/proxy/proxy_config_service_linux.cc.orig 2018-03-20 23:05:28.000000000 +0100 -+++ net/proxy/proxy_config_service_linux.cc 2018-03-24 18:11:27.991396000 +0100 +--- net/proxy_resolution/proxy_config_service_linux.cc.orig 2018-07-19 15:35:02.171066000 +0200 ++++ net/proxy_resolution/proxy_config_service_linux.cc 2018-07-19 15:37:12.958237000 +0200 @@ -6,7 +6,9 @@ #include <errno.h> @@ -10,7 +10,7 @@ #include <unistd.h> #include <map> -@@ -483,6 +485,7 @@ +@@ -495,6 +497,7 @@ return default_value; } @@ -18,7 +18,7 @@ // This is the KDE version that reads kioslaverc and simulates gsettings. // Doing this allows the main Delegate code, as well as the unit tests // for it, to stay the same - and the settings map fairly well besides. -@@ -976,6 +979,7 @@ +@@ -984,6 +987,7 @@ DISALLOW_COPY_AND_ASSIGN(SettingGetterImplKDE); }; @@ -26,7 +26,7 @@ } // namespace -@@ -1173,8 +1177,10 @@ +@@ -1199,8 +1203,10 @@ case base::nix::DESKTOP_ENVIRONMENT_KDE3: case base::nix::DESKTOP_ENVIRONMENT_KDE4: case base::nix::DESKTOP_ENVIRONMENT_KDE5: diff --git a/www/chromium/files/patch-net_proxy_resolution_proxy_resolution_service.cc b/www/chromium/files/patch-net_proxy_resolution_proxy_resolution_service.cc new file mode 100644 index 000000000000..39bbcca43e2e --- /dev/null +++ b/www/chromium/files/patch-net_proxy_resolution_proxy_resolution_service.cc @@ -0,0 +1,29 @@ +--- net/proxy_resolution/proxy_resolution_service.cc.orig 2018-07-19 15:31:33.121813000 +0200 ++++ net/proxy_resolution/proxy_resolution_service.cc 2018-07-19 15:32:46.994020000 +0200 +@@ -47,7 +47,7 @@ + #elif defined(OS_MACOSX) + #include "net/proxy_resolution/proxy_config_service_mac.h" + #include "net/proxy_resolution/proxy_resolver_mac.h" +-#elif defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#elif (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) + #include "net/proxy_resolution/proxy_config_service_linux.h" + #elif defined(OS_ANDROID) + #include "net/proxy_resolution/proxy_config_service_android.h" +@@ -61,7 +61,7 @@ + namespace { + + #if defined(OS_WIN) || defined(OS_IOS) || defined(OS_MACOSX) || \ +- (defined(OS_LINUX) && !defined(OS_CHROMEOS)) ++ ((defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)) + constexpr net::NetworkTrafficAnnotationTag kSystemProxyConfigTrafficAnnotation = + net::DefineNetworkTrafficAnnotation("proxy_config_system", R"( + semantics { +@@ -1507,7 +1507,7 @@ + << "profile_io_data.cc::CreateProxyConfigService and this should " + << "be used only for examples."; + return std::make_unique<UnsetProxyConfigService>(); +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + std::unique_ptr<ProxyConfigServiceLinux> linux_config_service( + new ProxyConfigServiceLinux()); + diff --git a/www/chromium/files/patch-net_socket_udp__socket__posix.cc b/www/chromium/files/patch-net_socket_udp__socket__posix.cc index 6516e22aaf92..fb35e85c930a 100644 --- a/www/chromium/files/patch-net_socket_udp__socket__posix.cc +++ b/www/chromium/files/patch-net_socket_udp__socket__posix.cc @@ -1,6 +1,6 @@ ---- net/socket/udp_socket_posix.cc.orig 2018-02-24 16:25:17.000000000 +0100 -+++ net/socket/udp_socket_posix.cc 2018-03-04 03:08:15.161087000 +0100 -@@ -69,7 +69,7 @@ +--- net/socket/udp_socket_posix.cc.orig 2018-06-13 00:10:23.000000000 +0200 ++++ net/socket/udp_socket_posix.cc 2018-07-20 14:49:13.507247000 +0200 +@@ -72,7 +72,7 @@ const base::TimeDelta kActivityMonitorMsThreshold = base::TimeDelta::FromMilliseconds(100); @@ -9,7 +9,16 @@ // When enabling multicast using setsockopt(IP_MULTICAST_IF) MacOS and Fuchsia // require passing IPv4 address instead of interface index. This function -@@ -647,13 +647,16 @@ +@@ -656,7 +656,7 @@ + } + + void UDPSocketPosix::SetMsgConfirm(bool confirm) { +-#if !defined(OS_MACOSX) && !defined(OS_IOS) ++#if !defined(OS_MACOSX) && !defined(OS_IOS) && !defined(OS_BSD) + if (confirm) { + sendto_flags_ |= MSG_CONFIRM; + } else { +@@ -677,13 +677,16 @@ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); int value = broadcast ? 1 : 0; int rv; @@ -27,7 +36,7 @@ rv = setsockopt(socket_, SOL_SOCKET, SO_REUSEPORT, &value, sizeof(value)); if (rv != 0) return MapSystemError(errno); -@@ -860,19 +863,24 @@ +@@ -925,19 +928,24 @@ if (multicast_interface_ != 0) { switch (addr_family_) { case AF_INET: { @@ -54,7 +63,7 @@ if (rv) return MapSystemError(errno); break; -@@ -934,7 +942,7 @@ +@@ -999,7 +1007,7 @@ if (addr_family_ != AF_INET) return ERR_ADDRESS_INVALID; diff --git a/www/chromium/files/patch-net_tools_cert__verify__tool_verify__using__path__builder.cc b/www/chromium/files/patch-net_tools_cert__verify__tool_verify__using__path__builder.cc deleted file mode 100644 index 03c53de3a2c2..000000000000 --- a/www/chromium/files/patch-net_tools_cert__verify__tool_verify__using__path__builder.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- net/tools/cert_verify_tool/verify_using_path_builder.cc.orig 2017-06-05 19:03:10 UTC -+++ net/tools/cert_verify_tool/verify_using_path_builder.cc -@@ -34,7 +34,7 @@ - #include "net/cert/internal/trust_store_nss.h" - #endif - --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - #include "net/proxy/proxy_config.h" - #include "net/proxy/proxy_config_service_fixed.h" - #endif -@@ -187,7 +187,7 @@ void SetUpOnNetworkThread(std::unique_ptr<net::URLRequ - // (similar to VERIFY_CERT_IO_ENABLED flag for CertVerifyProc). - net::URLRequestContextBuilder url_request_context_builder; - url_request_context_builder.set_user_agent(GetUserAgent()); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - // On Linux, use a fixed ProxyConfigService, since the default one - // depends on glib. - // diff --git a/www/chromium/files/patch-net_tools_cert_verify_tool_cert_verify_tool.cc b/www/chromium/files/patch-net_tools_cert_verify_tool_cert_verify_tool.cc new file mode 100644 index 000000000000..ac4efdd9bdc3 --- /dev/null +++ b/www/chromium/files/patch-net_tools_cert_verify_tool_cert_verify_tool.cc @@ -0,0 +1,20 @@ +--- net/tools/cert_verify_tool/cert_verify_tool.cc.orig 2018-07-19 22:18:26.747684000 +0200 ++++ net/tools/cert_verify_tool/cert_verify_tool.cc 2018-07-19 22:18:48.374229000 +0200 +@@ -26,7 +26,7 @@ + #include "net/url_request/url_request_context_builder.h" + #include "net/url_request/url_request_context_getter.h" + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + #include "net/proxy_resolution/proxy_config.h" + #include "net/proxy_resolution/proxy_config_service_fixed.h" + #endif +@@ -45,7 +45,7 @@ + base::WaitableEvent* initialization_complete_event) { + net::URLRequestContextBuilder url_request_context_builder; + url_request_context_builder.set_user_agent(GetUserAgent()); +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + // On Linux, use a fixed ProxyConfigService, since the default one + // depends on glib. + // diff --git a/www/chromium/files/patch-net_tools_get__server__time_get__server__time.cc b/www/chromium/files/patch-net_tools_get__server__time_get__server__time.cc deleted file mode 100644 index fb90d41f14d8..000000000000 --- a/www/chromium/files/patch-net_tools_get__server__time_get__server__time.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- net/tools/get_server_time/get_server_time.cc.orig 2017-06-05 19:03:10 UTC -+++ net/tools/get_server_time/get_server_time.cc -@@ -46,7 +46,7 @@ - - #if defined(OS_MACOSX) - #include "base/mac/scoped_nsautorelease_pool.h" --#elif defined(OS_LINUX) -+#elif defined(OS_LINUX) || defined(OS_BSD) - #include "net/proxy/proxy_config.h" - #include "net/proxy/proxy_config_service_fixed.h" - #endif -@@ -142,7 +142,7 @@ class PrintingLogObserver : public net::NetLog::Thread - std::unique_ptr<net::URLRequestContext> BuildURLRequestContext( - net::NetLog* net_log) { - net::URLRequestContextBuilder builder; --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - // On Linux, use a fixed ProxyConfigService, since the default one - // depends on glib. - // diff --git a/www/chromium/files/patch-net_url__request_url__request__context__builder.cc b/www/chromium/files/patch-net_url__request_url__request__context__builder.cc index e8888da501ad..1420fae0e561 100644 --- a/www/chromium/files/patch-net_url__request_url__request__context__builder.cc +++ b/www/chromium/files/patch-net_url__request_url__request__context__builder.cc @@ -1,20 +1,11 @@ ---- net/url_request/url_request_context_builder.cc.orig 2017-07-25 21:04:59.000000000 +0200 -+++ net/url_request/url_request_context_builder.cc 2017-08-02 14:44:51.403673000 +0200 -@@ -435,7 +435,7 @@ +--- net/url_request/url_request_context_builder.cc.orig 2018-06-13 00:10:23.000000000 +0200 ++++ net/url_request/url_request_context_builder.cc 2018-07-19 16:09:43.508974000 +0200 +@@ -506,7 +506,7 @@ } - if (!proxy_service_) { + if (!proxy_resolution_service_) { -#if !defined(OS_LINUX) && !defined(OS_ANDROID) +#if !defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_BSD) // TODO(willchan): Switch to using this code when - // ProxyService::CreateSystemProxyConfigService()'s signature doesn't suck. - if (!proxy_config_service_) { -@@ -443,7 +443,7 @@ - base::ThreadTaskRunnerHandle::Get().get(), - context->GetFileTaskRunner()); - } --#endif // !defined(OS_LINUX) && !defined(OS_ANDROID) -+#endif // !defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_BSD) - proxy_service_ = - CreateProxyService(std::move(proxy_config_service_), context.get(), - context->host_resolver(), + // ProxyResolutionService::CreateSystemProxyConfigService()'s signature + // doesn't suck. diff --git a/www/chromium/files/patch-sandbox_linux_BUILD.gn b/www/chromium/files/patch-sandbox_linux_BUILD.gn index 865c5278a905..1431884418d4 100644 --- a/www/chromium/files/patch-sandbox_linux_BUILD.gn +++ b/www/chromium/files/patch-sandbox_linux_BUILD.gn @@ -1,5 +1,5 @@ ---- sandbox/linux/BUILD.gn.orig 2017-08-02 15:43:44.385043000 +0200 -+++ sandbox/linux/BUILD.gn 2017-08-02 15:45:22.965205000 +0200 +--- sandbox/linux/BUILD.gn.orig 2018-06-13 00:10:23.000000000 +0200 ++++ sandbox/linux/BUILD.gn 2018-07-20 21:32:57.834564000 +0200 @@ -12,12 +12,12 @@ } @@ -16,7 +16,7 @@ } if (is_nacl_nonsfi) { -@@ -360,7 +360,7 @@ +@@ -396,7 +396,7 @@ public_deps += [ ":sandbox_services_headers" ] } @@ -25,7 +25,7 @@ cflags = [ "-fgnu-inline-asm" ] sources -= [ -@@ -368,6 +368,8 @@ +@@ -404,6 +404,8 @@ "services/init_process_reaper.h", "services/scoped_process.cc", "services/scoped_process.h", @@ -34,3 +34,14 @@ "services/yama.cc", "services/yama.h", "syscall_broker/broker_channel.cc", +@@ -420,6 +422,10 @@ + "syscall_broker/broker_permission_list.h", + "syscall_broker/broker_process.cc", + "syscall_broker/broker_process.h", ++ ] ++ sources += [ ++ "services/libc_interceptor.cc", ++ "services/libc_interceptor.h", + ] + } else if (!is_android) { + sources += [ diff --git a/www/chromium/files/patch-sandbox_linux_services_libc_interceptor.cc b/www/chromium/files/patch-sandbox_linux_services_libc_interceptor.cc new file mode 100644 index 000000000000..e35affcfb2a3 --- /dev/null +++ b/www/chromium/files/patch-sandbox_linux_services_libc_interceptor.cc @@ -0,0 +1,21 @@ +--- sandbox/linux/services/libc_interceptor.cc.orig 2018-07-19 22:19:52.264027000 +0200 ++++ sandbox/linux/services/libc_interceptor.cc 2018-07-19 22:20:31.348730000 +0200 +@@ -11,7 +11,9 @@ + #include <stddef.h> + #include <stdint.h> + #include <string.h> ++#if !defined(OS_BSD) + #include <sys/prctl.h> ++#endif + #include <sys/socket.h> + #include <sys/types.h> + #include <time.h> +@@ -94,7 +96,7 @@ + } else { + base::AutoLock lock(g_timezones_lock.Get()); + auto ret_pair = g_timezones.Get().insert(timezone); +- output->tm_zone = ret_pair.first->c_str(); ++ output->tm_zone = (char *)ret_pair.first->c_str(); + } + + return true; diff --git a/www/chromium/files/patch-services_device_hid_hid__connection__freebsd.cc b/www/chromium/files/patch-services_device_hid_hid__connection__freebsd.cc index 120b8421c0db..a8979b0c82cf 100644 --- a/www/chromium/files/patch-services_device_hid_hid__connection__freebsd.cc +++ b/www/chromium/files/patch-services_device_hid_hid__connection__freebsd.cc @@ -1,5 +1,5 @@ ---- services/device/hid/hid_connection_freebsd.cc.orig 2018-03-26 19:51:55.335784000 -0700 -+++ services/device/hid/hid_connection_freebsd.cc 2018-03-26 22:43:54.916775000 -0700 +--- services/device/hid/hid_connection_freebsd.cc.orig 2018-07-20 13:47:11.556393000 +0200 ++++ services/device/hid/hid_connection_freebsd.cc 2018-07-20 15:22:57.210103000 +0200 @@ -0,0 +1,277 @@ +// Copyright (c) 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -180,7 +180,7 @@ + : HidConnection(device_info), + blocking_task_runner_(std::move(blocking_task_runner)), + weak_factory_(this) { -+ helper_ = base::MakeUnique<BlockingTaskHelper>(std::move(fd), device_info, ++ helper_ = std::make_unique<BlockingTaskHelper>(std::move(fd), device_info, + weak_factory_.GetWeakPtr()); + blocking_task_runner_->PostTask( + FROM_HERE, base::BindOnce(&BlockingTaskHelper::Start, diff --git a/www/chromium/files/patch-services_device_hid_hid__service__freebsd.cc b/www/chromium/files/patch-services_device_hid_hid__service__freebsd.cc index 1a9fca029430..f499827a6642 100644 --- a/www/chromium/files/patch-services_device_hid_hid__service__freebsd.cc +++ b/www/chromium/files/patch-services_device_hid_hid__service__freebsd.cc @@ -1,5 +1,5 @@ ---- services/device/hid/hid_service_freebsd.cc.orig 2018-03-04 05:38:54.466235000 +0100 -+++ services/device/hid/hid_service_freebsd.cc 2018-03-04 08:47:26.934621000 +0100 +--- services/device/hid/hid_service_freebsd.cc.orig 2018-07-20 13:47:11.569682000 +0200 ++++ services/device/hid/hid_service_freebsd.cc 2018-07-20 15:20:19.980971000 +0200 @@ -0,0 +1,371 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -295,7 +295,7 @@ + blocking_task_runner_( + base::CreateSequencedTaskRunnerWithTraits(kBlockingTaskTraits)), + weak_factory_(this) { -+ helper_ = base::MakeUnique<BlockingTaskHelper>(weak_factory_.GetWeakPtr()); ++ helper_ = std::make_unique<BlockingTaskHelper>(weak_factory_.GetWeakPtr()); + blocking_task_runner_->PostTask( + FROM_HERE, + base::Bind(&BlockingTaskHelper::Start, base::Unretained(helper_.get()))); @@ -344,7 +344,7 @@ + + scoped_refptr<HidDeviceInfo> device_info = map_entry->second; + -+ auto params = base::MakeUnique<ConnectParams>(device_info, callback); ++ auto params = std::make_unique<ConnectParams>(device_info, callback); + + scoped_refptr<base::SequencedTaskRunner> blocking_task_runner = + params->blocking_task_runner; diff --git a/www/chromium/files/patch-services_network_network_sandbox_hook_linux.cc b/www/chromium/files/patch-services_network_network_sandbox_hook_linux.cc new file mode 100644 index 000000000000..4c47c759fa2b --- /dev/null +++ b/www/chromium/files/patch-services_network_network_sandbox_hook_linux.cc @@ -0,0 +1,18 @@ +--- services/network/network_sandbox_hook_linux.cc.orig 2018-07-20 00:26:50.262722000 +0200 ++++ services/network/network_sandbox_hook_linux.cc 2018-07-20 00:17:37.945110000 +0200 +@@ -14,6 +14,7 @@ + namespace network { + + bool NetworkPreSandboxHook(service_manager::SandboxLinux::Options options) { ++#if !defined(OS_BSD) + auto* instance = service_manager::SandboxLinux::GetInstance(); + + // TODO(tsepez): remove universal permission under filesytem root. +@@ -32,6 +33,7 @@ + service_manager::SandboxLinux::PreSandboxHook(), options); + + instance->EngageNamespaceSandbox(false /* from_zygote */); ++#endif + return true; + } + diff --git a/www/chromium/files/patch-services_resource_coordinator_public_cpp_memory_instrumentation_os_metrics_linux.cc b/www/chromium/files/patch-services_resource_coordinator_public_cpp_memory_instrumentation_os_metrics_linux.cc index 4e9e7f4232c7..07d7afbd41f4 100644 --- a/www/chromium/files/patch-services_resource_coordinator_public_cpp_memory_instrumentation_os_metrics_linux.cc +++ b/www/chromium/files/patch-services_resource_coordinator_public_cpp_memory_instrumentation_os_metrics_linux.cc @@ -1,30 +1,20 @@ ---- services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_linux.cc.orig 2017-09-05 21:05:23.000000000 +0200 -+++ services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_linux.cc 2017-09-09 15:42:00.563572000 +0200 -@@ -15,6 +15,11 @@ - #include "build/build_config.h" - #include "services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics.h" - +--- services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_linux.cc.orig 2018-06-13 00:10:24.000000000 +0200 ++++ services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_linux.cc 2018-07-20 15:29:23.131774000 +0200 +@@ -178,6 +178,9 @@ + // static + bool OSMetrics::FillOSMemoryDump(base::ProcessId pid, + mojom::RawOSMemDump* dump) { +#if defined(OS_BSD) -+#include <sys/types.h> -+#include <sys/sysctl.h> -+#endif -+ - namespace memory_instrumentation { ++ return false; ++#else + base::ScopedFD autoclose = OpenStatm(pid); + int statm_fd = autoclose.get(); - namespace { -@@ -201,7 +206,15 @@ +@@ -203,6 +206,7 @@ + dump->resident_set_kb = process_metrics->GetResidentSetSize() / 1024; - const static size_t page_size = base::GetPageSize(); - uint64_t rss_anon_bytes = (resident_pages - shared_pages) * page_size; -+#if defined(OS_BSD) -+ uint64_t retval; -+ size_t size = sizeof(retval); -+ -+ sysctlbyname("vm.swap_total", &retval, &size, NULL, 0); -+ uint64_t vm_swap_bytes = retval; -+#else - uint64_t vm_swap_bytes = process_metrics->GetVmSwapBytes(); + return true; +#endif + } - dump->platform_private_footprint.rss_anon_bytes = rss_anon_bytes; - dump->platform_private_footprint.vm_swap_bytes = vm_swap_bytes; + // static diff --git a/www/chromium/files/patch-storage_browser_quota_quota__settings.cc b/www/chromium/files/patch-storage_browser_quota_quota__settings.cc deleted file mode 100644 index a970baa12ebb..000000000000 --- a/www/chromium/files/patch-storage_browser_quota_quota__settings.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- storage/browser/quota/quota_settings.cc.orig 2017-06-05 19:03:11 UTC -+++ storage/browser/quota/quota_settings.cc -@@ -78,7 +78,7 @@ base::Optional<storage::QuotaSettings> CalculateNomina - 1000 * kMBytes; - #elif defined(OS_CHROMEOS) - 1000 * kMBytes; --#elif defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) -+#elif defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) - 10000 * kMBytes; - #else - #error "Port: Need to define an OS accomodation value for unknown OS." diff --git a/www/chromium/files/patch-third__party_WebKit_Source_bindings_core_v8_V8ScriptRunner.cpp b/www/chromium/files/patch-third__party_WebKit_Source_bindings_core_v8_V8ScriptRunner.cpp deleted file mode 100644 index e1e849a00ee1..000000000000 --- a/www/chromium/files/patch-third__party_WebKit_Source_bindings_core_v8_V8ScriptRunner.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp.orig 2017-09-05 21:05:39.000000000 +0200 -+++ third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp 2017-09-07 17:51:16.350712000 +0200 -@@ -49,6 +49,8 @@ - - #if defined(OS_WIN) - #include <malloc.h> -+#elif defined(OS_FREEBSD) -+#include <stdlib.h> - #else - #include <alloca.h> - #endif diff --git a/www/chromium/files/patch-third__party_WebKit_Source_platform_BUILD.gn b/www/chromium/files/patch-third__party_WebKit_Source_platform_BUILD.gn deleted file mode 100644 index a1630e151f0d..000000000000 --- a/www/chromium/files/patch-third__party_WebKit_Source_platform_BUILD.gn +++ /dev/null @@ -1,10 +0,0 @@ ---- third_party/WebKit/Source/platform/BUILD.gn.orig 2017-12-31 11:16:52.912677000 +0100 -+++ third_party/WebKit/Source/platform/BUILD.gn 2017-12-31 11:18:02.966134000 +0100 -@@ -148,6 +148,7 @@ - "//build/win:default_exe_manifest", - "//third_party/icu", - ] -+ libs = [ "cxxrt" ] - } - - # This isn't strictly necessary since we can just add the deps to "platform", diff --git a/www/chromium/files/patch-third__party_WebKit_Source_platform_fonts_FontCache.cpp b/www/chromium/files/patch-third__party_WebKit_Source_platform_fonts_FontCache.cpp deleted file mode 100644 index 7616918e9b40..000000000000 --- a/www/chromium/files/patch-third__party_WebKit_Source_platform_fonts_FontCache.cpp +++ /dev/null @@ -1,23 +0,0 @@ ---- third_party/WebKit/Source/platform/fonts/FontCache.cpp.orig 2017-09-05 21:05:41.000000000 +0200 -+++ third_party/WebKit/Source/platform/fonts/FontCache.cpp 2017-09-06 21:33:11.655017000 +0200 -@@ -64,9 +64,9 @@ - - namespace blink { - --#if !defined(OS_WIN) && !defined(OS_LINUX) -+#if !defined(OS_WIN) && !defined(OS_LINUX) && !defined(OS_BSD) - FontCache::FontCache() : purge_prevent_count_(0), font_manager_(nullptr) {} --#endif // !defined(OS_WIN) && !defined(OS_LINUX) -+#endif // !defined(OS_WIN) && !defined(OS_LINUX) && !defined(OS_BSD) - - SkFontMgr* FontCache::static_font_manager_ = nullptr; - -@@ -85,7 +85,7 @@ - FontPlatformData* FontCache::SystemFontPlatformData( - const FontDescription& font_description) { - const AtomicString& family = FontCache::SystemFontFamily(); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - if (family.IsEmpty() || family == FontFamilyNames::system_ui) - return nullptr; - #else diff --git a/www/chromium/files/patch-third__party_WebKit_Source_platform_fonts_FontCache.h b/www/chromium/files/patch-third__party_WebKit_Source_platform_fonts_FontCache.h deleted file mode 100644 index f3768818fd85..000000000000 --- a/www/chromium/files/patch-third__party_WebKit_Source_platform_fonts_FontCache.h +++ /dev/null @@ -1,20 +0,0 @@ ---- third_party/WebKit/Source/platform/fonts/FontCache.h.orig 2017-09-05 21:05:41.000000000 +0200 -+++ third_party/WebKit/Source/platform/fonts/FontCache.h 2017-09-06 21:34:33.301287000 +0200 -@@ -165,7 +165,7 @@ - #else - static const AtomicString& LegacySystemFontFamily(); - #endif --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) - static void SetSystemFontFamily(const AtomicString&); - #endif - -@@ -282,7 +282,7 @@ - const FontFaceCreationParams&, - CString& name); - --#if defined(OS_ANDROID) || defined(OS_LINUX) -+#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) - static AtomicString GetFamilyNameForCharacter(SkFontMgr*, - UChar32, - const FontDescription&, diff --git a/www/chromium/files/patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.cpp b/www/chromium/files/patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.cpp deleted file mode 100644 index e1899e2a20ab..000000000000 --- a/www/chromium/files/patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.cpp +++ /dev/null @@ -1,47 +0,0 @@ ---- third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp.orig 2018-02-24 16:25:34.000000000 +0100 -+++ third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp 2018-03-04 03:59:33.369885000 +0100 -@@ -93,7 +93,7 @@ - synthetic_italic_(source.synthetic_italic_), - avoid_embedded_bitmaps_(source.avoid_embedded_bitmaps_), - orientation_(source.orientation_), --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) - style_(source.style_), - #endif - harf_buzz_face_(nullptr), -@@ -115,7 +115,7 @@ - synthetic_italic_(src.synthetic_italic_), - avoid_embedded_bitmaps_(false), - orientation_(src.orientation_), --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) - style_(FontRenderStyle::QuerySystem( - family_, - text_size_, -@@ -148,7 +148,7 @@ - synthetic_italic_(synthetic_italic), - avoid_embedded_bitmaps_(false), - orientation_(orientation), --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) - style_(FontRenderStyle::QuerySystem( - family_, - text_size_, -@@ -195,7 +195,7 @@ - avoid_embedded_bitmaps_ = other.avoid_embedded_bitmaps_; - harf_buzz_face_ = nullptr; - orientation_ = other.orientation_; --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) - style_ = other.style_; - #endif - -@@ -220,7 +220,7 @@ - synthetic_bold_ == a.synthetic_bold_ && - synthetic_italic_ == a.synthetic_italic_ && - avoid_embedded_bitmaps_ == a.avoid_embedded_bitmaps_ --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) - && style_ == a.style_ - #endif - && orientation_ == a.orientation_; diff --git a/www/chromium/files/patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.h b/www/chromium/files/patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.h deleted file mode 100644 index 779f1ccb4281..000000000000 --- a/www/chromium/files/patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.h +++ /dev/null @@ -1,32 +0,0 @@ ---- third_party/WebKit/Source/platform/fonts/FontPlatformData.h.orig 2017-09-05 21:05:41.000000000 +0200 -+++ third_party/WebKit/Source/platform/fonts/FontPlatformData.h 2017-09-06 21:44:50.459129000 +0200 -@@ -48,9 +48,9 @@ - #include "platform/wtf/text/StringImpl.h" - #include "third_party/skia/include/core/SkRefCnt.h" - --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) - #include "platform/fonts/linux/FontRenderStyle.h" --#endif // defined(OS_LINUX) || defined(OS_ANDROID) -+#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) - - #if defined(OS_MACOSX) - OBJC_CLASS NSFont; -@@ -152,7 +152,7 @@ - PassRefPtr<OpenTypeVerticalData> VerticalData() const; - Vector<char> OpenTypeTable(SkFontTableTag) const; - --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) - // The returned styles are all actual styles without - // FontRenderStyle::NoPreference. - const FontRenderStyle& GetFontRenderStyle() const { return style_; } -@@ -182,7 +182,7 @@ - FontOrientation orientation_; - - private: --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) - FontRenderStyle style_; - #endif - diff --git a/www/chromium/files/patch-third__party_WebKit_Source_platform_heap_GCInfo.cpp b/www/chromium/files/patch-third__party_WebKit_Source_platform_heap_GCInfo.cpp deleted file mode 100644 index 716742439bc3..000000000000 --- a/www/chromium/files/patch-third__party_WebKit_Source_platform_heap_GCInfo.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- third_party/WebKit/Source/platform/heap/GCInfo.cpp.orig 2017-04-19 19:06:50 UTC -+++ third_party/WebKit/Source/platform/heap/GCInfo.cpp -@@ -7,6 +7,8 @@ - #include "platform/heap/Handle.h" - #include "platform/heap/Heap.h" - -+#include <stdlib.h> -+ - namespace blink { - - // GCInfo indices start from 1 for heap objects, with 0 being treated diff --git a/www/chromium/files/patch-third__party_WebKit_Source_platform_heap_StackFrameDepth.cpp b/www/chromium/files/patch-third__party_WebKit_Source_platform_heap_StackFrameDepth.cpp deleted file mode 100644 index 869e4e0f05f2..000000000000 --- a/www/chromium/files/patch-third__party_WebKit_Source_platform_heap_StackFrameDepth.cpp +++ /dev/null @@ -1,14 +0,0 @@ ---- third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp.orig 2017-09-05 21:05:41.000000000 +0200 -+++ third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp 2017-09-06 22:02:32.472630000 +0200 -@@ -15,6 +15,11 @@ - extern "C" void* __libc_stack_end; // NOLINT - #endif - -+#if defined(OS_BSD) -+#include <sys/signal.h> -+#include <pthread_np.h> -+#endif -+ - namespace blink { - - static const char* g_avoid_optimization = nullptr; diff --git a/www/chromium/files/patch-third__party_WebKit_Source_platform_wtf_BUILD.gn b/www/chromium/files/patch-third__party_WebKit_Source_platform_wtf_BUILD.gn deleted file mode 100644 index fd22013f35d8..000000000000 --- a/www/chromium/files/patch-third__party_WebKit_Source_platform_wtf_BUILD.gn +++ /dev/null @@ -1,16 +0,0 @@ ---- third_party/WebKit/Source/platform/wtf/BUILD.gn.orig 2017-12-15 02:04:47.000000000 +0100 -+++ third_party/WebKit/Source/platform/wtf/BUILD.gn 2017-12-30 01:24:23.342711000 +0100 -@@ -302,8 +302,12 @@ - if (is_android) { - libs = [ "log" ] - } -- if (is_linux) { -+ if (is_linux && !is_bsd) { - libs = [ "dl" ] -+ } -+ -+ if (is_bsd) { -+ libs = [ "execinfo" ] - } - - if (is_mac) { diff --git a/www/chromium/files/patch-third__party_angle_third_party_vulkan-validation-layers_src_loader_loader.c b/www/chromium/files/patch-third__party_angle_third_party_vulkan-validation-layers_src_loader_loader.c new file mode 100644 index 000000000000..d5b06a1b7fa2 --- /dev/null +++ b/www/chromium/files/patch-third__party_angle_third_party_vulkan-validation-layers_src_loader_loader.c @@ -0,0 +1,11 @@ +--- third_party/angle/third_party/vulkan-validation-layers/src/loader/loader.c.orig 2018-07-19 21:08:23.127507000 +0200 ++++ third_party/angle/third_party/vulkan-validation-layers/src/loader/loader.c 2018-07-19 21:08:38.418461000 +0200 +@@ -208,7 +208,7 @@ + } + + // Environment variables +-#if defined(__linux__) || defined(__APPLE__) ++#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) + + static inline char *loader_getenv(const char *name, const struct loader_instance *inst) { + // No allocation of memory necessary for Linux, but we should at least touch diff --git a/www/chromium/files/patch-third__party_angle_third_party_vulkan-validation-layers_src_loader_vk_loader_platform.h b/www/chromium/files/patch-third__party_angle_third_party_vulkan-validation-layers_src_loader_vk_loader_platform.h new file mode 100644 index 000000000000..09e7033c0235 --- /dev/null +++ b/www/chromium/files/patch-third__party_angle_third_party_vulkan-validation-layers_src_loader_vk_loader_platform.h @@ -0,0 +1,11 @@ +--- third_party/angle/third_party/vulkan-validation-layers/src/loader/vk_loader_platform.h.orig 2018-07-19 21:07:44.888863000 +0200 ++++ third_party/angle/third_party/vulkan-validation-layers/src/loader/vk_loader_platform.h 2018-07-19 21:08:10.994378000 +0200 +@@ -31,7 +31,7 @@ + #include "vulkan/vk_platform.h" + #include "vulkan/vk_sdk_platform.h" + +-#if defined(__linux__) || defined(__APPLE__) ++#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) + /* Linux-specific common code: */ + + // Headers: diff --git a/www/chromium/files/patch-third__party_libusb_BUILD.gn b/www/chromium/files/patch-third__party_libusb_BUILD.gn deleted file mode 100644 index acdb5d772306..000000000000 --- a/www/chromium/files/patch-third__party_libusb_BUILD.gn +++ /dev/null @@ -1,43 +0,0 @@ ---- third_party/libusb/BUILD.gn.orig 2017-06-15 21:03:21.000000000 +0200 -+++ third_party/libusb/BUILD.gn 2017-06-16 20:36:59.253682000 +0200 -@@ -6,10 +6,24 @@ - - import("//build/config/features.gni") - --config("libusb_config") { -- include_dirs = [ "src/libusb" ] -+declare_args() { -+ use_system_libusb = is_bsd - } - -+if (use_system_libusb) { -+ config("libusb_config") { -+ libs = [ "usb" ] -+ } -+ -+ source_set("libusb") { -+ public_configs = [ ":libusb_config" ] -+ } -+} else { -+ config("libusb_config") { -+ include_dirs = [ "src/libusb" ] -+ } -+} -+ - config("libusb_warnings") { - visibility = [ ":*" ] - if (is_clang) { -@@ -21,6 +35,7 @@ - } - } - -+if (!use_system_libusb) { - static_library("libusb") { - sources = [ - "src/config.h", -@@ -144,4 +159,5 @@ - "src/msvc/stdint.h", - ] - } -+} - } diff --git a/www/chromium/files/patch-third__party_skia_src_core_SkCpu.cpp b/www/chromium/files/patch-third__party_skia_src_core_SkCpu.cpp index a319f3ee53bd..2fabf991e3a9 100644 --- a/www/chromium/files/patch-third__party_skia_src_core_SkCpu.cpp +++ b/www/chromium/files/patch-third__party_skia_src_core_SkCpu.cpp @@ -1,16 +1,17 @@ ---- third_party/skia/src/core/SkCpu.cpp 2018-04-13 18:15:13 UTC -+++ third_party/skia/src/core/SkCpu.cpp -@@ -78,12 +78,15 @@ +--- third_party/skia/src/core/SkCpu.cpp.orig 2018-06-13 00:12:11.000000000 +0200 ++++ third_party/skia/src/core/SkCpu.cpp 2018-07-19 20:40:05.469146000 +0200 +@@ -78,6 +78,8 @@ #include <sys/auxv.h> static uint32_t read_cpu_features() { +return 0; +#if 0 - const uint32_t kHWCAP_CRC32 = (1<<7); + const uint32_t kHWCAP_CRC32 = (1<< 7), + kHWCAP_ASIMDHP = (1<<10); - uint32_t features = 0; - uint32_t hwcaps = getauxval(AT_HWCAP); - if (hwcaps & kHWCAP_CRC32) { features |= SkCpu::CRC32; } +@@ -86,6 +88,7 @@ + if (hwcaps & kHWCAP_CRC32 ) { features |= SkCpu::CRC32; } + if (hwcaps & kHWCAP_ASIMDHP) { features |= SkCpu::ASIMDHP; } return features; +#endif } diff --git a/www/chromium/files/patch-third__party_skia_src_opts_SkRasterPipeline_opts.h b/www/chromium/files/patch-third__party_skia_src_opts_SkRasterPipeline_opts.h new file mode 100644 index 000000000000..aed5fd0ce6f9 --- /dev/null +++ b/www/chromium/files/patch-third__party_skia_src_opts_SkRasterPipeline_opts.h @@ -0,0 +1,20 @@ +--- third_party/skia/src/opts/SkRasterPipeline_opts.h.orig 2018-07-20 03:02:44.498284000 +0200 ++++ third_party/skia/src/opts/SkRasterPipeline_opts.h 2018-07-20 03:04:09.892857000 +0200 +@@ -653,7 +653,7 @@ + } + + SI F from_half(U16 h) { +-#if defined(__aarch64__) && !defined(SK_BUILD_FOR_GOOGLE3) // Temporary workaround for some Google3 builds. ++#if defined(JUMPER_IS_NEON) && defined(__aarch64__) && !defined(SK_BUILD_FOR_GOOGLE3) // Temporary workaround for some Google3 builds. + return vcvt_f32_f16(h); + + #elif defined(JUMPER_IS_HSW) || defined(JUMPER_IS_AVX512) +@@ -673,7 +673,7 @@ + } + + SI U16 to_half(F f) { +-#if defined(__aarch64__) && !defined(SK_BUILD_FOR_GOOGLE3) // Temporary workaround for some Google3 builds. ++#if defined(JUMPER_IS_NEON) && defined(__aarch64__) && !defined(SK_BUILD_FOR_GOOGLE3) // Temporary workaround for some Google3 builds. + return vcvt_f16_f32(f); + + #elif defined(JUMPER_IS_HSW) || defined(JUMPER_IS_AVX512) diff --git a/www/chromium/files/patch-third__party_skia_src_ports_SkFontHost_Freetype.cpp b/www/chromium/files/patch-third__party_skia_src_ports_SkFontHost_Freetype.cpp new file mode 100644 index 000000000000..ab336e21f600 --- /dev/null +++ b/www/chromium/files/patch-third__party_skia_src_ports_SkFontHost_Freetype.cpp @@ -0,0 +1,77 @@ +--- third_party/skia/src/ports/SkFontHost_FreeType.cpp.orig 2018-07-20 01:19:49.019547000 +0200 ++++ third_party/skia/src/ports/SkFontHost_FreeType.cpp 2018-07-20 01:24:40.435966000 +0200 +@@ -99,8 +99,6 @@ + FreeTypeLibrary() + : fGetVarDesignCoordinates(nullptr) + , fLibrary(nullptr) +- , fIsLCDSupported(false) +- , fLCDExtra(0) + { + if (FT_New_Library(&gFTMemory, &fLibrary)) { + return; +@@ -147,12 +145,7 @@ + } + #endif + +- // Setup LCD filtering. This reduces color fringes for LCD smoothed glyphs. +- // The default has changed over time, so this doesn't mean the same thing to all users. +- if (FT_Library_SetLcdFilter(fLibrary, FT_LCD_FILTER_DEFAULT) == 0) { +- fIsLCDSupported = true; +- fLCDExtra = 2; //Using a filter adds one full pixel to each side. +- } ++ FT_Library_SetLcdFilter(fLibrary, FT_LCD_FILTER_DEFAULT); + } + ~FreeTypeLibrary() { + if (fLibrary) { +@@ -161,8 +154,6 @@ + } + + FT_Library library() { return fLibrary; } +- bool isLCDSupported() { return fIsLCDSupported; } +- int lcdExtra() { return fLCDExtra; } + + // FT_Get_{MM,Var}_{Blend,Design}_Coordinates were added in FreeType 2.7.1. + // Prior to this there was no way to get the coordinates out of the FT_Face. +@@ -173,8 +164,6 @@ + + private: + FT_Library fLibrary; +- bool fIsLCDSupported; +- int fLCDExtra; + + // FT_Library_SetLcdFilterWeights was introduced in FreeType 2.4.0. + // The following platforms provide FreeType of at least 2.4.0. +@@ -660,17 +649,6 @@ + rec->fTextSize = SkIntToScalar(1 << 14); + } + +- if (isLCD(*rec)) { +- // TODO: re-work so that FreeType is set-up and selected by the SkFontMgr. +- SkAutoMutexAcquire ama(gFTMutex); +- ref_ft_library(); +- if (!gFTLibrary->isLCDSupported()) { +- // If the runtime Freetype library doesn't support LCD, disable it here. +- rec->fMaskFormat = SkMask::kA8_Format; +- } +- unref_ft_library(); +- } +- + SkPaint::Hinting h = rec->getHinting(); + if (SkPaint::kFull_Hinting == h && !isLCD(*rec)) { + // collapse full->normal hinting if we're not doing LCD +@@ -1063,11 +1041,11 @@ + void SkScalerContext_FreeType::updateGlyphIfLCD(SkGlyph* glyph) { + if (isLCD(fRec)) { + if (fLCDIsVert) { +- glyph->fHeight += gFTLibrary->lcdExtra(); +- glyph->fTop -= gFTLibrary->lcdExtra() >> 1; ++ glyph->fHeight += 2; ++ glyph->fTop -= 1; + } else { +- glyph->fWidth += gFTLibrary->lcdExtra(); +- glyph->fLeft -= gFTLibrary->lcdExtra() >> 1; ++ glyph->fWidth += 2; ++ glyph->fLeft -= 1; + } + } + } diff --git a/www/chromium/files/patch-third__party_sqlite_BUILD.gn b/www/chromium/files/patch-third__party_sqlite_BUILD.gn index 08045ec61410..5890a421beda 100644 --- a/www/chromium/files/patch-third__party_sqlite_BUILD.gn +++ b/www/chromium/files/patch-third__party_sqlite_BUILD.gn @@ -1,29 +1,29 @@ ---- third_party/sqlite/BUILD.gn.orig 2018-01-04 21:06:22.000000000 +0100 -+++ third_party/sqlite/BUILD.gn 2018-02-03 11:16:06.346330000 +0100 -@@ -118,7 +118,7 @@ - "USE_PREAD=1", - ] +--- third_party/sqlite/BUILD.gn.orig 2018-06-13 00:11:05.000000000 +0200 ++++ third_party/sqlite/BUILD.gn 2018-07-19 20:59:10.723249000 +0200 +@@ -155,7 +155,7 @@ + # sqlite3Fts3InitTok). + cflags += [ "-Wno-unused-function" ] + } +- if (is_linux) { ++ if (is_linux && !is_bsd) { + cflags += [ + # SQLite doesn"t believe in compiler warnings, + # preferring testing. +@@ -208,7 +208,7 @@ } -- if (is_linux || is_android) { -+ if ((is_linux && !is_bsd) || is_android) { - defines += [ - # Linux provides fdatasync(), a faster equivalent of fsync(). - "fdatasync=fdatasync", -@@ -127,7 +127,7 @@ + } - # Pull in config.h on Linux. This allows use of preprocessor macros which - # are not available to the build config. -- if (is_linux) { -+ if (is_linux && !is_bsd) { - defines += [ "_HAVE_SQLITE_CONFIG_H" ] - } - -@@ -161,7 +161,7 @@ - ":sqlite_warnings", - ] +- if (is_linux || is_android) { ++ if ((is_linux && !is_bsd) || is_android) { + defines += [ + # Linux provides fdatasync(), a faster equivalent of fsync(). + "fdatasync=fdatasync", +@@ -243,7 +243,7 @@ + ":sqlite_warnings", + ] -- if (is_linux) { -+ if (is_linux && !is_bsd) { - libs = [ "dl" ] - } else if (is_mac || is_ios) { - libs = [ +- if (is_linux) { ++ if (is_linux && !is_bsd) { + libs = [ "dl" ] + } else if (is_mac || is_ios) { + libs = [ "CoreFoundation.framework" ] diff --git a/www/chromium/files/patch-third__party_swiftshader_src_Common_Configurator.cpp b/www/chromium/files/patch-third__party_swiftshader_src_Common_Configurator.cpp new file mode 100644 index 000000000000..7f3cdbba69c8 --- /dev/null +++ b/www/chromium/files/patch-third__party_swiftshader_src_Common_Configurator.cpp @@ -0,0 +1,12 @@ +--- third_party/swiftshader/src/Common/Configurator.cpp.orig 2018-07-19 21:20:56.462917000 +0200 ++++ third_party/swiftshader/src/Common/Configurator.cpp 2018-07-19 21:23:09.940292000 +0200 +@@ -42,6 +42,9 @@ + + bool Configurator::readFile() + { ++#if defined(__FreeBSD__) ++ return false; ++#endif + #if defined(__unix__) + if(access(path.c_str(), R_OK) != 0) + { diff --git a/www/chromium/files/patch-third__party_swiftshader_src_Common_Socket.cpp b/www/chromium/files/patch-third__party_swiftshader_src_Common_Socket.cpp deleted file mode 100644 index ab9908ed5af0..000000000000 --- a/www/chromium/files/patch-third__party_swiftshader_src_Common_Socket.cpp +++ /dev/null @@ -1,10 +0,0 @@ ---- third_party/swiftshader/src/Common/Socket.cpp.orig 2017-06-26 22:11:33.917807000 +0200 -+++ third_party/swiftshader/src/Common/Socket.cpp 2017-06-26 22:11:54.516354000 +0200 -@@ -20,6 +20,7 @@ - #include <unistd.h> - #include <netdb.h> - #include <netinet/in.h> -+ #include <sys/select.h> - #endif - - namespace sw diff --git a/www/chromium/files/patch-third__party_swiftshader_src_Main_SwiftConfig.cpp b/www/chromium/files/patch-third__party_swiftshader_src_Main_SwiftConfig.cpp new file mode 100644 index 000000000000..efddc0e2168c --- /dev/null +++ b/www/chromium/files/patch-third__party_swiftshader_src_Main_SwiftConfig.cpp @@ -0,0 +1,14 @@ +--- third_party/swiftshader/src/Main/SwiftConfig.cpp.orig 2018-07-19 21:23:23.845651000 +0200 ++++ third_party/swiftshader/src/Main/SwiftConfig.cpp 2018-07-19 21:24:08.531304000 +0200 +@@ -762,7 +762,11 @@ + struct stat status; + int lastModified = ini.getInteger("LastModified", "Time", 0); + ++#if !defined(__FreeBSD__) + bool noConfig = stat("SwiftShader.ini", &status) != 0; ++#else ++ bool noConfig = false; ++#endif + newConfig = !noConfig && abs((int)status.st_mtime - lastModified) > 1; + + if(disableServerOverride) diff --git a/www/chromium/files/patch-third__party_vulkan-validation-layers_src_loader_vk_loader_platform.h b/www/chromium/files/patch-third__party_vulkan-validation-layers_src_loader_vk_loader_platform.h deleted file mode 100644 index d0e57f6ce816..000000000000 --- a/www/chromium/files/patch-third__party_vulkan-validation-layers_src_loader_vk_loader_platform.h +++ /dev/null @@ -1,11 +0,0 @@ ---- third_party/vulkan-validation-layers/src/loader/vk_loader_platform.h.orig 2017-08-02 15:08:43.821225000 +0200 -+++ third_party/vulkan-validation-layers/src/loader/vk_loader_platform.h 2017-08-02 15:09:07.938907000 +0200 -@@ -30,7 +30,7 @@ - #include "vulkan/vk_platform.h" - #include "vulkan/vk_sdk_platform.h" - --#if defined(__linux__) -+#if defined(__linux__) || defined(__FreeBSD__) - /* Linux-specific common code: */ - - // Headers: diff --git a/www/chromium/files/patch-third__party_webrtc_rtc_base_platform_thread.cc b/www/chromium/files/patch-third__party_webrtc_rtc_base_platform_thread.cc index e7a047315c2e..a355353f01bb 100644 --- a/www/chromium/files/patch-third__party_webrtc_rtc_base_platform_thread.cc +++ b/www/chromium/files/patch-third__party_webrtc_rtc_base_platform_thread.cc @@ -1,7 +1,7 @@ ---- third_party/webrtc/rtc_base/platform_thread.cc.orig 2018-03-20 23:06:54.000000000 +0100 -+++ third_party/webrtc/rtc_base/platform_thread.cc 2018-03-24 18:50:14.671302000 +0100 -@@ -16,7 +16,9 @@ - #include "rtc_base/trace_event.h" +--- third_party/webrtc/rtc_base/platform_thread.cc.orig 2018-06-13 00:12:10.000000000 +0200 ++++ third_party/webrtc/rtc_base/platform_thread.cc 2018-07-19 21:16:37.263549000 +0200 +@@ -15,7 +15,9 @@ + #include "rtc_base/timeutils.h" #if defined(WEBRTC_LINUX) +#if !defined(__FreeBSD__) @@ -10,31 +10,3 @@ #include <sys/syscall.h> #endif -@@ -37,8 +39,10 @@ - ret = gettid(); - #elif defined(WEBRTC_FUCHSIA) - ret = zx_thread_self(); --#elif defined(WEBRTC_LINUX) -+#elif defined(WEBRTC_LINUX) && !defined(__FreeBSD__) - ret = syscall(__NR_gettid); -+#elif defined(__FreeBSD__) -+ ret = reinterpret_cast<uint64_t>(pthread_self()); - #else - // Default implementation for nacl and solaris. - ret = reinterpret_cast<pid_t>(pthread_self()); -@@ -65,6 +69,7 @@ - } - - void SetCurrentThreadName(const char* name) { -+#if !defined(__FreeBSD__) - #if defined(WEBRTC_WIN) - struct { - DWORD dwType; -@@ -82,6 +87,7 @@ - prctl(PR_SET_NAME, reinterpret_cast<unsigned long>(name)); - #elif defined(WEBRTC_MAC) || defined(WEBRTC_IOS) - pthread_setname_np(name); -+#endif - #endif - } - diff --git a/www/chromium/files/patch-third__party_webrtc_rtc_base_platform_thread_types.cc b/www/chromium/files/patch-third__party_webrtc_rtc_base_platform_thread_types.cc new file mode 100644 index 000000000000..8ec4c7636343 --- /dev/null +++ b/www/chromium/files/patch-third__party_webrtc_rtc_base_platform_thread_types.cc @@ -0,0 +1,40 @@ +--- third_party/webrtc/rtc_base/platform_thread_types.cc.orig 2018-07-19 22:28:12.880328000 +0200 ++++ third_party/webrtc/rtc_base/platform_thread_types.cc 2018-07-19 22:30:17.907866000 +0200 +@@ -11,7 +11,9 @@ + #include "rtc_base/platform_thread_types.h" + + #if defined(WEBRTC_LINUX) ++#if !defined(__FreeBSD__) + #include <sys/prctl.h> ++#endif + #include <sys/syscall.h> + #endif + +@@ -27,8 +29,10 @@ + return gettid(); + #elif defined(WEBRTC_FUCHSIA) + return zx_thread_self(); +-#elif defined(WEBRTC_LINUX) ++#elif defined(WEBRTC_LINUX) && !defined(__FreeBSD__) + return syscall(__NR_gettid); ++#elif defined(__FreeBSD__) ++ return reinterpret_cast<uint64_t>(pthread_self()); + #else + // Default implementation for nacl and solaris. + return reinterpret_cast<pid_t>(pthread_self()); +@@ -55,6 +59,7 @@ + } + + void SetCurrentThreadName(const char* name) { ++#if !defined(__FreeBSD__) + #if defined(WEBRTC_WIN) + struct { + DWORD dwType; +@@ -72,6 +77,7 @@ + prctl(PR_SET_NAME, reinterpret_cast<unsigned long>(name)); // NOLINT + #elif defined(WEBRTC_MAC) || defined(WEBRTC_IOS) + pthread_setname_np(name); ++#endif + #endif + } + diff --git a/www/chromium/files/patch-third__party_webrtc_system__wrappers_source_timestamp_extrapolator.cc b/www/chromium/files/patch-third__party_webrtc_system__wrappers_source_timestamp_extrapolator.cc deleted file mode 100644 index 22a69d0271a3..000000000000 --- a/www/chromium/files/patch-third__party_webrtc_system__wrappers_source_timestamp_extrapolator.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- third_party/webrtc/system_wrappers/source/timestamp_extrapolator.cc.orig 2017-12-24 19:40:16.381935000 +0100 -+++ third_party/webrtc/system_wrappers/source/timestamp_extrapolator.cc 2017-12-24 19:40:27.636036000 +0100 -@@ -12,6 +12,8 @@ - - #include <algorithm> - -+#undef _P -+ - namespace webrtc { - - TimestampExtrapolator::TimestampExtrapolator(int64_t start_ms) diff --git a/www/chromium/files/patch-third__party_zlib_BUILD.gn b/www/chromium/files/patch-third__party_zlib_BUILD.gn index 7c9fefa24475..70ed07a6777c 100644 --- a/www/chromium/files/patch-third__party_zlib_BUILD.gn +++ b/www/chromium/files/patch-third__party_zlib_BUILD.gn @@ -1,9 +1,9 @@ ---- third_party/zlib/BUILD.gn.orig 2017-06-05 19:03:29 UTC -+++ third_party/zlib/BUILD.gn -@@ -117,7 +117,7 @@ static_library("minizip") { - "contrib/minizip/iowin32.h", +--- third_party/zlib/BUILD.gn.orig 2018-06-13 00:11:08.000000000 +0200 ++++ third_party/zlib/BUILD.gn 2018-07-19 21:36:13.071700000 +0200 +@@ -327,7 +327,7 @@ ] } + - if (is_mac || is_ios || is_android || is_nacl) { + if (is_mac || is_ios || is_android || is_nacl || is_bsd) { # Mac, Android and the BSDs don't have fopen64, ftello64, or fseeko64. We diff --git a/www/chromium/files/patch-third_party_blink_renderer_bindings_core_v8_v8_script_runner.cc b/www/chromium/files/patch-third_party_blink_renderer_bindings_core_v8_v8_script_runner.cc new file mode 100644 index 000000000000..bc3b25820fed --- /dev/null +++ b/www/chromium/files/patch-third_party_blink_renderer_bindings_core_v8_v8_script_runner.cc @@ -0,0 +1,11 @@ +--- third_party/blink/renderer/bindings/core/v8/v8_script_runner.cc.orig 2018-07-19 16:25:31.421721000 +0200 ++++ third_party/blink/renderer/bindings/core/v8/v8_script_runner.cc 2018-07-19 16:26:01.053291000 +0200 +@@ -54,7 +54,7 @@ + + #if defined(OS_WIN) + #include <malloc.h> +-#else ++#elif !defined(OS_FREEBSD) + #include <alloca.h> + #endif + diff --git a/www/chromium/files/patch-third__party_WebKit_Source_core_editing_EditingBehavior.cpp b/www/chromium/files/patch-third_party_blink_renderer_core_editing_editing_behavior.cc index f83d7573e71c..19559ac67014 100644 --- a/www/chromium/files/patch-third__party_WebKit_Source_core_editing_EditingBehavior.cpp +++ b/www/chromium/files/patch-third_party_blink_renderer_core_editing_editing_behavior.cc @@ -1,6 +1,6 @@ ---- third_party/WebKit/Source/core/editing/EditingBehavior.cpp.orig 2017-09-10 01:26:55.763466000 +0200 -+++ third_party/WebKit/Source/core/editing/EditingBehavior.cpp 2017-09-10 01:27:25.592044000 +0200 -@@ -268,7 +268,7 @@ +--- third_party/blink/renderer/core/editing/editing_behavior.cc.orig 2018-07-19 16:36:31.131399000 +0200 ++++ third_party/blink/renderer/core/editing/editing_behavior.cc 2018-07-19 16:36:56.793922000 +0200 +@@ -270,7 +270,7 @@ // unexpected behaviour if (ch < ' ') return false; diff --git a/www/chromium/files/patch-third__party_WebKit_Source_core_html_canvas_CanvasAsyncBlobCreator.cpp b/www/chromium/files/patch-third_party_blink_renderer_core_html_canvas_canvas_async_blob_creator.cc index 8e9be63fa67e..5276fe30fd9a 100644 --- a/www/chromium/files/patch-third__party_WebKit_Source_core_html_canvas_CanvasAsyncBlobCreator.cpp +++ b/www/chromium/files/patch-third_party_blink_renderer_core_html_canvas_canvas_async_blob_creator.cc @@ -1,11 +1,11 @@ ---- third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp.orig 2018-03-03 21:15:48.546036000 +0100 -+++ third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp 2018-03-03 21:16:22.040188000 +0100 +--- third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc.orig 2018-07-19 19:17:49.426163000 +0200 ++++ third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc 2018-07-19 19:19:17.512247000 +0200 @@ -31,7 +31,7 @@ 0.001; // a small slack period between deadline and current time for safety /* The value is based on user statistics on Nov 2017. */ -#if (defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)) -+#if (defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD)) ++#if (defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)) || defined(OS_BSD) const double kIdleTaskStartTimeoutDelayMs = 1000.0; #else const double kIdleTaskStartTimeoutDelayMs = 4000.0; // For ChromeOS, Mobile diff --git a/www/chromium/files/patch-third__party_WebKit_Source_core_html_forms_InternalPopupMenu.cpp b/www/chromium/files/patch-third_party_blink_renderer_core_html_forms_internal_popup_menu.cc index c706b3593d26..00353a1198d5 100644 --- a/www/chromium/files/patch-third__party_WebKit_Source_core_html_forms_InternalPopupMenu.cpp +++ b/www/chromium/files/patch-third_party_blink_renderer_core_html_forms_internal_popup_menu.cc @@ -1,6 +1,6 @@ ---- third_party/WebKit/Source/core/html/forms/InternalPopupMenu.cpp.orig 2017-09-10 01:24:52.757075000 +0200 -+++ third_party/WebKit/Source/core/html/forms/InternalPopupMenu.cpp 2017-09-10 01:25:11.778614000 +0200 -@@ -157,7 +157,7 @@ +--- third_party/blink/renderer/core/html/forms/internal_popup_menu.cc.orig 2018-07-19 19:21:46.343805000 +0200 ++++ third_party/blink/renderer/core/html/forms/internal_popup_menu.cc 2018-07-19 19:22:00.957461000 +0200 +@@ -126,7 +126,7 @@ is_in_group_(false), buffer_(buffer) { DCHECK(buffer_); diff --git a/www/chromium/files/patch-third_party_blink_renderer_core_xml_parser_xml_document_parser.cc b/www/chromium/files/patch-third_party_blink_renderer_core_xml_parser_xml_document_parser.cc new file mode 100644 index 000000000000..980fd2fd3811 --- /dev/null +++ b/www/chromium/files/patch-third_party_blink_renderer_core_xml_parser_xml_document_parser.cc @@ -0,0 +1,23 @@ +--- third_party/blink/renderer/core/xml/parser/xml_document_parser.cc.orig 2018-07-20 01:07:52.189302000 +0200 ++++ third_party/blink/renderer/core/xml/parser/xml_document_parser.cc 2018-07-20 01:10:37.425716000 +0200 +@@ -28,6 +28,10 @@ + + #include <libxml/parser.h> + #include <libxml/parserInternals.h> ++#include <libxml/xmlversion.h> ++#if defined(LIBXML_CATALOG_ENABLED) ++#include <libxml/catalog.h> ++#endif + #include <libxslt/xslt.h> + + #include <memory> +@@ -646,6 +650,9 @@ + if (did_init) + return; + ++#if defined(LIBXML_CATALOG_ENABLED) ++ xmlCatalogSetDefaults(XML_CATA_ALLOW_NONE); ++#endif + xmlInitParser(); + xmlRegisterInputCallbacks(MatchFunc, OpenFunc, ReadFunc, CloseFunc); + xmlRegisterOutputCallbacks(MatchFunc, OpenFunc, WriteFunc, CloseFunc); diff --git a/www/chromium/files/patch-third_party_blink_renderer_platform_BUILD.gn b/www/chromium/files/patch-third_party_blink_renderer_platform_BUILD.gn new file mode 100644 index 000000000000..2fd7fc605603 --- /dev/null +++ b/www/chromium/files/patch-third_party_blink_renderer_platform_BUILD.gn @@ -0,0 +1,10 @@ +--- third_party/blink/renderer/platform/BUILD.gn.orig 2018-07-19 20:33:30.438352000 +0200 ++++ third_party/blink/renderer/platform/BUILD.gn 2018-07-19 20:34:04.587283000 +0200 +@@ -146,6 +146,7 @@ + "//build/win:default_exe_manifest", + "//third_party/icu", + ] ++ libs = [ "cxxrt" ] + } + + # This isn't strictly necessary since we can just add the deps to "platform", diff --git a/www/chromium/files/patch-third_party_blink_renderer_platform_fonts_font_cache.cc b/www/chromium/files/patch-third_party_blink_renderer_platform_fonts_font_cache.cc new file mode 100644 index 000000000000..ff14e816dae2 --- /dev/null +++ b/www/chromium/files/patch-third_party_blink_renderer_platform_fonts_font_cache.cc @@ -0,0 +1,11 @@ +--- third_party/blink/renderer/platform/fonts/font_cache.cc.orig 2018-07-19 19:24:25.598357000 +0200 ++++ third_party/blink/renderer/platform/fonts/font_cache.cc 2018-07-19 19:24:38.659689000 +0200 +@@ -85,7 +85,7 @@ + FontPlatformData* FontCache::SystemFontPlatformData( + const FontDescription& font_description) { + const AtomicString& family = FontCache::SystemFontFamily(); +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + if (family.IsEmpty() || family == FontFamilyNames::system_ui) + return nullptr; + #else diff --git a/www/chromium/files/patch-third_party_blink_renderer_platform_fonts_font_cache.h b/www/chromium/files/patch-third_party_blink_renderer_platform_fonts_font_cache.h new file mode 100644 index 000000000000..af11edbae85e --- /dev/null +++ b/www/chromium/files/patch-third_party_blink_renderer_platform_fonts_font_cache.h @@ -0,0 +1,20 @@ +--- third_party/blink/renderer/platform/fonts/font_cache.h.orig 2018-07-19 19:26:12.883838000 +0200 ++++ third_party/blink/renderer/platform/fonts/font_cache.h 2018-07-19 19:26:49.537827000 +0200 +@@ -213,7 +213,7 @@ + const FontDescription&); + #endif // defined(OS_ANDROID) + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + struct PlatformFallbackFont { + String name; + CString filename; +@@ -287,7 +287,7 @@ + const FontFaceCreationParams&, + CString& name); + +-#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_FUCHSIA) ++#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_FUCHSIA) || defined(OS_BSD) + static AtomicString GetFamilyNameForCharacter(SkFontMgr*, + UChar32, + const FontDescription&, diff --git a/www/chromium/files/patch-third__party_WebKit_Source_platform_fonts_FontMetrics.cpp b/www/chromium/files/patch-third_party_blink_renderer_platform_fonts_font_metrics.cc index b77685800647..2d14db04f675 100644 --- a/www/chromium/files/patch-third__party_WebKit_Source_platform_fonts_FontMetrics.cpp +++ b/www/chromium/files/patch-third_party_blink_renderer_platform_fonts_font_metrics.cc @@ -1,11 +1,11 @@ ---- third_party/WebKit/Source/platform/fonts/FontMetrics.cpp.orig 2018-03-03 21:17:57.383299000 +0100 -+++ third_party/WebKit/Source/platform/fonts/FontMetrics.cpp 2018-03-03 21:18:37.525253000 +0100 +--- third_party/blink/renderer/platform/fonts/font_metrics.cc.orig 2018-07-19 19:27:56.537970000 +0200 ++++ third_party/blink/renderer/platform/fonts/font_metrics.cc 2018-07-19 19:28:32.800265000 +0200 @@ -38,7 +38,7 @@ namespace blink { --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) ++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || defined(OS_BSD) // This is the largest VDMX table which we'll try to load and parse. static const size_t kMaxVDMXTableSize = 1024 * 1024; // 1 MB #endif @@ -13,8 +13,8 @@ int vdmx_ascent = 0, vdmx_descent = 0; bool is_vdmx_valid = false; --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) ++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || defined(OS_BSD) // Manually digging up VDMX metrics is only applicable when bytecode hinting // using FreeType. With DirectWrite or CoreText, no bytecode hinting is ever // done. This code should be pushed into FreeType (hinted font metrics). @@ -22,8 +22,8 @@ visual_overflow_inflation_for_ascent = 1; if (descent < metrics.fDescent) { visual_overflow_inflation_for_descent = 1; --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) ++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || defined(OS_BSD) // When subpixel positioning is enabled, if the descent is rounded down, // the descent part of the glyph may be truncated when displayed in a // 'overflow: hidden' container. To avoid that, borrow 1 unit from the diff --git a/www/chromium/files/patch-third__party_WebKit_Source_platform_fonts_skia_FontCacheSkia.cpp b/www/chromium/files/patch-third_party_blink_renderer_platform_fonts_skia_font_cache_skia.cc index 35bb6c4bf694..331eb842671b 100644 --- a/www/chromium/files/patch-third__party_WebKit_Source_platform_fonts_skia_FontCacheSkia.cpp +++ b/www/chromium/files/patch-third_party_blink_renderer_platform_fonts_skia_font_cache_skia.cc @@ -1,15 +1,15 @@ ---- third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp.orig 2017-09-05 21:05:41.000000000 +0200 -+++ third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp 2017-09-06 21:56:16.263371000 +0200 -@@ -73,7 +73,7 @@ +--- third_party/blink/renderer/platform/fonts/skia/font_cache_skia.cc.orig 2018-07-19 19:29:54.256436000 +0200 ++++ third_party/blink/renderer/platform/fonts/skia/font_cache_skia.cc 2018-07-19 19:30:19.879244000 +0200 +@@ -60,7 +60,7 @@ return AtomicString::FromUTF8(str.c_str(), str.size()); } --#if defined(OS_ANDROID) || defined(OS_LINUX) -+#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_FUCHSIA) ++#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_FUCHSIA) || defined(OS_BSD) // Android special locale for retrieving the color emoji font // based on the proposed changes in UTR #51 for introducing // an Emoji script code: -@@ -258,7 +258,7 @@ +@@ -249,7 +249,7 @@ } #endif diff --git a/www/chromium/files/patch-third_party_blink_renderer_platform_heap_stack_frame_depth.cc b/www/chromium/files/patch-third_party_blink_renderer_platform_heap_stack_frame_depth.cc new file mode 100644 index 000000000000..9bb60095006b --- /dev/null +++ b/www/chromium/files/patch-third_party_blink_renderer_platform_heap_stack_frame_depth.cc @@ -0,0 +1,14 @@ +--- third_party/blink/renderer/platform/heap/stack_frame_depth.cc.orig 2018-07-19 19:31:59.775056000 +0200 ++++ third_party/blink/renderer/platform/heap/stack_frame_depth.cc 2018-07-19 19:32:43.812459000 +0200 +@@ -15,6 +15,11 @@ + extern "C" void* __libc_stack_end; // NOLINT + #endif + ++#if defined(OS_FREEBSD) ++#include <sys/signal.h> ++#include <pthread_np.h> ++#endif ++ + namespace blink { + + static const char* g_avoid_optimization = nullptr; diff --git a/www/chromium/files/patch-third_party_blink_renderer_platform_wtf_BUILD.gn b/www/chromium/files/patch-third_party_blink_renderer_platform_wtf_BUILD.gn new file mode 100644 index 000000000000..2f0425f105fc --- /dev/null +++ b/www/chromium/files/patch-third_party_blink_renderer_platform_wtf_BUILD.gn @@ -0,0 +1,16 @@ +--- third_party/blink/renderer/platform/wtf/BUILD.gn.orig 2018-07-19 20:14:10.239594000 +0200 ++++ third_party/blink/renderer/platform/wtf/BUILD.gn 2018-07-19 20:15:01.317226000 +0200 +@@ -279,8 +279,12 @@ + if (is_android) { + libs = [ "log" ] + } +- if (is_linux) { ++ if (is_linux && !is_bsd) { + libs = [ "dl" ] ++ } ++ ++ if (is_bsd) { ++ libs = [ "execinfo" ] + } + + if (is_mac) { diff --git a/www/chromium/files/patch-third__party_WebKit_Source_platform_wtf_Assertions.cpp b/www/chromium/files/patch-third_party_blink_renderer_platform_wtf_assertions.cc index 037c2120c530..9cbb81b475c2 100644 --- a/www/chromium/files/patch-third__party_WebKit_Source_platform_wtf_Assertions.cpp +++ b/www/chromium/files/patch-third_party_blink_renderer_platform_wtf_assertions.cc @@ -1,6 +1,6 @@ ---- third_party/WebKit/Source/platform/wtf/Assertions.cpp.orig 2017-09-05 21:05:41.000000000 +0200 -+++ third_party/WebKit/Source/platform/wtf/Assertions.cpp 2017-09-06 22:08:33.610705000 +0200 -@@ -56,7 +56,7 @@ +--- third_party/blink/renderer/platform/wtf/assertions.cc.orig 2018-07-19 20:11:56.254657000 +0200 ++++ third_party/blink/renderer/platform/wtf/assertions.cc 2018-07-19 20:13:24.142405000 +0200 +@@ -48,7 +48,7 @@ #include <windows.h> #endif diff --git a/www/chromium/files/patch-third__party_WebKit_Source_platform_wtf_Atomics.h b/www/chromium/files/patch-third_party_blink_renderer_platform_wtf_atomics.h index ecb7c8d89a9d..f52678e85c7f 100644 --- a/www/chromium/files/patch-third__party_WebKit_Source_platform_wtf_Atomics.h +++ b/www/chromium/files/patch-third_party_blink_renderer_platform_wtf_atomics.h @@ -1,11 +1,11 @@ ---- third_party/WebKit/Source/platform/wtf/Atomics.h.orig 2017-09-05 21:05:41.000000000 +0200 -+++ third_party/WebKit/Source/platform/wtf/Atomics.h 2017-09-06 22:14:43.075913000 +0200 +--- third_party/blink/renderer/platform/wtf/atomics.h.orig 2018-07-19 20:13:40.615473000 +0200 ++++ third_party/blink/renderer/platform/wtf/atomics.h 2018-07-19 20:13:55.934336000 +0200 @@ -176,7 +176,7 @@ #if defined(THREAD_SANITIZER) // The definitions below assume an LP64 data model. This is fine because // TSan is only supported on x86_64 Linux. -#if defined(ARCH_CPU_64_BITS) && defined(OS_LINUX) -+#if defined(ARCH_CPU_64_BITS) && (defined(OS_LINUX) || defined(OS_BSD)) ++#if defined(ARCH_CPU_64_BITS) && defined(OS_LINUX) || defined(OS_BSD) ALWAYS_INLINE void ReleaseStore(volatile int* ptr, int value) { __tsan_atomic32_store(ptr, value, __tsan_memory_order_release); } diff --git a/www/chromium/files/patch-third__party_WebKit_Source_platform_wtf_ByteSwap.h b/www/chromium/files/patch-third_party_blink_renderer_platform_wtf_byte_swap.h index 857d27b93ac7..d4825f902123 100644 --- a/www/chromium/files/patch-third__party_WebKit_Source_platform_wtf_ByteSwap.h +++ b/www/chromium/files/patch-third_party_blink_renderer_platform_wtf_byte_swap.h @@ -1,6 +1,6 @@ ---- third_party/WebKit/Source/platform/wtf/ByteSwap.h.orig 2017-06-05 19:03:26 UTC -+++ third_party/WebKit/Source/platform/wtf/ByteSwap.h -@@ -60,15 +60,21 @@ ALWAYS_INLINE uint16_t Bswap16(uint16_t x) { +--- third_party/blink/renderer/platform/wtf/byte_swap.h.orig 2018-07-19 20:15:20.782500000 +0200 ++++ third_party/blink/renderer/platform/wtf/byte_swap.h 2018-07-19 20:16:32.779700000 +0200 +@@ -60,15 +60,21 @@ #else diff --git a/www/chromium/files/patch-third__party_WebKit_Source_platform_wtf_ContainerAnnotations.h b/www/chromium/files/patch-third_party_blink_renderer_platform_wtf_container_annotations.h index 07645419751f..ed293c65d607 100644 --- a/www/chromium/files/patch-third__party_WebKit_Source_platform_wtf_ContainerAnnotations.h +++ b/www/chromium/files/patch-third_party_blink_renderer_platform_wtf_container_annotations.h @@ -1,5 +1,5 @@ ---- third_party/WebKit/Source/platform/wtf/ContainerAnnotations.h.orig 2017-09-05 21:05:41.000000000 +0200 -+++ third_party/WebKit/Source/platform/wtf/ContainerAnnotations.h 2017-09-06 22:18:52.135596000 +0200 +--- third_party/blink/renderer/platform/wtf/container_annotations.h.orig 2018-07-19 20:16:53.004477000 +0200 ++++ third_party/blink/renderer/platform/wtf/container_annotations.h 2018-07-19 20:17:16.730907000 +0200 @@ -10,7 +10,7 @@ // TODO(ochang): Remove the ARCH_CPU_X86_64 condition to enable this for X86 diff --git a/www/chromium/files/patch-third__party_WebKit_Source_platform_wtf_StackUtil.cpp b/www/chromium/files/patch-third_party_blink_renderer_platform_wtf_stack_util.cc index ccac1d4a3f36..fa38bae27a8e 100644 --- a/www/chromium/files/patch-third__party_WebKit_Source_platform_wtf_StackUtil.cpp +++ b/www/chromium/files/patch-third_party_blink_renderer_platform_wtf_stack_util.cc @@ -1,5 +1,5 @@ ---- third_party/WebKit/Source/platform/wtf/StackUtil.cpp.orig 2017-09-05 21:05:41.000000000 +0200 -+++ third_party/WebKit/Source/platform/wtf/StackUtil.cpp 2017-09-06 22:25:12.873520000 +0200 +--- third_party/blink/renderer/platform/wtf/stack_util.cc.orig 2018-07-19 20:18:16.483555000 +0200 ++++ third_party/blink/renderer/platform/wtf/stack_util.cc 2018-07-19 20:18:51.633152000 +0200 @@ -16,6 +16,11 @@ extern "C" void* __libc_stack_end; // NOLINT #endif diff --git a/www/chromium/files/patch-third__party_WebKit_Source_platform_wtf_ThreadingPthreads.cpp b/www/chromium/files/patch-third_party_blink_renderer_platform_wtf_threading_pthreads.cc index 1c039878539b..dd0c498f335b 100644 --- a/www/chromium/files/patch-third__party_WebKit_Source_platform_wtf_ThreadingPthreads.cpp +++ b/www/chromium/files/patch-third_party_blink_renderer_platform_wtf_threading_pthreads.cc @@ -1,5 +1,5 @@ ---- third_party/WebKit/Source/platform/wtf/ThreadingPthreads.cpp.orig 2017-09-05 21:05:41.000000000 +0200 -+++ third_party/WebKit/Source/platform/wtf/ThreadingPthreads.cpp 2017-09-06 22:33:24.096670000 +0200 +--- third_party/blink/renderer/platform/wtf/threading_pthreads.cc.orig 2018-07-19 20:19:23.794139000 +0200 ++++ third_party/blink/renderer/platform/wtf/threading_pthreads.cc 2018-07-19 20:21:15.447060000 +0200 @@ -51,14 +51,19 @@ #include <objc/objc-auto.h> #endif diff --git a/www/chromium/files/patch-third_party_crashpad_crashpad_build_crashpad_buildconfig.gni b/www/chromium/files/patch-third_party_crashpad_crashpad_build_crashpad_buildconfig.gni new file mode 100644 index 000000000000..2323e0051abc --- /dev/null +++ b/www/chromium/files/patch-third_party_crashpad_crashpad_build_crashpad_buildconfig.gni @@ -0,0 +1,11 @@ +--- third_party/crashpad/crashpad/build/crashpad_buildconfig.gni.orig 2018-07-19 19:41:47.198522000 +0200 ++++ third_party/crashpad/crashpad/build/crashpad_buildconfig.gni 2018-07-19 19:41:59.956618000 +0200 +@@ -38,7 +38,7 @@ + if (crashpad_is_in_chromium) { + crashpad_is_mac = is_mac + crashpad_is_win = is_win +- crashpad_is_linux = is_linux ++ crashpad_is_linux = is_linux && !is_bsd + crashpad_is_android = is_android + crashpad_is_fuchsia = is_fuchsia + diff --git a/www/chromium/files/patch-third_party_crashpad_crashpad_util_misc_capture_context.h b/www/chromium/files/patch-third_party_crashpad_crashpad_util_misc_capture_context.h new file mode 100644 index 000000000000..1e16764fda0c --- /dev/null +++ b/www/chromium/files/patch-third_party_crashpad_crashpad_util_misc_capture_context.h @@ -0,0 +1,20 @@ +--- third_party/crashpad/crashpad/util/misc/capture_context.h.orig 2018-06-13 00:11:02.000000000 +0200 ++++ third_party/crashpad/crashpad/util/misc/capture_context.h 2018-07-20 01:55:34.949535000 +0200 +@@ -21,7 +21,7 @@ + #include <mach/mach.h> + #elif defined(OS_WIN) + #include <windows.h> +-#elif defined(OS_LINUX) || defined(OS_ANDROID) ++#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + #include <ucontext.h> + #endif // OS_MACOSX + +@@ -33,7 +33,7 @@ + #endif + #elif defined(OS_WIN) + using NativeCPUContext = CONTEXT; +-#elif defined(OS_LINUX) || defined(OS_ANDROID) ++#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + using NativeCPUContext = ucontext_t; + #endif // OS_MACOSX + diff --git a/www/chromium/files/patch-third_party_crashpad_crashpad_util_misc_metrics.cc b/www/chromium/files/patch-third_party_crashpad_crashpad_util_misc_metrics.cc new file mode 100644 index 000000000000..6013f8f3de67 --- /dev/null +++ b/www/chromium/files/patch-third_party_crashpad_crashpad_util_misc_metrics.cc @@ -0,0 +1,11 @@ +--- third_party/crashpad/crashpad/util/misc/metrics.cc.orig 2018-07-19 19:45:25.874776000 +0200 ++++ third_party/crashpad/crashpad/util/misc/metrics.cc 2018-07-19 19:45:38.273062000 +0200 +@@ -24,7 +24,7 @@ + #define METRICS_OS_NAME "Win" + #elif defined(OS_ANDROID) + #define METRICS_OS_NAME "Android" +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + #define METRICS_OS_NAME "Linux" + #elif defined(OS_FUCHSIA) + #define METRICS_OS_NAME "Fuchsia" diff --git a/www/chromium/files/patch-third_party_crashpad_crashpad_util_misc_uuid.cc b/www/chromium/files/patch-third_party_crashpad_crashpad_util_misc_uuid.cc new file mode 100644 index 000000000000..64f4f20ebcd0 --- /dev/null +++ b/www/chromium/files/patch-third_party_crashpad_crashpad_util_misc_uuid.cc @@ -0,0 +1,11 @@ +--- third_party/crashpad/crashpad/util/misc/uuid.cc.orig 2018-07-19 19:46:52.081549000 +0200 ++++ third_party/crashpad/crashpad/util/misc/uuid.cc 2018-07-19 19:47:05.207892000 +0200 +@@ -95,7 +95,7 @@ + InitializeFromBytes(uuid); + return true; + #elif defined(OS_WIN) || defined(OS_LINUX) || defined(OS_ANDROID) || \ +- defined(OS_FUCHSIA) ++ defined(OS_FUCHSIA) || defined(OS_BSD) + // Linux, Android, and Fuchsia do not provide a UUID generator in a + // widely-available system library. On Linux and Android, uuid_generate() + // from libuuid is not available everywhere. diff --git a/www/chromium/files/patch-third_party_crashpad_crashpad_util_posix_close_multiple.cc b/www/chromium/files/patch-third_party_crashpad_crashpad_util_posix_close_multiple.cc new file mode 100644 index 000000000000..c2fa7f668425 --- /dev/null +++ b/www/chromium/files/patch-third_party_crashpad_crashpad_util_posix_close_multiple.cc @@ -0,0 +1,11 @@ +--- third_party/crashpad/crashpad/util/posix/close_multiple.cc.orig 2018-07-19 19:49:00.959630000 +0200 ++++ third_party/crashpad/crashpad/util/posix/close_multiple.cc 2018-07-19 19:49:23.277639000 +0200 +@@ -71,7 +71,7 @@ + // This is an advantage over looping over all possible file descriptors, because + // no attempt needs to be made to close file descriptors that are not open. + bool CloseMultipleNowOrOnExecUsingFDDir(int min_fd, int preserve_fd) { +-#if defined(OS_MACOSX) ++#if defined(OS_MACOSX) || defined(OS_BSD) + static constexpr char kFDDir[] = "/dev/fd"; + #elif defined(OS_LINUX) || defined(OS_ANDROID) + static constexpr char kFDDir[] = "/proc/self/fd"; diff --git a/www/chromium/files/patch-third_party_crashpad_crashpad_util_posix_drop_privileges.cc b/www/chromium/files/patch-third_party_crashpad_crashpad_util_posix_drop_privileges.cc new file mode 100644 index 000000000000..94eb906d3339 --- /dev/null +++ b/www/chromium/files/patch-third_party_crashpad_crashpad_util_posix_drop_privileges.cc @@ -0,0 +1,11 @@ +--- third_party/crashpad/crashpad/util/posix/drop_privileges.cc.orig 2018-07-19 19:50:51.829905000 +0200 ++++ third_party/crashpad/crashpad/util/posix/drop_privileges.cc 2018-07-19 19:51:04.660155000 +0200 +@@ -23,7 +23,7 @@ + gid_t gid = getgid(); + uid_t uid = getuid(); + +-#if defined(OS_MACOSX) ++#if defined(OS_MACOSX) || defined(OS_BSD) + // Based on the POSIX.1-2008 2013 edition documentation for setreuid() and + // setregid(), setreuid() and setregid() alone should be sufficient to drop + // privileges. The standard specifies that the saved ID should be set to the diff --git a/www/chromium/files/patch-third_party_crashpad_crashpad_util_posix_signals.cc b/www/chromium/files/patch-third_party_crashpad_crashpad_util_posix_signals.cc new file mode 100644 index 000000000000..9d0d6e4a1d2a --- /dev/null +++ b/www/chromium/files/patch-third_party_crashpad_crashpad_util_posix_signals.cc @@ -0,0 +1,33 @@ +--- third_party/crashpad/crashpad/util/posix/signals.cc.orig 2018-07-19 19:52:18.124704000 +0200 ++++ third_party/crashpad/crashpad/util/posix/signals.cc 2018-07-19 19:53:53.609005000 +0200 +@@ -44,7 +44,7 @@ + #if defined(SIGEMT) + SIGEMT, + #endif // defined(SIGEMT) +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + SIGXCPU, + SIGXFSZ, + #endif // defined(OS_LINUX) +@@ -84,7 +84,7 @@ + SIGXCPU, + SIGXFSZ, + #endif // defined(OS_MACOSX) +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + SIGIO, + #endif // defined(OS_LINUX) + }; +@@ -214,8 +214,12 @@ + // remains. See 10.12.3 xnu-3789.41.3/bsd/kern/kern_sig.c + // psignal_internal(). + (code > 0 && ++#if defined(SI_ASYNCIO) + code != SI_ASYNCIO && ++#endif ++#if defined(SI_MESGQ) + code != SI_MESGQ && ++#endif + code != SI_QUEUE && + code != SI_TIMER && + code != SI_USER && diff --git a/www/chromium/files/patch-third_party_crashpad_crashpad_util_posix_symbolic_constants_posix.cc b/www/chromium/files/patch-third_party_crashpad_crashpad_util_posix_symbolic_constants_posix.cc new file mode 100644 index 000000000000..67c495e0cfde --- /dev/null +++ b/www/chromium/files/patch-third_party_crashpad_crashpad_util_posix_symbolic_constants_posix.cc @@ -0,0 +1,20 @@ +--- third_party/crashpad/crashpad/util/posix/symbolic_constants_posix.cc.orig 2018-07-19 19:55:17.168592000 +0200 ++++ third_party/crashpad/crashpad/util/posix/symbolic_constants_posix.cc 2018-07-19 19:55:37.640206000 +0200 +@@ -64,7 +64,7 @@ + "INFO", + "USR1", + "USR2", +-#elif defined(OS_LINUX) || defined(OS_ANDROID) ++#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + // sed -Ene 's/^#define[[:space:]]SIG([[:alnum:]]+)[[:space:]]+[[:digit:]]{1,2}([[:space:]]|$).*/ "\1",/p' + // /usr/include/asm-generic/signal.h + // and fix up by removing SIGIOT, SIGLOST, SIGUNUSED, and SIGRTMIN. +@@ -101,7 +101,7 @@ + "SYS", + #endif + }; +-#if defined(OS_LINUX) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + // NSIG is 64 to account for real-time signals. + static_assert(arraysize(kSignalNames) == 32, "kSignalNames length"); + #else diff --git a/www/chromium/files/patch-tools_gn_bootstrap_bootstrap.py b/www/chromium/files/patch-tools_gn_bootstrap_bootstrap.py index 54588e886c3d..a6586afe6d3e 100644 --- a/www/chromium/files/patch-tools_gn_bootstrap_bootstrap.py +++ b/www/chromium/files/patch-tools_gn_bootstrap_bootstrap.py @@ -1,5 +1,5 @@ ---- tools/gn/bootstrap/bootstrap.py.orig 2017-12-23 20:11:27.769312000 +0100 -+++ tools/gn/bootstrap/bootstrap.py 2017-12-23 20:28:42.756301000 +0100 +--- tools/gn/bootstrap/bootstrap.py.orig 2018-06-13 00:11:08.000000000 +0200 ++++ tools/gn/bootstrap/bootstrap.py 2018-07-19 21:45:27.959100000 +0200 @@ -32,9 +32,10 @@ is_win = sys.platform.startswith('win') @@ -12,15 +12,7 @@ def check_call(cmd, **kwargs): logging.debug('Running: %s', ' '.join(cmd)) -@@ -576,7 +577,6 @@ - 'base/trace_event/trace_log_constants.cc', - 'base/trace_event/tracing_agent.cc', - 'base/unguessable_token.cc', -- 'base/value_iterators.cc', - 'base/values.cc', - 'base/vlog.cc', - ]) -@@ -633,6 +633,44 @@ +@@ -712,6 +713,43 @@ 'cflags': cflags + ['-DHAVE_CONFIG_H'], } @@ -50,7 +42,6 @@ + 'base/synchronization/waitable_event_posix.cc', + 'base/time/time_exploded_posix.cc', + 'base/time/time_now_posix.cc', -+ 'base/value_iterators.cc', + ]) + static_libraries['libevent']['include_dirs'].extend([ + os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', 'freebsd') @@ -63,14 +54,15 @@ + cflags.extend(['-Wno-deprecated-register', '-Wno-parentheses-equality']) + if is_linux or is_aix: - ldflags.extend(['-pthread']) - -@@ -671,17 +709,6 @@ + static_libraries['xdg_user_dirs'] = { + 'sources': [ +@@ -827,18 +865,6 @@ ]) static_libraries['libevent']['sources'].extend([ 'base/third_party/libevent/epoll.c', - ]) - else: +- ldflags.extend(['-pthread']) - libs.extend(['-lrt']) - static_libraries['base']['sources'].extend([ - 'base/process/internal_aix.cc' diff --git a/www/chromium/files/patch-ui_base_ime_input__method__initializer.cc b/www/chromium/files/patch-ui_base_ime_input__method__initializer.cc index d5a6d67f1227..2afd67b9bb21 100644 --- a/www/chromium/files/patch-ui_base_ime_input__method__initializer.cc +++ b/www/chromium/files/patch-ui_base_ime_input__method__initializer.cc @@ -1,6 +1,6 @@ ---- ui/base/ime/input_method_initializer.cc.orig 2018-03-20 23:05:56.000000000 +0100 -+++ ui/base/ime/input_method_initializer.cc 2018-03-24 19:03:36.686236000 +0100 -@@ -8,14 +8,14 @@ +--- ui/base/ime/input_method_initializer.cc.orig 2018-06-13 00:11:09.000000000 +0200 ++++ ui/base/ime/input_method_initializer.cc 2018-07-19 21:52:04.744818000 +0200 +@@ -8,7 +8,7 @@ #if defined(OS_CHROMEOS) #include "ui/base/ime/ime_bridge.h" @@ -8,7 +8,8 @@ +#elif defined(USE_AURA) && (defined(OS_LINUX) || defined(OS_BSD)) #include "base/logging.h" #include "ui/base/ime/linux/fake_input_method_context_factory.h" - #endif + #elif defined(OS_WIN) +@@ -18,7 +18,7 @@ namespace { @@ -17,7 +18,7 @@ const ui::LinuxInputMethodContextFactory* g_linux_input_method_context_factory_for_testing; #endif -@@ -39,7 +39,7 @@ +@@ -46,7 +46,7 @@ void InitializeInputMethodForTesting() { #if defined(OS_CHROMEOS) IMEBridge::Initialize(); @@ -26,7 +27,7 @@ if (!g_linux_input_method_context_factory_for_testing) g_linux_input_method_context_factory_for_testing = new FakeInputMethodContextFactory(); -@@ -56,7 +56,7 @@ +@@ -67,7 +67,7 @@ void ShutdownInputMethodForTesting() { #if defined(OS_CHROMEOS) IMEBridge::Shutdown(); diff --git a/www/chromium/files/patch-ui_base_resource_resource__bundle.cc b/www/chromium/files/patch-ui_base_resource_resource__bundle.cc index 251276eb0e9c..e36c823b4353 100644 --- a/www/chromium/files/patch-ui_base_resource_resource__bundle.cc +++ b/www/chromium/files/patch-ui_base_resource_resource__bundle.cc @@ -1,6 +1,6 @@ ---- ui/base/resource/resource_bundle.cc.orig 2017-12-15 02:04:51.000000000 +0100 -+++ ui/base/resource/resource_bundle.cc 2017-12-24 20:04:48.415881000 +0100 -@@ -707,7 +707,7 @@ +--- ui/base/resource/resource_bundle.cc.orig 2018-06-13 00:11:10.000000000 +0200 ++++ ui/base/resource/resource_bundle.cc 2018-07-19 21:58:34.994550000 +0200 +@@ -708,7 +708,7 @@ } ScaleFactor ResourceBundle::GetMaxScaleFactor() const { @@ -9,12 +9,12 @@ return max_scale_factor_; #else return GetSupportedScaleFactors().back(); -@@ -762,7 +762,7 @@ - } else { - supported_scale_factors.push_back(SCALE_FACTOR_100P); - } --#elif defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_WIN) -+#elif defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) +@@ -754,7 +754,7 @@ + // On platforms other than iOS, 100P is always a supported scale factor. + // For Windows we have a separate case in this function. + supported_scale_factors.push_back(SCALE_FACTOR_100P); +-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_WIN) ++#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) supported_scale_factors.push_back(SCALE_FACTOR_200P); #endif - ui::SetSupportedScaleFactors(supported_scale_factors); + #endif diff --git a/www/chromium/files/patch-ui_views_mus_aura__init.cc b/www/chromium/files/patch-ui_views_mus_aura__init.cc index a5e34ac71ce4..6026fda14e96 100644 --- a/www/chromium/files/patch-ui_views_mus_aura__init.cc +++ b/www/chromium/files/patch-ui_views_mus_aura__init.cc @@ -1,12 +1,12 @@ ---- ui/views/mus/aura_init.cc.orig 2017-09-05 21:05:48.000000000 +0200 -+++ ui/views/mus/aura_init.cc 2017-09-07 02:11:55.948578000 +0200 +--- ui/views/mus/aura_init.cc.orig 2018-06-13 00:11:10.000000000 +0200 ++++ ui/views/mus/aura_init.cc 2018-07-19 22:04:02.069063000 +0200 @@ -24,7 +24,7 @@ #include "ui/views/style/typography_provider.h" #include "ui/views/views_delegate.h" -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) - #include "components/font_service/public/cpp/font_loader.h" + #include "components/services/font/public/cpp/font_loader.h" #include "ui/gfx/platform_font_linux.h" #endif @@ -59,7 +59,7 @@ @@ -18,8 +18,8 @@ if (font_loader_.get()) { SkFontConfigInterface::SetGlobal(nullptr); // FontLoader is ref counted. We need to explicitly shutdown the background -@@ -105,7 +105,7 @@ - return false; +@@ -112,7 +112,7 @@ + } // Initialize the skia font code to go ask fontconfig underneath. -#if defined(OS_LINUX) diff --git a/www/chromium/files/patch-ui_views_widget_desktop_aura_desktop_screen_x11.cc b/www/chromium/files/patch-ui_views_widget_desktop_aura_desktop_screen_x11.cc new file mode 100644 index 000000000000..e5502e16089d --- /dev/null +++ b/www/chromium/files/patch-ui_views_widget_desktop_aura_desktop_screen_x11.cc @@ -0,0 +1,18 @@ +--- ui/views/widget/desktop_aura/desktop_screen_x11.cc.orig 2018-06-13 00:11:10.000000000 +0200 ++++ ui/views/widget/desktop_aura/desktop_screen_x11.cc 2018-07-20 17:57:12.071809000 +0200 +@@ -216,8 +216,13 @@ + if (host) { + DesktopWindowTreeHostX11* rwh = DesktopWindowTreeHostX11::GetHostForXID( + host->GetAcceleratedWidget()); +- if (rwh) +- return GetDisplayMatching(rwh->GetX11RootWindowBounds()); ++ if (rwh) { ++ const float scale = 1.0f / GetDeviceScaleFactor(); ++ const gfx::Rect pixel_rect = rwh->GetX11RootWindowBounds(); ++ return GetDisplayMatching( ++ gfx::Rect(gfx::ScaleToFlooredPoint(pixel_rect.origin(), scale), ++ gfx::ScaleToCeiledSize(pixel_rect.size(), scale))); ++ } + } + + return GetPrimaryDisplay(); diff --git a/www/chromium/pkg-plist b/www/chromium/pkg-plist index 91049fb02ea9..97709523d8ba 100644 --- a/www/chromium/pkg-plist +++ b/www/chromium/pkg-plist @@ -117,9 +117,6 @@ bin/chrome %%DATADIR%%/locales/zh-TW.pak %%DATADIR%%/locales/zh-TW.pak.info %%DATADIR%%/mksnapshot -%%DATADIR%%/mus_app_resources_100.pak -%%DATADIR%%/mus_app_resources_200.pak -%%DATADIR%%/mus_app_resources_strings.pak %%DATADIR%%/product_logo_48.png %%DATADIR%%/protoc %%DATADIR%%/resources.pak @@ -197,6 +194,8 @@ bin/chrome %%DATADIR%%/resources/inspector/audits2_worker.js %%DATADIR%%/resources/inspector/audits2_worker/audits2_worker_module.js %%DATADIR%%/resources/inspector/bindings_test_runner/bindings_test_runner_module.js +%%DATADIR%%/resources/inspector/browser_console/browser_console_module.js +%%DATADIR%%/resources/inspector/browser_debugger/browser_debugger_module.js %%DATADIR%%/resources/inspector/changes/changes_module.js %%DATADIR%%/resources/inspector/cm/cm_module.js %%DATADIR%%/resources/inspector/cm_modes/cm_modes_module.js @@ -211,6 +210,8 @@ bin/chrome %%DATADIR%%/resources/inspector/data_grid_test_runner/data_grid_test_runner_module.js %%DATADIR%%/resources/inspector/device_mode_test_runner/device_mode_test_runner_module.js %%DATADIR%%/resources/inspector/devices/devices_module.js +%%DATADIR%%/resources/inspector/devtools_app.html +%%DATADIR%%/resources/inspector/devtools_app.js %%DATADIR%%/resources/inspector/devtools_compatibility.js %%DATADIR%%/resources/inspector/devtools_extension_api.js %%DATADIR%%/resources/inspector/diff/diff_module.js @@ -262,29 +263,40 @@ bin/chrome %%DATADIR%%/resources/inspector/heap_snapshot_model/heap_snapshot_model_module.js %%DATADIR%%/resources/inspector/heap_snapshot_worker.js %%DATADIR%%/resources/inspector/heap_snapshot_worker/heap_snapshot_worker_module.js +%%DATADIR%%/resources/inspector/help/help_module.js %%DATADIR%%/resources/inspector/inline_editor/inline_editor_module.js %%DATADIR%%/resources/inspector/inspector.html %%DATADIR%%/resources/inspector/inspector.js %%DATADIR%%/resources/inspector/integration_test_runner.html %%DATADIR%%/resources/inspector/integration_test_runner.js +%%DATADIR%%/resources/inspector/js_app.html +%%DATADIR%%/resources/inspector/js_app.js +%%DATADIR%%/resources/inspector/js_profiler/js_profiler_module.js %%DATADIR%%/resources/inspector/layer_viewer/layer_viewer_module.js %%DATADIR%%/resources/inspector/layers/layers_module.js %%DATADIR%%/resources/inspector/layers_test_runner/layers_test_runner_module.js +%%DATADIR%%/resources/inspector/ndb_app.html +%%DATADIR%%/resources/inspector/ndb_app.js %%DATADIR%%/resources/inspector/network/network_module.js -%%DATADIR%%/resources/inspector/network_priorities/network_priorities_module.js %%DATADIR%%/resources/inspector/network_test_runner/network_test_runner_module.js +%%DATADIR%%/resources/inspector/node_app.html +%%DATADIR%%/resources/inspector/node_app.js +%%DATADIR%%/resources/inspector/node_debugger/node_debugger_module.js %%DATADIR%%/resources/inspector/object_ui/object_ui_module.js %%DATADIR%%/resources/inspector/perf_ui/perf_ui_module.js +%%DATADIR%%/resources/inspector/performance_monitor/performance_monitor_module.js %%DATADIR%%/resources/inspector/performance_test_runner/performance_test_runner_module.js %%DATADIR%%/resources/inspector/product_registry_impl/product_registry_impl_module.js %%DATADIR%%/resources/inspector/profiler/profiler_module.js +%%DATADIR%%/resources/inspector/protocol_monitor/protocol_monitor_module.js %%DATADIR%%/resources/inspector/quick_open/quick_open_module.js %%DATADIR%%/resources/inspector/resources/resources_module.js -%%DATADIR%%/resources/inspector/screencast/screencast_module.js %%DATADIR%%/resources/inspector/sdk_test_runner/sdk_test_runner_module.js +%%DATADIR%%/resources/inspector/search/search_module.js %%DATADIR%%/resources/inspector/security/security_module.js %%DATADIR%%/resources/inspector/security_test_runner/security_test_runner_module.js %%DATADIR%%/resources/inspector/settings/settings_module.js +%%DATADIR%%/resources/inspector/shell.js %%DATADIR%%/resources/inspector/snippets/snippets_module.js %%DATADIR%%/resources/inspector/source_frame/source_frame_module.js %%DATADIR%%/resources/inspector/sources/sources_module.js @@ -295,14 +307,14 @@ bin/chrome %%DATADIR%%/resources/inspector/timeline_model/timeline_model_module.js %%DATADIR%%/resources/inspector/toolbox.html %%DATADIR%%/resources/inspector/toolbox.js +%%DATADIR%%/resources/inspector/worker_app.html +%%DATADIR%%/resources/inspector/worker_app.js %%DATADIR%%/resources/inspector/workspace_diff/workspace_diff_module.js %%DATADIR%%/snapshot_blob.bin %%DATADIR%%/swiftshader/libEGL.so %%DATADIR%%/swiftshader/libGLESv2.so -%%DATADIR%%/ui.service %%DATADIR%%/v8_context_snapshot.bin %%DATADIR%%/views_mus_resources.pak -%%DATADIR%%/viz.service %%DEBUG%%%%DATADIR%%/character_data_generator %%DEBUG%%%%DATADIR%%/libVkLayer_core_validation.so %%DEBUG%%%%DATADIR%%/libVkLayer_object_tracker.so |