browser(webkit): fix Ubuntu arm64 build of WebKit (#14753)

Pretty diff: 91e063b839

Credits go to @dpino!

Fixes #14236
This commit is contained in:
Andrey Lushnikov 2022-06-10 02:08:26 -07:00 коммит произвёл GitHub
Родитель 060cd9d97c
Коммит e866267917
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 96 добавлений и 16 удалений

Просмотреть файл

@ -1,2 +1,2 @@
1663
Changed: yurys@chromium.org Thu 09 Jun 2022 12:18:53 PM PDT
1664
Changed: lushnikov@chromium.org Fri Jun 10 12:05:37 +03 2022

Просмотреть файл

@ -2238,7 +2238,7 @@ diff --git a/Source/WebCore/Modules/speech/cocoa/WebSpeechRecognizerTask.mm b/So
index a941d76a4f748718df1e3cff2a6c5e0827f48891..f62db5a27ac0e4c12430e7d19e60c83d768ace22 100644
--- a/Source/WebCore/Modules/speech/cocoa/WebSpeechRecognizerTask.mm
+++ b/Source/WebCore/Modules/speech/cocoa/WebSpeechRecognizerTask.mm
@@ -198,6 +198,7 @@ - (void)sendEndIfNeeded
@@ -198,6 +198,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)speechRecognizer:(SFSpeechRecognizer *)speechRecognizer availabilityDidChange:(BOOL)available
{
@ -2246,7 +2246,7 @@ index a941d76a4f748718df1e3cff2a6c5e0827f48891..f62db5a27ac0e4c12430e7d19e60c83d
ASSERT(isMainThread());
if (available || !_task)
@@ -211,6 +212,7 @@ - (void)speechRecognizer:(SFSpeechRecognizer *)speechRecognizer availabilityDidC
@@ -211,6 +212,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)speechRecognitionTask:(SFSpeechRecognitionTask *)task didHypothesizeTranscription:(SFTranscription *)transcription
{
@ -2254,7 +2254,7 @@ index a941d76a4f748718df1e3cff2a6c5e0827f48891..f62db5a27ac0e4c12430e7d19e60c83d
ASSERT(isMainThread());
[self sendSpeechStartIfNeeded];
@@ -219,6 +221,7 @@ - (void)speechRecognitionTask:(SFSpeechRecognitionTask *)task didHypothesizeTran
@@ -219,6 +221,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)speechRecognitionTask:(SFSpeechRecognitionTask *)task didFinishRecognition:(SFSpeechRecognitionResult *)recognitionResult
{
@ -2262,7 +2262,7 @@ index a941d76a4f748718df1e3cff2a6c5e0827f48891..f62db5a27ac0e4c12430e7d19e60c83d
ASSERT(isMainThread());
[self callbackWithTranscriptions:recognitionResult.transcriptions isFinal:YES];
@@ -230,6 +233,7 @@ - (void)speechRecognitionTask:(SFSpeechRecognitionTask *)task didFinishRecogniti
@@ -230,6 +233,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)speechRecognitionTaskWasCancelled:(SFSpeechRecognitionTask *)task
{
@ -8829,7 +8829,7 @@ diff --git a/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm b/Source/
index 8b32817b6c0efbcbd221dc7a3ebe420b42d8b51d..a468653cffcfaca8824e94d628c48b7b5d61e164 100644
--- a/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
+++ b/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
@@ -720,7 +720,7 @@ - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didRece
@@ -720,7 +720,7 @@ void NetworkSessionCocoa::setClientAuditToken(const WebCore::AuthenticationChall
if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {
sessionCocoa->setClientAuditToken(challenge);
@ -10239,7 +10239,7 @@ index b8bf936e2eb8ca4dc0f445099dfb899395950bdb..30a2af76de0daac450c7afbb8a2dfe81
#import <WebCore/Credential.h>
#import <WebCore/RegistrationDatabase.h>
#import <WebCore/ServiceWorkerClientData.h>
@@ -234,6 +235,11 @@ - (void)removeDataOfTypes:(NSSet *)dataTypes modifiedSince:(NSDate *)date comple
@@ -234,6 +235,11 @@ static WallTime toSystemClockTime(NSDate *date)
});
}
@ -10418,7 +10418,7 @@ diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm b/
index 2e235bb880c638a0e74256b6d66cb0244ea0a3f1..3471eebb47e860f7c2071d0e7f2691c9f0a6355d 100644
--- a/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm
+++ b/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm
@@ -257,6 +257,16 @@ - (BOOL)processSwapsOnNavigation
@@ -257,6 +257,16 @@
return _processPoolConfiguration->processSwapsOnNavigation();
}
@ -20670,7 +20670,7 @@ diff --git a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm b/Source/WebKitLegac
index 5fa2c59e5e93bc923d37ae5bb751e2f4d7fe68ee..73378254b62a7ec61b3efc3fd46aadaf45d55601 100644
--- a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
@@ -4189,7 +4189,7 @@ - (void)mouseDown:(WebEvent *)event
@@ -4189,7 +4189,7 @@ static BOOL currentScrollIsBlit(NSView *clipView)
_private->handlingMouseDownEvent = NO;
}
@ -20683,7 +20683,7 @@ diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/ma
index 59cecf9242ab834dadc904ef295365e1476f47f9..ca4cc96e62df62e92c22c3535f5972cc1fdc4cba 100644
--- a/Source/WebKitLegacy/mac/WebView/WebView.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebView.mm
@@ -4039,7 +4039,7 @@ + (void)_doNotStartObservingNetworkReachability
@@ -4039,7 +4039,7 @@ IGNORE_WARNINGS_END
}
#endif // PLATFORM(IOS_FAMILY)
@ -20692,7 +20692,7 @@ index 59cecf9242ab834dadc904ef295365e1476f47f9..ca4cc96e62df62e92c22c3535f5972cc
- (NSArray *)_touchEventRegions
{
@@ -4081,7 +4081,7 @@ - (NSArray *)_touchEventRegions
@@ -4081,7 +4081,7 @@ IGNORE_WARNINGS_END
}).autorelease();
}
@ -22884,7 +22884,7 @@ index 3eb911ba48eca35de2de9ee671cb577a0a96ec27..916b45a541486e59380d66b524a004a7
<dependencies>
<dep package="glib"/>
diff --git a/Tools/jhbuild/jhbuild-minimal.modules b/Tools/jhbuild/jhbuild-minimal.modules
index a08c829f49b43d494a09c40f71606735c172b6a5..2e3704d8533ff6e479ee2ee8f9325929591ed4e3 100644
index a08c829f49b43d494a09c40f71606735c172b6a5..49403c27d67b40e5ae0fb4cf294d835cfdaf37c6 100644
--- a/Tools/jhbuild/jhbuild-minimal.modules
+++ b/Tools/jhbuild/jhbuild-minimal.modules
@@ -22,7 +22,6 @@
@ -22912,7 +22912,41 @@ index a08c829f49b43d494a09c40f71606735c172b6a5..2e3704d8533ff6e479ee2ee8f9325929
</distutils>
<!-- OpenXR required for WebXR support -->
@@ -187,9 +186,9 @@
@@ -175,21 +174,34 @@
</branch>
</meson>
- <meson id="glib-networking"
- mesonargs="-Dgnutls=disabled -Dopenssl=enabled">
- <dependencies>
- <dep package="glib"/>
- </dependencies>
- <branch module="/sources/glib-networking/2.70/glib-networking-${version}.tar.xz" version="2.70.0"
- repo="download.gnome.org"
- hash="sha256:66b408e7afa86c582fe38963db56133869ab4b57d34e48ec56aba621940d6f35"/>
- </meson>
+ <if condition-set="use_openssl_backend">
+ <meson id="glib-networking"
+ mesonargs="-Dgnutls=disabled -Dopenssl=enabled">
+ <dependencies>
+ <dep package="glib"/>
+ </dependencies>
+ <branch module="/sources/glib-networking/2.70/glib-networking-${version}.tar.xz" version="2.70.0"
+ repo="download.gnome.org"
+ hash="sha256:66b408e7afa86c582fe38963db56133869ab4b57d34e48ec56aba621940d6f35"/>
+ </meson>
+ </if>
+
+ <if condition-unset="use_openssl_backend">
+ <meson id="glib-networking">
+ <dependencies>
+ <dep package="glib"/>
+ </dependencies>
+ <branch module="/sources/glib-networking/2.70/glib-networking-${version}.tar.xz" version="2.70.0"
+ repo="download.gnome.org"
+ hash="sha256:66b408e7afa86c582fe38963db56133869ab4b57d34e48ec56aba621940d6f35"/>
+ </meson>
+ </if>
<!-- atk needed to build with A11y support -->
<meson id="atk" mesonargs="-Dintrospection=false">
@ -22924,7 +22958,7 @@ index a08c829f49b43d494a09c40f71606735c172b6a5..2e3704d8533ff6e479ee2ee8f9325929
<dependencies>
<dep package="glib"/>
</dependencies>
@@ -197,9 +196,9 @@
@@ -197,9 +209,9 @@
<!-- at-spi2-core needed to build with A11y support -->
<meson id="at-spi2-core" mesonargs="-Dintrospection=no -Dx11=no">
@ -22936,7 +22970,7 @@ index a08c829f49b43d494a09c40f71606735c172b6a5..2e3704d8533ff6e479ee2ee8f9325929
</branch>
<dependencies>
<dep package="glib"/>
@@ -207,10 +206,10 @@
@@ -207,10 +219,10 @@
</meson>
<!-- at-spi2-atk needed to build with A11y support -->
@ -22950,6 +22984,52 @@ index a08c829f49b43d494a09c40f71606735c172b6a5..2e3704d8533ff6e479ee2ee8f9325929
</branch>
<dependencies>
<dep package="glib"/>
diff --git a/Tools/jhbuild/jhbuildrc_common.py b/Tools/jhbuild/jhbuildrc_common.py
index 814abef097120d8f0b99ce7b05a43dc014597248..af7f117efe5f754ad655897ae62980cff9fed885 100644
--- a/Tools/jhbuild/jhbuildrc_common.py
+++ b/Tools/jhbuild/jhbuildrc_common.py
@@ -19,7 +19,7 @@ import multiprocessing
import sys
import os
import platform
-
+import re
script_dir = None
@@ -35,6 +35,24 @@ def top_level_path(*args):
return os.path.join(*((os.path.join(os.path.dirname(__file__), '..', '..'),) + args))
+def gnutls_version():
+ ret = {}
+ gnutls = "/usr/include/gnutls/gnutls.h"
+ with open(gnutls) as fd:
+ for l in fd.readlines():
+ m = re.match(r'#define\s+GNUTLS_VERSION_([A-Z]+)\s+(\d)', l)
+ if m:
+ key, value = m.group(1), m.group(2)
+ ret[key.lower()] = int(value)
+ fd.close()
+ return ret
+
+
+def use_openssl_backend():
+ v = gnutls_version()
+ return v["major"] < 3 and v["minor"] < 6 and v["patch"] < 13
+
+
def init(jhbuildrc_globals, jhbuild_platform):
__tools_directory = os.path.join(os.path.dirname(__file__), "../", jhbuild_platform)
@@ -100,3 +118,7 @@ def init(jhbuildrc_globals, jhbuild_platform):
jhbuild_enable_thunder = os.environ['JHBUILD_ENABLE_THUNDER'].lower()
if jhbuild_enable_thunder == 'yes' or jhbuild_enable_thunder == '1' or jhbuild_enable_thunder == 'true':
jhbuildrc_globals['conditions'].add('Thunder')
+
+ if use_openssl_backend():
+ jhbuildrc_globals['conditions'].add('use_openssl_backend')
+
diff --git a/Tools/win/DLLLauncher/DLLLauncherMain.cpp b/Tools/win/DLLLauncher/DLLLauncherMain.cpp
index 52605867b9302d1afcc56c5e9b0c54acf0827900..6edf24ab60249241ba2969531ef55f4b495dce9e 100644
--- a/Tools/win/DLLLauncher/DLLLauncherMain.cpp