From f067d1ddd6eb0f69152bcff742865ae527d3c8ad Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Tue, 26 Jul 2022 17:57:55 -0700 Subject: [PATCH] browser(webkit): disabled threded scrolling on WPE (#15964) --- browser_patches/webkit/BUILD_NUMBER | 4 +-- browser_patches/webkit/patches/bootstrap.diff | 35 +++++++++++++------ 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/browser_patches/webkit/BUILD_NUMBER b/browser_patches/webkit/BUILD_NUMBER index b20d27df99..6422d6231c 100644 --- a/browser_patches/webkit/BUILD_NUMBER +++ b/browser_patches/webkit/BUILD_NUMBER @@ -1,2 +1,2 @@ -1690 -Changed: lushnikov@chromium.org Tue Jul 26 17:42:25 MSK 2022 +1691 +Changed: yurys@chromium.org Tue 26 Jul 2022 12:38:57 PM PDT diff --git a/browser_patches/webkit/patches/bootstrap.diff b/browser_patches/webkit/patches/bootstrap.diff index 497f08a3d5..e3bab38597 100644 --- a/browser_patches/webkit/patches/bootstrap.diff +++ b/browser_patches/webkit/patches/bootstrap.diff @@ -2282,7 +2282,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 @@ NS_ASSUME_NONNULL_BEGIN +@@ -198,6 +198,7 @@ - (void)sendEndIfNeeded - (void)speechRecognizer:(SFSpeechRecognizer *)speechRecognizer availabilityDidChange:(BOOL)available { @@ -2290,7 +2290,7 @@ index a941d76a4f748718df1e3cff2a6c5e0827f48891..f62db5a27ac0e4c12430e7d19e60c83d ASSERT(isMainThread()); if (available || !_task) -@@ -211,6 +212,7 @@ NS_ASSUME_NONNULL_BEGIN +@@ -211,6 +212,7 @@ - (void)speechRecognizer:(SFSpeechRecognizer *)speechRecognizer availabilityDidC - (void)speechRecognitionTask:(SFSpeechRecognitionTask *)task didHypothesizeTranscription:(SFTranscription *)transcription { @@ -2298,7 +2298,7 @@ index a941d76a4f748718df1e3cff2a6c5e0827f48891..f62db5a27ac0e4c12430e7d19e60c83d ASSERT(isMainThread()); [self sendSpeechStartIfNeeded]; -@@ -219,6 +221,7 @@ NS_ASSUME_NONNULL_BEGIN +@@ -219,6 +221,7 @@ - (void)speechRecognitionTask:(SFSpeechRecognitionTask *)task didHypothesizeTran - (void)speechRecognitionTask:(SFSpeechRecognitionTask *)task didFinishRecognition:(SFSpeechRecognitionResult *)recognitionResult { @@ -2306,7 +2306,7 @@ index a941d76a4f748718df1e3cff2a6c5e0827f48891..f62db5a27ac0e4c12430e7d19e60c83d ASSERT(isMainThread()); [self callbackWithTranscriptions:recognitionResult.transcriptions isFinal:YES]; -@@ -230,6 +233,7 @@ NS_ASSUME_NONNULL_BEGIN +@@ -230,6 +233,7 @@ - (void)speechRecognitionTask:(SFSpeechRecognitionTask *)task didFinishRecogniti - (void)speechRecognitionTaskWasCancelled:(SFSpeechRecognitionTask *)task { @@ -9160,7 +9160,7 @@ diff --git a/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm b/Source/ index 1dc6df3e1145332a0aeb902c0f5d7d5d727593be..230d268489a52391f7d4f336d22311e35c9f8278 100644 --- a/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm +++ b/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm -@@ -720,7 +720,7 @@ void NetworkSessionCocoa::setClientAuditToken(const WebCore::AuthenticationChall +@@ -720,7 +720,7 @@ - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didRece if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) { sessionCocoa->setClientAuditToken(challenge); @@ -10577,7 +10577,7 @@ index 42efb8882044e4a3272d6cdccff47c33ee6fcfb7..ac503cd703c81f89fc04bcb2954b2d17 #import #import #import -@@ -234,6 +235,11 @@ static WallTime toSystemClockTime(NSDate *date) +@@ -234,6 +235,11 @@ - (void)removeDataOfTypes:(NSSet *)dataTypes modifiedSince:(NSDate *)date comple }); } @@ -10756,7 +10756,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 @@ +@@ -257,6 +257,16 @@ - (BOOL)processSwapsOnNavigation return _processPoolConfiguration->processSwapsOnNavigation(); } @@ -11400,6 +11400,21 @@ index 7c08a13e10c75677452b74f52be2b447a5edaa13..56cf11581d453e8234f0957828083ee7 WKWPE::View& m_view; }; +diff --git a/Source/WebKit/UIProcess/API/wpe/WPEView.cpp b/Source/WebKit/UIProcess/API/wpe/WPEView.cpp +index 2e034517065800329d351bc0dd911a8d99f0eca5..4c4dc72c124e8af0a9f62914de8636a2ff95b936 100644 +--- a/Source/WebKit/UIProcess/API/wpe/WPEView.cpp ++++ b/Source/WebKit/UIProcess/API/wpe/WPEView.cpp +@@ -64,7 +64,9 @@ View::View(struct wpe_view_backend* backend, const API::PageConfiguration& baseC + if (preferences) { + preferences->setAcceleratedCompositingEnabled(true); + preferences->setForceCompositingMode(true); +- preferences->setThreadedScrollingEnabled(true); ++ // Playwright override begin ++ preferences->setThreadedScrollingEnabled(false); ++ // Playwright override end + preferences->setWebGLEnabled(true); + } + diff --git a/Source/WebKit/UIProcess/API/wpe/WebKitBrowserInspector.h b/Source/WebKit/UIProcess/API/wpe/WebKitBrowserInspector.h new file mode 100644 index 0000000000000000000000000000000000000000..cb1a540d341b07581ec87b922b7d007ce45ba989 @@ -21079,7 +21094,7 @@ diff --git a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm b/Source/WebKitLegac index 81093dca5a3f4cf8fa7a71551b9d7b11d7513d9e..0e62bc13f72397239c80bfbc3a272286d1fcb39f 100644 --- a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm +++ b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm -@@ -4205,7 +4205,7 @@ static BOOL currentScrollIsBlit(NSView *clipView) +@@ -4205,7 +4205,7 @@ - (void)mouseDown:(WebEvent *)event _private->handlingMouseDownEvent = NO; } @@ -21092,7 +21107,7 @@ diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/ma index f57ff1862f7bc2d2e88710c7b43d62b78b1765a0..fdcf7866546515473fe579333184d9400d1f6bb6 100644 --- a/Source/WebKitLegacy/mac/WebView/WebView.mm +++ b/Source/WebKitLegacy/mac/WebView/WebView.mm -@@ -4038,7 +4038,7 @@ IGNORE_WARNINGS_END +@@ -4038,7 +4038,7 @@ + (void)_doNotStartObservingNetworkReachability } #endif // PLATFORM(IOS_FAMILY) @@ -21101,7 +21116,7 @@ index f57ff1862f7bc2d2e88710c7b43d62b78b1765a0..fdcf7866546515473fe579333184d940 - (NSArray *)_touchEventRegions { -@@ -4080,7 +4080,7 @@ IGNORE_WARNINGS_END +@@ -4080,7 +4080,7 @@ - (NSArray *)_touchEventRegions }).autorelease(); }