1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
| | Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
Date: 2022-06-22
Initial Package Version: From git 5.15 branch.
Upstream Status: Not applied
Origin: upstreams and gentoo, Douglas, fedora, self, Arch.
Description: Allows this to build and work on BLFS-10.1
Updated on 2021-05-04: add gentoo patch for gcc-11.
Updated on 2021-06-18: remove fix for graphcycles.cc which is now upstream
Updated on 2021-08-13: add fixes to compile and let browsers using it work on glibc-2.34
Updated on 2021-11-22: fixes for qtwebengine-5.15.7.
Updated on 2022-01-13: reduced to what still applies to 5.15.8.
Updated on 2022-06-22: patches from Arch via gentoo to use python3, one modified for BLFS.
The lingering arm and mips patches from an earlier fedora patchset have been dropped.
Include a patch for gcc12.
References to old patches, in the order they were applied, are retained to
assist people wishing to review what has changed compared to previous versions.
First, a patch from gentoo to avoid the build from a git version requiring
git, although the .git directories are still required.
generate_gni.sh: update_readme() runs git at the end of process, prevent it.
Thanks-to: Georgy Yakovlev <gyakovlev@gentoo.org>
--- a/src/3rdparty/chromium/third_party/libvpx/generate_gni.sh 2021-02-07 12:51:49.438514897 +0100
+++ b/src/3rdparty/chromium/third_party/libvpx/generate_gni.sh 2021-02-21 16:23:38.375724515 +0100
@@ -519,8 +519,3 @@
gn format --in-place $BASE_DIR/BUILD.gn
gn format --in-place $BASE_DIR/libvpx_srcs.gni
-
-cd $BASE_DIR/$LIBVPX_SRC_DIR
-update_readme
-
-cd $BASE_DIR
Second was a patch from fedora to make some web pages render when glibc-2.33
is used. Upstream fixed qtwebengine-5.15.6 slightly differently
Third, a patch from Douglas R. Reno (renodr at linuxfromscratch dot org):
When building qtwebengine where libxml2 has been built before ICU has been
installed, a build failure will occur because QtWebEngine will attempt to use
it's internal version of libxml2, which *was not* patched against API changes
in ICU-68.1+. These changes involved removing the TRUE and FALSE macros, and
the official documentation states that developers should use 'true' and 'false'
instead, of course making sure that 'stdbool.h' is included so that the compiler
can actually find those boolean values. Since Chromium's internal version of ICU
is older than ours, it's not a problem when building with the internal version
of ICU. Users who have installed ICU before libxml2 are exempt from running into
this issue.
diff -Naurp qtwebengine-everywhere-src-5.15.2.orig/src/3rdparty/chromium/third_party/libxml/src/encoding.c qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/libxml/src/encoding.c
--- qtwebengine-everywhere-src-5.15.2.orig/src/3rdparty/chromium/third_party/libxml/src/encoding.c 2020-11-06 19:22:36.000000000 -0600
+++ qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/libxml/src/encoding.c 2020-12-08 19:39:00.607894718 -0600
@@ -44,7 +44,7 @@
#endif
#include <libxml/globals.h>
#include <libxml/xmlerror.h>
-
+#include <stdbool.h>
#include "buf.h"
#include "enc.h"
@@ -1893,7 +1893,7 @@ xmlUconvWrapper(uconv_t *cd, int toUnico
*inlen = ucv_in - (const char*) in;
*outlen = ucv_out - (char *) out;
if (U_SUCCESS(err)) {
- /* reset pivot buf if this is the last call for input (flush==TRUE) */
+ /* reset pivot buf if this is the last call for input (flush==true) */
if (flush)
cd->pivot_source = cd->pivot_target = cd->pivot_buf;
return 0;
@@ -1958,7 +1958,7 @@ xmlEncOutputChunk(xmlCharEncodingHandler
#ifdef LIBXML_ICU_ENABLED
else if (handler->uconv_out != NULL) {
ret = xmlUconvWrapper(handler->uconv_out, 0, out, outlen, in, inlen,
- TRUE);
+ true);
}
#endif /* LIBXML_ICU_ENABLED */
else {
Fourth, patch from gentoo to allow it to build with gcc-11 where some
less-used headers such as <limits> have been removed from the C++
standard library headers which used to include them, and must now be
included where needed. [https://gcc.gnu.org/gcc-11/porting_to.html]
diff --git a/src/3rdparty/chromium/third_party/angle/src/libANGLE/HandleAllocator.cpp b/src/3rdparty/chromium/third_party/angle/src/libANGLE/HandleAllocator.cpp
index 013f1dfb2..3ce63c192 100644
--- a/src/3rdparty/chromium/third_party/angle/src/libANGLE/HandleAllocator.cpp
+++ b/src/3rdparty/chromium/third_party/angle/src/libANGLE/HandleAllocator.cpp
@@ -9,6 +9,7 @@
#include "libANGLE/HandleAllocator.h"
+#include <limits>
#include <algorithm>
#include <functional>
diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.cc b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.cc
index fd651958f..1e8d0606c 100644
--- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.cc
+++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.cc
@@ -14,9 +14,9 @@
* limitations under the License.
*/
+#include <limits>
#include "src/trace_processor/containers/string_pool.h"
-#include <limits>
#include "perfetto/base/logging.h"
#include "perfetto/ext/base/utils.h"
diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc
index 00496b335..0dccfeb8a 100644
--- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc
+++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include <limits>
#include "src/trace_processor/db/column.h"
#include "src/trace_processor/db/compare.h"
diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/types/variadic.cc b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/types/variadic.cc
index 837bfeba9..cdd56817d 100644
--- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/types/variadic.cc
+++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/types/variadic.cc
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include <limits>
#include "src/trace_processor/types/variadic.h"
namespace perfetto {
diff --git a/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_atk_hyperlink.cc b/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_atk_hyperlink.cc
index be91def6b..73f202356 100644
--- a/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_atk_hyperlink.cc
+++ b/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_atk_hyperlink.cc
@@ -245,7 +245,7 @@ static void AXPlatformAtkHyperlinkInit(AXPlatformAtkHyperlink* self, gpointer) {
}
GType ax_platform_atk_hyperlink_get_type() {
- static volatile gsize type_volatile = 0;
+ static gsize type_volatile = 0;
AXPlatformNodeAuraLinux::EnsureGTypeInit();
diff --git a/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_node_auralinux.cc b/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_node_auralinux.cc
index 04125c6fd..6c64e5d8e 100644
--- a/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_node_auralinux.cc
+++ b/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_node_auralinux.cc
@@ -2274,7 +2274,7 @@ void ClassInit(gpointer class_pointer, gpointer /* class_data */) {
GType GetType() {
AXPlatformNodeAuraLinux::EnsureGTypeInit();
- static volatile gsize type_volatile = 0;
+ static gsize type_volatile = 0;
if (g_once_init_enter(&type_volatile)) {
static const GTypeInfo type_info = {
sizeof(AXPlatformNodeAuraLinuxClass), // class_size
diff --git a/src/3rdparty/chromium/ui/gtk/gtk_key_bindings_handler.cc b/src/3rdparty/chromium/ui/gtk/gtk_key_bindings_handler.cc
index c663a2074..38a342484 100644
--- a/src/3rdparty/chromium/ui/gtk/gtk_key_bindings_handler.cc
+++ b/src/3rdparty/chromium/ui/gtk/gtk_key_bindings_handler.cc
@@ -141,7 +141,7 @@ void GtkKeyBindingsHandler::HandlerClassInit(HandlerClass* klass) {
}
GType GtkKeyBindingsHandler::HandlerGetType() {
- static volatile gsize type_id_volatile = 0;
+ static gsize type_id_volatile = 0;
if (g_once_init_enter(&type_id_volatile)) {
GType type_id = g_type_register_static_simple(
GTK_TYPE_TEXT_VIEW, g_intern_static_string("GtkKeyBindingsHandler"),
--- a/src/3rdparty/chromium/components/bookmarks/browser/bookmark_expanded_state_tracker.cc
+++ b/src/3rdparty/chromium/components/bookmarks/browser/bookmark_expanded_state_tracker.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <cstddef>
#include "components/bookmarks/browser/bookmark_expanded_state_tracker.h"
#include <stdint.h>
diff --git a/src/3rdparty/chromium/components/bookmarks/browser/base_bookmark_model_observer.cc b/src/3rdparty/chromium/components/bookmarks/browser/base_bookmark_model_observer.cc
index 657a3c96b..ad641a082 100644
--- a/src/3rdparty/chromium/components/bookmarks/browser/base_bookmark_model_observer.cc
+++ b/src/3rdparty/chromium/components/bookmarks/browser/base_bookmark_model_observer.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <cstddef>
+
#include "components/bookmarks/browser/base_bookmark_model_observer.h"
namespace bookmarks {
Fifth were some fixes from upstream abseil to build with glibc-2.34.
The first part has been fixed slightly differently in chromium in
qtwebengne-5.15.8, I assume the remainder are not actually needed for
chromium.
Sixth was a patch from Fedora to compile breakpad on glibc-2.34, fixed
slightly differently in chromium in qtwebengine-5.15.8
Seventh: a patch from fedora to handle time64 syscalls, fixed up to apply
to 5.15.7 (parts were upstream but in a slightly different order).
I have now removed the arm_linux_syscalls.h and mips_linux_syscalls.h
changes since BLFS cannot use these.
diff -ur a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2021-11-21 05:26:12.779893741 +0000
+++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2021-11-21 05:48:06.855720781 +0000
@@ -158,7 +158,15 @@
return Allow();
#endif
- if (SyscallSets::IsClockApi(sysno)) {
+ if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep
+#if defined(__NR_clock_gettime64)
+ || sysno == __NR_clock_gettime64
+#endif
+#if defined(__NR_clock_nanosleep_time64)
+ || sysno == __NR_clock_nanosleep_time64
+#endif
+ ) {
+
return RestrictClockID();
}
Eighth - fix the build with gcc-12.
Originally a sed, by Pierre Labastie.
diff -Naur a/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp b/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp
--- a/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp 2022-05-23 12:38:40.000000000 +0100
+++ b/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp 2022-06-22 14:05:40.255461707 +0100
@@ -6,6 +6,7 @@
*/
+#include <vector>
#include "include/utils/SkParse.h"
static constexpr const char* gColorNames[] = {
Ninth - patch from Arch, via gentoo, to convert python2 code to
python3. In as much as parts of this change python2 to python, but
BLFS uses python3, it seems not all of this is necessarily needed.
From 3c26c6214f675d170718df6bd54e61743620166a Mon Sep 17 00:00:00 2001
From: Antonio Rojas <arojas@archlinux.org>
Date: Sat, 16 Oct 2021 20:17:35 +0000
Subject: [PATCH 1/3] Build without python 2
---
chromium/build/print_python_deps.py | 6 +-
.../protobufs/binary_proto_generator.py | 8 +-
.../tracing/generate_trace_viewer_grd.py | 2 +-
chromium/mojo/public/tools/bindings/BUILD.gn | 2 +
.../tools/bindings/gen_data_files_list.py | 8 +-
.../generators/mojom_java_generator.py | 4 +
.../tools/mojom/mojom/generate/generator.py | 14 ++--
.../tools/mojom/mojom/generate/module.py | 3 +-
.../mojom/mojom/generate/template_expander.py | 12 +--
.../scripts/bind_gen/blink_v8_bridge.py | 6 +-
.../scripts/bind_gen/callback_interface.py | 2 +-
.../bindings/scripts/bind_gen/code_node.py | 10 +--
.../bindings/scripts/bind_gen/codegen_expr.py | 15 ++--
.../scripts/bind_gen/codegen_format.py | 2 +-
.../scripts/bind_gen/codegen_utils.py | 2 +-
.../bindings/scripts/bind_gen/dictionary.py | 2 +-
.../bindings/scripts/bind_gen/interface.py | 82 +++++++++++--------
.../scripts/bind_gen/mako_renderer.py | 2 +-
.../bindings/scripts/bind_gen/style_format.py | 9 +-
.../bindings/scripts/bind_gen/task_queue.py | 5 +-
.../bindings/scripts/code_generator.py | 10 +++
.../scripts/generate_origin_trial_features.py | 4 +-
.../bindings/scripts/idl_definitions.py | 8 +-
.../renderer/bindings/scripts/idl_reader.py | 4 +-
.../renderer/bindings/scripts/idl_types.py | 2 +-
.../renderer/bindings/scripts/utilities.py | 28 +++----
.../renderer/bindings/scripts/v8_interface.py | 9 +-
.../renderer/bindings/scripts/v8_methods.py | 4 +
.../renderer/bindings/scripts/v8_utilities.py | 2 +-
.../scripts/web_idl/callback_interface.py | 12 +--
.../bindings/scripts/web_idl/database.py | 2 +-
.../bindings/scripts/web_idl/exposure.py | 5 +-
.../bindings/scripts/web_idl/function_like.py | 28 +++----
.../bindings/scripts/web_idl/idl_compiler.py | 21 ++---
.../bindings/scripts/web_idl/interface.py | 45 +++++-----
.../bindings/scripts/web_idl/ir_builder.py | 29 ++++---
.../bindings/scripts/web_idl/make_copy.py | 7 ++
.../bindings/scripts/web_idl/namespace.py | 12 +--
.../bindings/templates/dictionary_v8.cc.tmpl | 8 +-
.../scripts/core/css/make_style_shorthands.py | 23 +++---
.../properties/make_css_property_instances.py | 4 +-
.../blink/renderer/build/scripts/gperf.py | 2 +-
.../blink/renderer/build/scripts/in_file.py | 2 +-
.../renderer/build/scripts/in_generator.py | 5 ++
.../build/scripts/make_runtime_features.py | 2 +-
.../scripts/templates/element_factory.cc.tmpl | 4 +-
.../templates/element_type_helpers.cc.tmpl | 4 +-
.../templates/element_type_helpers.h.tmpl | 2 +-
.../build/scripts/templates/macros.tmpl | 4 +-
.../templates/make_qualified_names.h.tmpl | 4 +-
.../dawn/generator/generator_lib.py | 4 +
.../devtools-frontend/src/BUILD.gn | 2 +
.../scripts/build/build_inspector_overlay.py | 3 +-
.../build/build_release_applications.py | 9 +-
.../scripts/build/generate_devtools_grd.py | 4 +-
.../src/scripts/build/modular_build.py | 6 +-
chromium/third_party/jinja2/tests.py | 2 +-
chromium/tools/metrics/ukm/gen_builders.py | 5 +-
.../ui/ozone/generate_constructor_list.py | 13 ++-
.../ui/ozone/generate_ozone_platform_list.py | 26 ++++--
60 files changed, 334 insertions(+), 232 deletions(-)
diff --git a/chromium/build/print_python_deps.py b/chromium/build/print_python_deps.py
index fd29c0972c9..69af247094b 100755
--- a/src/3rdparty/chromium/chromium/build/print_python_deps.py
+++ b/src/3rdparty/chromium/build/print_python_deps.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.7
+#!/usr/bin/python
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -80,7 +80,7 @@ def _GetTargetPythonVersion(module):
if shebang.startswith('#!'):
# Examples:
# '#!/usr/bin/python'
- # '#!/usr/bin/python2.7'
+ # '#!/usr/bin/python'
# '#!/usr/bin/python3'
# '#!/usr/bin/env python3'
# '#!/usr/bin/env vpython'
@@ -152,7 +152,7 @@ def main():
# Trybots run with vpython as default Python, but with a different config
# from //.vpython. To make the is_vpython test work, and to match the behavior
- # of dev machines, the shebang line must be run with python2.7.
+ # of dev machines, the shebang line must be run with python.
#
# E.g. $HOME/.vpython-root/dd50d3/bin/python
# E.g. /b/s/w/ir/cache/vpython/ab5c79/bin/python
diff --git a/chromium/components/resources/protobufs/binary_proto_generator.py b/chromium/components/resources/protobufs/binary_proto_generator.py
index 7422ead9697..16365515f26 100755
--- a/src/3rdparty/chromium/chromium/components/resources/protobufs/binary_proto_generator.py
+++ b/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py
@@ -7,7 +7,7 @@
Converts a given ASCII proto into a binary resource.
"""
-
+from __future__ import print_function
import abc
import imp
import optparse
@@ -196,12 +196,12 @@ class BinaryProtoGenerator:
self._ImportProtoModules(opts.path)
if not self.VerifyArgs(opts):
- print "Wrong arguments"
+ print("Wrong arguments")
return 1
try:
self._GenerateBinaryProtos(opts)
except Exception as e:
- print "ERROR: Failed to render binary version of %s:\n %s\n%s" % (
- opts.infile, str(e), traceback.format_exc())
+ print("ERROR: Failed to render binary version of %s:\n %s\n%s" %
+ (opts.infile, str(e), traceback.format_exc()))
return 1
diff --git a/chromium/content/browser/tracing/generate_trace_viewer_grd.py b/chromium/content/browser/tracing/generate_trace_viewer_grd.py
index 037f9497dc2..be393d21f90 100755
--- a/src/3rdparty/chromium/chromium/content/browser/tracing/generate_trace_viewer_grd.py
+++ b/src/3rdparty/chromium/content/browser/tracing/generate_trace_viewer_grd.py
@@ -74,7 +74,7 @@ def main(argv):
for filename in parsed_args.source_files:
add_file_to_grd(doc, os.path.basename(filename))
- with open(parsed_args.output_filename, 'w') as output_file:
+ with open(parsed_args.output_filename, 'wb') as output_file:
output_file.write(doc.toxml(encoding='UTF-8'))
diff --git a/chromium/mojo/public/tools/bindings/BUILD.gn b/chromium/mojo/public/tools/bindings/BUILD.gn
index fc04b5dd0b1..708958e438b 100644
--- a/src/3rdparty/chromium/chromium/mojo/public/tools/bindings/BUILD.gn
+++ b/src/3rdparty/chromium/mojo/public/tools/bindings/BUILD.gn
@@ -2,9 +2,11 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/config/python.gni")
import("//mojo/public/tools/bindings/mojom.gni")
import("//third_party/jinja2/jinja2.gni")
+# TODO(crbug.com/1194274): Investigate nondeterminism in Py3 builds.
action("precompile_templates") {
sources = mojom_generator_sources
sources += [
diff --git a/chromium/mojo/public/tools/bindings/gen_data_files_list.py b/chromium/mojo/public/tools/bindings/gen_data_files_list.py
index 79c9e50efce..8b78d092418 100644
--- a/src/3rdparty/chromium/chromium/mojo/public/tools/bindings/gen_data_files_list.py
+++ b/src/3rdparty/chromium/mojo/public/tools/bindings/gen_data_files_list.py
@@ -18,7 +18,6 @@ import os
import re
import sys
-from cStringIO import StringIO
from optparse import OptionParser
sys.path.insert(
@@ -41,12 +40,9 @@ def main():
pattern = re.compile(options.pattern)
files = [f for f in os.listdir(options.directory) if pattern.match(f)]
- stream = StringIO()
- for f in files:
- print(f, file=stream)
+ contents = '\n'.join(f for f in files) + '\n'
+ WriteFile(contents, options.output)
- WriteFile(stream.getvalue(), options.output)
- stream.close()
if __name__ == '__main__':
sys.exit(main())
diff --git a/chromium/mojo/public/tools/bindings/generators/mojom_java_generator.py b/chromium/mojo/public/tools/bindings/generators/mojom_java_generator.py
index 96b2fdfae0c..00b9dccd00c 100644
--- a/src/3rdparty/chromium/chromium/mojo/public/tools/bindings/generators/mojom_java_generator.py
+++ b/src/3rdparty/chromium/mojo/public/tools/bindings/generators/mojom_java_generator.py
@@ -25,6 +25,10 @@ sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir,
'build', 'android', 'gyp'))
from util import build_utils
+# TODO(crbug.com/1174969): Remove this once Python2 is obsoleted.
+if sys.version_info.major != 2:
+ basestring = str
+ long = int
GENERATOR_PREFIX = 'java'
diff --git a/chromium/mojo/public/tools/mojom/mojom/generate/generator.py b/chromium/mojo/public/tools/mojom/mojom/generate/generator.py
index de62260a5c9..4a1c73fcf82 100644
--- a/src/3rdparty/chromium/chromium/mojo/public/tools/mojom/mojom/generate/generator.py
+++ b/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/generator.py
@@ -136,9 +136,14 @@ class Stylizer(object):
def WriteFile(contents, full_path):
# If |contents| is same with the file content, we skip updating.
+ if not isinstance(contents, bytes):
+ data = contents.encode('utf8')
+ else:
+ data = contents
+
if os.path.isfile(full_path):
with open(full_path, 'rb') as destination_file:
- if destination_file.read() == contents:
+ if destination_file.read() == data:
return
# Make sure the containing directory exists.
@@ -146,11 +151,8 @@ def WriteFile(contents, full_path):
fileutil.EnsureDirectoryExists(full_dir)
# Dump the data to disk.
- with open(full_path, "wb") as f:
- if not isinstance(contents, bytes):
- f.write(contents.encode('utf-8'))
- else:
- f.write(contents)
+ with open(full_path, 'wb') as f:
+ f.write(data)
def AddComputedData(module):
diff --git a/chromium/mojo/public/tools/mojom/mojom/generate/module.py b/chromium/mojo/public/tools/mojom/mojom/generate/module.py
index ebbc9b322ea..3d026429bbc 100644
--- a/src/3rdparty/chromium/chromium/mojo/public/tools/mojom/mojom/generate/module.py
+++ b/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/module.py
@@ -398,7 +398,8 @@ class Field(object):
class StructField(Field):
- pass
+ def __hash__(self):
+ return super(Field, self).__hash__()
class UnionField(Field):
diff --git a/chromium/mojo/public/tools/mojom/mojom/generate/template_expander.py b/chromium/mojo/public/tools/mojom/mojom/generate/template_expander.py
index 7a300560246..8d9e26fb7f6 100644
--- a/src/3rdparty/chromium/chromium/mojo/public/tools/mojom/mojom/generate/template_expander.py
+++ b/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/template_expander.py
@@ -75,9 +75,9 @@ def PrecompileTemplates(generator_modules, output_dir):
os.path.dirname(module.__file__), generator.GetTemplatePrefix())
]))
jinja_env.filters.update(generator.GetFilters())
- jinja_env.compile_templates(
- os.path.join(output_dir, "%s.zip" % generator.GetTemplatePrefix()),
- extensions=["tmpl"],
- zip="stored",
- py_compile=True,
- ignore_errors=False)
+ jinja_env.compile_templates(os.path.join(
+ output_dir, "%s.zip" % generator.GetTemplatePrefix()),
+ extensions=["tmpl"],
+ zip="stored",
+ py_compile=sys.version_info.major < 3,
+ ignore_errors=False)
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/blink_v8_bridge.py b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/blink_v8_bridge.py
index 3225ecca6e4..fc078d31b55 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/blink_v8_bridge.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/blink_v8_bridge.py
@@ -344,7 +344,7 @@ def make_default_value_expr(idl_type, default_value):
"""
assert default_value.is_type_compatible_with(idl_type)
- class DefaultValueExpr:
+ class DefaultValueExpr(object):
_ALLOWED_SYMBOLS_IN_DEPS = ("isolate")
def __init__(self, initializer_expr, initializer_deps,
@@ -502,7 +502,7 @@ def make_v8_to_blink_value(blink_var_name,
assert isinstance(blink_var_name, str)
assert isinstance(v8_value_expr, str)
assert isinstance(idl_type, web_idl.IdlType)
- assert (argument_index is None or isinstance(argument_index, (int, long)))
+ assert (argument_index is None or isinstance(argument_index, int))
assert (default_value is None
or isinstance(default_value, web_idl.LiteralConstant))
@@ -622,7 +622,7 @@ def make_v8_to_blink_value_variadic(blink_var_name, v8_array,
"""
assert isinstance(blink_var_name, str)
assert isinstance(v8_array, str)
- assert isinstance(v8_array_start_index, (int, long))
+ assert isinstance(v8_array_start_index, int)
assert isinstance(idl_type, web_idl.IdlType)
pattern = ("auto&& ${{{_1}}} = "
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/callback_interface.py b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/callback_interface.py
index 4a6df513068..8b51f23a409 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/callback_interface.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/callback_interface.py
@@ -177,7 +177,7 @@ def generate_callback_interface(callback_interface_identifier):
prop_install_mode=PropInstallMode.UNCONDITIONAL,
trampoline_var_name=None,
attribute_entries=[],
- constant_entries=filter(is_unconditional, constant_entries),
+ constant_entries=list(filter(is_unconditional, constant_entries)),
exposed_construct_entries=[],
operation_entries=[])
(install_interface_template_decl, install_interface_template_def,
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/code_node.py b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/code_node.py
index 52972fefe20..e5ae9d9629e 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/code_node.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/code_node.py
@@ -503,13 +503,13 @@ class CompositeNode(CodeNode):
gensym_kwargs = {}
template_vars = {}
for arg in args:
- assert isinstance(arg, (CodeNode, int, long, str))
+ assert isinstance(arg, (CodeNode, int, str))
gensym = CodeNode.gensym()
gensym_args.append("${{{}}}".format(gensym))
template_vars[gensym] = arg
for key, value in kwargs.items():
- assert isinstance(key, (int, long, str))
- assert isinstance(value, (CodeNode, int, long, str))
+ assert isinstance(key, (int, str))
+ assert isinstance(value, (CodeNode, int, str))
gensym = CodeNode.gensym()
gensym_kwargs[key] = "${{{}}}".format(gensym)
template_vars[gensym] = value
@@ -602,7 +602,7 @@ class ListNode(CodeNode):
def insert(self, index, node):
if node is None:
return
- assert isinstance(index, (int, long))
+ assert isinstance(index, int)
assert isinstance(node, CodeNode)
assert node.outer is None and node.prev is None
@@ -721,7 +721,7 @@ class SymbolScopeNode(SequenceNode):
if not scope_chains:
return counts
- self_index = iter(scope_chains).next().index(self)
+ self_index = next(iter(scope_chains)).index(self)
scope_chains = map(
lambda scope_chain: scope_chain[self_index + 1:], scope_chains)
scope_to_likeliness = {}
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_expr.py b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_expr.py
index a229a6c71c9..5fa288dabf2 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_expr.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_expr.py
@@ -109,7 +109,7 @@ def expr_and(terms):
if any(term.is_always_false for term in terms):
return _Expr(False)
- terms = filter(lambda x: not x.is_always_true, terms)
+ terms = list(filter(lambda x: not x.is_always_true, terms))
if not terms:
return _Expr(True)
if len(terms) == 1:
@@ -124,7 +124,7 @@ def expr_or(terms):
if any(term.is_always_true for term in terms):
return _Expr(True)
- terms = filter(lambda x: not x.is_always_false, terms)
+ terms = list(filter(lambda x: not x.is_always_false, terms))
if not terms:
return _Expr(False)
if len(terms) == 1:
@@ -222,7 +222,7 @@ def expr_from_exposure(exposure,
elif exposure.only_in_secure_contexts is False:
secure_context_term = _Expr(True)
else:
- terms = map(ref_enabled, exposure.only_in_secure_contexts)
+ terms = list(map(ref_enabled, exposure.only_in_secure_contexts))
secure_context_term = expr_or(
[_Expr("${is_in_secure_context}"),
expr_not(expr_and(terms))])
@@ -275,10 +275,11 @@ def expr_from_exposure(exposure,
# [ContextEnabled]
if exposure.context_enabled_features:
- terms = map(
- lambda feature: _Expr(
- "${{context_feature_settings}}->is{}Enabled()".format(
- feature)), exposure.context_enabled_features)
+ terms = list(
+ map(
+ lambda feature: _Expr(
+ "${{context_feature_settings}}->is{}Enabled()".format(
+ feature)), exposure.context_enabled_features))
context_enabled_terms.append(
expr_and([_Expr("${context_feature_settings}"),
expr_or(terms)]))
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_format.py b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_format.py
index 87d26eec3ca..f3e9d38247e 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_format.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_format.py
@@ -23,7 +23,7 @@ class _TemplateFormatter(string.Formatter):
self._template_formatter_indexing_count_ = 0
def get_value(self, key, args, kwargs):
- if isinstance(key, (int, long)):
+ if isinstance(key, int):
return args[key]
assert isinstance(key, str)
if not key:
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_utils.py b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_utils.py
index 2bcc4fed49a..e72282aa696 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_utils.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_utils.py
@@ -116,4 +116,4 @@ def write_code_node_to_file(code_node, filepath):
# stderr=format_result.error_message))
#
# web_idl.file_io.write_to_file_if_changed(filepath, format_result.contents)
- web_idl.file_io.write_to_file_if_changed(filepath, rendered_text)
+ web_idl.file_io.write_to_file_if_changed(filepath, rendered_text.encode('utf-8'))
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/dictionary.py b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/dictionary.py
index b39f0100410..4d68202296b 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/dictionary.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/dictionary.py
@@ -993,7 +993,7 @@ def make_dict_trace_func(cg_context):
_2 = _blink_member_name(member).value_var
return TextNode(_format(pattern, _1=_1, _2=_2))
- body.extend(map(make_trace_member_node, own_members))
+ body.extend(list(map(make_trace_member_node, own_members)))
body.append(TextNode("BaseClass::Trace(visitor);"))
return func_decl, func_def
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py
index 10ff30656ad..bfdf7128aac 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py
@@ -582,7 +582,7 @@ def _make_blink_api_call(code_node,
overriding_args=None):
assert isinstance(code_node, SymbolScopeNode)
assert isinstance(cg_context, CodeGenContext)
- assert num_of_args is None or isinstance(num_of_args, (int, long))
+ assert num_of_args is None or isinstance(num_of_args, int)
assert (overriding_args is None
or (isinstance(overriding_args, (list, tuple))
and all(isinstance(arg, str) for arg in overriding_args)))
@@ -1196,8 +1196,10 @@ def make_overload_dispatcher(cg_context):
did_use_break = did_use_break or can_fail
conditional = expr_or(
- map(lambda item: expr_from_exposure(item.function_like.exposure),
- items))
+ list(
+ map(
+ lambda item: expr_from_exposure(item.function_like.exposure
+ ), items)))
if not conditional.is_always_true:
node = CxxUnlikelyIfNode(cond=conditional, body=node)
@@ -4642,7 +4644,7 @@ class _PropEntryConstructorGroup(_PropEntryBase):
def __init__(self, is_context_dependent, exposure_conditional, world,
constructor_group, ctor_callback_name, ctor_func_length):
assert isinstance(ctor_callback_name, str)
- assert isinstance(ctor_func_length, (int, long))
+ assert isinstance(ctor_func_length, int)
_PropEntryBase.__init__(self, is_context_dependent,
exposure_conditional, world, constructor_group)
@@ -4670,7 +4672,7 @@ class _PropEntryOperationGroup(_PropEntryBase):
op_func_length,
no_alloc_direct_callback_name=None):
assert isinstance(op_callback_name, str)
- assert isinstance(op_func_length, (int, long))
+ assert isinstance(op_func_length, int)
_PropEntryBase.__init__(self, is_context_dependent,
exposure_conditional, world, operation_group)
@@ -5175,9 +5177,9 @@ def make_install_interface_template(cg_context, function_name, class_name, api_c
])
if class_like.identifier == "CSSStyleDeclaration":
- css_properties = filter(
- lambda attr: "CSSProperty" in attr.extended_attributes,
- class_like.attributes)
+ css_properties = list(
+ filter(lambda attr: "CSSProperty" in attr.extended_attributes,
+ class_like.attributes))
if css_properties:
prop_name_list = "".join(
map(lambda attr: "\"{}\", ".format(attr.identifier),
@@ -5567,8 +5569,8 @@ ${instance_object} = ${v8_context}->Global()->GetPrototype().As<v8::Object>();\
"V8DOMConfiguration::InstallConstants(${isolate}, "
"${interface_template}, ${prototype_template}, "
"kConstantCallbackTable, base::size(kConstantCallbackTable));")
- constant_callback_entries = filter(lambda entry: entry.const_callback_name,
- constant_entries)
+ constant_callback_entries = list(filter(lambda entry: entry.const_callback_name,
+ constant_entries))
install_properties(table_name, constant_callback_entries,
_make_constant_callback_registration_table,
installer_call_text)
@@ -5584,8 +5586,8 @@ ${instance_object} = ${v8_context}->Global()->GetPrototype().As<v8::Object>();\
"V8DOMConfiguration::InstallConstants(${isolate}, "
"${interface_template}, ${prototype_template}, "
"kConstantValueTable, base::size(kConstantValueTable));")
- constant_value_entries = filter(
- lambda entry: not entry.const_callback_name, constant_entries)
+ constant_value_entries = list(filter(
+ lambda entry: not entry.const_callback_name, constant_entries))
install_properties(table_name, constant_value_entries,
_make_constant_value_registration_table,
installer_call_text)
@@ -6336,8 +6338,8 @@ def make_v8_context_snapshot_api(cg_context, component, attribute_entries,
assert isinstance(component, web_idl.Component)
derived_interfaces = cg_context.interface.deriveds
- derived_names = map(lambda interface: interface.identifier,
- derived_interfaces)
+ derived_names = list(
+ map(lambda interface: interface.identifier, derived_interfaces))
derived_names.append(cg_context.interface.identifier)
if not ("Window" in derived_names or "HTMLDocument" in derived_names):
return None, None
@@ -6411,9 +6413,11 @@ def _make_v8_context_snapshot_get_reference_table_function(
collect_callbacks(named_properties_object_callback_defs)
collect_callbacks(cross_origin_property_callback_defs)
- entry_nodes = map(
- lambda name: TextNode("reinterpret_cast<intptr_t>({}),".format(name)),
- filter(None, callback_names))
+ entry_nodes = list(
+ map(
+ lambda name: TextNode("reinterpret_cast<intptr_t>({}),".format(name
+ )),
+ filter(None, callback_names)))
table_node = ListNode([
TextNode("using namespace ${class_name}Callbacks;"),
TextNode("static const intptr_t kReferenceTable[] = {"),
@@ -6451,10 +6455,11 @@ def _make_v8_context_snapshot_install_props_per_context_function(
class_name=None,
prop_install_mode=PropInstallMode.V8_CONTEXT_SNAPSHOT,
trampoline_var_name=None,
- attribute_entries=filter(selector, attribute_entries),
- constant_entries=filter(selector, constant_entries),
- exposed_construct_entries=filter(selector, exposed_construct_entries),
- operation_entries=filter(selector, operation_entries))
+ attribute_entries=list(filter(selector, attribute_entries)),
+ constant_entries=list(filter(selector, constant_entries)),
+ exposed_construct_entries=list(
+ filter(selector, exposed_construct_entries)),
+ operation_entries=list(filter(selector, operation_entries)))
return func_decl, func_def
@@ -6810,11 +6815,11 @@ def generate_interface(interface_identifier):
class_name=impl_class_name,
prop_install_mode=PropInstallMode.UNCONDITIONAL,
trampoline_var_name=tp_install_unconditional_props,
- attribute_entries=filter(is_unconditional, attribute_entries),
- constant_entries=filter(is_unconditional, constant_entries),
- exposed_construct_entries=filter(is_unconditional,
- exposed_construct_entries),
- operation_entries=filter(is_unconditional, operation_entries))
+ attribute_entries=list(filter(is_unconditional, attribute_entries)),
+ constant_entries=list(filter(is_unconditional, constant_entries)),
+ exposed_construct_entries=list(
+ filter(is_unconditional, exposed_construct_entries)),
+ operation_entries=list(filter(is_unconditional, operation_entries)))
(install_context_independent_props_decl,
install_context_independent_props_def,
install_context_independent_props_trampoline) = make_install_properties(
@@ -6823,11 +6828,14 @@ def generate_interface(interface_identifier):
class_name=impl_class_name,
prop_install_mode=PropInstallMode.CONTEXT_INDEPENDENT,
trampoline_var_name=tp_install_context_independent_props,
- attribute_entries=filter(is_context_independent, attribute_entries),
- constant_entries=filter(is_context_independent, constant_entries),
- exposed_construct_entries=filter(is_context_independent,
- exposed_construct_entries),
- operation_entries=filter(is_context_independent, operation_entries))
+ attribute_entries=list(
+ filter(is_context_independent, attribute_entries)),
+ constant_entries=list(filter(is_context_independent,
+ constant_entries)),
+ exposed_construct_entries=list(
+ filter(is_context_independent, exposed_construct_entries)),
+ operation_entries=list(
+ filter(is_context_independent, operation_entries)))
(install_context_dependent_props_decl, install_context_dependent_props_def,
install_context_dependent_props_trampoline) = make_install_properties(
cg_context,
@@ -6835,11 +6843,13 @@ def generate_interface(interface_identifier):
class_name=impl_class_name,
prop_install_mode=PropInstallMode.CONTEXT_DEPENDENT,
trampoline_var_name=tp_install_context_dependent_props,
- attribute_entries=filter(is_context_dependent, attribute_entries),
- constant_entries=filter(is_context_dependent, constant_entries),
- exposed_construct_entries=filter(is_context_dependent,
- exposed_construct_entries),
- operation_entries=filter(is_context_dependent, operation_entries))
+ attribute_entries=list(filter(is_context_dependent,
+ attribute_entries)),
+ constant_entries=list(filter(is_context_dependent, constant_entries)),
+ exposed_construct_entries=list(
+ filter(is_context_dependent, exposed_construct_entries)),
+ operation_entries=list(filter(is_context_dependent,
+ operation_entries)))
(install_interface_template_decl, install_interface_template_def,
install_interface_template_trampoline) = make_install_interface_template(
cg_context,
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/mako_renderer.py b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/mako_renderer.py
index b4c70553863..f3a2fcd772d 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/mako_renderer.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/mako_renderer.py
@@ -105,7 +105,7 @@ class MakoRenderer(object):
on_error = self._caller_stack_on_error
if (len(current) <= len(on_error)
and all(current[i] == on_error[i]
- for i in xrange(len(current)))):
+ for i in range(len(current)))):
pass # Error happened in a deeper caller.
else:
self._caller_stack_on_error = list(self._caller_stack)
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py
index dc3493cc394..017d3d47bb3 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py
@@ -70,8 +70,13 @@ def gn_format(contents, filename=None):
def _invoke_format_command(command_line, filename, contents):
- proc = subprocess.Popen(
- command_line, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
+ kwargs = {}
+ if sys.version_info.major != 2:
+ kwargs['encoding'] = 'utf-8'
+ proc = subprocess.Popen(command_line,
+ stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE,
+ **kwargs)
stdout_output, stderr_output = proc.communicate(input=contents)
exit_code = proc.wait()
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/task_queue.py b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/task_queue.py
index 0d8f4c0f303..e666a9b668e 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/task_queue.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/task_queue.py
@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import functools
import multiprocessing
from .package_initializer import package_initializer
@@ -76,7 +77,7 @@ class TaskQueue(object):
if not report_progress:
return
- done_count = reduce(
+ done_count = functools.reduce(
lambda count, worker_task: count + bool(worker_task.ready()),
self._worker_tasks, 0)
report_progress(len(self._worker_tasks), done_count)
@@ -85,4 +86,4 @@ class TaskQueue(object):
def _task_queue_run_tasks(tasks):
for task in tasks:
func, args, kwargs = task
- apply(func, args, kwargs)
+ func(*args, **kwargs)
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/code_generator.py b/chromium/third_party/blink/renderer/bindings/scripts/code_generator.py
index e8280be7213..e49e6eb965e 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/code_generator.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/code_generator.py
@@ -13,6 +13,7 @@ import re
import sys
from idl_types import set_ancestors, IdlType
+from itertools import groupby
from v8_globals import includes
from v8_interface import constant_filters
from v8_types import set_component_dirs
@@ -43,6 +44,7 @@ TEMPLATES_DIR = os.path.normpath(
# after path[0] == invoking script dir
sys.path.insert(1, THIRD_PARTY_DIR)
import jinja2
+from jinja2.filters import make_attrgetter, environmentfilter
def generate_indented_conditional(code, conditional):
@@ -88,6 +90,13 @@ def runtime_enabled_if(code, name):
return generate_indented_conditional(code, function)
+@environmentfilter
+def do_stringify_key_group_by(environment, value, attribute):
+ expr = make_attrgetter(environment, attribute)
+ key = lambda item: '' if expr(item) is None else str(expr(item))
+ return groupby(sorted(value, key=key), expr)
+
+
def initialize_jinja_env(cache_dir):
jinja_env = jinja2.Environment(
loader=jinja2.FileSystemLoader(TEMPLATES_DIR),
@@ -117,6 +126,7 @@ def initialize_jinja_env(cache_dir):
})
jinja_env.filters.update(constant_filters())
jinja_env.filters.update(method_filters())
+ jinja_env.filters["stringifykeygroupby"] = do_stringify_key_group_by
return jinja_env
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/generate_origin_trial_features.py b/chromium/third_party/blink/renderer/bindings/scripts/generate_origin_trial_features.py
index 130004eae83..04c0fabcef2 100755
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/generate_origin_trial_features.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/generate_origin_trial_features.py
@@ -80,7 +80,7 @@ def read_idl_file(reader, idl_filename):
assert len(interfaces) == 1, (
"Expected one interface in file %r, found %d" %
(idl_filename, len(interfaces)))
- return (interfaces.values()[0], includes)
+ return (list(interfaces.values())[0], includes)
def interface_is_global(interface):
@@ -281,7 +281,7 @@ def main():
info_provider = create_component_info_provider(
os.path.normpath(options.info_dir), options.target_component)
- idl_filenames = map(str.strip, open(options.idl_files_list))
+ idl_filenames = list(map(str.strip, open(options.idl_files_list)))
generate_origin_trial_features(info_provider, options, idl_filenames)
return 0
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/idl_definitions.py b/chromium/third_party/blink/renderer/bindings/scripts/idl_definitions.py
index 14e6e9d3f87..b027818aef2 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/idl_definitions.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_definitions.py
@@ -394,7 +394,8 @@ class IdlInterface(object):
else:
raise ValueError('Unrecognized node class: %s' % child_class)
- if len(filter(None, [self.iterable, self.maplike, self.setlike])) > 1:
+ if len(list(filter(None,
+ [self.iterable, self.maplike, self.setlike]))) > 1:
raise ValueError(
'Interface can only have one of iterable<>, maplike<> and setlike<>.'
)
@@ -512,6 +513,9 @@ class IdlAttribute(TypedObject):
def accept(self, visitor):
visitor.visit_attribute(self)
+ def __lt__(self, other):
+ return self.name < other.name
+
################################################################################
# Constants
@@ -852,7 +856,7 @@ class IdlIncludes(object):
################################################################################
-class Exposure:
+class Exposure(object):
"""An Exposure holds one Exposed or RuntimeEnabled condition.
Each exposure has two properties: exposed and runtime_enabled.
Exposure(e, r) corresponds to [Exposed(e r)]. Exposure(e) corresponds to
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/idl_reader.py b/chromium/third_party/blink/renderer/bindings/scripts/idl_reader.py
index 8d72865a6ca..b80eebdcd61 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/idl_reader.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_reader.py
@@ -55,8 +55,8 @@ def validate_blink_idl_definitions(idl_filename, idl_file_basename,
definitions. There is no filename convention in this case.
- Otherwise, an IDL file is invalid.
"""
- targets = (
- definitions.interfaces.values() + definitions.dictionaries.values())
+ targets = (list(definitions.interfaces.values()) +
+ list(definitions.dictionaries.values()))
number_of_targets = len(targets)
if number_of_targets > 1:
raise Exception(
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/idl_types.py b/chromium/third_party/blink/renderer/bindings/scripts/idl_types.py
index cd4f0c3513b..ab95e9c0b08 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/idl_types.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_types.py
@@ -349,7 +349,7 @@ class IdlUnionType(IdlTypeBase):
return True
def single_matching_member_type(self, predicate):
- matching_types = filter(predicate, self.flattened_member_types)
+ matching_types = list(filter(predicate, self.flattened_member_types))
if len(matching_types) > 1:
raise ValueError('%s is ambiguous.' % self.name)
return matching_types[0] if matching_types else None
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/utilities.py b/chromium/third_party/blink/renderer/bindings/scripts/utilities.py
index e1677ee7bd6..3c5006f064f 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/utilities.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/utilities.py
@@ -196,8 +196,9 @@ class ComponentInfoProviderModules(ComponentInfoProvider):
@property
def callback_functions(self):
- return dict(self._component_info_core['callback_functions'].items() +
- self._component_info_modules['callback_functions'].items())
+ return dict(
+ list(self._component_info_core['callback_functions'].items()) +
+ list(self._component_info_modules['callback_functions'].items()))
@property
def specifier_for_export(self):
@@ -209,8 +210,8 @@ class ComponentInfoProviderModules(ComponentInfoProvider):
def load_interfaces_info_overall_pickle(info_dir):
- with open(os.path.join(info_dir,
- 'interfaces_info.pickle')) as interface_info_file:
+ with open(os.path.join(info_dir, 'interfaces_info.pickle'),
+ mode='rb') as interface_info_file:
return pickle.load(interface_info_file)
@@ -236,23 +237,20 @@ def merge_dict_recursively(target, diff):
def create_component_info_provider_core(info_dir):
interfaces_info = load_interfaces_info_overall_pickle(info_dir)
- with open(
- os.path.join(info_dir, 'core',
- 'component_info_core.pickle')) as component_info_file:
+ with open(os.path.join(info_dir, 'core', 'component_info_core.pickle'),
+ mode='rb') as component_info_file:
component_info = pickle.load(component_info_file)
return ComponentInfoProviderCore(interfaces_info, component_info)
def create_component_info_provider_modules(info_dir):
interfaces_info = load_interfaces_info_overall_pickle(info_dir)
- with open(
- os.path.join(info_dir, 'core',
- 'component_info_core.pickle')) as component_info_file:
+ with open(os.path.join(info_dir, 'core', 'component_info_core.pickle'),
+ mode='rb') as component_info_file:
component_info_core = pickle.load(component_info_file)
- with open(
- os.path.join(
- info_dir, 'modules',
- 'component_info_modules.pickle')) as component_info_file:
+ with open(os.path.join(info_dir, 'modules',
+ 'component_info_modules.pickle'),
+ mode='rb') as component_info_file:
component_info_modules = pickle.load(component_info_file)
return ComponentInfoProviderModules(interfaces_info, component_info_core,
component_info_modules)
@@ -356,7 +354,7 @@ def write_pickle_file(pickle_filename, data):
pickle_filename = abs(pickle_filename)
# If |data| is same with the file content, we skip updating.
if os.path.isfile(pickle_filename):
- with open(pickle_filename) as pickle_file:
+ with open(pickle_filename, 'rb') as pickle_file:
try:
if pickle.load(pickle_file) == data:
return
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/v8_interface.py b/chromium/third_party/blink/renderer/bindings/scripts/v8_interface.py
index a43260414db..a85b03abe75 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/v8_interface.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_interface.py
@@ -189,7 +189,7 @@ def context_enabled_features(attributes):
return sorted([
member for member in members
if member.get(KEY) and not member.get('exposed_test')
- ])
+ ], key=lambda item: item['name'])
def member_filter_by_name(members, name):
return [member for member in members if member[KEY] == name]
@@ -612,7 +612,8 @@ def interface_context(interface, interfaces, component_info):
sorted(
origin_trial_features(interface, context['constants'],
context['attributes'], context['methods']) +
- context_enabled_features(context['attributes'])),
+ context_enabled_features(context['attributes']),
+ key=lambda item: item['name']),
})
if context['optional_features']:
includes.add('platform/bindings/v8_per_context_data.h')
@@ -1356,9 +1357,9 @@ def resolution_tests_methods(effective_overloads):
# Extract argument and IDL type to simplify accessing these in each loop.
arguments = [method['arguments'][index] for method in methods]
- arguments_methods = zip(arguments, methods)
+ arguments_methods = list(zip(arguments, methods))
idl_types = [argument['idl_type_object'] for argument in arguments]
- idl_types_methods = zip(idl_types, methods)
+ idl_types_methods = list(zip(idl_types, methods))
# We can’t do a single loop through all methods or simply sort them, because
# a method may be listed in multiple steps of the resolution algorithm, and
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/v8_methods.py b/chromium/third_party/blink/renderer/bindings/scripts/v8_methods.py
index 5f1f89a3def..6ee8a407798 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/v8_methods.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_methods.py
@@ -46,6 +46,10 @@ import v8_types
import v8_utilities
from v8_utilities import (has_extended_attribute_value, is_unforgeable)
+# TODO: Remove this once Python2 is obsoleted.
+if sys.version_info.major != 2:
+ basestring = str
+
def method_is_visible(method, interface_is_partial):
if 'overloads' in method:
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/v8_utilities.py b/chromium/third_party/blink/renderer/bindings/scripts/v8_utilities.py
index 2ecd6923320..fcfc48371b1 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/v8_utilities.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_utilities.py
@@ -271,7 +271,7 @@ EXPOSED_WORKERS = set([
])
-class ExposureSet:
+class ExposureSet(object):
"""An ExposureSet is a collection of Exposure instructions."""
def __init__(self, exposures=None):
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/web_idl/callback_interface.py b/chromium/third_party/blink/renderer/bindings/scripts/web_idl/callback_interface.py
index 13fb7c7068d..b73b7710687 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/web_idl/callback_interface.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/callback_interface.py
@@ -91,11 +91,13 @@ class CallbackInterface(UserDefinedType, WithExtendedAttributes,
for operation_ir in ir.operations
])
self._operation_groups = tuple([
- OperationGroup(
- operation_group_ir,
- filter(lambda x: x.identifier == operation_group_ir.identifier,
- self._operations),
- owner=self) for operation_group_ir in ir.operation_groups
+ OperationGroup(operation_group_ir,
+ list(
+ filter(
+ lambda x: x.identifier == operation_group_ir
+ .identifier, self._operations)),
+ owner=self)
+ for operation_group_ir in ir.operation_groups
])
@property
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/web_idl/database.py b/chromium/third_party/blink/renderer/bindings/scripts/web_idl/database.py
index c92cf48eb2a..f5d59129449 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/web_idl/database.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/database.py
@@ -156,4 +156,4 @@ class Database(object):
return self._view_by_kind(Database._Kind.UNION)
def _view_by_kind(self, kind):
- return self._impl.find_by_kind(kind).values()
+ return list(self._impl.find_by_kind(kind).values())
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/web_idl/exposure.py b/chromium/third_party/blink/renderer/bindings/scripts/web_idl/exposure.py
index abaeef39c30..e36cf7439ae 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/web_idl/exposure.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/exposure.py
@@ -8,8 +8,11 @@ from .runtime_enabled_features import RuntimeEnabledFeatures
class _Feature(str):
"""Represents a runtime-enabled feature."""
+ def __new__(cls, value):
+ return str.__new__(cls, value)
+
def __init__(self, value):
- str.__init__(self, value)
+ str.__init__(self)
self._is_context_dependent = (
RuntimeEnabledFeatures.is_context_dependent(self))
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/web_idl/function_like.py b/chromium/third_party/blink/renderer/bindings/scripts/web_idl/function_like.py
index 648c70d803d..1712f19c672 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/web_idl/function_like.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/function_like.py
@@ -71,8 +71,9 @@ class FunctionLike(WithIdentifier):
def num_of_required_arguments(self):
"""Returns the number of required arguments."""
return len(
- filter(lambda arg: not (arg.is_optional or arg.is_variadic),
- self.arguments))
+ list(
+ filter(lambda arg: not (arg.is_optional or arg.is_variadic),
+ self.arguments)))
class OverloadGroup(WithIdentifier):
@@ -171,8 +172,7 @@ class OverloadGroup(WithIdentifier):
Returns the effective overload set.
https://heycam.github.io/webidl/#compute-the-effective-overload-set
"""
- assert argument_count is None or isinstance(argument_count,
- (int, long))
+ assert argument_count is None or isinstance(argument_count, int)
N = argument_count
S = []
@@ -188,21 +188,21 @@ class OverloadGroup(WithIdentifier):
S.append(
OverloadGroup.EffectiveOverloadItem(
- X, map(lambda arg: arg.idl_type, X.arguments),
- map(lambda arg: arg.optionality, X.arguments)))
+ X, list(map(lambda arg: arg.idl_type, X.arguments)),
+ list(map(lambda arg: arg.optionality, X.arguments))))
if X.is_variadic:
- for i in xrange(n, max(maxarg, N)):
- t = map(lambda arg: arg.idl_type, X.arguments)
- o = map(lambda arg: arg.optionality, X.arguments)
- for _ in xrange(n, i + 1):
+ for i in range(n, max(maxarg, N)):
+ t = list(map(lambda arg: arg.idl_type, X.arguments))
+ o = list(map(lambda arg: arg.optionality, X.arguments))
+ for _ in range(n, i + 1):
t.append(X.arguments[-1].idl_type)
o.append(X.arguments[-1].optionality)
S.append(OverloadGroup.EffectiveOverloadItem(X, t, o))
- t = map(lambda arg: arg.idl_type, X.arguments)
- o = map(lambda arg: arg.optionality, X.arguments)
- for i in xrange(n - 1, -1, -1):
+ t = list(map(lambda arg: arg.idl_type, X.arguments))
+ o = list(map(lambda arg: arg.optionality, X.arguments))
+ for i in range(n - 1, -1, -1):
if X.arguments[i].optionality == IdlType.Optionality.REQUIRED:
break
S.append(OverloadGroup.EffectiveOverloadItem(X, t[:i], o[:i]))
@@ -222,7 +222,7 @@ class OverloadGroup(WithIdentifier):
for item in items)
assert len(items) > 1
- for index in xrange(len(items[0].type_list)):
+ for index in range(len(items[0].type_list)):
# Assume that the given items are valid, and we only need to test
# the two types.
if OverloadGroup.are_distinguishable_types(
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/web_idl/idl_compiler.py b/chromium/third_party/blink/renderer/bindings/scripts/web_idl/idl_compiler.py
index c5ee2bd8a3d..58315072480 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/web_idl/idl_compiler.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/idl_compiler.py
@@ -149,8 +149,8 @@ class IdlCompiler(object):
for old_ir in old_irs:
new_ir = make_copy(old_ir)
self._ir_map.add(new_ir)
- new_ir.attributes = filter(not_disabled, new_ir.attributes)
- new_ir.operations = filter(not_disabled, new_ir.operations)
+ new_ir.attributes = list(filter(not_disabled, new_ir.attributes))
+ new_ir.operations = list(filter(not_disabled, new_ir.operations))
def _record_defined_in_partial_and_mixin(self):
old_irs = self._ir_map.irs_of_kinds(
@@ -231,7 +231,7 @@ class IdlCompiler(object):
only_to_members_of_partial_or_mixin=False)
propagate_to_exposure(propagate)
- map(process_member_like, ir.iter_all_members())
+ list(map(process_member_like, ir.iter_all_members()))
def process_member_like(ir):
propagate = functools.partial(propagate_extattr, ir=ir)
@@ -257,7 +257,7 @@ class IdlCompiler(object):
self._ir_map.move_to_new_phase()
- map(process_interface_like, old_irs)
+ list(map(process_interface_like, old_irs))
def _determine_blink_headers(self):
irs = self._ir_map.irs_of_kinds(
@@ -422,9 +422,9 @@ class IdlCompiler(object):
assert not new_interface.deriveds
derived_set = identifier_to_derived_set.get(
new_interface.identifier, set())
- new_interface.deriveds = map(
- lambda id_: self._ref_to_idl_def_factory.create(id_),
- sorted(derived_set))
+ new_interface.deriveds = list(
+ map(lambda id_: self._ref_to_idl_def_factory.create(id_),
+ sorted(derived_set)))
def _supplement_missing_html_constructor_operation(self):
# Temporary mitigation of misuse of [HTMLConstructor]
@@ -553,7 +553,8 @@ class IdlCompiler(object):
self._ir_map.add(new_ir)
for group in new_ir.iter_all_overload_groups():
- exposures = map(lambda overload: overload.exposure, group)
+ exposures = list(map(lambda overload: overload.exposure,
+ group))
# [Exposed]
if any(not exposure.global_names_and_features
@@ -653,8 +654,8 @@ class IdlCompiler(object):
constructs = set()
for global_name in global_names:
constructs.update(exposed_map.get(global_name, []))
- new_ir.exposed_constructs = map(
- self._ref_to_idl_def_factory.create, sorted(constructs))
+ new_ir.exposed_constructs = list(
+ map(self._ref_to_idl_def_factory.create, sorted(constructs)))
assert not new_ir.legacy_window_aliases
if new_ir.identifier != 'Window':
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/web_idl/interface.py b/chromium/third_party/blink/renderer/bindings/scripts/web_idl/interface.py
index 65d24e529d1..067ef2eb0b2 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/web_idl/interface.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/interface.py
@@ -180,8 +180,9 @@ class Interface(UserDefinedType, WithExtendedAttributes, WithCodeGeneratorInfo,
self._constructor_groups = tuple([
ConstructorGroup(
group_ir,
- filter(lambda x: x.identifier == group_ir.identifier,
- self._constructors),
+ list(
+ filter(lambda x: x.identifier == group_ir.identifier,
+ self._constructors)),
owner=self) for group_ir in ir.constructor_groups
])
assert len(self._constructor_groups) <= 1
@@ -192,8 +193,9 @@ class Interface(UserDefinedType, WithExtendedAttributes, WithCodeGeneratorInfo,
self._named_constructor_groups = tuple([
ConstructorGroup(
group_ir,
- filter(lambda x: x.identifier == group_ir.identifier,
- self._named_constructors),
+ list(
+ filter(lambda x: x.identifier == group_ir.identifier,
+ self._named_constructors)),
owner=self) for group_ir in ir.named_constructor_groups
])
self._operations = tuple([
@@ -203,22 +205,23 @@ class Interface(UserDefinedType, WithExtendedAttributes, WithCodeGeneratorInfo,
self._operation_groups = tuple([
OperationGroup(
group_ir,
- filter(lambda x: x.identifier == group_ir.identifier,
- self._operations),
+ list(
+ filter(lambda x: x.identifier == group_ir.identifier,
+ self._operations)),
owner=self) for group_ir in ir.operation_groups
])
self._exposed_constructs = tuple(ir.exposed_constructs)
self._legacy_window_aliases = tuple(ir.legacy_window_aliases)
self._indexed_and_named_properties = None
- indexed_and_named_property_operations = filter(
- lambda x: x.is_indexed_or_named_property_operation,
- self._operations)
+ indexed_and_named_property_operations = list(
+ filter(lambda x: x.is_indexed_or_named_property_operation,
+ self._operations))
if indexed_and_named_property_operations:
self._indexed_and_named_properties = IndexedAndNamedProperties(
indexed_and_named_property_operations, owner=self)
self._stringifier = None
- stringifier_operation_irs = filter(lambda x: x.is_stringifier,
- ir.operations)
+ stringifier_operation_irs = list(
+ filter(lambda x: x.is_stringifier, ir.operations))
if stringifier_operation_irs:
assert len(stringifier_operation_irs) == 1
op_ir = make_copy(stringifier_operation_irs[0])
@@ -231,8 +234,9 @@ class Interface(UserDefinedType, WithExtendedAttributes, WithCodeGeneratorInfo,
attribute = None
if operation.stringifier_attribute:
attr_id = operation.stringifier_attribute
- attributes = filter(lambda x: x.identifier == attr_id,
- self._attributes)
+ attributes = list(
+ filter(lambda x: x.identifier == attr_id,
+ self._attributes))
assert len(attributes) == 1
attribute = attributes[0]
self._stringifier = Stringifier(operation, attribute, owner=self)
@@ -578,8 +582,9 @@ class Iterable(WithDebugInfo):
self._operation_groups = tuple([
OperationGroup(
group_ir,
- filter(lambda x: x.identifier == group_ir.identifier,
- self._operations),
+ list(
+ filter(lambda x: x.identifier == group_ir.identifier,
+ self._operations)),
owner=owner) for group_ir in ir.operation_groups
])
@@ -666,8 +671,9 @@ class Maplike(WithDebugInfo):
self._operation_groups = tuple([
OperationGroup(
group_ir,
- filter(lambda x: x.identifier == group_ir.identifier,
- self._operations),
+ list(
+ filter(lambda x: x.identifier == group_ir.identifier,
+ self._operations)),
owner=owner) for group_ir in ir.operation_groups
])
@@ -755,8 +761,9 @@ class Setlike(WithDebugInfo):
self._operation_groups = tuple([
OperationGroup(
group_ir,
- filter(lambda x: x.identifier == group_ir.identifier,
- self._operations),
+ list(
+ filter(lambda x: x.identifier == group_ir.identifier,
+ self._operations)),
owner=owner) for group_ir in ir.operation_groups
])
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/web_idl/ir_builder.py b/chromium/third_party/blink/renderer/bindings/scripts/web_idl/ir_builder.py
index e9aeff4ab82..d80554d603e 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/web_idl/ir_builder.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/ir_builder.py
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import sys
+
from .argument import Argument
from .ast_group import AstGroup
from .attribute import Attribute
@@ -30,6 +32,11 @@ from .operation import Operation
from .typedef import Typedef
+# TODO: Remove this once Python2 is obsoleted.
+if sys.version_info.major != 2:
+ long = int
+
+
def load_and_register_idl_definitions(filepaths, register_ir,
create_ref_to_idl_def, idl_type_factory):
"""
@@ -160,7 +167,7 @@ class _IRBuilder(object):
child_nodes = list(node.GetChildren())
extended_attributes = self._take_extended_attributes(child_nodes)
- members = map(self._build_interface_member, child_nodes)
+ members = list(map(self._build_interface_member, child_nodes))
attributes = []
constants = []
operations = []
@@ -302,7 +309,7 @@ class _IRBuilder(object):
child_nodes = list(node.GetChildren())
inherited = self._take_inheritance(child_nodes)
extended_attributes = self._take_extended_attributes(child_nodes)
- own_members = map(self._build_dictionary_member, child_nodes)
+ own_members = list(map(self._build_dictionary_member, child_nodes))
return Dictionary.IR(
identifier=Identifier(node.GetName()),
@@ -336,7 +343,7 @@ class _IRBuilder(object):
child_nodes = list(node.GetChildren())
extended_attributes = self._take_extended_attributes(child_nodes)
- members = map(self._build_interface_member, child_nodes)
+ members = list(map(self._build_interface_member, child_nodes))
constants = []
operations = []
for member in members:
@@ -456,8 +463,8 @@ class _IRBuilder(object):
assert len(child_nodes) == 1
child = child_nodes[0]
if child.GetClass() == 'Arguments':
- arguments = map(build_extattr_argument,
- child.GetChildren())
+ arguments = list(
+ map(build_extattr_argument, child.GetChildren()))
elif child.GetClass() == 'Call':
assert len(child.GetChildren()) == 1
grand_child = child.GetChildren()[0]
@@ -486,7 +493,9 @@ class _IRBuilder(object):
assert node.GetClass() == 'ExtAttributes'
return ExtendedAttributes(
- filter(None, map(build_extended_attribute, node.GetChildren())))
+ list(
+ filter(None, map(build_extended_attribute,
+ node.GetChildren()))))
def _build_inheritance(self, node):
assert node.GetClass() == 'Inherit'
@@ -506,7 +515,7 @@ class _IRBuilder(object):
def _build_iterable(self, node):
assert node.GetClass() == 'Iterable'
- types = map(self._build_type, node.GetChildren())
+ types = list(map(self._build_type, node.GetChildren()))
assert len(types) == 1 or len(types) == 2
if len(types) == 1: # value iterator
key_type, value_type = (None, types[0])
@@ -584,7 +593,7 @@ class _IRBuilder(object):
def _build_maplike(self, node, interface_identifier):
assert node.GetClass() == 'Maplike'
assert isinstance(interface_identifier, Identifier)
- types = map(self._build_type, node.GetChildren())
+ types = list(map(self._build_type, node.GetChildren()))
assert len(types) == 2
key_type, value_type = types
is_readonly = bool(node.GetProperty('READONLY'))
@@ -676,7 +685,7 @@ class _IRBuilder(object):
def _build_setlike(self, node, interface_identifier):
assert node.GetClass() == 'Setlike'
assert isinstance(interface_identifier, Identifier)
- types = map(self._build_type, node.GetChildren())
+ types = list(map(self._build_type, node.GetChildren()))
assert len(types) == 1
value_type = types[0]
is_readonly = bool(node.GetProperty('READONLY'))
@@ -838,7 +847,7 @@ class _IRBuilder(object):
def build_union_type(node, extended_attributes):
return self._idl_type_factory.union_type(
- member_types=map(self._build_type, node.GetChildren()),
+ member_types=list(map(self._build_type, node.GetChildren())),
is_optional=is_optional,
extended_attributes=extended_attributes,
debug_info=self._build_debug_info(node))
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/web_idl/make_copy.py b/chromium/third_party/blink/renderer/bindings/scripts/web_idl/make_copy.py
index a7a2b11f3f0..2f6b61300ff 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/web_idl/make_copy.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/make_copy.py
@@ -3,6 +3,13 @@
# found in the LICENSE file.
+import sys
+
+# TODO: Remove this once Python2 is obsoleted.
+if sys.version_info.major != 2:
+ long = int
+ basestring = str
+
def make_copy(obj, memo=None):
"""
Creates a copy of the given object, which should be an IR or part of IR.
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/web_idl/namespace.py b/chromium/third_party/blink/renderer/bindings/scripts/web_idl/namespace.py
index eeabef97cbe..bd7e98907f3 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/scripts/web_idl/namespace.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/namespace.py
@@ -107,11 +107,13 @@ class Namespace(UserDefinedType, WithExtendedAttributes, WithCodeGeneratorInfo,
for operation_ir in ir.operations
])
self._operation_groups = tuple([
- OperationGroup(
- operation_group_ir,
- filter(lambda x: x.identifier == operation_group_ir.identifier,
- self._operations),
- owner=self) for operation_group_ir in ir.operation_groups
+ OperationGroup(operation_group_ir,
+ list(
+ filter(
+ lambda x: x.identifier == operation_group_ir
+ .identifier, self._operations)),
+ owner=self)
+ for operation_group_ir in ir.operation_groups
])
@property
diff --git a/chromium/third_party/blink/renderer/bindings/templates/dictionary_v8.cc.tmpl b/chromium/third_party/blink/renderer/bindings/templates/dictionary_v8.cc.tmpl
index 0add9c45a38..dc910f6d227 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/bindings/templates/dictionary_v8.cc.tmpl
+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/templates/dictionary_v8.cc.tmpl
@@ -59,9 +59,9 @@ void {{v8_class}}::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8_value, {
DCHECK(executionContext);
{% endif %}{# has_origin_trial_members #}
{% endif %}{# members #}
- {% for origin_trial_test, origin_trial_member_list in members | groupby('origin_trial_feature_name') %}
+ {% for origin_trial_test, origin_trial_member_list in members | stringifykeygroupby('origin_trial_feature_name') %}
{% filter origin_trial_enabled(origin_trial_test, "executionContext") %}
- {% for feature_name, member_list in origin_trial_member_list | groupby('runtime_enabled_feature_name') %}
+ {% for feature_name, member_list in origin_trial_member_list | stringifykeygroupby('runtime_enabled_feature_name') %}
{% filter runtime_enabled(feature_name) %}
{% for member in member_list %}
v8::Local<v8::Value> {{member.v8_value}};
@@ -147,9 +147,9 @@ bool toV8{{cpp_class}}(const {{cpp_class}}* impl, v8::Local<v8::Object> dictiona
DCHECK(executionContext);
{% endif %}{# has_origin_trial_members #}
{% endif %}{# members #}
- {% for origin_trial_test, origin_trial_member_list in members | groupby('origin_trial_feature_name') %}
+ {% for origin_trial_test, origin_trial_member_list in members | stringifykeygroupby('origin_trial_feature_name') %}
{% filter origin_trial_enabled(origin_trial_test, "executionContext") %}
- {% for feature_name, member_list in origin_trial_member_list | groupby('runtime_enabled_feature_name') %}
+ {% for feature_name, member_list in origin_trial_member_list | stringifykeygroupby('runtime_enabled_feature_name') %}
{% filter runtime_enabled(feature_name) %}
{% for member in member_list %}
v8::Local<v8::Value> {{member.v8_value}};
diff --git a/chromium/third_party/blink/renderer/build/scripts/core/css/make_style_shorthands.py b/chromium/third_party/blink/renderer/build/scripts/core/css/make_style_shorthands.py
index 1799cd5a153..5f43ffabc26 100755
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/build/scripts/core/css/make_style_shorthands.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/core/css/make_style_shorthands.py
@@ -71,7 +71,7 @@ class Expansion(object):
def enabled_longhands(self):
include = lambda longhand: not longhand[
'runtime_flag'] or self.is_enabled(longhand['runtime_flag'])
- return filter(include, self._longhands)
+ return list(filter(include, self._longhands))
@property
def index(self):
@@ -87,8 +87,9 @@ class Expansion(object):
def create_expansions(longhands):
flags = collect_runtime_flags(longhands)
- expansions = map(lambda mask: Expansion(longhands, flags, mask),
- range(1 << len(flags)))
+ expansions = list(
+ map(lambda mask: Expansion(longhands, flags, mask),
+ range(1 << len(flags))))
assert len(expansions) > 0
# We generate 2^N expansions for N flags, so enforce some limit.
assert len(flags) <= 4, 'Too many runtime flags for a single shorthand'
@@ -114,14 +115,14 @@ class StylePropertyShorthandWriter(json5_generator.Writer):
self._longhand_dictionary = defaultdict(list)
for property_ in json5_properties.shorthands:
- property_['longhand_enum_keys'] = map(enum_key_for_css_property,
- property_['longhands'])
- property_['longhand_property_ids'] = map(id_for_css_property,
- property_['longhands'])
-
- longhands = map(
- lambda name: json5_properties.properties_by_name[name],
- property_['longhands'])
+ property_['longhand_enum_keys'] = list(
+ map(enum_key_for_css_property, property_['longhands']))
+ property_['longhand_property_ids'] = list(
+ map(id_for_css_property, property_['longhands']))
+
+ longhands = list(
+ map(lambda name: json5_properties.properties_by_name[name],
+ property_['longhands']))
property_['expansions'] = create_expansions(longhands)
for longhand_enum_key in property_['longhand_enum_keys']:
self._longhand_dictionary[longhand_enum_key].append(property_)
diff --git a/chromium/third_party/blink/renderer/build/scripts/core/css/properties/make_css_property_instances.py b/chromium/third_party/blink/renderer/build/scripts/core/css/properties/make_css_property_instances.py
index 75030ac577e..f72aadee17d 100755
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/build/scripts/core/css/properties/make_css_property_instances.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/core/css/properties/make_css_property_instances.py
@@ -42,8 +42,8 @@ class CSSPropertyInstancesWriter(json5_generator.Writer):
aliases = self._css_properties.aliases
# Lists of PropertyClassData.
- self._property_classes_by_id = map(self.get_class, properties)
- self._alias_classes_by_id = map(self.get_class, aliases)
+ self._property_classes_by_id = list(map(self.get_class, properties))
+ self._alias_classes_by_id = list(map(self.get_class, aliases))
# Sort by enum value.
self._property_classes_by_id.sort(key=lambda t: t.enum_value)
diff --git a/chromium/third_party/blink/renderer/build/scripts/gperf.py b/chromium/third_party/blink/renderer/build/scripts/gperf.py
index 5ee49056be4..db72660d471 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/build/scripts/gperf.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py
@@ -95,7 +95,7 @@ def main():
open(args.output_file, 'wb').write(
generate_gperf(gperf_path,
- open(infile).read(), gperf_args))
+ open(infile).read(), gperf_args).encode('utf-8'))
if __name__ == '__main__':
diff --git a/chromium/third_party/blink/renderer/build/scripts/in_file.py b/chromium/third_party/blink/renderer/build/scripts/in_file.py
index 28adc050f1e..58113483e57 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/build/scripts/in_file.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/in_file.py
@@ -66,7 +66,7 @@ class InFile(object):
self._defaults = defaults
self._valid_values = copy.deepcopy(
valid_values if valid_values else {})
- self._parse(map(str.strip, lines))
+ self._parse(list(map(str.strip, lines)))
@classmethod
def load_from_files(self, file_paths, defaults, valid_values,
diff --git a/chromium/third_party/blink/renderer/build/scripts/in_generator.py b/chromium/third_party/blink/renderer/build/scripts/in_generator.py
index e46740a2e85..ab1981ad1e3 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/build/scripts/in_generator.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/in_generator.py
@@ -32,10 +32,15 @@ import os
import os.path
import shlex
import shutil
+import sys
import optparse
from in_file import InFile
+# TODO: Remove this once Python2 is obsoleted.
+if sys.version_info.major != 2:
+ basestring = str
+
#########################################################
# This is now deprecated - use json5_generator.py instead
diff --git a/chromium/third_party/blink/renderer/build/scripts/make_runtime_features.py b/chromium/third_party/blink/renderer/build/scripts/make_runtime_features.py
index cafe8d94a8e..6925a4fa580 100755
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/build/scripts/make_runtime_features.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/make_runtime_features.py
@@ -138,7 +138,7 @@ class RuntimeFeatureWriter(BaseRuntimeFeatureWriter):
except Exception:
# If trouble unpickling, overwrite
pass
- with open(os.path.abspath(file_name), 'w') as pickle_file:
+ with open(os.path.abspath(file_name), 'wb') as pickle_file:
pickle.dump(features_map, pickle_file)
def _template_inputs(self):
diff --git a/chromium/third_party/blink/renderer/build/scripts/templates/element_factory.cc.tmpl b/chromium/third_party/blink/renderer/build/scripts/templates/element_factory.cc.tmpl
index dc3f44c5b10..3eefcf9f0ee 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/build/scripts/templates/element_factory.cc.tmpl
+++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_factory.cc.tmpl
@@ -26,7 +26,7 @@ using {{namespace}}FunctionMap = HashMap<AtomicString, {{namespace}}ConstructorF
static {{namespace}}FunctionMap* g_{{namespace|lower}}_constructors = nullptr;
-{% for tag in tags|sort if not tag.noConstructor %}
+{% for tag in tags|sort(attribute='name') if not tag.noConstructor %}
static {{namespace}}Element* {{namespace}}{{tag.name.to_upper_camel_case()}}Constructor(
Document& document, const CreateElementFlags flags) {
{% if tag.runtimeEnabled %}
@@ -52,7 +52,7 @@ static void Create{{namespace}}FunctionMap() {
// Empty array initializer lists are illegal [dcl.init.aggr] and will not
// compile in MSVC. If tags list is empty, add check to skip this.
static const Create{{namespace}}FunctionMapData data[] = {
- {% for tag in tags|sort if not tag.noConstructor %}
+ {% for tag in tags|sort(attribute='name') if not tag.noConstructor %}
{ {{cpp_namespace}}::{{tag|symbol}}Tag, {{namespace}}{{tag.name.to_upper_camel_case()}}Constructor },
{% endfor %}
};
diff --git a/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.cc.tmpl b/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.cc.tmpl
index 9bfc489e048..5f86184e879 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.cc.tmpl
+++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.cc.tmpl
@@ -22,7 +22,7 @@ HTMLTypeMap CreateHTMLTypeMap() {
const char* name;
HTMLElementType type;
} kTags[] = {
- {% for tag in tags|sort %}
+ {% for tag in tags|sort(attribute='name') %}
{ "{{tag.name}}", HTMLElementType::k{{tag.js_interface}} },
{% endfor %}
};
@@ -42,7 +42,7 @@ HTMLElementType htmlElementTypeForTag(const AtomicString& tagName, const Documen
if (it == html_type_map.end())
return HTMLElementType::kHTMLUnknownElement;
- {% for tag in tags|sort %}
+ {% for tag in tags|sort(attribute='name') %}
{% if tag.runtimeEnabled %}
if (tagName == "{{tag.name}}") {
if (!RuntimeEnabledFeatures::{{tag.runtimeEnabled}}Enabled(document->GetExecutionContext())) {
diff --git a/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.h.tmpl b/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.h.tmpl
index 1b5297d52dc..edecc81d9d4 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.h.tmpl
+++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.h.tmpl
@@ -15,7 +15,7 @@ namespace blink {
class Document;
// Type checking.
-{% for tag in tags|sort if not tag.multipleTagNames and not tag.noTypeHelpers %}
+{% for tag in tags|sort(attribute='name') if not tag.multipleTagNames and not tag.noTypeHelpers %}
class {{tag.interface}};
template <>
inline bool IsElementOfType<const {{tag.interface}}>(const Node& node) {
diff --git a/chromium/third_party/blink/renderer/build/scripts/templates/macros.tmpl b/chromium/third_party/blink/renderer/build/scripts/templates/macros.tmpl
index 0244433af2e..dcdbb02a56c 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/build/scripts/templates/macros.tmpl
+++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/macros.tmpl
@@ -25,7 +25,7 @@
{% macro trie_leaf(index, object, return_macro, lowercase_data) %}
-{% set name, value = object.items()[0] %}
+{% set name, value = (object.items()|list)[0] %}
{% if name|length %}
if (
{%- for c in name -%}
@@ -45,7 +45,7 @@ return {{ return_macro(value) }};
{% macro trie_switch(trie, index, return_macro, lowercase_data) %}
-{% if trie|length == 1 and trie.values()[0] is string %}
+{% if trie|length == 1 and (trie.values()|list)[0] is string %}
{{ trie_leaf(index, trie, return_macro, lowercase_data) -}}
{% else %}
{% if lowercase_data %}
diff --git a/chromium/third_party/blink/renderer/build/scripts/templates/make_qualified_names.h.tmpl b/chromium/third_party/blink/renderer/build/scripts/templates/make_qualified_names.h.tmpl
index cb05c6c4315..bd5566b03e7 100644
--- a/src/3rdparty/chromium/chromium/third_party/blink/renderer/build/scripts/templates/make_qualified_names.h.tmpl
+++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/make_qualified_names.h.tmpl
@@ -24,12 +24,12 @@ namespace {{cpp_namespace}} {
{{symbol_export}}extern const WTF::AtomicString& {{namespace_prefix}}NamespaceURI;
// Tags
-{% for tag in tags|sort %}
+{% for tag in tags|sort(attribute='name') %}
{{symbol_export}}extern const blink::{{namespace}}QualifiedName& {{tag|symbol}}Tag;
{% endfor %}
// Attributes
-{% for attr in attrs|sort %}
+{% for attr in attrs|sort(attribute='name') %}
{{symbol_export}}extern const blink::QualifiedName& {{attr|symbol}}Attr;
{% endfor %}
diff --git a/chromium/third_party/dawn/generator/generator_lib.py b/chromium/third_party/dawn/generator/generator_lib.py
index 5e3734d7833..e3d46bd194f 100644
--- a/src/3rdparty/chromium/chromium/third_party/dawn/generator/generator_lib.py
+++ b/src/3rdparty/chromium/third_party/dawn/generator/generator_lib.py
@@ -201,6 +201,10 @@ def _compute_python_dependencies(root_dir=None):
paths = set()
for path in module_paths:
+ # Builtin/namespaced modules may return None for the file path.
+ if not path:
+ continue
+
path = os.path.abspath(path)
if not path.startswith(root_dir):
diff --git a/chromium/third_party/devtools-frontend/src/BUILD.gn b/chromium/third_party/devtools-frontend/src/BUILD.gn
index cd488e88b60..ea1dc3d9a79 100644
--- a/src/3rdparty/chromium/chromium/third_party/devtools-frontend/src/BUILD.gn
+++ b/src/3rdparty/chromium/third_party/devtools-frontend/src/BUILD.gn
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/config/python.gni")
+
import("//third_party/blink/public/public_features.gni")
import("./all_devtools_files.gni")
import("./all_devtools_modules.gni")
diff --git a/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py b/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py
index d6666e8b74f..0f7a661e632 100644
--- a/src/3rdparty/chromium/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py
+++ b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py
@@ -45,7 +45,8 @@ def rollup(input_path, output_path, filename, max_size, rollup_plugin):
['--format', 'iife', '-n', 'InspectorOverlay'] + ['--input', target] +
['--plugin', rollup_plugin],
stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
+ stderr=subprocess.PIPE,
+ text=True)
out, error = rollup_process.communicate()
if not out:
raise Exception("rollup failed: " + error)
diff --git a/chromium/third_party/devtools-frontend/src/scripts/build/build_release_applications.py b/chromium/third_party/devtools-frontend/src/scripts/build/build_release_applications.py
index fa8e73d34af..7d0b84b2171 100644
--- a/src/3rdparty/chromium/chromium/third_party/devtools-frontend/src/scripts/build/build_release_applications.py
+++ b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_release_applications.py
@@ -10,7 +10,7 @@ Builds applications in release mode:
and the application loader into a single script.
"""
-from cStringIO import StringIO
+from io import StringIO
from os import path
from os.path import join
import copy
@@ -145,8 +145,7 @@ class ReleaseBuilder(object):
resource_content = read_file(path.join(self.application_dir, resource_name))
if not (resource_name.endswith('.html')
or resource_name.endswith('md')):
- resource_content += resource_source_url(resource_name).encode(
- 'utf-8')
+ resource_content += resource_source_url(resource_name)
resource_content = resource_content.replace('\\', '\\\\')
resource_content = resource_content.replace('\n', '\\n')
resource_content = resource_content.replace('"', '\\"')
@@ -173,7 +172,9 @@ class ReleaseBuilder(object):
def _concatenate_application_script(self, output):
output.write('Root.allDescriptors.push(...%s);' % self._release_module_descriptors())
if self.descriptors.extends:
- output.write('Root.applicationDescriptor.modules.push(...%s);' % json.dumps(self.descriptors.application.values()))
+ output.write(
+ 'Root.applicationDescriptor.modules.push(...%s);' %
+ json.dumps(list(self.descriptors.application.values())))
else:
output.write('Root.applicationDescriptor = %s;' % self.descriptors.application_json())
diff --git a/chromium/third_party/devtools-frontend/src/scripts/build/generate_devtools_grd.py b/chromium/third_party/devtools-frontend/src/scripts/build/generate_devtools_grd.py
index be510c48d76..c6a59c90298 100644
--- a/src/3rdparty/chromium/chromium/third_party/devtools-frontend/src/scripts/build/generate_devtools_grd.py
+++ b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/generate_devtools_grd.py
@@ -123,7 +123,7 @@ def main(argv):
try:
os.makedirs(path.join(output_directory, 'Images'))
- except OSError, e:
+ except OSError as e:
if e.errno != errno.EEXIST:
raise e
@@ -147,7 +147,7 @@ def main(argv):
shutil.copy(path.join(dirname, filename), path.join(output_directory, 'Images'))
add_file_to_grd(doc, path.join('Images', filename))
- with open(parsed_args.output_filename, 'w') as output_file:
+ with open(parsed_args.output_filename, 'wb') as output_file:
output_file.write(doc.toxml(encoding='UTF-8'))
diff --git a/chromium/third_party/devtools-frontend/src/scripts/build/modular_build.py b/chromium/third_party/devtools-frontend/src/scripts/build/modular_build.py
index 0ba695d3810..bb1da2f9f8d 100644
--- a/src/3rdparty/chromium/chromium/third_party/devtools-frontend/src/scripts/build/modular_build.py
+++ b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/modular_build.py
@@ -7,6 +7,8 @@
Utilities for the modular DevTools build.
"""
+from __future__ import print_function
+
import collections
from os import path
import os
@@ -40,7 +42,7 @@ def load_and_parse_json(filename):
try:
return json.loads(read_file(filename))
except:
- print 'ERROR: Failed to parse %s' % filename
+ print('ERROR: Failed to parse %s' % filename)
raise
class Descriptors:
@@ -57,7 +59,7 @@ class Descriptors:
def application_json(self):
result = dict()
- result['modules'] = self.application.values()
+ result['modules'] = list(self.application.values())
return json.dumps(result)
def all_compiled_files(self):
diff --git a/chromium/third_party/jinja2/tests.py b/chromium/third_party/jinja2/tests.py
index 0adc3d4dbcb..b14f85ff148 100644
--- a/src/3rdparty/chromium/chromium/third_party/jinja2/tests.py
+++ b/src/3rdparty/chromium/third_party/jinja2/tests.py
@@ -10,7 +10,7 @@
"""
import operator
import re
-from collections import Mapping
+from collections.abc import Mapping
from jinja2.runtime import Undefined
from jinja2._compat import text_type, string_types, integer_types
import decimal
diff --git a/chromium/tools/metrics/ukm/gen_builders.py b/chromium/tools/metrics/ukm/gen_builders.py
index f9f61d90a56..44e46fae8cc 100755
--- a/src/3rdparty/chromium/chromium/tools/metrics/ukm/gen_builders.py
+++ b/src/3rdparty/chromium/tools/metrics/ukm/gen_builders.py
@@ -48,9 +48,10 @@ def ReadFilteredData(path):
data = ukm_model.UKM_XML_TYPE.Parse(ukm_file.read())
event_tag = ukm_model._EVENT_TYPE.tag
metric_tag = ukm_model._METRIC_TYPE.tag
- data[event_tag] = filter(ukm_model.IsNotObsolete, data[event_tag])
+ data[event_tag] = list(filter(ukm_model.IsNotObsolete, data[event_tag]))
for event in data[event_tag]:
- event[metric_tag] = filter(ukm_model.IsNotObsolete, event[metric_tag])
+ event[metric_tag] = list(
+ filter(ukm_model.IsNotObsolete, event[metric_tag]))
return data
diff --git a/chromium/ui/ozone/generate_constructor_list.py b/chromium/ui/ozone/generate_constructor_list.py
index 8d800636c97..04fa18e93df 100755
--- a/src/3rdparty/chromium/chromium/ui/ozone/generate_constructor_list.py
+++ b/src/3rdparty/chromium/ui/ozone/generate_constructor_list.py
@@ -45,12 +45,15 @@ Example Output: ./ui/ozone/generate_constructor_list.py \
} // namespace ui
"""
+try:
+ from StringIO import StringIO # for Python 2
+except ImportError:
+ from io import StringIO # for Python 3
import optparse
import os
import collections
import re
import sys
-import string
def GetTypedefName(typename):
@@ -68,7 +71,7 @@ def GetConstructorName(typename, platform):
This is just "Create" + typename + platform.
"""
- return 'Create' + typename + string.capitalize(platform)
+ return 'Create' + typename + platform.capitalize()
def GenerateConstructorList(out, namespace, export, typenames, platforms,
@@ -163,12 +166,14 @@ def main(argv):
sys.exit(1)
# Write to standard output or file specified by --output_cc.
- out_cc = sys.stdout
+ out_cc = getattr(sys.stdout, 'buffer', sys.stdout)
if options.output_cc:
out_cc = open(options.output_cc, 'wb')
- GenerateConstructorList(out_cc, options.namespace, options.export,
+ out_cc_str = StringIO()
+ GenerateConstructorList(out_cc_str, options.namespace, options.export,
typenames, platforms, includes, usings)
+ out_cc.write(out_cc_str.getvalue().encode('utf-8'))
if options.output_cc:
out_cc.close()
diff --git a/chromium/ui/ozone/generate_ozone_platform_list.py b/chromium/ui/ozone/generate_ozone_platform_list.py
index d47c398259b..2702b68b9bd 100755
--- a/src/3rdparty/chromium/chromium/ui/ozone/generate_ozone_platform_list.py
+++ b/src/3rdparty/chromium/ui/ozone/generate_ozone_platform_list.py
@@ -49,12 +49,15 @@ Example Output: ./generate_ozone_platform_list.py --default wayland dri wayland
"""
+try:
+ from StringIO import StringIO # for Python 2
+except ImportError:
+ from io import StringIO # for Python 3
import optparse
import os
import collections
import re
import sys
-import string
def GetConstantName(name):
@@ -63,7 +66,7 @@ def GetConstantName(name):
We just capitalize the platform name and prepend "CreateOzonePlatform".
"""
- return 'kPlatform' + string.capitalize(name)
+ return 'kPlatform' + name.capitalize()
def GeneratePlatformListText(out, platforms):
@@ -149,9 +152,9 @@ def main(argv):
platforms.insert(0, options.default)
# Write to standard output or file specified by --output_{cc,h}.
- out_cc = sys.stdout
- out_h = sys.stdout
- out_txt = sys.stdout
+ out_cc = getattr(sys.stdout, 'buffer', sys.stdout)
+ out_h = getattr(sys.stdout, 'buffer', sys.stdout)
+ out_txt = getattr(sys.stdout, 'buffer', sys.stdout)
if options.output_cc:
out_cc = open(options.output_cc, 'wb')
if options.output_h:
@@ -159,9 +162,16 @@ def main(argv):
if options.output_txt:
out_txt = open(options.output_txt, 'wb')
- GeneratePlatformListText(out_txt, platforms)
- GeneratePlatformListHeader(out_h, platforms)
- GeneratePlatformListSource(out_cc, platforms)
+ out_txt_str = StringIO()
+ out_h_str = StringIO()
+ out_cc_str = StringIO()
+
+ GeneratePlatformListText(out_txt_str, platforms)
+ out_txt.write(out_txt_str.getvalue().encode('utf-8'))
+ GeneratePlatformListHeader(out_h_str, platforms)
+ out_h.write(out_h_str.getvalue().encode('utf-8'))
+ GeneratePlatformListSource(out_cc_str, platforms)
+ out_cc.write(out_cc_str.getvalue().encode('utf-8'))
if options.output_cc:
out_cc.close()
--
2.35.1
Tenth, changes to the configury from Arch via gentoo, altered
to invoke python3 for BLFS where python would only be python2.
That appears to be from an earlier version of qtwebengine.
Origin Arch (Antonio Rojas <arojas@archlinux.org>) via gentoo
Purpose - build with python i.e. python3
Modified by self to use python3 for BLFS and adapted for 5.15.10.
diff -Naur a/configure.pri b/configure.pri
--- a/configure.pri 2022-06-13 21:16:56.000000000 +0100
+++ b/configure.pri 2022-06-21 19:05:13.726504528 +0100
@@ -7,20 +7,7 @@
equals(QMAKE_HOST.os, Windows): EXE_SUFFIX = .exe
defineTest(isPythonVersionSupported) {
- python = $$system_quote($$system_path($$1))
- python_version = $$system('$$python -c "import sys; print(sys.version_info[0:3])"')
- python_version ~= s/[()]//g
- python_version = $$split(python_version, ',')
- python_major_version = $$first(python_version)
- greaterThan(python_major_version, 2) {
- qtLog("Python version 3 is not supported by Chromium.")
- return(false)
- }
- python_minor_version = $$member(python_version, 1)
- python_patch_version = $$member(python_version, 2)
- greaterThan(python_major_version, 1): greaterThan(python_minor_version, 6): greaterThan(python_patch_version, 4): return(true)
- qtLog("Unsupported python version: $${python_major_version}.$${python_minor_version}.$${python_patch_version}.")
- return(false)
+ return(true)
}
defineTest(qtConfTest_detectJumboBuild) {
@@ -52,22 +39,21 @@
qtConfReportPadded($${1}, $$mergeLimit)
}
-defineTest(qtConfTest_detectPython2) {
- python = $$qtConfFindInPath("python2$$EXE_SUFFIX")
- isEmpty(python) {
- qtLog("'python2$$EXE_SUFFIX' not found in PATH. Checking for 'python$$EXE_SUFFIX'.")
- python = $$qtConfFindInPath("python$$EXE_SUFFIX")
+defineTest(qtConfTest_detectPython) {
+ python = $$qtConfFindInPath("python3$$EXE_SUFFIX")
+ isEmpty(python) {
+ qtLog("'python3$$EXE_SUFFIX' not found in PATH. Checking for 'python3$$EXE_SUFFIX'.")
}
isEmpty(python) {
- qtLog("'python$$EXE_SUFFIX' not found in PATH. Giving up.")
+ qtLog("'python3$$EXE_SUFFIX' not found in PATH. Giving up.")
return(false)
}
!isPythonVersionSupported($$python) {
- qtLog("A suitable Python 2 executable could not be located.")
+ qtLog("A suitable Python3 executable could not be located.")
return(false)
}
- # Make tests.python2.location available in configure.json.
+ # Make tests.python.location available in configure.json.
$${1}.location = $$clean_path($$python)
export($${1}.location)
$${1}.cache += location
diff -Naur a/src/buildtools/configure.json b/src/buildtools/configure.json
--- a/src/buildtools/configure.json 2022-06-13 21:16:56.000000000 +0100
+++ b/src/buildtools/configure.json 2022-06-21 19:08:18.543038154 +0100
@@ -295,9 +295,9 @@
"label": "system ninja",
"type": "detectNinja"
},
- "webengine-python2": {
- "label": "python2",
- "type": "detectPython2",
+ "webengine-python": {
+ "label": "python3",
+ "type": "detectPython",
"log": "location"
},
"webengine-winversion": {
@@ -374,7 +374,7 @@
&& features.webengine-gperf
&& features.webengine-bison
&& features.webengine-flex
- && features.webengine-python2
+ && features.webengine-python
&& features.webengine-nodejs
&& (!config.sanitizer || features.webengine-sanitizer)
&& (!config.linux || features.pkg-config)
@@ -400,7 +400,7 @@
&& features.webengine-gperf
&& features.webengine-bison
&& features.webengine-flex
- && features.webengine-python2
+ && features.webengine-python
&& (!config.sanitizer || features.webengine-sanitizer)
&& (!config.linux || features.pkg-config)
&& (!config.linux || features.webengine-host-pkg-config)
@@ -423,12 +423,12 @@
"autoDetect": "features.private_tests",
"output": [ "privateFeature" ]
},
- "webengine-python2": {
- "label": "python2",
- "condition": "tests.webengine-python2",
+ "webengine-python": {
+ "label": "python3",
+ "condition": "tests.webengine-python",
"output": [
"privateFeature",
- { "type": "varAssign", "name": "QMAKE_PYTHON2", "value": "tests.webengine-python2.location" }
+ { "type": "varAssign", "name": "QMAKE_PYTHON2", "value": "tests.webengine-python.location" }
]
},
"webengine-gperf": {
Eleventh, a first patch from gentoo to remove the need to build catapult
which will not be updated from python2,
https://github.com/catapult-project/catapult/issues/4599
From b0581c62625e57a63e56369f7eb24a141687cc7a Mon Sep 17 00:00:00 2001
From: Jimi Huotari <chiitoo@gentoo.org>
Date: Wed, 6 Apr 2022 14:35:14 +0300
Subject: [PATCH] Remove dependency on catapult
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
---
chromium/BUILD.gn | 11 ----
chromium/chrome/chrome_paks.gni | 2 -
chromium/chrome/test/BUILD.gn | 6 ---
chromium/content/browser/BUILD.gn | 1 -
chromium/content/browser/tracing/BUILD.gn | 51 -------------------
.../content/browser/tracing/tracing_ui.cc | 3 --
chromium/content/shell/BUILD.gn | 2 -
chromium/fuchsia/engine/BUILD.gn | 2 -
chromium/headless/BUILD.gn | 2 -
chromium/mojo/public/tools/BUILD.gn | 1 -
chromium/testing/BUILD.gn | 1 -
chromium/third_party/webrtc/test/BUILD.gn | 5 --
chromium/tools/binary_size/BUILD.gn | 1 -
chromium/tools/grit/BUILD.gn | 1 -
chromium/tools/gritsettings/resource_ids.spec | 6 ---
chromium/tools/metrics/BUILD.gn | 1 -
.../perf/chrome_telemetry_build/BUILD.gn | 3 --
.../perf/core/perfetto_binary_roller/BUILD.gn | 1 -
chromium/tools/polymer/BUILD.gn | 1 -
chromium/v8/tools/BUILD.gn | 4 --
chromium/weblayer/shell/BUILD.gn | 2 -
21 files changed, 107 deletions(-)
delete mode 100644 chromium/content/browser/tracing/BUILD.gn
diff --git a/chromium/BUILD.gn b/chromium/BUILD.gn
index 8d9657d545c..59e9447f456 100644
--- a/src/3rdparty/chromium/BUILD.gn
+++ b/src/3rdparty/chromium/BUILD.gn
@@ -239,7 +239,6 @@ group("gn_all") {
"//media/capture:capture_unittests",
"//media/cast:cast_unittests",
"//third_party/angle/src/tests:angle_white_box_tests",
- "//third_party/catapult/telemetry:bitmaptools($host_toolchain)",
]
} else if (is_ios && !use_qt) {
deps += [
@@ -354,7 +353,6 @@ group("gn_all") {
"//net/android:net_junit_tests",
"//services:services_junit_tests",
"//testing/android/junit:junit_unit_tests",
- "//third_party/catapult/devil",
"//third_party/smhasher:murmurhash3",
"//tools/android:android_tools",
"//tools/android:memconsumer",
@@ -959,7 +957,6 @@ if (is_chromeos) {
"//third_party/dawn/src/tests:dawn_unittests",
# Blocked on https://github.com/catapult-project/catapult/issues/2297
- #"//third_party/catapult/telemetry:bitmaptools",
"//tools/perf/clear_system_cache",
"//ui/ozone/gl:ozone_gl_unittests",
]
@@ -1037,7 +1034,6 @@ if (!is_ios && !use_qt) {
data_deps = [
"//chrome:chrome",
"//chrome/test/chromedriver",
- "//third_party/catapult/third_party/typ",
]
if (is_win) {
data_deps += [ "//build/win:copy_cdb_to_output" ]
@@ -1084,7 +1080,6 @@ if (!is_ios && !use_qt) {
"//third_party/blink/public:blink_devtools_inspector_resources",
"//third_party/blink/public/mojom:mojom_platform_js_data_deps",
"//third_party/blink/renderer/core/html:js_files_for_form_controls_web_tests",
- "//third_party/catapult/third_party/typ",
"//third_party/mesa_headers",
"//tools/imagediff",
]
@@ -1152,7 +1147,6 @@ if (!is_ios && !use_qt) {
if (is_android) {
data += [
- "//third_party/catapult/",
"//build/android/",
]
}
@@ -1259,11 +1253,6 @@ if (!is_ios && !use_qt) {
"//third_party/blink/web_tests/StaleTestExpectations",
"//third_party/blink/web_tests/TestExpectations",
"//third_party/blink/web_tests/VirtualTestSuites",
- "//third_party/catapult/common/py_utils/",
- "//third_party/catapult/devil/",
- "//third_party/catapult/dependency_manager/",
- "//third_party/catapult/third_party/zipfile/",
- "//third_party/catapult/third_party/typ/",
"//third_party/depot_tools/pylint",
"//third_party/depot_tools/pylint-1.5",
"//third_party/depot_tools/pylint_main.py",
diff --git a/chromium/chrome/chrome_paks.gni b/chromium/chrome/chrome_paks.gni
index 9323a774a56..0362b6501aa 100644
--- a/src/3rdparty/chromium/chrome/chrome_paks.gni
+++ b/src/3rdparty/chromium/chrome/chrome_paks.gni
@@ -94,7 +94,6 @@ template("chrome_extra_paks") {
"$root_gen_dir/chrome/common_resources.pak",
"$root_gen_dir/components/autofill/core/browser/autofill_address_rewriter_resources.pak",
"$root_gen_dir/components/components_resources.pak",
- "$root_gen_dir/content/browser/tracing/tracing_resources.pak",
"$root_gen_dir/content/content_resources.pak",
"$root_gen_dir/mojo/public/js/mojo_bindings_resources.pak",
"$root_gen_dir/net/net_resources.pak",
@@ -110,7 +109,6 @@ template("chrome_extra_paks") {
"//components/autofill/core/browser:autofill_address_rewriter_resources",
"//components/resources",
"//content:content_resources",
- "//content/browser/tracing:resources",
"//mojo/public/js:resources",
"//net:net_resources",
"//skia:skia_resources",
diff --git a/chromium/chrome/test/BUILD.gn b/chromium/chrome/test/BUILD.gn
index 1a369fa56d2..eb5bc9676fb 100644
--- a/src/3rdparty/chromium/chrome/test/BUILD.gn
+++ b/src/3rdparty/chromium/chrome/test/BUILD.gn
@@ -7103,8 +7103,6 @@ if (!is_fuchsia && !is_android) {
"//chrome/test/data/password/captured_sites/",
"//chrome/test/data/web_page_replay_go_helper_scripts/automation_helper.js",
"//components/test/data/autofill/web_page_replay_support_files/",
- "//third_party/catapult/telemetry/telemetry/bin/",
- "//third_party/catapult/web_page_replay_go/deterministic.js",
]
if (is_linux || is_chromeos || is_win) {
@@ -7141,7 +7139,6 @@ if (!is_fuchsia && !is_android) {
# TODO(uwyiming@chromium.org) create a gn target for Web Page Replay Go (WPR Go) and only WPR Go.
# So that test targets requiring WPR Go does not pull down the whole telemetry tool chain.
- "//third_party/catapult:telemetry_chrome_test_support",
"//third_party/hunspell",
"//third_party/icu",
"//third_party/libpng",
@@ -7171,7 +7168,6 @@ if (!is_fuchsia && !is_android) {
deps = [ "//tools/perf/chrome_telemetry_build:telemetry_chrome_test" ]
data = [
- "//third_party/catapult/telemetry/telemetry/internal/bin/",
"//tools/perf/run_telemetry_tests",
# For isolate contract.
@@ -7189,7 +7185,6 @@ if (!is_fuchsia && !is_android) {
group("telemetry_gpu_unittests") {
testonly = true
deps = [
- "//third_party/catapult:telemetry_chrome_test_support",
"//tools/metrics:metrics_python_tests",
]
data = [
@@ -7313,7 +7308,6 @@ if (is_mac || is_win || is_android) {
"//testing/scripts",
"//testing/test_env.py",
"//testing/xvfb.py",
- "//third_party/catapult",
"//tools",
]
}
diff --git a/chromium/content/browser/BUILD.gn b/chromium/content/browser/BUILD.gn
index 1466f33d462..51039e0da19 100644
--- a/src/3rdparty/chromium/content/browser/BUILD.gn
+++ b/src/3rdparty/chromium/content/browser/BUILD.gn
@@ -2169,7 +2169,6 @@ jumbo_static_library("browser") {
if (!is_android) {
deps += [
"//components/vector_icons",
- "//content/browser/tracing:resources",
]
}
diff --git a/chromium/content/browser/tracing/BUILD.gn b/chromium/content/browser/tracing/BUILD.gn
deleted file mode 100644
index eac05999fac..00000000000
--- a/src/3rdparty/chromium/content/browser/tracing/BUILD.gn
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import("//tools/grit/grit_rule.gni")
-
-# generate_about_tracing puts its files in this directory
-tracing_gen_dir = "$root_gen_dir/content/browser/tracing"
-
-# The script just writes filename with no dirs to the .grd, so we always need
-# this file to be in the same directory as the inputs.
-tracing_grd = "$tracing_gen_dir/tracing_resources.grd"
-
-action("generate_tracing_grd") {
- visibility = [ ":*" ] # Depend on ":resources" to get this.
- script = "generate_trace_viewer_grd.py"
-
- input_pages = [
- "$tracing_gen_dir/about_tracing.html",
- "$tracing_gen_dir/about_tracing.js",
- ]
- inputs = input_pages
- outputs = [ tracing_grd ]
-
- args = rebase_path(input_pages, target_gen_dir) + [
- "--output",
- rebase_path(tracing_grd, root_build_dir),
- ]
-
- deps = [ "//third_party/catapult/tracing:generate_about_tracing" ]
-}
-
-grit("resources") {
- source = tracing_grd
-
- # Required because the .grd is generated.
- enable_input_discovery_for_gn_analyze = false
-
- outputs = [
- "grit/tracing_resources.h",
- "tracing_resources.pak",
- ]
-
- # resource_ids has an entry for our .grd file that looks like:
- # "<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.grd"
- # and what we pass here should make that resolve to our .grd file.
- defines =
- [ "SHARED_INTERMEDIATE_DIR=" + rebase_path(root_gen_dir, root_build_dir) ]
-
- deps = [ ":generate_tracing_grd" ]
-}
diff --git a/chromium/content/browser/tracing/tracing_ui.cc b/chromium/content/browser/tracing/tracing_ui.cc
index 2bffb5eb3b0..8965922dfba 100644
--- a/src/3rdparty/chromium/content/browser/tracing/tracing_ui.cc
+++ b/src/3rdparty/chromium/content/browser/tracing/tracing_ui.cc
@@ -27,7 +27,6 @@
#include "base/strings/stringprintf.h"
#include "base/trace_event/trace_event.h"
#include "base/values.h"
-#include "content/browser/tracing/grit/tracing_resources.h"
#include "content/browser/tracing/tracing_controller_impl.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
@@ -242,8 +241,6 @@ TracingUI::TracingUI(WebUI* web_ui)
WebUIDataSource* source = WebUIDataSource::Create(kChromeUITracingHost);
source->DisableTrustedTypesCSP();
source->UseStringsJs();
- source->SetDefaultResource(IDR_TRACING_HTML);
- source->AddResourcePath("tracing.js", IDR_TRACING_JS);
source->SetRequestFilter(base::BindRepeating(OnShouldHandleRequest),
base::BindRepeating(OnTracingRequest));
WebUIDataSource::Add(browser_context, source);
diff --git a/chromium/content/shell/BUILD.gn b/chromium/content/shell/BUILD.gn
index 56c0e8b48e3..6e4ffbe962d 100644
--- a/src/3rdparty/chromium/content/shell/BUILD.gn
+++ b/src/3rdparty/chromium/content/shell/BUILD.gn
@@ -390,7 +390,6 @@ repack("pak") {
sources = [
"$root_gen_dir/content/app/resources/content_resources_100_percent.pak",
"$root_gen_dir/content/browser/resources/media/media_internals_resources.pak",
- "$root_gen_dir/content/browser/tracing/tracing_resources.pak",
"$root_gen_dir/content/browser/webrtc/resources/webrtc_internals_resources.pak",
"$root_gen_dir/content/content_resources.pak",
"$root_gen_dir/content/dev_ui_content_resources.pak",
@@ -413,7 +412,6 @@ repack("pak") {
"//content:dev_ui_content_resources",
"//content/app/resources",
"//content/browser/resources/media:media_internals_resources",
- "//content/browser/tracing:resources",
"//content/browser/webrtc/resources",
"//mojo/public/js:resources",
"//net:net_resources",
diff --git a/chromium/fuchsia/engine/BUILD.gn b/chromium/fuchsia/engine/BUILD.gn
index a502b7fc273..39df2a7028a 100644
--- a/src/3rdparty/chromium/fuchsia/engine/BUILD.gn
+++ b/src/3rdparty/chromium/fuchsia/engine/BUILD.gn
@@ -43,7 +43,6 @@ repack("web_engine_pak") {
"$root_gen_dir/components/components_resources.pak",
"$root_gen_dir/components/strings/components_strings_en-US.pak",
"$root_gen_dir/content/app/resources/content_resources_100_percent.pak",
- "$root_gen_dir/content/browser/tracing/tracing_resources.pak",
"$root_gen_dir/content/content_resources.pak",
"$root_gen_dir/content/dev_ui_content_resources.pak",
"$root_gen_dir/mojo/public/js/mojo_bindings_resources.pak",
@@ -66,7 +65,6 @@ repack("web_engine_pak") {
"//content:content_resources",
"//content:dev_ui_content_resources",
"//content/app/resources",
- "//content/browser/tracing:resources",
"//gpu/command_buffer/service",
"//mojo/public/js:resources",
"//net:net_resources",
diff --git a/chromium/headless/BUILD.gn b/chromium/headless/BUILD.gn
index d2ab76aed32..15e4b78009d 100644
--- a/src/3rdparty/chromium/headless/BUILD.gn
+++ b/src/3rdparty/chromium/headless/BUILD.gn
@@ -37,7 +37,6 @@ repack("pak") {
"$root_gen_dir/components/components_resources.pak",
"$root_gen_dir/components/strings/components_strings_en-US.pak",
"$root_gen_dir/content/app/resources/content_resources_100_percent.pak",
- "$root_gen_dir/content/browser/tracing/tracing_resources.pak",
"$root_gen_dir/content/content_resources.pak",
"$root_gen_dir/content/dev_ui_content_resources.pak",
"$root_gen_dir/headless/headless_lib_resources.pak",
@@ -65,7 +64,6 @@ repack("pak") {
"//content:content_resources",
"//content:dev_ui_content_resources",
"//content/app/resources",
- "//content/browser/tracing:resources",
"//mojo/public/js:resources",
"//net:net_resources",
"//third_party/blink/public:resources",
diff --git a/chromium/mojo/public/tools/BUILD.gn b/chromium/mojo/public/tools/BUILD.gn
index 4c68350b399..1cc01256f00 100644
--- a/src/3rdparty/chromium/mojo/public/tools/BUILD.gn
+++ b/src/3rdparty/chromium/mojo/public/tools/BUILD.gn
@@ -14,5 +14,4 @@ group("mojo_python_unittests") {
"//testing/xvfb.py",
]
deps = [ "//mojo/public/tools/mojom/mojom:tests" ]
- data_deps = [ "//third_party/catapult/third_party/typ/" ]
}
diff --git a/chromium/testing/BUILD.gn b/chromium/testing/BUILD.gn
index 56ebf8d46c9..7d51bc0ccf7 100644
--- a/src/3rdparty/chromium/testing/BUILD.gn
+++ b/src/3rdparty/chromium/testing/BUILD.gn
@@ -27,7 +27,6 @@ group("run_perf_test") {
data_deps = [
":test_scripts_shared",
- "//third_party/catapult/tracing:convert_chart_json",
]
if (is_android) {
diff --git a/chromium/third_party/webrtc/test/BUILD.gn b/chromium/third_party/webrtc/test/BUILD.gn
index 58d3dab5219..48328298d2e 100644
--- a/src/3rdparty/chromium/third_party/webrtc/test/BUILD.gn
+++ b/src/3rdparty/chromium/third_party/webrtc/test/BUILD.gn
@@ -258,10 +258,6 @@ rtc_library("perf_test") {
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
if (rtc_enable_protobuf) {
sources += [ "testsupport/perf_test_histogram_writer.cc" ]
- deps += [
- "//third_party/catapult/tracing/tracing:histogram",
- "//third_party/catapult/tracing/tracing:reserved_infos",
- ]
} else {
sources += [ "testsupport/perf_test_histogram_writer_no_protobuf.cc" ]
}
@@ -566,7 +562,6 @@ if (rtc_include_tests) {
if (rtc_enable_protobuf) {
sources += [ "testsupport/perf_test_histogram_writer_unittest.cc" ]
- deps += [ "//third_party/catapult/tracing/tracing:histogram" ]
}
data = test_support_unittests_resources
diff --git a/chromium/tools/binary_size/BUILD.gn b/chromium/tools/binary_size/BUILD.gn
index e6806bf7754..2c985d15fab 100644
--- a/src/3rdparty/chromium/tools/binary_size/BUILD.gn
+++ b/src/3rdparty/chromium/tools/binary_size/BUILD.gn
@@ -18,7 +18,6 @@ python_library("binary_size_trybot_py") {
python_library("sizes_py") {
testonly = true
pydeps_file = "sizes.pydeps"
- data_deps = [ "//third_party/catapult/tracing:convert_chart_json" ]
}
if (is_linux || is_chromeos) {
diff --git a/chromium/tools/grit/BUILD.gn b/chromium/tools/grit/BUILD.gn
index 1cd3c75b553..60c4cf2f77a 100644
--- a/src/3rdparty/chromium/tools/grit/BUILD.gn
+++ b/src/3rdparty/chromium/tools/grit/BUILD.gn
@@ -33,7 +33,6 @@ group("grit_python_unittests") {
"//testing/scripts/run_isolated_script_test.py",
"//testing/xvfb.py",
"//tools/grit/",
- "//third_party/catapult/third_party/typ/",
]
}
diff --git a/chromium/tools/gritsettings/resource_ids.spec b/chromium/tools/gritsettings/resource_ids.spec
index d0a4545514c..80b0bf1737b 100644
--- a/src/3rdparty/chromium/tools/gritsettings/resource_ids.spec
+++ b/src/3rdparty/chromium/tools/gritsettings/resource_ids.spec
@@ -499,12 +499,6 @@
"content/shell/shell_resources.grd": {
"includes": [2940],
},
-
- # This file is generated during the build.
- "<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.grd": {
- "META": {"sizes": {"includes": [20],}},
- "includes": [2960],
- },
# END content/ section.
# START ios/web/ section.
diff --git a/chromium/tools/metrics/BUILD.gn b/chromium/tools/metrics/BUILD.gn
index 846d5248bfa..cb57d2bdae1 100644
--- a/src/3rdparty/chromium/tools/metrics/BUILD.gn
+++ b/src/3rdparty/chromium/tools/metrics/BUILD.gn
@@ -56,7 +56,6 @@ group("metrics_python_tests") {
"//testing/scripts/common.py",
"//testing/xvfb.py",
"//testing/test_env.py",
- "//third_party/catapult/third_party/typ/",
# Scripts we depend on. Their unit tests are also included.
"//tools/json_comment_eater/json_comment_eater.py",
diff --git a/chromium/tools/perf/chrome_telemetry_build/BUILD.gn b/chromium/tools/perf/chrome_telemetry_build/BUILD.gn
index 280bb754c2c..c287fdcebb3 100644
--- a/src/3rdparty/chromium/tools/perf/chrome_telemetry_build/BUILD.gn
+++ b/src/3rdparty/chromium/tools/perf/chrome_telemetry_build/BUILD.gn
@@ -107,7 +107,6 @@ group("telemetry_chrome_test_without_chrome") {
"//tools/perf/core/", # chrome_telemetry_build/ depends on core/
]
data_deps = [
- "//third_party/catapult:telemetry_chrome_test_support",
"//tools/metrics:metrics_python_tests",
]
@@ -151,7 +150,5 @@ group("telemetry_chrome_test_without_chrome") {
"//build/android:devil_chromium_py",
"//build/android:stack_tools",
]
- } else if (!is_fuchsia) {
- data_deps += [ "//third_party/catapult/telemetry:bitmaptools" ]
}
}
diff --git a/chromium/tools/perf/core/perfetto_binary_roller/BUILD.gn b/chromium/tools/perf/core/perfetto_binary_roller/BUILD.gn
index 7fe48cba143..e9c7f0261a5 100644
--- a/src/3rdparty/chromium/tools/perf/core/perfetto_binary_roller/BUILD.gn
+++ b/src/3rdparty/chromium/tools/perf/core/perfetto_binary_roller/BUILD.gn
@@ -7,7 +7,6 @@ import("//build/util/generate_wrapper.gni")
generate_wrapper("upload_trace_processor") {
testonly = true
data_deps = [
- "//third_party/catapult:telemetry_chrome_test_support",
"//third_party/perfetto/src/trace_processor:trace_processor_shell",
]
data = [
diff --git a/chromium/tools/polymer/BUILD.gn b/chromium/tools/polymer/BUILD.gn
index 092066b7c04..d115144cd61 100644
--- a/src/3rdparty/chromium/tools/polymer/BUILD.gn
+++ b/src/3rdparty/chromium/tools/polymer/BUILD.gn
@@ -10,6 +10,5 @@ group("polymer_tools_python_unittests") {
"//testing/scripts/run_isolated_script_test.py",
"//testing/xvfb.py",
"//tools/polymer/",
- "//third_party/catapult/third_party/typ/",
]
}
diff --git a/chromium/v8/tools/BUILD.gn b/chromium/v8/tools/BUILD.gn
index 2f8197dd369..83304b6342b 100644
--- a/src/3rdparty/chromium/v8/tools/BUILD.gn
+++ b/src/3rdparty/chromium/v8/tools/BUILD.gn
@@ -31,10 +31,6 @@ group("v8_android_test_runner_deps") {
if (is_android && !build_with_chromium) {
data_deps = [ "//build/android:test_runner_py" ]
- data = [
- # This is used by android.py, but not included by test_runner_py above.
- "//third_party/catapult/devil/devil/android/perf/",
- ]
}
}
diff --git a/chromium/weblayer/shell/BUILD.gn b/chromium/weblayer/shell/BUILD.gn
index 66984a7da54..1815fad623d 100644
--- a/src/3rdparty/chromium/weblayer/shell/BUILD.gn
+++ b/src/3rdparty/chromium/weblayer/shell/BUILD.gn
@@ -161,7 +161,6 @@ repack("support_pak") {
"$root_gen_dir/components/strings/components_locale_settings_en-US.pak",
"$root_gen_dir/components/strings/components_strings_en-US.pak",
"$root_gen_dir/content/app/resources/content_resources_100_percent.pak",
- "$root_gen_dir/content/browser/tracing/tracing_resources.pak",
"$root_gen_dir/content/content_resources.pak",
"$root_gen_dir/content/dev_ui_content_resources.pak",
"$root_gen_dir/mojo/public/js/mojo_bindings_resources.pak",
@@ -182,7 +181,6 @@ repack("support_pak") {
"//content:content_resources",
"//content:dev_ui_content_resources",
"//content/app/resources",
- "//content/browser/tracing:resources",
"//mojo/public/js:resources",
"//net:net_resources",
"//third_party/blink/public:resources",
--
2.35.1
Twelfth, the second gentoo patch to remove the dependnecy on catapult.
From b60fc250d65144532cd47eac72279e93baaec2b8 Mon Sep 17 00:00:00 2001
From: Jimi Huotari <chiitoo@gentoo.org>
Date: Wed, 6 Apr 2022 14:35:14 +0300
Subject: [PATCH] Remove dependency on catapult
---
src/core/qtwebengine_resources.gni | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/core/qtwebengine_resources.gni b/src/core/qtwebengine_resources.gni
index 3bf1a5d57..29fd2603c 100644
--- a/src/core/qtwebengine_resources.gni
+++ b/src/core/qtwebengine_resources.gni
@@ -27,7 +27,6 @@ repack("qtwebengine_repack_resources") {
"$root_gen_dir/components/components_resources.pak",
"$root_gen_dir/components/dev_ui_components_resources.pak",
"$root_gen_dir/content/browser/resources/media/media_internals_resources.pak",
- "$root_gen_dir/content/browser/tracing/tracing_resources.pak",
"$root_gen_dir/content/content_resources.pak",
"$root_gen_dir/content/dev_ui_content_resources.pak",
"$root_gen_dir/mojo/public/js/mojo_bindings_resources.pak",
@@ -44,7 +43,6 @@ repack("qtwebengine_repack_resources") {
"//components/resources:components_resources_grit",
"//components/resources:dev_ui_components_resources_grit",
"//content/browser/resources/media:media_internals_resources",
- "//content/browser/tracing:resources",
"//content:content_resources_grit",
"//content:dev_ui_content_resources_grit",
"//mojo/public/js:resources",
--
2.35.1
|