From 4d13a3ef24aafd2f956fc2e3975c41c70bab2e81 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 20 May 2021 10:56:14 +0200 Subject: [PATCH 001/132] Blacklist handleError on macos until we merge the fix Task-number: QTBUG-91232 Change-Id: I4de316a35b235566b56d5fc6520347b5be4a0b7f Reviewed-by: Michal Klocek --- tests/auto/widgets/certificateerror/BLACKLIST | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tests/auto/widgets/certificateerror/BLACKLIST diff --git a/tests/auto/widgets/certificateerror/BLACKLIST b/tests/auto/widgets/certificateerror/BLACKLIST new file mode 100644 index 00000000000..9b4d3e1c678 --- /dev/null +++ b/tests/auto/widgets/certificateerror/BLACKLIST @@ -0,0 +1,2 @@ +[handleError] +macos # QTBUG-91232 From f69c1859b5fffb4ea886bf0adec65bb7c58446b2 Mon Sep 17 00:00:00 2001 From: Tarja Sundqvist Date: Thu, 20 May 2021 15:47:07 +0300 Subject: [PATCH 002/132] Bump version from 5.15.4 to 5.15.5 Change-Id: I98fee3bf2665112a5a7ca4f7170cddeab74d3bc7 Reviewed-by: Allan Sandfeld Jensen --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index d5e64505d65..ddb23399c20 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -5,4 +5,4 @@ QTWEBENGINE_OUT_ROOT = $$shadowed($$PWD) load(qt_build_config) CONFIG += warning_clean -MODULE_VERSION = 5.15.4 +MODULE_VERSION = 5.15.5 From 2240a3f8ebcd317e11fac446aec14bc004067cd9 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 21 May 2021 13:52:40 +0200 Subject: [PATCH 003/132] Update Chromium Submodule src/3rdparty 1d3b13e9..dc35950b: > FIXUP: third_party perfetto: add missing include for clang, asan and no_pch > Bump V8_PATCH_LEVEL > Fix build with GCC 11 Fixes: QTBUG-93744 Change-Id: If79bfb844f03052eab4d11018f07357b383626a7 Reviewed-by: Kirill Burtsev --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 1d3b13e9634..dc35950b9ee 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 1d3b13e963467a19ebdd515431464771f513f6ef +Subproject commit dc35950b9eed3be05c4dc747720f495148ffe14b From 99c2125de9944f020e087d564ab0c9c9877ae6ad Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Mon, 10 May 2021 09:40:52 +0200 Subject: [PATCH 004/132] Fix not working certificates on mac > 10.14 From macOS 10.15 onwards there are new security requirements for TLS server certificates: https://support.apple.com/en-us/HT210176 Now all certificates without required fields are reported as NET::ERR_CERT_INVALID and there is no way to 'bypass' this error. Our test expects ERR_CERT_AUTHORITY_INVALID value, for which browsers have an visual option to bypass. 'Fix' certificate by adding new required fields: * Subject Alternative Name * Extended Key Usage Generate a new certificate chain with two certificates, where the server certificate has the extension config file in the form of: [SAN] subjectAltName=DNS:webengine.qt.io extendedKeyUsage=serverAuth Use 2048 bit for private key, otherwise tests fail on ubuntu. Task-number: QTBUG-91230 Change-Id: I81d878cf3cae3e9fcc51bfbf250fba9185ca4b01 Reviewed-by: Allan Sandfeld Jensen (cherry picked from commit 035579f424e5b69cee212d23fda3467f5db8d19e) --- tests/auto/shared/resources/cert.pem | 97 +++++++------------ tests/auto/shared/resources/key.pem | 50 +++++----- tests/auto/widgets/certificateerror/BLACKLIST | 2 - .../certificateerror/tst_certificateerror.cpp | 4 +- 4 files changed, 64 insertions(+), 89 deletions(-) delete mode 100644 tests/auto/widgets/certificateerror/BLACKLIST diff --git a/tests/auto/shared/resources/cert.pem b/tests/auto/shared/resources/cert.pem index 3aaaf289ca9..a201ed08eb3 100644 --- a/tests/auto/shared/resources/cert.pem +++ b/tests/auto/shared/resources/cert.pem @@ -1,64 +1,41 @@ -----BEGIN CERTIFICATE----- -MIIEpDCCAoygAwIBAgIUO90aty9AMjvBvzfUhr1WwdBrKkMwDQYJKoZIhvcNAQEL -BQAwfzELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcM -DVNhbiBGcmFuY2lzY28xDzANBgNVBAoMBkJhZFNTTDEyMDAGA1UEAwwpQmFkU1NM -IEludGVybWVkaWF0ZSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMTkwODI2MTQ0 -NDIxWhcNMTkwODI3MTQ0NDIxWjBjMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2Fs -aWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzEPMA0GA1UECgwGQmFkU1NM -MRYwFAYDVQQDDA0qLmJhZHNzbC50ZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A -MIIBCgKCAQEAkybT/L4zJCqefpd+eYT6aQ0PtobQfFgP+n+z5wWoUxIAJnjb5ZW4 -7IJxka/2/ggzJOfrUBur54LkTfFQ+yX85eKYCuH0GLz+Rve50LDn0ya6qSgmEhDG -0bend2tMZY+Nl3B+5Ane1vua8hdJjv3ZO3e5UgpQwysL54eYyhEWWlbFWF11LhEd -MYp953UGLqoV4Mlw+Li8TmFwdKQx6icgBTuloXLzk9aUU+b6NbXdadNXkmzg09IC -sb8pnMXiF2P9Xm5rK0IoiRkSHxVnU12nQXh65Ns/2Dj5DcbHmVdvallfr4wnLeFP -UotysZnvFmE7FLMSr/eQfkTG+Jlb7ZhoGwIDAQABozQwMjAJBgNVHRMEAjAAMCUG -A1UdEQQeMByCDSouYmFkc3NsLnRlc3SCC2JhZHNzbC50ZXN0MA0GCSqGSIb3DQEB -CwUAA4ICAQA7Yc+QQzqSK15ibmaYrkqq+cumggsWLCprW8jvzhpWBt9IjToP5nsy -sKinYPoZR8jvZ1YVotcts7uQT7DkqeWkB+l+88c7gQdgujvBo6v9/g+jrXFKgsJD -IBmkho8hpd63Slqv2Yp4bYT20O5EvR9CQvwSkwTs+ylBNEs1Q+AbekxmBjuYUxHn -9xL4/GZ6ufoNv676iCoXo4mnDrCD8e8MRiZoU9Lq4G41HGiLWV0tM/M6BdVJYGzl -FcBg0ZKnQT9OCWEPRe3zyRS6a+MivPAzxS8z/kYaRN+C7H68Mib3xPDsEETz1MnO -uzGAPHAAgtYWYJi+CaaNWkgAv4n+UIQa0oyqPn4z5hLcsO+nMBws2Sg0mkQLilBX -N1ciCdVMi7sHKuLa7GVksq/RQrXnZcQhoYQRrZAaAHKbxyo/M2pNqmDiFJppdH7a -6Rj2vYf6ig/FXAzDGsDvf/tsGCxgJTFzGly+GsWVe40vyjfWHxWWDU/eGjfGO05k -Xzjm+kYGJnH2hfiIlX1Jeu/jjIodiSy31F0hvuKlJu8PfaQ7oo5neRzwRO6Wq9rR -7DMsQN6OtXGnnA+ogC0korA+aXev6wzbwYUhzMf1YTzEjrFNIXeIHsQSzq6lPcIE -JOly5wjyO/eNF7mpHyDX8brY6Hn+bgyDeKAmsUvhOCEXgaPpKlP4gQ== +MIIDezCCAmOgAwIBAgIUFZEIIzeR7lEA10rb14w7MfhP87MwDQYJKoZIhvcNAQEL +BQAwWjELMAkGA1UEBhMCREUxDzANBgNVBAgMBkJlcmxpbjEPMA0GA1UEBwwGQmVy +bGluMRUwEwYDVQQKDAxUaGVRdENvbXBhbnkxEjAQBgNVBAsMCXdlYmVuZ2luZTAe +Fw0yMTA1MTAyMTM1MTJaFw0yMjA1MTAyMTM1MTJaMGAxCzAJBgNVBAYTAkRFMQ8w +DQYDVQQIDAZCZXJsaW4xDzANBgNVBAcMBkJlcmxpbjEVMBMGA1UECgwMVGhlUXRD +b21wYW55MRgwFgYDVQQDDA93ZWJlbmdpbmUucXQuaW8wggEiMA0GCSqGSIb3DQEB +AQUAA4IBDwAwggEKAoIBAQCoDKAU8bkgstvcbnUPQ4g3gqmbm3c6HWcHJOe+LWQz +P6wIEF0JK6C3g2cqQHqSIa0wSysSbX/GDwGR9ul63e/f6MCJ1GmO8IhKrLdn0PVy +AIUzjqGKhv8C8tmmohOICCxTh8nhq64gqEWmUgasgoy/aAryFqgEYGhFQPVEz6Kv +CMSvpM1dNC3YCn467Gznc0s+EA6C6al/PNFHz9SZuF6f4bkyEf5dPPOt6IKXPZXo +Dv148mPLW5Dw0nv19445YENGLNENbDGyc13bgaOSm9xpPBp+IrpV2p65v5dO2IHl +E9qXaicKPRNANydppx5yX/OZRawgU2Q0lYNx3f+8R3I5AgMBAAGjMzAxMBoGA1Ud +EQQTMBGCD3dlYmVuZ2luZS5xdC5pbzATBgNVHSUEDDAKBggrBgEFBQcDATANBgkq +hkiG9w0BAQsFAAOCAQEAjThKpP0sBv1vEmaqBc1wTu//7RHmFcoStTt3scADzb2C +9gjOVC4NzxBneLkv01444Z1p/Iiu/ZZ+VKu7aJElJgnBWEisYwJ09t3cdZRA0UY7 +XRvTVAqV0OlsB1Jn0afE+aTLGjWo+jSYzua0O+NK74e23p9jkdSmXxH9w0FB/oyM +FGIOFnnfP0+QR4ZVvAGk2H60tBHQKmCM6b87TiD4GQIfOghCQWH+qJYSuyGu4hkE +uis+n1KHHhed3GIJOHpm7gt1C9qtjcp1nOpv0ycQjfc9CGvr02BcQjhMeO65hX0A +TvCgKN9/XMFv5jwwjjPCL12GBhwnN2k9hM/tEYpe2A== -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- -MIIGeTCCBGGgAwIBAgIUbVL7tFc7sgPIYnt+REVc0wiHdBcwDQYJKoZIhvcNAQEL -BQAwdzELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcM -DVNhbiBGcmFuY2lzY28xDzANBgNVBAoMBkJhZFNTTDEqMCgGA1UEAwwhQmFkU1NM -IFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MB4XDTE5MDgyNjE0NDQyMFoXDTI5 -MDgyMzE0NDQyMFowfzELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWEx -FjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xDzANBgNVBAoMBkJhZFNTTDEyMDAGA1UE -AwwpQmFkU1NMIEludGVybWVkaWF0ZSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggIi -MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCgoU4q43DJEUyoAOeK31uyEgLn -s5CCd6XFmGp6wln0yupwmYRaDiCoSJ1qpmjYt+gIHpDAFS2ZzR4TbZORFirjY0cQ -6+IWwpBEQR0hOluWN99CqjdCxfuZwiTvTV3FQv1IJZ13g23Uh2xRbnrzC2muDHzT -4ZNM3aayvziMGY6n33aksEc6WMZb3p/Qn2OepeC7EzZiy4tXKPf9OaOPbae5aJWZ -bOzzydFLkV4UqZb5FfySt8toIivPeIlRCiPodWLb2y5DYUXyWBk1dpbIcVa/LusV -vsBELeJ+BFDRH1NHtwOrhOkZHKMr3SQ1YRlNDEeHUVmQkori397j9JjpPzScQJ6r -d/W4mGyzgRmguIy9IpKMbxX5/1A6c6l5q0HqMgPv84GWxlhav4xwsOf90iT2vLPZ -yllVCgCsCfvLEyVFhER18HAo8mTkQqKL7ZO96xXHgugA7dFN/C3BdC9kYP/GbAwd -J0R6qKrfSiyyk1VbjWfFdFH/G/bT9H0nrjMj5tCT4q/zDCb5HkBp3BOoyUKb9yyt -a1Cht/Iu3f1SlQzsrDBt9iMMCjXoNNAJcV7ZZ6HCxcWwfAwxgylQgq8UG60shxhn -CBPhcA8JM+mk2nghTU2pxwY/KpAd0H4/a79b0DE97dCOnNHzyP3tqP8RenG549B0 -gsNO60aG01k6P9jFuQIDAQABo4H0MIHxMB0GA1UdDgQWBBQgvWmDuYqQ6xX7y8xc -cgky1FO7jzCBtAYDVR0jBIGsMIGpgBTUGo+svIaoSMF/shILSbeiQ1zAQKF7pHkw -dzELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNh -biBGcmFuY2lzY28xDzANBgNVBAoMBkJhZFNTTDEqMCgGA1UEAwwhQmFkU1NMIFJv -b3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5ghR1qCPxzkfCSCwMFHm98245f0pk0zAM -BgNVHRMEBTADAQH/MAsGA1UdDwQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAnGr6 -t1+KNGZV9hmAE3SyMzHRpgwtqIG4kl94A7Pz3CbA8+q7u7DW8l1GdaNx2J2wo+R5 -rJi02V5e7TNa7ZS5S9WGYHZ2y6QOjXuT28VMAPX+3HAgxk3RMxocpLpkPp8hhD/9 -S5KxA6AQDUN6av8E3xeuuWYWmTvAXNHK5ABXDFxxTp902ozNnZaSk2DxAUqcsOD4 -ago0IhRdkFGe1Q7F8gOxtlUL5owNL4uhRP8BbwOja2Gopn2+kA9CNqdwPI4Ipjlr -yo61oCqzy3RAXOUct8WAvybacADmJODAxDq9O5fAZuYZScjjj1ASowmbyDH/Wb9z -+WfiKKH4BfgOIukzK3I1M9wiSDefIodCFfEVXbdNudZj8f9Gw4RrZwkUuxDLeRWG -ReDtzAWq7G0Diw3uX40S4jaj3MeS6oHp2Nrj/VyjSRiYTeN/pnA9N0M5VuCYYvXD -f50rrigjQfOgb4TmnyJAjXWVkXW7Fa+ooLsbvlfr8wP8f31y1cgWPHTVIv6Kmug7 -Bg88k3x5gLTXmutDjseORonhGMRdAxHgJVf5aKfzdRpwXZTDZJXhsAz9OdlOhNZd -UrYo680QugA0V3H5D8Egbr2AUUSMDkn133COjeOIDknFxX3qDqeTzqLZCAEBIoKn -Adpix0jvG1Ys4Ayq6K2wQFdGFjtl6LsiGC7pWWU= +MIIDOzCCAiMCFDwWg4NZxCplj3qyBxAUTi1wmj4jMA0GCSqGSIb3DQEBCwUAMFox +CzAJBgNVBAYTAkRFMQ8wDQYDVQQIDAZCZXJsaW4xDzANBgNVBAcMBkJlcmxpbjEV +MBMGA1UECgwMVGhlUXRDb21wYW55MRIwEAYDVQQLDAl3ZWJlbmdpbmUwHhcNMjEw +NTEwMjEzMTE4WhcNMjIwNTEwMjEzMTE4WjBaMQswCQYDVQQGEwJERTEPMA0GA1UE +CAwGQmVybGluMQ8wDQYDVQQHDAZCZXJsaW4xFTATBgNVBAoMDFRoZVF0Q29tcGFu +eTESMBAGA1UECwwJd2ViZW5naW5lMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEAuc/8xVrfSzOsI6kYul+o1QIPBh1I86eQm1PhTBDMAAPHuzyPaEMgBkn2 +XAUmvkynGpNioaJDU2ndV2fBHvsoeQCdNNmjFTe1rKYjrN6U2X5KoYSzN93TOYzK +aR38fEFx+w4qV76nnxSjYtGNe9z74GrfWFMdDQ0NJKzvaO4gaZ+OOg0OzWy4MJQ0 +aINo3UV55Y7Nt92AxFweiuHucKu+rjf3BX7n0Af/Tcs2c84f0R3HA7euReSibVvX +f33eHLRKwu2bvDjXiUzOdkxBn9GTo6Q09LyY6wDG0ZdWnyCKj3NBQKBVrq+bs3Q0 +ATsWhj/PvYlZhhZh4EOlqYOhCpwv4wIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQCC +pLSFGJcG0zhHW+2A6ogmpn2tA8gKUZx7f0J1nwgPEoAXQqWQv/299ZtmWfMKHUkk +ygG4u80C87wWPH42XWXo/KDrP9iYzoqAvtqbRuPG9PAxefQ/JUSnuhikA51g9+Mu +IDKKKSI+y/JW9u0Qo77fp/5n2DaFn5B+pBYvn/xLfaEa9bRdJMTEMsElGbPBzMZd +I/7X6B78X6Ow5TuRKSeZA7E1AZ/+e5A4Hj65bLAugoSKz3zaS0dV26LwAo18c2zP +TqtwHyIVj4QCoI6Z694q9KH4Pkml3fz8VSkk+MvZMWapvUhHu/DneTgqGbp9POYg +nx6oWME6idhnvN6DljxB -----END CERTIFICATE----- diff --git a/tests/auto/shared/resources/key.pem b/tests/auto/shared/resources/key.pem index 89922679a43..9bf87aee363 100644 --- a/tests/auto/shared/resources/key.pem +++ b/tests/auto/shared/resources/key.pem @@ -1,27 +1,27 @@ -----BEGIN RSA PRIVATE KEY----- -MIIEowIBAAKCAQEAkybT/L4zJCqefpd+eYT6aQ0PtobQfFgP+n+z5wWoUxIAJnjb -5ZW47IJxka/2/ggzJOfrUBur54LkTfFQ+yX85eKYCuH0GLz+Rve50LDn0ya6qSgm -EhDG0bend2tMZY+Nl3B+5Ane1vua8hdJjv3ZO3e5UgpQwysL54eYyhEWWlbFWF11 -LhEdMYp953UGLqoV4Mlw+Li8TmFwdKQx6icgBTuloXLzk9aUU+b6NbXdadNXkmzg -09ICsb8pnMXiF2P9Xm5rK0IoiRkSHxVnU12nQXh65Ns/2Dj5DcbHmVdvallfr4wn -LeFPUotysZnvFmE7FLMSr/eQfkTG+Jlb7ZhoGwIDAQABAoIBADRXy3BL98UVo+tD -2ClBtBFKJBy5N9ADQyvH4SZ8TLO/423L7+xqpaz7eYppHWKfaBHorTuBnFRtquhO -vo+Xo63iPFMirMFf+NMlq2MgilYBoMQrE9+5N//BZECGWlaGCcekrH5RRIMUXLlg -rzm98lfE7pbQNIo39bQV97NpAJqBWPuoIvCrbRCysGoA5j7ptZ/EhSlC00eA7ybD -CeYHmh8NrsapKOTGb5u1v3paV8X/mH6vKmsVs7n6LC0opBxzM8eAHEAQ6h8rmz9H -y99FWDYha3lOS4SLkTnuRnNHOMLJajPq3Isu+BgzLWuRGnKZ3rmuUFwPNkCZTvsV -dTdBE4ECgYEAw6jBEil0e8Pc9sGqnz93e8qrYE9wSPso4q3BNJgTbN48kon6mqh7 -gQVgEP/75Th5YrJUrY9Pd/8H9uoMOxbDXgOXG/xNnhC0L+7aM8nhKlxCLndY1e56 -/YymYYH4+D9ZD2u526mK/nmCg2QGOkCVYYp7NXe/mA0g34drKjefmj8CgYEAwIhq -rZhlfAvQThSOqQA9zA7NXPDh4KzIjr8htVu5YvVcv5W2uhsni9DXFaloPnhuLdJ7 -MnPF2WqzQ9YqFrGn/9/OTqeE23f60ed04qLGM4BApb45y5Kw6sCPnWu7dMYfny9i -XeZA2A+ODmqVkrU+ZNVzqzS1krYyUP3exd1voyUCgYEAqPRARH6np3gqhqoVvA4C -D1OjSTdPrrWzSIriG5h2rbv6ck/Tp1l1zKPnoMZrrjRmHWQA2x61cNk4926DwUKW -0cgn5HKqU6P49Ks8oRvi48FnJNjKTXHxoqChy/GAHF4Xecl8ZMKy06v5l5v4BLVg -SSpb2n/dYl9z05IMaBhAKeECgYBKB2n1S6ah1q0GiLL92mDoiDyAYwKG8AjBkk40 -vIsAuNUruTYkQvKmuOsqohO6CXZb2hWSpZ9KZNN+3ucaCL9PDE/4QEM+W9iuQu/X -gLzy6npxAD6avtGVweq2ncjbMp7QB1ksP69pJDn74xGV8miGPuiVyNOUEMgyChtR -Oz6EnQKBgEth0w80CBg6b3NKuASoc/vC08njZQvWpe5xrzY2DL8epVKb1qf6+8SE -eX34cIcSaonEZ2g67MAeIG6jtmPwxWk4EYAsO1u4XiyziABkoNyLKVH4hZg61BsV -jL7R5UrUvBbhKLFOwkcB4Kwdwu7COB/UKa5XJBTMbuw1UTyxlUeI +MIIEpQIBAAKCAQEAqAygFPG5ILLb3G51D0OIN4Kpm5t3Oh1nByTnvi1kMz+sCBBd +CSugt4NnKkB6kiGtMEsrEm1/xg8Bkfbpet3v3+jAidRpjvCISqy3Z9D1cgCFM46h +iob/AvLZpqITiAgsU4fJ4auuIKhFplIGrIKMv2gK8haoBGBoRUD1RM+irwjEr6TN +XTQt2Ap+Ouxs53NLPhAOgumpfzzRR8/Umbhen+G5MhH+XTzzreiClz2V6A79ePJj +y1uQ8NJ79feOOWBDRizRDWwxsnNd24GjkpvcaTwafiK6Vdqeub+XTtiB5RPal2on +Cj0TQDcnaacecl/zmUWsIFNkNJWDcd3/vEdyOQIDAQABAoIBAQCW93icOCdim6tu +FIDu7HEjxSsPUpPCToWu4lWaAHcinxGx0NlzkpD4K4DzcSdrvfszBmQ0UtBVokd7 +1IAdU+HZmePWLk+CDM2zoAPHrO3Cs3r2PS0cIHhZMsearcG0E/uWMseHB08PoXuo +lcnPEhzVGueyYe4guGcTx+5PGeUBLf+fJcEc3rIQnT2LYulM2aqBZSQM3jRUaPYs +F0awDpCNwajW/Bt2VB14Pr+H5MJ+WSznFCqW7SolBkqDGfKckXPSHgX6xZ0y7VCI +MM8vwlVI4mPkaHvSQMSI8vS4Qh+SGQCSs/AuuNLjjPoz1YotV3Ih4YbLj6BjFP2g +CrqzT6VNAoGBANOHmsqE0nRkLzonTDrMdla5b0TjTxwtNM5DjLgJa6UBBqPe+1Lv +JFoBP9bIfYDRWZOZrxXItfMmM43nK/ST6Xqgx1IpHUCLKVr2pA9RXrP+m4oawfgn +frW212fHibeOYiLy+DaQXQ0VRFxsc/VbwKVyVlMEcNg3N93x2E67M7vjAoGBAMtg +7wDa+5gjwuyNr7LKkp5VDTmtKQhoDtg4sw6MSQSMF6fJT9Z4kGTZ23+G85/LsM/k +iXbceabGJ0CQJvGn6oW4dI2Ut2c2nCNVbQCxJ6Nyn/yW7bRLShMnwXvbGAVxVUax +5ohJPZGJ8ar2CP76A0bkvm2Nwylq2gp6Y8h7+iwzAoGBAKizwfQ6sk45iKDsrpNG +dir8gY2DbJigRTksDpLIkJ1skAspz295YpiV3oBCLjYKwVJCg6zwAo0FrqBB+oB5 +ZwByMgWI3NeZJUZy5q2Ay/Lp4MroRELR3PC3/lu6fE90szgEZ4m84TmJ+Jdtt527 +q41H/yj+pbELePb95vIDw2LZAoGBAJBZ+MmupCzUFSI5Xp+UUIS48W4ijaE92mt1 +swF8aMcleBTLOjOL11D9oGHfs0OUG6czGq6WxnGs62dT6ZBUEo1e4rsq9xH3HNOn +anq3Qt8sGIn7xjPVzHnUGeyDEYWrb0+CLZJGCcEnG7SwdKolYfYLnW281Oysvp35 +SKGf/W0pAoGAa2+sZmhb1mpGAf6Bi4z+uym/6qOJmG6CnrBSM9e/r8nujwFVkCYF +3iz48qx3GbuliO6za8aM1drX2u8KWp1uP5KzwYvtW5SfpQ1eusFblHEYQQNRcKLT +j/wZBXnU961eMKkkTe2XsPirO8rVhVmxuFLqT/aEPffcragQFFIGOEQ= -----END RSA PRIVATE KEY----- diff --git a/tests/auto/widgets/certificateerror/BLACKLIST b/tests/auto/widgets/certificateerror/BLACKLIST deleted file mode 100644 index 9b4d3e1c678..00000000000 --- a/tests/auto/widgets/certificateerror/BLACKLIST +++ /dev/null @@ -1,2 +0,0 @@ -[handleError] -macos # QTBUG-91232 diff --git a/tests/auto/widgets/certificateerror/tst_certificateerror.cpp b/tests/auto/widgets/certificateerror/tst_certificateerror.cpp index 0bea0415599..7a55e306d92 100644 --- a/tests/auto/widgets/certificateerror/tst_certificateerror.cpp +++ b/tests/auto/widgets/certificateerror/tst_certificateerror.cpp @@ -100,8 +100,8 @@ void tst_CertificateError::handleError() QVERIFY(page.error->isOverridable()); auto chain = page.error->certificateChain(); QCOMPARE(chain.size(), 2); - QCOMPARE(chain[0].serialNumber(), "3b:dd:1a:b7:2f:40:32:3b:c1:bf:37:d4:86:bd:56:c1:d0:6b:2a:43"); - QCOMPARE(chain[1].serialNumber(), "6d:52:fb:b4:57:3b:b2:03:c8:62:7b:7e:44:45:5c:d3:08:87:74:17"); + QCOMPARE(chain[0].serialNumber(), "15:91:08:23:37:91:ee:51:00:d7:4a:db:d7:8c:3b:31:f8:4f:f3:b3"); + QCOMPARE(chain[1].serialNumber(), "3c:16:83:83:59:c4:2a:65:8f:7a:b2:07:10:14:4e:2d:70:9a:3e:23"); if (deferError) { QVERIFY(page.error->deferred()); From 626830a781f037bf067dfbb52c63228d375a26f1 Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Thu, 27 May 2021 14:12:15 +0200 Subject: [PATCH 005/132] Generate mojo bindings before compiling extension API registration Speculative fix. Add custom qtwebengine mojo_bindings as a dependency for compiling chrome sources. Change-Id: I930a8c94b8ffe02188659169fd9f27c99f42fb0b Reviewed-by: Allan Sandfeld Jensen --- src/core/qtwebengine_sources.gni | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/qtwebengine_sources.gni b/src/core/qtwebengine_sources.gni index 81a48cab494..97d51d68e60 100644 --- a/src/core/qtwebengine_sources.gni +++ b/src/core/qtwebengine_sources.gni @@ -53,6 +53,7 @@ source_set("qtwebengine_sources") { "//components/performance_manager", "//components/plugins/renderer/", "//extensions/buildflags:buildflags", + "//qtwebengine/common:mojo_bindings", "//rlz/buildflags:buildflags", "//third_party/blink/public/mojom:mojom_platform", ] From 09bf7d7a9fc92c3c8bb5cd4b5094e330d9adf8ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Mon, 31 May 2021 09:48:50 +0200 Subject: [PATCH 006/132] Update Chromium Submodule src/3rdparty dc35950b..eaffb82d: > [Backport] Security bug 1201938 > [Backport] Security bug 1201340 > [Backport] Security bug 1195331 > [Backport] Security bug 1204071 > [Backport] CVE-2021-30518: Heap buffer overflow in Reader Mode > [Backport] CVE-2021-30516: Heap buffer overflow in History. > [Backport] CVE-2021-30515: Use after free in File API > [Backport] CVE-2021-30513: Type Confusion in V8 > [Backport] CVE-2021-30512: Use after free in Notifications > [Backport] CVE-2021-30510: Race in Aura > [Backport] CVE-2021-30508: Heap buffer overflow in Media Feeds > Workaround revoked certificate check on Linux Fixes: QTBUG-92895 Change-Id: Ib83f18a256822a2a6feb5dcdd1df7e933a2dd271 Reviewed-by: Allan Sandfeld Jensen --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index dc35950b9ee..eaffb82d5ee 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit dc35950b9eed3be05c4dc747720f495148ffe14b +Subproject commit eaffb82d5ee99ea1db8c0d4d359bbc72e77f065b From eafc7b60313d9827f976f1d4fbb5e7f5d54eea7b Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 2 Jun 2021 15:54:43 +0200 Subject: [PATCH 007/132] Always send phased wheel events beginning with Began MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The input event router does not like MayBegin. Fixes: QTBUG-93082 Change-Id: I4ac9677d7f69da3d36fc33c17541026f011feb42 Reviewed-by: Michael Brüning (cherry picked from commit 588ea0d45f983f70e707a502cb4f3e429bbd3876) Reviewed-by: Qt Cherry-pick Bot --- src/core/web_event_factory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/web_event_factory.cpp b/src/core/web_event_factory.cpp index 3beb913a749..dcfa3dc3954 100644 --- a/src/core/web_event_factory.cpp +++ b/src/core/web_event_factory.cpp @@ -1581,7 +1581,7 @@ blink::WebMouseWheelEvent::Phase toBlinkPhase(QWheelEvent *ev) #endif return blink::WebMouseWheelEvent::kPhaseNone; case Qt::ScrollBegin: - return ev->angleDelta().isNull() ? blink::WebMouseWheelEvent::kPhaseMayBegin : blink::WebMouseWheelEvent::kPhaseBegan; + return blink::WebMouseWheelEvent::kPhaseBegan; case Qt::ScrollUpdate: return blink::WebMouseWheelEvent::kPhaseChanged; case Qt::ScrollEnd: From 46d3c23490d320a9099c0b92276e48d497de1ba4 Mon Sep 17 00:00:00 2001 From: Tarja Sundqvist Date: Mon, 7 Jun 2021 18:11:51 +0300 Subject: [PATCH 008/132] Bump version from 5.15.5 to 5.15.6 Change-Id: I23abb5f63719b0aaf4dd4c9b81c312e8a375ec7f Reviewed-by: Michal Klocek --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index ddb23399c20..302ec06c5a4 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -5,4 +5,4 @@ QTWEBENGINE_OUT_ROOT = $$shadowed($$PWD) load(qt_build_config) CONFIG += warning_clean -MODULE_VERSION = 5.15.5 +MODULE_VERSION = 5.15.6 From 7b9e9c92286aec8102ab221434e785a1def0af87 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 8 Jun 2021 18:06:41 +0200 Subject: [PATCH 009/132] Update Chromium Submodule src/3rdparty eaffb82d..7948becb: > Generate mojo bindings before compiling extension API registration Change-Id: Ie01368c9a082142801f0d0f8672ed7461631cfa1 Reviewed-by: Peter Varga --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index eaffb82d5ee..7948becb538 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit eaffb82d5ee99ea1db8c0d4d359bbc72e77f065b +Subproject commit 7948becb53854513c7acf2cd9b5458b2bc2fb780 From 6ce0de1a9c2f807bcff039c78c2b220cb2bab62b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Mon, 2 Aug 2021 10:32:11 +0200 Subject: [PATCH 010/132] Update Chromium Submodule src/3rdparty 7948becb..5db4492a: > [Backport] CVE-2021-30522: Use after free in WebAudio > [Backport] CVE-2021-30554 Use after free in WebGL > [Backport] CVE-2021-30551: Type Confusion in V8 > [Backport] CVE-2021-30544: Use after free in BFCache > [Backport] CVE-2021-30535: Double free in ICU > [Backport] CVE-2021-30534: Insufficient policy enforcement in iFrameSandbox > [Backport] CVE-2021-30530: Out of bounds memory access in WebAudio > [Backport] CVE-2021-30523: Use after free in WebRTC Task-number: QTBUG-94103 Change-Id: Ib1d77dae4c4b0f98f3eaf99442159374b8003fe7 Reviewed-by: Michal Klocek --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 7948becb538..5db4492a5ee 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 7948becb53854513c7acf2cd9b5458b2bc2fb780 +Subproject commit 5db4492a5ee45e1e586e2b9c31318953bd336c14 From c684572390c086093f8ecfcb61d41b04c6faa340 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Tue, 3 Aug 2021 12:12:36 +0200 Subject: [PATCH 011/132] Update Chromium Submodule src/3rdparty 5db4492a..24fe4f70: > [Backport] Security bug 1194689 > [Backport] CVE-2021-30563: Type Confusion in V8 > [Backport] Security bug 1211215 > [Backport] Security bug 1209558 > [Backport] CVE-2021-30553: Use after free in Network service > [Backport] CVE-2021-30548: Use after free in Loader > [Backport] CVE-2021-30547: Out of bounds write in ANGLE > [Backport] CVE-2021-30556: Use after free in WebAudio > [Backport] CVE-2021-30559: Out of bounds write in ANGLE > [Backport] CVE-2021-30533: Insufficient policy enforcement in PopupBlocker > [Backport] Security bug 1202534 > [Backport] CVE-2021-30536: Out of bounds read in V8 Task-number: QTBUG-94103 Change-Id: I500b3258a90ea4f5d932777b9f217b6da1b8778c Reviewed-by: Michal Klocek --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 5db4492a5ee..24fe4f7088e 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 5db4492a5ee45e1e586e2b9c31318953bd336c14 +Subproject commit 24fe4f7088e51adf8a06d666c488c993e8295e05 From 7f4a6ff45743cecbfe0dd14ef29afd0874a2ed39 Mon Sep 17 00:00:00 2001 From: Szabolcs David Date: Mon, 23 Aug 2021 16:37:13 +0200 Subject: [PATCH 012/132] Fix crash when clicking on a link in PDF Do not try to use WebContentsDelegate of a guest WebContents. Pick-to: dev 6.2 Task-number: QTBUG-95269 Change-Id: If7bbd25bcac26c30a4ff1bee3f732ba01215ec4b Reviewed-by: Allan Sandfeld Jensen --- src/core/content_browser_client_qt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp index 24aa19c91dd..f3eccb92125 100644 --- a/src/core/content_browser_client_qt.cpp +++ b/src/core/content_browser_client_qt.cpp @@ -1247,7 +1247,7 @@ void ContentBrowserClientQt::RegisterNonNetworkSubresourceURLLoaderFactories(int install_file_scheme = install_file_scheme || url.SchemeIs(extensions::kExtensionScheme); #endif if (!install_file_scheme && web_contents) { - const auto *settings = static_cast(web_contents->GetDelegate())->webEngineSettings(); + const auto *settings = static_cast(web_contents->GetResponsibleWebContents()->GetDelegate())->webEngineSettings(); if (settings->testAttribute(WebEngineSettings::LocalContentCanAccessFileUrls)) { for (const auto &local_scheme : url::GetLocalSchemes()) { if (url.SchemeIs(local_scheme)) { From e27ac36100e9ff336426152d69e6ac04ea882583 Mon Sep 17 00:00:00 2001 From: Tarja Sundqvist Date: Tue, 7 Sep 2021 18:47:02 +0300 Subject: [PATCH 013/132] Bump version from 5.15.6 to 5.15.7 Change-Id: I0d30408db2f03bc099825d6d6ec51c3ab1b25677 Reviewed-by: Allan Sandfeld Jensen --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index 302ec06c5a4..9ca1a121407 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -5,4 +5,4 @@ QTWEBENGINE_OUT_ROOT = $$shadowed($$PWD) load(qt_build_config) CONFIG += warning_clean -MODULE_VERSION = 5.15.6 +MODULE_VERSION = 5.15.7 From ddf97c119e529902248dda55399a04a8751da829 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 8 Sep 2021 13:26:07 +0200 Subject: [PATCH 014/132] Add Chromium version source documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ice33d34ca8ceba745d63c129f462cca9b195e213 Reviewed-by: Michael Brüning --- CHROMIUM_VERSION | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 CHROMIUM_VERSION diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION new file mode 100644 index 00000000000..3dc420070f6 --- /dev/null +++ b/CHROMIUM_VERSION @@ -0,0 +1,2 @@ +Based on Chromium version: 87.0.4280.144 +Patched with security patches up to Chromium version: 92.0.4515.159 From d0576dda432b9ef63da0f0dd1451d50a59b397e8 Mon Sep 17 00:00:00 2001 From: Kirill Burtsev Date: Fri, 10 Sep 2021 12:32:31 +0200 Subject: [PATCH 015/132] Fix wrong save file filter for Markdown Editor example Comma is treated as a part of suffix, and a separator is just a space. Fixes: QTBUG-95770 Change-Id: I7b27ae98757418c4c09fc92804ecefd6373cbc48 Reviewed-by: Michal Klocek (cherry picked from commit 2af853bda60156fd320ef59e1b4715c3a61308ae) Reviewed-by: Qt Cherry-pick Bot --- examples/webenginewidgets/markdowneditor/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/webenginewidgets/markdowneditor/mainwindow.cpp b/examples/webenginewidgets/markdowneditor/mainwindow.cpp index 28d6f56412d..4ce2c1618c4 100644 --- a/examples/webenginewidgets/markdowneditor/mainwindow.cpp +++ b/examples/webenginewidgets/markdowneditor/mainwindow.cpp @@ -170,7 +170,7 @@ void MainWindow::onFileSave() void MainWindow::onFileSaveAs() { QString path = QFileDialog::getSaveFileName(this, - tr("Save MarkDown File"), "", tr("MarkDown File (*.md, *.markdown)")); + tr("Save MarkDown File"), "", tr("MarkDown File (*.md *.markdown)")); if (path.isEmpty()) return; m_filePath = path; From 0997f6e32cc345bbd6d832aec38c02702caf29de Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 13 Sep 2021 09:43:30 +0200 Subject: [PATCH 016/132] Support MSVC_VER 16.8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Newer MSVC 2019 versions reports this number Change-Id: Iab20de746416705f10f7da95eeb319815512e07d Reviewed-by: Tarja Sundqvist Reviewed-by: Michael Brüning --- src/buildtools/config/windows.pri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/buildtools/config/windows.pri b/src/buildtools/config/windows.pri index 843d6f2b16c..f7b80e6e4a0 100644 --- a/src/buildtools/config/windows.pri +++ b/src/buildtools/config/windows.pri @@ -71,7 +71,7 @@ msvc:contains(QT_ARCH, "i386"):!usingMSVC32BitCrossCompiler() { msvc { equals(MSVC_VER, 15.0) { MSVS_VERSION = 2017 - } else: equals(MSVC_VER, 16.0) { + } else: versionAtLeast(MSVC_VER, 16.0) { MSVS_VERSION = 2019 } else { error("Visual Studio compiler version \"$$MSVC_VER\" is not supported by gn.") From 19e6e9e29df4dd173304e1d83d72cb4ed396ca70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Mon, 23 Aug 2021 16:44:31 +0200 Subject: [PATCH 017/132] Update Chromium Submodule src/3rdparty 24fe4f70..c8087cb6: > [Backport] CVE-2021-30566: Stack buffer overflow in Printing > [Backport] CVE-2021-30585: Use after free in sensor handling > Bump V8_PATCH_LEVEL > [Backport] Security bug 1228036 > [Backport] CVE-2021-30604: Use after free in ANGLE > [Backport] CVE-2021-30603: Race in WebAudio > [Backport] CVE-2021-30602: Use after free in WebRTC > [Backport] CVE-2021-30599: Type Confusion in V8 > [Backport] CVE-2021-30598: Type Confusion in V8 > [Backport] Security bug 1227933 > [Backport] Security bug 1205059 > [Backport] Security bug 1184294 > [Backport] Security bug 1198385 > [Backport] CVE-2021-30588: Type Confusion in V8 > [Backport] CVE-2021-30587: Inappropriate implementation in Compositing on Windows > [Backport] CVE-2021-30573: Use after free in GPU > [Backport] CVE-2021-30569, security bugs 1198216 and 1204814 > [Backport] CVE-2021-30568: Heap buffer overflow in WebGL > [Backport] CVE-2021-30541: Use after free in V8 > [Backport] Security bugs 1197786 and 1194330 Task-number: QTBUG-94103 Task-number: QTBUG-95581 Change-Id: I1900426d64727fc065d438a0e4b3b9e916d537c0 Reviewed-by: Allan Sandfeld Jensen (cherry picked from commit 1b9897bbe11c6ed6b27fe45b6faa20f300149b99) --- src/3rdparty | 2 +- src/core/printing/print_view_manager_base_qt.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 24fe4f7088e..c8087cb6809 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 24fe4f7088e51adf8a06d666c488c993e8295e05 +Subproject commit c8087cb6809935ccb128f9b6fe8507a5c0a69588 diff --git a/src/core/printing/print_view_manager_base_qt.cpp b/src/core/printing/print_view_manager_base_qt.cpp index ad35209f111..fe365df5309 100644 --- a/src/core/printing/print_view_manager_base_qt.cpp +++ b/src/core/printing/print_view_manager_base_qt.cpp @@ -254,6 +254,11 @@ void PrintViewManagerBaseQt::GetDefaultPrintSettings(GetDefaultPrintSettingsCall void PrintViewManagerBaseQt::PrintingFailed(int32_t cookie) { + // Note: Not redundant with cookie checks in the same method in other parts of + // the class hierarchy. + if (!IsValidCookie(cookie)) + return; + PrintManager::PrintingFailed(cookie); ReleasePrinterQuery(); From e85939ac748b54445f4037a3051976d8b2f5df18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Tue, 24 Aug 2021 14:21:04 +0200 Subject: [PATCH 018/132] Update Chromium Submodule src/3rdparty c8087cb6..9f71911e: > [Backport] CVE-2021-30560: Use after free in Blink XSLT Task-number: QTBUG-94103 Change-Id: I3e43653b6b3370d71b09b52a781a3b1d6c82293e Reviewed-by: Allan Sandfeld Jensen (cherry picked from commit 2acbba86362ac3a1c2d8c20390dc263875f8f09c) --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index c8087cb6809..9f71911e38c 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit c8087cb6809935ccb128f9b6fe8507a5c0a69588 +Subproject commit 9f71911e38c041cedc5291c5e772b7d03ce8b8c8 From b99b6ed65f66b4630bdc2b407a97bd0e526165d3 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 29 Sep 2021 14:24:11 +0200 Subject: [PATCH 019/132] Do not wait on weak_pointer for termination errors We invalidate the weak pointer factory before waiting on the error callback, meaning it will never come. Task-number: QTBUG-96928 Change-Id: Ia5091f7398e79f835ce34dfd48f3c36859382b53 Reviewed-by: Kirill Burtsev (cherry picked from commit 7c35fa991f0e523e6d0901109caceed5aaac3658) Reviewed-by: Qt Cherry-pick Bot --- src/core/net/proxying_url_loader_factory_qt.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/net/proxying_url_loader_factory_qt.cpp b/src/core/net/proxying_url_loader_factory_qt.cpp index fe9176f1fee..75fc15e6b6a 100644 --- a/src/core/net/proxying_url_loader_factory_qt.cpp +++ b/src/core/net/proxying_url_loader_factory_qt.cpp @@ -207,9 +207,9 @@ InterceptedRequest::InterceptedRequest(ProfileAdapter *profile_adapter, current_response_ = network::mojom::URLResponseHead::New(); // If there is a client error, clean up the request. target_client_.set_disconnect_handler( - base::BindOnce(&InterceptedRequest::OnURLLoaderClientError, weak_factory_.GetWeakPtr())); + base::BindOnce(&InterceptedRequest::OnURLLoaderClientError, base::Unretained(this))); proxied_loader_receiver_.set_disconnect_with_reason_handler( - base::BindOnce(&InterceptedRequest::OnURLLoaderError, weak_factory_.GetWeakPtr())); + base::BindOnce(&InterceptedRequest::OnURLLoaderError, base::Unretained(this))); } InterceptedRequest::~InterceptedRequest() From 4340b9579e0138dbcde83dc33e3c06c132f432b0 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 23 Sep 2021 16:51:21 +0200 Subject: [PATCH 020/132] Block CORS from local URLs when remote access is not enabled Task-number: QTBUG-96849 Change-Id: I0e0a1530b8b31341c632a1fd00abd339b5152da0 Reviewed-by: Kirill Burtsev (cherry picked from commit f6f8f258be09fef90585b0228bd82a9708ef34a6) --- .../net/proxying_url_loader_factory_qt.cpp | 37 +++++++++++++++++++ .../doc/src/qwebenginesettings_lgpl.qdoc | 13 +++---- tests/auto/widgets/origins/tst_origins.cpp | 2 +- 3 files changed, 44 insertions(+), 8 deletions(-) diff --git a/src/core/net/proxying_url_loader_factory_qt.cpp b/src/core/net/proxying_url_loader_factory_qt.cpp index 75fc15e6b6a..883811637d0 100644 --- a/src/core/net/proxying_url_loader_factory_qt.cpp +++ b/src/core/net/proxying_url_loader_factory_qt.cpp @@ -47,8 +47,11 @@ #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/web_contents.h" +#include "content/public/common/content_switches.h" #include "net/http/http_status_code.h" +#include "services/network/public/cpp/cors/cors.h" #include "third_party/blink/public/mojom/loader/resource_load_info.mojom-shared.h" +#include "url/url_util.h" #include "api/qwebengineurlrequestinfo_p.h" #include "type_conversion.h" @@ -162,6 +165,7 @@ class InterceptedRequest : public network::mojom::URLLoader const uint64_t request_id_; const int32_t routing_id_; const uint32_t options_; + bool allowed_cors_ = true; // If the |target_loader_| called OnComplete with an error this stores it. // That way the destructor can send it to OnReceivedError if safe browsing @@ -204,12 +208,37 @@ InterceptedRequest::InterceptedRequest(ProfileAdapter *profile_adapter, , target_factory_(std::move(target_factory)) , weak_factory_(this) { + const bool disable_web_security = base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableWebSecurity); current_response_ = network::mojom::URLResponseHead::New(); + current_response_->response_type = network::cors::CalculateResponseType( + request_.mode, + disable_web_security || ( + request_.request_initiator && request_.request_initiator->IsSameOriginWith(url::Origin::Create(request_.url)))); // If there is a client error, clean up the request. target_client_.set_disconnect_handler( base::BindOnce(&InterceptedRequest::OnURLLoaderClientError, base::Unretained(this))); proxied_loader_receiver_.set_disconnect_with_reason_handler( base::BindOnce(&InterceptedRequest::OnURLLoaderError, base::Unretained(this))); + if (!disable_web_security && request_.request_initiator) { + const std::vector &localSchemes = url::GetLocalSchemes(); + std::string fromScheme = request_.request_initiator->GetTupleOrPrecursorTupleIfOpaque().scheme(); + if (base::Contains(localSchemes, fromScheme)) { + content::WebContents *wc = webContents(); + std::string toScheme = request_.url.scheme(); + // local schemes must have universal access, or be accessing something local and have local access. + if (fromScheme != toScheme) { + // note allow_file_access_from_file_urls maps to LocalContentCanAccessFileUrls in our API + // and allow_universal_access_from_file_urls to LocalContentCanAccessRemoteUrls, so we are + // using them as proxies for our API here. + if (toScheme == "file") + allowed_cors_ = wc && wc->GetOrCreateWebPreferences().allow_file_access_from_file_urls; + else if (!base::Contains(localSchemes, toScheme)) + allowed_cors_ = wc && wc->GetOrCreateWebPreferences().allow_universal_access_from_file_urls; + else + allowed_cors_ = true; // We should think about this for future patches + } + } + } } InterceptedRequest::~InterceptedRequest() @@ -246,6 +275,14 @@ void InterceptedRequest::Restart() { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + // This is a CORS check on the from URL, the normal check on the to URL is applied later + if (!allowed_cors_ && current_response_->response_type == network::mojom::FetchResponseType::kCors) { + target_client_->OnComplete(network::URLLoaderCompletionStatus( + network::CorsErrorStatus(network::mojom::CorsError::kCorsDisabledScheme))); + delete this; + return; + } + // MEMO since all codepatch leading to Restart scheduled and executed as asynchronous tasks in main thread, // interceptors may change in meantime and also during intercept call, so they should be resolved anew. // Set here only profile's interceptor since it runs first without going to user code. diff --git a/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc index b83da944008..b7000b30dbd 100644 --- a/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc +++ b/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc @@ -106,13 +106,11 @@ Enables support for the HTML 5 local storage feature. Enabled by default. \value LocalContentCanAccessRemoteUrls Allows locally loaded documents to ignore cross-origin rules so that they can access - remote resources that would normally be blocked, because all remote resources are - considered cross-origin for a local file. Remote access that would not be blocked by + remote resources that would normally be blocked, since remote resources are + considered cross-origin for a local document. Remote access that would not be blocked by cross-origin rules is still possible when this setting is disabled (default). - Note that disabling this setting does not stop XMLHttpRequests or media elements in - local files from accessing remote content. Basically, it only stops some HTML - subresources, such as scripts, and therefore disabling this setting is not a safety - mechanism. + Note that disabling this setting does not prevent media elements in local files from + accessing remote content. Disabled by default. \value XSSAuditingEnabled Obsolete and has no effect. \value SpatialNavigationEnabled @@ -123,7 +121,8 @@ trying to reach towards the right and which element they probably want. Disabled by default. \value LocalContentCanAccessFileUrls - Allows locally loaded documents to access other local URLs. Enabled by default. + Allows locally loaded documents to access other local URLs. Disabling this makes QtWebEngine + behave more like Chrome and Firefox does by default. Enabled by default. \value HyperlinkAuditingEnabled Enables support for the \c ping attribute for hyperlinks. Disabled by default. \value ScrollAnimatorEnabled diff --git a/tests/auto/widgets/origins/tst_origins.cpp b/tests/auto/widgets/origins/tst_origins.cpp index 93a496ac43d..e7d71d7fe77 100644 --- a/tests/auto/widgets/origins/tst_origins.cpp +++ b/tests/auto/widgets/origins/tst_origins.cpp @@ -657,7 +657,7 @@ void tst_Origins::mixedXHR_data() << QVariant(QString("ok")); QTest::newRow("file->cors") << QString("file:" THIS_DIR "resources/mixedXHR.html") << QString("sendXHR('cors:/resources/mixedXHR.txt')") - << QVariant(QString("ok")); + << QVariant(QString("error")); QTest::newRow("qrc->file") << QString("qrc:/resources/mixedXHR.html") << QString("sendXHR('file:" THIS_DIR "resources/mixedXHR.txt')") From 9e63ed6757cebf644370469b5c9b0215c27c5744 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 11 Oct 2021 08:55:15 +0200 Subject: [PATCH 021/132] Blacklist certificate test until certicates have been renewed Task-number: QTBUG-97414 Change-Id: I6f899a5f62b1a37345281a9c6467ed3b059cd2bd (cherry picked from commit 0fde0da27cd8541199741010eaf9ad3bac6d3f1b) Reviewed-by: Jani Heikkinen --- tests/auto/quick/qmltests/BLACKLIST | 3 +++ tests/auto/widgets/certificateerror/BLACKLIST | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 tests/auto/widgets/certificateerror/BLACKLIST diff --git a/tests/auto/quick/qmltests/BLACKLIST b/tests/auto/quick/qmltests/BLACKLIST index 3d98566f5ee..55be5b6443f 100644 --- a/tests/auto/quick/qmltests/BLACKLIST +++ b/tests/auto/quick/qmltests/BLACKLIST @@ -1,2 +1,5 @@ [NewViewRequest::test_loadNewViewRequest] macos + +[CertificateError::test_fatalError] +* diff --git a/tests/auto/widgets/certificateerror/BLACKLIST b/tests/auto/widgets/certificateerror/BLACKLIST new file mode 100644 index 00000000000..a8fd16bf3df --- /dev/null +++ b/tests/auto/widgets/certificateerror/BLACKLIST @@ -0,0 +1,2 @@ +[fatalError] +* From 603ad5cc9806321a5a5e12ea84c58010d7930447 Mon Sep 17 00:00:00 2001 From: Kirill Burtsev Date: Tue, 5 Oct 2021 10:21:40 +0200 Subject: [PATCH 022/132] Fix leak on getDefaultScreeenId XRRMonitorInfo struct is supposed to be cleaned-up after getMonitors with a separate call to freeMonitors. Change-Id: Iacc296d1f5e434a1d52798fe09d57833660b7952 (cherry picked from commit b868f2893b3ba2fb02d9c7212de7e01b3f9e498a) Reviewed-by: Michal Klocek --- src/core/media_capture_devices_dispatcher.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/media_capture_devices_dispatcher.cpp b/src/core/media_capture_devices_dispatcher.cpp index ef5d657458a..9f8b3436ac2 100644 --- a/src/core/media_capture_devices_dispatcher.cpp +++ b/src/core/media_capture_devices_dispatcher.cpp @@ -70,6 +70,7 @@ #endif #include +#include #if defined(WEBRTC_USE_X11) #include @@ -197,6 +198,7 @@ content::DesktopMediaID getDefaultScreenId() int numMonitors = 0; XRRMonitorInfo *monitors = getMonitors(display, rootWindow, true, &numMonitors); + auto cleanup = qScopeGuard([&] () { freeMonitors(monitors); }); if (numMonitors > 0) return content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN, monitors[0].name); #endif // !defined(WEBRTC_USE_X11) From 5f6a292bc53b9adf14c0e45a7de226a56449dbca Mon Sep 17 00:00:00 2001 From: Kirill Burtsev Date: Fri, 1 Oct 2021 12:46:44 +0200 Subject: [PATCH 023/132] Fix leak of properties after XkbRF_GetNamesProp Struct _XkbRF_VarDefs for XkbRF_GetNamesProp needs special cleanup logic, but it's currently missing from API: https://gitlab.freedesktop.org/xorg/lib/libxkbfile/-/issues/6 Workaround it with manual deinitialization. Change-Id: I3ebe20f58199277521b31b2cd8034c92fd1f2b7f Reviewed-by: Peter Varga Reviewed-by: Michal Klocek (cherry picked from commit acf9d9de2bb3ac195adc257f4a307e447e171614) Reviewed-by: Allan Sandfeld Jensen --- src/core/ozone/ozone_platform_qt.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/core/ozone/ozone_platform_qt.cpp b/src/core/ozone/ozone_platform_qt.cpp index c547cf783f1..1d6fa1ed557 100644 --- a/src/core/ozone/ozone_platform_qt.cpp +++ b/src/core/ozone/ozone_platform_qt.cpp @@ -164,7 +164,17 @@ static std::string getCurrentKeyboardLayout() if (XkbGetState(dpy, XkbUseCoreKbd, &state) != 0) return std::string(); - XkbRF_VarDefsRec vdr; + XkbRF_VarDefsRec vdr {}; // zero initialize it + struct Cleanup { + XkbRF_VarDefsRec &vdr; + Cleanup(XkbRF_VarDefsRec &vdr) : vdr(vdr) { } + ~Cleanup() { + free (vdr.model); + free (vdr.layout); + free (vdr.variant); + free (vdr.options); + } + } cleanup(vdr); if (XkbRF_GetNamesProp(dpy, nullptr, &vdr) == 0) return std::string(); From 03b3df668088d0750af6a59410ee4d0d00ba88ae Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Wed, 6 Oct 2021 09:38:04 +0200 Subject: [PATCH 024/132] Fix pinch gesture Pinch gesture on a touchpad is expected to zoom-in and zoom-out. It has been broken since the pinch gestures are routed because for routing the event target has to be found. The event target is only tried to be found on a pinch begin gesture. As a fix, handle Qt::BeginNativeGesture and Qt::EndNativeGesture events too. Fixes: QTBUG-96930 Change-Id: Ic8fe5bee933b5e0fbc8f5ba6234363a0a625648d Reviewed-by: Allan Sandfeld Jensen (cherry picked from commit ff54ccc82fdba26cf16b9a64b387e3b428fb3038) --- src/core/render_widget_host_view_qt.cpp | 3 ++- src/core/web_event_factory.cpp | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp index bee3c4ca47b..b6cac85ce13 100644 --- a/src/core/render_widget_host_view_qt.cpp +++ b/src/core/render_widget_host_view_qt.cpp @@ -1662,7 +1662,8 @@ void RenderWidgetHostViewQt::handleGestureEvent(QNativeGestureEvent *ev) { const Qt::NativeGestureType type = ev->gestureType(); // These are the only supported gestures by Chromium so far. - if (type == Qt::ZoomNativeGesture || type == Qt::SmartZoomNativeGesture) { + if (type == Qt::ZoomNativeGesture || type == Qt::SmartZoomNativeGesture + || type == Qt::BeginNativeGesture || type == Qt::EndNativeGesture) { if (host()->delegate() && host()->delegate()->GetInputEventRouter()) { auto webEvent = WebEventFactory::toWebGestureEvent(ev); host()->delegate()->GetInputEventRouter()->RouteGestureEvent(this, &webEvent, ui::LatencyInfo()); diff --git a/src/core/web_event_factory.cpp b/src/core/web_event_factory.cpp index dcfa3dc3954..b6ca7029468 100644 --- a/src/core/web_event_factory.cpp +++ b/src/core/web_event_factory.cpp @@ -1540,7 +1540,13 @@ WebGestureEvent WebEventFactory::toWebGestureEvent(QNativeGestureEvent *ev) webKitEvent.data.tap.tap_count = 1; break; case Qt::BeginNativeGesture: + webKitEvent.SetType(WebInputEvent::Type::kGesturePinchBegin); + webKitEvent.SetNeedsWheelEvent(true); + break; case Qt::EndNativeGesture: + webKitEvent.SetType(WebInputEvent::Type::kGesturePinchEnd); + webKitEvent.SetNeedsWheelEvent(true); + break; case Qt::RotateNativeGesture: case Qt::PanNativeGesture: case Qt::SwipeNativeGesture: From f817c91982ff3c2f98247d5482b8135a04d5a778 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 19 Oct 2021 16:40:15 +0200 Subject: [PATCH 025/132] Update patch level Change-Id: Id8c614ffe3ae1dc1098acc2f7d90379c81fb255c Reviewed-by: Michal Klocek (cherry picked from commit 10449e4fb91b35572300084af4cdb1e05af9faab) Reviewed-by: Qt Cherry-pick Bot --- CHROMIUM_VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION index 3dc420070f6..55d7ab8ca4a 100644 --- a/CHROMIUM_VERSION +++ b/CHROMIUM_VERSION @@ -1,2 +1,2 @@ Based on Chromium version: 87.0.4280.144 -Patched with security patches up to Chromium version: 92.0.4515.159 +Patched with security patches up to Chromium version: 94.0.4606.61 From 604f42c37b36a4674f953665f84872e4d83e0316 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 19 Oct 2021 14:46:32 +0200 Subject: [PATCH 026/132] Update Chromium Submodule src/3rdparty 9f71911e3..8c0a9b445: > Revert "[Backport] Security bug 1239116" > [Backport] Linux sandbox: update syscalls numbers on 32-bit platforms > [Backport] sandbox: linux: allow clock_nanosleep & gettime64 > [Backport] Linux sandbox: update syscall numbers for all platforms. > Revert "[Backport] CVE-2021-37976 : Information leak in core" > [Backport] Ease HarfBuzz API change with feature detection > Bump V8_PATCH_LEVEL > CVE-2021-37972 : Out of bounds read in libjpeg-turbo > Add switch for static and dynamic crt > [Backport] Security bug 1248665 > [Backport] CVE-2021-37975 : Use after free in V8 > [Backport] CVE-2021-37980 : Inappropriate implementation in Sandbox > [Backport] CVE-2021-37979 : Heap buffer overflow in WebRTC (2/2) > [Backport] CVE-2021-37979 : Heap buffer overflow in WebRTC (1/2) > [Backport] CVE-2021-37978 : Heap buffer overflow in Blink > [Backport] CVE-2021-37976 : Information leak in core > [Backport] CVE-2021-30616: Use after free in Media. > [Backport] Dependency for CVE-2021-30616 > [Backport] CVE-2021-37962 : Use after free in Performance Manager (2/2) > [Backport] CVE-2021-37962 : Use after free in Performance Manager (1/2) > [Backport] CVE-2021-37973 : Use after free in Portals > [Backport] CVE-2021-37971 : Incorrect security UI in Web Browser UI. > [Backport] CVE-2021-37968 : Inappropriate implementation in Background Fetch API > [Backport] CVE-2021-37967 : Inappropriate implementation in Background Fetch API > [Backport] Linux sandbox: return ENOSYS for clone3 > [Backport] Linux sandbox: fix fstatat() crash > [Backport] Reland "Reland "Linux sandbox syscall broker: use struct kernel_stat"" > [Backport] Security bug 1238178 (2/2) > [Backport] Security bug 1238178 (1/2) > [Backport] CVE-2021-30633: Use after free in Indexed DB API (2/2) > [Backport] CVE-2021-30633: Use after free in Indexed DB API (1/2) > [Backport] CVE-2021-30630: Inappropriate implementation in Blink > [Backport] CVE-2021-30629: Use after free in Permissions > [Backport] CVE-2021-30628: Stack buffer overflow in ANGLE > [Backport] CVE-2021-30627: Type Confusion in Blink layout > [Backport] CVE-2021-30626: Out of bounds memory access in ANGLE > [Backport] CVE-2021-30625: Use after free in Selection API > [Backport] Security bug 1239116 > [Backport] Security bug 1206289 > [Backport] CVE-2021-30613: Use after free in Base internals > [Backport] Security bug 1227228 > [Backport] CVE-2021-30618: Inappropriate implementation in DevTools Task-number: QTBUG-96908 Change-Id: Ib473ba7dc4ac799288d69812d59e229118793d41 Reviewed-by: Michal Klocek (cherry picked from commit f0a1cb8da24518c03858b85378f9ad82b0603a1a) Reviewed-by: Qt Cherry-pick Bot --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 9f71911e38c..8c0a9b4459f 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 9f71911e38c041cedc5291c5e772b7d03ce8b8c8 +Subproject commit 8c0a9b4459f5200a24ab9e687a3fb32e975382e5 From e510ef5ae37a9b91f73080ab52ad911bc7827337 Mon Sep 17 00:00:00 2001 From: Tarja Sundqvist Date: Mon, 8 Nov 2021 20:19:50 +0200 Subject: [PATCH 027/132] Bump version from 5.15.7 to 5.15.8 Change-Id: Idfe986a1dea15a1ca121bbd79b6a16c292c9d602 Reviewed-by: Michal Klocek --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index 9ca1a121407..ddf46fa490e 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -5,4 +5,4 @@ QTWEBENGINE_OUT_ROOT = $$shadowed($$PWD) load(qt_build_config) CONFIG += warning_clean -MODULE_VERSION = 5.15.7 +MODULE_VERSION = 5.15.8 From 8cbd59dd304688401525bfd96d558e6e8b53da8d Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 28 Oct 2021 14:26:53 +0200 Subject: [PATCH 028/132] Re-enable network-service-in-process The network-service isn't sandboxed anyway, so there is no added security by the process separation. Fixes: QTBUG-84105 Change-Id: Ie3fbda26f0cf8f31166b37a8537b7e1b6d11b560 Reviewed-by: Kirill Burtsev (cherry picked from commit bc175fb62a1d2aba9c98ba761d5e21d3d7426678) Reviewed-by: Qt Cherry-pick Bot --- src/core/web_engine_context.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index f342e788db7..0b64509995a 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -671,6 +671,7 @@ WebEngineContext::WebEngineContext() // upstream Chromium commit ba52f56207a4b9d70b34880fbff2352e71a06422. enableFeatures.push_back(features::kAllowContentInitiatedDataUrlNavigations.name); + enableFeatures.push_back(features::kNetworkServiceInProcess.name); enableFeatures.push_back(features::kTracingServiceInProcess.name); // The video-capture service is not functioning at this moment (since 69) From ab1d002534f77ede9c878ecb7a43b23b2ec8582c Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Wed, 26 Aug 2020 17:14:23 +0200 Subject: [PATCH 029/132] Blacklist javascriptClipboard test on ubuntu 20.04 This does not pass after ci upgrade. Fixes: QTBUG-98428 Change-Id: I84f1da1b954ce151491f4cd022f731995c160206 Reviewed-by: Kirill Burtsev (cherry picked from commit c894e792b1664f0875e983fc3f3090e8ba9d36b4) Reviewed-by: Michal Klocek --- tests/auto/quick/qquickwebengineview/BLACKLIST | 2 ++ tests/auto/widgets/qwebenginesettings/BLACKLIST | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 tests/auto/quick/qquickwebengineview/BLACKLIST create mode 100644 tests/auto/widgets/qwebenginesettings/BLACKLIST diff --git a/tests/auto/quick/qquickwebengineview/BLACKLIST b/tests/auto/quick/qquickwebengineview/BLACKLIST new file mode 100644 index 00000000000..d4a35a76a57 --- /dev/null +++ b/tests/auto/quick/qquickwebengineview/BLACKLIST @@ -0,0 +1,2 @@ +[javascriptClipboard] +ubuntu-20.04 diff --git a/tests/auto/widgets/qwebenginesettings/BLACKLIST b/tests/auto/widgets/qwebenginesettings/BLACKLIST new file mode 100644 index 00000000000..d4a35a76a57 --- /dev/null +++ b/tests/auto/widgets/qwebenginesettings/BLACKLIST @@ -0,0 +1,2 @@ +[javascriptClipboard] +ubuntu-20.04 From 402f5a4a78347ed56be59396a3e3877ea9791f47 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Thu, 21 Oct 2021 14:59:04 +0200 Subject: [PATCH 030/132] Do not access accessibility from qt post routines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It seems accessing accessibility from qt post routines ends badly since caches are gone already. Add closingDown() function to web context, which is similar to QCoreApplication::closingDown(), however return true on post routine. Guard delete accessibility calls. Note the widget part is not necessary, but added for completeness, since only qml can release profiles due to garbage collection. Fixes: QTBUG-90904 Change-Id: Ic0e7115cd17eb58f3d58f70fefbc197dfb7a6493 Reviewed-by: Michael Brüning (cherry picked from commit 89bb3c97eee9cd4bf9fb536f024715e606e49ae0) Reviewed-by: Allan Sandfeld Jensen --- src/core/api/qtwebenginecoreglobal.cpp | 7 +++++++ src/core/api/qtwebenginecoreglobal_p.h | 3 +++ src/core/web_engine_context.cpp | 8 +++++++- src/core/web_engine_context.h | 3 ++- src/webengine/api/qquickwebengineview.cpp | 5 ++++- src/webenginewidgets/api/qwebengineview.cpp | 5 ++++- 6 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/core/api/qtwebenginecoreglobal.cpp b/src/core/api/qtwebenginecoreglobal.cpp index 3c9387a10c0..f51aa25c3d5 100644 --- a/src/core/api/qtwebenginecoreglobal.cpp +++ b/src/core/api/qtwebenginecoreglobal.cpp @@ -50,6 +50,7 @@ #endif #endif #include +#include "web_engine_context.h" #if QT_CONFIG(opengl) QT_BEGIN_NAMESPACE @@ -184,4 +185,10 @@ Q_WEBENGINECORE_PRIVATE_EXPORT void initialize() app->setAttribute(Qt::AA_ShareOpenGLContexts); #endif // QT_CONFIG(opengl) } + +bool closingDown() +{ + return WebEngineContext::closingDown(); +} + } // namespace QtWebEngineCore diff --git a/src/core/api/qtwebenginecoreglobal_p.h b/src/core/api/qtwebenginecoreglobal_p.h index 655b2a81495..3a3496e0457 100644 --- a/src/core/api/qtwebenginecoreglobal_p.h +++ b/src/core/api/qtwebenginecoreglobal_p.h @@ -65,4 +65,7 @@ #define Q_WEBENGINECORE_PRIVATE_EXPORT Q_WEBENGINECORE_EXPORT +namespace QtWebEngineCore { +Q_WEBENGINECORE_PRIVATE_EXPORT bool closingDown(); +} // namespace #endif // QTWEBENGINECOREGLOBAL_P_H diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index 0b64509995a..6c93dff72c9 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -315,7 +315,7 @@ static QStringList parseEnvCommandLine(const QString &cmdLine) scoped_refptr WebEngineContext::m_handle; bool WebEngineContext::m_destroyed = false; - +bool WebEngineContext::m_closingDown = false; void WebEngineContext::destroyProfileAdapter() { if (content::RenderProcessHost::run_renderer_in_process()) { @@ -484,6 +484,7 @@ void WebEngineContext::destroyContextPostRoutine() // Destroy WebEngineContext before its static pointer is zeroed and destructor called. // Before destroying MessageLoop via destroying BrowserMainRunner destructor // WebEngineContext's pointer is used. + m_closingDown = true; m_handle->destroy(); #if !defined(NDEBUG) if (!m_handle->HasOneRef()) @@ -932,4 +933,9 @@ base::CommandLine* WebEngineContext::commandLine() { } } +bool WebEngineContext::closingDown() +{ + return m_closingDown; +} + } // namespace diff --git a/src/core/web_engine_context.h b/src/core/web_engine_context.h index f60082059ab..2e74a766c5f 100644 --- a/src/core/web_engine_context.h +++ b/src/core/web_engine_context.h @@ -109,7 +109,7 @@ class WebEngineContext : public base::RefCounted { static void destroyContextPostRoutine(); static ProxyAuthentication qProxyNetworkAuthentication(QString host, int port); static void flushMessages(); - + static bool closingDown(); ProfileAdapter *createDefaultProfileAdapter(); ProfileAdapter *defaultProfileAdapter(); @@ -162,6 +162,7 @@ class WebEngineContext : public base::RefCounted { #endif static scoped_refptr m_handle; static bool m_destroyed; + static bool m_closingDown; static QAtomicPointer s_syncPointManager; }; diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp index 1de7f1c7fe4..7164a1c505a 100644 --- a/src/webengine/api/qquickwebengineview.cpp +++ b/src/webengine/api/qquickwebengineview.cpp @@ -991,11 +991,14 @@ void QQuickWebEngineViewPrivate::widgetChanged(RenderWidgetHostViewQtDelegateQui if (oldWidget) { oldWidget->setParentItem(nullptr); #if QT_CONFIG(accessibility) - QAccessible::deleteAccessibleInterface(QAccessible::uniqueId(QAccessible::queryAccessibleInterface(oldWidget))); + if (!QtWebEngineCore::closingDown()) + QAccessible::deleteAccessibleInterface( + QAccessible::uniqueId(QAccessible::queryAccessibleInterface(oldWidget))); #endif } if (newWidget) { + Q_ASSERT(!QtWebEngineCore::closingDown()); #if QT_CONFIG(accessibility) QAccessible::registerAccessibleInterface(new QtWebEngineCore::RenderWidgetHostViewQtDelegateQuickAccessible(newWidget, q)); #endif diff --git a/src/webenginewidgets/api/qwebengineview.cpp b/src/webenginewidgets/api/qwebengineview.cpp index b1346f65e36..46a4887f25a 100644 --- a/src/webenginewidgets/api/qwebengineview.cpp +++ b/src/webenginewidgets/api/qwebengineview.cpp @@ -116,11 +116,14 @@ void QWebEngineViewPrivate::widgetChanged(QtWebEngineCore::RenderWidgetHostViewQ q->layout()->removeWidget(oldWidget); oldWidget->hide(); #if QT_CONFIG(accessibility) - QAccessible::deleteAccessibleInterface(QAccessible::uniqueId(QAccessible::queryAccessibleInterface(oldWidget))); + if (!QtWebEngineCore::closingDown()) + QAccessible::deleteAccessibleInterface( + QAccessible::uniqueId(QAccessible::queryAccessibleInterface(oldWidget))); #endif } if (newWidget) { + Q_ASSERT(!QtWebEngineCore::closingDown()); #if QT_CONFIG(accessibility) // An earlier QAccessible::queryAccessibleInterface() call may have already registered a default // QAccessibleInterface for newWidget: remove it first to avoid assert in QAccessibleCache::insert(). From 56ba5c9789700433b469ee9a3057eaeabad64d54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Wed, 1 Dec 2021 19:34:05 +0100 Subject: [PATCH 031/132] Update Chromium Submodule src/3rdparty 8c0a9b44..bfc2de04: > [Backport] CVE-2021-37996 : Insufficient validation of untrusted input in Downloads > [Backport] CVE-2021-38001 : Type Confusion in V8 > [Backport] Security bug 1252858 > [Backport] CVE-2021-37989 : Inappropriate implementation in Blink > [Backport] Dependency for CVE-2021-37989 > [Backport] CVE-2021-38022: Inappropriate implementation in WebAuthentication > [Backport] CVE-2021-38012: Type Confusion in V8 > [Backport] CVE-2021-38010: Inappropriate implementation in service workers > [Backport] CVE-2021-38021: Inappropriate implementation in referrer > [Backport] CVE-2021-38005: Use after free in loader (3/3) > [Backport] CVE-2021-38005: Use after free in loader (2/3) > [Backport] CVE-2021-38005: Use after free in loader (1/3) > [Backport] CVE-2021-38019: Insufficient policy enforcement in CORS > [Backport] CVE-2021-38007: Type Confusion in V8 > [Backport] CVE-2021-38017: Insufficient policy enforcement in iframe sandbox > [Backport] CVE-2021-38009: Inappropriate implementation in cache > [Backport] Dependency for CVE-2021-38009 > [Backport] CVE-2021-38015: Inappropriate implementation in input > [Backport] CVE-2021-38018: Inappropriate implementation in navigation > Revert "Stop orphan child processes from staying alive on Windows" > Fix stack overflow on gpu channel recreate with an error > [Backport] Security bug 1245870 > [Backport] CVE-2021-37993 : Use after free in PDF Accessibility > [Backport] CVE-2021-37984 : Heap buffer overflow in PDFium > [Backport] CVE-2021-37992 : Out of bounds read in WebAudio > [Backport] CVE-2021-37987 : Use after free in Network APIs > [Backport] CVE-2021-38003 : Inappropriate implementation in V8 > [Backport] CVE-2021-3541 libxml2: Exponential entity expansion attack bypasses all existing protection mechanisms > [Backport] CVE-2021-3517: libxml2: Heap-based buffer overflow in xmlEncodeEntitiesInternal() in entities.c Task-number: QTBUG-98854 Fixes: QTBUG-98855 Fixes: QTBUG-98400 Fixes: QTBUG-98401 Change-Id: Idb07729bf45ed59eb8163186925095e1a1e30318 Reviewed-by: Michal Klocek --- CHROMIUM_VERSION | 2 +- src/3rdparty | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION index 55d7ab8ca4a..334d6dcb48e 100644 --- a/CHROMIUM_VERSION +++ b/CHROMIUM_VERSION @@ -1,2 +1,2 @@ Based on Chromium version: 87.0.4280.144 -Patched with security patches up to Chromium version: 94.0.4606.61 +Patched with security patches up to Chromium version: 96.0.4664.45 diff --git a/src/3rdparty b/src/3rdparty index 8c0a9b4459f..bfc2de04055 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 8c0a9b4459f5200a24ab9e687a3fb32e975382e5 +Subproject commit bfc2de04055f445a30806545f343abd3d3c972f8 From a49e0b2caafd8aaa09fb586674909b7db462231e Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Wed, 13 Oct 2021 07:56:38 +0200 Subject: [PATCH 032/132] Add bitcode support for qtpdf on ios MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds -fembed-bitcode-marker for debug or -fembed-bitcode in case of release. Fixes: QTBUG-94368 Change-Id: I65031a545517799245e8d08d79e78141d26e9c58 Reviewed-by: Michael Brüning --- src/pdf/config/common.pri | 3 +++ src/pdf/configure.json | 11 +++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/pdf/config/common.pri b/src/pdf/config/common.pri index f688caded12..b148e55fa43 100644 --- a/src/pdf/config/common.pri +++ b/src/pdf/config/common.pri @@ -76,3 +76,6 @@ qtConfig(pdf-xfa-tiff) { } else { gn_args += pdf_enable_xfa_tiff=false } +qtConfig(pdf-bitcode) { + gn_args += enable_ios_bitcode=true +} diff --git a/src/pdf/configure.json b/src/pdf/configure.json index 069893660de..baea3520df0 100644 --- a/src/pdf/configure.json +++ b/src/pdf/configure.json @@ -44,7 +44,13 @@ "purpose": "Enables XFA-TIFF support.", "condition": "features.pdf-xfa", "output": ["privateFeature" ] - } + }, + "pdf-bitcode": { + "label": "Bitcode support", + "purpose": "Enables bitcode", + "condition": "config.ios", + "output": ["privateFeature"] + } }, "report": [ ], @@ -57,7 +63,8 @@ "pdf-xfa-bmp", "pdf-xfa-gif", "pdf-xfa-png", - "pdf-xfa-tiff" + "pdf-xfa-tiff", + "pdf-bitcode" ] } ] From cf53bf7fa434c78d902b78378e55b4c38c095bba Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Wed, 13 Oct 2021 16:37:12 +0200 Subject: [PATCH 033/132] Handle qtpdf compilation with static runtime Add feature to enable compilation with static runtime. Fixes: QTBUG-94046 Change-Id: I6e150cfaad020dfd942c45111139556b7e50dce5 Reviewed-by: Allan Sandfeld Jensen --- src/pdf/config/common.pri | 3 +++ src/pdf/configure.json | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/pdf/config/common.pri b/src/pdf/config/common.pri index b148e55fa43..c97d8036af6 100644 --- a/src/pdf/config/common.pri +++ b/src/pdf/config/common.pri @@ -79,3 +79,6 @@ qtConfig(pdf-xfa-tiff) { qtConfig(pdf-bitcode) { gn_args += enable_ios_bitcode=true } +qtConfig(pdf-static-runtime) { + gn_args += qt_uses_static_runtime=true +} diff --git a/src/pdf/configure.json b/src/pdf/configure.json index baea3520df0..b1f872982f6 100644 --- a/src/pdf/configure.json +++ b/src/pdf/configure.json @@ -50,6 +50,12 @@ "purpose": "Enables bitcode", "condition": "config.ios", "output": ["privateFeature"] + }, + "pdf-static-runtime": { + "label": "Use static runtime", + "purpose": "Enables static runtime", + "condition": "config.static && config.static_runtime", + "output": ["privateFeature"] } }, "report": [ @@ -64,7 +70,8 @@ "pdf-xfa-gif", "pdf-xfa-png", "pdf-xfa-tiff", - "pdf-bitcode" + "pdf-bitcode", + "pdf-static-runtime" ] } ] From 6369c52cebd276f03856dd333af727fd8427ac63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Thu, 9 Dec 2021 10:54:18 +0100 Subject: [PATCH 034/132] Update Chromium Submodule src/3rdparty bfc2de04..b77d6430: > Bump V8_PATCH_LEVEL > [Backport] CVE-2021-4078: Type confusion in V8 > [Backport] CVE-2021-4079: Out of bounds write in WebRTC > [Backport] Security bug 1259899 > [Backport] CVE-2021-4062: Heap buffer overflow in BFCache > [Backport] CVE-2021-4059: Insufficient data validation in loader > [Backport] CVE-2021-4058: Heap buffer overflow in ANGLE (2/2) > [Backport] CVE-2021-4058: Heap buffer overflow in ANGLE (1/2) > [Backport] CVE-2021-4057: Use after free in file API > Use wglSetPixelFormat directly only if in software mode > Compile with GCC 11 -std=c++20 Task-number: QTBUG-98854 Change-Id: I7279387c9c7afece1eb51abb2f68d2e65f4dd31f Reviewed-by: Allan Sandfeld Jensen --- CHROMIUM_VERSION | 2 +- src/3rdparty | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION index 334d6dcb48e..4400ceecc08 100644 --- a/CHROMIUM_VERSION +++ b/CHROMIUM_VERSION @@ -1,2 +1,2 @@ Based on Chromium version: 87.0.4280.144 -Patched with security patches up to Chromium version: 96.0.4664.45 +Patched with security patches up to Chromium version: 96.0.4664.93 diff --git a/src/3rdparty b/src/3rdparty index bfc2de04055..b77d64307a4 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit bfc2de04055f445a30806545f343abd3d3c972f8 +Subproject commit b77d64307a47f35975082e662cc7786ba3d591d8 From 5e30e3a7cb658aaa8aae5996892b4acd4282034d Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 7 Dec 2021 10:29:05 +0100 Subject: [PATCH 035/132] Update documentation The signal is updated much faster for paused media now. Fixes: QTBUG-98918 Change-Id: Ifa3b54e212436a7c93e101dc244d7edcbf473b63 Reviewed-by: Michal Klocek (cherry picked from commit b6099cd9d1efab2af4a38476b3f543796f26f065) --- src/webengine/doc/src/webengineview_lgpl.qdoc | 4 ---- src/webenginewidgets/api/qwebenginepage.cpp | 2 -- 2 files changed, 6 deletions(-) diff --git a/src/webengine/doc/src/webengineview_lgpl.qdoc b/src/webengine/doc/src/webengineview_lgpl.qdoc index 0cd8441cffe..0a78d65d519 100644 --- a/src/webengine/doc/src/webengineview_lgpl.qdoc +++ b/src/webengine/doc/src/webengineview_lgpl.qdoc @@ -1156,8 +1156,6 @@ Also if the audio is paused, this signal is emitted with an approximate \b{two-second delay}, from the moment the audio is paused. - This signal is also emitted for Flash plugin audio. - If a web page contains two videos that are started in sequence, this signal gets emitted only once, for the first video to generate sound. After both videos are stopped, the signal is emitted upon the last sound generated. @@ -1233,8 +1231,6 @@ \a wasRecentlyAudible, is changed, due to audio being played or stopped. \note The signal is also emitted when calling the setAudioMuted method. - Also if the audio is paused, this signal is emitted with an approximate \b{2 second - delay}, from the moment the audio is paused. */ /*! diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp index b32c150397b..5159ff588d5 100644 --- a/src/webenginewidgets/api/qwebenginepage.cpp +++ b/src/webenginewidgets/api/qwebenginepage.cpp @@ -907,8 +907,6 @@ QWebEnginePage::QWebEnginePage(QObject* parent) the audio is played or stopped. \note The signal is also emitted when calling the setAudioMuted() method. - Also, if the audio is paused, this signal is emitted with an approximate \b{two-second - delay}, from the moment the audio is paused. */ /*! From 1c9785bf7eee038f6f0b8e2d73dcb9588f6d60c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 15 Dec 2021 14:54:48 +0100 Subject: [PATCH 036/132] Skip QtWebEngine and QtPdf if building for Apple Silicon Change-Id: I0971900ab654e7426359204d6bddbc61c38143e9 Reviewed-by: Allan Sandfeld Jensen --- configure.pri | 4 ++++ src/buildtools/config/support.pri | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/configure.pri b/configure.pri index e072961f057..a7a74314431 100644 --- a/configure.pri +++ b/configure.pri @@ -140,6 +140,10 @@ defineTest(qtConfTest_detectPlatform) { } defineTest(qtConfTest_detectArch) { + macos { + qtLog("Apple Silicon not supported yet.") + contains(QT_ARCHS, "arm64"): return(false) + } contains(QT_ARCH, "i386")|contains(QT_ARCH, "x86_64"): return(true) contains(QT_ARCH, "arm")|contains(QT_ARCH, "arm64"): return(true) contains(QT_ARCH, "mips"): return(true) diff --git a/src/buildtools/config/support.pri b/src/buildtools/config/support.pri index e7f869a15f9..7a07b1b5bac 100644 --- a/src/buildtools/config/support.pri +++ b/src/buildtools/config/support.pri @@ -110,6 +110,10 @@ defineTest(qtwebengine_checkForPlatform) { defineTest(qtwebengine_checkForArch) { module = $$1 !qtConfig(webengine-arch-support) { + macos:contains(QT_ARCHS, "arm64") { + qtwebengine_skipBuild("$${module} can not be built for Apple Silicon yet.") + return(false) + } qtwebengine_skipBuild("$${module} can only be built for x86, x86-64, ARM, Aarch64, and MIPSel architectures.") return(false) } From 3387ca53e550c1a63ed32ddf4f1dc48e61e9fa62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 16 Dec 2021 11:49:49 +0100 Subject: [PATCH 037/132] Don't unconditionally log that Apple Silicon is not supported Amends 76bd5331d38b4dcbc09c1f22bde52772d43cc7f2. Change-Id: I67947f433f32c2be19dad553bfed03d159a865ff Reviewed-by: Allan Sandfeld Jensen --- configure.pri | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.pri b/configure.pri index a7a74314431..8705ad93f73 100644 --- a/configure.pri +++ b/configure.pri @@ -140,9 +140,9 @@ defineTest(qtConfTest_detectPlatform) { } defineTest(qtConfTest_detectArch) { - macos { + macos:contains(QT_ARCHS, "arm64") { qtLog("Apple Silicon not supported yet.") - contains(QT_ARCHS, "arm64"): return(false) + return(false) } contains(QT_ARCH, "i386")|contains(QT_ARCH, "x86_64"): return(true) contains(QT_ARCH, "arm")|contains(QT_ARCH, "arm64"): return(true) From 0361b2cce3212ccd9b11cd9c5038edb52f271b53 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 22 Dec 2021 11:17:38 +0100 Subject: [PATCH 038/132] Update Chromium MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Submodule src/3rdparty b77d64307..0ad281437: > [Backport] CVE-2021-4102: Use after free in V8 > [Backport] CVE-2021-4101: Heap buffer overflow in Swiftshader. > [Backport] CVE-2021-4099: Use after free in Swiftshader > [Backport] CVE-2021-4098: Insufficient data validation in Mojo > Try to fix build on Apple Monterey > [Backport] Handle long SIGSTKSZ in glibc > 2.33 > [Backport] abseil-cpp: Fixes build with latest glibc Fixes: QTBUG-99403 Change-Id: I24fe2b4cc0834200296c345fb29ffe5d1d4b1bb0 Reviewed-by: Tor Arne Vestbø --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index b77d64307a4..0ad28143707 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit b77d64307a47f35975082e662cc7786ba3d591d8 +Subproject commit 0ad2814370799a2161057d92231fe3ee00e2fe98 From 5018a477c314184f75bff24713deb47d8aef15cb Mon Sep 17 00:00:00 2001 From: Tarja Sundqvist Date: Fri, 31 Dec 2021 15:49:36 +0200 Subject: [PATCH 039/132] Bump version from 5.15.8 to 5.15.9 Change-Id: I2c8ecfa06abf6337309716160e38522a93cb3368 Reviewed-by: Allan Sandfeld Jensen --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index ddf46fa490e..1d0279c426f 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -5,4 +5,4 @@ QTWEBENGINE_OUT_ROOT = $$shadowed($$PWD) load(qt_build_config) CONFIG += warning_clean -MODULE_VERSION = 5.15.8 +MODULE_VERSION = 5.15.9 From 763db8ce9ef7e7ac65b3b1a6b3358d75ee0a04a8 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 11 Jan 2022 13:58:16 +0100 Subject: [PATCH 040/132] Avoid using xkbcommon in non-X11 builds Chromium defaults to using it now Change-Id: I24f711ad0a7811b6ab644cef78a1ae0fac7b3d42 Reviewed-by: Peter Varga --- src/core/config/linux.pri | 2 ++ src/pdf/config/common.pri | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri index 3e490a0d58e..33dd28b42f5 100644 --- a/src/core/config/linux.pri +++ b/src/core/config/linux.pri @@ -27,6 +27,8 @@ qtConfig(webengine-embedded-build) { gn_args += use_xkbcommon=true packagesExist(xscrnsaver): gn_args += use_xscrnsaver=true qtConfig(webengine-webrtc): gn_args += rtc_use_x11=true + } else { + gn_args += use_xkbcommon=false } qtConfig(webengine-webrtc): qtConfig(webengine-webrtc-pipewire): gn_args += rtc_use_pipewire=true diff --git a/src/pdf/config/common.pri b/src/pdf/config/common.pri index c97d8036af6..ec65b7bff15 100644 --- a/src/pdf/config/common.pri +++ b/src/pdf/config/common.pri @@ -41,6 +41,10 @@ qtConfig(webengine-qt-zlib) { gn_args += "qt_zlib=\"$$system_path($$[QT_INSTALL_LIBS]/$$qtzlib)\"" } +linux:!qtConfig(webengine-ozone-x11) { + gn_args += use_xkbcommon=false +} + qtConfig(pdf-v8) { gn_args += pdf_enable_v8=true } else { From c3fce935224038c64ee665ca4497982dcc9486f6 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 17 Jan 2022 10:34:36 +0100 Subject: [PATCH 041/132] Update Chromium MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Submodule src/3rdparty 0ad281437..48a205f9e: > Do not overwrite signal handlers in the browser process. > [Backport] Copy 'name_' member during StyleRuleProperty::Copy Change-Id: Ifd4b0c0d130d024e6b97f6898180d9b39cf19814 Reviewed-by: Michael Brüning --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 0ad28143707..48a205f9e05 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 0ad2814370799a2161057d92231fe3ee00e2fe98 +Subproject commit 48a205f9e054b5cc3e67df2e25382da9460c0015 From 34b5b4b19c510aa6d701119d9c594a754bd21afc Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 6 Jan 2022 15:02:53 +0100 Subject: [PATCH 042/132] Do not override signal handlers We used to have this, but it got dropped at some point in an adaptions. Fixes: QTBUG-99263 Change-Id: I3bf86a1b42edca0cd792723c85d7dcb7877fea37 Reviewed-by: Michal Klocek (cherry picked from commit fbaab46becbf5ea063a8b4a01abf8cd1d4a1725d) Reviewed-by: Qt Cherry-pick Bot --- src/core/web_engine_context.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index 6c93dff72c9..eb459fbdc35 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -796,6 +796,7 @@ WebEngineContext::WebEngineContext() registerMainThreadFactories(); content::ContentMainParams contentMainParams(m_mainDelegate.get()); + contentMainParams.setup_signal_handlers = false; #if defined(OS_WIN) contentMainParams.sandbox_info = staticSandboxInterfaceInfo(); sandbox::SandboxInterfaceInfo sandbox_info = {0}; From 4b5504d4d93152894024c58e040b61f03caaa837 Mon Sep 17 00:00:00 2001 From: Szabolcs David Date: Tue, 11 Jan 2022 14:53:00 +0100 Subject: [PATCH 043/132] Fix printing PDF files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Delegate printing task down to the guest WebContents if any is present. Also update PrintWebViewHelperDelegateQt to find the plugin element properly for printing. Task-number: QTBUG-98941 Change-Id: I81004a2275e0870a17565af527b1450472afb24b Reviewed-by: Michael Brüning (cherry picked from commit 455efe7ef204c6cd8de72b9b1f922f1681f58589) Reviewed-by: Allan Sandfeld Jensen --- .../print_web_view_helper_delegate_qt.cpp | 25 +++++++++++--- src/core/web_contents_adapter.cpp | 33 ++++++++++++------- src/core/web_contents_adapter.h | 1 + 3 files changed, 43 insertions(+), 16 deletions(-) diff --git a/src/core/renderer/print_web_view_helper_delegate_qt.cpp b/src/core/renderer/print_web_view_helper_delegate_qt.cpp index beae6ecfa07..5dcfaafd6a8 100644 --- a/src/core/renderer/print_web_view_helper_delegate_qt.cpp +++ b/src/core/renderer/print_web_view_helper_delegate_qt.cpp @@ -43,11 +43,17 @@ #include "content/public/renderer/render_frame.h" #include "content/public/renderer/render_view.h" +#include "extensions/buildflags/buildflags.h" #include "extensions/common/constants.h" #include "third_party/blink/public/web/web_document.h" #include "third_party/blink/public/web/web_element.h" #include "third_party/blink/public/web/web_local_frame.h" +#if BUILDFLAG(ENABLE_EXTENSIONS) +#include "chrome/common/webui_url_constants.h" +#include "extensions/common/constants.h" +#endif // BUILDFLAG(ENABLE_EXTENSIONS) + #include "print_web_view_helper_delegate_qt.h" #include "web_engine_library_info.h" @@ -56,14 +62,23 @@ PrintWebViewHelperDelegateQt::~PrintWebViewHelperDelegateQt() {} blink::WebElement PrintWebViewHelperDelegateQt::GetPdfElement(blink::WebLocalFrame *frame) { +#if BUILDFLAG(ENABLE_EXTENSIONS) GURL url = frame->GetDocument().Url(); - if (url.SchemeIs(extensions::kExtensionScheme) && url.host() == extension_misc::kPdfExtensionId) { + bool inside_print_preview = url.GetOrigin() == chrome::kChromeUIPrintURL; + bool inside_pdf_extension = url.SchemeIs(extensions::kExtensionScheme) && + url.host_piece() == extension_misc::kPdfExtensionId; + if (inside_print_preview || inside_pdf_extension) { // with id="plugin" is created in - // chrome/browser/resources/pdf/pdf.js. - auto plugin_element = frame->GetDocument().GetElementById("plugin"); - CHECK(!plugin_element.IsNull()); - return plugin_element; + // chrome/browser/resources/pdf/pdf_viewer_base.js. + auto viewer_element = frame->GetDocument().GetElementById("viewer"); + if (!viewer_element.IsNull() && !viewer_element.ShadowRoot().IsNull()) { + auto plugin_element = viewer_element.ShadowRoot().QuerySelector("#plugin"); + if (!plugin_element.IsNull()) + return plugin_element; + } + NOTREACHED(); } +#endif // BUILDFLAG(ENABLE_EXTENSIONS) return blink::WebElement(); } diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index 2cd48907b3e..5b81bd3fc75 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -1332,10 +1332,13 @@ void WebContentsAdapter::printToPDF(const QPageLayout &pageLayout, const QString PrintViewManagerQt::PrintToPDFFileCallback callback = base::Bind(&callbackOnPdfSavingFinished, m_adapterClient, filePath); - PrintViewManagerQt::FromWebContents(m_webContents.get())->PrintToPDFFileWithCallback(pageLayout, - true, - filePath, - callback); + content::WebContents *webContents = m_webContents.get(); + if (content::WebContents *guest = guestWebContents()) + webContents = guest; + PrintViewManagerQt::FromWebContents(webContents)->PrintToPDFFileWithCallback(pageLayout, + true, + filePath, + callback); #endif // QT_CONFIG(webengine_printing_and_pdf) } @@ -1348,10 +1351,13 @@ quint64 WebContentsAdapter::printToPDFCallbackResult(const QPageLayout &pageLayo PrintViewManagerQt::PrintToPDFCallback callback = base::Bind(&callbackOnPrintingFinished, m_adapterClient, m_nextRequestId); - PrintViewManagerQt::FromWebContents(m_webContents.get())->PrintToPDFWithCallback(pageLayout, - colorMode, - useCustomMargins, - callback); + content::WebContents *webContents = m_webContents.get(); + if (content::WebContents *guest = guestWebContents()) + webContents = guest; + PrintViewManagerQt::FromWebContents(webContents)->PrintToPDFWithCallback(pageLayout, + colorMode, + useCustomMargins, + callback); return m_nextRequestId++; #else Q_UNUSED(pageLayout); @@ -1444,6 +1450,12 @@ content::WebContents *WebContentsAdapter::webContents() const return m_webContents.get(); } +content::WebContents *WebContentsAdapter::guestWebContents() const +{ + std::vector innerWebContents = m_webContents->GetInnerWebContents(); + return !innerWebContents.empty() ? innerWebContents[0] : nullptr; +} + #if QT_CONFIG(webengine_webchannel) QWebChannel *WebContentsAdapter::webChannel() const { @@ -1551,9 +1563,8 @@ void WebContentsAdapter::startDragging(QObject *dragSource, const content::DropD // dropping data into them. We don't even try to support dropping into PDF input fields, // since it's not working in Chrome right now. content::WebContents *targetWebContents = m_webContents.get(); - std::vector innerWebContents = m_webContents->GetInnerWebContents(); - if (!innerWebContents.empty()) - targetWebContents = innerWebContents[0]; + if (content::WebContents *guest = guestWebContents()) + targetWebContents = guest; content::RenderViewHost *rvh = targetWebContents->GetRenderViewHost(); if (rvh) { diff --git a/src/core/web_contents_adapter.h b/src/core/web_contents_adapter.h index 78dda6060ee..ba02a0418c9 100644 --- a/src/core/web_contents_adapter.h +++ b/src/core/web_contents_adapter.h @@ -242,6 +242,7 @@ class Q_WEBENGINECORE_PRIVATE_EXPORT WebContentsAdapter : public QEnableSharedFr // meant to be used within WebEngineCore only void initialize(content::SiteInstance *site); content::WebContents *webContents() const; + content::WebContents *guestWebContents() const; void updateRecommendedState(); void setRequestInterceptor(QWebEngineUrlRequestInterceptor *interceptor); QWebEngineUrlRequestInterceptor* requestInterceptor() const; From cd2b9fa576bc252740a873ca8372a4f61fb96269 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Tue, 7 Dec 2021 12:04:25 +0200 Subject: [PATCH 044/132] Update module-split for installer Module-split update to get all QtPdf related files. Fixes: QTBUG-86972 Fixes: QTBUG-100023 Change-Id: I9833fe2be00359c08ca71a2301262473b760df45 Reviewed-by: Michal Klocek (cherry picked from commit 2fd5794acbde0280aee59ee05d61ae0910f59dca) Reviewed-by: Qt Cherry-pick Bot --- coin/qt-installer-package-config.json | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/coin/qt-installer-package-config.json b/coin/qt-installer-package-config.json index 0ba69adacfb..d556d245f9b 100644 --- a/coin/qt-installer-package-config.json +++ b/coin/qt-installer-package-config.json @@ -2,16 +2,19 @@ "version": "1", "module-split": { "qtpdf": [ + "**/bin/*Pdf*", "**/include/*QtPdf*/**/*", - "**/lib/cmake/Qt5Gui/*", - "**/lib/cmake/Qt5Pdf/*", - "**/lib/cmake/Qt5PdfWidgets/*", - "**/lib/pkgconfig/Qt5Pdf*", - "**/lib/libQt5Pdf*", + "**/lib/cmake/Qt*Gui/*Pdf*", + "**/lib/cmake/Qt*Pdf*/*", + "**/lib/cmake/Qt*Qml/QmlPlugins/*pdf*", + "**/lib/metatypes/*pdf*", + "**/lib/pkgconfig/*Pdf*", + "**/lib/*Pdf*", "**/lib/static_chrome/*", - "**/lib/QtPdf.framework/*", + "**/lib/QtPdf*.framework/**", "**/mkspecs/modules/qt_lib_pdf*", "**/mkspecs/modules/qt_plugin_qpdf.pri", + "**/modules/Pdf*", "**/plugins/imageformats/*", "**/qml/QtQuick/**/*" ] From 73e76f9e86b3fded45be6b232bdebe75e7136e4a Mon Sep 17 00:00:00 2001 From: Benjamin Terrier Date: Sat, 22 Jan 2022 02:59:56 +0100 Subject: [PATCH 045/132] Use IsSameDocument() rather than IsLoadingToDifferentDocument() For certain types of redirect navigations (for example, with a non-default useragent set) 'IsLoadingToDifferentDocument()' can be unexpectedly false. In such cases 'navigation_handle->IsSameDocument()' also returns false. Fixes: QTBUG-94924 Change-Id: Ie2c17127e1a00ffc515829526320ba2f71d45af5 Reviewed-by: Kirill Burtsev (cherry picked from commit 8b5e3a46f253cd82dc48bc20c4233f1bf79fcb87) Reviewed-by: Qt Cherry-pick Bot --- src/core/web_contents_delegate_qt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp index d52b07df360..e7bfa651031 100644 --- a/src/core/web_contents_delegate_qt.cpp +++ b/src/core/web_contents_delegate_qt.cpp @@ -354,7 +354,7 @@ void WebContentsDelegateQt::DidStartNavigation(content::NavigationHandle *naviga if (!webEngineSettings()->testAttribute(WebEngineSettings::ErrorPageEnabled)) navigation_handle->SetSilentlyIgnoreErrors(); - if (!navigation_handle->IsInMainFrame() || !web_contents()->IsLoadingToDifferentDocument()) + if (!navigation_handle->IsInMainFrame() || navigation_handle->IsSameDocument()) return; m_faviconManager->resetCandidates(); From f206c05a9dc6c2391b10762b6038f65fdb6818b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Fri, 4 Mar 2022 00:57:55 +0100 Subject: [PATCH 046/132] Update Chromium Submodule src/3rdparty: 48a205f9..ab3a3447: > [Backport] CVE-2022-0108: Inappropriate implementation in Navigation > [Backport] Dependency for CVE-2022-0108 > Bump V8_PATCH_LEVEL > [Backport] CVE-2022-0111 and CVE-2022-0117 (2/2) > [Backport] CVE-2022-0111 and CVE-2022-0117 (1/2) > [Backport] Dependency for CVE-2022-0111 and CVE-2022-0117 > [Backport] CVE-2022-0310 and CVE-0311: Heap buffer overflow in Task Manager > [Backport] CVE-2022-23852 > [Backport] Security bug 1289394 > [Backport] CVE-2022-0608: Integer overflow in Mojo > [Backport] Security bug 1270014 > [Backport] Security bug 1261415 > [Backport] CVE-2022-0291: Inappropriate implementation in Storage > [Backport] CVE-2022-0293: Use after free in Web packaging > [Backport] CVE-2022-0607: Use after free in GPU > [Backport] CVE-2022-0610: Inappropriate implementation in Gamepad API > [Backport] CVE-2022-0606: Use after free in ANGLE > [Backport] Security bug 1292537 > [Backport] CVE-2022-0609: Use after free in Animation > [Backport] Security bug 1265570 > [Backport] CVE-2022-0116: Inappropriate implementation in Compositing > [Backport] Dependency for CVE-2022-0116 > [Backport] CVE-2022-0102: Type Confusion in V8 > [Backport] Security bug 1256885 > [Backport] CVE-2022-0460: Use after free in Window Dialog > [Backport] CVE-2022-0459: Use after free in Screen Capture > [Backport] CVE-2022-0461: Policy bypass in COOP > [Backport] Security bug 1280743 > [Backport] Security bug 1274113 > [Backport] CVE-2022-0456: Use after free in Web Search > [Backport] CVE-2022-0298: Use after free in Scheduling > [Backport] Security bug 1276331 > [Backport] CVE-2022-0305: Inappropriate implementation in Service Worker API > [Backport] CVE-2022-0306: Heap buffer overflow in PDFium > [Backport] CVE-2022-0289: Use after free in Safe browsing > [Backport] CVE-2022-0100: Heap buffer overflow in Media streams API > [Backport] CVE-2022-0113: Inappropriate implementation in Blink > [Backport] Security bug 1258603 > [Backport] Security bug 1259557 > [Backport] CVE-2022-0103: Use after free in SwiftShader > [Backport] CVE-2022-0109: Inappropriate implementation in Autofill (2/2) > [Backport] CVE-2022-0109: Inappropriate implementation in Autofill (1/2) > [Backport] CVE-2022-0104: Heap buffer overflow in ANGLE > [Backport] Security bug 1268448 > Replace base::ranges::set_union with std::set_union to fix MSVC2017 build Task-number: QTBUG-99721 Task-number: QTBUG-101053 Change-Id: I7a834174f05381b1445ee4b222a4e7e67f13472c Reviewed-by: Allan Sandfeld Jensen --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 48a205f9e05..ab3a3447aa5 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 48a205f9e054b5cc3e67df2e25382da9460c0015 +Subproject commit ab3a3447aa59c946fec6877d748bb8a72a8b34be From 9e3ad4273df3aeb16687e924c65fe451e4c03ad2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Wed, 9 Mar 2022 12:15:02 +0100 Subject: [PATCH 047/132] Update documented Chromium version Adjusted security patch versions. Change-Id: Id94c288faee9f16c5b24f7357728ed65b6cf77ea Reviewed-by: Allan Sandfeld Jensen --- CHROMIUM_VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION index 4400ceecc08..b7e9d2de991 100644 --- a/CHROMIUM_VERSION +++ b/CHROMIUM_VERSION @@ -1,2 +1,2 @@ Based on Chromium version: 87.0.4280.144 -Patched with security patches up to Chromium version: 96.0.4664.93 +Patched with security patches up to Chromium version: 98.0.4758.102 From 722b27f8473fcac1c24b5da393d6ef42fcfb9a16 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Wed, 16 Mar 2022 10:25:14 +0100 Subject: [PATCH 048/132] QPdfView: scale page rendering according to devicePixelRatio MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On high-dpi screens we want the rendered pixels to match device pixels. Fixes: QTBUG-86948 Change-Id: I4879adc0aeb001750d42abc1e7d50ca3f11a5fe8 Reviewed-by: Morten Johan Sørvig (cherry picked from commit 931e1be35058e43552963510f858766683cbb310) Reviewed-by: Qt Cherry-pick Bot --- src/pdfwidgets/qpdfview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pdfwidgets/qpdfview.cpp b/src/pdfwidgets/qpdfview.cpp index 35e3686337f..32d0826af27 100644 --- a/src/pdfwidgets/qpdfview.cpp +++ b/src/pdfwidgets/qpdfview.cpp @@ -461,9 +461,9 @@ void QPdfView::paintEvent(QPaintEvent *event) const auto pageIt = d->m_pageCache.constFind(page); if (pageIt != d->m_pageCache.cend()) { const QImage &img = pageIt.value(); - painter.drawImage(pageGeometry.topLeft(), img); + painter.drawImage(pageGeometry, img); } else { - d->m_pageRenderer->requestPage(page, pageGeometry.size()); + d->m_pageRenderer->requestPage(page, pageGeometry.size() * devicePixelRatioF()); } } } From e10b968e6338ec1b22004f7054094ec0931e1406 Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Mon, 21 Mar 2022 13:34:08 +0100 Subject: [PATCH 049/132] CookieBrowser: Make alternating rows readable in dark mode Use colors from default QPalette instead of hard-coded values. Change-Id: Ib7cb8ef4bb5ddabc2233ea6596c0527538275963 Reviewed-by: Michal Klocek (cherry picked from commit 6a9b4e8072f3a2c0d6685100e0c7afb906b2535a) Reviewed-by: Qt Cherry-pick Bot --- examples/webenginewidgets/cookiebrowser/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/webenginewidgets/cookiebrowser/mainwindow.cpp b/examples/webenginewidgets/cookiebrowser/mainwindow.cpp index 970381d4d42..0171b9c7f4d 100644 --- a/examples/webenginewidgets/cookiebrowser/mainwindow.cpp +++ b/examples/webenginewidgets/cookiebrowser/mainwindow.cpp @@ -107,7 +107,7 @@ CookieWidget::CookieWidget(const QNetworkCookie &cookie, QWidget *parent): QWidg void CookieWidget::setHighlighted(bool enabled) { QPalette p = palette(); - p.setColor(backgroundRole(), enabled ? QColor(0xF0, 0xF8, 0xFF) : Qt::white); + p.setColor(backgroundRole(), enabled ? p.alternateBase().color() : p.base().color()); setPalette(p); } From dcdf9656f794e1903163a5533d0a325eb3dce423 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 30 Mar 2022 11:48:18 +0200 Subject: [PATCH 050/132] Update Chromium Submodule src/3rdparty ab3a3447a..d13d0924c: > [Backport] CVE-2022-0971 > [Backport] CVE-2022-1096 > [Backport] sandbox: build if glibc 2.34+ dynamic stack size is enabled Task-number: QTBUG-102144 Change-Id: I88c5a4b18640e1579c67c874f21c627caabdf991 Reviewed-by: Michal Klocek Reviewed-by: Tarja Sundqvist (cherry picked from commit 4f570bd7add21725d66ac8396dcf21917c3a603f) Reviewed-by: Qt Cherry-pick Bot --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index ab3a3447aa5..d13d0924c4e 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit ab3a3447aa59c946fec6877d748bb8a72a8b34be +Subproject commit d13d0924c4e18ecc4b79adf0fec142ee9a9eaa14 From 12f61c690f3d309e2357a1bae22709dae26c87c8 Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Fri, 25 Mar 2022 07:58:53 +0100 Subject: [PATCH 051/132] CustomDialogs: Make custom input fields readable in dark mode Also set hidden characters for custom password field. Change-Id: I8512a6a4215035e21a66aa5564aeb3ba886a900b Reviewed-by: Michal Klocek (cherry picked from commit 344cc49f3a7ea64376eb085e1203029a3fa4ba6f) Reviewed-by: Allan Sandfeld Jensen --- .../webengine/customdialogs/forms/AuthenticationForm.ui.qml | 3 +++ examples/webengine/customdialogs/forms/JavaScriptForm.ui.qml | 1 + 2 files changed, 4 insertions(+) diff --git a/examples/webengine/customdialogs/forms/AuthenticationForm.ui.qml b/examples/webengine/customdialogs/forms/AuthenticationForm.ui.qml index 8b852338875..ecbe8d3afd7 100644 --- a/examples/webengine/customdialogs/forms/AuthenticationForm.ui.qml +++ b/examples/webengine/customdialogs/forms/AuthenticationForm.ui.qml @@ -122,6 +122,7 @@ Item { height: 22 Layout.fillWidth: true font.pointSize: 12 + textColor: "black" } Text { @@ -136,6 +137,8 @@ Item { height: 26 Layout.fillWidth: true font.pointSize: 12 + textColor: "black" + echoMode: TextInput.Password } Item { diff --git a/examples/webengine/customdialogs/forms/JavaScriptForm.ui.qml b/examples/webengine/customdialogs/forms/JavaScriptForm.ui.qml index 1c7fd29ed81..7dad1090ad6 100644 --- a/examples/webengine/customdialogs/forms/JavaScriptForm.ui.qml +++ b/examples/webengine/customdialogs/forms/JavaScriptForm.ui.qml @@ -124,6 +124,7 @@ Item { height: 22 Layout.fillWidth: true font.pointSize: 12 + textColor: "black" } Item { From 56260bb605a74fabdfc74cef3bf890394af88b3d Mon Sep 17 00:00:00 2001 From: Tarja Sundqvist Date: Wed, 6 Apr 2022 20:12:10 +0300 Subject: [PATCH 052/132] Bump version to 5.15.10 Change-Id: I016e5e60c6be22aa780ea7c4c742d7ff0bb8f0fa Reviewed-by: Allan Sandfeld Jensen --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index 1d0279c426f..83823ceeedc 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -5,4 +5,4 @@ QTWEBENGINE_OUT_ROOT = $$shadowed($$PWD) load(qt_build_config) CONFIG += warning_clean -MODULE_VERSION = 5.15.9 +MODULE_VERSION = 5.15.10 From 22c98aedbc75688200d07dd20ca43d9c48841894 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Mon, 11 Apr 2022 15:44:16 +0200 Subject: [PATCH 053/132] Fix cross compilation x86_64->arm64 on mac MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To cross-compile for arm64 we just need target_cpu sysroot is not required. Adding target_cpu will result in "-arch arm64 -mcpu=apple-a12" Change-Id: Id27e0f48309ca1d85728b5f3ca6761d8fd27e3ab Reviewed-by: Allan Sandfeld Jensen Reviewed-by: Tor Arne Vestbø --- src/buildtools/config/mac_osx.pri | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/buildtools/config/mac_osx.pri b/src/buildtools/config/mac_osx.pri index b53f9170647..c0ba837e4b3 100644 --- a/src/buildtools/config/mac_osx.pri +++ b/src/buildtools/config/mac_osx.pri @@ -36,3 +36,6 @@ gn_args += \ use_external_popup_menu=false \ angle_enable_vulkan=false +cross_compile:!host_build { + gn_args += target_cpu=\"$$gnArch($$QT_ARCH)\" +} From d6512f48b86ccce1ce04784791576034acf641de Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Tue, 12 Apr 2022 08:19:20 +0200 Subject: [PATCH 054/132] Enable Apple Silicon support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reverts "Don't unconditionally log that Apple Silicon is not supported" This reverts commit 3387ca53e550c1a63ed32ddf4f1dc48e61e9fa62. Revert "Skip QtWebEngine and QtPdf if building for Apple Silicon" This reverts commit 1c9785bf7eee038f6f0b8e2d73dcb9588f6d60c1. [ChangeLog] Apple Silicon universal- and cross-builds on macOS are now supported. Change-Id: I01973e3a29def4cd001b5dcb6354d23dbfe15dcd Reviewed-by: Tor Arne Vestbø --- configure.pri | 4 ---- src/buildtools/config/support.pri | 4 ---- 2 files changed, 8 deletions(-) diff --git a/configure.pri b/configure.pri index 8705ad93f73..e072961f057 100644 --- a/configure.pri +++ b/configure.pri @@ -140,10 +140,6 @@ defineTest(qtConfTest_detectPlatform) { } defineTest(qtConfTest_detectArch) { - macos:contains(QT_ARCHS, "arm64") { - qtLog("Apple Silicon not supported yet.") - return(false) - } contains(QT_ARCH, "i386")|contains(QT_ARCH, "x86_64"): return(true) contains(QT_ARCH, "arm")|contains(QT_ARCH, "arm64"): return(true) contains(QT_ARCH, "mips"): return(true) diff --git a/src/buildtools/config/support.pri b/src/buildtools/config/support.pri index 7a07b1b5bac..e7f869a15f9 100644 --- a/src/buildtools/config/support.pri +++ b/src/buildtools/config/support.pri @@ -110,10 +110,6 @@ defineTest(qtwebengine_checkForPlatform) { defineTest(qtwebengine_checkForArch) { module = $$1 !qtConfig(webengine-arch-support) { - macos:contains(QT_ARCHS, "arm64") { - qtwebengine_skipBuild("$${module} can not be built for Apple Silicon yet.") - return(false) - } qtwebengine_skipBuild("$${module} can only be built for x86, x86-64, ARM, Aarch64, and MIPSel architectures.") return(false) } From 404a40de5862c8ab24992ea4dcd2f8ef63f5e080 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Tue, 26 Apr 2022 19:56:47 +0200 Subject: [PATCH 055/132] Update Chromium MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pulls in following patches: * 019a6b9282e Fix arm64 Skia build for macOS * 368eaa630ba Fixes for universal build * 08b4e141cc1 Fix clang set-but-unused-variable warning * 2082566249c [Backport] On arm64 hosts, set host_cpu to 'arm64', not 'arm'. * f47f334c8ba Fix undefined symbol for universal link * 23e13d55d84 Add crossbuild support for x64/x86 on macos-arm64 * 8a5738c744e Fix mac toolchain python linker script call * d3119947e27 Fix python calls * if1850dc7af Fix cross-compilation arm64->x86_64 * 0d984c7f044 Fix missing dependency for gpu sources Change-Id: Ib6ac1224b2e5e043c8351905066c7c041e308413 Reviewed-by: Tor Arne Vestbø --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index d13d0924c4e..0d984c7f044 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit d13d0924c4e18ecc4b79adf0fec142ee9a9eaa14 +Subproject commit 0d984c7f044a08975088191f92ecc9bc62424b14 From 8a52dee5ab480eef88b95361cf4db2ce36374c69 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Wed, 4 May 2022 09:12:47 +0200 Subject: [PATCH 056/132] macOS: Make linker warnings non-fatal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Coin exports bogus LIBRARY_PATH which ends up as linker warning. Task-number: COIN-854 Change-Id: I8036b38cdc5677056c14aa428e8b584b9ee6dc10 Reviewed-by: Tor Arne Vestbø --- src/buildtools/config/mac_osx.pri | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/buildtools/config/mac_osx.pri b/src/buildtools/config/mac_osx.pri index c0ba837e4b3..b821860833b 100644 --- a/src/buildtools/config/mac_osx.pri +++ b/src/buildtools/config/mac_osx.pri @@ -34,7 +34,8 @@ gn_args += \ mac_deployment_target=\"$${QMAKE_MACOSX_DEPLOYMENT_TARGET}\" \ mac_sdk_min=\"$${QMAKE_MAC_SDK_VERSION_MAJOR_MINOR}\" \ use_external_popup_menu=false \ - angle_enable_vulkan=false + angle_enable_vulkan=false \ + fatal_linker_warnings=false cross_compile:!host_build { gn_args += target_cpu=\"$$gnArch($$QT_ARCH)\" From 06fc47309609b9be735817da4f3bdf2e30e0b99c Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Tue, 26 Apr 2022 21:18:44 +0200 Subject: [PATCH 057/132] Add support for universal builds for qtwebengine and qtpdf As 5.15 is in maintenance mode add basic support for universal build without doing major refactors. The popper implementation should unify build layout instead of adding "isUniversal()" hacks. Add intermediate build files per architecture for Chromium build part and lipo them before final module linking. Task-number: QTBUG-85279 Change-Id: Iebfd7a277b23c1b10c8719041c5959fd9d5e2f06 Reviewed-by: Qt CI Bot Reviewed-by: Allan Sandfeld Jensen --- .../webenginewidgets/webenginewidgets.pro | 4 +- mkspecs/features/functions.prf | 5 ++ mkspecs/features/gn_generator.prf | 9 +- src/buildtools/config/lipo.pri | 85 +++++++++++++++++++ src/buildtools/config/lipo_linking.pri | 15 ++++ src/core/api/core_api.pro | 7 +- src/core/core.pro | 6 ++ src/core/core_chromium.pri | 10 ++- src/core/core_gn_config.pri | 10 ++- src/core/core_lipo.pro | 9 ++ src/core/core_module.pro | 14 ++- src/core/gn_run.pro | 41 ++++++--- src/pdf/gn_run.pro | 44 +++++++--- src/pdf/pdf.pro | 18 +++- src/pdf/pdfcore.pro | 8 +- src/pdf/pdfcore_generator.pro | 8 +- src/pdf/pdfcore_lipo.pro | 5 ++ src/src.pro | 2 +- tests/auto/widgets/widgets.pro | 4 +- 19 files changed, 256 insertions(+), 48 deletions(-) create mode 100644 src/buildtools/config/lipo.pri create mode 100644 src/buildtools/config/lipo_linking.pri create mode 100644 src/core/core_lipo.pro create mode 100644 src/pdf/pdfcore_lipo.pro diff --git a/examples/webenginewidgets/webenginewidgets.pro b/examples/webenginewidgets/webenginewidgets.pro index deb42a8cd42..31a214ceb59 100644 --- a/examples/webenginewidgets/webenginewidgets.pro +++ b/examples/webenginewidgets/webenginewidgets.pro @@ -1,3 +1,5 @@ +load(functions) + include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) # workaround for QTBUG-68093 QT_FOR_CONFIG += webenginecore webenginecore-private @@ -20,7 +22,7 @@ qtConfig(webengine-printing-and-pdf) { SUBDIRS += printme html2pdf } -qtConfig(webengine-spellchecker):!qtConfig(webengine-native-spellchecker):!cross_compile { +qtConfig(webengine-spellchecker):!qtConfig(webengine-native-spellchecker):!cross_compile:!isUniversal() { SUBDIRS += spellchecker } else { message("Spellcheck example will not be built because it depends on usage of Hunspell dictionaries.") diff --git a/mkspecs/features/functions.prf b/mkspecs/features/functions.prf index 2750d707171..7f630588a10 100644 --- a/mkspecs/features/functions.prf +++ b/mkspecs/features/functions.prf @@ -5,6 +5,11 @@ defineReplace(getConfigDir) { return("debug") } +defineTest(isUniversal) { + macos:count(QT_ARCHS, 1, >):return(true) + return(false) +} + defineReplace(getChromiumSrcDir) { exists($$QTWEBENGINE_ROOT/.git): git_chromium_src_dir = $$system("git config qtwebengine.chromiumsrcdir") # Fall back to the snapshot path if git does not know about chromium sources (i.e. init-repository.py has not been used) diff --git a/mkspecs/features/gn_generator.prf b/mkspecs/features/gn_generator.prf index a83b59847a9..306e58db164 100644 --- a/mkspecs/features/gn_generator.prf +++ b/mkspecs/features/gn_generator.prf @@ -27,7 +27,7 @@ defineReplace(filter_flag_values) { return($$value_to_check) } -isEmpty(GN_FILE): GN_FILE = $$system_path($$_PRO_FILE_PWD_/BUILD.gn) +isEmpty(GN_FILES): GN_FILES = $$system_path($$_PRO_FILE_PWD_/BUILD.gn) isEmpty(GN_RUN_BINARY_SCRIPT): GN_RUN_BINARY_SCRIPT = "//build/gn_run_binary.py" isEmpty(GN_FIND_MOCABLES_SCRIPT): GN_FIND_MOCABLES_SCRIPT = "//build/gn_find_mocables.py" @@ -260,12 +260,13 @@ GN_CONTENTS += "}" for (inc, GN_INCLUDES): GN_CONTENTS += $$cat($$inc,lines) } -build_pass|!debug_and_release: write_file($$GN_FILE, GN_CONTENTS) - +build_pass|!debug_and_release { + for(gnFile, GN_FILES): write_file($$gnFile, GN_CONTENTS) +} # The generated Makefile shouldn't build anything by itself, just re-run qmake if necessary TEMPLATE = aux SOURCES = HEADERS = RESOURCES = -QMAKE_DISTCLEAN += $$GN_FILE +QMAKE_DISTCLEAN += $$GN_FILES diff --git a/src/buildtools/config/lipo.pri b/src/buildtools/config/lipo.pri new file mode 100644 index 00000000000..f065c8ee9b4 --- /dev/null +++ b/src/buildtools/config/lipo.pri @@ -0,0 +1,85 @@ +for(arch, QT_ARCHS) { + + linking_pri = $$OUT_PWD/$$arch/$$getConfigDir()/$${TARGET}.pri + + !include($$linking_pri) { + message("Could not find the linking information that gn should have generated.") + } + + # Do not precompile any headers. We are only interested in the linker step. + PRECOMPILED_HEADER = + + isEmpty(NINJA_OBJECTS): error("Missing object files from linking pri.") + isEmpty(NINJA_LFLAGS): error("Missing linker flags from linking pri") + isEmpty(NINJA_ARCHIVES): error("Missing archive files from linking pri") + isEmpty(NINJA_LIBS): error("Missing library files from linking pri") + NINJA_OBJECTS = $$eval($$list($$NINJA_OBJECTS)) + # Do manual response files + + + RSP_OBJECT_FILE = $$OUT_PWD/$$arch/$$getConfigDir()/$${TARGET}_objects.rsp + for(object, NINJA_OBJECTS): RSP_OBJECTS_CONTENT += $$object + write_file($$RSP_OBJECT_FILE, RSP_OBJECTS_CONTENT) + RSP_ARCHIVE_FILE = $$OUT_PWD/$$arch/$$getConfigDir()/$${TARGET}_archives.rsp + for(archive, NINJA_ARCHIVES): RSP_ARCHIVES_CONTENT += $$archive + write_file($$RSP_ARCHIVE_FILE, RSP_ARCHIVES_CONTENT) + RSP_LIBS_FILE = $$OUT_PWD/$$arch/$$getConfigDir()/$${TARGET}_libs.rsp + for(lib, NINJA_LIBS): RSP_LIBS_CONTENT += $$lib + write_file($$RSP_LIBS_FILE, RSP_LIBS_CONTENT) + + unset(RSP_OBJECTS_CONTENT) + unset(RSP_ARCHIVES_CONTENT) + unset(RSP_LIBS_CONTENT) + unset(NINJA_OBJECTS) + unset(NINJA_LFLAGS) + unset(NINJA_ARCHIVES) + unset(NINJA_LIBS) +} + +LIPO_OUT_FILE = $$OUT_PWD/$$getConfigDir()/$${TARGET}.a +INPUT_FILE = . +lipo.name = lipo +lipo.output = $$LIPO_OUT_FILE +lipo.input = INPUT_FILE +lipo.CONFIG += target_predeps no_link +lipo.commands = lipo -create -output $$LIPO_OUT_FILE +QMAKE_EXTRA_COMPILERS += lipo + +include($$QTWEBENGINE_ROOT/src/buildtools/config/mac_osx.pri) + +for(arch, QT_ARCHS) { + + RSP_OBJECT_FILE = $$OUT_PWD/$$arch/$$getConfigDir()/$${TARGET}_objects.rsp + OBJECT_FILE = $$OUT_PWD/$$arch/$$getConfigDir()/$${TARGET}_objects.o + RSP_ARCHIVE_FILE = $$OUT_PWD/$$arch/$$getConfigDir()/$${TARGET}_archives.rsp + ARCHIVE_FILE = $$OUT_PWD/$$arch/$$getConfigDir()/$${TARGET}_archives.o + OUT_FILE = $$OUT_PWD/$$arch/$$getConfigDir()/$${TARGET}.a + + intermediate_archive_$${arch}.name = build_intermediate_archive_$${arch} + intermediate_archive_$${arch}.output= $$OUT_FILE + intermediate_archive_$${arch}.input = INPUT_FILE + intermediate_archive_$${arch}.depends = $$RSP_OBJECT_FILE $$RSP_ARCHIVE_FILE $$NINJA_TARGETDEPS + intermediate_archive_$${arch}.CONFIG += target_predeps no_link + intermediate_archive_$${arch}.commands = \ + clang++ -r -nostdlib -arch $$arch \ + -mmacosx-version-min=$${QMAKE_MACOSX_DEPLOYMENT_TARGET} \ + -o $$OBJECT_FILE \ + -Wl,-keep_private_externs \ + @$$RSP_OBJECT_FILE ;\ + $$QMAKE_CC -r -nostdlib -arch $$arch \ + -mmacosx-version-min=$${QMAKE_MACOSX_DEPLOYMENT_TARGET} \ + -o $$ARCHIVE_FILE \ + -Wl,-keep_private_externs \ + -Wl,-all_load \ + @$$RSP_ARCHIVE_FILE ;\ + ar -crs $$OUT_FILE $$OBJECT_FILE $$ARCHIVE_FILE + lipo.depends += $$OUT_FILE + lipo.commands += $$OUT_FILE + QMAKE_EXTRA_COMPILERS += intermediate_archive_$$arch + + unset(RSP_OBJECT_FILE) + unset(OBJECT_FILE) + unset(RSP_ARCHVIE_FILE) + unset(OUT_FILE) +} + diff --git a/src/buildtools/config/lipo_linking.pri b/src/buildtools/config/lipo_linking.pri new file mode 100644 index 00000000000..c65fef059da --- /dev/null +++ b/src/buildtools/config/lipo_linking.pri @@ -0,0 +1,15 @@ +include($$QTWEBENGINE_OUT_ROOT/src/buildtools/qtbuildtools-config.pri) +QT_FOR_CONFIG += buildtools-private + +LIPO_OUT_FILE = $$OUT_PWD/$$getConfigDir()/$${TARGET}.a +!static { + QMAKE_LFLAGS += $${LIPO_OUT_FILE} +} else { + LIBS_PRIVATE += $${LIPO_OUT_FILE} +} + +LIBS_PRIVATE += @$$OUT_PWD/$$QT_ARCH/$$getConfigDir()/$${TARGET}_libs.rsp + +qtConfig(webengine-noexecstack): QMAKE_LFLAGS += -Wl,-z,noexecstack + +POST_TARGETDEPS += $$LIPO_OUT_FILE diff --git a/src/core/api/core_api.pro b/src/core/api/core_api.pro index 2ddd0d69f5e..28d5586ba8c 100644 --- a/src/core/api/core_api.pro +++ b/src/core/api/core_api.pro @@ -23,7 +23,12 @@ DEFINES += \ NOMINMAX CHROMIUM_SRC_DIR = $$QTWEBENGINE_ROOT/$$getChromiumSrcDir() -CHROMIUM_GEN_DIR = $$OUT_PWD/../$$getConfigDir()/gen + +isUniversal() { + CHROMIUM_GEN_DIR = $$OUT_PWD/../$$QT_ARCH/$$getConfigDir()/gen +} else { + CHROMIUM_GEN_DIR = $$OUT_PWD/../$$getConfigDir()/gen +} INCLUDEPATH += $$QTWEBENGINE_ROOT/src/core \ $$CHROMIUM_GEN_DIR \ $$CHROMIUM_SRC_DIR/third_party/abseil-cpp \ diff --git a/src/core/core.pro b/src/core/core.pro index f2d3fd30722..fa1d7f6a7b4 100644 --- a/src/core/core.pro +++ b/src/core/core.pro @@ -7,9 +7,13 @@ TEMPLATE = subdirs core_headers.file = core_headers.pro core_api.file = api/core_api.pro +core_lipo.file = core_lipo.pro +core_lipo.depends = gn_run + # This will take the compile output of ninja, and link+deploy the final binary. core_module.file = core_module.pro core_module.depends = core_api +isUniversal(): core_module.depends += core_lipo core_generator.file = core_generator.pro core_generator.depends = core_headers @@ -44,5 +48,7 @@ core_project.depends = gn_run core_api \ core_module + isUniversal(): SUBDIRS += core_lipo + false: SUBDIRS += core_project } diff --git a/src/core/core_chromium.pri b/src/core/core_chromium.pri index e978d20a186..a846f2fbc19 100644 --- a/src/core/core_chromium.pri +++ b/src/core/core_chromium.pri @@ -21,9 +21,13 @@ DEFINES += QT_NO_KEYWORDS \ BUILDING_CHROMIUM # Ensure that response files, generated by qtbase/mkspecs/features/moc.prf, are found by moc. -MOC_DIR = $$OUT_PWD/$$getConfigDir()/.moc -RCC_DIR = $$OUT_PWD/$$getConfigDir()/.rcc - +isUniversal() { + MOC_DIR = $$OUT_PWD/$$QT_ARCH/$$getConfigDir()/.moc + RCC_DIR = $$OUT_PWD/$$QT_ARCH/$$getConfigDir()/.rcc +} else { + MOC_DIR = $$OUT_PWD/$$getConfigDir()/.moc + RCC_DIR = $$OUT_PWD/$$getConfigDir()/.rcc +} # Assume that we want mobile touch and low-end hardware behaviors # whenever we are cross compiling. qtConfig(webengine-embedded-build): DEFINES += QTWEBENGINE_EMBEDDED_SWITCHES diff --git a/src/core/core_gn_config.pri b/src/core/core_gn_config.pri index 2b8f2e18f93..379bbac9424 100644 --- a/src/core/core_gn_config.pri +++ b/src/core/core_gn_config.pri @@ -1,10 +1,16 @@ CONFIG = gn_generator $$CONFIG GN_SRC_DIR = $$PWD -GN_FILE = $$OUT_PWD/$$getConfigDir()/BUILD.gn +isUniversal() { + for(arch, QT_ARCHS) { + GN_FILES += $$OUT_PWD/$$arch/$$getConfigDir()/BUILD.gn + } +} else { + GN_FILES = $$OUT_PWD/$$getConfigDir()/BUILD.gn +} GN_FIND_MOCABLES_SCRIPT = $$shell_path($$QTWEBENGINE_ROOT/tools/scripts/gn_find_mocables.py) GN_RUN_BINARY_SCRIPT = $$shell_path($$QTWEBENGINE_ROOT/tools/scripts/gn_run_binary.py) GN_IMPORTS = $$PWD/qtwebengine.gni -qtConfig (webengine-extensions) { +qtConfig(webengine-extensions) { GN_INCLUDES += $$PWD/qtwebengine_sources.gni $$PWD/qtwebengine_resources.gni $$PWD/common/extensions/api/qtwebengine_extensions_features.gni } else { GN_INCLUDES = $$PWD/qtwebengine_sources.gni $$PWD/qtwebengine_resources.gni diff --git a/src/core/core_lipo.pro b/src/core/core_lipo.pro new file mode 100644 index 00000000000..41846b7f20a --- /dev/null +++ b/src/core/core_lipo.pro @@ -0,0 +1,9 @@ +TEMPLATE = aux + +qtConfig(debug_and_release): CONFIG += debug_and_release +qtConfig(build_all): CONFIG += build_all + +TARGET= QtWebEngineCore +include($${QTWEBENGINE_ROOT}/src/buildtools/config/lipo.pri) + + diff --git a/src/core/core_module.pro b/src/core/core_module.pro index 520b452f774..9e087c81524 100644 --- a/src/core/core_module.pro +++ b/src/core/core_module.pro @@ -1,7 +1,11 @@ MODULE = webenginecore include(core_common.pri) -include($${QTWEBENGINE_ROOT}/src/buildtools/config/linking.pri) +isUniversal() { + include($${QTWEBENGINE_ROOT}/src/buildtools/config/lipo_linking.pri) +} else { + include($${QTWEBENGINE_ROOT}/src/buildtools/config/linking.pri) +} api_library_name = qtwebenginecoreapi$$qtPlatformTargetSuffix() api_library_path = $$OUT_PWD/api/$$getConfigDir() @@ -49,7 +53,11 @@ linux { qtConfig(separate_debug_info): QMAKE_POST_LINK="cd $(DESTDIR) && $(STRIP) --strip-unneeded $(TARGET)" } -REPACK_DIR = $$OUT_PWD/$$getConfigDir() +isUniversal() { + REPACK_DIR = $$OUT_PWD/$$QT_ARCH/$$getConfigDir() +} else { + REPACK_DIR = $$OUT_PWD/$$getConfigDir() +} # Duplicated from resources/resources.gyp LOCALE_LIST = am ar bg bn ca cs da de el en-GB en-US es-419 es et fa fi fil fr gu he hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr sv sw ta te th tr uk vi zh-CN zh-TW @@ -61,7 +69,7 @@ resources.files = $$REPACK_DIR/qtwebengine_resources.pak \ $$REPACK_DIR/qtwebengine_resources_200p.pak \ $$REPACK_DIR/qtwebengine_devtools_resources.pak -icu.files = $$OUT_PWD/$$getConfigDir()/icudtl.dat +icu.files = $$REPACK_DIR/icudtl.dat !qtConfig(debug_and_release)|!qtConfig(build_all)|CONFIG(release, debug|release) { qtConfig(framework) { diff --git a/src/core/gn_run.pro b/src/core/gn_run.pro index 3d6fda80eaa..9072f2847f8 100644 --- a/src/core/gn_run.pro +++ b/src/core/gn_run.pro @@ -28,36 +28,51 @@ build_pass|!debug_and_release { gn_binary = gn runninja.target = run_ninja + QMAKE_EXTRA_TARGETS += runninja gn_args = $$gnWebEngineArgs() - gn_args += "qtwebengine_target=\"$$system_path($$OUT_PWD/$$getConfigDir()):QtWebEngineCore\"" !qtConfig(webengine-system-gn) { gn_binary = $$system_quote($$system_path($$gnPath())) } - gn_args = $$system_quote($$gn_args) gn_src_root = $$system_quote($$system_path($$QTWEBENGINE_ROOT/$$getChromiumSrcDir())) - gn_build_root = $$system_quote($$system_path($$OUT_PWD/$$getConfigDir())) gn_python = "--script-executable=$$pythonPathForSystem()" - gn_run = $$gn_binary gen $$gn_build_root $$gn_python --args=$$gn_args --root=$$gn_src_root - - message("Running: $$gn_run ") - !system($$gn_run) { - error("GN run error!") - } ninjaflags = $$(NINJAFLAGS) isEmpty(ninjaflags):!silent: ninjaflags = "-v" - - runninja.commands = $$NINJA $$ninjaflags \$\(NINJAJOBS\) -C $$gn_build_root QtWebEngineCore - QMAKE_EXTRA_TARGETS += runninja - build_pass:build_all: default_target.target = all else: default_target.target = first default_target.depends = runninja QMAKE_EXTRA_TARGETS += default_target + + isUniversal(){ + for(arch, QT_ARCHS) { + gn_target = "qtwebengine_target=\"$$system_path($$OUT_PWD/$$arch/$$getConfigDir()):QtWebEngineCore\"" + gn_args_per_arch = $$system_quote($$gn_args $$gn_target target_cpu=\"$$gnArch($$arch)\") + gn_build_root = $$system_quote($$system_path($$OUT_PWD/$$arch/$$getConfigDir())) + gn_run = $$gn_binary gen $$gn_build_root $$gn_python --args=$$gn_args_per_arch --root=$$gn_src_root + message("Running for $$arch: $$gn_run") + !system($$gn_run) { + error("GN run error for $$arch!") + } + runninja_$${arch}.target = run_ninja_$${arch} + runninja_$${arch}.commands = $$NINJA $$ninjaflags \$\(NINJAJOBS\) -C $$gn_build_root QtWebEngineCore + QMAKE_EXTRA_TARGETS += runninja_$${arch} + runninja.depends += runninja_$${arch} + } + } else { + gn_args+= "qtwebengine_target=\"$$system_path($$OUT_PWD/$$getConfigDir()):QtWebEngineCore\"" + gn_args = $$system_quote($$gn_args) + gn_build_root = $$system_quote($$system_path($$OUT_PWD/$$getConfigDir())) + gn_run = $$gn_binary gen $$gn_build_root $$gn_python --args=$$gn_args --root=$$gn_src_root + message("Running: $$gn_run for $$arch") + !system($$gn_run) { + error("GN run error!") + } + runninja.commands = $$NINJA $$ninjaflags \$\(NINJAJOBS\) -C $$gn_build_root QtWebEngineCore + } } !build_pass:debug_and_release { diff --git a/src/pdf/gn_run.pro b/src/pdf/gn_run.pro index 70ee582a9a8..d0040619358 100644 --- a/src/pdf/gn_run.pro +++ b/src/pdf/gn_run.pro @@ -27,39 +27,55 @@ build_pass|!debug_and_release { gn_binary = gn runninja.target = run_ninja + QMAKE_EXTRA_TARGETS += runninja # fixme: refine args gn_args = $$gnPdfArgs() - # fixme: qtwebengine_target - gn_args += "qtwebengine_target=\"$$system_path($$OUT_PWD/$$getConfigDir()):QtPdf\"" - # fixme: !qtConfig(webengine-system-gn) { gn_binary = $$system_quote($$system_path($$gnPath())) } - gn_args = $$system_quote($$gn_args) gn_src_root = $$system_quote($$system_path($$QTWEBENGINE_ROOT/$$getChromiumSrcDir())) - gn_build_root = $$system_quote($$system_path($$OUT_PWD/$$getConfigDir())) gn_python = "--script-executable=$$pythonPathForSystem()" - gn_run = $$gn_binary gen $$gn_build_root $$gn_python --args=$$gn_args --root=$$gn_src_root - - message("Running: $$gn_run ") - !system($$gn_run) { - error("GN run error!") - } ninjaflags = $$(NINJAFLAGS) isEmpty(ninjaflags):!silent: ninjaflags = "-v" - runninja.commands = $$NINJA $$ninjaflags -C $$gn_build_root QtPdf - QMAKE_EXTRA_TARGETS += runninja - build_pass:build_all: default_target.target = all else: default_target.target = first default_target.depends = runninja QMAKE_EXTRA_TARGETS += default_target + + isUniversal(){ + for(arch, QT_ARCHS) { + # fixme: qtwebengine_target + gn_target = "qtwebengine_target=\"$$system_path($$OUT_PWD/$$arch/$$getConfigDir()):QtPdf\"" + gn_args_per_arch = $$system_quote($$gn_args $$gn_target target_cpu=\"$$gnArch($$arch)\") + gn_build_root = $$system_quote($$system_path($$OUT_PWD/$$arch/$$getConfigDir())) + gn_run = $$gn_binary gen $$gn_build_root $$gn_python --args=$$gn_args_per_arch --root=$$gn_src_root + message("Running for $$arch: $$gn_run") + !system($$gn_run) { + error("GN run error for $$arch!") + } + runninja_$${arch}.target = run_ninja_$${arch} + runninja_$${arch}.commands = $$NINJA $$ninjaflags -C $$gn_build_root QtPdf + QMAKE_EXTRA_TARGETS += runninja_$${arch} + runninja.depends += runninja_$${arch} + } + } else { + gn_args+= "qtwebengine_target=\"$$system_path($$OUT_PWD/$$getConfigDir()):QtPdf\"" + gn_args = $$system_quote($$gn_args) + gn_build_root = $$system_quote($$system_path($$OUT_PWD/$$getConfigDir())) + gn_run = $$gn_binary gen $$gn_build_root $$gn_python --args=$$gn_args --root=$$gn_src_root + message("Running: $$gn_run for $$arch") + !system($$gn_run) { + error("GN run error!") + } + runninja.commands = $$NINJA $$ninjaflags -C $$gn_build_root QtPdf + } + } !build_pass:debug_and_release { diff --git a/src/pdf/pdf.pro b/src/pdf/pdf.pro index 9f98c32b041..fedcc9bde8b 100644 --- a/src/pdf/pdf.pro +++ b/src/pdf/pdf.pro @@ -3,13 +3,22 @@ QT_FOR_CONFIG += buildtools-private TEMPLATE = subdirs pdfcore.file = pdfcore.pro pdfcore_generator.file = pdfcore_generator.pro + +pdfcore_lipo.file = pdfcore_lipo.pro +pdfcore_lipo.depends = gn_run + gn_run.file = gn_run.pro pdfcore_prl_generator.file = pdfcore_prl_generator.pro gn_run.depends = pdfcore_generator pdfcore_prl_generator.depends = gn_run -pdfcore.depends = pdfcore_prl_generator quick.depends = pdfcore +isUniversal() { + pdfcore.depends += pdfcore_lipo +} else { + pdfcore.depends += pdfcore_prl_generator +} + !qtConfig(webengine-qtpdf-support):qtConfig(build-qtpdf)::!build_pass { !qtwebengine_makeCheckPdfError() { errorbuild.commands = @echo $$shell_quote("QtPdf will not be built. $${skipBuildReason}") @@ -24,8 +33,13 @@ quick.depends = pdfcore SUBDIRS += \ pdfcore_generator \ gn_run \ - pdfcore_prl_generator \ pdfcore \ quick + + isUniversal() { + SUBDIRS += pdfcore_lipo + } else { + SUBDIRS += pdfcore_prl_generator + } } diff --git a/src/pdf/pdfcore.pro b/src/pdf/pdfcore.pro index 23e0cec79f1..c2626a48a6b 100644 --- a/src/pdf/pdfcore.pro +++ b/src/pdf/pdfcore.pro @@ -27,11 +27,15 @@ msvc { QMAKE_CXXFLAGS_WARN_ON += -wd"4100" } -include($${QTWEBENGINE_ROOT}/src/buildtools/config/linking.pri) +isUniversal() { + include($${QTWEBENGINE_ROOT}/src/buildtools/config/lipo_linking.pri) +} else { + include($${QTWEBENGINE_ROOT}/src/buildtools/config/linking.pri) +} # install static dependencies and handle prl files for static builds -static:!isEmpty(NINJA_ARCHIVES) { +static:!isEmpty(NINJA_ARCHIVES):!isUniversal() { static_dep_pri = $$OUT_PWD/$$getConfigDir()/$${TARGET}_static_dep.pri !include($${static_dep_pri}) { error("Could not find the prl information.") diff --git a/src/pdf/pdfcore_generator.pro b/src/pdf/pdfcore_generator.pro index e5c7258b7a3..0930256ca03 100644 --- a/src/pdf/pdfcore_generator.pro +++ b/src/pdf/pdfcore_generator.pro @@ -5,7 +5,13 @@ TEMPLATE = lib CONFIG = gn_generator $$CONFIG CONFIG -=static # note we still do static when linking GN_SRC_DIR = $$PWD -GN_FILE = $$OUT_PWD/$$getConfigDir()/BUILD.gn +isUniversal() { + for(arch, QT_ARCHS) { + GN_FILES += $$OUT_PWD/$$arch/$$getConfigDir()/BUILD.gn + } +} else { + GN_FILES = $$OUT_PWD/$$getConfigDir()/BUILD.gn +} GN_FIND_MOCABLES_SCRIPT = $$shell_path($$QTWEBENGINE_ROOT/tools/scripts/gn_find_mocables.py) GN_RUN_BINARY_SCRIPT = $$shell_path($$QTWEBENGINE_ROOT/tools/scripts/gn_run_binary.py) GN_IMPORTS = $$PWD/qtpdf.gni diff --git a/src/pdf/pdfcore_lipo.pro b/src/pdf/pdfcore_lipo.pro new file mode 100644 index 00000000000..6caf2ac75e7 --- /dev/null +++ b/src/pdf/pdfcore_lipo.pro @@ -0,0 +1,5 @@ +TEMPLATE = aux + +TARGET= QtPdf +include($${QTWEBENGINE_ROOT}/src/buildtools/config/lipo.pri) + diff --git a/src/src.pro b/src/src.pro index 6f8bc2fe4ba..c9990430952 100644 --- a/src/src.pro +++ b/src/src.pro @@ -29,7 +29,7 @@ qtConfig(build-qtwebengine-core):qtConfig(webengine-core-support) { SUBDIRS += buildtools core process - qtConfig(webengine-spellchecker):!qtConfig(webengine-native-spellchecker):!cross_compile { + qtConfig(webengine-spellchecker):!qtConfig(webengine-native-spellchecker):!cross_compile:!isUniversal() { SUBDIRS += qwebengine_convert_dict qwebengine_convert_dict.subdir = tools/qwebengine_convert_dict qwebengine_convert_dict.depends = core diff --git a/tests/auto/widgets/widgets.pro b/tests/auto/widgets/widgets.pro index 2dc1eefcd5a..d35f875c13d 100644 --- a/tests/auto/widgets/widgets.pro +++ b/tests/auto/widgets/widgets.pro @@ -1,3 +1,5 @@ +load(functions) + include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) # workaround for QTBUG-68093 QT_FOR_CONFIG += webenginecore webenginecore-private @@ -37,7 +39,7 @@ qtConfig(ssl) { SUBDIRS += certificateerror } -qtConfig(webengine-spellchecker):!cross_compile { +qtConfig(webengine-spellchecker):!cross_compile:!isUniversal() { !qtConfig(webengine-native-spellchecker) { SUBDIRS += spellchecking } else { From a90f994c5d1e3edeafa8dc8048fe7c6a74aead1a Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 6 Apr 2022 12:27:17 +0200 Subject: [PATCH 058/132] Fix navigation to non-local URLs They are passed in another part of the DropItem object. Task-number: QTBUG-102192 Change-Id: If52a88ce2688c25ea0edcc0d1e8f962f2cdd29dd Reviewed-by: Kirill Burtsev (cherry picked from commit 742e6786aeb500ef9bc850bf84803d5f388e3927) --- src/core/web_contents_adapter.cpp | 9 ++++- tests/auto/widgets/qwebengineview/BLACKLIST | 3 ++ .../qwebengineview/tst_qwebengineview.cpp | 37 +++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index 5b81bd3fc75..cca31e144cc 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -1496,8 +1496,10 @@ static QMimeData *mimeDataFromDropData(const content::DropData &dropData) mimeData->setText(toQt(*dropData.text)); if (dropData.html.has_value()) mimeData->setHtml(toQt(*dropData.html)); - if (dropData.url.is_valid()) + if (dropData.url.is_valid()) { mimeData->setUrls(QList() << toQt(dropData.url)); + mimeData->setText(toQt(dropData.url_title)); + } if (!dropData.custom_data.empty()) { base::Pickle pickle; ui::WriteCustomDataToPickle(dropData.custom_data, &pickle); @@ -1621,6 +1623,11 @@ static void fillDropDataFromMimeData(content::DropData *dropData, const QMimeDat } if (!dropData->filenames.empty()) return; + if (mimeData->hasUrls()) { + dropData->url = toGurl(https://github.com/urls.first()); + if (mimeData->hasText()) + dropData->url_title = toString16(mimeData->text()); + } if (mimeData->hasHtml()) dropData->html = toOptionalString16(mimeData->html()); if (mimeData->hasText()) diff --git a/tests/auto/widgets/qwebengineview/BLACKLIST b/tests/auto/widgets/qwebengineview/BLACKLIST index c1a46e16d6b..592b47c010c 100644 --- a/tests/auto/widgets/qwebengineview/BLACKLIST +++ b/tests/auto/widgets/qwebengineview/BLACKLIST @@ -9,3 +9,6 @@ osx [mixLangLocale:eu_ES] * + +[navigateOnDrop:file] +windows diff --git a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp index 4854b3603e3..b56053fd2f3 100644 --- a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp +++ b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -173,6 +174,8 @@ private Q_SLOTS: void setViewPreservesExplicitPage(); void closeDiscardsPage(); void loadAfterRendererCrashed(); + void navigateOnDrop_data(); + void navigateOnDrop(); }; // This will be called before the first test function is executed. @@ -3479,5 +3482,39 @@ void tst_QWebEngineView::loadAfterRendererCrashed() QVERIFY(loadSpy.first().first().toBool()); } +void tst_QWebEngineView::navigateOnDrop_data() +{ + QTest::addColumn("url"); + QTest::newRow("file") << QUrl::fromLocalFile(QDir(TESTS_SOURCE_DIR).absoluteFilePath("qwebengineview/resources/dummy.html")); + QTest::newRow("qrc") << QUrl("qrc:///resources/dummy.html"); +} + +void tst_QWebEngineView::navigateOnDrop() +{ + QFETCH(QUrl, url); + struct WebEngineView : QWebEngineView { + QWebEngineView* createWindow(QWebEnginePage::WebWindowType /* type */) override { return this; } + } view; + view.resize(640, 480); + view.show(); + QVERIFY(QTest::qWaitForWindowExposed(&view)); + + QSignalSpy loadSpy(&view, &QWebEngineView::loadFinished); + QMimeData mimeData; + mimeData.setUrls({ url }); + + auto sendEvents = [&] () { + QDragEnterEvent dee(view.rect().center(), Qt::CopyAction, &mimeData, Qt::LeftButton, Qt::NoModifier); + QApplication::sendEvent(&view, &dee); + QDropEvent de(view.rect().center(), Qt::CopyAction, &mimeData, Qt::LeftButton, Qt::NoModifier); + QApplication::sendEvent(&view, &de); + }; + + sendEvents(); + QTRY_COMPARE(loadSpy.count(), 1); + QVERIFY(loadSpy.first().first().toBool()); + QCOMPARE(view.url(), url); +} + QTEST_MAIN(tst_QWebEngineView) #include "tst_qwebengineview.moc" From 8dea0e3b7fec3d0bc3d496694c5c4d69c5c8e7a8 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 2 May 2022 11:21:11 +0200 Subject: [PATCH 059/132] Fix read-after-free on EGL extensions Cache the read extensions as an std::string, since the returned C string may be not be permanent. Change-Id: I856b2b784ab4027da25996b2bf741b30cda10e05 Reviewed-by: Michal Klocek (cherry picked from commit fd2fc0d2a86f39d563720563555ca6319f8ab223) --- src/core/ozone/gl_surface_egl_qt.cpp | 4 ++-- src/core/ozone/gl_surface_glx_qt.cpp | 12 ++++++------ src/core/ozone/gl_surface_qt.cpp | 4 ++-- src/core/ozone/gl_surface_qt.h | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/core/ozone/gl_surface_egl_qt.cpp b/src/core/ozone/gl_surface_egl_qt.cpp index 91402abfece..447826baa2d 100644 --- a/src/core/ozone/gl_surface_egl_qt.cpp +++ b/src/core/ozone/gl_surface_egl_qt.cpp @@ -93,7 +93,7 @@ bool GLSurfaceEGLQt::InitializeOneOff() } g_extensions = eglQueryString(g_display, EGL_EXTENSIONS); - g_egl_surfaceless_context_supported = ExtensionsContain(g_extensions, "EGL_KHR_surfaceless_context"); + g_egl_surfaceless_context_supported = ExtensionsContain(g_extensions.c_str(), "EGL_KHR_surfaceless_context"); if (g_egl_surfaceless_context_supported) { scoped_refptr surface = new GLSurfacelessQtEGL(gfx::Size(1, 1)); gl::GLContextAttribs attribs; @@ -202,7 +202,7 @@ void GLSurfaceEGL::ShutdownOneOff() const char* GLSurfaceEGL::GetEGLExtensions() { - return GLSurfaceQt::g_extensions; + return GLSurfaceQt::g_extensions.c_str(); } bool GLSurfaceEGL::HasEGLExtension(const char* name) diff --git a/src/core/ozone/gl_surface_glx_qt.cpp b/src/core/ozone/gl_surface_glx_qt.cpp index 188a9272917..c796444b160 100644 --- a/src/core/ozone/gl_surface_glx_qt.cpp +++ b/src/core/ozone/gl_surface_glx_qt.cpp @@ -62,7 +62,7 @@ void GLSurfaceGLX::ShutdownOneOff() bool GLSurfaceGLX::IsCreateContextSupported() { - return ExtensionsContain(GLSurfaceQt::g_extensions, "GLX_ARB_create_context"); + return HasGLXExtension("GLX_ARB_create_context"); } bool GLSurfaceGLX::IsCreateContextRobustnessSupported() @@ -87,7 +87,7 @@ bool GLSurfaceGLX::IsCreateContextProfileSupported() bool GLSurfaceGLX::IsCreateContextES2ProfileSupported() { - return ExtensionsContain(GLSurfaceQt::g_extensions, "GLX_ARB_create_context_es2_profile"); + return HasGLXExtension("GLX_ARB_create_context_es2_profile"); } bool GLSurfaceGLX::IsOMLSyncControlSupported() @@ -97,12 +97,12 @@ bool GLSurfaceGLX::IsOMLSyncControlSupported() bool GLSurfaceGLX::HasGLXExtension(const char *name) { - return ExtensionsContain(GLSurfaceQt::g_extensions, name); + return ExtensionsContain(GLSurfaceQt::g_extensions.c_str(), name); } bool GLSurfaceGLX::IsTextureFromPixmapSupported() { - return ExtensionsContain(GLSurfaceQt::g_extensions, "GLX_EXT_texture_from_pixmap"); + return HasGLXExtension("GLX_EXT_texture_from_pixmap"); } bool GLSurfaceGLX::IsRobustnessVideoMemoryPurgeSupported() @@ -112,7 +112,7 @@ bool GLSurfaceGLX::IsRobustnessVideoMemoryPurgeSupported() const char* GLSurfaceGLX::GetGLXExtensions() { - return GLSurfaceQt::g_extensions; + return GLSurfaceQt::g_extensions.c_str(); } bool GLSurfaceGLXQt::InitializeOneOff() @@ -158,7 +158,7 @@ bool GLSurfaceGLXQt::InitializeExtensionSettingsOneOff() Display* display = static_cast(g_display); GLSurfaceQt::g_extensions = glXQueryExtensionsString(display, 0); - g_driver_glx.InitializeExtensionBindings(g_extensions); + g_driver_glx.InitializeExtensionBindings(g_extensions.c_str()); return true; } diff --git a/src/core/ozone/gl_surface_qt.cpp b/src/core/ozone/gl_surface_qt.cpp index 2c464c11c36..990a62f8b59 100644 --- a/src/core/ozone/gl_surface_qt.cpp +++ b/src/core/ozone/gl_surface_qt.cpp @@ -78,7 +78,7 @@ bool g_initializedEGL = false; void* GLSurfaceQt::g_display = nullptr; void* GLSurfaceQt::g_config = nullptr; -const char* GLSurfaceQt::g_extensions = nullptr; +std::string GLSurfaceQt::g_extensions; GLSurfaceQt::~GLSurfaceQt() { @@ -99,7 +99,7 @@ GLSurfaceQt::GLSurfaceQt(const gfx::Size& size) bool GLSurfaceQt::HasEGLExtension(const char* name) { - return ExtensionsContain(g_extensions, name); + return ExtensionsContain(g_extensions.c_str(), name); } bool GLSurfaceQt::IsOffscreen() diff --git a/src/core/ozone/gl_surface_qt.h b/src/core/ozone/gl_surface_qt.h index cbdc8876a6a..b3a53d6b395 100644 --- a/src/core/ozone/gl_surface_qt.h +++ b/src/core/ozone/gl_surface_qt.h @@ -37,11 +37,11 @@ ** ****************************************************************************/ - - #ifndef GL_SURFACE_QT_H_ #define GL_SURFACE_QT_H_ +#include + #include "ui/gfx/geometry/size.h" #include "ui/gl/gl_surface.h" @@ -71,7 +71,7 @@ class GLSurfaceQt: public GLSurface { public: static void* g_config; static void* g_display; - static const char* g_extensions; + static std::string g_extensions; private: DISALLOW_COPY_AND_ASSIGN(GLSurfaceQt); From 2a5d2bdfa115f930459b1e1437bb190b17c0fb68 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Wed, 18 May 2022 12:23:53 +0200 Subject: [PATCH 060/132] Pass archiver to gn build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User can override with env variable AR archiver for cross compilation pass archiver from qmake for gn. Fixes: QTBUG-103578 Change-Id: I055d7403ecb829f4b1bbe57ec27c0bca7323484c Reviewed-by: Michael Brüning --- src/buildtools/gn.pro | 1 + 1 file changed, 1 insertion(+) diff --git a/src/buildtools/gn.pro b/src/buildtools/gn.pro index 033202e6eab..f94694da02d 100644 --- a/src/buildtools/gn.pro +++ b/src/buildtools/gn.pro @@ -21,6 +21,7 @@ build_pass|!debug_and_release { gn_gen_args = --no-last-commit-position --out-path $$out_path \ --cc \"$$which($$QMAKE_CC)\" --cxx \"$$which($$QMAKE_CXX)\" \ --ld \"$$which($$QMAKE_LINK)\" + !isEmpty(QMAKE_AR): gn_gen_args += --ar \"$$which($$first(QMAKE_AR))\" msvc:!clang_cl: gn_gen_args += --use-lto From 41e94fc482eca3e40082c34d8332821a15aefba0 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Tue, 24 May 2022 13:05:39 +0200 Subject: [PATCH 061/132] Add workaround for unstable gn on macOS in ci MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In ci 'gn' can crash making it hard to integrate, if there is high load crashes occur more frequently sometimes even blocking integrations for few days. Limit number of worker threads for gn as this improves situation however increases time for generating ninja files from 2s to 7s. Note this will not prevent crashes however significantly reduces the issue (when running in loop from 1 per ~10min to 1 per ~3days) Compilation with address or thread sanitizer does not lead to meaningful traces. Moreover running gn with sanitizer creates deadlocks for unknown reason every few runs. Current assumptions is that macos vms are unstable as crashes also occur for sscache calls (compiler) and python calls. Set one thread only for macos, in 6.x series this is ci depended but in 5.x series would require coin source changes. Change-Id: I1c488796eb0547eedd20101606f18ed55718e9c2 Reviewed-by: Michael Brüning --- src/core/gn_run.pro | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/core/gn_run.pro b/src/core/gn_run.pro index 9072f2847f8..9f6e64504ef 100644 --- a/src/core/gn_run.pro +++ b/src/core/gn_run.pro @@ -41,6 +41,10 @@ build_pass|!debug_and_release { gn_python = "--script-executable=$$pythonPathForSystem()" ninjaflags = $$(NINJAFLAGS) + enableThreads = $$(GN_MORE_THREADS) + isEmpty(enableThreads):macos { + gn_threads = "--threads=1" + } isEmpty(ninjaflags):!silent: ninjaflags = "-v" build_pass:build_all: default_target.target = all else: default_target.target = first @@ -52,7 +56,7 @@ build_pass|!debug_and_release { gn_target = "qtwebengine_target=\"$$system_path($$OUT_PWD/$$arch/$$getConfigDir()):QtWebEngineCore\"" gn_args_per_arch = $$system_quote($$gn_args $$gn_target target_cpu=\"$$gnArch($$arch)\") gn_build_root = $$system_quote($$system_path($$OUT_PWD/$$arch/$$getConfigDir())) - gn_run = $$gn_binary gen $$gn_build_root $$gn_python --args=$$gn_args_per_arch --root=$$gn_src_root + gn_run = $$gn_binary gen $$gn_build_root $$gn_python $$gn_threads --args=$$gn_args_per_arch --root=$$gn_src_root message("Running for $$arch: $$gn_run") !system($$gn_run) { error("GN run error for $$arch!") @@ -66,8 +70,8 @@ build_pass|!debug_and_release { gn_args+= "qtwebengine_target=\"$$system_path($$OUT_PWD/$$getConfigDir()):QtWebEngineCore\"" gn_args = $$system_quote($$gn_args) gn_build_root = $$system_quote($$system_path($$OUT_PWD/$$getConfigDir())) - gn_run = $$gn_binary gen $$gn_build_root $$gn_python --args=$$gn_args --root=$$gn_src_root - message("Running: $$gn_run for $$arch") + gn_run = $$gn_binary gen $$gn_build_root $$gn_python $$gn_threads --args=$$gn_args --root=$$gn_src_root + message("Running: $$gn_run") !system($$gn_run) { error("GN run error!") } From 79943b157ef381e5953f34f8e03049f2eecd6eb5 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 6 Apr 2022 15:32:17 +0200 Subject: [PATCH 062/132] Fix leak if loader error is seen first For some reason the proxied_loader_receiver can still be bound in this case. Pick-to: 5.15.10 Change-Id: If0bbe181eca5de41e82eebaced412361fe12fb40 Reviewed-by: Michal Klocek (cherry picked from commit ffb831d9896dcdd3d469fdbeee407d96d631dbda) --- src/core/net/proxying_url_loader_factory_qt.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/net/proxying_url_loader_factory_qt.cpp b/src/core/net/proxying_url_loader_factory_qt.cpp index 883811637d0..a9b77408670 100644 --- a/src/core/net/proxying_url_loader_factory_qt.cpp +++ b/src/core/net/proxying_url_loader_factory_qt.cpp @@ -167,6 +167,8 @@ class InterceptedRequest : public network::mojom::URLLoader const uint32_t options_; bool allowed_cors_ = true; + bool loader_error_seen_ = false; + // If the |target_loader_| called OnComplete with an error this stores it. // That way the destructor can send it to OnReceivedError if safe browsing // error didn't occur. @@ -396,6 +398,7 @@ void InterceptedRequest::ContinueAfterIntercept() } if (!target_loader_ && target_factory_) { + loader_error_seen_ = false; target_factory_->CreateLoaderAndStart(target_loader_.BindNewPipeAndPassReceiver(), routing_id_, request_id_, options_, request_, proxied_client_receiver_.BindNewPipeAndPassRemote(), traffic_annotation_); @@ -501,6 +504,8 @@ void InterceptedRequest::OnURLLoaderError(uint32_t custom_reason, const std::str // If CallOnComplete was already called, then this object is ready to be deleted. if (!target_client_) delete this; + else + loader_error_seen_ = true; } void InterceptedRequest::CallOnComplete(const network::URLLoaderCompletionStatus &status, bool wait_for_loader_error) @@ -514,7 +519,7 @@ void InterceptedRequest::CallOnComplete(const network::URLLoaderCompletionStatus if (target_client_) target_client_->OnComplete(status); - if (proxied_loader_receiver_.is_bound() && wait_for_loader_error) { + if (proxied_loader_receiver_.is_bound() && wait_for_loader_error && !loader_error_seen_) { // Since the original client is gone no need to continue loading the // request. proxied_client_receiver_.reset(); From 0f5d840ac79bab96253f8a577fd16fcba2b7c79c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Mon, 23 May 2022 13:49:48 +0200 Subject: [PATCH 063/132] Update Chromium Submodule src/3rdparty 0d984c7f..caba2fcb: > Bump V8_PATCH_LEVEL > [Backport] Security bug 1306507 > [Backport] Security bug 1304659 > [Backport] Security bug 1269999 > [Backport] Roll libxml from a46e85f6 to dea91c97 > [Backport] Roll libxml from bfd2f430 to a46e85f6 > [Backport] Roll libxml to bfd2f430 > [Backport] Roll libxml to 7279d236 > [Backport] Roll libxml to f93ca3e1 > [Backport] Security bug 1292905 > [Backport] CVE-2022-1314: Type Confusion in V8 > [Backport] CVE-2022-1310: Use after free in regular expressions > [Backport] CVE-2022-1305: Use after free in storage > [Backport] CVE-2022-1125 > [Backport] Security bug 1280852 > [Backport] Secuirity Bug 1296876 > [Backport] CVE-2022-0978: Use after free in ANGLE > [Backport] CVE-2022-1493: Use after free in Dev Tools > [Backport] CVE-2022-1138: Inappropriate implementation in Web Cursor. > Quick fix for regression in service workers by reverting backports > [Backport] CVE-2022-0797: Out of bounds memory access in Mojo Task-number: QTBUG-103034 Task-number: QTBUG-103038 Task-number: QTBUG-103040 Change-Id: I04e973cb5d9996f8d3590a8fa9a6c47a7b867b87 Reviewed-by: Michal Klocek (cherry picked from commit c4aec7f9beca7b15c7733dab9808816fc46962aa) Reviewed-by: Qt Cherry-pick Bot --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 0d984c7f044..caba2fcb0fe 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 0d984c7f044a08975088191f92ecc9bc62424b14 +Subproject commit caba2fcb0fe8a8d213c4c79d26da3bb88eee61c7 From 91d53ffd54eaa7e2f8cf1bc6e076d645a45a6bee Mon Sep 17 00:00:00 2001 From: Kirill Burtsev Date: Wed, 27 Apr 2022 22:22:46 +0200 Subject: [PATCH 064/132] Keep page's zoom level on loading new urls Ammends d236c5a8a3. Zoom level was set as a temporal one, which is invalidated each time when a renderer process or widget are changed (on new navigation, for example), so it needs to be reapplied. Fixes: QTBUG-101030 Change-Id: Iecff9686fbe2b79e99b46f67cab92f66127be085 Reviewed-by: Qt CI Bot Reviewed-by: Michal Klocek (cherry picked from commit 1e27d42a8071532b6cc30a9bcc5f700edc56952a) --- src/core/web_contents_adapter_client.h | 1 + src/core/web_contents_delegate_qt.cpp | 5 +- src/webengine/api/qquickwebengineview.cpp | 18 ++++-- src/webengine/api/qquickwebengineview_p_p.h | 1 + src/webenginewidgets/api/qwebenginepage.cpp | 12 +++- src/webenginewidgets/api/qwebenginepage_p.h | 1 + .../tst_qquickwebengineview.cpp | 36 ++++++++++-- .../qwebenginepage/tst_qwebenginepage.cpp | 56 +++++++++++++------ 8 files changed, 100 insertions(+), 30 deletions(-) diff --git a/src/core/web_contents_adapter_client.h b/src/core/web_contents_adapter_client.h index afc43806a68..8203ce65096 100644 --- a/src/core/web_contents_adapter_client.h +++ b/src/core/web_contents_adapter_client.h @@ -459,6 +459,7 @@ class Q_WEBENGINECORE_PRIVATE_EXPORT WebContentsAdapterClient { virtual void loadProgressChanged(int progress) = 0; virtual void didUpdateTargetURL(const QUrl&) = 0; virtual void selectionChanged() = 0; + virtual void zoomUpdateIsNeeded() = 0; virtual void recentlyAudibleChanged(bool recentlyAudible) = 0; virtual void renderProcessPidChanged(qint64 pid) = 0; virtual QRectF viewportRect() const = 0; diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp index e7bfa651031..d211bdbfc9c 100644 --- a/src/core/web_contents_delegate_qt.cpp +++ b/src/core/web_contents_delegate_qt.cpp @@ -318,8 +318,10 @@ void WebContentsDelegateQt::RenderFrameHostChanged(content::RenderFrameHost *old if (new_host->GetFrameOwnerElementType() == blink::mojom::FrameOwnerElementType::kNone) { content::RenderProcessHost *renderProcessHost = new_host->GetProcess(); const base::Process &process = renderProcessHost->GetProcess(); - if (process.IsValid()) + if (process.IsValid()) { m_viewClient->renderProcessPidChanged(process.Pid()); + m_viewClient->zoomUpdateIsNeeded(); + } } } } @@ -329,6 +331,7 @@ void WebContentsDelegateQt::RenderViewHostChanged(content::RenderViewHost *, con if (newHost && newHost->GetWidget() && newHost->GetWidget()->GetView()) { auto rwhv = static_cast(newHost->GetWidget()->GetView()); m_viewClient->widgetChanged(rwhv->delegate()); + m_viewClient->zoomUpdateIsNeeded(); } } diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp index 7164a1c505a..50e0711af99 100644 --- a/src/webengine/api/qquickwebengineview.cpp +++ b/src/webengine/api/qquickwebengineview.cpp @@ -434,6 +434,12 @@ void QQuickWebEngineViewPrivate::selectionChanged() updateEditActions(); } +void QQuickWebEngineViewPrivate::zoomUpdateIsNeeded() +{ + Q_Q(QQuickWebEngineView); + q->setZoomFactor(m_zoomFactor); +} + void QQuickWebEngineViewPrivate::recentlyAudibleChanged(bool recentlyAudible) { Q_Q(QQuickWebEngineView); @@ -908,10 +914,8 @@ void QQuickWebEngineViewPrivate::initializationFinished() emit q->backgroundColorChanged(); } - if (!qFuzzyCompare(adapter->currentZoomFactor(), m_zoomFactor)) { - adapter->setZoomFactor(m_zoomFactor); - emit q->zoomFactorChanged(m_zoomFactor); - } + // apply if it was set before first ever navigation already + q->setZoomFactor(m_zoomFactor); #if QT_CONFIG(webengine_webchannel) if (m_webChannel) @@ -1149,9 +1153,11 @@ void QQuickWebEngineView::stop() void QQuickWebEngineView::setZoomFactor(qreal arg) { Q_D(QQuickWebEngineView); - if (d->adapter->isInitialized() && !qFuzzyCompare(d->m_zoomFactor, d->adapter->currentZoomFactor())) { + if (d->adapter->isInitialized() && !qFuzzyCompare(arg, zoomFactor())) { d->adapter->setZoomFactor(arg); - emit zoomFactorChanged(arg); + // MEMO: should reset if factor was not applied due to being invalid + d->m_zoomFactor = zoomFactor(); + emit zoomFactorChanged(d->m_zoomFactor); } else { d->m_zoomFactor = arg; } diff --git a/src/webengine/api/qquickwebengineview_p_p.h b/src/webengine/api/qquickwebengineview_p_p.h index ec535298b8c..a03f009f9bd 100644 --- a/src/webengine/api/qquickwebengineview_p_p.h +++ b/src/webengine/api/qquickwebengineview_p_p.h @@ -109,6 +109,7 @@ class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineViewPrivate : public QtWebEngine void loadProgressChanged(int progress) override; void didUpdateTargetURL(const QUrl&) override; void selectionChanged() override; + void zoomUpdateIsNeeded() override; void recentlyAudibleChanged(bool recentlyAudible) override; void renderProcessPidChanged(qint64 pid) override; QRectF viewportRect() const override; diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp index 5159ff588d5..f4281439fe2 100644 --- a/src/webenginewidgets/api/qwebenginepage.cpp +++ b/src/webenginewidgets/api/qwebenginepage.cpp @@ -247,6 +247,12 @@ void QWebEnginePagePrivate::selectionChanged() }); } +void QWebEnginePagePrivate::zoomUpdateIsNeeded() +{ + Q_Q(QWebEnginePage); + q->setZoomFactor(defaultZoomFactor); +} + void QWebEnginePagePrivate::recentlyAudibleChanged(bool recentlyAudible) { Q_Q(QWebEnginePage); @@ -2142,8 +2148,12 @@ void QWebEnginePage::setZoomFactor(qreal factor) { Q_D(QWebEnginePage); d->defaultZoomFactor = factor; - if (d->adapter->isInitialized()) + + if (d->adapter->isInitialized()) { d->adapter->setZoomFactor(factor); + // MEMO: should reset if factor was not applied due to being invalid + d->defaultZoomFactor = zoomFactor(); + } } void QWebEnginePage::runJavaScript(const QString &scriptSource) diff --git a/src/webenginewidgets/api/qwebenginepage_p.h b/src/webenginewidgets/api/qwebenginepage_p.h index ae3ab5d25d5..65252f8d842 100644 --- a/src/webenginewidgets/api/qwebenginepage_p.h +++ b/src/webenginewidgets/api/qwebenginepage_p.h @@ -100,6 +100,7 @@ class QWebEnginePagePrivate : public QtWebEngineCore::WebContentsAdapterClient void loadProgressChanged(int progress) override; void didUpdateTargetURL(const QUrl&) override; void selectionChanged() override; + void zoomUpdateIsNeeded() override; void recentlyAudibleChanged(bool recentlyAudible) override; void renderProcessPidChanged(qint64 pid) override; QRectF viewportRect() const override; diff --git a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp index 09998eaca19..c3796062b1f 100644 --- a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp +++ b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp @@ -791,20 +791,44 @@ void tst_QQuickWebEngineView::inputMethodHints() void tst_QQuickWebEngineView::setZoomFactor() { QQuickWebEngineView *view = webEngineView(); + m_window->show(); + view->setSize(QSizeF(320, 240)); - QVERIFY(qFuzzyCompare(view->zoomFactor(), 1.0)); + QCOMPARE(view->zoomFactor(), 1.0); view->setZoomFactor(2.5); - QVERIFY(qFuzzyCompare(view->zoomFactor(), 2.5)); + QCOMPARE(view->zoomFactor(), 2.5); - view->setUrl(urlFromTestPath("html/basic_page.html")); + const QUrl url1 = urlFromTestPath("html/basic_page.html"), url2 = urlFromTestPath("html/basic_page2.html"); + + view->setUrl(url1); QVERIFY(waitForLoadSucceeded(view)); - QVERIFY(qFuzzyCompare(view->zoomFactor(), 2.5)); + QCOMPARE(view->zoomFactor(), 2.5); view->setZoomFactor(0.1); - QVERIFY(qFuzzyCompare(view->zoomFactor(), 2.5)); + QCOMPARE(view->zoomFactor(), 2.5); view->setZoomFactor(5.5); - QVERIFY(qFuzzyCompare(view->zoomFactor(), 2.5)); + QCOMPARE(view->zoomFactor(), 2.5); + + QScopedPointer view2(newWebEngineView()); + view2->setSize(QSizeF(320, 240)); + view2->setParentItem(m_window->contentItem()); + + // try loading different url and check new values after load + for (auto &&p : { + qMakePair(view, 2.5), // navigating away to different url should keep zoom + qMakePair(view2.get(), 1.0), // same url navigation in diffent page shouldn't be affected + }) { + auto &&view = p.first; auto zoomFactor = p.second; + view->setUrl(url2); + QVERIFY(waitForLoadSucceeded(view)); + QCOMPARE(view->zoomFactor(), zoomFactor); + } + + // should have no influence on first page + view2->setZoomFactor(3.5); + for (auto &&p : { qMakePair(view, 2.5), qMakePair(view2.get(), 3.5), }) + QCOMPARE(p.first->zoomFactor(), p.second); } void tst_QQuickWebEngineView::printToPdf() diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp index 5df09357f26..78d0a986235 100644 --- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp +++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp @@ -73,6 +73,13 @@ static void removeRecursive(const QString& dirname) QDir().rmdir(dirname); } +struct TestBasePage : QWebEnginePage +{ + explicit TestBasePage(QWebEngineProfile *profile, QObject *parent = nullptr) : QWebEnginePage(profile, parent) { } + explicit TestBasePage(QObject *parent = nullptr) : QWebEnginePage(parent) { } + QSignalSpy loadSpy { this, &QWebEnginePage::loadFinished }; +}; + class tst_QWebEnginePage : public QObject { Q_OBJECT @@ -3038,25 +3045,42 @@ void tst_QWebEnginePage::toPlainTextLoadFinishedRace() void tst_QWebEnginePage::setZoomFactor() { - QWebEnginePage page; + TestBasePage page, page2; - QVERIFY(qFuzzyCompare(page.zoomFactor(), 1.0)); + QCOMPARE(page.zoomFactor(), 1.0); page.setZoomFactor(2.5); - QVERIFY(qFuzzyCompare(page.zoomFactor(), 2.5)); - - const QUrl urlToLoad("qrc:/resources/test1.html"); - - QSignalSpy finishedSpy(&page, SIGNAL(loadFinished(bool))); - page.load(urlToLoad); - QTRY_COMPARE(finishedSpy.count(), 1); - QVERIFY(finishedSpy.at(0).first().toBool()); - QVERIFY(qFuzzyCompare(page.zoomFactor(), 2.5)); - - page.setZoomFactor(5.5); - QVERIFY(qFuzzyCompare(page.zoomFactor(), 2.5)); + QCOMPARE(page.zoomFactor(), 2.5); + + const QUrl url1("qrc:/resources/test1.html"), url2(QUrl("qrc:/resources/test2.html")); + + page.load(url1); + QTRY_COMPARE(page.loadSpy.count(), 1); + QVERIFY(page.loadSpy.at(0).first().toBool()); + QCOMPARE(page.zoomFactor(), 2.5); + + page.setZoomFactor(5.5); // max accepted zoom: kMaximumPageZoomFactor = 5.0 + QCOMPARE(page.zoomFactor(), 2.5); + + page.setZoomFactor(0.1); // min accepted zoom: kMinimumPageZoomFactor = 0.25 + QCOMPARE(page.zoomFactor(), 2.5); + + // try loading different url and check new values after load + page.loadSpy.clear(); + for (auto &&p : { + qMakePair(&page, 2.5), // navigating away to different url should keep zoom + qMakePair(&page2, 1.0), // same url navigation in diffent page shouldn't be affected + }) { + auto &&page = *p.first; auto zoomFactor = p.second; + page.load(url2); + QTRY_COMPARE(page.loadSpy.count(), 1); + QVERIFY(page.loadSpy.last().first().toBool()); + QCOMPARE(page.zoomFactor(), zoomFactor); + } - page.setZoomFactor(0.1); - QVERIFY(qFuzzyCompare(page.zoomFactor(), 2.5)); + // should have no influence on first page + page2.setZoomFactor(3.5); + for (auto &&p : { qMakePair(&page, 2.5), qMakePair(&page2, 3.5), }) + QCOMPARE(p.first->zoomFactor(), p.second); } void tst_QWebEnginePage::mouseButtonTranslation() From 400355fa5170244ceea571f50ec61b29426ebd0a Mon Sep 17 00:00:00 2001 From: Kirill Burtsev Date: Thu, 5 May 2022 13:52:32 +0200 Subject: [PATCH 065/132] Fix touch input for widget's delegate for html popup Earlier fix cf8bc1899a introduced the logic, where all system synthesized mouse events are ignored. But after c56169f7a1 this is undesired since for widget with Qt::Popup flag touch input is ignored by QWidgetWindow, and input is expected to be delivered to popup as synthesized mouse event (either synthesized by Qt or for capabable devices by system). So allow system synthesized mouse events to let through for popup. Synthesis by Qt is suppress automatically for accepted touch event, it's only system event are still delivered unconditionally, so still ignore them for widgets impl. Global ignore in core is not needed, since QQuickWidget ignores system synthesized events unconditionally. Fixes: QTBUG-79254 Change-Id: Ie8f55eb8b9c2677d8a98381effb3cb31d9388ac7 Reviewed-by: Qt CI Bot Reviewed-by: Allan Sandfeld Jensen Reviewed-by: Martin Negyokru (cherry picked from commit 1f6495af6331f5504de9d3f7e43f5202345c7a8c) Reviewed-by: Michal Klocek --- src/core/render_widget_host_view_qt.cpp | 6 ------ ...er_widget_host_view_qt_delegate_widget.cpp | 20 +++++++++++++++++++ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp index b6cac85ce13..7acef2b1521 100644 --- a/src/core/render_widget_host_view_qt.cpp +++ b/src/core/render_widget_host_view_qt.cpp @@ -1378,12 +1378,6 @@ void RenderWidgetHostViewQt::handleMouseEvent(QMouseEvent* event) if (event->type() == QEvent::MouseButtonRelease) m_mouseButtonPressed--; - // Don't forward mouse events synthesized by the system, which are caused by genuine touch - // events. Chromium would then process for e.g. a mouse click handler twice, once due to the - // system synthesized mouse event, and another time due to a touch-to-gesture-to-mouse - // transformation done by Chromium. - if (event->source() == Qt::MouseEventSynthesizedBySystem) - return; handlePointerEvent(event); } diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp index 5124eabed19..354c6df9fc3 100644 --- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp +++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp @@ -448,6 +448,26 @@ bool RenderWidgetHostViewQtDelegateWidget::event(QEvent *event) break; } + switch (event->type()) { + case QEvent::MouseButtonPress: + case QEvent::MouseButtonRelease: + case QEvent::MouseButtonDblClick: + case QEvent::MouseMove: + // Don't forward mouse events synthesized by the system, which are caused by genuine touch + // events. Chromium would then process for e.g. a mouse click handler twice, once due to the + // system synthesized mouse event, and another time due to a touch-to-gesture-to-mouse + // transformation done by Chromium. + // Only allow them for popup type, since QWidgetWindow will ignore them for Qt::Popup flag, + // which is expected to get input through synthesized mouse events (either by system or Qt) + if (!m_isPopup && static_cast(event)->source() == Qt::MouseEventSynthesizedBySystem) { + Q_ASSERT(!windowFlags().testFlag(Qt::Popup)); + return true; + } + break; + default: + break; + } + if (event->type() == QEvent::MouseButtonDblClick) { // QWidget keeps the Qt4 behavior where the DblClick event would replace the Press event. // QtQuick is different by sending both the Press and DblClick events for the second press From 1da56888ac5815a68e31d113a8022993a40b9f8f Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Thu, 19 May 2022 13:57:16 +0200 Subject: [PATCH 066/132] Fix top level build with no widget MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It seems that condition module.widgets is not evaluated in time when configured with "-no-widget" to be picked up by the webengine when doing 'top level' build. Use 'widget' feature instead. Fixes: QTBUG-103618 Change-Id: I881e4ba899d376690984c4866336a03d7dae246c Reviewed-by: Jörg Bornemann --- src/pdfwidgets/configure.json | 2 +- src/webenginewidgets/configure.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pdfwidgets/configure.json b/src/pdfwidgets/configure.json index b33f0855514..bef08ef721c 100644 --- a/src/pdfwidgets/configure.json +++ b/src/pdfwidgets/configure.json @@ -13,7 +13,7 @@ "pdf-widgets": { "label": "Support Qt PDF Widgets", "purpose": "Provides Qt PDF Widgets support.", - "condition": "module.widgets", + "condition": "features.widgets", "output": [ "privateFeature" ] } }, diff --git a/src/webenginewidgets/configure.json b/src/webenginewidgets/configure.json index a27faf78d5e..8aa41abcee6 100644 --- a/src/webenginewidgets/configure.json +++ b/src/webenginewidgets/configure.json @@ -13,7 +13,7 @@ "webengine-widgets": { "label": "Support Qt WebEngine Widgets", "purpose": "Provides WebEngine Widgets support.", - "condition": "module.widgets", + "condition": "features.widgets", "output": [ "privateFeature" ] } }, From 71562a62c502b34f8401d436c60a6359973c3ce6 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Mon, 20 Jun 2022 12:51:32 +0200 Subject: [PATCH 067/132] FIXUP: Add workaround for unstable gn on macOS in ci In 5.15 we have sparate coded gn call for qtpdf. This commit amends 41e94fc482eca3e40082c34d8332821a15aefba0 Change-Id: I2b9c7ed1e0c539006fbcac656aa8673a0f00d8b9 Reviewed-by: Allan Sandfeld Jensen --- src/pdf/gn_run.pro | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/pdf/gn_run.pro b/src/pdf/gn_run.pro index d0040619358..0e559472a95 100644 --- a/src/pdf/gn_run.pro +++ b/src/pdf/gn_run.pro @@ -43,6 +43,11 @@ build_pass|!debug_and_release { ninjaflags = $$(NINJAFLAGS) isEmpty(ninjaflags):!silent: ninjaflags = "-v" + enableThreads = $$(GN_MORE_THREADS) + isEmpty(enableThreads):macos { + gn_threads = "--threads=1" + } + build_pass:build_all: default_target.target = all else: default_target.target = first default_target.depends = runninja @@ -54,7 +59,7 @@ build_pass|!debug_and_release { gn_target = "qtwebengine_target=\"$$system_path($$OUT_PWD/$$arch/$$getConfigDir()):QtPdf\"" gn_args_per_arch = $$system_quote($$gn_args $$gn_target target_cpu=\"$$gnArch($$arch)\") gn_build_root = $$system_quote($$system_path($$OUT_PWD/$$arch/$$getConfigDir())) - gn_run = $$gn_binary gen $$gn_build_root $$gn_python --args=$$gn_args_per_arch --root=$$gn_src_root + gn_run = $$gn_binary gen $$gn_build_root $$gn_python $$gn_threads --args=$$gn_args_per_arch --root=$$gn_src_root message("Running for $$arch: $$gn_run") !system($$gn_run) { error("GN run error for $$arch!") @@ -68,8 +73,8 @@ build_pass|!debug_and_release { gn_args+= "qtwebengine_target=\"$$system_path($$OUT_PWD/$$getConfigDir()):QtPdf\"" gn_args = $$system_quote($$gn_args) gn_build_root = $$system_quote($$system_path($$OUT_PWD/$$getConfigDir())) - gn_run = $$gn_binary gen $$gn_build_root $$gn_python --args=$$gn_args --root=$$gn_src_root - message("Running: $$gn_run for $$arch") + gn_run = $$gn_binary gen $$gn_build_root $$gn_python $$gn_threads --args=$$gn_args --root=$$gn_src_root + message("Running: $$gn_run") !system($$gn_run) { error("GN run error!") } From 86accca3d8e7aa894818c602b8616092cc02fddb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Wed, 15 Jun 2022 22:31:03 +0200 Subject: [PATCH 068/132] Do not use the native dialog to show the color picker on macOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With the native dialog, there were either problems with the modality when using it asynchronously or with the life cycle when using it synchronously. Not using the native dialog avoids these problems. Task-number: QTBUG-102099 Change-Id: Icb9a9afda48c47558b8e8ecb6d89adc0961d5063 Reviewed-by: Allan Sandfeld Jensen Reviewed-by: Michael Brüning --- src/webenginewidgets/api/qwebenginepage.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp index f4281439fe2..3c16ede5627 100644 --- a/src/webenginewidgets/api/qwebenginepage.cpp +++ b/src/webenginewidgets/api/qwebenginepage.cpp @@ -479,6 +479,10 @@ void QWebEnginePagePrivate::showColorDialog(QSharedPointersetOption(QColorDialog::DontUseNativeDialog); +#endif + dialog->open(); #else Q_UNUSED(controller); From 698ecf3ba6da9128fa46a44e54e2bb1a37cff847 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Tue, 14 Jun 2022 13:31:11 +0200 Subject: [PATCH 069/132] Update Chromium Pulls in following patches: * 7857ff290ab FIXUP: Workaround MSVC2022 ICE in constexpr functions * a7a23ccc69e [Backport] Linux sandbox: ENOSYS for some statx syscalls * ecc2bb74f1f [Backport] CVE-2022-0796: Use after free in Media * 7e11d69b957 Fixup: CVE-2022-0796: Use after free in Media Change-Id: Ic563baee5a7a0c5c0bf95bdbb47a0d92ae6f6e22 Reviewed-by: Qt CI Bot Reviewed-by: Allan Sandfeld Jensen --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index caba2fcb0fe..7e11d69b957 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit caba2fcb0fe8a8d213c4c79d26da3bb88eee61c7 +Subproject commit 7e11d69b957595a172a3eb60db17141daed29d63 From d10211769e65d4e547472587b23d556fcc177430 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 1 Jun 2022 17:18:54 +0200 Subject: [PATCH 070/132] Fix method check Detected by codechecker. Change-Id: I8814180ef6bd591ed3e95fc4b4abff3454f10bdf Reviewed-by: Michal Klocek (cherry picked from commit 51faba3af76f4a7c67c769a5ab0be17c9aa54f83) Reviewed-by: Qt Cherry-pick Bot --- src/core/media_capture_devices_dispatcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/media_capture_devices_dispatcher.cpp b/src/core/media_capture_devices_dispatcher.cpp index 9f8b3436ac2..fc436cff2fb 100644 --- a/src/core/media_capture_devices_dispatcher.cpp +++ b/src/core/media_capture_devices_dispatcher.cpp @@ -185,7 +185,7 @@ content::DesktopMediaID getDefaultScreenId() GetMonitorsFunc getMonitors = reinterpret_cast(dlsym(RTLD_DEFAULT, "XRRGetMonitors")); typedef void (*FreeMonitorsFunc)(XRRMonitorInfo*); FreeMonitorsFunc freeMonitors = reinterpret_cast(dlsym(RTLD_DEFAULT, "XRRFreeMonitors")); - if (!getMonitors && !freeMonitors) { + if (!getMonitors || !freeMonitors) { qWarning("Unable to link XRandR monitor functions."); return content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN, 0); } From c107eb20a25157836fcf3be91566d8ea38490f40 Mon Sep 17 00:00:00 2001 From: Tarja Sundqvist Date: Wed, 15 Jun 2022 20:18:31 +0300 Subject: [PATCH 071/132] Bump version to 5.15.11 Change-Id: Ib9d15e03f126af102db095150c6b4bff0846ea3b Reviewed-by: Jani Heikkinen Reviewed-by: Allan Sandfeld Jensen --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index 83823ceeedc..b311aa94651 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -5,4 +5,4 @@ QTWEBENGINE_OUT_ROOT = $$shadowed($$PWD) load(qt_build_config) CONFIG += warning_clean -MODULE_VERSION = 5.15.10 +MODULE_VERSION = 5.15.11 From 4d115a1696a433f3bf3f3f29a131f05ca06c3d2f Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 2 Aug 2022 16:08:41 +0200 Subject: [PATCH 072/132] Build the QtDesigner plugin in all configurations The QtDesigner plugin was marked as 'tool_plugin', which restricts its build to release-only, even in debug_and_release builds. This was done to avoid building debug plugins for tools that are only build as release. However, the designer plugins are also loaded when using QUiLoader and thus are not exclusively meant for the designer tool. Task-number: QTBUG-104755 Change-Id: Id87012f57ad06984c7b0f0d318f75ad2c9a596f2 Reviewed-by: Friedemann Kleint Reviewed-by: Michal Klocek --- src/plugins/qwebengineview/qwebengineview.pro | 1 - 1 file changed, 1 deletion(-) diff --git a/src/plugins/qwebengineview/qwebengineview.pro b/src/plugins/qwebengineview/qwebengineview.pro index c18b6fe94db..6c82cdb4cf4 100644 --- a/src/plugins/qwebengineview/qwebengineview.pro +++ b/src/plugins/qwebengineview/qwebengineview.pro @@ -3,7 +3,6 @@ QT += designer webenginewidgets PLUGIN_CLASS_NAME = QWebEngineViewPlugin PLUGIN_TYPE = designer -CONFIG += tool_plugin load(qt_plugin) SOURCES += qwebengineview_plugin.cpp From 933a220ce91e66533bed6a429f54dc7d6663d963 Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Mon, 15 Aug 2022 18:10:35 +0200 Subject: [PATCH 073/132] Add workaround for un-minimizing QWebEngineView under Gnome Gnome WM doesn't send expose event when minimizing then restoring a window. Presumably, due to the missing expose event the top-level QWebEngineView is not redrawn. As a workaround, force to update RenderWidgetHostViewQtDelegateWidget when shown. The workaround is not needed in 6.4 and later because the issue is fixed by 5d1ef38f9 Create a RWHV delegate in core Fixes: QTBUG-104763 Change-Id: I4761d670d17f6dbbe3e0de82a00179eb7fd7913c Reviewed-by: Allan Sandfeld Jensen (cherry picked from commit 4a9fc6792fd5b37f1c40c53f47281c8bc74ad9c9) Reviewed-by: Qt Cherry-pick Bot --- .../render_widget_host_view_qt_delegate_widget.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp index 354c6df9fc3..a559c15d0b3 100644 --- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp +++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp @@ -270,6 +270,10 @@ void RenderWidgetHostViewQtDelegateWidget::show() // want to show anything else than popups as top-level. if (parent() || m_isPopup) { QQuickWidget::show(); + + QWebEngineView *view = static_cast(parent()); + if (view && view->isWindow()) + update(); } } From 2291526b04a09e126eff5785bbfb869b223c7fa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Tue, 16 Aug 2022 18:07:10 +0200 Subject: [PATCH 074/132] Update Chromium Submodule src/3rdparty 7e11d69b..be349eaf: * [Backport] Security bug 1343889 * [Backport] CVE-2022-2610: Insufficient policy enforcement in Background Fetch * [Backport] CVE-2022-2477 : Use after free in Guest View * [Backport] CVE-2022-27406 * [Backport] CVE-2022-27405 (2/2) * [Backport] CVE-2022-27405 (1/2) * [Backport] CVE-2022-27404 * [Backport] Security bug 1287804 * [Backport] CVE-2022-2294: Heap buffer overflow in WebRTC (2/2) * [Backport] CVE-2022-2294: Heap buffer overflow in WebRTC (1/2) * [Backport] CVE-2022-2295: Type Confusion in V8 * [Backport] CVE-2022-2160: Insufficient policy enforcement in DevTools * [Backport] CVE-2022-2162: Insufficient policy enforcement in File System API * [Backport] CVE-2022-2158: Type Confusion in V8 * [Backport] Security bug 1316578 * [Backport] CVE-2022-2008: Out of bounds memory access in WebGL * [Backport] CVE-2022-2010: Out of bounds read in compositing * [Backport] CVE-2022-1854: Use after free in ANGLE. * [Backport] CVE-2022-1857: Insufficient policy enforcement in File System API * [Backport] CVE-2022-1855: Use after free in Messaging * FIXUP: Fix url_utils for QtWebEngine Fixes: QTBUG-105500 Task-number: QTBUG-105499 Change-Id: I718648cb74346f1c7ac49a112378f9e2538e3b72 Reviewed-by: Allan Sandfeld Jensen --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 7e11d69b957..be349eaf62e 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 7e11d69b957595a172a3eb60db17141daed29d63 +Subproject commit be349eaf62e77955791d7bf29f893f1e8a37daf4 From 34363b9c0528e4a6920581e10c68eec44bbd470a Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 9 Sep 2022 12:20:49 +0200 Subject: [PATCH 075/132] Fix busy waiting on streaming QIODevice's The writable watcher will trigger all the time if we use automatic arming, instead we need to arm it manually when it is needed. Task-number: QTBUG-106461 Change-Id: Ia381db338adb1b1994d1da9b50c6d6ff542ea3e5 Reviewed-by: Michal Klocek (cherry picked from commit b30559565cb91501baddea495362101341a0aa22) --- src/core/net/custom_url_loader_factory.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/core/net/custom_url_loader_factory.cpp b/src/core/net/custom_url_loader_factory.cpp index 10b4a9e0f3c..c7426a5b99f 100644 --- a/src/core/net/custom_url_loader_factory.cpp +++ b/src/core/net/custom_url_loader_factory.cpp @@ -310,15 +310,14 @@ class CustomURLLoader : public network::mojom::URLLoader m_client->OnStartLoadingResponseBody(std::move(m_pipe.consumer_handle)); m_head = nullptr; - if (readAvailableData()) // May delete this - return; - m_watcher = std::make_unique( - FROM_HERE, mojo::SimpleWatcher::ArmingPolicy::AUTOMATIC, m_taskRunner); + FROM_HERE, mojo::SimpleWatcher::ArmingPolicy::MANUAL, m_taskRunner); m_watcher->Watch(m_pipe.producer_handle.get(), MOJO_HANDLE_SIGNAL_WRITABLE, MOJO_WATCH_CONDITION_SATISFIED, base::BindRepeating(&CustomURLLoader::notifyReadyWrite, m_weakPtrFactory.GetWeakPtr())); + + readAvailableData(); // May delete this } void notifyCanceled() override { @@ -386,8 +385,10 @@ class CustomURLLoader : public network::mojom::URLLoader uint32_t bufferSize = 0; MojoResult beginResult = m_pipe.producer_handle->BeginWriteData( &buffer, &bufferSize, MOJO_BEGIN_WRITE_DATA_FLAG_NONE); - if (beginResult == MOJO_RESULT_SHOULD_WAIT) + if (beginResult == MOJO_RESULT_SHOULD_WAIT) { + m_watcher->ArmOrNotify(); return false; // Wait for pipe watcher + } if (beginResult != MOJO_RESULT_OK) break; if (m_maxBytesToRead > 0 && m_maxBytesToRead <= int64_t{std::numeric_limits::max()}) From 3d23b379a7c0a87922f9f5d9600fde8c4e58f1fd Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 19 Sep 2022 16:36:40 +0200 Subject: [PATCH 076/132] Work-around GNOME bug misidentifying HTML content Correct application/x-extension-html to text/html Fixes: QTBUG-97392 Fixes: QTBUG-106688 Change-Id: I0d65c6950c5ba1504586cf564268463c5d4cd483 Reviewed-by: Peter Varga (cherry picked from commit 84ebd698597cf7a45b5e0967221547c21b1d67e8) Reviewed-by: Qt Cherry-pick Bot --- src/core/net/qrc_url_scheme_handler.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/net/qrc_url_scheme_handler.cpp b/src/core/net/qrc_url_scheme_handler.cpp index 73bf24f1d18..0a994343100 100644 --- a/src/core/net/qrc_url_scheme_handler.cpp +++ b/src/core/net/qrc_url_scheme_handler.cpp @@ -67,7 +67,10 @@ void QrcUrlSchemeHandler::requestStarted(QWebEngineUrlRequestJob *job) QFileInfo fileInfo(*file); QMimeDatabase mimeDatabase; QMimeType mimeType = mimeDatabase.mimeTypeForFile(fileInfo); - job->reply(mimeType.name().toUtf8(), file.take()); + if (mimeType.name() == QStringLiteral("application/x-extension-html")) + job->reply("text/html", file.take()); + else + job->reply(mimeType.name().toUtf8(), file.take()); } } // namespace QtWebEngineCore From 5d89f26414471689a9626515d098104e38bacbda Mon Sep 17 00:00:00 2001 From: Tarja Sundqvist Date: Thu, 6 Oct 2022 17:57:00 +0300 Subject: [PATCH 077/132] Bump version to 5.15.12 Change-Id: I92bc48089b38b16039ae4109fedcbad2a7ff15ef Reviewed-by: Michal Klocek --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index b311aa94651..0e7e6f013ce 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -5,4 +5,4 @@ QTWEBENGINE_OUT_ROOT = $$shadowed($$PWD) load(qt_build_config) CONFIG += warning_clean -MODULE_VERSION = 5.15.11 +MODULE_VERSION = 5.15.12 From 4ea03a0affbfd6ff36a7defd391b7ca139d18c8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Thu, 8 Dec 2022 16:31:50 +0100 Subject: [PATCH 078/132] Update Chromium Submodule src/3rdparty be349eaf..e0fd3a5d: * Fixup for patch for CVE-2022-3200 on OpenSuse 15.1 * [Backport] CVE-2022-4262: Type Confusion in V8 * Bump V8_PATCH_LEVEL * [Backport] CVE-2022-4174: Type Confusion in V8 * [Backport] CVE-2022-4180: Use after free in Mojo * [Backport] CVE-2022-4181: Use after free in Forms * [Backport] CVE-2022-3201: Insufficient validation of untrusted input in Developer Tools (2/2) * [Backport] Security bug 1378916 * Fixup the patch for CVE-2022-3200 on 87-based / 5.15 * [Backport] CVE-2022-3200: Heap buffer overflow in Internals * [Backport] CVE-2022-3887: Use after free in Web Workers * [Backport] CVE-2022-3890: Heap buffer overflow in Crashpad * [Backport] CVE-2022-3889: Type Confusion in V8 * [Backport] CVE-2022-3885: Use after free in V8 * [Backport] CVE-2022-3445: Use after free in Skia. * [Backport] CVE-2022-3373: Out of bounds write in V8 * Fix building with XCode 14.1 * [Backport] CVE-2022-3046: Use after free in Browser Tag * [Backport] CVE-2022-3446 and CVE-2022-35737 * [Backport] CVE-2022-3304: Use after free in CSS * [Backport] CVE-2022-3201: Insufficient validation of untrusted input in Developer Tools (1/2) * [Backport] Security bug 1356308 * [Backport] CVE-2022-3370: Use after free in Custom Elements * [Backport] Security bugs 1346938 and 1338114 * [Backport] CVE-2022-3199: Use after free in Frames. * [Backport] CVE-2022-3198: Use after free in PDF * [Backport] CVE-2022-3197: Use after free in PDF * [Backport] CVE-2022-3196: Use after free in PDF * [Backport] CVE-2022-3075: Insufficient data validation in Mojo * [Backport] CVE-2022-3040: Use after free in Layout * [Backport] CVE-2022-3041: Use after free in WebSQL * [Backport] CVE-2022-3038: Use after free in Network Service Task-number: QTBUG-109225 Fixes: QTBUG-108207 Fixes: QTBUG-108178 Fixes: QTBUG-108179 Fixes: QTBUG-108180 Change-Id: I5e1ebbe350e67ed888bfb07602d88bfcbecd94df Reviewed-by: Michal Klocek --- CHROMIUM_VERSION | 2 +- src/3rdparty | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION index b7e9d2de991..95fd981d629 100644 --- a/CHROMIUM_VERSION +++ b/CHROMIUM_VERSION @@ -1,2 +1,2 @@ Based on Chromium version: 87.0.4280.144 -Patched with security patches up to Chromium version: 98.0.4758.102 +Patched with security patches up to Chromium version: 108.0.5359.94 diff --git a/src/3rdparty b/src/3rdparty index be349eaf62e..e0fd3a5d3ce 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit be349eaf62e77955791d7bf29f893f1e8a37daf4 +Subproject commit e0fd3a5d3ce79d43dee6e0bad16a71123d9a14b3 From df26edf16ab6012f741efca4bb6372ac4f1b1e02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Tue, 13 Dec 2022 01:02:30 +0100 Subject: [PATCH 079/132] Recreate response head objects on multiple redirect The previous response head gets moved when redirecting, which lead to dereferencing a null pointer on the next redirect. Fixes: QTBUG-109357 Change-Id: Iaad1c46b8d4ca9720f1749980a9e06337ca0f3d8 Reviewed-by: Allan Sandfeld Jensen (cherry picked from commit c6b2b5d8038b3ec0de6233c1e21df60ade11c81b) --- .../net/proxying_url_loader_factory_qt.cpp | 26 ++++++---- .../resources/content3.html | 6 +++ .../tst_qwebengineurlrequestinterceptor.cpp | 47 +++++++++++++++++++ .../tst_qwebengineurlrequestinterceptor.qrc | 2 + 4 files changed, 73 insertions(+), 8 deletions(-) create mode 100644 tests/auto/core/qwebengineurlrequestinterceptor/resources/content3.html diff --git a/src/core/net/proxying_url_loader_factory_qt.cpp b/src/core/net/proxying_url_loader_factory_qt.cpp index a9b77408670..a016cbc72e5 100644 --- a/src/core/net/proxying_url_loader_factory_qt.cpp +++ b/src/core/net/proxying_url_loader_factory_qt.cpp @@ -66,6 +66,18 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +namespace { + network::mojom::URLResponseHeadPtr createResponse(const network::ResourceRequest &request) { + const bool disable_web_security = base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableWebSecurity); + network::mojom::URLResponseHeadPtr response = network::mojom::URLResponseHead::New(); + response->response_type = network::cors::CalculateResponseType( + request.mode, disable_web_security || ( + request.request_initiator && request.request_initiator->IsSameOriginWith(url::Origin::Create(request.url)))); + + return response; + } +} + namespace QtWebEngineCore { ASSERT_ENUMS_MATCH(QWebEngineUrlRequestInfo::ResourceTypeMainFrame, blink::mojom::ResourceType::kMainFrame) @@ -211,11 +223,7 @@ InterceptedRequest::InterceptedRequest(ProfileAdapter *profile_adapter, , weak_factory_(this) { const bool disable_web_security = base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableWebSecurity); - current_response_ = network::mojom::URLResponseHead::New(); - current_response_->response_type = network::cors::CalculateResponseType( - request_.mode, - disable_web_security || ( - request_.request_initiator && request_.request_initiator->IsSameOriginWith(url::Origin::Create(request_.url)))); + current_response_ = createResponse(request_); // If there is a client error, clean up the request. target_client_.set_disconnect_handler( base::BindOnce(&InterceptedRequest::OnURLLoaderClientError, base::Unretained(this))); @@ -381,9 +389,6 @@ void InterceptedRequest::ContinueAfterIntercept() first_party_url_policy, request_.referrer_policy, request_.referrer.spec(), net::HTTP_TEMPORARY_REDIRECT, toGurl(https://github.com/info.url), base::nullopt, false /*insecure_scheme_was_upgraded*/); - - // FIXME: Should probably create a new header. - current_response_->encoded_data_length = 0; request_.method = redirectInfo.new_method; request_.url = redirectInfo.new_url; request_.site_for_cookies = redirectInfo.new_site_for_cookies; @@ -391,6 +396,11 @@ void InterceptedRequest::ContinueAfterIntercept() request_.referrer_policy = redirectInfo.new_referrer_policy; if (request_.method == net::HttpRequestHeaders::kGetMethod) request_.request_body = nullptr; + // In case of multiple sequential rediredts, current_response_ has previously been moved to target_client_ + // so we create a new one using the redirect url. + if (!current_response_) + current_response_ = createResponse(request_); + current_response_->encoded_data_length = 0; target_client_->OnReceiveRedirect(redirectInfo, std::move(current_response_)); return; } diff --git a/tests/auto/core/qwebengineurlrequestinterceptor/resources/content3.html b/tests/auto/core/qwebengineurlrequestinterceptor/resources/content3.html new file mode 100644 index 00000000000..84bf550362a --- /dev/null +++ b/tests/auto/core/qwebengineurlrequestinterceptor/resources/content3.html @@ -0,0 +1,6 @@ + + + +Simple test page without favicon (meaning no separate request from http server) + + diff --git a/tests/auto/core/qwebengineurlrequestinterceptor/tst_qwebengineurlrequestinterceptor.cpp b/tests/auto/core/qwebengineurlrequestinterceptor/tst_qwebengineurlrequestinterceptor.cpp index 642e5db7c2e..32a618de33e 100644 --- a/tests/auto/core/qwebengineurlrequestinterceptor/tst_qwebengineurlrequestinterceptor.cpp +++ b/tests/auto/core/qwebengineurlrequestinterceptor/tst_qwebengineurlrequestinterceptor.cpp @@ -79,6 +79,7 @@ private Q_SLOTS: void replaceInterceptor_data(); void replaceInterceptor(); void replaceOnIntercept(); + void multipleRedirects(); }; tst_QWebEngineUrlRequestInterceptor::tst_QWebEngineUrlRequestInterceptor() @@ -211,6 +212,29 @@ class TestRequestInterceptor : public QWebEngineUrlRequestInterceptor } }; +class TestMultipleRedirectsInterceptor : public QWebEngineUrlRequestInterceptor { +public: + QList requestInfos; + QMap redirectPairs; + int redirectCount = 0; + void interceptRequest(QWebEngineUrlRequestInfo &info) override + { + QVERIFY(QThread::currentThread() == QCoreApplication::instance()->thread()); + qCDebug(lc) << this << "Type:" << info.resourceType() << info.requestMethod() << "Navigation:" << info.navigationType() + << info.requestUrl() << "Initiator:" << info.initiator(); + auto redirectUrl = redirectPairs.constFind(info.requestUrl()); + if (redirectUrl != redirectPairs.constEnd()) { + info.redirect(redirectUrl.value()); + requestInfos.append(info); + redirectCount++; + } + } + + TestMultipleRedirectsInterceptor() + { + } +}; + class ConsolePage : public QWebEnginePage { Q_OBJECT public: @@ -915,5 +939,28 @@ void tst_QWebEngineUrlRequestInterceptor::replaceOnIntercept() QCOMPARE(profileInterceptor.requestInfos.size(), pageInterceptor2.requestInfos.size()); } +void tst_QWebEngineUrlRequestInterceptor::multipleRedirects() +{ + HttpServer server; + server.setResourceDirs({ ":/resources" }); + QVERIFY(server.start()); + + TestMultipleRedirectsInterceptor multiInterceptor; + multiInterceptor.redirectPairs.insert(QUrl(server.url("https://github.com/content.html")), QUrl(server.url("https://github.com/content2.html"))); + multiInterceptor.redirectPairs.insert(QUrl(server.url("https://github.com/content2.html")), QUrl(server.url("https://github.com/content3.html"))); + + QWebEngineProfile profile; + profile.settings()->setAttribute(QWebEngineSettings::ErrorPageEnabled, false); + profile.setUrlRequestInterceptor(&multiInterceptor); + QWebEnginePage page(&profile); + QSignalSpy spy(&page, SIGNAL(loadFinished(bool))); + + page.setUrl(server.url("https://github.com/content.html")); + + QTRY_COMPARE_WITH_TIMEOUT(spy.count(), 1, 20000); + QTRY_COMPARE(multiInterceptor.redirectCount, 2); + QTRY_COMPARE(multiInterceptor.requestInfos.size(), 2); +} + QTEST_MAIN(tst_QWebEngineUrlRequestInterceptor) #include "tst_qwebengineurlrequestinterceptor.moc" diff --git a/tests/auto/core/qwebengineurlrequestinterceptor/tst_qwebengineurlrequestinterceptor.qrc b/tests/auto/core/qwebengineurlrequestinterceptor/tst_qwebengineurlrequestinterceptor.qrc index 6a34635f708..df9c81a7bb0 100644 --- a/tests/auto/core/qwebengineurlrequestinterceptor/tst_qwebengineurlrequestinterceptor.qrc +++ b/tests/auto/core/qwebengineurlrequestinterceptor/tst_qwebengineurlrequestinterceptor.qrc @@ -1,6 +1,8 @@ resources/content.html + resources/content2.html + resources/content3.html resources/favicon.html resources/firstparty.html resources/fontawesome.woff From 783d541b6ecb62a1e36d6c4cb9ab3e7b43286c79 Mon Sep 17 00:00:00 2001 From: Tarja Sundqvist Date: Thu, 22 Dec 2022 11:22:51 +0200 Subject: [PATCH 080/132] =?UTF-8?q?Bump=C2=A0version=C2=A0to=C2=A05.15.13?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I96fd386811c0e1fc8b03ab73532fdf1c456971b0 Reviewed-by: Jani Heikkinen --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index 0e7e6f013ce..572971ee0c2 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -5,4 +5,4 @@ QTWEBENGINE_OUT_ROOT = $$shadowed($$PWD) load(qt_build_config) CONFIG += warning_clean -MODULE_VERSION = 5.15.12 +MODULE_VERSION = 5.15.13 From 38e0df6c6e5a1186b68df9b3d6f4cafbb211f2da Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Tue, 8 Nov 2022 15:10:01 +0100 Subject: [PATCH 081/132] Fix probabilistic signature scheme We failed to support pss, which ended up in handshake failures Task-number: QTBUG-109273 Change-Id: I12c50d6a5f2dcf32d47708a958e2fe5a18316986 Reviewed-by: Allan Sandfeld Jensen (cherry picked from commit 2d77e333eff7605a489ec65600b78e1b49df37c7) --- src/core/net/client_cert_store_data.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/net/client_cert_store_data.cpp b/src/core/net/client_cert_store_data.cpp index 314e6414518..a96e247b2c5 100644 --- a/src/core/net/client_cert_store_data.cpp +++ b/src/core/net/client_cert_store_data.cpp @@ -104,8 +104,8 @@ class SSLPlatformKeyOverride : public net::ThreadedSSLPrivateKey::Delegate std::vector GetAlgorithmPreferences() override { - return { SSL_SIGN_RSA_PKCS1_SHA1, SSL_SIGN_RSA_PKCS1_SHA512 - , SSL_SIGN_RSA_PKCS1_SHA384, SSL_SIGN_RSA_PKCS1_SHA256 }; + return net::SSLPrivateKey::DefaultAlgorithmPreferences(EVP_PKEY_id(m_key), + /* supports pss */ true); } std::string GetProviderName() override { return "qtwebengine"; From f0120e41bba4ae68ba842546ea519b7b37939eb7 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Wed, 18 Jan 2023 16:35:25 +0100 Subject: [PATCH 082/132] Move out GetInProcessGpuShareGroup form content browser client MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Keeping the GetInProcessGpuShareGroup in content browser client creates dependency from gpu_child_thread to content browser, however gn build tree asserts when content/public/gpu depends on content/public/browser as it breaks intended components dependency. This worked so far as required headers in content browser client got generated on time despite of missing dependency. Fix the dependency tree and move the problematic function into the content gpu client. This change moves only code around. Change-Id: Iedcbc8c3c7d1754d1937e6b2c2a470c0e489a597 Reviewed-by: Michael Brüning --- src/core/compositor/content_gpu_client_qt.cpp | 135 +++++++++++++++++- src/core/compositor/content_gpu_client_qt.h | 6 + src/core/content_browser_client_qt.cpp | 105 -------------- src/core/content_browser_client_qt.h | 10 -- 4 files changed, 137 insertions(+), 119 deletions(-) diff --git a/src/core/compositor/content_gpu_client_qt.cpp b/src/core/compositor/content_gpu_client_qt.cpp index f934979a0f9..8d7d5bce528 100644 --- a/src/core/compositor/content_gpu_client_qt.cpp +++ b/src/core/compositor/content_gpu_client_qt.cpp @@ -38,22 +38,149 @@ ****************************************************************************/ #include "content_gpu_client_qt.h" - #include "web_engine_context.h" +#include "ui/gl/gl_share_group.h" +#include "ui/gl/gl_context.h" +#include "ui/gl/gl_implementation.h" +#include "ui/gl/gpu_timing.h" + +#if QT_CONFIG(opengl) +#include +#include +#endif + +#include +#include + +QT_BEGIN_NAMESPACE +Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context(); +QT_END_NAMESPACE namespace QtWebEngineCore { -ContentGpuClientQt::ContentGpuClientQt() +class QtShareGLContext : public gl::GLContext { -} +public: + QtShareGLContext(QOpenGLContext *qtContext) : gl::GLContext(0), m_handle(0) + { + QString platform = qApp->platformName().toLower(); + QPlatformNativeInterface *pni = QGuiApplication::platformNativeInterface(); + if (platform == QLatin1String("xcb") || platform == QLatin1String("offscreen")) { + if (gl::GetGLImplementation() == gl::kGLImplementationEGLGLES2) + m_handle = + pni->nativeResourceForContext(QByteArrayLiteral("eglcontext"), qtContext); + else + m_handle = + pni->nativeResourceForContext(QByteArrayLiteral("glxcontext"), qtContext); + } else if (platform == QLatin1String("cocoa")) + m_handle = pni->nativeResourceForContext(QByteArrayLiteral("cglcontextobj"), qtContext); + else if (platform == QLatin1String("qnx")) + m_handle = pni->nativeResourceForContext(QByteArrayLiteral("eglcontext"), qtContext); + else if (platform == QLatin1String("eglfs") || platform == QLatin1String("wayland") + || platform == QLatin1String("wayland-egl")) + m_handle = pni->nativeResourceForContext(QByteArrayLiteral("eglcontext"), qtContext); + else if (platform == QLatin1String("windows")) { + if (gl::GetGLImplementation() == gl::kGLImplementationEGLGLES2) + m_handle = + pni->nativeResourceForContext(QByteArrayLiteral("eglContext"), qtContext); + else + m_handle = pni->nativeResourceForContext(QByteArrayLiteral("renderingcontext"), + qtContext); + } else { + qFatal("%s platform not yet supported", platform.toLatin1().constData()); + // Add missing platforms once they work. + Q_UNREACHABLE(); + } + } + + void *GetHandle() override { return m_handle; } + unsigned int CheckStickyGraphicsResetStatusImpl() override + { +#if QT_CONFIG(opengl) + if (QOpenGLContext *context = qt_gl_global_share_context()) { + if (context->format().testOption(QSurfaceFormat::ResetNotification)) + return context->extraFunctions()->glGetGraphicsResetStatus(); + } +#endif + return 0 /*GL_NO_ERROR*/; + } + + // We don't care about the rest, this context shouldn't be used except for its handle. + bool Initialize(gl::GLSurface *, const gl::GLContextAttribs &) override + { + Q_UNREACHABLE(); + return false; + } + bool MakeCurrentImpl(gl::GLSurface *) override + { + Q_UNREACHABLE(); + return false; + } + void ReleaseCurrent(gl::GLSurface *) override + { + Q_UNREACHABLE(); + } + bool IsCurrent(gl::GLSurface *) override + { + Q_UNREACHABLE(); + return false; + } + scoped_refptr CreateGPUTimingClient() override + { + return nullptr; + } + const gfx::ExtensionSet &GetExtensions() override + { + static const gfx::ExtensionSet s_emptySet; + return s_emptySet; + } + void ResetExtensions() override { } + +private: + void *m_handle; +}; -ContentGpuClientQt::~ContentGpuClientQt() +class ShareGroupQtQuick : public gl::GLShareGroup { +public: + gl::GLContext *GetContext() override { return m_shareContextQtQuick.get(); } + void AboutToAddFirstContext() override; + +private: + scoped_refptr m_shareContextQtQuick; +}; + +void ShareGroupQtQuick::AboutToAddFirstContext() +{ +#if QT_CONFIG(opengl) + // This currently has to be setup by ::main in all applications using QQuickWebEngineView + // with de legated rendering. + QOpenGLContext *shareContext = qt_gl_global_share_context(); + if (!shareContext) { + qFatal("QWebEngine: OpenGL resource sharing is not set up in QtQuick. Please make sure " + "to" + "call QtWebEngine::initialize() in your main() function before QCoreApplication " + "is " + "created."); + } + m_shareContextQtQuick = new QtShareGLContext(shareContext); +#endif } +ContentGpuClientQt::ContentGpuClientQt() { } + +ContentGpuClientQt::~ContentGpuClientQt() { } + gpu::SyncPointManager *ContentGpuClientQt::GetSyncPointManager() { return WebEngineContext::syncPointManager(); } +gl::GLShareGroup *ContentGpuClientQt::GetInProcessGpuShareGroup() +{ + if (!m_shareGroupQtQuick.get()) + m_shareGroupQtQuick = new ShareGroupQtQuick; + return m_shareGroupQtQuick.get(); +} + } // namespace diff --git a/src/core/compositor/content_gpu_client_qt.h b/src/core/compositor/content_gpu_client_qt.h index d7ad43881e6..5288c65bdf1 100644 --- a/src/core/compositor/content_gpu_client_qt.h +++ b/src/core/compositor/content_gpu_client_qt.h @@ -43,6 +43,8 @@ namespace QtWebEngineCore { +class ShareGroupQtQuick; + class ContentGpuClientQt : public content::ContentGpuClient { public: explicit ContentGpuClientQt(); @@ -50,6 +52,10 @@ class ContentGpuClientQt : public content::ContentGpuClient { // content::ContentGpuClient implementation. gpu::SyncPointManager *GetSyncPointManager() override; + gl::GLShareGroup *GetInProcessGpuShareGroup() override; + +private: + scoped_refptr m_shareGroupQtQuick; }; } diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp index f3eccb92125..0a444a277e9 100644 --- a/src/core/content_browser_client_qt.cpp +++ b/src/core/content_browser_client_qt.cpp @@ -80,7 +80,6 @@ #include "ui/base/ui_base_switches.h" #include "ui/gl/gl_context.h" #include "ui/gl/gl_implementation.h" -#include "ui/gl/gl_share_group.h" #include "ui/gl/gpu_timing.h" #include "url/url_util_qt.h" @@ -118,11 +117,6 @@ #include "api/qwebenginecookiestore.h" #include "api/qwebenginecookiestore_p.h" -#if QT_CONFIG(opengl) -#include -#include -#endif - #if QT_CONFIG(webengine_geolocation) #include "base/memory/ptr_util.h" #include "location_provider_qt.h" @@ -179,11 +173,6 @@ #include #include -#include - -QT_BEGIN_NAMESPACE -Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context(); -QT_END_NAMESPACE // Implement IsHandledProtocol as declared in //url/url_util_qt.h. namespace url { @@ -231,93 +220,6 @@ void MaybeAddThrottle( throttles->push_back(std::move(maybe_throttle)); } -class QtShareGLContext : public gl::GLContext { -public: - QtShareGLContext(QOpenGLContext *qtContext) - : gl::GLContext(0) - , m_handle(0) - { - QString platform = qApp->platformName().toLower(); - QPlatformNativeInterface *pni = QGuiApplication::platformNativeInterface(); - if (platform == QLatin1String("xcb") || platform == QLatin1String("offscreen")) { - if (gl::GetGLImplementation() == gl::kGLImplementationEGLGLES2) - m_handle = pni->nativeResourceForContext(QByteArrayLiteral("eglcontext"), qtContext); - else - m_handle = pni->nativeResourceForContext(QByteArrayLiteral("glxcontext"), qtContext); - } else if (platform == QLatin1String("cocoa")) - m_handle = pni->nativeResourceForContext(QByteArrayLiteral("cglcontextobj"), qtContext); - else if (platform == QLatin1String("qnx")) - m_handle = pni->nativeResourceForContext(QByteArrayLiteral("eglcontext"), qtContext); - else if (platform == QLatin1String("eglfs") || platform == QLatin1String("wayland") - || platform == QLatin1String("wayland-egl")) - m_handle = pni->nativeResourceForContext(QByteArrayLiteral("eglcontext"), qtContext); - else if (platform == QLatin1String("windows")) { - if (gl::GetGLImplementation() == gl::kGLImplementationEGLGLES2) - m_handle = pni->nativeResourceForContext(QByteArrayLiteral("eglContext"), qtContext); - else - m_handle = pni->nativeResourceForContext(QByteArrayLiteral("renderingcontext"), qtContext); - } else { - qFatal("%s platform not yet supported", platform.toLatin1().constData()); - // Add missing platforms once they work. - Q_UNREACHABLE(); - } - } - - void* GetHandle() override { return m_handle; } - unsigned int CheckStickyGraphicsResetStatusImpl() override - { -#if QT_CONFIG(opengl) - if (QOpenGLContext *context = qt_gl_global_share_context()) { - if (context->format().testOption(QSurfaceFormat::ResetNotification)) - return context->extraFunctions()->glGetGraphicsResetStatus(); - } -#endif - return 0 /*GL_NO_ERROR*/; - } - - // We don't care about the rest, this context shouldn't be used except for its handle. - bool Initialize(gl::GLSurface *, const gl::GLContextAttribs &) override { Q_UNREACHABLE(); return false; } - bool MakeCurrentImpl(gl::GLSurface *) override { Q_UNREACHABLE(); return false; } - void ReleaseCurrent(gl::GLSurface *) override { Q_UNREACHABLE(); } - bool IsCurrent(gl::GLSurface *) override { Q_UNREACHABLE(); return false; } - scoped_refptr CreateGPUTimingClient() override - { - return nullptr; - } - const gfx::ExtensionSet& GetExtensions() override - { - static const gfx::ExtensionSet s_emptySet; - return s_emptySet; - } - void ResetExtensions() override - { - } - -private: - void *m_handle; -}; - -class ShareGroupQtQuick : public gl::GLShareGroup { -public: - gl::GLContext* GetContext() override { return m_shareContextQtQuick.get(); } - void AboutToAddFirstContext() override; - -private: - scoped_refptr m_shareContextQtQuick; -}; - -void ShareGroupQtQuick::AboutToAddFirstContext() -{ -#if QT_CONFIG(opengl) - // This currently has to be setup by ::main in all applications using QQuickWebEngineView with delegated rendering. - QOpenGLContext *shareContext = qt_gl_global_share_context(); - if (!shareContext) { - qFatal("QWebEngine: OpenGL resource sharing is not set up in QtQuick. Please make sure to call QtWebEngine::initialize() in your main() function before QCoreApplication is created."); - } - m_shareContextQtQuick = new QtShareGLContext(shareContext); -#endif -} - ContentBrowserClientQt::ContentBrowserClientQt() { } @@ -364,13 +266,6 @@ void ContentBrowserClientQt::RenderProcessWillLaunch(content::RenderProcessHost renderer_configuration->SetInitialConfiguration(is_incognito_process); } -gl::GLShareGroup *ContentBrowserClientQt::GetInProcessGpuShareGroup() -{ - if (!m_shareGroupQtQuick.get()) - m_shareGroupQtQuick = new ShareGroupQtQuick; - return m_shareGroupQtQuick.get(); -} - content::MediaObserver *ContentBrowserClientQt::GetMediaObserver() { return MediaCaptureDevicesDispatcher::GetInstance(); diff --git a/src/core/content_browser_client_qt.h b/src/core/content_browser_client_qt.h index 7c8aa3ac944..06e2e9a20a5 100644 --- a/src/core/content_browser_client_qt.h +++ b/src/core/content_browser_client_qt.h @@ -60,14 +60,8 @@ struct MainFunctionParams; struct Referrer; } -namespace gl { -class GLShareGroup; -} - namespace QtWebEngineCore { -class ShareGroupQtQuick; - class ContentBrowserClientQt : public content::ContentBrowserClient { public: @@ -75,7 +69,6 @@ class ContentBrowserClientQt : public content::ContentBrowserClient ~ContentBrowserClientQt(); std::unique_ptr CreateBrowserMainParts(const content::MainFunctionParams&) override; void RenderProcessWillLaunch(content::RenderProcessHost *host) override; - gl::GLShareGroup* GetInProcessGpuShareGroup() override; content::MediaObserver* GetMediaObserver() override; scoped_refptr CreateQuotaPermissionContext() override; void OverrideWebkitPrefs(content::RenderViewHost *render_view_host, @@ -266,9 +259,6 @@ class ContentBrowserClientQt : public content::ContentBrowserClient std::string GetUserAgent() override { return getUserAgent(); } std::string GetProduct() override; - -private: - scoped_refptr m_shareGroupQtQuick; }; } // namespace QtWebEngineCore From 68e6168700cbeec903f53f637f40f34260dd60b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Thu, 12 Jan 2023 13:18:48 +0100 Subject: [PATCH 083/132] Update Chromium MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Submodule src/3rdparty e0fd3a5d..97a12549: * Drop dependency on content/public/browser in content gpu * [Backport] Security bug 1394382 * [Backport] CVE-2022-4437: Use after free in Mojo IPC * [Backport] CVE-2022-4438: Use after free in Blink Frames * [Backport] CVE-2022-4179: Use after free in Audio Task-number: QTBUG-109225 Change-Id: Icdf29aa0dfa861fd21b07ac4f07f32709d2e5ec5 Reviewed-by: Michael Brüning --- CHROMIUM_VERSION | 2 +- src/3rdparty | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION index 95fd981d629..d293d46b43d 100644 --- a/CHROMIUM_VERSION +++ b/CHROMIUM_VERSION @@ -1,2 +1,2 @@ Based on Chromium version: 87.0.4280.144 -Patched with security patches up to Chromium version: 108.0.5359.94 +Patched with security patches up to Chromium version: 108.0.5359.124 diff --git a/src/3rdparty b/src/3rdparty index e0fd3a5d3ce..406715225b1 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit e0fd3a5d3ce79d43dee6e0bad16a71123d9a14b3 +Subproject commit 406715225b17b2cf4204f17b9b651bef5d397392 From ee9794c7263b8b5cb85cd9648c68687e08805aca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Fri, 20 Jan 2023 16:02:05 +0100 Subject: [PATCH 084/132] Update Chromium Submodule src/3rdparty 40671522..87897ba0: * Revert "[Backport] Security bug 1395604" * [Backport] Security bug 1393384 * [Backport] Security bug 1399424 * [Backport] Security bug 1395604 * [Backport] CVE-2023-0129: Heap buffer overflow in Network Service Task-number: QTBUG-110265 Change-Id: I4fb4de2ff6e72c8a5215e267495f77b968d923f5 Reviewed-by: Qt CI Bot Reviewed-by: Michal Klocek --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 406715225b1..87897ba0a5f 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 406715225b17b2cf4204f17b9b651bef5d397392 +Subproject commit 87897ba0a5f5676633c6d44e002c5a7f306a91d7 From c4e58804c9b10fa6a61918f13e9d9c3c488bf8b6 Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Fri, 3 Feb 2023 09:04:16 +0100 Subject: [PATCH 085/132] Update Chromium Submodule src/3rdparty 87897ba0..d29902af: * [Backport] Fix more clang deprecated builtins * [Backport] Disable ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE for clang-cl. * [Backport] Map the absl::is_trivially_* functions to their std impl * FIXUP: Fixes for building with MSVC Fixes: QTBUG-108240 Change-Id: Ia0b0bc47128362019c3dac02fd3579e16c6e3116 Reviewed-by: Allan Sandfeld Jensen --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 87897ba0a5f..d29902afc5b 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 87897ba0a5f5676633c6d44e002c5a7f306a91d7 +Subproject commit d29902afc5bd4d3ae0fb16125bfc0970cde21ae3 From b45730ca4309c339b0b8a3eaf2027a52e9a7ec17 Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Wed, 15 Feb 2023 16:36:11 +0100 Subject: [PATCH 086/132] Force to disable IPC logging It is enabled by default in Chromium for debug build. See //ipc/features.gni. Disable it for debug build too because it adds and extra SetIPCLoggingEnabled mojo message (see //content/common/child_process.mojom) and it results different mojo message ids for the debug and release binaries. This is undesirable when setting QTWEBENGINEPROCESS_PATH environment variable to use release QtWebEngineProcess with debug browser process or the other way around. The messages and the corresponding ids can be listed by executing the following command in the QtWebEngine build directory: find . -name "*-message-ids.h" | xargs grep -h "constexpr uint32_t" Task-number: QTBUG-110504 Change-Id: I80f24117ae20d02fb53ea482d04bea7a9dcb38c1 Reviewed-by: Allan Sandfeld Jensen (cherry picked from commit 114c6d0543e1ebe4ec12693b0d462ec05037e3a4) --- src/core/config/common.pri | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/config/common.pri b/src/core/config/common.pri index d9d64e76b9e..fc46d55ce8f 100644 --- a/src/core/config/common.pri +++ b/src/core/config/common.pri @@ -46,3 +46,4 @@ qtConfig(webengine-kerberos) { } !qtConfig(webengine-nodejs10): gn_args += use_rollup=false +gn_args += enable_ipc_logging=false From 635e7fbee0b7cf3ed7e416e123274f32b91c97cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Mon, 20 Feb 2023 17:46:09 +0100 Subject: [PATCH 087/132] Update Chromium MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Submodule src/3rdparty d29902af..f7860adb: * [Backport] CVE-2023-0698: Out of bounds read in WebRTC * [Backport] CVE-2023-0472: Use after free in WebRTC * [Backport] Security bug 1406115 * [Backport] Add missing include for std::begin and std::end in SkParseColor.cpp Task-number: QTBUG-111333 Fixes: QTBUG-110265 Fixes: QTBUG-109225 Change-Id: I2ccd8aaea86667b6971d1e4f9d13271e6804eaad Reviewed-by: Michael Brüning --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index d29902afc5b..f7860adb852 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit d29902afc5bd4d3ae0fb16125bfc0970cde21ae3 +Subproject commit f7860adb852a797ad68ce9f5f0d1622633775a2f From f57a146d424290bb69fadd95e7e614715d9c7e6c Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Thu, 23 Feb 2023 15:15:31 +0100 Subject: [PATCH 088/132] Update Chromium Submodule src/3rdparty f7860adb..4f0704cd: * FIXUP: Mark Node::opcode() and Operator::opcode() as constexpr. * Add checksum to mailbox name in Release build too * [Backport][Windows] Remove unused sidestep intercepts. * [Backport] Mark Node::opcode() and Operator::opcode() as constexpr. Pick-to: 5.15.13 Task-number: QTBUG-110504 Task-number: QTBUG-108240 Change-Id: Icbd00244f022ff40644f3aea228ac4b6a5e04eb1 Reviewed-by: Qt CI Bot Reviewed-by: Allan Sandfeld Jensen --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index f7860adb852..4f0704cd5d9 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit f7860adb852a797ad68ce9f5f0d1622633775a2f +Subproject commit 4f0704cd5d9364020b0458ee6c6b9580a360b4de From 79c08a1ad875f1a367ff1765c84ab02d7a94ade4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Mon, 27 Feb 2023 19:39:32 +0100 Subject: [PATCH 089/132] Update Chromium Submodule src/3rdpartyi bdc50b6a..e48df780 * [Backport] CVE-2023-0933: Integer overflow in PDF * [Backport] CVE-2023-0931: Use after free in Video (2/2) * [Backport] CVE-2023-0931: Use after free in Video (1/2) Task-number: QTBUG-111333 Change-Id: I5574cee09eb47dea80c8a6c993a03a3f3cf6b98b Reviewed-by: Michal Klocek Reviewed-by: Allan Sandfeld Jensen --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 4f0704cd5d9..e48df7803c7 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 4f0704cd5d9364020b0458ee6c6b9580a360b4de +Subproject commit e48df7803c7c98b0b2471c94057d32e44a301ad5 From a7454f915d3db7d6711f6ad5e9991606aec3c4a5 Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Fri, 24 Feb 2023 14:57:52 +0100 Subject: [PATCH 090/132] Fix initialization of QWebEngineDownloadItem::totalBytes for Widgets QQuickWebEngineProfile already initializes totalBytes. Also fix typo in documentation. Fixes: QTBUG-104869 Change-Id: I8c4b79c076ddc63180960e22a9488b45ff6c4402 Reviewed-by: Allan Sandfeld Jensen (cherry picked from commit 496647f7647571ca3cdf81b10ba418de0f06f34d) Reviewed-by: Michal Klocek --- src/core/download_manager_delegate_qt.cpp | 2 +- src/webenginewidgets/api/qwebenginedownloaditem.cpp | 2 +- src/webenginewidgets/api/qwebengineprofile.cpp | 1 + .../qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp | 4 ++-- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/core/download_manager_delegate_qt.cpp b/src/core/download_manager_delegate_qt.cpp index f1ad1e677d9..b694d175903 100644 --- a/src/core/download_manager_delegate_qt.cpp +++ b/src/core/download_manager_delegate_qt.cpp @@ -295,7 +295,7 @@ void DownloadManagerDelegateQt::ChooseSavePath(content::WebContents *web_content ++m_currentId, toQt(web_contents->GetURL()), download::DownloadItem::IN_PROGRESS, - 0, /* totalBytes */ + -1, /* totalBytes */ 0, /* receivedBytes */ QStringLiteral("application/x-mimearchive"), suggestedFilePath, diff --git a/src/webenginewidgets/api/qwebenginedownloaditem.cpp b/src/webenginewidgets/api/qwebenginedownloaditem.cpp index 7366dbf596f..d44b9e4e99b 100644 --- a/src/webenginewidgets/api/qwebenginedownloaditem.cpp +++ b/src/webenginewidgets/api/qwebenginedownloaditem.cpp @@ -465,7 +465,7 @@ QWebEngineDownloadItem::DownloadState QWebEngineDownloadItem::state() const } /*! - Returns the the total amount of data to download in bytes. + Returns the total amount of data to download in bytes. \c -1 means the size is unknown. */ diff --git a/src/webenginewidgets/api/qwebengineprofile.cpp b/src/webenginewidgets/api/qwebengineprofile.cpp index 223d3b114f9..b25055d79e7 100644 --- a/src/webenginewidgets/api/qwebengineprofile.cpp +++ b/src/webenginewidgets/api/qwebengineprofile.cpp @@ -228,6 +228,7 @@ void QWebEngineProfilePrivate::downloadRequested(DownloadItemInfo &info) itemPrivate->downloadState = info.accepted ? QWebEngineDownloadItem::DownloadInProgress : QWebEngineDownloadItem::DownloadRequested; itemPrivate->startTime = info.startTime; + itemPrivate->totalBytes = info.totalBytes; itemPrivate->downloadDirectory = QFileInfo(info.path).path(); itemPrivate->downloadFileName = QFileInfo(info.path).fileName(); itemPrivate->suggestedFileName = info.suggestedFileName; diff --git a/tests/auto/widgets/qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp b/tests/auto/widgets/qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp index 9a3e7b52e45..74082ab8c8a 100644 --- a/tests/auto/widgets/qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp +++ b/tests/auto/widgets/qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp @@ -455,7 +455,7 @@ void tst_QWebEngineDownloadItem::downloadLink() ScopedConnection sc2 = connect(m_profile, &QWebEngineProfile::downloadRequested, [&](QWebEngineDownloadItem *item) { QCOMPARE(item->state(), QWebEngineDownloadItem::DownloadRequested); QCOMPARE(item->isFinished(), false); - QCOMPARE(item->totalBytes(), -1); + QCOMPARE(item->totalBytes(), fileContents.size()); QCOMPARE(item->receivedBytes(), 0); QCOMPARE(item->interruptReason(), QWebEngineDownloadItem::NoReason); QCOMPARE(item->type(), expectedDownloadType(userAction, fileDisposition)); @@ -568,7 +568,7 @@ void tst_QWebEngineDownloadItem::downloadTwoLinks() ScopedConnection sc2 = connect(m_profile, &QWebEngineProfile::downloadRequested, [&](QWebEngineDownloadItem *item) { QCOMPARE(item->state(), QWebEngineDownloadItem::DownloadRequested); QCOMPARE(item->isFinished(), false); - QCOMPARE(item->totalBytes(), -1); + QCOMPARE(item->totalBytes(), 5); // strlen("fileN") QCOMPARE(item->receivedBytes(), 0); QCOMPARE(item->interruptReason(), QWebEngineDownloadItem::NoReason); QCOMPARE(item->savePageFormat(), QWebEngineDownloadItem::UnknownSaveFormat); From c88bbb1b9292b57d0d84bc5880192730a2bbc2ec Mon Sep 17 00:00:00 2001 From: Heikki Halmet Date: Mon, 13 Mar 2023 09:22:59 +0000 Subject: [PATCH 091/132] Blacklist tst_QWebEnginePage::mouseMovementProperties for SLES-15 Task-number: QTBUG-111297 Change-Id: I9ebb917f91459019e339477e5cf153484aa7ef2c Reviewed-by: Allan Sandfeld Jensen --- tests/auto/widgets/qwebenginepage/BLACKLIST | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/auto/widgets/qwebenginepage/BLACKLIST b/tests/auto/widgets/qwebenginepage/BLACKLIST index 2498ed7653e..19c5fc61407 100644 --- a/tests/auto/widgets/qwebenginepage/BLACKLIST +++ b/tests/auto/widgets/qwebenginepage/BLACKLIST @@ -4,3 +4,4 @@ osx [mouseMovementProperties] windows macos # Can't move cursor (QTBUG-76312) +sles-15 # QTBUG-111297 From d15a42baae7141952e91665bed22a7c7cfb54b95 Mon Sep 17 00:00:00 2001 From: Tarja Sundqvist Date: Mon, 13 Mar 2023 09:28:38 +0200 Subject: [PATCH 092/132] Bump version to 5.15.14 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I6d244a6e6bd8fc9a83f542d3a0d54d07067353d2 Reviewed-by: Michael Brüning --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index 572971ee0c2..461e9c7333c 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -5,4 +5,4 @@ QTWEBENGINE_OUT_ROOT = $$shadowed($$PWD) load(qt_build_config) CONFIG += warning_clean -MODULE_VERSION = 5.15.13 +MODULE_VERSION = 5.15.14 From aa1b95661252b8ac334a1d29f820ff5db614c232 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Tue, 18 Apr 2023 11:54:42 +0200 Subject: [PATCH 093/132] Do not allow universal with debug builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With debug and universal intermediate archives will go over 4GB and linking the final library will fail. Task-number: QTBUG-110713 Change-Id: If3280578b280bb95b85f2126e989da208ffa4eb1 Reviewed-by: Michael Brüning --- configure.pri | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure.pri b/configure.pri index e072961f057..3a33bdc820e 100644 --- a/configure.pri +++ b/configure.pri @@ -460,6 +460,10 @@ defineTest(qtwebengine_isMacOsPlatformSupported) { qtwebengine_platformError("requires a macOS SDK version of 10.13 or newer. Current version is $${WEBENGINE_OSX_SDK_PRODUCT_VERSION}.") return(false) } + CONFIG(debug, debug|release):isUniversal(){ + qtwebengine_platformError("Universal builds can not be done with debug configuration due to large binary size.") + return(false) + } return(true) } From 44fb1ebffc11c9e2feb92b169e09a9bdc270ab34 Mon Sep 17 00:00:00 2001 From: Heikki Halmet Date: Tue, 18 Apr 2023 07:26:39 +0000 Subject: [PATCH 094/132] Blacklist TouchInputTest::touchTap for sles 15.4 Task-number: QTBUG-106334 Change-Id: I4bc9e26b353abd2f7cb5debbb090b958913ea8e3 Reviewed-by: Ville Voutilainen --- tests/auto/widgets/touchinput/BLACKLIST | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tests/auto/widgets/touchinput/BLACKLIST diff --git a/tests/auto/widgets/touchinput/BLACKLIST b/tests/auto/widgets/touchinput/BLACKLIST new file mode 100644 index 00000000000..d9e06df8c78 --- /dev/null +++ b/tests/auto/widgets/touchinput/BLACKLIST @@ -0,0 +1,2 @@ +[touchTap] +sles-15.4 # QTBUG-106334 From 372dce37231c9246e73f4cefada69071380e48e8 Mon Sep 17 00:00:00 2001 From: Heikki Halmet Date: Tue, 18 Apr 2023 07:21:16 +0000 Subject: [PATCH 095/132] Fix blacklisting of mouseMovementProperties for sles 15.4 Task-number: QTBUG-111297 Change-Id: Ib4cb42e07f93322dfdbe028d38cdb8c1d025550e Reviewed-by: Allan Sandfeld Jensen Reviewed-by: Ville Voutilainen --- tests/auto/widgets/qwebenginepage/BLACKLIST | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/widgets/qwebenginepage/BLACKLIST b/tests/auto/widgets/qwebenginepage/BLACKLIST index 19c5fc61407..d1425bfd6fc 100644 --- a/tests/auto/widgets/qwebenginepage/BLACKLIST +++ b/tests/auto/widgets/qwebenginepage/BLACKLIST @@ -4,4 +4,4 @@ osx [mouseMovementProperties] windows macos # Can't move cursor (QTBUG-76312) -sles-15 # QTBUG-111297 +sles-15.4 # QTBUG-111297 From ef123933c9537ce1418f0e293d7dbf22f7af9e49 Mon Sep 17 00:00:00 2001 From: Nicolas Deherly Date: Mon, 28 Sep 2020 16:30:30 +0200 Subject: [PATCH 096/132] Fix memory management in QPdfDocument functions All pages that are opened have to be closed, in order to avoid a memory leak. Change-Id: I15c12b2f1b389638d5fe0a58599d9c410a033652 Reviewed-by: Shawn Rutledge (cherry picked from commit 77c489ed4ceb490f33b805e7ba4cd34ef9191db7) Reviewed-by: Qt Cherry-pick Bot --- src/pdf/qpdfdocument.cpp | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/src/pdf/qpdfdocument.cpp b/src/pdf/qpdfdocument.cpp index e4ec363ce50..c07ec90c4d8 100644 --- a/src/pdf/qpdfdocument.cpp +++ b/src/pdf/qpdfdocument.cpp @@ -424,6 +424,8 @@ QRectF QPdfDocumentPrivate::getCharBox(FPDF_TEXTPAGE textPage, double pageHeight QPdfDocumentPrivate::TextPosition QPdfDocumentPrivate::hitTest(int page, QPointF position) { const QPdfMutexLocker lock; + + TextPosition result; FPDF_PAGE pdfPage = FPDF_LoadPage(doc, page); double pageHeight = FPDF_GetPageHeight(pdfPage); FPDF_TEXTPAGE textPage = FPDFText_LoadPage(pdfPage); @@ -440,10 +442,14 @@ QPdfDocumentPrivate::TextPosition QPdfDocumentPrivate::hitTest(int page, QPointF ++hitIndex; } qCDebug(qLcDoc) << "on page" << page << "@" << position << "got char position" << charPos << "index" << hitIndex; - return { charPos, charBox.height(), hitIndex }; + result = { charPos, charBox.height(), hitIndex }; } } - return {}; + + FPDFText_ClosePage(textPage); + FPDF_ClosePage(pdfPage); + + return result; } /*! @@ -789,6 +795,9 @@ QPdfSelection QPdfDocument::getSelection(int page, QPointF start, QPointF end) CharacterHitTolerance, CharacterHitTolerance); int endIndex = FPDFText_GetCharIndexAtPos(textPage, end.x(), pageHeight - end.y(), CharacterHitTolerance, CharacterHitTolerance); + + QPdfSelection result; + if (startIndex >= 0 && endIndex != startIndex) { if (startIndex > endIndex) qSwap(startIndex, endIndex); @@ -815,11 +824,15 @@ QPdfSelection QPdfDocument::getSelection(int page, QPointF start, QPointF end) bounds << QPolygonF(rect); } qCDebug(qLcDoc) << page << start << "->" << end << "found" << startIndex << "->" << endIndex << text; - return QPdfSelection(text, bounds, hull, startIndex, endIndex); + result = QPdfSelection(text, bounds, hull, startIndex, endIndex); + } else { + qCDebug(qLcDoc) << page << start << "->" << end << "nothing found"; } - qCDebug(qLcDoc) << page << start << "->" << end << "nothing found"; - return QPdfSelection(); + FPDFText_ClosePage(textPage); + FPDF_ClosePage(pdfPage); + + return result; } /*! @@ -860,6 +873,10 @@ QPdfSelection QPdfDocument::getSelectionAtIndex(int page, int startIndex, int ma hull = QRectF(d->getCharPosition(textPage, pageHeight, startIndex), QSizeF()); qCDebug(qLcDoc) << "on page" << page << "at index" << startIndex << "maxLength" << maxLength << "got" << text.length() << "chars," << rectCount << "rects within" << hull; + + FPDFText_ClosePage(textPage); + FPDF_ClosePage(pdfPage); + return QPdfSelection(text, bounds, hull, startIndex, startIndex + text.length()); } @@ -890,6 +907,10 @@ QPdfSelection QPdfDocument::getAllText(int page) bounds << QPolygonF(rect); } qCDebug(qLcDoc) << "on page" << page << "got" << count << "chars," << rectCount << "rects within" << hull; + + FPDFText_ClosePage(textPage); + FPDF_ClosePage(pdfPage); + return QPdfSelection(text, bounds, hull, 0, count); } From 645289a9582727bf0f3493d2ec5c07d0a426ed62 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Sat, 15 Apr 2023 15:24:50 +0200 Subject: [PATCH 097/132] Enable accessibility by default on Linux Previously this was disabled unless the QTWEBENGINE_ENABLE_LINUX_ACCESSIBILITY was set, as the debian packaging was always enabling accessibility[1] even if a screen reader was not enabled. This is not the case anymore since 5 years ago[2] and now accessibility will only be enabled if a screen reader is detected. Which is the correct upstream behavior of at-spi2-core. So now enable accessibility unless QTWEBENGINE_ENABLE_LINUX_ACCESSIBILITY is set to 0 [1]: https://salsa.debian.org/a11y-team/at-spi2-core/-/commit/2a99b7b40526bbdf091cc574ec08d86c9a46f405 [2]: https://salsa.debian.org/a11y-team/at-spi2-core/-/commit/fde0bbead6aacefd0b5dcf9f6d36f7f50a2c0f3d Change-Id: Ie5554f8b578dcca87a54dad525ae6a83d6f8f9d8 Reviewed-by: Allan Sandfeld Jensen (cherry picked from commit 8f06b3e970f768f6a5776845c83090f1fc8b0162) --- src/core/accessibility_activation_observer.cpp | 9 +++++---- src/webengine/doc/src/qtwebengine-platform-notes.qdoc | 10 ++++------ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/core/accessibility_activation_observer.cpp b/src/core/accessibility_activation_observer.cpp index 83319084402..b9d73cb6865 100644 --- a/src/core/accessibility_activation_observer.cpp +++ b/src/core/accessibility_activation_observer.cpp @@ -48,12 +48,13 @@ namespace QtWebEngineCore { namespace { bool isAccessibilityEnabled() { - // On Linux accessibility is disabled by default due to performance issues, - // and can be re-enabled by setting the QTWEBENGINE_ENABLE_LINUX_ACCESSIBILITY environment - // variable. For details, see QTBUG-59922. + // On Linux accessibility can be disabled due to performance issues by setting the + // QTWEBENGINE_ENABLE_LINUX_ACCESSIBILITY environment variable to 0. For details, + // see QTBUG-59922. #ifdef Q_OS_LINUX static bool accessibility_enabled - = qEnvironmentVariableIsSet("QTWEBENGINE_ENABLE_LINUX_ACCESSIBILITY"); + = qEnvironmentVariable("QTWEBENGINE_ENABLE_LINUX_ACCESSIBILITY", QLatin1String("1")) + == QLatin1String("1"); #else const bool accessibility_enabled = true; #endif diff --git a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc index e32424eea4b..6b450b98c58 100644 --- a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc +++ b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc @@ -221,13 +221,11 @@ or VoiceOver on \macos. \endlist - Due to some limitations, the Linux QPA plugin almost always reports that accessibility should - be activated. On big HTML pages, this can cause a significant slowdown in rendering speed. + On some old Linux configurations, accessibility can cause a significant slowdown + on large HTML pages. - Because of that, from Qt 5.9 onwards, \QWE accessibility support is disabled by default - on Linux. - It can be re-enabled by setting the \c QTWEBENGINE_ENABLE_LINUX_ACCESSIBILITY environment - variable to a non-empty value. + Because of that, \QWE accessibility support can be disabled on Linux, by setting the + \c QTWEBENGINE_ENABLE_LINUX_ACCESSIBILITY environment variable to 0. \section1 Popups in Fullscreen Applications on Windows Because of a limitation in the Windows compositor, applications that show a fullscreen web From f5251fc9003f650a0172b4f50e7bbb30031cbcc5 Mon Sep 17 00:00:00 2001 From: Sam James Date: Sat, 22 Apr 2023 16:10:13 +0100 Subject: [PATCH 098/132] Fix build with GCC 13 Fixes: QTBUG-111697 Change-Id: Ife05645ae96d1e18727d8d79efbbd64f813b8dcd Reviewed-by: Allan Sandfeld Jensen (cherry picked from commit 778554ec28039dd5ddaf536be9776ea0f6301501) Reviewed-by: Qt Cherry-pick Bot --- src/core/browsing_data_remover_delegate_qt.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/browsing_data_remover_delegate_qt.h b/src/core/browsing_data_remover_delegate_qt.h index a10409f3971..5adfbbe7ebe 100644 --- a/src/core/browsing_data_remover_delegate_qt.h +++ b/src/core/browsing_data_remover_delegate_qt.h @@ -40,6 +40,8 @@ #ifndef BROWSING_DATA_REMOVER_DELEGATE_QT_H #define BROWSING_DATA_REMOVER_DELEGATE_QT_H +#include + #include "content/public/browser/browsing_data_remover_delegate.h" namespace QtWebEngineCore { From 43863f59f4c7fc0f3e89292e7669e9fe4ae67efa Mon Sep 17 00:00:00 2001 From: Tarja Sundqvist Date: Tue, 30 May 2023 18:22:29 +0300 Subject: [PATCH 099/132] Bump version to 5.15.15 Change-Id: Ibdcbbe0375fb93d0deefdab1594634f0f90db994 Reviewed-by: Michal Klocek --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index 461e9c7333c..a56fde9965a 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -5,4 +5,4 @@ QTWEBENGINE_OUT_ROOT = $$shadowed($$PWD) load(qt_build_config) CONFIG += warning_clean -MODULE_VERSION = 5.15.14 +MODULE_VERSION = 5.15.15 From e658807b3f7329160f0017d282aaa280a90e515d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Fri, 23 Jun 2023 16:30:16 +0200 Subject: [PATCH 100/132] Update Chromium MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Submodule src/3rdparty e48df780..1104ce16: * Fixup [Backport] CVE-2023-2935: Type Confusion in V8 * [Backport] Security bug 1447430 * [Backport] CVE-2023-2930: Use after free in Extensions * [Backport] CVE-2023-3079: Type Confusion in V8 * [Backport] CVE-2023-3216: Type Confusion in V8 * [Backport] CVE-2023-2933: Use after free in PDF * [Backport] CVE-2023-2935: Type Confusion in V8 * [Backport] CVE-2023-2932: Use after free in PDF * [Backport] CVE-2023-2931: Use after free in PDF * [Backport] Security bug 1444195 * [Backport] Security bug 1428743 * [Backport] CVE-2023-2721: Use after free in Navigation * Bump V8_PATCH_LEVEL * [Backport] CVE-2023-29469 / Security bug 1433328 * [Backport] Security bug 1423360 * [Backport] CVE-2023-2137: Heap buffer overflow in sqlite * [Backport] Security bug 1427388 * [Backport] CVE-2023-2033: Type Confusion in V8 * [Backport] CVE-2023-1811: Use after free in Frames * [Backport] CVE-2023-1810: Heap buffer overflow in Visuals * [Backport] CVE-2023-1530: Use after free in PDF (2/2) * Fixes for building with GCC-13 * [Backport] CVE-2023-1530: Use after free in PDF (1/2) * [Backport] CVE-2023-1531: Use after free in ANGLE * [Backport] Security bug 1418734 * [Backport] Security bug 1417585 * [Backport] Security bug 1337747 * [Backport] CVE-2023-1534: Out of bounds read in ANGLE * [Backport] CVE-2023-1529: Out of bounds memory access in WebHID * [Backport] CVE-2023-1222: Heap buffer overflow in Web Audio API * [Backport] CVE-2023-1220: Heap buffer overflow in UMA * [Backport] CVE-2023-1219: Heap buffer overflow in Metrics (3/3) * [Backport] CVE-2023-1219: Heap buffer overflow in Metrics (2/3) * [Backport] CVE-2023-1219: Heap buffer overflow in Metrics (1/3) * [Backport] CVE-2023-1217: Stack buffer overflow in Crash reporting * [Backport] CVE-2023-1215: Type Confusion in CSS Fixes: QTBUG-113406 Task-number: QTBUG-114753 Change-Id: I289f68c871c25f2f3c913e6fdcf5bf77bdfaae1e Reviewed-by: Michael Brüning (cherry picked from commit c0b33e73cabeff31ba035932e49d7977880ef9fc) Reviewed-by: Qt Cherry-pick Bot --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index e48df7803c7..1104ce16c83 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit e48df7803c7c98b0b2471c94057d32e44a301ad5 +Subproject commit 1104ce16c83cae1d6f953a96f1968fe2771ae0fb From 290b790fc48fbf4202f169cb95158891eb78d281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Tue, 18 Jul 2023 16:12:18 +0200 Subject: [PATCH 101/132] Update Chromium Sumbodule src/3rdparty 1104ce16..8df91f88: * [Backport] Security bug 1454860 * Further fixes for building with GCC 13 Fixes: QTBUG-114753 Change-Id: I853fd67f0d899de4f6c0c4e5bc7737321423f5d0 Reviewed-by: Michal Klocek (cherry picked from commit 21ddfe15f638a36160cb11d00639c3126c1aed7c) Reviewed-by: Qt Cherry-pick Bot --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 1104ce16c83..8df91f886e7 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 1104ce16c83cae1d6f953a96f1968fe2771ae0fb +Subproject commit 8df91f886e7fffb61408e2426f8a90d763a3b6ea From f9de20ca8375c18d9fc4a153829bbab6c28fe655 Mon Sep 17 00:00:00 2001 From: Tarja Sundqvist Date: Fri, 1 Sep 2023 16:05:47 +0300 Subject: [PATCH 102/132] Bump version to 5.15.16 Change-Id: Iec671f6483c73b501350de7998e7442c2ad319bb Reviewed-by: Michal Klocek --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index a56fde9965a..df88702f8e2 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -5,4 +5,4 @@ QTWEBENGINE_OUT_ROOT = $$shadowed($$PWD) load(qt_build_config) CONFIG += warning_clean -MODULE_VERSION = 5.15.15 +MODULE_VERSION = 5.15.16 From 00c524f3a8c164aed4eaee203f151fb18d5c4e90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Mon, 21 Aug 2023 11:24:47 +0200 Subject: [PATCH 103/132] Update Chromium Submodule src/3rdparty 8df91f88..2cfd5713: * [Backport] Security bug 1465224 * [Backport] Dependency for security bug 1465224 * [Backport] CVE-2023-4071: Heap buffer overflow in Visuals * [Backport] CVE-2023-4076: Use after free in WebRTC * [Backport] CVE-2023-4074: Use after free in Blink Task Scheduling Fixes: QTBUG-115698 Change-Id: I648c395db316cb9e26230a962ecb24ae315d90cf Reviewed-by: Michal Klocek --- CHROMIUM_VERSION | 2 +- src/3rdparty | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION index d293d46b43d..81646cdb462 100644 --- a/CHROMIUM_VERSION +++ b/CHROMIUM_VERSION @@ -1,2 +1,2 @@ Based on Chromium version: 87.0.4280.144 -Patched with security patches up to Chromium version: 108.0.5359.124 +Patched with security patches up to Chromium version: 115.0.5790.170 diff --git a/src/3rdparty b/src/3rdparty index 8df91f886e7..2cfd57139b6 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 8df91f886e7fffb61408e2426f8a90d763a3b6ea +Subproject commit 2cfd57139b67788389176d5b271fae50773e3564 From 855806fefdd52b29e8b15b6a02e263afc21028c8 Mon Sep 17 00:00:00 2001 From: Martin Negyokru Date: Wed, 8 Feb 2023 11:10:59 +0100 Subject: [PATCH 104/132] Add check for system ffmpeg compatibility Chromium uses the 'first_dts' field from AVStream that has been moved out from public api in ffmpeg 5.0. Although some packagers patch their ffmpeg to be compatible with chromium. Add compile time check to test compatibility. Task-number: QTBUG-116553 Change-Id: I7658b9b12cb5122b6485f063edc3280f31fe9273 Reviewed-by: Allan Sandfeld Jensen (cherry picked from commit 7e46ff40ab66cd480b3eb9d82594f402dd8b563e) Reviewed-by: Michal Klocek --- src/buildtools/configure.json | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/buildtools/configure.json b/src/buildtools/configure.json index 88d1790c17c..9e7a0c5704f 100644 --- a/src/buildtools/configure.json +++ b/src/buildtools/configure.json @@ -212,6 +212,27 @@ { "type": "pkgConfig", "args": "libavcodec libavformat libavutil" } ] }, + "webengine-ffmpeg-support": { + "label": "compatible ffmpeg", + "type": "compile", + "test": { + "head": [ + "#include ", + "extern \"C\" {", + "#include ", + "}" + ], + "main": [ + "#if LIBAVFORMAT_VERSION_MAJOR >= 59", + "AVStream stream;", + "auto first_dts = av_stream_get_first_dts(&stream);", + "#endif" + ] + }, + "sources": [ + { "type": "pkgConfig", "args": "libavformat" } + ] + }, "webengine-opus": { "label": "opus", "sources": [ @@ -758,6 +779,11 @@ "type": "warning", "condition": "config.ios && config.simulator && config.device && features.build-qtpdf", "message": "Building fat libray with device and simulator architectures will disable NEON." + }, + { + "type": "fatal", + "condition": "features.webengine-system-ffmpeg && !libs.webengine-ffmpeg-support", + "message": "Unmodified ffmpeg >= 5.0 is not supported. Please configure with -qt-webengine-ffmpeg." } ], "summary": [ From fce588d26d0f064e899f6d56a6b793d73c68abd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Mon, 18 Sep 2023 12:30:43 +0200 Subject: [PATCH 105/132] Update Chromium Submodule src/3rdparty 2cfd5713..f68e3ac2: * FIXUP: [Backport] CVE-2023-4354: Heap buffer overflow in Skia * FIXUP: Disable Windows IME for GPU thread * Bump V8_PATCH_LEVEL * [Backport] CVE-2023-4762: Type Confusion in V8 * [Backport] CVE-2023-4362: Heap buffer overflow in Mojom IDL * [Backport] CVE-2023-4354: Heap buffer overflow in Skia * [Backport] CVE-2023-4351: Use after free in Network * Disable Windows IME for GPU thread * [Backport] CVE-2023-4863: Heap buffer overflow in WebP Fixes: QTBUG-116524 Fixes: QTBUG-117144 Change-Id: I8e760f52f422c34dc0beba80fc820812f3ce682e Reviewed-by: Michal Klocek --- CHROMIUM_VERSION | 2 +- src/3rdparty | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION index 81646cdb462..2951ec0a79a 100644 --- a/CHROMIUM_VERSION +++ b/CHROMIUM_VERSION @@ -1,2 +1,2 @@ Based on Chromium version: 87.0.4280.144 -Patched with security patches up to Chromium version: 115.0.5790.170 +Patched with security patches up to Chromium version: 117.0.5938.63 diff --git a/src/3rdparty b/src/3rdparty index 2cfd57139b6..f68e3ac2eff 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 2cfd57139b67788389176d5b271fae50773e3564 +Subproject commit f68e3ac2eff62ca2161280fdf2b651cb3c10006a From 9289004de25e4745d39eab8ddb2276d98dd51294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Thu, 21 Sep 2023 11:22:28 +0200 Subject: [PATCH 106/132] Update Chromium Submodule src/3rdparty f68e3ac2..851cd7c7: * Fix errors and warnings for perfetto * Remove nodiscard attribute from cpwl_combo_box.h Fixes: QTBUG-117073 Change-Id: I6cf738001eb3a181be6ecd0818441cec1dc755b3 Reviewed-by: Michal Klocek --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index f68e3ac2eff..851cd7c7a07 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit f68e3ac2eff62ca2161280fdf2b651cb3c10006a +Subproject commit 851cd7c7a079fa5da63770c49724036e8338e813 From 33fb26ef7e30f1fe29f2fb77406ab4a65b4f4949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Mon, 25 Sep 2023 14:37:56 +0200 Subject: [PATCH 107/132] Fix handling of external URLs in PDFs The code assumed that the guest view web contents would have a delegate of type WebContentsDelegateQt (as it does in later versions after some refactoring) and, due to the lack of RTTI, called a method that does not exist in GuestViewBase. Fix this for this branch by using the top level web contents' delegate in this case. Fixes: QTBUG-117453 Change-Id: I9d32f145bf83ab68f8ee83a5fefa81c800896536 Reviewed-by: Szabolcs David --- src/core/content_browser_client_qt.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp index 0a444a277e9..e15bd05f39b 100644 --- a/src/core/content_browser_client_qt.cpp +++ b/src/core/content_browser_client_qt.cpp @@ -763,6 +763,15 @@ static void LaunchURL(const GURL& url, protocolHandlerRegistry->IsHandledProtocol(url.scheme())) return; +#if BUILDFLAG(ENABLE_EXTENSIONS) + if (guest_view::GuestViewBase::IsGuest(webContents)) { + // Use parent / top level contents delegate for launching URLs from guest views. + webContents = guest_view::GuestViewBase::GetTopLevelWebContents(webContents); + if (!webContents) + return; + } +#endif //BUILDFLAG(ENABLE_EXTENSIONS) + WebContentsDelegateQt *contentsDelegate = static_cast(webContents->GetDelegate()); contentsDelegate->launchExternalURL(toQt(url), page_transition, is_main_frame, has_user_gesture); } From 74ab83e1695ba6f0214ffd33a38922803939de06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Thu, 2 Nov 2023 22:34:10 +0100 Subject: [PATCH 108/132] Update Chromium Submodule src/3rdparty 851cd7c7..c7ec6a7b: * [Backport] CVE-2023-5482 and CVE-2023-5849 * [Backport] CVE-2023-45853: Buffer overflow in MiniZip (2/2) * [Backport] CVE-2023-45853: Buffer overflow in MiniZip (1/2) * [Backport] Security bug 1478470 * [Backport] Security bug 1472365 and 1472366 * [Backport] CVE-2023-5218: Use after free in Site Isolation * [Backport] Security bug 1486316 * FIXUP: [Backport] [PA] Support 16kb pagesize on Linux+ARM64 * [Backport] Add Intel Meteorlake GPU series type * [Backport] Add Intel Raptorlake GPU series type * [Backport] Add a few missing IntelGpuSeriesTypes in gpu_util.cc * [Backport] Add Intel Alchemist GPU series type * [Backport] Add Alderlake to intel_gpu_series field in gpu control list. * [Backport] Add missing Intel GPU series types. * [Backport] Add Alderlake's GPU to list supporting two NV12 overlay planes. * [Backport] CVE-2023-5217: Heap buffer overflow in vp8 encoding in libvpx * [Backport] Security bug 1479104 * [Backport] [PA] Support 16kb pagesize on Linux+ARM64 * [Backport] Replace uses of re2::StringPiece::set(). * Fix build with GCC 13 Fixes: QTBUG-117143 Fixes: QTBUG-118484 Fixes: QTBUG-118485 Fixes: QTBUG-118686 Change-Id: Id62fc8d696ebdb160ecf5de82abd40b5f4090963 Reviewed-by: Allan Sandfeld Jensen --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 851cd7c7a07..c7ec6a7b06a 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 851cd7c7a079fa5da63770c49724036e8338e813 +Subproject commit c7ec6a7b06afaf38a17c7d28c3f9940187dba4a6 From e09b5e99a749b7368120a88c51e710ea753295ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Sat, 4 Nov 2023 00:59:51 +0100 Subject: [PATCH 109/132] Update Chromium patch level information Change-Id: I8a95921c15935a47dd5eb83fe2d7449951e40002 Reviewed-by: Michal Klocek (cherry picked from commit 981abc612f0a6e3eb4311d8d8305ee2b8e2b4d04) Reviewed-by: Qt Cherry-pick Bot --- CHROMIUM_VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION index 2951ec0a79a..9903dd4da2b 100644 --- a/CHROMIUM_VERSION +++ b/CHROMIUM_VERSION @@ -1,2 +1,2 @@ Based on Chromium version: 87.0.4280.144 -Patched with security patches up to Chromium version: 117.0.5938.63 +Patched with security patches up to Chromium version: 119.0.6045.105 From 4d9691515f99553d8d67781ece49a16039e628a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Thu, 9 Nov 2023 13:02:51 +0100 Subject: [PATCH 110/132] Update Chromium Submodule src/3rdparty c7ec6a7b..207c2ac4: * [Backport] CVE-2023-5996: Use after free in WebAudio Fixes: QTBUG-118894 Change-Id: I1cb42dcd7faa18d73ffe8a5aa4066eb6b2d3216f Reviewed-by: Michal Klocek (cherry picked from commit 224806a7022eed6d5c75b486bec8715a618cb314) Reviewed-by: Qt Cherry-pick Bot --- CHROMIUM_VERSION | 2 +- src/3rdparty | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION index 9903dd4da2b..25f88315da8 100644 --- a/CHROMIUM_VERSION +++ b/CHROMIUM_VERSION @@ -1,2 +1,2 @@ Based on Chromium version: 87.0.4280.144 -Patched with security patches up to Chromium version: 119.0.6045.105 +Patched with security patches up to Chromium version: 119.0.6045.123 diff --git a/src/3rdparty b/src/3rdparty index c7ec6a7b06a..207c2ac45ca 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit c7ec6a7b06afaf38a17c7d28c3f9940187dba4a6 +Subproject commit 207c2ac45ca3386d153770c6b0d2ea2ec21ca880 From 4ada5f53b0f6344ac5b9a8e15f149a207bf39464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Mon, 20 Nov 2023 15:57:07 +0100 Subject: [PATCH 111/132] Update Chromium Submodule src/3rdparty 207c2ac4..ce00f9b5: * [Backport] CVE-2023-6112: Use after free in Navigation * [Backport] CVE-2023-5997: Use after free in Garbage Collection Fixes: QTBUG-119156 Change-Id: Ib46f4bc0e5b6c40c715475660949a91bd51311e7 Reviewed-by: Michal Klocek --- CHROMIUM_VERSION | 2 +- src/3rdparty | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION index 25f88315da8..e9d254ff9f2 100644 --- a/CHROMIUM_VERSION +++ b/CHROMIUM_VERSION @@ -1,2 +1,2 @@ Based on Chromium version: 87.0.4280.144 -Patched with security patches up to Chromium version: 119.0.6045.123 +Patched with security patches up to Chromium version: 119.0.6045.160 diff --git a/src/3rdparty b/src/3rdparty index 207c2ac45ca..ce00f9b5aa7 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 207c2ac45ca3386d153770c6b0d2ea2ec21ca880 +Subproject commit ce00f9b5aa761866b24d6460e10aacb671c92cf0 From 79a4e92cb0c9fc946f81e13b392a04be51d95991 Mon Sep 17 00:00:00 2001 From: Tarja Sundqvist Date: Fri, 24 Nov 2023 17:29:22 +0200 Subject: [PATCH 112/132] Bump version to 5.15.17 Change-Id: I42a1feb7bef7e9207d97186fd1dd168dfcedd54e Reviewed-by: Michal Klocek --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index df88702f8e2..04aa122a8ea 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -5,4 +5,4 @@ QTWEBENGINE_OUT_ROOT = $$shadowed($$PWD) load(qt_build_config) CONFIG += warning_clean -MODULE_VERSION = 5.15.16 +MODULE_VERSION = 5.15.17 From 3a11b38575e6aa929d1e7d5d11d0acf61eae6420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Fri, 8 Dec 2023 10:23:59 +0100 Subject: [PATCH 113/132] Document macos specific build limitations Universal debug or debug-and-release builds are not supported on macos in Qt 5 due to the way universal build support was added there. Change-Id: Iae59dd5fea5c2a46f22e12cbba41bc4a67a93f65 Reviewed-by: Leena Miettinen Reviewed-by: Michal Klocek --- src/webengine/doc/src/qtwebengine-platform-notes.qdoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc index 6b450b98c58..9f75beb8500 100644 --- a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc +++ b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc @@ -126,6 +126,10 @@ \note \QWE cannot be built for the 32-bit mode of \macos (using the \c macx-clang-32 \c mkspec). + \note Universal debug or debug-and-release builds of \QWE on \macos are not supported in Qt 5 + due to memory constraints of the build toolchain. Use the configure options \c -force-debug-info + and \c -separate-debug-info for a build that can be used with a debugger. + \section1 Using Earlier Qt Versions to Build \QWE Building \QWE with earlier Qt versions (down to the last LTS From 71dd46b3790e8b1b1dec40f65aff94ddb467e444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Wed, 6 Mar 2024 22:36:02 +0100 Subject: [PATCH 114/132] Update Chromium Submodule src/3rdparty ce00f9b5..38655f07: * [Backport] Security bug 325296797 * Fixup for: Fixup for [Backport] Security bug 1519980 * [Backport] CVE-2024-1059: Use after free in WebRTC * [Backport] Security bug 1518994 * Fixup for [Backport] Security bug 1519980 * [Backport] CVE-2024-1283: Heap buffer overflow in Skia * [Backport] CVE-2024-1060: Use after free in Canvas * [Backport] CVE-2024-1077: Use after free in Network * [Backport] Security bug 1519980 * [Backport] CVE-2024-0808: Integer underflow in WebUI * [Backport] CVE-2024-0807: Use after free in WebAudio * Fix ffmpeg assembly with newer binutil * [Backport] Security bug 1511689 * [Backport] CVE-2024-0224: Use after free in WebAudio * [Backport] CVE-2023-7024: Heap buffer overflow in WebRTC * [Backport] Security bug 1506535 * [Backport] CVE-2024-0519: Out of bounds memory access in V8 * [Backport] CVE-2024-0518: Type Confusion in V8 * [Backport] CVE-2024-0333: Insufficient data validation in Extensions * [Backport] CVE-2024-0222: Use after free in ANGLE * Fixup: [Backport] Security bug 1488199 * FIXUP: Fix compilation with system ICU * Fixup: [Backport] Security bug 1505632 * [Backport] Security bug 1505632 * [Backport] CVE-2023-6702: Type Confusion in V8 * [Backport] CVE-2023-6345: Integer overflow in Skia * Bump V8_PATCH_LEVEL * [Backport] Security bug 1488199 (2/2) * [Backport] Security bug 1488199 (1/2) * [Backport] CVE-2023-6510: Use after free in Media Capture * Fix building with system libxml2 * [Backport] CVE-2023-6347: Use after free in Mojo Fixes: QTBUG-119853 Fixes: QTBUG-119852 Fixes: QTBUG-121684 Fixes: QTBUG-121848 Fixes: QTBUG-121849 Fixes: QTBUG-122190 Fixes: QTBUG-122935 Fixes: QTBUG-123291 Change-Id: Ia45d57beea1afd543e1c7d0bc6a722e4622bd6ba Reviewed-by: Allan Sandfeld Jensen --- CHROMIUM_VERSION | 2 +- src/3rdparty | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION index e9d254ff9f2..f5351c688ed 100644 --- a/CHROMIUM_VERSION +++ b/CHROMIUM_VERSION @@ -1,2 +1,2 @@ Based on Chromium version: 87.0.4280.144 -Patched with security patches up to Chromium version: 119.0.6045.160 +Patched with security patches up to Chromium version: 122.0.6261.128 diff --git a/src/3rdparty b/src/3rdparty index ce00f9b5aa7..38655f07d8e 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit ce00f9b5aa761866b24d6460e10aacb671c92cf0 +Subproject commit 38655f07d8ef13eb067e3a29bb3a0c2dc0b19716 From 2294cc4ed5fdbaec93792f4f6094a68e2e6a9a8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Mon, 22 Jan 2024 17:02:21 +0100 Subject: [PATCH 115/132] Add option to chose python version for building 5.15 WebEngine [ChangeLog] Adds the configure option --webengine-python-version to allow the user to select the python version for building. Valid options are python2 or python3. The default version will continue to be Python 2. Fixes: QTBUG-117693 Change-Id: Ie12ce78d1d81c49a2c46acc4160c13f766d56fe7 Reviewed-by: Allan Sandfeld Jensen --- config_help.txt | 1 + configure.pri | 37 +++++++++++++++++++++---------- mkspecs/features/functions.prf | 6 ++--- src/3rdparty | 2 +- src/buildtools/config/support.pri | 10 ++++----- src/buildtools/configure.json | 21 +++++++++--------- 6 files changed, 46 insertions(+), 31 deletions(-) diff --git a/config_help.txt b/config_help.txt index 48236c18ab5..d50892121cb 100644 --- a/config_help.txt +++ b/config_help.txt @@ -15,6 +15,7 @@ WebEngine options: (Linux only) -webengine-pepper-plugins ...... Enable use of Pepper Flash and Widevine plugins [auto] + -webengine-python-version ...... Use specific python version for building [python2/python3] -webengine-printing-and-pdf .... Enable use of printing and output to PDF [auto] -webengine-proprietary-codecs .. Enable support for proprietary codecs [no] diff --git a/configure.pri b/configure.pri index 3a33bdc820e..99cdbf72bf9 100644 --- a/configure.pri +++ b/configure.pri @@ -12,12 +12,9 @@ defineTest(isPythonVersionSupported) { python_version ~= s/[()]//g python_version = $$split(python_version, ',') python_major_version = $$first(python_version) - greaterThan(python_major_version, 2) { - qtLog("Python version 3 is not supported by Chromium.") - return(false) - } python_minor_version = $$member(python_version, 1) python_patch_version = $$member(python_version, 2) + greaterThan(python_major_version, 2): greaterThan(python_minor_version, 7): return(true) 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) @@ -52,22 +49,38 @@ defineTest(qtConfReport_jumboBuild) { 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) { + pythonOverride = $$eval(config.input.python_override) + !isEmpty(pythonOverride) { + python = $$qtConfFindInPath("$$pythonOverride$$EXE_SUFFIX") + isEmpty(python) { + qtLog("User selected '$$pythonOverride$$EXE_SUFFIX' was not found in PATH. Giving up.") + return(false) + } } + + win32 { + # the default name of the python 2 executable on windows is just + # python, so try that first + isEmpty(python):python = $$qtConfFindInPath("python$$EXE_SUFFIX") + isEmpty(python):python = $$qtConfFindInPath("python2$$EXE_SUFFIX") + isEmpty(python):python = $$qtConfFindInPath("python3$$EXE_SUFFIX") + } else { + isEmpty(python):python = $$qtConfFindInPath("python2$$EXE_SUFFIX") + isEmpty(python):python = $$qtConfFindInPath("python3$$EXE_SUFFIX") + isEmpty(python):python = $$qtConfFindInPath("python$$EXE_SUFFIX") + } + isEmpty(python) { - qtLog("'python$$EXE_SUFFIX' not found in PATH. Giving up.") + qtLog("Python not found in PATH. Giving up.") return(false) } !isPythonVersionSupported($$python) { - qtLog("A suitable Python 2 executable could not be located.") + qtLog("A suitable Python executable could not be located.") return(false) } - # Make tests.python2.location available in configure.json. + # Make tests.python.location available in configure.json. $${1}.location = $$clean_path($$python) export($${1}.location) $${1}.cache += location diff --git a/mkspecs/features/functions.prf b/mkspecs/features/functions.prf index 7f630588a10..65500776bfe 100644 --- a/mkspecs/features/functions.prf +++ b/mkspecs/features/functions.prf @@ -44,11 +44,11 @@ defineReplace(which) { # Returns the unquoted path to the python executable. defineReplace(pythonPath) { - isEmpty(QMAKE_PYTHON2) { + isEmpty(QMAKE_PYTHON) { # Fallback for building QtWebEngine with Qt < 5.8 - QMAKE_PYTHON2 = python + QMAKE_PYTHON = python } - return($$QMAKE_PYTHON2) + return($$QMAKE_PYTHON) } # Returns the python executable for use with shell / make targets. diff --git a/src/3rdparty b/src/3rdparty index 38655f07d8e..68302c9ea15 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 38655f07d8ef13eb067e3a29bb3a0c2dc0b19716 +Subproject commit 68302c9ea158fbc83cd28570a0560e5a892b45e8 diff --git a/src/buildtools/config/support.pri b/src/buildtools/config/support.pri index e7f869a15f9..a9df3d2432c 100644 --- a/src/buildtools/config/support.pri +++ b/src/buildtools/config/support.pri @@ -21,7 +21,7 @@ defineReplace(qtwebengine_checkWebEngineCoreError) { !qtwebengine_checkForGperf(QtWebEngine):return(false) !qtwebengine_checkForBison(QtWebEngine):return(false) !qtwebengine_checkForFlex(QtWebEngine):return(false) - !qtwebengine_checkForPython2(QtWebEngine):return(false) + !qtwebengine_checkForPython(QtWebEngine):return(false) !qtwebengine_checkForNodejs(QtWebEngine):return(false) !qtwebengine_checkForSanitizer(QtWebEngine):return(false) linux:!qtwebengine_checkForPkgCfg(QtWebEngine):return(false) @@ -51,7 +51,7 @@ defineReplace(qtwebengine_checkPdfError) { !qtwebengine_checkForGperf(QtPdf):return(false) !qtwebengine_checkForBison(QtPdf):return(false) !qtwebengine_checkForFlex(QtPdf):return(false) - !qtwebengine_checkForPython2(QtPdf):return(false) + !qtwebengine_checkForPython(QtPdf):return(false) !qtwebengine_checkForSanitizer(QtPdf):return(false) linux:!qtwebengine_checkForPkgCfg(QtPdf):return(false) linux:!qtwebengine_checkForHostPkgCfg(QtPdf):return(false) @@ -143,10 +143,10 @@ defineTest(qtwebengine_checkForFlex) { return(true) } -defineTest(qtwebengine_checkForPython2) { +defineTest(qtwebengine_checkForPython) { module = $$1 - !qtConfig(webengine-python2) { - qtwebengine_skipBuild("Python version 2 (2.7.5 or later) is required to build $${module}.") + !qtConfig(webengine-python) { + qtwebengine_skipBuild("Python version 2 (2.7.5 or later) or Python version 3 (3.6 or later) is required to build $${module}.") return(false) } return(true) diff --git a/src/buildtools/configure.json b/src/buildtools/configure.json index 9e7a0c5704f..17fc6510658 100644 --- a/src/buildtools/configure.json +++ b/src/buildtools/configure.json @@ -10,7 +10,8 @@ "options": { "build-qtwebengine-core": "boolean", "build-qtpdf": "boolean", - "webengine-jumbo-build": { "type": "optionalString", "name": "merge_limit"} + "webengine-jumbo-build": { "type": "optionalString", "name": "merge_limit"}, + "webengine-python-version": { "type": "optionalString", "name": "python_override", "values": ["python2", "python3"] } } }, "libraries": { @@ -316,9 +317,9 @@ "label": "system ninja", "type": "detectNinja" }, - "webengine-python2": { - "label": "python2", - "type": "detectPython2", + "webengine-python": { + "label": "python", + "type": "detectPython", "log": "location" }, "webengine-winversion": { @@ -395,7 +396,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) @@ -421,7 +422,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) @@ -444,12 +445,12 @@ "autoDetect": "features.private_tests", "output": [ "privateFeature" ] }, - "webengine-python2": { - "label": "python2", - "condition": "tests.webengine-python2", + "webengine-python": { + "label": "python", + "condition": "tests.webengine-python", "output": [ "privateFeature", - { "type": "varAssign", "name": "QMAKE_PYTHON2", "value": "tests.webengine-python2.location" } + { "type": "varAssign", "name": "QMAKE_PYTHON", "value": "tests.webengine-python.location" } ] }, "webengine-gperf": { From ece335f5a4d5b7029a9a10567901b0ffc2bb2704 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Tue, 26 Mar 2024 15:49:22 +0100 Subject: [PATCH 116/132] Update Chromium Submodule src/3rdparty 68302c9e..fdfef5b3: * [Backport] Security bug 41495984 * CVE-2023-710 Fixes: QTBUG-123779 Change-Id: I25ae76cb3f39fa4a3e2bf116f3eb84ac767c59d0 Reviewed-by: Allan Sandfeld Jensen --- CHROMIUM_VERSION | 2 +- src/3rdparty | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION index f5351c688ed..cfc4c49b38d 100644 --- a/CHROMIUM_VERSION +++ b/CHROMIUM_VERSION @@ -1,2 +1,2 @@ Based on Chromium version: 87.0.4280.144 -Patched with security patches up to Chromium version: 122.0.6261.128 +Patched with security patches up to Chromium version: 123.0.6312.58 diff --git a/src/3rdparty b/src/3rdparty index 68302c9ea15..fdfef5b37af 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 68302c9ea158fbc83cd28570a0560e5a892b45e8 +Subproject commit fdfef5b37af3bed8402d7c7e20a5487f2602b0a6 From 2a380a997ca6a5c4d1d2b531831d392877389f99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Wed, 3 Apr 2024 11:31:09 +0200 Subject: [PATCH 117/132] Fixup "Add option to chose python version for building 5.15 WebEngine" It caused conflicts in top-level windows builds due to duplicate names for python tests. Change-Id: I869d7a87a8c562f9bf601fa9545d9a40df2a4166 Reviewed-by: Allan Sandfeld Jensen (cherry picked from commit 17fd3176988586168bee8654008a097a5f23ec1d) Reviewed-by: Qt Cherry-pick Bot --- configure.pri | 2 +- mkspecs/features/functions.prf | 6 +++--- src/buildtools/configure.json | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/configure.pri b/configure.pri index 99cdbf72bf9..cb53c93b0aa 100644 --- a/configure.pri +++ b/configure.pri @@ -49,7 +49,7 @@ defineTest(qtConfReport_jumboBuild) { qtConfReportPadded($${1}, $$mergeLimit) } -defineTest(qtConfTest_detectPython) { +defineTest(qtConfTest_detectPython2) { pythonOverride = $$eval(config.input.python_override) !isEmpty(pythonOverride) { python = $$qtConfFindInPath("$$pythonOverride$$EXE_SUFFIX") diff --git a/mkspecs/features/functions.prf b/mkspecs/features/functions.prf index 65500776bfe..7f630588a10 100644 --- a/mkspecs/features/functions.prf +++ b/mkspecs/features/functions.prf @@ -44,11 +44,11 @@ defineReplace(which) { # Returns the unquoted path to the python executable. defineReplace(pythonPath) { - isEmpty(QMAKE_PYTHON) { + isEmpty(QMAKE_PYTHON2) { # Fallback for building QtWebEngine with Qt < 5.8 - QMAKE_PYTHON = python + QMAKE_PYTHON2 = python } - return($$QMAKE_PYTHON) + return($$QMAKE_PYTHON2) } # Returns the python executable for use with shell / make targets. diff --git a/src/buildtools/configure.json b/src/buildtools/configure.json index 17fc6510658..5e5d9d725e9 100644 --- a/src/buildtools/configure.json +++ b/src/buildtools/configure.json @@ -318,8 +318,8 @@ "type": "detectNinja" }, "webengine-python": { - "label": "python", - "type": "detectPython", + "label": "python2", + "type": "detectPython2", "log": "location" }, "webengine-winversion": { @@ -446,11 +446,11 @@ "output": [ "privateFeature" ] }, "webengine-python": { - "label": "python", + "label": "python2", "condition": "tests.webengine-python", "output": [ "privateFeature", - { "type": "varAssign", "name": "QMAKE_PYTHON", "value": "tests.webengine-python.location" } + { "type": "varAssign", "name": "QMAKE_PYTHON2", "value": "tests.webengine-python.location" } ] }, "webengine-gperf": { From 63d4e58009c7f069ace14b64f1528ba2664272e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Wed, 10 Apr 2024 12:34:44 +0200 Subject: [PATCH 118/132] Fix build errors with -no-opengl configuration Add the proper compile time guards around the usages of OpenGL specific methods that were missing them. Fixes: QTBUG-123058 Change-Id: If9545b7565b69c7a4c5d183754b3750a3c6c1298 Reviewed-by: Peter Varga --- src/core/compositor/content_gpu_client_qt.cpp | 2 ++ src/core/ozone/gl_context_qt.cpp | 4 +++- src/core/web_engine_context.cpp | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/core/compositor/content_gpu_client_qt.cpp b/src/core/compositor/content_gpu_client_qt.cpp index 8d7d5bce528..2c0f7854839 100644 --- a/src/core/compositor/content_gpu_client_qt.cpp +++ b/src/core/compositor/content_gpu_client_qt.cpp @@ -52,9 +52,11 @@ #include #include +#if QT_CONFIG(opengl) QT_BEGIN_NAMESPACE Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context(); QT_END_NAMESPACE +#endif namespace QtWebEngineCore { diff --git a/src/core/ozone/gl_context_qt.cpp b/src/core/ozone/gl_context_qt.cpp index 9a24f6bf4a3..0e7213a3a89 100644 --- a/src/core/ozone/gl_context_qt.cpp +++ b/src/core/ozone/gl_context_qt.cpp @@ -51,8 +51,10 @@ #endif QT_BEGIN_NAMESPACE - +#if QT_CONFIG(opengl) Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context(); +#endif + GLContextHelper* GLContextHelper::contextHelper = 0; namespace { diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index eb459fbdc35..184f78c3bed 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -637,6 +637,7 @@ WebEngineContext::WebEngineContext() parsedCommandLine->AppendSwitch(switches::kEnableThreadedCompositing); +#if QT_CONFIG(opengl) #if defined(Q_OS_WIN) // This switch is used in Chromium's gl_context_wgl.cc file to determine whether to create // an OpenGL Core Profile context. If the switch is not set, it would always try to create a @@ -659,7 +660,8 @@ WebEngineContext::WebEngineContext() if (isDesktopGLOrSoftware || isGLES2Context) parsedCommandLine->AppendSwitch(switches::kDisableES3GLContext); -#endif +#endif // defined(Q_OS_WIN) +#endif // QT_CONFIG(opengl) // Do not advertise a feature we have removed at compile time parsedCommandLine->AppendSwitch(switches::kDisableSpeechAPI); From d45daa1d1fe3311c6c588b8a0be846679d30278b Mon Sep 17 00:00:00 2001 From: Tarja Sundqvist Date: Tue, 9 Jul 2024 16:15:13 +0300 Subject: [PATCH 119/132] Bump version to 5.15.18 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I940f5b327ab8fa98210fa8ac1d40039fa89698fa Reviewed-by: Michael Brüning --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index 04aa122a8ea..ad143c731ce 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -5,4 +5,4 @@ QTWEBENGINE_OUT_ROOT = $$shadowed($$PWD) load(qt_build_config) CONFIG += warning_clean -MODULE_VERSION = 5.15.17 +MODULE_VERSION = 5.15.18 From 16b714e29a15d2e22d80243cebc1030b1cb59641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Thu, 26 Sep 2024 14:43:49 +0200 Subject: [PATCH 120/132] Update Chromium Submodule src/3rdaprty fdfef5b3..d11884dd: * FIXUP: [Backport] CVE-2024-7965: Inappropriate implementation in V8 * Fix building with Python 3 on Windows * [Backport] CVE-2024-45492 / Security bug 364778067 (3/3) * [Backport] CVE-2024-45491 / Security bug 364778067 (2/3) * [Backport] CVE-2024-45490 / Security bug 364778067 (1/3) * [Backport] CVE-2024-9123: Integer overflow in Skia * [Backport] CVE-2024-5158: Type Confusion in V8 * [Backport] CVE-2024-7971: Type confusion in V8 * [Backport] CVE-2024-4761: Out of bounds write in V8 * [Backport] CVE-2024-8636: Heap buffer overflow in Skia * [Backport] CVE-2024-8198: Heap buffer overflow in Skia * [Backport] Security bug 346799730 * [Backport] CVE-2024-7967: Heap buffer overflow in Fonts (3/3) * [Backport] CVE-2024-7967: Heap buffer overflow in Fonts (2/3) * [Backport] CVE-2024-7967: Heap buffer overflow in Fonts (1/3) * [Backport] CVE-2024-7965: Inappropriate implementation in V8 * [Backport] CVE-2024-7532: Out of bounds memory access in ANGLE (2/2) * [Backport] CVE-2024-7532: Out of bounds memory access in ANGLE (1/2) * Fix build with GCC 15 * [Backport] CVE-2024-7536: Use after free in WebAudio * [Backport] Dependency for CVE-2024-7536 * [Backport] Security bug 338574384 * [Backport] CVE-2024-6996: Race in Frames * [Backport] CVE-2024-6989: Use after free in Loader * [Backport] CVE-2024-6291: Use after free in Swiftshader * [Backport] CVE-2024-5846: Use after free in PDFium * [Backport] Security bug 340606786 * [Backport] CVE-2024-5496: Use after free in Media Session * [Backport] Dependency for CVE-2024-3914 * [Backport] Security bug 329699609 * [Backport] CVE-2024-3914: Use after free in V8 (2/2) * [Backport] CVE-2024-3914: Use after free in V8 (1/2) * [Backport] CVE-2024-4558: Use after free in ANGLE * [Backport] Security bug 327698060 * [Backport] CVE-2024-4058: Type Confusion in ANGLE * [Backport] Security bug 40940917 * [Backport] CVE-2024-3837: Use after free in QUIC * [Backport] CVE-2024-3839: Out of bounds read in Fonts * Fix dependecy when compiling content/browser * [Backport] CVE-2024-3516: Heap buffer overflow in ANGLE * [Backport] CVE-2024-3157: Out of bounds write in Compositing * [Backport] Security bug 329674887 (2/2) * [Backport] Security bug 329674887 (1/2) * Prevent duplicate definition of blink::ResolveColor in jumbo builds Fixes: QTBUG-124697 Fixes: QTBUG-124717 Fixes: QTBUG-125269 Fixes: QTBUG-125270 Fixes: QTBUG-125425 Fixes: QTBUG-125948 Fixes: QTBUG-126027 Fixes: QTBUG-129247 Fixes: QTBUG-129248 Fixes: QTBUG-129249 Fixes: QTBUG-129250 Fixes: QTBUG-129046 Fixes: QTBUG-129051 Fixes: QTBUG-129273 Fixes: QTBUG-129274 Fixes: QTBUG-129275 Fixes: QTBUG-129276 Fixes: QTBUG-129277 Fixes: QTBUG-129077 Fixes: QTBUG-129313 Change-Id: I08248cbb0aef5dacf7f29ae24eb88b5919e54593 Reviewed-by: Allan Sandfeld Jensen --- CHROMIUM_VERSION | 2 +- src/3rdparty | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION index cfc4c49b38d..35fd1470bd5 100644 --- a/CHROMIUM_VERSION +++ b/CHROMIUM_VERSION @@ -1,2 +1,2 @@ Based on Chromium version: 87.0.4280.144 -Patched with security patches up to Chromium version: 123.0.6312.58 +Patched with security patches up to Chromium version: 129.0.6668.70 diff --git a/src/3rdparty b/src/3rdparty index fdfef5b37af..d11884ddfc4 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit fdfef5b37af3bed8402d7c7e20a5487f2602b0a6 +Subproject commit d11884ddfc41ebc812db74cac4a6bfea7fd0990d From a46419ae8551eace954353d4ad84345b37ab67e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Thu, 17 Oct 2024 10:18:07 +0200 Subject: [PATCH 121/132] Update Chromium Submodule src/3rdparty d11884dd..85337c28: * [Backport] CVE-2024-9602: Type Confusion in V8 * [Backport] CVE-2024-9603: Type Confusion in V8 Fixes: QTBUG-129075 Fixes: QTBUG-130169 Fixes: QTBUG-130171 Change-Id: Ib8a4244464cf2812c3bd370bafab438210617bd0 Reviewed-by: Michal Klocek (cherry picked from commit 87ceb6a2ef5ee25d56f765dc533728c4ca4787e0) Reviewed-by: Qt Cherry-pick Bot --- CHROMIUM_VERSION | 2 +- src/3rdparty | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION index 35fd1470bd5..7fa7f736571 100644 --- a/CHROMIUM_VERSION +++ b/CHROMIUM_VERSION @@ -1,2 +1,2 @@ Based on Chromium version: 87.0.4280.144 -Patched with security patches up to Chromium version: 129.0.6668.70 +Patched with security patches up to Chromium version: 130.0.6723.59 diff --git a/src/3rdparty b/src/3rdparty index d11884ddfc4..85337c28bae 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit d11884ddfc41ebc812db74cac4a6bfea7fd0990d +Subproject commit 85337c28bae7d7d2c79282c4f4c92435cd7649b8 From 49e34d3acdaff3a4b8ebe1d9165f24255704860f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Fri, 25 Oct 2024 12:25:31 +0200 Subject: [PATCH 122/132] Update Chromium Submodule src/3rdparty 85337c28..4df08bfa: * [Backport] CVE-2024-10229: Inappropriate implementation in Extensions * Fix remaining uses of Python 2 only syntax Fixes: QTBUG-130487 Fixes: QTBUG-130631 Change-Id: If26ccc6f06c3a3b9329692f5ccaf13f6ef4bb136 Reviewed-by: Allan Sandfeld Jensen Reviewed-by: Tero Heikkinen --- CHROMIUM_VERSION | 2 +- src/3rdparty | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION index 7fa7f736571..29e12466487 100644 --- a/CHROMIUM_VERSION +++ b/CHROMIUM_VERSION @@ -1,2 +1,2 @@ Based on Chromium version: 87.0.4280.144 -Patched with security patches up to Chromium version: 130.0.6723.59 +Patched with security patches up to Chromium version: 130.0.6723.70 diff --git a/src/3rdparty b/src/3rdparty index 85337c28bae..4df08bfa3bf 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 85337c28bae7d7d2c79282c4f4c92435cd7649b8 +Subproject commit 4df08bfa3bf4ae9d3f49b7d27b5faeb757721c44 From 6c684f1641beeb8cc79d7258edb957d71d912a35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Mon, 4 Nov 2024 14:59:31 +0100 Subject: [PATCH 123/132] Update Chromium Submodule src/3rdparty 4df08bfa..1b7db6c5: * Fixup: Fix remaining uses of Python 2 only syntax Fixes: QTBUG-130631 Change-Id: Ib2819807ae4a9f4e7643a1223a742acb4dde1a61 Reviewed-by: Anu Aliyas --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 4df08bfa3bf..1b7db6c5586 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 4df08bfa3bf4ae9d3f49b7d27b5faeb757721c44 +Subproject commit 1b7db6c55868144f9c44d87a48097716d67f32b9 From 4b7673d7ae19cf3dd8c18d987954048a6635b02e Mon Sep 17 00:00:00 2001 From: Tarja Sundqvist Date: Tue, 12 Nov 2024 17:03:59 +0200 Subject: [PATCH 124/132] Bump version to 5.15.19 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I0de4e6ab6373252145c7811103df56209cfb8d60 Reviewed-by: Michael Brüning --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index ad143c731ce..716f138c91d 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -5,4 +5,4 @@ QTWEBENGINE_OUT_ROOT = $$shadowed($$PWD) load(qt_build_config) CONFIG += warning_clean -MODULE_VERSION = 5.15.18 +MODULE_VERSION = 5.15.19 From 61b04b5a527efa5b4aef7bbbd1394b10282fe4aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Wed, 13 Nov 2024 10:47:40 +0100 Subject: [PATCH 125/132] Update Chromium Submodule src/3rdparty 1b7db6c5..a5e30300: * Fixup: [Backport] CVE-2024-10827: Use after free in Serial * Fix windows build with Python 3 * [Backport] CVE-2024-10827: Use after free in Serial Fixes: QTBUG-130925 Change-Id: I24b709be6d4858eab87275bb24e971abbd83c778 Reviewed-by: Anu Aliyas --- CHROMIUM_VERSION | 2 +- src/3rdparty | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION index 29e12466487..47f9c983b60 100644 --- a/CHROMIUM_VERSION +++ b/CHROMIUM_VERSION @@ -1,2 +1,2 @@ Based on Chromium version: 87.0.4280.144 -Patched with security patches up to Chromium version: 130.0.6723.70 +Patched with security patches up to Chromium version: 130.0.6723.116 diff --git a/src/3rdparty b/src/3rdparty index 1b7db6c5586..a5e3030056f 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 1b7db6c55868144f9c44d87a48097716d67f32b9 +Subproject commit a5e3030056f7a1470067ad6460ab2f0ee6f9c0a4 From cd7a1b8486a1559eb41b425eead9bf067dcb6843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Thu, 28 Nov 2024 09:50:18 +0100 Subject: [PATCH 126/132] Update Chromium Submodule src/3rdparty a5e30300..6f51e530: * Fix remaining scripts for Windows Python 3 build Fixes: QTBUG-131693 Change-Id: I4a71d7d77354bd5430a36ab734fe00cea9f64bb0 Reviewed-by: Anu Aliyas Reviewed-by: Tero Heikkinen --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index a5e3030056f..6f51e530ff6 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit a5e3030056f7a1470067ad6460ab2f0ee6f9c0a4 +Subproject commit 6f51e530ff6ed285088ea1aaddc129decd9b0c41 From 9a16262bc87bbf327e988e18c49ab0f47b766fe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Wed, 4 Dec 2024 11:46:17 +0100 Subject: [PATCH 127/132] Update Chromium Submodule src/3rdparty 6f51e530..536a6b4d: * [Backport] Security bug 378701682 Fixes: QTBUG-131876 Fixes: QTBUG-131877 Fixes: QTBUG-131878 Change-Id: I67a20633062ef2802850536ffa865421f6813b5b Reviewed-by: Anu Aliyas --- CHROMIUM_VERSION | 2 +- src/3rdparty | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION index 47f9c983b60..dbf226173c8 100644 --- a/CHROMIUM_VERSION +++ b/CHROMIUM_VERSION @@ -1,2 +1,2 @@ Based on Chromium version: 87.0.4280.144 -Patched with security patches up to Chromium version: 130.0.6723.116 +Patched with security patches up to Chromium version: 131.0.6778.108 diff --git a/src/3rdparty b/src/3rdparty index 6f51e530ff6..536a6b4d228 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 6f51e530ff6ed285088ea1aaddc129decd9b0c41 +Subproject commit 536a6b4d22832a993e50618cb9c44b5fd9a56f0f From 2ef64fc25b1032c3094d3e67be82db5fc4b7f728 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Mon, 24 Mar 2025 15:28:09 +0100 Subject: [PATCH 128/132] Update Chromium MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Submodule src/3rdparty 2f69baf4..d78119de * [fixup] Allow MAP_DROPPABLE memory mappings in Linux sandbox * Revert "[Backport] Make bitfields only as wide as necessary for enums" * Allow MAP_DROPPABLE memory mappings in Linux sandbox * Fix build with python 3.12/3.13 * [backport] Fixes for python 3.12 * [backport] Fix builds with pyhton 3.12 * [Backport] Security bug 384565015 * [Backport] Security bug 382135228 * [Backport] CVE-2024-12694: Use after free in Compositing * Fix harfbuzz/freetype build on macOS / clang 16 * Fix clang 16 build on macOS * [Backport] Make bitfields only as wide as necessary for enums Fixes: QTBUG-132676 Fixes: QTBUG-132677 Change-Id: I99edbc13feb57665ad8cd530ed2baa2bb953e98d Reviewed-by: Michael Brüning --- CHROMIUM_VERSION | 2 +- src/3rdparty | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION index dbf226173c8..4a2829eef5f 100644 --- a/CHROMIUM_VERSION +++ b/CHROMIUM_VERSION @@ -1,2 +1,2 @@ Based on Chromium version: 87.0.4280.144 -Patched with security patches up to Chromium version: 131.0.6778.108 +Patched with security patches up to Chromium version: 131.0.6778.265 diff --git a/src/3rdparty b/src/3rdparty index 536a6b4d228..d78119de816 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 536a6b4d22832a993e50618cb9c44b5fd9a56f0f +Subproject commit d78119de816b92f66dafaf097c3f9223ebdeeb0a From 16633b07c32eeb9955183802b9d399cde572e45c Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Fri, 4 Apr 2025 08:22:17 +0200 Subject: [PATCH 129/132] Update Chromium MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Submodule src/3rdparty d78119de..031ba58f * [Backport] CVE-2025-0436: Integer overflow in Skia * [Backport] CVE-2024-11477 / Security bug 383772517 * [Backport] CVE-2025-0996: Inappropriate implementation in Browser UI * [Backport] CVE-2025-1426: Heap buffer overflow in GPU * [Backport] Security bug 396481096 * [Backport] CVE-2025-0762: Use after free in DevTools * [Backport] CVE-2025-0999: Heap buffer overflow in V8 Fixes: QTBUG-135479 Fixes: QTBUG-135568 Fixes: QTBUG-133898 Fixes: QTBUG-133897 Fixes: QTBUG-133896 Fixes: QTBUG-134134 Change-Id: I4270f0a9e8666aa211f2a0d1e841d59a941b5dc1 Reviewed-by: Michael Brüning --- CHROMIUM_VERSION | 2 +- src/3rdparty | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION index 4a2829eef5f..f1f2b258a76 100644 --- a/CHROMIUM_VERSION +++ b/CHROMIUM_VERSION @@ -1,2 +1,2 @@ Based on Chromium version: 87.0.4280.144 -Patched with security patches up to Chromium version: 131.0.6778.265 +Patched with security patches up to Chromium version: 133.0.6943.141 diff --git a/src/3rdparty b/src/3rdparty index d78119de816..031ba58f785 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit d78119de816b92f66dafaf097c3f9223ebdeeb0a +Subproject commit 031ba58f785e2355830c938a792e99889010b65f From badd899444e3eb597323864c4885493dea51564b Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Wed, 9 Apr 2025 17:49:56 +0200 Subject: [PATCH 130/132] qmake: Fix qmake2cmake parsing issue for 5.15 SBOM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The double colon confuses the qmake2cmake parser grammar. Change-Id: I354d7ec5eed77e508a5f853f5314437c3f017345 Reviewed-by: Michael Brüning --- src/pdf/pdf.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pdf/pdf.pro b/src/pdf/pdf.pro index fedcc9bde8b..6f95a55fd85 100644 --- a/src/pdf/pdf.pro +++ b/src/pdf/pdf.pro @@ -19,7 +19,7 @@ isUniversal() { pdfcore.depends += pdfcore_prl_generator } -!qtConfig(webengine-qtpdf-support):qtConfig(build-qtpdf)::!build_pass { +!qtConfig(webengine-qtpdf-support):qtConfig(build-qtpdf):!build_pass { !qtwebengine_makeCheckPdfError() { errorbuild.commands = @echo $$shell_quote("QtPdf will not be built. $${skipBuildReason}") } else { From 6aaafb2f0b31240c4ebc39d185be37a45094dd6d Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Wed, 16 Apr 2025 11:27:08 +0200 Subject: [PATCH 131/132] Update Chromium Submodule src/3rdparty 031ba58f..09913b0f * [Backport] CVE-2024-55549: Fix UAF related to excluded namespaces * [Backport] CVE-2025-24855 Fix use-after-free of XPath context node * [backport] CVE-2025-1919 * [Backport] Dependency for CVE-2025-2783 (1/2) * [Backport] Dependency for CVE-2025-2783 (2/2) * [Backport] CVE-2025-2783: Incorrect handle provided in unspecified circumstances in Mojo on Windows * [backport] CVE-2025-24201 1/2 * [backport] CVE-2025-24201 2/2 * [backport] CVE-2025-2136 Fixes: QTBUG-135576 Fixes: QTBUG-135575 Fixes: QTBUG-135999 Fixes: QTBUG-136000 Change-Id: I327fbf8e5d69bb24f8ce7e4cd0094001330e0d94 Reviewed-by: Anu Aliyas --- CHROMIUM_VERSION | 2 +- src/3rdparty | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION index f1f2b258a76..f30dc2dbd45 100644 --- a/CHROMIUM_VERSION +++ b/CHROMIUM_VERSION @@ -1,2 +1,2 @@ Based on Chromium version: 87.0.4280.144 -Patched with security patches up to Chromium version: 133.0.6943.141 +Patched with security patches up to Chromium version: 134.0.6998.177 diff --git a/src/3rdparty b/src/3rdparty index 031ba58f785..09913b0fe74 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 031ba58f785e2355830c938a792e99889010b65f +Subproject commit 09913b0fe745af3d3afb2fdc34131c8cb7cf0961 From a5d11cd6f8c487443c15c7e3a6cd8090b65cb313 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Tue, 22 Apr 2025 15:00:44 +0200 Subject: [PATCH 132/132] Update Chromium MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Submodule src/3rdparty 09913b0f..6d29e9cf * [fixup] Security bug 396460489 * [backport] CVE-2025-3619 * [Backport] Security bug 396460489 * [Backport] Security bug 399002829 Fixes: QTBUG-135425 Fixes: QTBUG-136041 Change-Id: I4d08bf1bc093d3bb046b272ce5a4921edaa58d4c Reviewed-by: Michael Brüning --- CHROMIUM_VERSION | 2 +- src/3rdparty | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION index f30dc2dbd45..b6d2fbfd3a3 100644 --- a/CHROMIUM_VERSION +++ b/CHROMIUM_VERSION @@ -1,2 +1,2 @@ Based on Chromium version: 87.0.4280.144 -Patched with security patches up to Chromium version: 134.0.6998.177 +Patched with security patches up to Chromium version: 135.0.7049.95 diff --git a/src/3rdparty b/src/3rdparty index 09913b0fe74..6d29e9cfcff 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 09913b0fe745af3d3afb2fdc34131c8cb7cf0961 +Subproject commit 6d29e9cfcfffa7632cc3858ceaf8940677ba9c91