aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2019-05-06 06:00:51 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2019-10-17 16:57:21 +0200
commitacc7d89ce9ea6424830048cf326db895176b1076 (patch)
tree0fd44c81f972337c8c20b13e7bd4a8d1b426589b
parent8a27538a82e8d47339b93f05880fc24d9cd21f8a (diff)
downloadalpine_aports-acc7d89ce9ea6424830048cf326db895176b1076.tar.bz2
alpine_aports-acc7d89ce9ea6424830048cf326db895176b1076.tar.xz
alpine_aports-acc7d89ce9ea6424830048cf326db895176b1076.zip
community/chromium: upgrade to 76
disable armv7 til we sorted out the clang++ problem (cherry picked from commit 5f276606f194b9b107043dda8d8479a9842f13cb)
-rw-r--r--community/chromium/APKBUILD61
-rw-r--r--community/chromium/aarch64-fixes.patch24
-rw-r--r--community/chromium/add-missing-blink-tools.patch1071
-rw-r--r--community/chromium/chromium-73-gcc-1.patch99
-rw-r--r--community/chromium/chromium-73-gcc-2.patch51
-rw-r--r--community/chromium/chromium-73-gcc-3.patch69
-rw-r--r--community/chromium/chromium-73-gcc-4.patch59
-rw-r--r--community/chromium/chromium-73-gcc-5.patch65
-rw-r--r--community/chromium/chromium-73-gcc-6.patch88
-rw-r--r--community/chromium/gcc-arm.patch22
-rw-r--r--community/chromium/gcc6.patch12
-rw-r--r--community/chromium/gcc8-alignof.patch17
-rw-r--r--community/chromium/musl-hacks.patch15
-rw-r--r--community/chromium/musl-sandbox.patch34
-rw-r--r--community/chromium/musl-v8-fix-deadlock.patch21
-rw-r--r--community/chromium/nasm.patch13
-rw-r--r--community/chromium/no-execinfo.patch11
-rw-r--r--community/chromium/resolver.patch40
-rw-r--r--community/chromium/secure_getenv.patch16
-rw-r--r--community/chromium/swiftshader.patch35
20 files changed, 114 insertions, 1709 deletions
diff --git a/community/chromium/APKBUILD b/community/chromium/APKBUILD
index 9dae1b9860..63ec904d3e 100644
--- a/community/chromium/APKBUILD
+++ b/community/chromium/APKBUILD
@@ -1,11 +1,11 @@
1# Contributor: Carlo Landmeter <clandmeter@gmail.com> 1# Contributor: Carlo Landmeter <clandmeter@gmail.com>
2# Maintainer: Carlo Landmeter <clandmeter@gmail.com> 2# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
3pkgname=chromium 3pkgname=chromium
4pkgver=73.0.3683.103 4pkgver=76.0.3809.87
5pkgrel=0 5pkgrel=0
6pkgdesc="chromium web browser" 6pkgdesc="chromium web browser"
7url="http://www.chromium.org/" 7url="http://www.chromium.org/"
8arch="x86_64 armv7 aarch64" 8arch="x86_64 aarch64" # disable armhf and armv7 til we sorted out clang++
9license="BSD" 9license="BSD"
10depends="xdg-utils" 10depends="xdg-utils"
11depends_dev="" 11depends_dev=""
@@ -17,6 +17,7 @@ makedepends="$depends_dev
17 bsd-compat-headers 17 bsd-compat-headers
18 bzip2-dev 18 bzip2-dev
19 cairo-dev 19 cairo-dev
20 clang-dev
20 cups-dev 21 cups-dev
21 dbus-glib-dev 22 dbus-glib-dev
22 elfutils-dev 23 elfutils-dev
@@ -61,6 +62,7 @@ makedepends="$depends_dev
61 ninja 62 ninja
62 nodejs 63 nodejs
63 nss-dev 64 nss-dev
65 openjdk8
64 opus-dev 66 opus-dev
65 paxmark 67 paxmark
66 pciutils-dev 68 pciutils-dev
@@ -100,17 +102,11 @@ source="https://commondatastorage.googleapis.com/chromium-browser-official/$pkgn
100 102
101 chromium-use-alpine-target.patch 103 chromium-use-alpine-target.patch
102 chromium-gcc-r1.patch 104 chromium-gcc-r1.patch
103 chromium-73-gcc-1.patch
104 chromium-73-gcc-2.patch
105 chromium-73-gcc-3.patch
106 chromium-73-gcc-4.patch
107 chromium-73-gcc-5.patch
108 chromium-73-gcc-6.patch
109 media-base.patch 105 media-base.patch
110 musl-crashpad.patch 106 musl-crashpad.patch
111 musl-v8-fix-deadlock.patch
112 musl-v8-monotonic-pthread-cont_timedwait.patch 107 musl-v8-monotonic-pthread-cont_timedwait.patch
113 gcc8-alignof.patch 108 nasm.patch
109
114 gcc-fno-delete-null-pointer-checks.patch 110 gcc-fno-delete-null-pointer-checks.patch
115 gcc-arm.patch 111 gcc-arm.patch
116 musl-arm-limits.patch 112 musl-arm-limits.patch
@@ -147,7 +143,7 @@ prepare() {
147 touch chrome/test/data/webui/i18n_process_css_test.html 143 touch chrome/test/data/webui/i18n_process_css_test.html
148 # Use the file at run time instead of effectively compiling it in 144 # Use the file at run time instead of effectively compiling it in
149 sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \ 145 sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \
150 -i device/usb/BUILD.gn 146 -i services/device/public/cpp/usb/BUILD.gn
151 147
152 mkdir -p third_party/node/linux/node-linux-x64/bin 148 mkdir -p third_party/node/linux/node-linux-x64/bin
153 ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/ 149 ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/
@@ -157,7 +153,6 @@ prepare() {
157 ffmpeg 153 ffmpeg
158 flac 154 flac
159 fontconfig 155 fontconfig
160 freetype
161 harfbuzz-ng 156 harfbuzz-ng
162 libdrm 157 libdrm
163 libevent 158 libevent
@@ -209,24 +204,26 @@ build() {
209 eval "$(base64 -d < $srcdir/google-api.keys)" 204 eval "$(base64 -d < $srcdir/google-api.keys)"
210 205
211 msg "Bootstrapping GN" 206 msg "Bootstrapping GN"
212 local _c=$(_gn_flags is_clang=false \ 207 local _c=$(_gn_flags is_clang=true \
213 use_sysroot=false \ 208 use_sysroot=false \
214 treat_warnings_as_errors=false \ 209 treat_warnings_as_errors=false \
215 fatal_linker_warnings=false \ 210 fatal_linker_warnings=false \
216 binutils_path=\"/usr/bin\" \ 211 binutils_path=\"/usr/bin\" \
212 use_custom_libcxx=false \
217 use_gold=false \ 213 use_gold=false \
218 use_allocator=\"none\" \ 214 use_allocator=\"none\" \
219 use_allocator_shim=false \ 215 use_allocator_shim=false \
220 use_vaapi=true \ 216 use_vaapi=true \
221 ) 217 )
222 218
223 AR="ar" CC="${CC:-gcc}" CXX="${CXX:-g++}" LD="${CXX:-g++}" \ 219# AR="ar" CC="${CC:-gcc}" CXX="${CXX:-g++}" LD="${CXX:-g++}" \
220 CC="${CC:-clang}" CXX="${CXX:-clang++}" LD="${CXX:-clang++}" \
224 python tools/gn/bootstrap/bootstrap.py -s -v --gn-gen-args "$_c" 221 python tools/gn/bootstrap/bootstrap.py -s -v --gn-gen-args "$_c"
225 222
226 msg "Configuring build" 223 msg "Configuring build"
227 _c=$(_gn_flags \ 224 _c=$(_gn_flags \
228 clang_use_chrome_plugins=false \ 225 clang_use_chrome_plugins=false \
229 closure_compile=false \ 226 closure_compile=true \
230 custom_toolchain=\"//build/toolchain/linux/unbundle:default\" \ 227 custom_toolchain=\"//build/toolchain/linux/unbundle:default\" \
231 enable_hangout_services_extension=true \ 228 enable_hangout_services_extension=true \
232 enable_nacl=false \ 229 enable_nacl=false \
@@ -241,13 +238,13 @@ build() {
241 google_default_client_secret=\"$_google_default_client_secret\" \ 238 google_default_client_secret=\"$_google_default_client_secret\" \
242 host_toolchain=\"//build/toolchain/linux/unbundle:default\" \ 239 host_toolchain=\"//build/toolchain/linux/unbundle:default\" \
243 icu_use_data_file=true \ 240 icu_use_data_file=true \
244 is_clang=false \ 241 is_clang=true \
245 is_component_build=false \ 242 is_component_build=false \
246 is_debug=$_is_debug \ 243 is_debug=$_is_debug \
247 is_desktop_linux=true \ 244 is_desktop_linux=true \
248 linux_use_bundled_binutils=false \ 245 linux_use_bundled_binutils=false \
249 proprietary_codecs=true \ 246 proprietary_codecs=true \
250 remove_webcore_debug_symbols=true \ 247 blink_symbol_level=0 \
251 symbol_level=0 \ 248 symbol_level=0 \
252 treat_warnings_as_errors=false \ 249 treat_warnings_as_errors=false \
253 use_allocator=\"none\" \ 250 use_allocator=\"none\" \
@@ -257,12 +254,13 @@ build() {
257 use_gnome_keyring=false \ 254 use_gnome_keyring=false \
258 use_gold=false \ 255 use_gold=false \
259 use_lld=false \ 256 use_lld=false \
257 use_jumbo_build=true \
260 use_pulseaudio=false \ 258 use_pulseaudio=false \
261 use_sysroot=false \ 259 use_sysroot=false \
262 use_system_harfbuzz=true \ 260 use_system_harfbuzz=true \
263 ) 261 )
264 262
265 AR="ar" CC="${CC:-gcc}" CXX="${CXX:-g++}" LD="${CXX:-g++}" NM=/usr/bin/nm \ 263 AR="ar" CC="clang" CXX="clang++" LD="clang++" NM=/usr/bin/nm \
266 out/Release/gn gen out/$_buildtype --args="$_c $_ca" 264 out/Release/gn gen out/$_buildtype --args="$_c $_ca"
267 265
268 msg "Ninja turtles GO!" 266 msg "Ninja turtles GO!"
@@ -339,7 +337,7 @@ chromedriver() {
339 mv "$pkgdir"/usr/bin/chromedriver "$subpkgdir"/usr/bin 337 mv "$pkgdir"/usr/bin/chromedriver "$subpkgdir"/usr/bin
340} 338}
341 339
342sha512sums="917ba026abcab9e016cf3aab931da8baefd652858115dc96d1037d5c96ed5a0a9e0cb9a4d23d3fa35c85d25b2deca44032f7313f84a2a74bf0abb2c22250b04c chromium-73.0.3683.103.tar.xz 340sha512sums="f237cb794bff68cbc2ea3daadea2852df810543873ceaefa4be901702b3578ce7b23a0f083b76373de20e60ea2dc1245c58de0888fb6c72ca465bca0ee0e7c1a chromium-76.0.3809.87.tar.xz
343a3bb959c65944ae2fb765725cedcffd743a58bc0c2cd1f1999d15fe79801d00f3474b08b4ed7b48859ed921eb57093d0ad09d90f201d729ed9b8a419a591ed29 pstables-2.8.h 341a3bb959c65944ae2fb765725cedcffd743a58bc0c2cd1f1999d15fe79801d00f3474b08b4ed7b48859ed921eb57093d0ad09d90f201d729ed9b8a419a591ed29 pstables-2.8.h
344b9a810416dd7a8ffc3a5ced85ad9acebda1665bd08a57eec7b189698cc5f74d2c3fd69044e20fcb83297a43214b2772a1312b2c6122ea0eb716abacf39524d60 chromium-launcher.sh 342b9a810416dd7a8ffc3a5ced85ad9acebda1665bd08a57eec7b189698cc5f74d2c3fd69044e20fcb83297a43214b2772a1312b2c6122ea0eb716abacf39524d60 chromium-launcher.sh
345f6d962b9e4c22dd42183df3db5d3202dab33eccecafb1bf63ca678147289581262db1e5e64cbe8f9c212beefb0a6717bb8d311e497f56b55fe95b8bab2db493f chromium.conf 343f6d962b9e4c22dd42183df3db5d3202dab33eccecafb1bf63ca678147289581262db1e5e64cbe8f9c212beefb0a6717bb8d311e497f56b55fe95b8bab2db493f chromium.conf
@@ -348,29 +346,22 @@ e182c998a43d22d1c76a86c561619afd1fca8c2be668265ad5e2f81a3806f7a154272cc027a2f8b3
348230d1819b9d644ebaa6e194e948d662add8d237a99cc3d6b0f8a2fc2b331b43a3cd0766746f1c76c1a114f1730b40504c532d0c40aafa8cbc45022663cbcc245 default-pthread-stacksize.patch 346230d1819b9d644ebaa6e194e948d662add8d237a99cc3d6b0f8a2fc2b331b43a3cd0766746f1c76c1a114f1730b40504c532d0c40aafa8cbc45022663cbcc245 default-pthread-stacksize.patch
349ef31809702ef020e02445ac36857c621cf852dea14c2fdf291ea0700b6fc6d94e3704726a051e95d193aa10fe74ca53a870848fec5f8153fb262f2e184affe7f musl-fixes.patch 347ef31809702ef020e02445ac36857c621cf852dea14c2fdf291ea0700b6fc6d94e3704726a051e95d193aa10fe74ca53a870848fec5f8153fb262f2e184affe7f musl-fixes.patch
35090efbc89151c77f32434364dcbaabaf9d9a207f4a77f147cd51b3fe100832fbfb3a9fb665303a79a3d788e400f4f41890de202ccbb7bd1fc6252e33c6e74e429 musl-fixes-breakpad.patch 34890efbc89151c77f32434364dcbaabaf9d9a207f4a77f147cd51b3fe100832fbfb3a9fb665303a79a3d788e400f4f41890de202ccbb7bd1fc6252e33c6e74e429 musl-fixes-breakpad.patch
3510aa3176f1021332088740d6e4fe2eadbe375240df0690c8449426a42a674fdf58e8a1fda85ca527dc1b4451e964d54564283fd81e3b7df059f5bcfccb8e07e84 musl-hacks.patch 3494640c175657f6a53f8a8d1c6bd2208ec30751d739a086b8f4f49250a88e522441a4919c1e47673cbee54c24c9cc65f18d386071fc4667662e4d13201f0bb7e64 musl-hacks.patch
35295ead57f7338649351948d100e32e5ec1eeadb02bffa136ff15c6c515eceb8013c444be092d777c1b62b945bfb83b97778ba4d3a0ccc2d7c2c9a0a8cd8ee0f01 musl-libc++.patch 35095ead57f7338649351948d100e32e5ec1eeadb02bffa136ff15c6c515eceb8013c444be092d777c1b62b945bfb83b97778ba4d3a0ccc2d7c2c9a0a8cd8ee0f01 musl-libc++.patch
353952a73da0ed01d40e2422cababa84224782b76a3f57d6b3de0b2d69690acc24c6fb0755991d32d31cea590cc3b8c71357160a0231f820dbf15a48155496a7a14 musl-sandbox.patch 3512f6111926a6575a117de18bf27b9052a5d33d4de3b0fdfe4016925ee8ac5d88ad13b7366d228c0670a4bca5fe4df391c2288caefcb96d86360286edfe015dc70 musl-sandbox.patch
3541024bc66b74053611d46e2222a6b4954b045812a505187130a500f0cce731beaf61c098f441f7ad676711fef0b12f439436a7ce538bcb284d4e5e3d11cf53580 no-execinfo.patch 35283b4cc042d501bd94ce953d1bc94361adf9d6f0d1fa71c04c5d3688c0befb81fdb6ccf31e6cab6a22d0057db309b473bc6af75535675c61d167035e36dd1d6c6 no-execinfo.patch
355db7f676d3476820c29f234b1f8f17a74e82b72d67fc727c715307734fd238e3cb0f99d8b5320d45f820b62c01163283c4829caa37afd6a9ca7592a54d3c65819 no-mallinfo.patch 353db7f676d3476820c29f234b1f8f17a74e82b72d67fc727c715307734fd238e3cb0f99d8b5320d45f820b62c01163283c4829caa37afd6a9ca7592a54d3c65819 no-mallinfo.patch
3566833054ef89da20c0de63faac2f87ff250b5aca3ac785fc404da4a9e03c4e00df9d7da009788e611d113cdf3be2ba50f933d85d6baf20f2df6a3711cceff5152 resolver.patch 35481c590942e73a62027290684c56030796e4bb953dd5007db787733ba84a505326a65001267b820ac3f44212c7e903c102809961f8e4ad42c57e21c44ad41cfe6 resolver.patch
3576b0812725a0fc562527f3556dc4979fec72d1ba92f26a5e78ff2016c39bb2c155a0ff95fc22101f9c097d14b84182d6615276f4247f60ae7833ab45da8366e6d swiftshader.patch 35584732900f50799ee8d4c9a572a8703c1cd67c6a3b8f8dcf97f308319dcef6ac3d41ea5ddfb2ef4d695bdebdae691e30d5631a8d04e59b931935ba188b0308a61 swiftshader.patch
3581b8647ab4081ec27f142eb564841b603dbf4c41118502e43b061d06f8866ebd1418d676457ed9ee0dc0a759e0369a29219bea98e74f687ddcba5d4513ca460ba secure_getenv.patch 3567f9b816ff9088f84929dc9853ab8cf0c705ef95fedb9e9c3e85bc50c8befb76e39ecf5e754fa3fc8b34b42397875ec41c0729f880a642262b675ebf79901810a secure_getenv.patch
359246c43a0ab557671119ebc4ecb292925ebfee25312fb50e739a179dc085d23b9623bec2d7baecdd37ebd9318f8770664f20c12de6383def74cd89b7845d149ce chromium-use-alpine-target.patch 357246c43a0ab557671119ebc4ecb292925ebfee25312fb50e739a179dc085d23b9623bec2d7baecdd37ebd9318f8770664f20c12de6383def74cd89b7845d149ce chromium-use-alpine-target.patch
3606e2bcbed44786c6c0d3beda935269f30fdcdf07c400defa6bf73f8359a60b1d59cc2f80dbc106be651a535635995641321d9e524b18919d3975bd6008a641d59 chromium-gcc-r1.patch 3586e2bcbed44786c6c0d3beda935269f30fdcdf07c400defa6bf73f8359a60b1d59cc2f80dbc106be651a535635995641321d9e524b18919d3975bd6008a641d59 chromium-gcc-r1.patch
361d1f1323d2347769777c67c045f4dbd331ec96788b1319f7880e780dc1cbec4306e5eff45b7d4322fcb0792acf28e58da43bfb9125052848e536f5ca7515861e3 chromium-73-gcc-1.patch
362be327cbb60d31589cb32f296b4d1b3f537c0c86ad4e6928ff23254c75c858251fa3d23ad7a7a0f8ed827b6a3aa76199b8b385a5c2202ee0ce4ce73d22e9348cf chromium-73-gcc-2.patch
3630be2923f9d4c5263740d54f091339e4ccc4eab7159cd7e0a0c90c9f8740698f5b85e1e825a045e556dd6b535831ac3d5fa56093eb63f8e4ceefd9917d4e5fa86 chromium-73-gcc-3.patch
364e7382bdc5d365bcc4d1e9331f01f12598bd1b5d0e66183f09b176caa0d3aa7a03c1cbddd31a565203fe851b09408de5be17894216fffa57fa3d4ed0903e87710 chromium-73-gcc-4.patch
365628dee3c491e5f9d2d70f8a6f9b43e1b4002f79678f30a8293f728942e7bf186ba5636fb0eac544f40002e761235fb7239e22afe0251e2de2f98ae06e2bcd4b6 chromium-73-gcc-5.patch
36680d89c711c4ada2a7d1d3757fea88b7f1f75cf6105ee83e275be4fe74689f58729a1c157b69744cd0c76bd6c3055386f4f7567aa9219e70baafe2f9330ff87d8 chromium-73-gcc-6.patch
367589a7acf149d44db081da2dd24a7769f2b9572a8cc64d2aad78577a64768d3b6fb2bfa02292b5260acd2c4a28c3ae9b82847ff901ce8a21baeca0b46dcda0ca9 media-base.patch 359589a7acf149d44db081da2dd24a7769f2b9572a8cc64d2aad78577a64768d3b6fb2bfa02292b5260acd2c4a28c3ae9b82847ff901ce8a21baeca0b46dcda0ca9 media-base.patch
36805c1af43038f76014f5f8b605085310414242f2bfad0e3258ddb29a08e7f4307de31b2d551b0a291986cc7d5a01cf3a003ac864216877195bb4310fd33193f0f musl-crashpad.patch 36005c1af43038f76014f5f8b605085310414242f2bfad0e3258ddb29a08e7f4307de31b2d551b0a291986cc7d5a01cf3a003ac864216877195bb4310fd33193f0f musl-crashpad.patch
3692c22e0d56b2557bafc842043911ecd0f8f70589013aeb7d3e8c7c8a5622bdbfe1f249e7223991ebf6130c7a45c7771a02dcc096dd03c48e2559ea4741147cfce musl-v8-fix-deadlock.patch
3706953e83d4034f7a016dd055fed152a8a448f741a4c4f7a8f3b03cc7a4589d3d3c03775f844d76d6d4478ac15c655fee0be7355f0d5062ddc7fa9f6ce4b011116 musl-v8-monotonic-pthread-cont_timedwait.patch 3616953e83d4034f7a016dd055fed152a8a448f741a4c4f7a8f3b03cc7a4589d3d3c03775f844d76d6d4478ac15c655fee0be7355f0d5062ddc7fa9f6ce4b011116 musl-v8-monotonic-pthread-cont_timedwait.patch
3719bfc532fd1e84e30362ac41fcd68253e17ee4cb5e986ceb5bb122e3235e4617e295ce9dddfdfbbd0b9d3e67267096152da2a19e3bb4bb9111c7fdb22fa398872 gcc8-alignof.patch 36234013a1a960d0f3b20183d03df5be6b36e2eb9b3d3319fa2bcf3c69084968fde0239ad7304c9a6165b3284a2a55a220b3d207889e2b913dc4578268fdede9ea6 nasm.patch
372bb0f3dc1ade429a398d487ae190a278948533398c4a1085aeb35ff57fefb90a1e598008ba839423ca0acd30ba4c992950f395dba3b9994d3c7187fe68b9a93d7 gcc-fno-delete-null-pointer-checks.patch 363bb0f3dc1ade429a398d487ae190a278948533398c4a1085aeb35ff57fefb90a1e598008ba839423ca0acd30ba4c992950f395dba3b9994d3c7187fe68b9a93d7 gcc-fno-delete-null-pointer-checks.patch
373ebfa795879130226d5d3601901df9c3a119b4f7342c12b7a24cb1697a4fa535c9a9cc4a11d30085df569a7337846c0e26b78928fd78f53c98e5773978621753d gcc-arm.patch 36491296fcbdfc4b35899e2af949024c7041d85cc64644cf5fe73c8e46a0523b09d1fb8849f315bd212c1ac25caf57553e933cb4eeb8d1856960441d24b2dd20e27 gcc-arm.patch
3743bcffb36f28a01d8bb91f1c1ee1e327caebb1e139d4e8772ad15460ee69cb5ea3307a235dc83184a9e09b687882d9617f3a3ce1a7b07cbd6e11b0a5d6a6ace81 musl-arm-limits.patch 3653bcffb36f28a01d8bb91f1c1ee1e327caebb1e139d4e8772ad15460ee69cb5ea3307a235dc83184a9e09b687882d9617f3a3ce1a7b07cbd6e11b0a5d6a6ace81 musl-arm-limits.patch
375d4d46ea95ed8d47cd4b09f27d99df61cc6b72b4cb92b865310f245259d5adf02cd136888cd44ad12aeba3fd4d638982437fdf230e817d0188cc5ea76fec82cd1 chromium-71.0.3578.98-skia-aarch64-buildfix.patch 366d4d46ea95ed8d47cd4b09f27d99df61cc6b72b4cb92b865310f245259d5adf02cd136888cd44ad12aeba3fd4d638982437fdf230e817d0188cc5ea76fec82cd1 chromium-71.0.3578.98-skia-aarch64-buildfix.patch
376229a0c04ebd7465fabe3268959c386e63ac9e272a0506bb65785f6f9532a9f88bee436287fbcfc63e5fd9d85fb4f68f73a79475b6e6cc53dc58d715d40cd0ed2 aarch64-fixes.patch" 367f0a0fa663fd7a88346d69675a96dfd864364f6ba41d19a5adfbfb0f13fd784b194a60cd2c63edfcc21d6b049628eade690ff803f787dbdd29d84cd8312be4d4a aarch64-fixes.patch"
diff --git a/community/chromium/aarch64-fixes.patch b/community/chromium/aarch64-fixes.patch
index 589cabe0bb..107bb8b1bc 100644
--- a/community/chromium/aarch64-fixes.patch
+++ b/community/chromium/aarch64-fixes.patch
@@ -1,27 +1,3 @@
1diff --git a/third_party/swiftshader/third_party/llvm-7.0/BUILD.gn b/third_party/swiftshader/third_party/llvm-7.0/BUILD.gn
2index 744b0eb..32ff5a8 100644
3--- ./third_party/swiftshader/third_party/llvm-7.0/BUILD.gn
4+++ ./third_party/swiftshader/third_party/llvm-7.0/BUILD.gn
5@@ -55,7 +55,10 @@ config("swiftshader_llvm_private_config") {
6 }
7
8 if (is_clang) {
9- cflags += [ "-Wno-header-hygiene" ]
10+ cflags += [
11+ "-Wno-header-hygiene",
12+ "-Wno-error=header-hygiene",
13+ ]
14 if (target_cpu == "x86" || target_cpu == "x64") {
15 cflags += [ "-msse2" ]
16 }
17@@ -70,7 +73,6 @@ config("swiftshader_llvm_private_config") {
18 "-Wno-unused-private-field",
19 "-Wno-unused-result",
20 "-Wno-unused-variable",
21- "-Wno-error=header-hygiene",
22 ]
23
24 defines = [
25diff --git a/third_party/swiftshader/third_party/llvm-7.0/configs/linux/include/llvm/Config/config.h b/third_party/swiftshader/third_party/llvm-7.0/configs/linux/include/llvm/Config/config.h 1diff --git a/third_party/swiftshader/third_party/llvm-7.0/configs/linux/include/llvm/Config/config.h b/third_party/swiftshader/third_party/llvm-7.0/configs/linux/include/llvm/Config/config.h
26index ff20611..ec22982 100644 2index ff20611..ec22982 100644
27--- ./third_party/swiftshader/third_party/llvm-7.0/configs/linux/include/llvm/Config/config.h 3--- ./third_party/swiftshader/third_party/llvm-7.0/configs/linux/include/llvm/Config/config.h
diff --git a/community/chromium/add-missing-blink-tools.patch b/community/chromium/add-missing-blink-tools.patch
deleted file mode 100644
index 4eddd8c744..0000000000
--- a/community/chromium/add-missing-blink-tools.patch
+++ /dev/null
@@ -1,1071 +0,0 @@
1Description: add back contents of third-party/blink/tools that went missing in the source tarball for 66.0.3359.106
2Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=832283
3
4--- /dev/null
5+++ b/third_party/blink/tools/OWNERS
6@@ -0,0 +1 @@
7+file://third_party/WebKit/Tools/OWNERS
8--- /dev/null
9+++ b/third_party/blink/tools/blinkpy/__init__.py
10@@ -0,0 +1,3 @@
11+# Copyright 2017 The Chromium Authors. All rights reserved.
12+# Use of this source code is governed by a BSD-style license that can be
13+# found in the LICENSE file.
14--- /dev/null
15+++ b/third_party/blink/tools/blinkpy/common/__init__.py
16@@ -0,0 +1,3 @@
17+# Copyright 2017 The Chromium Authors. All rights reserved.
18+# Use of this source code is governed by a BSD-style license that can be
19+# found in the LICENSE file.
20--- /dev/null
21+++ b/third_party/blink/tools/blinkpy/common/name_style_converter.py
22@@ -0,0 +1,128 @@
23+# Copyright 2017 The Chromium Authors. All rights reserved.
24+# Use of this source code is governed by a BSD-style license that can be
25+# found in the LICENSE file.
26+
27+# pylint: disable=import-error,print-statement,relative-import
28+
29+import re
30+
31+SPECIAL_TOKENS = [
32+ # This list should be sorted by length.
33+ 'CString',
34+ 'Float32',
35+ 'Float64',
36+ 'Base64',
37+ 'IFrame',
38+ 'Latin1',
39+ 'PlugIn',
40+ 'SQLite',
41+ 'Uint16',
42+ 'Uint32',
43+ 'WebGL2',
44+ 'ASCII',
45+ 'CType',
46+ 'DList',
47+ 'Int16',
48+ 'Int32',
49+ 'MPath',
50+ 'OList',
51+ 'TSpan',
52+ 'UList',
53+ 'UTF16',
54+ 'Uint8',
55+ 'WebGL',
56+ 'XPath',
57+ 'ETC1',
58+ 'HTML',
59+ 'Int8',
60+ 'S3TC',
61+ 'SPv2',
62+ 'UTF8',
63+ 'API',
64+ 'CSS',
65+ 'DOM',
66+ 'EXT',
67+ 'RTC',
68+ 'SVG',
69+ '2D',
70+ 'AX',
71+ 'V0',
72+ 'V8',
73+]
74+
75+MATCHING_EXPRESSION = '((?:[A-Z][a-z]+)|[0-9]D?$)'
76+
77+
78+class SmartTokenizer(object):
79+ """Detects special cases that are not easily discernible without additional
80+ knowledge, such as recognizing that in SVGSVGElement, the first two SVGs
81+ are separate tokens, but WebGL is one token."""
82+
83+ def __init__(self, name):
84+ self.remaining = name
85+
86+ def tokenize(self):
87+ name = self.remaining
88+ tokens = []
89+ while len(name) > 0:
90+ matched_token = None
91+ for token in SPECIAL_TOKENS:
92+ if name.startswith(token):
93+ matched_token = token
94+ break
95+ if not matched_token:
96+ match = re.search(MATCHING_EXPRESSION, name)
97+ if not match:
98+ matched_token = name
99+ elif match.start(0) != 0:
100+ matched_token = name[:match.start(0)]
101+ else:
102+ matched_token = match.group(0)
103+ tokens.append(name[:len(matched_token)])
104+ name = name[len(matched_token):]
105+ return tokens
106+
107+
108+class NameStyleConverter(object):
109+ """Converts names from camelCase to various other styles.
110+ """
111+
112+ def __init__(self, name):
113+ self.tokens = self.tokenize(name)
114+
115+ def tokenize(self, name):
116+ tokenizer = SmartTokenizer(name)
117+ return tokenizer.tokenize()
118+
119+ def to_snake_case(self):
120+ """Snake case is the file and variable name style per Google C++ Style
121+ Guide:
122+ https://google.github.io/styleguide/cppguide.html#Variable_Names
123+
124+ Also known as the hacker case.
125+ https://en.wikipedia.org/wiki/Snake_case
126+ """
127+ return '_'.join([token.lower() for token in self.tokens])
128+
129+ def to_upper_camel_case(self):
130+ """Upper-camel case is the class and function name style per
131+ Google C++ Style Guide:
132+ https://google.github.io/styleguide/cppguide.html#Function_Names
133+
134+ Also known as the PascalCase.
135+ https://en.wikipedia.org/wiki/Camel_case.
136+ """
137+ return ''.join([token[0].upper() + token[1:] for token in self.tokens])
138+
139+ def to_macro_case(self):
140+ """Macro case is the macro name style per Google C++ Style Guide:
141+ https://google.github.io/styleguide/cppguide.html#Macro_Names
142+ """
143+ return '_'.join([token.upper() for token in self.tokens])
144+
145+ def to_all_cases(self):
146+ return {
147+ 'snake_case': self.to_snake_case(),
148+ 'upper_camel_case': self.to_upper_camel_case(),
149+ 'macro_case': self.to_macro_case(),
150+ }
151--- /dev/null
152+++ b/third_party/blink/tools/blinkpy/common/name_style_converter_test.py
153@@ -0,0 +1,178 @@
154+# Copyright 2017 The Chromium Authors. All rights reserved.
155+# Use of this source code is governed by a BSD-style license that can be
156+# found in the LICENSE file.
157+
158+# pylint: disable=import-error,print-statement,relative-import,protected-access
159+
160+"""Unit tests for name_style_converter.py."""
161+
162+import unittest
163+
164+from name_style_converter import NameStyleConverter
165+from name_style_converter import SmartTokenizer
166+
167+
168+class SmartTokenizerTest(unittest.TestCase):
169+ def test_simple_cases(self):
170+ tokenizer = SmartTokenizer('foo')
171+ self.assertEqual(tokenizer.tokenize(), ['foo'])
172+
173+ tokenizer = SmartTokenizer('fooBar')
174+ self.assertEqual(tokenizer.tokenize(), ['foo', 'Bar'])
175+
176+ tokenizer = SmartTokenizer('fooBarBaz')
177+ self.assertEqual(tokenizer.tokenize(), ['foo', 'Bar', 'Baz'])
178+
179+ tokenizer = SmartTokenizer('Baz')
180+ self.assertEqual(tokenizer.tokenize(), ['Baz'])
181+
182+ tokenizer = SmartTokenizer('')
183+ self.assertEqual(tokenizer.tokenize(), [])
184+
185+ tokenizer = SmartTokenizer('FOO')
186+ self.assertEqual(tokenizer.tokenize(), ['FOO'])
187+
188+ tokenizer = SmartTokenizer('foo2')
189+ self.assertEqual(tokenizer.tokenize(), ['foo', '2'])
190+
191+ def test_tricky_cases(self):
192+ tokenizer = SmartTokenizer('XMLHttpRequest')
193+ self.assertEqual(tokenizer.tokenize(), ['XML', 'Http', 'Request'])
194+
195+ tokenizer = SmartTokenizer('HTMLElement')
196+ self.assertEqual(tokenizer.tokenize(), ['HTML', 'Element'])
197+
198+ tokenizer = SmartTokenizer('WebGLRenderingContext')
199+ self.assertEqual(tokenizer.tokenize(),
200+ ['WebGL', 'Rendering', 'Context'])
201+
202+ tokenizer = SmartTokenizer('CanvasRenderingContext2D')
203+ self.assertEqual(tokenizer.tokenize(),
204+ ['Canvas', 'Rendering', 'Context', '2D'])
205+ tokenizer = SmartTokenizer('CanvasRenderingContext2DAPITest')
206+ self.assertEqual(tokenizer.tokenize(),
207+ ['Canvas', 'Rendering', 'Context', '2D', 'API', 'Test'])
208+
209+ tokenizer = SmartTokenizer('SVGSVGElement')
210+ self.assertEqual(tokenizer.tokenize(), ['SVG', 'SVG', 'Element'])
211+
212+ tokenizer = SmartTokenizer('CanvasRenderingContext2D')
213+ self.assertEqual(tokenizer.tokenize(), ['Canvas', 'Rendering', 'Context', '2D'])
214+
215+ tokenizer = SmartTokenizer('CSSURLImageValue')
216+ self.assertEqual(tokenizer.tokenize(), ['CSS', 'URL', 'Image', 'Value'])
217+ tokenizer = SmartTokenizer('CSSPropertyAPID')
218+ self.assertEqual(tokenizer.tokenize(), ['CSS', 'Property', 'API', 'D'])
219+ tokenizer = SmartTokenizer('AXARIAGridCell')
220+ self.assertEqual(tokenizer.tokenize(), ['AX', 'ARIA', 'Grid', 'Cell'])
221+
222+ tokenizer = SmartTokenizer('CDATASection')
223+ self.assertEqual(tokenizer.tokenize(), ['CDATA', 'Section'])
224+
225+ tokenizer = SmartTokenizer('ASCIICType')
226+ self.assertEqual(tokenizer.tokenize(), ['ASCII', 'CType'])
227+ tokenizer = SmartTokenizer('CString')
228+ self.assertEqual(tokenizer.tokenize(), ['CString'])
229+
230+ tokenizer = SmartTokenizer('HTMLDListElement')
231+ self.assertEqual(tokenizer.tokenize(), ['HTML', 'DList', 'Element'])
232+ tokenizer = SmartTokenizer('HTMLOListElement')
233+ self.assertEqual(tokenizer.tokenize(), ['HTML', 'OList', 'Element'])
234+ tokenizer = SmartTokenizer('HTMLIFrameElement')
235+ self.assertEqual(tokenizer.tokenize(), ['HTML', 'IFrame', 'Element'])
236+ tokenizer = SmartTokenizer('HTMLPlugInElement')
237+ self.assertEqual(tokenizer.tokenize(), ['HTML', 'PlugIn', 'Element'])
238+
239+ # No special handling for OptGroup, FieldSet, and TextArea.
240+ tokenizer = SmartTokenizer('HTMLOptGroupElement')
241+ self.assertEqual(tokenizer.tokenize(), ['HTML', 'Opt', 'Group', 'Element'])
242+ tokenizer = SmartTokenizer('HTMLFieldSetElement')
243+ self.assertEqual(tokenizer.tokenize(), ['HTML', 'Field', 'Set', 'Element'])
244+ tokenizer = SmartTokenizer('HTMLTextAreaElement')
245+ self.assertEqual(tokenizer.tokenize(), ['HTML', 'Text', 'Area', 'Element'])
246+
247+ tokenizer = SmartTokenizer('Path2D')
248+ self.assertEqual(tokenizer.tokenize(), ['Path', '2D'])
249+ tokenizer = SmartTokenizer('Point2D')
250+ self.assertEqual(tokenizer.tokenize(), ['Point', '2D'])
251+ tokenizer = SmartTokenizer('CanvasRenderingContext2DState')
252+ self.assertEqual(tokenizer.tokenize(), ['Canvas', 'Rendering', 'Context', '2D', 'State'])
253+
254+ tokenizer = SmartTokenizer('RTCDTMFSender')
255+ self.assertEqual(tokenizer.tokenize(), ['RTC', 'DTMF', 'Sender'])
256+
257+ tokenizer = SmartTokenizer('WebGLCompressedTextureS3TCsRGB')
258+ self.assertEqual(tokenizer.tokenize(), ['WebGL', 'Compressed', 'Texture', 'S3TC', 'sRGB'])
259+ tokenizer = SmartTokenizer('WebGL2CompressedTextureETC1')
260+ self.assertEqual(tokenizer.tokenize(), ['WebGL2', 'Compressed', 'Texture', 'ETC1'])
261+ tokenizer = SmartTokenizer('EXTsRGB')
262+ self.assertEqual(tokenizer.tokenize(), ['EXT', 'sRGB'])
263+
264+ tokenizer = SmartTokenizer('SVGFEBlendElement')
265+ self.assertEqual(tokenizer.tokenize(), ['SVG', 'FE', 'Blend', 'Element'])
266+ tokenizer = SmartTokenizer('SVGMPathElement')
267+ self.assertEqual(tokenizer.tokenize(), ['SVG', 'MPath', 'Element'])
268+ tokenizer = SmartTokenizer('SVGTSpanElement')
269+ self.assertEqual(tokenizer.tokenize(), ['SVG', 'TSpan', 'Element'])
270+ tokenizer = SmartTokenizer('SVGURIReference')
271+ self.assertEqual(tokenizer.tokenize(), ['SVG', 'URI', 'Reference'])
272+
273+ tokenizer = SmartTokenizer('UTF16TextIterator')
274+ self.assertEqual(tokenizer.tokenize(), ['UTF16', 'Text', 'Iterator'])
275+ tokenizer = SmartTokenizer('UTF8Decoder')
276+ self.assertEqual(tokenizer.tokenize(), ['UTF8', 'Decoder'])
277+ tokenizer = SmartTokenizer('Uint8Array')
278+ self.assertEqual(tokenizer.tokenize(), ['Uint8', 'Array'])
279+ tokenizer = SmartTokenizer('DOMWindowBase64')
280+ self.assertEqual(tokenizer.tokenize(), ['DOM', 'Window', 'Base64'])
281+ tokenizer = SmartTokenizer('TextCodecLatin1')
282+ self.assertEqual(tokenizer.tokenize(), ['Text', 'Codec', 'Latin1'])
283+ tokenizer = SmartTokenizer('V8BindingForCore')
284+ self.assertEqual(tokenizer.tokenize(), ['V8', 'Binding', 'For', 'Core'])
285+ tokenizer = SmartTokenizer('V8DOMRect')
286+ self.assertEqual(tokenizer.tokenize(), ['V8', 'DOM', 'Rect'])
287+
288+ tokenizer = SmartTokenizer('V0InsertionPoint')
289+ self.assertEqual(tokenizer.tokenize(), ['V0', 'Insertion', 'Point'])
290+ tokenizer = SmartTokenizer('ShadowDOMV0Test')
291+ self.assertEqual(tokenizer.tokenize(), ['Shadow', 'DOM', 'V0', 'Test'])
292+ tokenizer = SmartTokenizer('ElementShadowV0')
293+ self.assertEqual(tokenizer.tokenize(), ['Element', 'Shadow', 'V0'])
294+ tokenizer = SmartTokenizer('StubChromeClientForSPv2')
295+ self.assertEqual(tokenizer.tokenize(), ['Stub', 'Chrome', 'Client', 'For', 'SPv2'])
296+
297+ tokenizer = SmartTokenizer('SQLiteAuthorizer')
298+ self.assertEqual(tokenizer.tokenize(), ['SQLite', 'Authorizer'])
299+ tokenizer = SmartTokenizer('XPathEvaluator')
300+ self.assertEqual(tokenizer.tokenize(), ['XPath', 'Evaluator'])
301+
302+ tokenizer = SmartTokenizer('IsXHTMLDocument')
303+ self.assertEqual(tokenizer.tokenize(), ['Is', 'XHTML', 'Document'])
304+
305+ tokenizer = SmartTokenizer('Animation.idl')
306+ self.assertEqual(tokenizer.tokenize(), ['Animation', '.idl'])
307+
308+
309+class NameStyleConverterTest(unittest.TestCase):
310+ def test_snake_case(self):
311+ converter = NameStyleConverter('HTMLElement')
312+ self.assertEqual(converter.to_snake_case(), 'html_element')
313+
314+ def test_upper_camel_case(self):
315+ converter = NameStyleConverter('someSuperThing')
316+ self.assertEqual(converter.to_upper_camel_case(), 'SomeSuperThing')
317+
318+ converter = NameStyleConverter('SVGElement')
319+ self.assertEqual(converter.to_upper_camel_case(), 'SVGElement')
320+
321+ def test_macro_case(self):
322+ converter = NameStyleConverter('WebGLBaz2D')
323+ self.assertEqual(converter.to_macro_case(), 'WEBGL_BAZ_2D')
324+
325+ def test_all_cases(self):
326+ converter = NameStyleConverter('SVGScriptElement')
327+ self.assertEqual(converter.to_all_cases(), {
328+ 'snake_case': 'svg_script_element',
329+ 'upper_camel_case': 'SVGScriptElement',
330+ 'macro_case': 'SVG_SCRIPT_ELEMENT',
331+ })
332--- /dev/null
333+++ b/third_party/blink/tools/compile_devtools_frontend.py
334@@ -0,0 +1,20 @@
335+#!/usr/bin/env vpython
336+# Copyright 2017 The Chromium Authors. All rights reserved.
337+# Use of this source code is governed by a BSD-style license that can be
338+# found in the LICENSE file.
339+
340+"""Compile DevTools frontend code with Closure compiler.
341+
342+This script wraps devtools/scripts/compile_frontend.py.
343+DevTools bot kicks this script.
344+"""
345+
346+import os
347+import sys
348+
349+sys.path.append(os.path.join(
350+ os.path.dirname(__file__), '..', '..', 'WebKit', 'Source', 'devtools', 'scripts'))
351+import compile_frontend
352+
353+if __name__ == '__main__':
354+ sys.exit(compile_frontend.main())
355--- /dev/null
356+++ b/third_party/blink/tools/move_blink_source.py
357@@ -0,0 +1,615 @@
358+#!/usr/bin/env vpython
359+# Copyright 2017 The Chromium Authors. All rights reserved.
360+# Use of this source code is governed by a BSD-style license that can be
361+# found in the LICENSE file.
362+
363+"""Tool to move Blink source from third_party/WebKit to third_party/blink.
364+
365+See https://docs.google.com/document/d/1l3aPv1Wx__SpRkdOhvJz8ciEGigNT3wFKv78XiuW0Tw/edit?usp=sharing#heading=h.o225wrxp242h
366+for the details.
367+"""
368+
369+import argparse
370+import logging
371+import os
372+import re
373+import sys
374+from functools import partial
375+
376+# Without abspath(), PathFinder can't find chromium_base correctly.
377+sys.path.append(os.path.abspath(
378+ os.path.join(os.path.dirname(__file__), '..', '..', '..',
379+ 'third_party', 'WebKit', 'Tools', 'Scripts')))
380+from blinkpy.common.name_style_converter import NameStyleConverter
381+from plan_blink_move import plan_blink_move
382+from plan_blink_move import relative_dest
383+from webkitpy.common.checkout.git import Git
384+from webkitpy.common.path_finder import get_chromium_src_dir
385+from webkitpy.common.path_finder import get_scripts_dir
386+from webkitpy.common.system.executive import Executive
387+from webkitpy.common.system.executive import ScriptError
388+from webkitpy.common.system.filesystem import FileSystem
389+
390+_log = logging.getLogger('move_blink_source')
391+
392+
393+class FileType(object):
394+ NONE = 0
395+ BUILD = 1
396+ BLINK_BUILD = 2
397+ OWNERS = 3
398+ DEPS = 4
399+ MOJOM = 5
400+ TYPEMAP = 6
401+ BLINK_BUILD_PY = 7
402+ LAYOUT_TESTS_WITH_MOJOM = 8
403+
404+ @staticmethod
405+ def detect(path):
406+ slash_dir, basename = os.path.split(path)
407+ slash_dir = slash_dir.replace(os.path.sep, '/')
408+ if basename == 'DEPS':
409+ return FileType.DEPS
410+ if basename == 'OWNERS':
411+ return FileType.OWNERS
412+ if basename.endswith('.mojom'):
413+ return FileType.MOJOM
414+ if basename.endswith('.typemap'):
415+ return FileType.TYPEMAP
416+ if basename.endswith('.py') and 'third_party/WebKit/Source/build' in slash_dir:
417+ return FileType.BLINK_BUILD_PY
418+ if basename.endswith(('.gn', '.gni')):
419+ if 'third_party/WebKit' in path or 'third_party/blink' in slash_dir:
420+ return FileType.BLINK_BUILD
421+ if 'third_party' in slash_dir:
422+ return FileType.NONE
423+ return FileType.BUILD
424+ if basename.endswith('.html') and re.search(
425+ r'third_party/WebKit/LayoutTests/(geolocation-api|installedapp|' +
426+ r'media/mediasession|payments|presentation|webshare)', slash_dir):
427+ return FileType.LAYOUT_TESTS_WITH_MOJOM
428+ return FileType.NONE
429+
430+
431+class MoveBlinkSource(object):
432+
433+ def __init__(self, fs, options, repo_root):
434+ self._fs = fs
435+ self._options = options
436+ _log.debug(options)
437+ self._repo_root = repo_root
438+
439+ # The following fields are initialized in _create_basename_maps.
440+ self._basename_map = None
441+ self._basename_re = None
442+ self._idl_generated_impl_headers = None
443+ # _checked_in_header_re is used to distinguish checked-in header files
444+ # and generated header files.
445+ self._checked_in_header_re = None
446+
447+ self._updated_files = []
448+
449+ def update(self, apply_only=None):
450+ """Updates contents of files affected by Blink source move.
451+
452+ Args:
453+ apply_only: If it's None, updates all affected files. Otherwise,
454+ it should be a set of file paths and this function updates
455+ only the files in |apply_only|.
456+ """
457+ _log.info('Planning renaming ...')
458+ file_pairs = plan_blink_move(self._fs, [])
459+ _log.info('Will move %d files', len(file_pairs))
460+
461+ self._create_basename_maps(file_pairs)
462+ dirs = self._update_file_content(apply_only)
463+
464+ # Updates #includes in files in directories with updated DEPS +
465+ # third_party/WebKit/{Source,common,public}.
466+ self._append_unless_upper_dir_exists(dirs, self._fs.join(self._repo_root, 'third_party', 'WebKit', 'Source'))
467+ self._append_unless_upper_dir_exists(dirs, self._fs.join(self._repo_root, 'third_party', 'WebKit', 'common'))
468+ self._append_unless_upper_dir_exists(dirs, self._fs.join(self._repo_root, 'third_party', 'WebKit', 'public'))
469+ self._append_unless_upper_dir_exists(dirs, self._fs.join(self._repo_root, 'mojo', 'public', 'tools',
470+ 'bindings', 'generators', 'cpp_templates'))
471+ self._update_cpp_includes_in_directories(dirs, apply_only)
472+
473+ # Content update for individual files.
474+ # The following is a list of tuples.
475+ # Tuple: (<file path relative to repo root>, [replacement commands])
476+ # Command: a callable object, or
477+ # a tuple of (<original string>, <new string>).
478+ file_replacement_list = [
479+ ('DEPS',
480+ [('src/third_party/WebKit/Source/devtools',
481+ 'src/third_party/blink/renderer/devtools')]),
482+ ('WATCHLISTS',
483+ [('third_party/WebKit/Source', 'third_party/blink/renderer'),
484+ ('third_party/WebKit/public', 'third_party/blink/renderer/public')]),
485+ ('build/check_gn_headers_whitelist.txt',
486+ [('third_party/WebKit/Source', 'third_party/blink/renderer'),
487+ ('third_party/WebKit/public', 'third_party/blink/renderer/public'),
488+ self._update_basename]),
489+ ('testing/buildbot/gn_isolate_map.pyl',
490+ [('third_party/WebKit/Source', 'third_party/blink/renderer')]),
491+ ('third_party/WebKit/Source/BUILD.gn',
492+ [('$root_gen_dir/third_party/WebKit',
493+ '$root_gen_dir/third_party/blink/renderer')]),
494+ ('third_party/WebKit/Source/config.gni',
495+ [('snake_case_source_files = false',
496+ 'snake_case_source_files = true')]),
497+ ('third_party/WebKit/Source/core/css/CSSProperties.json5',
498+ [self._update_basename]),
499+ ('third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5',
500+ [self._update_basename]),
501+ ('third_party/WebKit/Source/core/css/ComputedStyleFieldAliases.json5',
502+ [self._update_basename]),
503+ ('third_party/WebKit/Source/core/html/parser/create-html-entity-table',
504+ [self._update_basename]),
505+ ('third_party/WebKit/Source/core/inspector/inspector_protocol_config.json',
506+ [self._update_basename]),
507+ ('third_party/WebKit/Source/core/probe/CoreProbes.json5',
508+ [self._update_basename]),
509+ ('third_party/WebKit/Source/core/testing/InternalSettings.h',
510+ [('InternalSettingsGenerated.h', 'internal_settings_generated.h')]),
511+ ('third_party/WebKit/Source/core/testing/Internals.cpp',
512+ [('InternalRuntimeFlags.h', 'internal_runtime_flags.h')]),
513+ ('third_party/WebKit/Source/platform/probe/PlatformProbes.json5',
514+ [self._update_basename]),
515+ ('third_party/WebKit/public/BUILD.gn',
516+ [('$root_gen_dir/third_party/WebKit',
517+ '$root_gen_dir/third_party/blink/renderer')]),
518+ ('third_party/WebKit/public/blink_resources.grd',
519+ [('../Source/', '../')]),
520+ ('tools/android/eclipse/.classpath',
521+ [('third_party/WebKit/public', 'third_party/blink/renderer/public')]),
522+ ('tools/android/loading/cloud/backend/deploy.sh',
523+ [('third_party/WebKit/Source', 'third_party/blink/renderer')]),
524+ ('tools/android/loading/emulation_unittest.py',
525+ [('third_party/WebKit/Source', 'third_party/blink/renderer')]),
526+ ('tools/android/loading/options.py',
527+ [('third_party/WebKit/Source', 'third_party/blink/renderer')]),
528+ ('tools/android/loading/request_track.py',
529+ [('third_party/WebKit/Source', 'third_party/blink/renderer')]),
530+ ('tools/gritsettings/resource_ids',
531+ [('third_party/WebKit/public', 'third_party/blink/renderer/public'),
532+ ('third_party/WebKit/Source', 'third_party/blink/renderer')]),
533+ ('tools/metrics/actions/extract_actions.py',
534+ [('third_party/WebKit/Source', 'third_party/blink/renderer')]),
535+ ('tools/metrics/histograms/update_editor_commands.py',
536+ [('third_party/WebKit/Source/core/editing/EditorCommand.cpp',
537+ 'third_party/blink/renderer/core/editing/editor_command.cc')]),
538+ ('tools/metrics/histograms/update_use_counter_css.py',
539+ [('third_party/WebKit/Source/core/frame/UseCounter.cpp',
540+ 'third_party/blink/renderer/core/frame/use_counter.cc')]),
541+ ('tools/metrics/histograms/update_use_counter_feature_enum.py',
542+ [('third_party/WebKit/public', 'third_party/blink/renderer/public')]),
543+ ]
544+ for file_path, replacement_list in file_replacement_list:
545+ if not apply_only or file_path in apply_only:
546+ self._update_single_file_content(file_path, replacement_list, should_write=self._options.run)
547+
548+ if self._options.run:
549+ _log.info('Formatting updated %d files ...', len(self._updated_files))
550+ git = Git(cwd=self._repo_root)
551+ # |git cl format| can't handle too many files at once.
552+ while len(self._updated_files) > 0:
553+ end_index = 100
554+ if end_index > len(self._updated_files):
555+ end_index = len(self._updated_files)
556+ git.run(['cl', 'format'] + self._updated_files[:end_index])
557+ self._updated_files = self._updated_files[end_index:]
558+
559+ if not apply_only:
560+ _log.info('Make a local commit ...')
561+ git.commit_locally_with_message("""The Great Blink mv for source files, part 1.
562+
563+Update file contents without moving files.
564+
565+NOAUTOREVERT=true
566+Bug: 768828
567+""")
568+
569+ def move(self, apply_only=None):
570+ """Move Blink source files.
571+
572+ Args:
573+ apply_only: If it's None, move all affected files. Otherwise,
574+ it should be a set of file paths and this function moves
575+ only the files in |apply_only|.
576+ """
577+ _log.info('Planning renaming ...')
578+ file_pairs = plan_blink_move(self._fs, [])
579+
580+ if apply_only:
581+ file_pairs = [(src, dest) for (src, dest) in file_pairs
582+ if 'third_party/WebKit/' + src.replace('\\', '/') in apply_only]
583+ print 'Update file_pairs = ', file_pairs
584+ _log.info('Will move %d files', len(file_pairs))
585+
586+ git = Git(cwd=self._repo_root)
587+ files_set = self._get_checked_in_files(git)
588+ for i, (src, dest) in enumerate(file_pairs):
589+ src_from_repo = self._fs.join('third_party', 'WebKit', src)
590+ if src_from_repo.replace('\\', '/') not in files_set:
591+ _log.info('%s is not in the repository', src)
592+ continue
593+ dest_from_repo = self._fs.join('third_party', 'blink', dest)
594+ self._fs.maybe_make_directory(self._repo_root, 'third_party', 'blink', self._fs.dirname(dest))
595+ if self._options.run_git:
596+ git.move(src_from_repo, dest_from_repo)
597+ _log.info('[%d/%d] Git moved %s', i + 1, len(file_pairs), src)
598+ else:
599+ self._fs.move(self._fs.join(self._repo_root, src_from_repo),
600+ self._fs.join(self._repo_root, dest_from_repo))
601+ _log.info('[%d/%d] Moved %s', i + 1, len(file_pairs), src)
602+ if apply_only:
603+ return
604+
605+ self._update_single_file_content(
606+ 'build/get_landmines.py',
607+ [('\ndef main', ' print \'The Great Blink mv for source files (crbug.com/768828)\'\n\ndef main')])
608+
609+ _log.info('Run run-bindings-tests ...')
610+ Executive().run_command(['python',
611+ self._fs.join(get_scripts_dir(), 'run-bindings-tests'),
612+ '--reset-results'],
613+ cwd=self._repo_root)
614+
615+ if self._options.run_git:
616+ _log.info('Make a local commit ...')
617+ git.commit_locally_with_message("""The Great Blink mv for source files, part 2.
618+
619+Move and rename files.
620+
621+NOAUTOREVERT=true
622+Bug: 768828
623+""")
624+
625+ def fix_branch(self):
626+ git = Git(cwd=self._repo_root)
627+ status = self._get_local_change_status(git)
628+ if len(status) == 0:
629+ _log.info('No local changes.')
630+ return
631+ modified_files = {f for (s, f) in status if s != 'D'}
632+ deleted_files = {f for (s, f) in status if s == 'D'}
633+
634+ self.update(apply_only=modified_files)
635+ self.move(apply_only=modified_files)
636+ try:
637+ git.commit_locally_with_message('This commit should be squashed.')
638+ except ScriptError:
639+ _log.info('move_blink_source.py modified nothing.')
640+
641+ # TODO(tkent): Show a message about deleted_files.
642+
643+ def _get_local_change_status(self, git):
644+ """Returns a list of tuples representing local change summary.
645+
646+ Each tuple contains two strings. The first one is file change status
647+ such as "M", "D". See --diff-filter section of git-diff manual page.
648+ The second one is file name relative to the repository top.
649+ """
650+
651+ base_commit = git.run(['show-branch', '--merge-base', 'master', 'HEAD']).strip()
652+ # Note that file names in the following command result are always
653+ # slash-separated, even on Windows.
654+ status_lines = git.run(['diff', '--name-status', '--no-renames', base_commit]).split('\n')
655+ status_tuple_list = []
656+ for l in status_lines:
657+ items = l.split('\t')
658+ if len(items) == 2:
659+ status_tuple_list.append(tuple(items))
660+ elif len(l) > 0:
661+ _log.warning('Unrecognized diff output: "%s"', l)
662+ return status_tuple_list
663+
664+ def _get_checked_in_files(self, git):
665+ files_text = git.run(['ls-files',
666+ 'third_party/WebKit/Source',
667+ 'third_party/WebKit/common',
668+ 'third_party/WebKit/public'])
669+ return set(files_text.split('\n'))
670+
671+ def _create_basename_maps(self, file_pairs):
672+ basename_map = {}
673+ # Generated inspector/protocol/* contains a lot of names duplicated with
674+ # checked-in core files. We don't want to rename them, and don't want to
675+ # replace them in BUILD.gn and #include accidentally.
676+ pattern = r'(?<!inspector/protocol/)\b('
677+ idl_headers = set()
678+ header_pattern = r'(?<!inspector/protocol/)\b('
679+ for source, dest in file_pairs:
680+ _, source_base = self._fs.split(source)
681+ _, dest_base = self._fs.split(dest)
682+ # OriginTrialFeaturesForCore.h in bindings/tests/results/modules/
683+ # confuses generated/checked-in detection in _replace_include_path().
684+ if 'bindings/tests' in source.replace('\\', '/'):
685+ continue
686+ if source_base.endswith('.h'):
687+ header_pattern += re.escape(source_base) + '|'
688+ if source_base == dest_base:
689+ continue
690+ basename_map[source_base] = dest_base
691+ pattern += re.escape(source_base) + '|'
692+ # IDL sometimes generates implementation files as well as
693+ # binding files. We'd like to update #includes for such files.
694+ if source_base.endswith('.idl'):
695+ source_header = source_base.replace('.idl', '.h')
696+ basename_map[source_header] = dest_base.replace('.idl', '.h')
697+ pattern += re.escape(source_header) + '|'
698+ idl_headers.add(source_header)
699+ _log.info('Rename %d files for snake_case', len(basename_map))
700+ self._basename_map = basename_map
701+ self._basename_re = re.compile(pattern[0:len(pattern) - 1] + ')(?=["\']|$)')
702+ self._idl_generated_impl_headers = idl_headers
703+ self._checked_in_header_re = re.compile(header_pattern[0:len(header_pattern) - 1] + ')$')
704+
705+ def _shorten_path(self, path):
706+ if path.startswith(self._repo_root):
707+ return path[len(self._repo_root) + 1:]
708+ return path
709+
710+ @staticmethod
711+ def _filter_file(fs, dirname, basename):
712+ return FileType.detect(fs.join(dirname, basename)) != FileType.NONE
713+
714+ def _update_build(self, content):
715+ content = content.replace('//third_party/WebKit/Source', '//third_party/blink/renderer')
716+ content = content.replace('//third_party/WebKit/common', '//third_party/blink/common')
717+ content = content.replace('//third_party/WebKit/public', '//third_party/blink/renderer/public')
718+ # export_header_blink exists outside of Blink too.
719+ content = content.replace('export_header_blink = "third_party/WebKit/public/platform/WebCommon.h"',
720+ 'export_header_blink = "third_party/blink/renderer/public/platform/web_common.h"')
721+ return content
722+
723+ def _update_blink_build(self, content):
724+ content = self._update_build(content)
725+
726+ # Update visibility=[...]
727+ content = content.replace('//third_party/WebKit/*', '//third_party/blink/*')
728+ content = content.replace('//third_party/WebKit/Source/*', '//third_party/blink/renderer/*')
729+ content = content.replace('//third_party/WebKit/public/*', '//third_party/blink/renderer/public/*')
730+
731+ # Update mojom variables
732+ content = content.replace('export_header = "third_party/WebKit/common',
733+ 'export_header = "third_party/blink/common')
734+ content = content.replace('export_header_blink = "third_party/WebKit/Source',
735+ 'export_header_blink = "third_party/blink/renderer')
736+ return self._update_basename(content)
737+
738+ def _update_owners(self, content):
739+ content = content.replace('//third_party/WebKit/Source', '//third_party/blink/renderer')
740+ content = content.replace('//third_party/WebKit/common', '//third_party/blink/common')
741+ content = content.replace('//third_party/WebKit/public', '//third_party/blink/renderer/public')
742+ return content
743+
744+ def _update_deps(self, content):
745+ original_content = content
746+ content = content.replace('third_party/WebKit/Source', 'third_party/blink/renderer')
747+ content = content.replace('third_party/WebKit/common', 'third_party/blink/common')
748+ content = content.replace('third_party/WebKit/public', 'third_party/blink/renderer/public')
749+ content = content.replace('third_party/WebKit', 'third_party/blink')
750+ if original_content == content:
751+ return content
752+ return self._update_basename(content)
753+
754+ def _update_mojom(self, content):
755+ content = content.replace('third_party/WebKit/public', 'third_party/blink/renderer/public')
756+ content = content.replace('third_party/WebKit/common', 'third_party/blink/common')
757+ return content
758+
759+ def _update_typemap(self, content):
760+ content = content.replace('//third_party/WebKit/Source', '//third_party/blink/renderer')
761+ content = content.replace('//third_party/WebKit/common', '//third_party/blink/common')
762+ content = content.replace('//third_party/WebKit/public', '//third_party/blink/renderer/public')
763+ return self._update_basename(content)
764+
765+ def _update_blink_build_py(self, content):
766+ # We don't prepend 'third_party/blink/renderer/' to matched basenames
767+ # because it won't affect build and manual update after the great mv is
768+ # enough.
769+ return self._update_basename(content)
770+
771+ def _update_layout_tests(self, content):
772+ return content.replace('file:///gen/third_party/WebKit/', 'file:///gen/third_party/blink/renderer/')
773+
774+ def _update_basename(self, content):
775+ return self._basename_re.sub(lambda match: self._basename_map[match.group(1)], content)
776+
777+ @staticmethod
778+ def _append_unless_upper_dir_exists(dirs, new_dir):
779+ for i in range(0, len(dirs)):
780+ if new_dir.startswith(dirs[i]):
781+ return
782+ if dirs[i].startswith(new_dir):
783+ dirs[i] = new_dir
784+ return
785+ dirs.append(new_dir)
786+
787+ def _update_file_content(self, apply_only):
788+ _log.info('Find *.gn, *.mojom, *.py, *.typemap, DEPS, and OWNERS ...')
789+ files = self._fs.files_under(
790+ self._repo_root, dirs_to_skip=['.git', 'out'], file_filter=self._filter_file)
791+ _log.info('Scan contents of %d files ...', len(files))
792+ updated_deps_dirs = []
793+ for file_path in files:
794+ file_type = FileType.detect(file_path)
795+ original_content = self._fs.read_text_file(file_path)
796+ content = original_content
797+ if file_type == FileType.BUILD:
798+ content = self._update_build(content)
799+ elif file_type == FileType.BLINK_BUILD:
800+ content = self._update_blink_build(content)
801+ elif file_type == FileType.OWNERS:
802+ content = self._update_owners(content)
803+ elif file_type == FileType.DEPS:
804+ if self._fs.dirname(file_path) == self._repo_root:
805+ _log.info("Skip //DEPS")
806+ continue
807+ content = self._update_deps(content)
808+ elif file_type == FileType.MOJOM:
809+ content = self._update_mojom(content)
810+ elif file_type == FileType.TYPEMAP:
811+ content = self._update_typemap(content)
812+ elif file_type == FileType.BLINK_BUILD_PY:
813+ content = self._update_blink_build_py(content)
814+ elif file_type == FileType.LAYOUT_TESTS_WITH_MOJOM:
815+ content = self._update_layout_tests(content)
816+
817+ if original_content == content:
818+ continue
819+ if self._options.run and (not apply_only or file_path.replace('\\', '/') in apply_only):
820+ self._fs.write_text_file(file_path, content)
821+ self._updated_files.append(file_path)
822+ if file_type == FileType.DEPS:
823+ self._append_unless_upper_dir_exists(updated_deps_dirs, self._fs.dirname(file_path))
824+ _log.info('Updated %s', self._shorten_path(file_path))
825+ return updated_deps_dirs
826+
827+ def _update_cpp_includes_in_directories(self, dirs, apply_only):
828+ for dirname in dirs:
829+ _log.info('Processing #include in %s ...', self._shorten_path(dirname))
830+ files = self._fs.files_under(
831+ dirname, file_filter=lambda fs, _, basename: basename.endswith(
832+ ('.h', '.cc', '.cpp', '.mm', '.cc.tmpl', '.cpp.tmpl',
833+ '.h.tmpl', 'XPathGrammar.y', '.gperf')))
834+ for file_path in files:
835+ posix_file_path = file_path.replace('\\', '/')
836+ original_content = self._fs.read_text_file(file_path)
837+
838+ content = self._update_cpp_includes(original_content)
839+ if file_path.endswith('.h') and '/third_party/WebKit/public/' in posix_file_path:
840+ content = self._update_basename_only_includes(content, file_path)
841+ if file_path.endswith('.h') and '/third_party/WebKit/' in posix_file_path:
842+ content = self._update_include_guard(content, file_path)
843+
844+ if original_content == content:
845+ continue
846+ if self._options.run and (not apply_only or posix_file_path in apply_only):
847+ self._fs.write_text_file(file_path, content)
848+ self._updated_files.append(file_path)
849+ _log.info('Updated %s', self._shorten_path(file_path))
850+
851+ def _replace_include_path(self, match):
852+ include_or_import = match.group(1)
853+ path = match.group(2)
854+
855+ # If |path| starts with 'third_party/WebKit', we should adjust the
856+ # directory name for third_party/blink, and replace its basename by
857+ # self._basename_map.
858+ #
859+ # If |path| starts with a Blink-internal directory such as bindings,
860+ # core, modules, platform, public, it refers to a checked-in file, or a
861+ # generated file. For the former, we should add
862+ # 'third_party/blink/renderer/' and replace the basename. For the
863+ # latter, we should update the basename for a name mapped from an IDL
864+ # renaming, and should not add 'third_party/blink/renderer'.
865+
866+ if path.startswith('third_party/WebKit'):
867+ path = path.replace('third_party/WebKit/Source', 'third_party/blink/renderer')
868+ path = path.replace('third_party/WebKit/common', 'third_party/blink/common')
869+ path = path.replace('third_party/WebKit/public', 'third_party/blink/renderer/public')
870+ path = self._update_basename(path)
871+ return '#%s "%s"' % (include_or_import, path)
872+
873+ match = self._checked_in_header_re.search(path)
874+ if match:
875+ if match.group(1) in self._basename_map:
876+ path = 'third_party/blink/renderer/' + path[:match.start(1)] + self._basename_map[match.group(1)]
877+ else:
878+ path = 'third_party/blink/renderer/' + path
879+ elif 'core/inspector/protocol/' not in path:
880+ basename_start = path.rfind('/') + 1
881+ basename = path[basename_start:]
882+ if basename in self._idl_generated_impl_headers:
883+ path = path[:basename_start] + self._basename_map[basename]
884+ elif basename.startswith('V8'):
885+ path = path[:basename_start] + NameStyleConverter(basename[:len(basename) - 2]).to_snake_case() + '.h'
886+ return '#%s "%s"' % (include_or_import, path)
887+
888+ def _update_cpp_includes(self, content):
889+ pattern = re.compile(r'#(include|import)\s+"((bindings|core|modules|platform|public|' +
890+ r'third_party/WebKit/(Source|common|public))/[-_\w/.]+)"')
891+ return pattern.sub(self._replace_include_path, content)
892+
893+ def _replace_basename_only_include(self, subdir, source_path, match):
894+ source_basename = match.group(1)
895+ if source_basename in self._basename_map:
896+ return '#include "third_party/blink/renderer/public/%s/%s"' % (subdir, self._basename_map[source_basename])
897+ _log.warning('Basename-only %s in %s', match.group(0), self._shorten_path(source_path))
898+ return match.group(0)
899+
900+ def _update_basename_only_includes(self, content, source_path):
901+ if not source_path.endswith('.h') or '/third_party/WebKit/public/' not in source_path.replace('\\', '/'):
902+ return
903+ # In public/ header files, we should replace |#include "WebFoo.h"|
904+ # with |#include "third_party/blink/renderer/public/platform-or-web/web_foo.h"|
905+ subdir = self._fs.basename(self._fs.dirname(source_path))
906+ # subdir is 'web' or 'platform'.
907+ return re.sub(r'#include\s+"(\w+\.h)"',
908+ partial(self._replace_basename_only_include, subdir, source_path), content)
909+
910+ def _update_include_guard(self, content, source_path):
911+ current_guard = re.sub(r'[.]', '_', self._fs.basename(source_path))
912+ new_path = relative_dest(self._fs, self._fs.relpath(
913+ source_path, start=self._fs.join(self._repo_root, 'third_party', 'WebKit')))
914+ new_guard = 'THIRD_PARTY_BLINK_' + re.sub(r'[\\/.]', '_', new_path.upper()) + '_'
915+ content = re.sub(r'#ifndef\s+(WTF_)?' + current_guard, '#ifndef ' + new_guard, content);
916+ content = re.sub(r'#define\s+(WTF_)?' + current_guard, '#define ' + new_guard, content);
917+ content = re.sub(r'#endif\s+//\s+(WTF_)?' + current_guard, '#endif // ' + new_guard, content);
918+ return content
919+
920+ def _update_single_file_content(self, file_path, replace_list, should_write=True):
921+ full_path = self._fs.join(self._repo_root, file_path)
922+ original_content = self._fs.read_text_file(full_path)
923+ content = original_content
924+ for command in replace_list:
925+ if isinstance(command, tuple):
926+ src, dest = command
927+ content = content.replace(src, dest)
928+ elif callable(command):
929+ content = command(content)
930+ else:
931+ raise TypeError('A tuple or a function is expected.')
932+ if content != original_content:
933+ if should_write:
934+ self._fs.write_text_file(full_path, content)
935+ self._updated_files.append(full_path)
936+ _log.info('Updated %s', file_path)
937+ else:
938+ _log.warning('%s does not contain specified source strings.', file_path)
939+
940+
941+def main():
942+ logging.basicConfig(level=logging.DEBUG,
943+ format='[%(asctime)s %(levelname)s %(name)s] %(message)s',
944+ datefmt='%H:%M:%S')
945+ parser = argparse.ArgumentParser(description='Blink source mover')
946+ sub_parsers = parser.add_subparsers()
947+
948+ update_parser = sub_parsers.add_parser('update')
949+ update_parser.set_defaults(command='update')
950+ update_parser.add_argument('--run', dest='run', action='store_true',
951+ help='Update file contents')
952+
953+ move_parser = sub_parsers.add_parser('move')
954+ move_parser.set_defaults(command='move')
955+ move_parser.add_argument('--git', dest='run_git', action='store_true',
956+ help='Run |git mv| command instead of |mv|.')
957+
958+ fixbranch_parser = sub_parsers.add_parser('fixbranch')
959+ fixbranch_parser.set_defaults(command='fixbranch', run=True, run_git=True)
960+
961+ options = parser.parse_args()
962+ mover = MoveBlinkSource(FileSystem(), options, get_chromium_src_dir())
963+ if options.command == 'update':
964+ mover.update()
965+ elif options.command == 'move':
966+ mover.move()
967+ elif options.command == 'fixbranch':
968+ mover.fix_branch()
969+
970+
971+if __name__ == '__main__':
972+ main()
973--- /dev/null
974+++ b/third_party/blink/tools/plan_blink_move.py
975@@ -0,0 +1,96 @@
976+#!/usr/bin/env vpython
977+# Copyright 2017 The Chromium Authors. All rights reserved.
978+# Use of this source code is governed by a BSD-style license that can be
979+# found in the LICENSE file.
980+
981+import os
982+import re
983+import sys
984+
985+sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', '..',
986+ 'third_party', 'WebKit', 'Tools', 'Scripts'))
987+from blinkpy.common.name_style_converter import NameStyleConverter
988+from webkitpy.common.system.filesystem import FileSystem
989+
990+
991+def relative_dest(fs, filename):
992+ """Returns a destination path string for given filename.
993+
994+ |filename| is a path relative to third_party/WebKit, and the resultant path
995+ is relative to third_party/blink.
996+ """
997+ dest = None
998+ if filename.startswith('public'):
999+ dest = re.sub(r'^public', 'renderer' + fs.sep + 'public', filename)
1000+ elif filename.startswith('Source'):
1001+ dest = re.sub(r'^Source', 'renderer', filename)
1002+ elif filename.startswith('common'):
1003+ dest = filename
1004+ else:
1005+ raise ValueError('|filename| must start with "common", "public", or "Source": %s' % filename)
1006+ if filename.endswith(('.h', '.cpp', '.mm', '.idl', '.typemap', 'Settings.json5')):
1007+ dirname, basename = fs.split(dest)
1008+ basename, ext = fs.splitext(basename)
1009+ # Skip some inspector-related files. #includes for these files are
1010+ # generated by a script outside of Blink.
1011+ if (re.match(r'Inspector.*Agent', basename)
1012+ or basename == 'InspectorTraceEvents'
1013+ or basename == 'PerformanceMonitor'
1014+ or basename == 'PlatformTraceEventsAgent'):
1015+ return dest
1016+ # Skip CSSProperty*. Some files are generated, and some files are
1017+ # checked-in. It's hard to handle them automatically.
1018+ if re.search(r'css[\\/]properties$', dirname):
1019+ return dest
1020+ if filename.endswith('.cpp'):
1021+ ext = '.cc'
1022+ # WebKit.h should be renamed to blink.h.
1023+ if basename == 'WebKit' and ext == '.h':
1024+ basename = 'blink'
1025+ if basename.lower() != basename:
1026+ basename = NameStyleConverter(basename).to_snake_case()
1027+ return fs.join(dirname, basename + ext)
1028+ return dest
1029+
1030+
1031+def start_with_list(name, prefixes):
1032+ if len(prefixes) == 0:
1033+ return True
1034+ for prefix in prefixes:
1035+ if name.startswith(prefix):
1036+ return True
1037+ return False
1038+
1039+
1040+def plan_blink_move(fs, prefixes):
1041+ """Returns (source, dest) path pairs.
1042+
1043+ The source paths are relative to third_party/WebKit,
1044+ and the dest paths are relative to third_party/blink.
1045+ The paths use os.sep as the path part separator.
1046+ """
1047+ blink_dir = fs.join(fs.dirname(__file__), '..')
1048+ webkit_dir = fs.join(blink_dir, '..', '..', 'third_party', 'WebKit')
1049+ source_files = fs.files_under(fs.join(webkit_dir, 'Source'))
1050+ source_files += fs.files_under(fs.join(webkit_dir, 'common'))
1051+ source_files += fs.files_under(fs.join(webkit_dir, 'public'))
1052+
1053+ # It's possible to check git.exists() here, but we don't do it due to slow
1054+ # performance. We should check it just before executing git command.
1055+
1056+ source_files = [f[len(webkit_dir) + 1:] for f in source_files]
1057+ return [(f, relative_dest(fs, f)) for f in source_files
1058+ if f.find('node_modules') == -1 and start_with_list(f, prefixes)]
1059+
1060+
1061+def main():
1062+ fs = FileSystem()
1063+ file_pairs = plan_blink_move(fs, sys.argv[1:])
1064+ print 'Show renaming plan. It contains files not in the repository.'
1065+ print '<Source path relative to third_party/WebKit> => <Destination path relative to third_party/blink>'
1066+ for pair in file_pairs:
1067+ print '%s\t=>\t%s' % pair
1068+
1069+
1070+if __name__ == '__main__':
1071+ main()
diff --git a/community/chromium/chromium-73-gcc-1.patch b/community/chromium/chromium-73-gcc-1.patch
deleted file mode 100644
index d7b5793ad4..0000000000
--- a/community/chromium/chromium-73-gcc-1.patch
+++ /dev/null
@@ -1,99 +0,0 @@
1From 130a5ae24a02daba8729ba2216bcaf3dbfacea69 Mon Sep 17 00:00:00 2001
2From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
3Date: Fri, 8 Feb 2019 16:58:38 +0000
4Subject: [PATCH] media::learning: Make LabelledExample's move assignment
5 operator noexcept
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10The GCC build is currently broken with an error like this:
11
12 ../../media/learning/common/labelled_example.cc:20:1: error: function ‘media::learning::LabelledExample::LabelledExample(media::learning::LabelledExample&&)’ defaulted on its redeclaration with an exception-specification that differs from the implicit exception-specification ‘’
13 LabelledExample::LabelledExample(LabelledExample&& rhs) noexcept = default;
14 ^~~~~~~~~~~~~~~
15
16With GCC, having that noexcept marker requires all members to be marked with
17noexcept themselves, and TargetValue was missing some assignment operators
18and noexcept markers.
19
20clang is fine because we pass -fno-exceptions and it disables the same error
21there, while GCC continues to raise it (bug 843143 and its corresponding CL
22have a longer discussion on this issue).
23
24Bug: 819294
25Change-Id: Ide30932fc466ccb52d6883a82777e703dae48798
26Reviewed-on: https://chromium-review.googlesource.com/c/1458210
27Commit-Queue: Frank Liberato <liberato@chromium.org>
28Reviewed-by: Frank Liberato <liberato@chromium.org>
29Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
30Cr-Commit-Position: refs/heads/master@{#630355}
31---
32 media/learning/common/labelled_example.cc | 3 ++-
33 media/learning/common/labelled_example.h | 2 +-
34 media/learning/common/value.cc | 6 ++++++
35 media/learning/common/value.h | 4 ++++
36 4 files changed, 13 insertions(+), 2 deletions(-)
37
38diff --git a/media/learning/common/labelled_example.cc b/media/learning/common/labelled_example.cc
39index 76d08509298e..43e834f9f3cf 100644
40--- ./media/learning/common/labelled_example.cc
41+++ ./media/learning/common/labelled_example.cc
42@@ -59,7 +59,8 @@ bool LabelledExample::operator<(const LabelledExample& rhs) const {
43 LabelledExample& LabelledExample::operator=(const LabelledExample& rhs) =
44 default;
45
46-LabelledExample& LabelledExample::operator=(LabelledExample&& rhs) = default;
47+LabelledExample& LabelledExample::operator=(LabelledExample&& rhs) noexcept =
48+ default;
49
50 TrainingData::TrainingData() = default;
51
52diff --git a/media/learning/common/labelled_example.h b/media/learning/common/labelled_example.h
53index 4f43c54e7a76..365abc3c0ebf 100644
54--- ./media/learning/common/labelled_example.h
55+++ ./media/learning/common/labelled_example.h
56@@ -40,7 +40,7 @@ struct COMPONENT_EXPORT(LEARNING_COMMON) LabelledExample {
57 bool operator<(const LabelledExample& rhs) const;
58
59 LabelledExample& operator=(const LabelledExample& rhs);
60- LabelledExample& operator=(LabelledExample&& rhs);
61+ LabelledExample& operator=(LabelledExample&& rhs) noexcept;
62
63 // Observed feature values.
64 // Note that to interpret these values, you probably need to have the
65diff --git a/media/learning/common/value.cc b/media/learning/common/value.cc
66index 9c9395c25d4e..12ea399d24c3 100644
67--- ./media/learning/common/value.cc
68+++ ./media/learning/common/value.cc
69@@ -23,6 +23,12 @@ Value::Value(const std::string& x) : value_(base::PersistentHash(x)) {}
70
71 Value::Value(const Value& other) : value_(other.value_) {}
72
73+Value::Value(Value&& rhs) noexcept = default;
74+
75+Value& Value::operator=(const Value& rhs) = default;
76+
77+Value& Value::operator=(Value&& rhs) noexcept = default;
78+
79 bool Value::operator==(const Value& rhs) const {
80 return value_ == rhs.value_;
81 }
82diff --git a/media/learning/common/value.h b/media/learning/common/value.h
83index 0e64da961f34..62f4953f691c 100644
84--- ./media/learning/common/value.h
85+++ ./media/learning/common/value.h
86@@ -38,6 +38,10 @@ class COMPONENT_EXPORT(LEARNING_COMMON) Value {
87 explicit Value(const std::string& x);
88
89 Value(const Value& other);
90+ Value(Value&&) noexcept;
91+
92+ Value& operator=(const Value&);
93+ Value& operator=(Value&&) noexcept;
94
95 bool operator==(const Value& rhs) const;
96 bool operator!=(const Value& rhs) const;
97--
982.20.1
99
diff --git a/community/chromium/chromium-73-gcc-2.patch b/community/chromium/chromium-73-gcc-2.patch
deleted file mode 100644
index facd3fcfa2..0000000000
--- a/community/chromium/chromium-73-gcc-2.patch
+++ /dev/null
@@ -1,51 +0,0 @@
1From a5ba6f9bb7665040045dc0f8087407096630ad7b Mon Sep 17 00:00:00 2001
2From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
3Date: Fri, 8 Feb 2019 02:57:28 +0000
4Subject: [PATCH] color_utils: Use std::sqrt() instead of std::sqrtf()
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9This fixes the build with libstdc++:
10
11 ../../ui/gfx/color_utils.cc: In function ‘SkColor color_utils::SetDarkestColorForTesting(SkColor)’:
12 ../../ui/gfx/color_utils.cc:434:12: error: ‘sqrtf’ is not a member of ‘std’
13 std::sqrtf((dark_luminance + 0.05f) * (kWhiteLuminance + 0.05f)) - 0.05f;
14 ^~~~~
15 ../../ui/gfx/color_utils.cc:434:12: note: suggested alternative: ‘sqrt’
16 std::sqrtf((dark_luminance + 0.05f) * (kWhiteLuminance + 0.05f)) - 0.05f;
17 ^~~~~
18 sqrt
19
20sqrtf() is not formally part of C++14 as far as I can see even though libc++
21has it in <cmath>. Additionally, we're only dealing with floats in all parts
22of the expression above, so using the float sqrt() overload should be
23harmless anyway.
24
25Bug: 819294
26Change-Id: If6c7bf31819df97a761e6963def6d6506154c34d
27Reviewed-on: https://chromium-review.googlesource.com/c/1458193
28Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
29Reviewed-by: Peter Kasting <pkasting@chromium.org>
30Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
31Cr-Commit-Position: refs/heads/master@{#630140}
32---
33 ui/gfx/color_utils.cc | 2 +-
34 1 file changed, 1 insertion(+), 1 deletion(-)
35
36diff --git a/ui/gfx/color_utils.cc b/ui/gfx/color_utils.cc
37index c868cd54bac3..92ba1407d594 100644
38--- ./ui/gfx/color_utils.cc
39+++ ./ui/gfx/color_utils.cc
40@@ -431,7 +431,7 @@ SkColor SetDarkestColorForTesting(SkColor color) {
41 // GetContrastRatio(kWhiteLuminance, g_luminance_midpoint). The formula below
42 // can be verified by plugging it into how GetContrastRatio() operates.
43 g_luminance_midpoint =
44- std::sqrtf((dark_luminance + 0.05f) * (kWhiteLuminance + 0.05f)) - 0.05f;
45+ std::sqrt((dark_luminance + 0.05f) * (kWhiteLuminance + 0.05f)) - 0.05f;
46
47 return previous_darkest_color;
48 }
49--
502.20.1
51
diff --git a/community/chromium/chromium-73-gcc-3.patch b/community/chromium/chromium-73-gcc-3.patch
deleted file mode 100644
index 73ab49c542..0000000000
--- a/community/chromium/chromium-73-gcc-3.patch
+++ /dev/null
@@ -1,69 +0,0 @@
1From c33e832cc145c696d2157796c7640e659740dafa Mon Sep 17 00:00:00 2001
2From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
3Date: Fri, 8 Feb 2019 08:44:00 +0000
4Subject: [PATCH] quic_flags_impl: Fix GCC build after #618558
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84849, having
10base::NoDestructor<T<U>> and passing an initializer list of Us does not
11work if this is not done explicitly, as GCC incorrectly fails to determine
12which constructor overload to use:
13
14 ../../net/third_party/quic/platform/impl/quic_flags_impl.cc: In member function ‘bool quic::TypedQuicFlagHelper<T>::SetFlag(const string&) const [with T = bool; std::__cxx11::string = std::__cxx11::basic_string<char>]’:
15 ../../net/third_party/quic/platform/impl/quic_flags_impl.cc:156:41: error: call of overloaded ‘NoDestructor(<brace-enclosed initializer list>)’ is ambiguous
16 {"", "1", "t", "true", "y", "yes"});
17 ^
18 In file included from ../../net/third_party/quic/platform/impl/quic_flags_impl.h:16,
19 from ../../net/third_party/quic/platform/impl/quic_flags_impl.cc:5:
20 ../../base/no_destructor.h:62:3: note: candidate: ‘base::NoDestructor<T>::NoDestructor(const base::NoDestructor<T>&) [with T = std::set<std::__cxx11::basic_string<char> >]’ <deleted>
21 NoDestructor(const NoDestructor&) = delete;
22 ^~~~~~~~~~~~
23 ../../base/no_destructor.h:60:12: note: candidate: ‘base::NoDestructor<T>::NoDestructor(T&&) [with T = std::set<std::__cxx11::basic_string<char> >]’
24 explicit NoDestructor(T&& x) { new (storage_) T(std::move(x)); }
25 ^~~~~~~~~~~~
26 ../../base/no_destructor.h:59:12: note: candidate: ‘base::NoDestructor<T>::NoDestructor(const T&) [with T = std::set<std::__cxx11::basic_string<char> >]’
27 explicit NoDestructor(const T& x) { new (storage_) T(x); }
28 ^~~~~~~~~~~~
29
30Explicitly use an std::initializer_list to make the build work everywhere.
31
32Bug: 819294
33Change-Id: I775be20e3766a88a656b58c94c40869cb1bee2a8
34Reviewed-on: https://chromium-review.googlesource.com/c/1458214
35Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
36Reviewed-by: Ryan Hamilton <rch@chromium.org>
37Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
38Cr-Commit-Position: refs/heads/master@{#630249}
39---
40 net/third_party/quic/platform/impl/quic_flags_impl.cc | 5 +++--
41 1 file changed, 3 insertions(+), 2 deletions(-)
42
43diff --git a/net/third_party/quic/platform/impl/quic_flags_impl.cc b/net/third_party/quic/platform/impl/quic_flags_impl.cc
44index 5e6962d1e770..3fa45fc6892d 100644
45--- ./net/third_party/quic/platform/impl/quic_flags_impl.cc
46+++ ./net/third_party/quic/platform/impl/quic_flags_impl.cc
47@@ -5,6 +5,7 @@
48 #include "net/third_party/quic/platform/impl/quic_flags_impl.h"
49
50 #include <algorithm>
51+#include <initializer_list>
52 #include <iostream>
53 #include <set>
54
55@@ -153,9 +154,9 @@ std::string QuicFlagRegistry::GetHelp() const {
56 template <>
57 bool TypedQuicFlagHelper<bool>::SetFlag(const std::string& s) const {
58 static const base::NoDestructor<std::set<std::string>> kTrueValues(
59- {"", "1", "t", "true", "y", "yes"});
60+ std::initializer_list<std::string>({"", "1", "t", "true", "y", "yes"}));
61 static const base::NoDestructor<std::set<std::string>> kFalseValues(
62- {"0", "f", "false", "n", "no"});
63+ std::initializer_list<std::string>({"0", "f", "false", "n", "no"}));
64 if (kTrueValues->find(base::ToLowerASCII(s)) != kTrueValues->end()) {
65 *flag_ = true;
66 return true;
67--
682.20.1
69
diff --git a/community/chromium/chromium-73-gcc-4.patch b/community/chromium/chromium-73-gcc-4.patch
deleted file mode 100644
index be5c668c12..0000000000
--- a/community/chromium/chromium-73-gcc-4.patch
+++ /dev/null
@@ -1,59 +0,0 @@
1From bdd76190e54e6a0e11343dd19e4bf1d06956fa48 Mon Sep 17 00:00:00 2001
2From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
3Date: Wed, 13 Feb 2019 01:02:27 +0000
4Subject: [PATCH] BaseRenderingContext2D: Use base::CheckMul and simplify code
5 in putImageData()
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10Follow-up to commit e0b3253a56 ("Fix image conversion truncation issues").
11The current code does not build with GCC due to
12https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89287:
13
14 ../../third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc: In member function ‘void blink::BaseRenderingContext2D::putImageData(blink::ImageData*, int, int, int, int, int, int, blink::ExceptionState&)’:
15 ../../third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc:1777:44: error: default type conversion can't deduce template argument for ‘template<class Dst, typename std::enable_if<base::internal::IsNumericRangeContained<Dst, long unsigned int, void>::value, void>::type* <anonymous> > constexpr base::internal::StrictNumeric<T>::operator Dst() const [with Dst = Dst; typename std::enable_if<base::internal::IsNumericRangeContained<Dst, T>::value>::type* <anonymous> = <enumerator>; T = long unsigned int]’
16 new uint8_t[data_length.ValueOrDie()]);
17 ^
18
19Work around it by using the more idiomatic base::CheckMul() with
20AssignIfValid, so that we can have |data_length| be a size_t again and not
21leave it to the compiler to figure out the type we want when creating the
22|converted_pixels| array.
23
24Bug: 819294
25Change-Id: Id124cc4f3d749b45def4708e21e4badafd708578
26Reviewed-on: https://chromium-review.googlesource.com/c/1467201
27Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
28Commit-Queue: Kentaro Hara <haraken@chromium.org>
29Reviewed-by: Kentaro Hara <haraken@chromium.org>
30Cr-Commit-Position: refs/heads/master@{#631472}
31---
32 .../canvas/canvas2d/base_rendering_context_2d.cc | 10 +++++-----
33 1 file changed, 5 insertions(+), 5 deletions(-)
34
35diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc b/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc
36index d9fa696c9a9d..34a8a202bfd3 100644
37--- a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc
38+++ ./third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc
39@@ -1769,12 +1769,12 @@ void BaseRenderingContext2D::putImageData(ImageData* data,
40 CanvasColorParams(ColorParams().ColorSpace(), PixelFormat(), kNonOpaque);
41 if (data_color_params.NeedsColorConversion(context_color_params) ||
42 PixelFormat() == kF16CanvasPixelFormat) {
43- base::CheckedNumeric<size_t> data_length = data->Size().Area();
44- data_length *= context_color_params.BytesPerPixel();
45- if (!data_length.IsValid())
46+ size_t data_length;
47+ if (!base::CheckMul(data->Size().Area(),
48+ context_color_params.BytesPerPixel())
49+ .AssignIfValid(&data_length))
50 return;
51- std::unique_ptr<uint8_t[]> converted_pixels(
52- new uint8_t[data_length.ValueOrDie()]);
53+ std::unique_ptr<uint8_t[]> converted_pixels(new uint8_t[data_length]);
54 if (data->ImageDataInCanvasColorSettings(
55 ColorParams().ColorSpace(), PixelFormat(), converted_pixels.get(),
56 kRGBAColorType)) {
57--
582.20.1
59
diff --git a/community/chromium/chromium-73-gcc-5.patch b/community/chromium/chromium-73-gcc-5.patch
deleted file mode 100644
index b0c814180b..0000000000
--- a/community/chromium/chromium-73-gcc-5.patch
+++ /dev/null
@@ -1,65 +0,0 @@
1From 78b0f0dfa9e6f3c37b71102c01def92f1ab8c330 Mon Sep 17 00:00:00 2001
2From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
3Date: Wed, 13 Feb 2019 23:28:46 +0000
4Subject: [PATCH] CastActivityManager: Do not make DoLaunchSessionParams' move
5 constructor noexcept
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10This fixes the GCC build:
11
12 ../../chrome/browser/media/router/providers/cast/cast_activity_manager.cc:806:1: error: function ‘media_router::CastActivityManager::DoLaunchSessionParams::DoLaunchSessionParams(media_router::CastActivityManager::DoLaunchSessionParams&&)’ defaulted on its redeclaration with an exception-specification that differs from the implicit exception-specification ‘’
13 CastActivityManager::DoLaunchSessionParams::DoLaunchSessionParams(
14 ^~~~~~~~~~~~~~~~~~~
15
16With GCC, having that noexcept marker requires all members to be marked with
17noexcept themselves, and MediaRoute, CastMediaSource and url::Origin need
18the right annotations. Just making DoLaunchSessionParams not noexcept is the
19least intrusive solution for now.
20
21clang is fine because we pass -fno-exceptions and it disables the same error
22there, while GCC continues to raise it (bug 843143 and its corresponding CL
23have a longer discussion on this issue).
24
25Bug: 819294
26Change-Id: Ia3a5fb60b5e74e68bd35cfa50e2fcc728b64e5eb
27Reviewed-on: https://chromium-review.googlesource.com/c/1469942
28Commit-Queue: mark a. foltz <mfoltz@chromium.org>
29Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
30Reviewed-by: mark a. foltz <mfoltz@chromium.org>
31Cr-Commit-Position: refs/heads/master@{#631962}
32---
33 .../media/router/providers/cast/cast_activity_manager.cc | 2 +-
34 .../browser/media/router/providers/cast/cast_activity_manager.h | 2 +-
35 2 files changed, 2 insertions(+), 2 deletions(-)
36
37diff --git a/chrome/browser/media/router/providers/cast/cast_activity_manager.cc b/chrome/browser/media/router/providers/cast/cast_activity_manager.cc
38index b7ee9695f69a..8569e0cd30a3 100644
39--- a/chrome/browser/media/router/providers/cast/cast_activity_manager.cc
40+++ ./chrome/browser/media/router/providers/cast/cast_activity_manager.cc
41@@ -804,7 +804,7 @@ CastActivityManager::DoLaunchSessionParams::DoLaunchSessionParams(
42 callback(std::move(callback)) {}
43
44 CastActivityManager::DoLaunchSessionParams::DoLaunchSessionParams(
45- DoLaunchSessionParams&& other) noexcept = default;
46+ DoLaunchSessionParams&& other) = default;
47
48 CastActivityManager::DoLaunchSessionParams::~DoLaunchSessionParams() = default;
49
50diff --git a/chrome/browser/media/router/providers/cast/cast_activity_manager.h b/chrome/browser/media/router/providers/cast/cast_activity_manager.h
51index 325bffc725ee..08fe0ccca603 100644
52--- a/chrome/browser/media/router/providers/cast/cast_activity_manager.h
53+++ ./chrome/browser/media/router/providers/cast/cast_activity_manager.h
54@@ -295,7 +295,7 @@ class CastActivityManager : public cast_channel::CastMessageHandler::Observer,
55 const url::Origin& origin,
56 int tab_id,
57 mojom::MediaRouteProvider::CreateRouteCallback callback);
58- DoLaunchSessionParams(DoLaunchSessionParams&& other) noexcept;
59+ DoLaunchSessionParams(DoLaunchSessionParams&& other);
60 ~DoLaunchSessionParams();
61 DoLaunchSessionParams& operator=(DoLaunchSessionParams&&) = delete;
62
63--
642.20.1
65
diff --git a/community/chromium/chromium-73-gcc-6.patch b/community/chromium/chromium-73-gcc-6.patch
deleted file mode 100644
index 40d85eb7af..0000000000
--- a/community/chromium/chromium-73-gcc-6.patch
+++ /dev/null
@@ -1,88 +0,0 @@
1From cf4c534f04c223f8a9d65407852e2a531a6d7fb6 Mon Sep 17 00:00:00 2001
2From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
3Date: Thu, 14 Feb 2019 22:22:21 +0000
4Subject: [PATCH] chrome/browser: Replace some forward declarations with actual
5 includes
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10This fixes the GCC build which was failing like this:
11
12 ../../base/scoped_observer.h: In instantiation of ‘void ScopedObserver<Source, Observer>::RemoveAll() [with Source = TabStripModel; Observer = TabStripModelObserver]’:
13 ../../base/scoped_observer.h:26:5: required from ‘ScopedObserver<Source, Observer>::~ScopedObserver() [with Source = TabStripModel; Observer = TabStripModelObserver]’
14 ../../chrome/browser/ui/views/extensions/extension_popup.h:115:70: required from here
15 ../../base/scoped_observer.h:45:20: error: invalid use of incomplete type ‘class TabStripModel’
16 sources_[i]->RemoveObserver(observer_);
17 ~~~~~~~~~~~~~^~~~~~~~~~~~~~
18
19This is caused by https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89311 ("Brace
20initialization needlessly invokes destructor"), i.e. having something like
21
22 ScopedObserver<T, U> observer_{this};
23
24in a header declaration requires T and U to be fully declared because
25ScopedObserver's destructor references them. In a few cases, T was only
26forward-declared.
27
28Bug: 819294
29Change-Id: Ie5b9dc2745e27d4532c5539e3845a8c9147a0595
30Reviewed-on: https://chromium-review.googlesource.com/c/1472576
31Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
32Commit-Queue: Alan Cutter <alancutter@chromium.org>
33Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
34Reviewed-by: Alan Cutter <alancutter@chromium.org>
35Cr-Commit-Position: refs/heads/master@{#632385}
36---
37 chrome/browser/ui/views/extensions/extension_popup.cc | 1 -
38 chrome/browser/ui/views/extensions/extension_popup.h | 1 +
39 chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.cc | 1 -
40 chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h | 2 +-
41 .../web_applications/extensions/bookmark_app_tab_helper.cc | 1 -
42 .../web_applications/extensions/bookmark_app_tab_helper.h | 2 +-
43 6 files changed, 3 insertions(+), 5 deletions(-)
44
45diff --git a/chrome/browser/ui/views/extensions/extension_popup.cc b/chrome/browser/ui/views/extensions/extension_popup.cc
46index 3f0985d383dd..57d16aba9e9f 100644
47--- a/chrome/browser/ui/views/extensions/extension_popup.cc
48+++ ./chrome/browser/ui/views/extensions/extension_popup.cc
49@@ -8,7 +8,6 @@
50 #include "chrome/browser/devtools/devtools_window.h"
51 #include "chrome/browser/extensions/extension_view_host.h"
52 #include "chrome/browser/ui/browser.h"
53-#include "chrome/browser/ui/tabs/tab_strip_model.h"
54 #include "content/public/browser/devtools_agent_host.h"
55 #include "content/public/browser/notification_details.h"
56 #include "content/public/browser/notification_source.h"
57diff --git a/chrome/browser/ui/views/extensions/extension_popup.h b/chrome/browser/ui/views/extensions/extension_popup.h
58index 3661b5bda950..9018efa0fea5 100644
59--- a/chrome/browser/ui/views/extensions/extension_popup.h
60+++ ./chrome/browser/ui/views/extensions/extension_popup.h
61@@ -9,6 +9,7 @@
62 #include "base/compiler_specific.h"
63 #include "base/macros.h"
64 #include "base/scoped_observer.h"
65+#include "chrome/browser/ui/tabs/tab_strip_model.h"
66 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
67 #include "chrome/browser/ui/views/extensions/extension_view_views.h"
68 #include "content/public/browser/devtools_agent_host_observer.h"
69diff --git a/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h b/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h
70index 2a3ea8e4f91f..ac44a4f05dec 100644
71--- a/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h
72+++ ./chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h
73@@ -8,6 +8,7 @@
74 #include "base/macros.h"
75 #include "base/memory/weak_ptr.h"
76 #include "base/scoped_observer.h"
77+#include "chrome/browser/ui/toolbar/toolbar_actions_bar.h"
78 #include "chrome/browser/ui/toolbar/toolbar_actions_bar_observer.h"
79 #include "chrome/browser/ui/views/toolbar/app_menu_observer.h"
80 #include "ui/views/controls/scroll_view.h"
81@@ -15,7 +16,6 @@ class AppMenu;
82 class AppMenu;
83 class Browser;
84 class BrowserActionsContainer;
85-class ToolbarActionsBar;
86
87 namespace views {
88 class MenuItemView;
diff --git a/community/chromium/gcc-arm.patch b/community/chromium/gcc-arm.patch
index fdbb4bb7be..7498954ac6 100644
--- a/community/chromium/gcc-arm.patch
+++ b/community/chromium/gcc-arm.patch
@@ -1,11 +1,13 @@
1--- ./third_party/zlib/BUILD.gn.orig 1diff --git a/third_party/zlib/BUILD.gn b/third_party/zlib/BUILD.gn
2index 1a9cd3b..728a011 100644
3--- ./third_party/zlib/BUILD.gn
2+++ ./third_party/zlib/BUILD.gn 4+++ ./third_party/zlib/BUILD.gn
3@@ -67,7 +67,7 @@ 5@@ -16,7 +16,7 @@ config("zlib_internal_config") {
4 # implement the CRC32* instructions. These are optional in ARMv8.0." 6
5 # - Fuchsia just added a syscall for feature detection. 7 use_arm_neon_optimizations = false
6 # TODO(cavalcantii): crbug.com/810125. 8 if (current_cpu == "arm" || current_cpu == "arm64") {
7- if (!is_ios && !is_fuchsia) { 9- if (arm_use_neon) {
8+ if (is_clang && !is_ios && !is_fuchsia) { 10+ if (arm_use_neon && is_clang) {
9 defines = [ "CRC32_ARMV8_CRC32" ] 11 use_arm_neon_optimizations = true
10 if (is_android) { 12 }
11 defines += [ "ARMV8_OS_ANDROID" ] 13 }
diff --git a/community/chromium/gcc6.patch b/community/chromium/gcc6.patch
deleted file mode 100644
index 036502c57e..0000000000
--- a/community/chromium/gcc6.patch
+++ /dev/null
@@ -1,12 +0,0 @@
1diff --git a/build/config/linux/BUILD.gn b/build/config/linux/BUILD.gn
2index 45fee9a..0769c41 100644
3--- build/config/linux/BUILD.gn
4+++ build/config/linux/BUILD.gn
5@@ -13,6 +13,7 @@ group("linux") {
6 # is applied to all targets. It is here to separate out the logic that is
7 # Linux-only. This is not applied to Android, but is applied to ChromeOS.
8 config("compiler") {
9+ cflags_cc = [ "-fno-delete-null-pointer-checks" ]
10 }
11
12 # This is included by reference in the //build/config/compiler:runtime_library
diff --git a/community/chromium/gcc8-alignof.patch b/community/chromium/gcc8-alignof.patch
deleted file mode 100644
index 90aa32872c..0000000000
--- a/community/chromium/gcc8-alignof.patch
+++ /dev/null
@@ -1,17 +0,0 @@
1--- mojo/public/c/system/macros.h.orig 2018-09-06 10:11:54.336432699 -0400
2+++ mojo/public/c/system/macros.h 2018-09-06 10:13:56.555727572 -0400
3@@ -27,7 +27,13 @@
4 (sizeof(void*) == 4 ? 32 : 0)
5
6 // Like the C++11 |alignof| operator.
7-#if __cplusplus >= 201103L
8+#if defined(__GNUC__) && __GNUC__ >= 8
9+// GCC 8 has changed the alignof operator to return the minimal alignment
10+// required by the target ABI, instead of the preferred alignment.
11+// This means that on 32-bit x86, it will return 4 instead of 8.
12+// Use __alignof__ instead to avoid this.
13+#define MOJO_ALIGNOF(type) __alignof__(type)
14+#elif __cplusplus >= 201103L
15 #define MOJO_ALIGNOF(type) alignof(type)
16 #elif defined(__GNUC__)
17 #define MOJO_ALIGNOF(type) __alignof__(type)
diff --git a/community/chromium/musl-hacks.patch b/community/chromium/musl-hacks.patch
index eff59ae5bc..d7c61a625b 100644
--- a/community/chromium/musl-hacks.patch
+++ b/community/chromium/musl-hacks.patch
@@ -1,5 +1,5 @@
1--- base/debug/stack_trace.cc.orig 2018-12-08 14:11:25.303475116 +0100 1--- ./base/debug/stack_trace.cc.orig 2018-12-08 14:11:25.303475116 +0100
2+++ base/debug/stack_trace.cc 2018-12-08 18:00:43.874946999 +0100 2+++ ./base/debug/stack_trace.cc 2018-12-08 18:00:43.874946999 +0100
3@@ -229,7 +229,7 @@ 3@@ -229,7 +229,7 @@
4 } 4 }
5 std::string StackTrace::ToStringWithPrefix(const char* prefix_string) const { 5 std::string StackTrace::ToStringWithPrefix(const char* prefix_string) const {
@@ -9,3 +9,14 @@
9 OutputToStreamWithPrefix(&stream, prefix_string); 9 OutputToStreamWithPrefix(&stream, prefix_string);
10 #endif 10 #endif
11 return stream.str(); 11 return stream.str();
12--- ./net/socket/udp_socket_posix.cc.orig 2019-07-03 13:13:46.034342649 -0400
13+++ ./net/socket/udp_socket_posix.cc 2019-07-03 13:23:53.117081909 -0400
14@@ -1194,7 +1194,7 @@
15 msg_iov->push_back({const_cast<char*>(buffer->data()), buffer->length()});
16 msgvec->reserve(buffers.size());
17 for (size_t j = 0; j < buffers.size(); j++)
18- msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, nullptr, 0, 0}, 0});
19+ msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, 0, 0, 0}, 0});
20 int result = HANDLE_EINTR(Sendmmsg(fd, &msgvec[0], buffers.size(), 0));
21 SendResult send_result(0, 0, std::move(buffers));
22 if (result < 0) {
diff --git a/community/chromium/musl-sandbox.patch b/community/chromium/musl-sandbox.patch
index 34717ec82c..5a7239fd9e 100644
--- a/community/chromium/musl-sandbox.patch
+++ b/community/chromium/musl-sandbox.patch
@@ -1,17 +1,12 @@
1diff --git sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc 1diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
2index 68ce32a..bb779c2 100644 2index 348ab6e..4550f9e 100644
3--- sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc 3--- ./sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
4+++ sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc 4+++ ./sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
5@@ -137,23 +137,13 @@ namespace sandbox { 5@@ -139,21 +139,11 @@ namespace sandbox {
6 // CLONE_VM, nor CLONE_THREAD, which includes all fork() implementations. 6 // present (as in newer versions of posix_spawn).
7 ResultExpr RestrictCloneToThreadsAndEPERMFork() { 7 ResultExpr RestrictCloneToThreadsAndEPERMFork() {
8 const Arg<unsigned long> flags(0); 8 const Arg<unsigned long> flags(0);
9+ const int required = CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | 9-
10+ CLONE_THREAD | CLONE_SYSVSEM;
11+ const int safe = CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID |
12+ CLONE_DETACHED;
13+ const BoolExpr thread_clone_ok = (flags&~safe)==required;
14
15- // TODO(mdempsky): Extend DSL to support (flags & ~mask1) == mask2. 10- // TODO(mdempsky): Extend DSL to support (flags & ~mask1) == mask2.
16- const uint64_t kAndroidCloneMask = CLONE_VM | CLONE_FS | CLONE_FILES | 11- const uint64_t kAndroidCloneMask = CLONE_VM | CLONE_FS | CLONE_FILES |
17- CLONE_SIGHAND | CLONE_THREAD | 12- CLONE_SIGHAND | CLONE_THREAD |
@@ -26,10 +21,21 @@ index 68ce32a..bb779c2 100644
26- const BoolExpr android_test = 21- const BoolExpr android_test =
27- AnyOf(flags == kAndroidCloneMask, flags == kObsoleteAndroidCloneMask, 22- AnyOf(flags == kAndroidCloneMask, flags == kObsoleteAndroidCloneMask,
28- flags == kGlibcPthreadFlags); 23- flags == kGlibcPthreadFlags);
29- 24+ const int required = CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND |
25+ CLONE_THREAD | CLONE_SYSVSEM;
26+ const int safe = CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID |
27+ CLONE_DETACHED;
28+ const BoolExpr thread_clone_ok = (flags&~safe)==required;
29
30 // The following two flags are the two important flags in any vfork-emulating
31 // clone call. EPERM any clone call that contains both of them.
32@@ -163,7 +153,7 @@ ResultExpr RestrictCloneToThreadsAndEPERMFork() {
33 AnyOf((flags & (CLONE_VM | CLONE_THREAD)) == 0,
34 (flags & kImportantCloneVforkFlags) == kImportantCloneVforkFlags);
35
30- return If(IsAndroid() ? android_test : glibc_test, Allow()) 36- return If(IsAndroid() ? android_test : glibc_test, Allow())
31+ return If(thread_clone_ok, Allow()) 37+ return If(thread_clone_ok, Allow())
32 .ElseIf((flags & (CLONE_VM | CLONE_THREAD)) == 0, Error(EPERM)) 38 .ElseIf(is_fork_or_clone_vfork, Error(EPERM))
33 .Else(CrashSIGSYSClone()); 39 .Else(CrashSIGSYSClone());
34 } 40 }
35diff --git sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc 41diff --git sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
diff --git a/community/chromium/musl-v8-fix-deadlock.patch b/community/chromium/musl-v8-fix-deadlock.patch
deleted file mode 100644
index dff0d88d2c..0000000000
--- a/community/chromium/musl-v8-fix-deadlock.patch
+++ /dev/null
@@ -1,21 +0,0 @@
1Release the mutex before mess with the stack guard
2
3Upstream report: https://bugs.chromium.org/p/v8/issues/detail?id=8881
4
5diff --git a/v8/src/compiler-dispatcher/optimizing-compile-dispatcher.cc b/v8/src/compiler-dispatcher/optimizing-compile-dispatcher.cc
6index 09226e1..29a1871 100644
7--- ./v8/src/compiler-dispatcher/optimizing-compile-dispatcher.cc
8+++ ./v8/src/compiler-dispatcher/optimizing-compile-dispatcher.cc
9@@ -132,8 +132,10 @@ void OptimizingCompileDispatcher::CompileNext(OptimizedCompilationJob* job) {
10 // The function may have already been optimized by OSR. Simply continue.
11 // Use a mutex to make sure that functions marked for install
12 // are always also queued.
13- base::MutexGuard access_output_queue_(&output_queue_mutex_);
14- output_queue_.push(job);
15+ {
16+ base::MutexGuard access_output_queue_(&output_queue_mutex_);
17+ output_queue_.push(job);
18+ }
19 isolate_->stack_guard()->RequestInstallCode();
20 }
21
diff --git a/community/chromium/nasm.patch b/community/chromium/nasm.patch
new file mode 100644
index 0000000000..f5f85bc00f
--- /dev/null
+++ b/community/chromium/nasm.patch
@@ -0,0 +1,13 @@
1diff --git a/third_party/nasm/config/config-linux.h b/third_party/nasm/config/config-linux.h
2index 7eb7c20..3bdc2eb 100644
3--- ./third_party/nasm/config/config-linux.h
4+++ ./third_party/nasm/config/config-linux.h
5@@ -117,7 +117,7 @@
6 #define HAVE_ACCESS 1
7
8 /* Define to 1 if you have the `canonicalize_file_name' function. */
9-#define HAVE_CANONICALIZE_FILE_NAME 1
10+// #define HAVE_CANONICALIZE_FILE_NAME 1
11
12 /* Define to 1 if you have the `cpu_to_le16' intrinsic function. */
13 /* #undef HAVE_CPU_TO_LE16 */
diff --git a/community/chromium/no-execinfo.patch b/community/chromium/no-execinfo.patch
index 8610ecc23d..4bfda6638c 100644
--- a/community/chromium/no-execinfo.patch
+++ b/community/chromium/no-execinfo.patch
@@ -70,14 +70,3 @@
70 void StackTrace::OutputToStreamWithPrefix(std::ostream* os, 70 void StackTrace::OutputToStreamWithPrefix(std::ostream* os,
71 const char* prefix_string) const { 71 const char* prefix_string) const {
72 StreamBacktraceOutputHandler handler(os); 72 StreamBacktraceOutputHandler handler(os);
73--- third_party/blink/renderer/platform/wtf/assertions.cc.orig 2017-09-11 12:27:06.948854813 +0000
74+++ third_party/blink/renderer/platform/wtf/assertions.cc 2017-09-11 12:29:34.639862433 +0000
75@@ -56,7 +56,7 @@
76 #include <windows.h>
77 #endif
78
79-#if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(__UCLIBC__))
80+#if defined(OS_MACOSX) || (defined(OS_LINUX) && defined(__GLIBC__))
81 #include <cxxabi.h>
82 #include <dlfcn.h>
83 #include <execinfo.h>
diff --git a/community/chromium/resolver.patch b/community/chromium/resolver.patch
index 8664aaf376..da9028f6c7 100644
--- a/community/chromium/resolver.patch
+++ b/community/chromium/resolver.patch
@@ -1,4 +1,6 @@
1--- ./net/dns/dns_reloader.cc.orig 1diff --git a/net/dns/dns_reloader.cc b/net/dns/dns_reloader.cc
2index 03e248c..1a7b237 100644
3--- ./net/dns/dns_reloader.cc
2+++ ./net/dns/dns_reloader.cc 4+++ ./net/dns/dns_reloader.cc
3@@ -4,8 +4,7 @@ 5@@ -4,8 +4,7 @@
4 6
@@ -10,23 +12,11 @@
10 12
11 #include <resolv.h> 13 #include <resolv.h>
12 14
13--- ./net/dns/host_resolver_proc.cc.orig 15diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc
14+++ ./net/dns/host_resolver_proc.cc 16index 3c75dde..c748d94 100644
15@@ -190,8 +190,7 @@ 17--- ./net/dns/host_resolver_manager.cc
16 // Restrict result set to only this socket type to avoid duplicates. 18+++ ./net/dns/host_resolver_manager.cc
17 hints.ai_socktype = SOCK_STREAM; 19@@ -2266,8 +2266,7 @@ HostResolverManager::HostResolverManager(const Options& options,
18
19-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \
20- !defined(OS_ANDROID) && !defined(OS_FUCHSIA)
21+#if defined(__GLIBC__)
22 DnsReloaderMaybeReload();
23 #endif
24 int err = getaddrinfo(host.c_str(), NULL, &hints, &ai);
25diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc
26index bdf16b8..b234edd 100644
27--- ./net/dns/host_resolver_impl.cc
28+++ ./net/dns/host_resolver_impl.cc
29@@ -2018,8 +2018,7 @@ HostResolverImpl::HostResolverImpl(const Options& options, NetLog* net_log)
30 NetworkChangeNotifier::AddIPAddressObserver(this); 20 NetworkChangeNotifier::AddIPAddressObserver(this);
31 NetworkChangeNotifier::AddConnectionTypeObserver(this); 21 NetworkChangeNotifier::AddConnectionTypeObserver(this);
32 NetworkChangeNotifier::AddDNSObserver(this); 22 NetworkChangeNotifier::AddDNSObserver(this);
@@ -36,3 +26,17 @@ index bdf16b8..b234edd 100644
36 EnsureDnsReloaderInit(); 26 EnsureDnsReloaderInit();
37 #endif 27 #endif
38 28
29diff --git a/net/dns/host_resolver_proc.cc b/net/dns/host_resolver_proc.cc
30index 90d9958..71d9b4a 100644
31--- ./net/dns/host_resolver_proc.cc
32+++ ./net/dns/host_resolver_proc.cc
33@@ -197,8 +197,7 @@ int SystemHostResolverCall(const std::string& host,
34 base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
35 base::BlockingType::WILL_BLOCK);
36
37-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \
38- !defined(OS_ANDROID) && !defined(OS_FUCHSIA)
39+#if defined(__GLIBC__)
40 DnsReloaderMaybeReload();
41 #endif
42 int err = getaddrinfo(host.c_str(), nullptr, &hints, &ai);
diff --git a/community/chromium/secure_getenv.patch b/community/chromium/secure_getenv.patch
index 842a11532d..9ab048b626 100644
--- a/community/chromium/secure_getenv.patch
+++ b/community/chromium/secure_getenv.patch
@@ -1,16 +1,16 @@
1--- ./third_party/angle/third_party/vulkan-loader/src/loader/loader.c.orig 1--- ./third_party/angle/third_party/vulkan-loader/src/loader/loader.c.orig
2+++ ./third_party/angle/third_party/vulkan-loader/src/loader/loader.c 2+++ ./third_party/angle/third_party/vulkan-loader/src/loader/loader.c
3@@ -37,6 +37,9 @@ 3@@ -35,6 +35,9 @@
4 #include <CoreFoundation/CoreFoundation.h> 4 #include <stdbool.h>
5 #include <sys/param.h> 5 #include <string.h>
6 #endif 6 #include <stddef.h>
7+#if defined(HAVE_GETAUXVAL) 7+#if defined(HAVE_GETAUXVAL)
8+#include <sys/auxv.h> 8+#include <sys/auxv.h>
9+#endif 9+#endif
10 #include <sys/types.h> 10
11 #if defined(_WIN32) 11 #if defined(__APPLE__)
12 #include "dirent_on_windows.h" 12 #include <CoreFoundation/CoreFoundation.h>
13@@ -240,6 +243,8 @@ 13@@ -256,6 +259,8 @@
14 #elif defined(HAVE___SECURE_GETENV) 14 #elif defined(HAVE___SECURE_GETENV)
15 (void)inst; 15 (void)inst;
16 return __secure_getenv(name); 16 return __secure_getenv(name);
diff --git a/community/chromium/swiftshader.patch b/community/chromium/swiftshader.patch
index 75f161593f..5b2deb86fc 100644
--- a/community/chromium/swiftshader.patch
+++ b/community/chromium/swiftshader.patch
@@ -8,41 +8,6 @@
8 #include <unistd.h> 8 #include <unistd.h>
9 #include <netdb.h> 9 #include <netdb.h>
10 #include <netinet/in.h> 10 #include <netinet/in.h>
11--- ./third_party/swiftshader/third_party/LLVM/include-linux/llvm/Config/config.h
12+++ ./third_party/swiftshader/third_party/LLVM/include-linux/llvm/Config/config.h
13@@ -125,7 +125,7 @@
14 #define HAVE_ERROR_T 1
15
16 /* Define to 1 if you have the <execinfo.h> header file. */
17-#define HAVE_EXECINFO_H 1
18+/* #undef HAVE_EXECINFO_H */
19
20 /* Define to 1 if you have the <fcntl.h> header file. */
21 #define HAVE_FCNTL_H 1
22@@ -240,10 +240,10 @@
23 /* #undef HAVE_MACH_O_DYLD_H */
24
25 /* Define if mallinfo() is available on this platform. */
26-#define HAVE_MALLINFO 1
27+/* #undef HAVE_MALLINFO */
28
29 /* Define to 1 if you have the <malloc.h> header file. */
30-#define HAVE_MALLOC_H 1
31+/* #undef HAVE_MALLOC_H */
32
33 /* Define to 1 if you have the <malloc/malloc.h> header file. */
34 /* #undef HAVE_MALLOC_MALLOC_H */
35--- ./third_party/swiftshader/third_party/LLVM/lib/Support/DynamicLibrary.cpp
36+++ ./third_party/swiftshader/third_party/LLVM/lib/Support/DynamicLibrary.cpp
37@@ -160,7 +160,7 @@ void* DynamicLibrary::SearchForAddressOfSymbol(const char *symbolName) {
38 // On linux we have a weird situation. The stderr/out/in symbols are both
39 // macros and global variables because of standards requirements. So, we
40 // boldly use the EXPLICIT_SYMBOL macro without checking for a #define first.
41-#if defined(__linux__) && !defined(__ANDROID__)
42+#if defined(__GLIBC__)
43 {
44 EXPLICIT_SYMBOL(stderr);
45 EXPLICIT_SYMBOL(stdout);
46--- ./third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h 11--- ./third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h
47+++ ./third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h 12+++ ./third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h
48@@ -14,7 +14,7 @@ 13@@ -14,7 +14,7 @@