2021-03-18 Adrian Perez de Castro Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.30.6 release * wpe/NEWS: Add release notes for 2.30.6. 2021-03-18 Adrian Perez de Castro Unreviewed non-unified build fixes * GPUProcess/media/RemoteMediaResourceLoader.cpp: * NetworkProcess/webrtc/NetworkRTCProvider.cpp: 2021-03-18 Carlos Garcia Campos Unreviewed. Update OptionsGTK.cmake and NEWS for 2.30.6 release * gtk/NEWS: Add release notes for 2.30.6. 2020-09-09 Brady Eidson Make sure WKWebsiteDataStore operations reuse existing process pools even when all WKWebViews have closed. and https://bugs.webkit.org/show_bug.cgi?id=216317 Reviewed by Geoffrey Garen. Covered by new API test. When WebsiteDataStores are gathering all the NetworkProcesses they might need to message, they miss some obvious candidates if there are no longer any related WKWebViews. Fix that by tracking which sessions a NetworkProcess knows about. * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::addSession): (WebKit::NetworkProcessProxy::hasSession const): (WebKit::NetworkProcessProxy::removeSession): * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::isAssociatedProcessPool const): 2020-08-13 Chris Dumez REGRESSION (r260684): Messages YouTube inline video: after Multitasking away and Back, Audio is heard but icon indicates "muted" https://bugs.webkit.org/show_bug.cgi?id=215453 Reviewed by Tim Horton. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::setIsDoingSnapshotSequence): (WebKit::WebPageProxy::setShouldFireEvents): Deleted. * UIProcess/WebPageProxy.h: * UIProcess/ios/WKApplicationStateTrackingView.mm: (-[WKApplicationStateTrackingView _willBeginSnapshotSequence]): (-[WKApplicationStateTrackingView _didCompleteSnapshotSequence]): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setIsDoingSnapshotSequence): (WebKit::WebPage::setShouldFireEvents): Deleted. * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: 2021-02-12 Adrian Perez de Castro Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.30.5 release * wpe/NEWS: Add release notes for 2.30.5. 2021-02-11 Carlos Garcia Campos Unreviewed. Update OptionsGTK.cmake and NEWS for 2.30.5 release * gtk/NEWS: Add release notes for 2.30.5. 2021-01-19 Lauro Moura REGRESSION(r271580) [GTK] LTS/Debian build failure due to unsupported g-ir-scanner parameter https://bugs.webkit.org/show_bug.cgi?id=220730 Reviewed by Philippe Normand. No new behavior. No new tests. * PlatformGTK.cmake: Expose --sources-top-dirs only if available. 2021-01-18 Michael Catanzaro [GTK] Multilib conflicts in gir files https://bugs.webkit.org/show_bug.cgi?id=220636 Reviewed by Carlos Garcia Campos. By passing --sources-top-dirs to g-ir-scanner, we ensure all paths in the generated gir files are relative to the toplevel builddir. This avoids multilib conflicts when the builddir contains the target architecture. * PlatformGTK.cmake: 2020-12-27 Jim Mason [GTK] WebKitPluginProcess is built but not installed https://bugs.webkit.org/show_bug.cgi?id=220154 Reviewed by Carlos Garcia Campos. * CMakeLists.txt: 2020-12-15 Adrian Perez de Castro Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.30.4 release * wpe/NEWS: Add release notes for 2.30.4. 2020-12-15 Carlos Garcia Campos Unreviewed. Update OptionsGTK.cmake and NEWS for 2.30.4 release * gtk/NEWS: Add release notes for 2.30.4. 2020-12-15 Carlos Garcia Campos [SOUP] WebSockets: wrong data sent in some cases with libsoup < 2.68 https://bugs.webkit.org/show_bug.cgi?id=219850 Reviewed by Michael Catanzaro. We are using soup_websocket_connection_send_text() when libsoup < 2.68, which expects a null terminated string, but we are receiving a IPC::DataReference that needs to be converted to a null terminated string by taking into account its size. * NetworkProcess/soup/WebSocketTaskSoup.cpp: (WebKit::WebSocketTask::sendString): 2020-11-03 Stephan Szabo [WinCairo/PlayStation] ICU 68.1 no longer exposes FALSE and TRUE macros by default https://bugs.webkit.org/show_bug.cgi?id=218522 Reviewed by Don Olmstead. * UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp: Replace FALSE with false 2020-11-20 Adrian Perez de Castro Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.30.3 release * wpe/NEWS: Add release notes for 2.30.3. 2020-11-20 Carlos Garcia Campos Unreviewed. Update OptionsGTK.cmake and NEWS for 2.30.3 release * gtk/NEWS: Add release notes for 2.30.3. 2020-11-19 Carlos Garcia Campos Protect WebSocketChannel before calling client methods https://bugs.webkit.org/show_bug.cgi?id=216791 Reviewed by Youenn Fablet. Ensure we keep a reference to the WebSocketChannel before calling client methods that might close the channel. * WebProcess/Network/WebSocketChannel.cpp: (WebKit::WebSocketChannel::close): (WebKit::WebSocketChannel::fail): (WebKit::WebSocketChannel::didClose): (WebKit::WebSocketChannel::resume): 2020-11-13 Miguel Gomez [GTK][WPE] CSS backdrop overlay corners are not rounded on results.webkit.org https://bugs.webkit.org/show_bug.cgi?id=215445 Reviewed by Carlos Garcia Campos. Pass the backdropFiltersRect from the state to TextureMapperLayer. * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: (WebKit::CoordinatedGraphicsScene::updateSceneState): 2020-10-23 Miguel Gomez [GTK][WPE] Implement antialiased rounded rectangle clipping in TextureMapper https://bugs.webkit.org/show_bug.cgi?id=174457 Reviewed by Carlos Garcia Campos. Use the new TextureMapper::beginClip() method that receives a FloatRoundedRect. * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext): 2020-11-10 Carlos Garcia Campos [GTK] Crash in WebKit::DropTarget::drop https://bugs.webkit.org/show_bug.cgi?id=217482 Reviewed by Michael Catanzaro. If we don't have selection data when drop is called, just return early to let leave continue. Also change accept() to receive the drop context and position to be set after leaving any previous operation. * UIProcess/API/gtk/DropTarget.h: * UIProcess/API/gtk/DropTargetGtk3.cpp: (WebKit::DropTarget::DropTarget): (WebKit::DropTarget::accept): (WebKit::DropTarget::drop): * UIProcess/API/gtk/DropTargetGtk4.cpp: (WebKit::DropTarget::DropTarget): (WebKit::DropTarget::accept): 2020-11-06 Milan Crha [GTK] Application cannot override drag&drop callbacks https://bugs.webkit.org/show_bug.cgi?id=218562 Reviewed by Michael Catanzaro. * UIProcess/API/gtk/DropTargetGtk3.cpp: (WebKit::DropTarget::DropTarget): Use g_signal_connect_after(), thus any descendants can override the callbacks. (WebKit::DropTarget::didPerformAction): Always call gdk_drag_status(), to have gtk+ notified about drag progress. 2020-11-06 Michael Catanzaro [GTK] dlopen libWPEBackend-fdo-1.0.so.1 instead of libWPEBackend-fdo-1.0.so https://bugs.webkit.org/show_bug.cgi?id=218584 Reviewed by Carlos Garcia Campos. wpe_loader_init() tries to dlopen a development symlink, but these will not usually be installed. It only works in the GNOME flatpak runtime because we don't use devel split rules in the GNOME runtime, but we really ought to, and freedesktop-sdk already does, so it's going to break upstream too once that gets implemented. It's easier for everyone if we tackle this now. Since all major distros except Arch Linux use devel split, this patch is really required for almost every distro to use WPE renderer. The downside is that this makes it harder to update the wpebackend-fdo library version, since minor changes there will now unnecessarily break WebKit. This is not good, but it's better than forcing distros to apply this same patch downstream. I considered trying a bunch of different library versions in a loop in order to maximize the chance of success in case the wpebackend-fdo library version increases in the future, but it's probably nicer to just be careful about not changing its library version until we find a better solution for this. * UIProcess/glib/WebProcessPoolGLib.cpp: (WebKit::WebProcessPool::platformInitializeWebProcess): 2020-11-13 Adrian Perez de Castro [GTK][WPE] Build broken in stable 2.30.x releases with ENABLE_VIDEO=OFF https://bugs.webkit.org/show_bug.cgi?id=218921 Reviewed by Carlos Garcia Campos. * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Use ENABLE(VIDEO) guard to prevent usage of function which does not get compiled in when video support disabled 2020-10-23 Adrian Perez de Castro Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.30.2 release * wpe/NEWS: Add release notes for 2.30.2. 2020-10-23 Carlos Garcia Campos Unreviewed. Update OptionsGTK.cmake and NEWS for 2.30.2 release * gtk/NEWS: Add release notes for 2.30.2. 2020-10-02 Alexander Mikhaylenko [GTK] WPE and backend versions are mixed up in webkit://gpu https://bugs.webkit.org/show_bug.cgi?id=217210 Reviewed by Adrian Perez de Castro. * UIProcess/API/glib/WebKitProtocolHandler.cpp: (WebKit::WebKitProtocolHandler::handleGPU): 2020-10-14 Sergio Villar Senin [GLIB] Fix linking error for systems not providing https://bugs.webkit.org/show_bug.cgi?id=217514 Reviewed by Carlos Garcia Campos. * UIProcess/Launcher/glib/BubblewrapLauncher.cpp: Unconditionally check for which should always exist instead of . Also define the fallback with syscall() only for linux systems (as it requires ). 2020-10-15 Chris Lord [GTK][WPE] Add support for smooth scrolling animation with async scrolling https://bugs.webkit.org/show_bug.cgi?id=210382 Reviewed by Carlos Garcia Campos. Add hasPreciseScrollingDeltas to GTK/WPE wheel events. No new tests needed. * Shared/WebEventConversion.cpp: (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent): * Shared/WebWheelEvent.cpp: (WebKit::WebWheelEvent::WebWheelEvent): (WebKit::WebWheelEvent::encode const): (WebKit::WebWheelEvent::decode): * Shared/WebWheelEvent.h: * Shared/WebWheelEventCoalescer.cpp: (WebKit::WebWheelEventCoalescer::canCoalesce): (WebKit::WebWheelEventCoalescer::coalesce): * Shared/gtk/NativeWebWheelEventGtk.cpp: (WebKit::NativeWebWheelEvent::NativeWebWheelEvent): * Shared/gtk/WebEventFactory.cpp: (WebKit::WebEventFactory::createWebWheelEvent): * Shared/libwpe/WebEventFactory.cpp: (WebKit::WebEventFactory::createWebWheelEvent): 2020-10-23 Michael Catanzaro [SOUP] Fix crash in WebSocketTask https://bugs.webkit.org/show_bug.cgi?id=217892 Reviewed by Carlos Garcia Campos. The WebSocketTask connects to the "starting" signal of its SoupMessage and never disconnects this signal, which is only safe if it is guaranteed to outlive its SoupMessage. However, it is not. We crash when the signal is emitted after the WebSocketTask is destroyed. To solve this, we just need to disconnect the signal when required. Normally that would be done in the destructor, but the WebSocketTask drops its ownership of the SoupMessage prior to that point, so we need to disconnect on each possible paths. * NetworkProcess/soup/WebSocketTaskSoup.cpp: (WebKit::WebSocketTask::~WebSocketTask): (WebKit::WebSocketTask::didConnect): (WebKit::WebSocketTask::didFail): 2020-10-10 Adrian Perez de Castro [GTK] Build broken with ENABLE_GAMEPAD enabled https://bugs.webkit.org/show_bug.cgi?id=217226 Reviewed by Darin Adler. * UIProcess/Gamepad/UIGamepadProvider.h: Mark class as final, because the destructor is final itself. * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::numberOfConnectedGamepadsForTesting): Reorganize PLATFORM(MAC) guards to use GameControllerGamepadProvider only on macOS, as it is unavailable on other ports. * WebProcess/Gamepad/WebGamepadProvider.h: Mark class as final, because the destructor is final itself. 2020-09-27 Carlos Garcia Campos [SOUP] WebSocket: cookies set in request don't appear in the inspector https://bugs.webkit.org/show_bug.cgi?id=217012 Reviewed by Michael Catanzaro. Cookies are set by libsoup and we are notifying about the handshake being sent before the cookie header is added to the request. * NetworkProcess/soup/WebSocketTaskSoup.cpp: (WebKit::WebSocketTask::WebSocketTask): Connect to SoupMessage::starting to notify the web process the handshake request has been sent. 2020-09-26 Carlos Garcia Campos [SOUP] Do not set site for cookies twice in case of redirection https://bugs.webkit.org/show_bug.cgi?id=217010 Reviewed by Michael Catanzaro. ResourceRequest::updateSoupMessage() already fills the same site information, but we are duplicating the code in NetworkDataTaskSoup::continueHTTPRedirection(). * NetworkProcess/soup/NetworkDataTaskSoup.cpp: (WebKit::NetworkDataTaskSoup::continueHTTPRedirection): Do not set same site information here, it will be done again in NetworkDataTaskSoup::createRequest(). 2020-09-21 Adrian Perez de Castro Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.30.1 release * wpe/NEWS: Add release notes for 2.30.1. 2020-09-21 Carlos Garcia Campos Unreviewed. Update OptionsGTK.cmake and NEWS for 2.30.1 release * gtk/NEWS: Add release notes for 2.30.1. 2020-09-18 Carlos Garcia Campos [GTK] Epiphany does not make connections in Incognito Mode after clearing .cache https://bugs.webkit.org/show_bug.cgi?id=216430 Reviewed by Adrian Perez de Castro. The problem is that when using an ephemeral context, the download is started before the ephemeral session has been registered in the network process, so it's just ignored. * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::createDownloadProxy): Pass the given WebsiteDataStore to ensureNetworkProcess(). 2020-02-04 Carlos Garcia Campos Unreviewed. [GTK] Add an env var to force single process model WEBKIT_USE_SINGLE_WEB_PROCESS=1 can be used to force the single process model when PSON is disabled. This is a temporary solution for applications still depending on the single process mode behavior. It will be only available in 2.28 series. * UIProcess/API/glib/WebKitWebContext.cpp: (webkitWebContextConstructed): 2020-09-11 Adrian Perez de Castro Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.30.0 release * wpe/NEWS: Add release notes for 2.30.0 2020-09-11 Carlos Garcia Campos Unreviewed. Update OptionsGTK.cmake and NEWS for 2.30.0 release * gtk/NEWS: Add release notes for 2.30.0 2020-09-08 Mike Gorse [GTK] AcceleratedBackingStoreWayland might erroneously try to use SHM with older wpebackend-fdo https://bugs.webkit.org/show_bug.cgi?id=216254 Reviewed by Adrian Perez de Castro. * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: (WebKit::tryInitializeSHM): Return false for wpebackend-fdo < 1.7.0. 2020-09-07 Mike Gorse Build failure; cannot find seccomp.h https://bugs.webkit.org/show_bug.cgi?id=216226 Reviewed by Darin Adler. No new tests (build fix only). * PlatformGTK.cmake: Add LIBSECCOMP_INCLUDE_DIRS to WebKit_SYSTEM_INCLUDE_DIRECTORIES. 2020-09-04 Adrian Perez de Castro Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.29.91 release * wpe/NEWS: Add release notes for the 2.29.91 release. 2020-09-04 Carlos Garcia Campos Unreviewed. Update OptionsGTK.cmake and NEWS for 2.29.92 release * gtk/NEWS: Add release notes for 2.29.92. 2020-09-03 Carlos Garcia Campos [GTK] Unexpected User-Agent on redirect https://bugs.webkit.org/show_bug.cgi?id=191858 Reviewed by Youenn Fablet. Clear the user agent on new request after a redirect to ensure a new one is computed taking into account the quirks if needed. Also ensure quirks are applied for downloads started in the UI process. * NetworkProcess/soup/NetworkDataTaskSoup.cpp: (WebKit::NetworkDataTaskSoup::continueHTTPRedirection): Clear the user agent on new request. * UIProcess/API/glib/WebKitDownloadClient.cpp: * UIProcess/WebPageProxy.h: Add userAgentForURL(). * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::download): Use userAgentForURL() instead of userAgent(). * UIProcess/gtk/WebPageProxyGtk.cpp: (WebKit::WebPageProxy::userAgentForURL): Implement it to apply quirks if needed. * UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::userAgentForURL): Just return the web page user agent. * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::userAgentForURL): Ditto. * UIProcess/playstation/WebPageProxyPlayStation.cpp: (WebKit::WebPageProxy::userAgentForURL): Ditto. * UIProcess/win/WebPageProxyWin.cpp: (WebKit::WebPageProxy::userAgentForURL): Ditto. * UIProcess/wpe/WebPageProxyWPE.cpp: (WebKit::WebPageProxy::userAgentForURL): Ditto. 2020-09-01 Carlos Garcia Campos [GTK][WPE] Do not use the default WebsiteDataStore for downloads https://bugs.webkit.org/show_bug.cgi?id=216001 Reviewed by Adrian Perez de Castro. Use the web context one instead. * UIProcess/API/glib/WebKitWebContext.cpp: (webkitWebContextStartDownload): 2020-08-20 Carlos Garcia Campos [GTK][WPE] Debug crashes in backdrop filter tests https://bugs.webkit.org/show_bug.cgi?id=215209 Reviewed by Adrian Perez de Castro. * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp: (WebKit::CompositingCoordinator::~CompositingCoordinator): Use invalidateCoordinator() instead of setCoordinator() that has been removed. (WebKit::CompositingCoordinator::createGraphicsLayer): Use setCoordinatorIncludingSubLayersIfNeeded() instead of attaching the layer directly. (WebKit::CompositingCoordinator::attachLayer): Do not call setCoordinator(), the caller is expected to set the coordinator. 2020-08-20 Lauro Moura REGRESSION(r265856) [GTK][WPE] hybi websockets tests failing https://bugs.webkit.org/show_bug.cgi?id=215679 Reviewed by Carlos Garcia Campos. r265856 changed WebSocketChannel to expect AbnormalClosure when the closing handshake is not received. Covered by existing tests. * NetworkProcess/soup/WebSocketTaskSoup.cpp: (WebKit::WebSocketTask::didFail): 2020-08-19 Youenn Fablet WebSocketChannel::didClose should correctly compute whether a closing handshake was received https://bugs.webkit.org/show_bug.cgi?id=215644 Reviewed by Darin Adler. Covered by LayoutTests/http/tests/websocket/tests/hybi/close-code-and-reason.html with NSURLSession code path enabled. * WebProcess/Network/WebSocketChannel.cpp: (WebKit::WebSocketChannel::didClose): As noted by Jiten Mehta, absence of closing handshake from the server is notified by WebSocketChannel::CloseEventCodeAbnormalClosure. Update check accordingly. 2020-08-15 Adrian Perez de Castro Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.29.90 release * wpe/NEWS: Add release notes for 2.29.90. 2020-08-14 Carlos Garcia Campos Unreviewed. Update OptionsGTK.cmake and NEWS for 2.29.91 release * gtk/NEWS: Add release notes for 2.29.91. 2020-08-14 Carlos Garcia Campos Unreviewed. Update OptionsGTK.cmake and NEWS for 2.29.90 release * gtk/NEWS: Add release notes for 2.29.90. 2020-08-13 Carlos Garcia Campos [GTK4] Notify the web process on drag leave https://bugs.webkit.org/show_bug.cgi?id=215373 Reviewed by Adrian Perez de Castro. We missed this when implemented drag and drop support for GTK4. * UIProcess/API/gtk/DropTargetGtk4.cpp: (WebKit::DropTarget::leave): Call dragExited() and resetCurrentDragInformation() on WebPageProxy. 2020-08-13 Carlos Garcia Campos [GTK] Do not accept drag operations when the matched target list is empty https://bugs.webkit.org/show_bug.cgi?id=215372 Reviewed by Adrian Perez de Castro. Do not initialize m_selectionData if we don't have valid targets. * UIProcess/API/gtk/DropTargetGtk3.cpp: (WebKit::DropTarget::accept): (WebKit::DropTarget::leaveTimerFired): 2020-08-12 Wenson Hsieh WebPageProxy::registerEditCommand should be robust against invalid undo step identifiers https://bugs.webkit.org/show_bug.cgi?id=215412 Reviewed by Tim Horton. Add a `MESSAGE_CHECK` to avoid ever creating a `WebEditCommandProxy` with an invalid command identifier. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::registerEditCommand): 2020-08-12 Carlos Garcia Campos REGRESSION(r261570): [GTK] Fails to send drop event to JavaScript https://bugs.webkit.org/show_bug.cgi?id=215032 Reviewed by Darin Adler. Handle custom data in drag and drop operations. * UIProcess/API/gtk/DragSourceGtk3.cpp: (WebKit::DragSource::DragSource): (WebKit::DragSource::begin): * UIProcess/API/gtk/DragSourceGtk4.cpp: (WebKit::DragSource::begin): * UIProcess/API/gtk/DropTargetGtk3.cpp: (WebKit::DropTarget::DropTarget): (WebKit::DropTarget::accept): (WebKit::DropTarget::dataReceived): * UIProcess/API/gtk/DropTargetGtk4.cpp: (WebKit::DropTarget::DropTarget): (WebKit::DropTarget::accept): 2020-08-11 Jer Noble [Mac] Add Experimental Feature preference for SW VP9 https://bugs.webkit.org/show_bug.cgi?id=215043 Reviewed by Beth Dakin. * FeatureFlags/WebKit.plist: * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode const): * Shared/WebPageCreationParameters.h: * Shared/WebPreferences.yaml: * Shared/WebPreferencesDefaultValues.cpp: (WebKit::defaultVP9SWDecoderEnabledOnBattery): * Shared/WebPreferencesDefaultValues.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::creationParameters): * WebProcess/WebPage/WebPage.cpp: (WebKit::m_limitsNavigationsToAppBoundDomains): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::enableVP9Decoder): (WebKit::WebProcess::enableVP9SWDecoder): * WebProcess/WebProcess.h: 2020-08-11 Brady Eidson Add a "use stored credentials" setting to WKWebView. and https://bugs.webkit.org/show_bug.cgi?id=215388 Reviewed by Geoff Garen. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::preconnectTo): * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode const): (WebKit::WebPageCreationParameters::decode): * Shared/WebPageCreationParameters.h: * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _canUseCredentialStorage]): (-[WKWebView _setCanUseCredentialStorage:]): * UIProcess/API/Cocoa/WKWebViewPrivate.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::preconnectTo): (WebKit::WebPageProxy::setCanUseCredentialStorage): (WebKit::WebPageProxy::creationParameters): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::canUseCredentialStorage): * WebProcess/Network/WebLoaderStrategy.cpp: (WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess): * WebProcess/WebPage/WebPage.cpp: (WebKit::m_limitsNavigationsToAppBoundDomains): (WebKit::WebPage::setCanUseCredentialStorage): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: 2020-08-11 Per Arne Vollan [macOS] Deny access to directory for compiled WebKit sandboxes https://bugs.webkit.org/show_bug.cgi?id=215384 Reviewed by Brent Fulgham. A WebKit process on macOS should not be allowed access to the directory containing compiled sandboxes after entering the sandbox itself. * GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in: * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: * WebProcess/com.apple.WebProcess.sb.in: 2020-08-11 Tim Horton iOS: Scrolling and touch events sporadically stop working after navigating https://bugs.webkit.org/show_bug.cgi?id=215368 Reviewed by Wenson Hsieh. Test: fast/events/touch/ios/touch-event-stall-after-navigating-with-pending-asynchronous-touch-start.html WebPageProxy::handlePreventableTouchEvent keeps a counter of the number of outstanding "preventable" touch events that it is waiting to hear from the Web Content process about. This counter is incremented when the event is dispatched to the Web Content process's EventHandler queue, and decremented when the reply (whether it was handled or not) comes back from the Web Content process. While the counter is non-zero, all deferrable gestures remain deferred (and when it returns to zero, the WKDeferringGestureRecognizer gate is lifted, and events are allowed to flow). This means that it is very important that every event eventually reply about its handling status. Before this change, when the Web Content process is navigating, and reaches didCommitLoad, it cleared all queued touch events, without replying to to the UI process. Thus, there is a small window of time in which an incoming touch event will end up in the queue, *not* get dispatched/replied, and then get dropped on the floor in didCommitLoad. Most events do not meet this fate, because they are handled promptly, and commitLoad/didCommitLoad tend to be very quick. However, if the Web Content process ends up spending any significant amount of time under commitLoad (say, in an unload handler, or in media frameworks), any incoming touch events during that time will get lost, and the UI process' count of outstanding events will end up getting stuck non-zero. Fix this by always pretending that the page ate any events that were outstanding when didCommitLoad occurs, instead of just dropping them on the floor. * UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::doneWithTouchEvent): * WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::takeQueuedTouchEventsForPage): (WebKit::EventDispatcher::clearQueuedTouchEventsForPage): Deleted. (WebKit::EventDispatcher::getQueuedTouchEventsForPage): Deleted. Also, rename getQueuedTouchEventsForPage to takeQueuedTouchEventsForPage, since it removes the queue from EventDispatcher's set. * WebProcess/WebPage/EventDispatcher.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::touchEventSync): (WebKit::WebPage::didCommitLoad): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::cancelAsynchronousTouchEvents): 2020-08-11 Philippe Normand [GStreamer] gst-full standalone library support https://bugs.webkit.org/show_bug.cgi?id=215262 Reviewed by Xabier Rodriguez-Calvar. Disable missing-plugins handling when gst-full is in use. The plugin installer doesn't make much sense for this scenario. * PlatformWPE.cmake: * UIProcess/API/glib/WebKitInstallMissingMediaPluginsPermissionRequest.cpp: (webkitInstallMissingMediaPluginsPermissionRequestAllow): (webkitInstallMissingMediaPluginsPermissionRequestDeny): (webkit_install_missing_media_plugins_permission_request_get_description): * UIProcess/API/glib/WebKitInstallMissingMediaPluginsPermissionRequestPrivate.h: * UIProcess/API/glib/WebKitWebView.cpp: (webkitWebViewRequestInstallMissingMediaPlugins): * UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.cpp: * UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.h: * UIProcess/gstreamer/WebPageProxyGStreamer.cpp: (WebKit::WebPageProxy::requestInstallMissingMediaPlugins): 2020-08-10 Chris Dumez AuxiliaryProcess::didReceiveInvalidMessage() for WebPage::PerformDragControllerAction IPC https://bugs.webkit.org/show_bug.cgi?id=215341 Reviewed by Alex Christensen. DragApplicationFlags is an enum containing flags. It was being sent over IPC as a DragApplicationFlags instead of an OptionSet, and thus would fail enum value validation when decoding when more than one flag is set. * Scripts/webkit/messages.py: * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder::decode): * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::applicationFlagsForDrag): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::performDragControllerAction): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: 2020-08-10 David Kilzer Use RefPtr for WebKit::WebOpenPanelResultListenerProxy Reviewed by Geoffrey Garen. Unable to create an API test for this. * UIProcess/Cocoa/UIDelegate.mm: (WebKit::UIDelegate::UIClient::runOpenPanel): - Use RefPtr when passing `listener` into the block. 2020-08-10 Wenson Hsieh Add more logging to diagnose editing/selection/ios/select-all-non-editable-text-using-keyboard.html https://bugs.webkit.org/show_bug.cgi?id=215089 Reviewed by Tim Horton. Remove some unnecessary declarations that were only used for debug logging in WebKitTestRunner, and add some more logging to check whether the web view is even getting a call to select all from UIKit. * Platform/spi/ios/UIKitSPI.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView selectAllForWebView:]): 2020-08-10 Sihui Liu Always suspend IDB work when network process is prepared to suspend https://bugs.webkit.org/show_bug.cgi?id=215239 Reviewed by Geoffrey Garen. We do not suspend IDB work in the network process when there is an ongoing transaction because the network process is going to ask the UI process to hold a background process assertion for it. However, it is possible that the request from the network process does not reach the UI process in time: RunningBoard may already decide to suspend the network process after app is backgrounded and UI process drops the foreground assertion for the network process. In this case, IDB in the network process would continue its transaction and the network process will be killed when it becomes suspened for holding database file locks. A network process crash can lead to a worse result than suspending IDB work, which aborts ongoing transactions, because it will destroy all database connections and transaction. Therefore, let's just suspend IDB work when the network process receives prepareToSuspend message. * NetworkProcess/IndexedDB/WebIDBServer.cpp: (WebKit::WebIDBServer::suspend): * NetworkProcess/IndexedDB/WebIDBServer.h: * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::prepareToSuspend): 2020-08-10 Per Arne Vollan Add required entitlement for Catalyst https://bugs.webkit.org/show_bug.cgi?id=215244 Reviewed by Darin Adler. The entitlement 'com.apple.private.webkit.use-xpc-endpoint' should be added to the WebContent process on Catalyst as well, since it is needed on all Apple platforms. This entitlement is needed to support direct XPC communication between WebKit processes, which is used to send the Launch Services database to the WebContent process from the Networking process. Also, add some more logging related to this, to detect if it takes a long time for the WebContent process to receive the database. * Scripts/process-entitlements.sh: * WebProcess/WebPage/Cocoa/WebPageCocoa.mm: (WebKit::WebPage::platformDidReceiveLoadParameters): 2020-08-09 Said Abou-Hallawa [macOS] Drag/drop an image of a unsupported format to an file input element should convert it to a supported format https://bugs.webkit.org/show_bug.cgi?id=212482 Reviewed by Darin Adler. Move ImageUtilities.h and ImageUtilitiesCG.cpp from WebKit to WebCore. Use the image transcoding functions and shared WorkQueue from WebCore. * Platform/ImageUtilities.h: Removed. * Platform/cg: Removed. * SourcesCocoa.txt: * UIProcess/WebPageProxy.cpp: (WebKit::m_limitsNavigationsToAppBoundDomains): (WebKit::WebPageProxy::didChooseFilesForOpenPanelWithImageTranscoding): (WebKit::m_transcodingQueue): Deleted. * UIProcess/WebPageProxy.h: * WebKit.xcodeproj/project.pbxproj: 2020-08-08 Wenson Hsieh [ iOS wk2 ] editing/pasteboard/paste-without-nesting.html is a flaky failure https://bugs.webkit.org/show_bug.cgi?id=215218 Reviewed by Darin Adler. This test writes to the system pasteboard using `document.execCommand("Copy")`, and then immediately reads from the system pasteboard by triggering `document.execCommand("Paste")`. On rare occasions, this fails on iOS, where IPC messages for writing content to the pasteboard (e.g. `WebPasteboardProxy::WriteWebContentToPasteboard`) are asynchronous, but the IPC message to get the pasteboard change count before pasting (`GetPasteboardChangeCount`) is synchronous. This means that `Connection` may end up dispatching the sync `GetPasteboardChangeCount` IPC message before dispatching `WriteWebContentToPasteboard`, which causes the pasteboard read to fail, because the contents on the pasteboard have changed after starting to read from the pasteboard. Note that this is not a problem on macOS since all pasteboard writing IPC is synchronous. Instead of turning all of the async iOS pasteboard writing messages synchronous as well, we can fix this by adding a mechanism in `WebProcess` to keep track of outgoing async pasteboard write messages; then, before attempting to grab the change count when we start reading, wait for any of these pending async writes to finish before we continue. In a future patch, we could actually adopt this same mechanism in `SetPasteboardTypes` and neighboring IPC messages to turn these all asynchronous. * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: (WebKit::WebPasteboardProxy::writeURLToPasteboard): (WebKit::WebPasteboardProxy::writeWebContentToPasteboard): (WebKit::WebPasteboardProxy::writeImageToPasteboard): (WebKit::WebPasteboardProxy::writeStringToPasteboard): Call `didWriteToPasteboardAsynchronously` after we finish writing to the pasteboard asynchronously. * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::changeCount): Before accessing changeCount, wait until any asynchronous calls to write to the system pasteboard have finished. (WebKit::WebPlatformStrategies::writeToPasteboard): Right before we send an async message to the UI process to write to the system pasteboard, notify `WebProcess` so that it can keep track of pending clipboard writes. * WebProcess/WebProcess.h: * WebProcess/WebProcess.messages.in: * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::willWriteToPasteboardAsynchronously): (WebKit::WebProcess::didWriteToPasteboardAsynchronously): (WebKit::WebProcess::waitForPendingPasteboardWritesToFinish): Wait for a maximum of 1 second for any outgoing pasteboard writing messages to return to the web process. 2020-08-07 Chris Dumez baseLatency attribute is missing on AudioContext interface https://bugs.webkit.org/show_bug.cgi?id=215277 Reviewed by Eric Carlson. * GPUProcess/media/RemoteAudioDestinationManager.cpp: (WebKit::RemoteAudioDestination::framesPerBuffer const): (WebKit::RemoteAudioDestinationManager::createAudioDestination): * GPUProcess/media/RemoteAudioDestinationManager.h: * GPUProcess/media/RemoteAudioDestinationManager.messages.in: * WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp: (WebKit::RemoteAudioDestinationProxy::RemoteAudioDestinationProxy): * WebProcess/GPU/media/RemoteAudioDestinationProxy.h: 2020-08-07 John Wilander Experimental: Cap the expiry of persistent cookies set in 3rd-party CNAME cloaked HTTP responses https://bugs.webkit.org/show_bug.cgi?id=215201 Reviewed by Brent Fulgham. Also reviewed and commented on by Chris Dumez, Jiten Mehta, Sam Weinig, and Alex Christensen. This experimental feature is off by default. CNAME cloaking means a host resolves to a a different domain, potentially a third-party domain, as part of DNS resolution. This patch makes WebKit::NetworkDataTaskCocoa capture any CNAME cloaking for the first party host and stores it in a table in the WebKit::NetworkSession. It then checks first party subresource loads to see if they resolve to a different domain and if so, compare that domain to both the first party domain and its CNAME cloaking domain, if there is one. If there's a mismatch, it's deemed a case of third-party CNAME cloaking and any cookies set in the response of the cloaked subresource load will have their expiry capped to 7 days. The cases for capping expiry look like this (and are backed by test cases): First-party host | First-party subdomain | Capped expiry ------------------|----------------------------|-------------- No CNAME cloaking | No CNAME cloaking | No No CNAME cloaking | First-party CNAME cloaking | No No CNAME cloaking | Third-party CNAME cloaking | Yes CNAME cloaking | No CNAME cloaking | No CNAME cloaking | Matching CNAME cloaking | No CNAME cloaking | First-party CNAME cloaking | No CNAME cloaking | Third-party CNAME cloaking | Yes This patch makes use of two new CFNetwork SPIs on NSURLSessionTask: - _cookieTransformCallback - _resolvedCNAMEChain * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::resetParametersToDefaultValues): This reset now covers the new CNAME cloaking member variables. (WebKit::NetworkProcess::setIsRunningResourceLoadStatisticsTest): This function now also enables the CNAME cloaking code. (WebKit::NetworkProcess::setFirstPartyHostCNAMEDomainForTesting): (WebKit::NetworkProcess::setThirdPartyCNAMEDomainForTesting): * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkProcess.messages.in: New IPC to forward test configuration. * NetworkProcess/NetworkSession.cpp: (WebKit::NetworkSession::NetworkSession): Now picks up the flag for this feature. (WebKit::NetworkSession::setFirstPartyHostCNAMEDomain): This is called from NetworkDataTaskCocoa::updateFirstPartyInfoForTaskAndSession() when there is CNAME cloaking for the first party host. This is done to make it possible to not cap the expiry of cookies if subsequent subresource loads have CNAME cloaking that matches the first-party host's CNAME cloaking. This happens when whole websites are hosted on edge networks. This function is also used by the test infrastructure to mock the DNS resolution for a first-party host. (WebKit::NetworkSession::firstPartyHostCNAMEDomain): This returns any captured CNAME cloaking for a host, if there is one. (WebKit::NetworkSession::resetCNAMEDomainData): * NetworkProcess/NetworkSession.h: (WebKit::NetworkSession::setCNAMECloakingMitigationEnabled): (WebKit::NetworkSession::cnameCloakingMitigationEnabled const): (WebKit::NetworkSession::setThirdPartyCNAMEDomainForTesting): This test functions allows us to mock the DNS resolution for a subresource. (WebKit::NetworkSession::thirdPartyCNAMEDomainForTesting const): * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: (WebKit::hasCNAMEAndCookieTransformSPI): (WebKit::lastCNAMEDomain): (WebKit::NetworkDataTaskCocoa::updateFirstPartyInfoForSession): This is called by NetworkDataTaskCocoa::didReceiveResponse() to capture any CNAME cloaking for the first-party host. (WebKit::NetworkDataTaskCocoa::applyCookiePolicyForThirdPartyCNAMECloaking): This is called in the NetworkDataTaskCocoa constructor and in NetworkDataTaskCocoa::willPerformHTTPRedirection() and sets the new _cookieTransformCallback SPI property on the task which will check the response for any third-party CNAME cloaking and cap the expiry of incoming cookies accordingly. (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa): This now calls NetworkDataTaskCocoa::applyCookiePolicyForThirdPartyCNAMECloaking(). (WebKit::NetworkDataTaskCocoa::didReceiveResponse): This now calls NetworkDataTaskCocoa::updateFirstPartyInfoForTaskAndSession(). (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection): This now calls NetworkDataTaskCocoa::applyCookiePolicyForThirdPartyCNAMECloaking(). * Shared/ResourceLoadStatisticsParameters.h: Now holds a WebCore::CNAMECloakingMitigationEnabled flag. (WebKit::ResourceLoadStatisticsParameters::encode const): (WebKit::ResourceLoadStatisticsParameters::decode): * Shared/WebPreferences.yaml: * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: (WKWebsiteDataStoreSetResourceLoadStatisticsFirstPartyHostCNAMEDomainForTesting): Used to mock CNAME resolution data. (WKWebsiteDataStoreSetResourceLoadStatisticsThirdPartyCNAMEDomainForTesting): Used to mock CNAME resolution data. * UIProcess/API/C/WKWebsiteDataStoreRef.h: * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::setFirstPartyHostCNAMEDomainForTesting): (WebKit::NetworkProcessProxy::setThirdPartyCNAMEDomainForTesting): * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::ensureNetworkProcess): Now handles the WebCore::CNAMECloakingMitigationEnabled flag. * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: (WebKit::WebsiteDataStore::platformSetNetworkParameters): Now handles the WebCore::CNAMECloakingMitigationEnabled flag. * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::setResourceLoadStatisticsFirstPartyHostCNAMEDomainForTesting): (WebKit::WebsiteDataStore::setResourceLoadStatisticsThirdPartyCNAMEDomainForTesting): (WebKit::WebsiteDataStore::parameters): * UIProcess/WebsiteData/WebsiteDataStore.h: 2020-08-07 Wenson Hsieh Remove UIScriptController.removeAllDynamicDictionaries() https://bugs.webkit.org/show_bug.cgi?id=215207 Reviewed by Sam Weinig. See Tools/ChangeLog for more detail. * Platform/spi/ios/UIKitSPI.h: 2020-08-06 Kenneth Russell Implement createImageBitmap(ImageData) https://bugs.webkit.org/show_bug.cgi?id=183438 Reviewed by Dean Jackson. Add "AlphaPremultiplication destFormat" argument to putImageData, to handle creation of non-premultiplied ImageBitmaps from ImageData. * GPUProcess/graphics/RemoteImageBufferProxy.h: * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp: (WebKit::ImageBufferShareableBitmapBackend::putImageData): * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h: * WebProcess/GPU/graphics/RemoteImageBuffer.h: (WebKit::RemoteImageBuffer::putImageData): 2020-08-06 David Kilzer WTF::makeString() should handle enum values Reviewed by Sam Weinig. * Platform/IPC/cocoa/ConnectionCocoa.mm: (IPC::Connection::sendMessage): * Shared/Cocoa/AuxiliaryProcessCocoa.mm: (WebKit::AuxiliaryProcess::didReceiveInvalidMessage): - Update to take advantage of enum support in WTF::makeString(). 2020-08-06 Jer Noble [Mac,WK2] REGRESSION(r262322): ScreenTime overlay is hidden in fullscreen mode https://bugs.webkit.org/show_bug.cgi?id=215222 Reviewed by Eric Carlson. During a refactor, a call to -[NSWindow setAutodisplay:YES] was dropped (in addition to a call to NSEnableScreenUpdates(), but that has a 1s timeout so its effects aren't persistent). This meant all NSViews added to that window need -display called on them explicitly in order to paint, and so subviews like the ScreenTime overlay is never drawn. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]): 2020-08-06 Truitt Savell Unreviewed, reverting r265328. Broke 17 MediaRecorder tests. Reverted changeset: "Add support for MediaRecorder bitrate options" https://bugs.webkit.org/show_bug.cgi?id=214973 https://trac.webkit.org/changeset/265328 2020-08-06 Youenn Fablet Add support for MediaRecorder bitrate options https://bugs.webkit.org/show_bug.cgi?id=214973 Reviewed by Eric Carlson. Serialize options when creating remote media recorder. * GPUProcess/webrtc/RemoteMediaRecorder.cpp: (WebKit::RemoteMediaRecorder::create): * GPUProcess/webrtc/RemoteMediaRecorder.h: * GPUProcess/webrtc/RemoteMediaRecorderManager.cpp: (WebKit::RemoteMediaRecorderManager::createRecorder): * GPUProcess/webrtc/RemoteMediaRecorderManager.h: * GPUProcess/webrtc/RemoteMediaRecorderManager.messages.in: * WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp: (WebKit::MediaRecorderPrivate::MediaRecorderPrivate): (WebKit::MediaRecorderPrivate::startRecording): * WebProcess/GPU/webrtc/MediaRecorderPrivate.h: * WebProcess/GPU/webrtc/MediaRecorderProvider.cpp: (WebKit::MediaRecorderProvider::createMediaRecorderPrivate): * WebProcess/GPU/webrtc/MediaRecorderProvider.h: 2020-08-06 Adrian Perez de Castro [WPE][GTK] Wrong argument order for clone syscall seccomp filter on s390x https://bugs.webkit.org/show_bug.cgi?id=215212 Reviewed by Michael Catanzaro. Patch based on this Flatpak pull request: https://github.com/flatpak/flatpak/pull/3777 No new tests needed. * UIProcess/Launcher/glib/BubblewrapLauncher.cpp: (WebKit::setupSeccomp): Add preprocessor guard to choose the correct clone() system call argument on S390. 2020-08-06 James Savage Could not find module 'WebKit' for target 'armv7-apple-ios' Reviewed by Brady Eidson. * SwiftOverlay/Configurations/WebKitSwiftOverlayTests.xcconfig: Define SWIFT_MODULE_ONLY_ARCHS to emit other architectures. 2020-08-05 Tim Horton Remove all references to non-existent 10.16 https://bugs.webkit.org/show_bug.cgi?id=215202 Reviewed by Wenson Hsieh. * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKitTargetConditionals.xcconfig: * Scripts/process-entitlements.sh: * WebProcess/com.apple.WebProcess.sb.in: 2020-08-05 Per Arne Vollan [Cocoa] Sandbox extension token not cleared from memory https://bugs.webkit.org/show_bug.cgi?id=215136 Reviewed by Geoffrey Garen. As a security mitigation, an invalidated sandbox extension should have its token cleared from memory. No new tests, covered by existing tests. * Shared/Cocoa/SandboxExtensionCocoa.mm: (WebKit::SandboxExtensionImpl::m_length): (WebKit::SandboxExtensionImpl::~SandboxExtensionImpl): 2020-08-05 Per Arne Vollan [Cocoa] Remove obsolete sandbox extension after r264178 https://bugs.webkit.org/show_bug.cgi?id=215154 Reviewed by Brent Fulgham. After r264178, the code related to issuing an extension to com.apple.lsd.mapdb is obsolete, and should be removed. No new tests, covered by existing tests. * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode const): (WebKit::WebProcessCreationParameters::decode): * Shared/WebProcessCreationParameters.h: * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::platformInitializeWebProcess): * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess): * WebProcess/com.apple.WebProcess.sb.in: 2020-08-05 Wenson Hsieh [iOS] Keyboard shortcuts and arrow key scrolling stop working after navigating via swipe gesture https://bugs.webkit.org/show_bug.cgi?id=215137 Reviewed by Tim Horton. The process of starting a navigation swipe gesture causes the first responder (in this case, WKContentView) to resign. Subsequently, nothing makes the content view first responder again once the navigation gesture ends, even if the gesture is cancelled and we don't end up navigating. This results in several symptoms, two of which are that keyboard shortcuts stop working, and pressing arrow keys does not scroll the web view after ending the swipe gesture. To mitigate this, add a mechanism to have the web view remember that our content view was first responder before calling `-startInteractiveTransition:`; after ending the interactive transition (i.e. swipe gesture), we then restore the web view's content view as first responder if it is not already first responder (and it is also parented, which is not the case when swiping back to close a newly opened tab in Safari). Test: NavigationSwipeTests.RestoreFirstResponderAfterNavigationSwipe NavigationSwipeTests.DoNotBecomeFirstResponderAfterNavigationSwipeIfWebViewIsUnparented * UIProcess/API/Cocoa/WKWebViewInternal.h: * UIProcess/API/ios/WKWebViewIOS.mm: (-[WKWebView _navigationGestureDidBegin]): (-[WKWebView _navigationGestureDidEnd]): 2020-08-04 Brent Fulgham Unreviewed build fix after r265263 https://bugs.webkit.org/show_bug.cgi?id=215139 * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::platformInitializeWebProcess): 2020-08-04 Devin Rousso "DoubleDown Casino" respin button stops working with trackpad https://bugs.webkit.org/show_bug.cgi?id=215146 Reviewed by Tim Horton. * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView shouldUseMouseGestureRecognizer]): 2020-08-04 Per Arne Vollan [iOS] Issue a temporary extension to the MobileGestalt daemon when the MobileGestalt cache is invalid https://bugs.webkit.org/show_bug.cgi?id=214965 Unreviewed, address review comments. Add comment explaining why a set of MobileGestalt queries are performed when starting up the WebContent process on iOS. * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess): 2020-08-04 Per Arne Vollan [iOS] Check that Accessibility is enabled when receiving the enable Accessibility notification https://bugs.webkit.org/show_bug.cgi?id=215112 Reviewed by Youenn Fablet. As a security mitigation, return early when handling this notification if Accessibility is not enabled. API test: WebKit.AccessibilityHasNoPreferencesServiceAccessWhenPostingNotification * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::registerNotificationObservers): 2020-08-04 Brent Fulgham Limit 'com.apple.webkit.microphone' use to macOS and MacCatalyst https://bugs.webkit.org/show_bug.cgi?id=215139 Reviewed by Eric Carlson. We only need the 'com.apple.webkit.microphone' Sandbox Extension at startup on macOS and MacCatalyst (and even on those platforms, only until is fixed). We should not issue this extension on the iOS family of targets. * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::platformInitializeWebProcess): 2020-08-04 Per Arne Vollan [iOS Simulator] Assert under WebPage::platformDidReceiveLoadParameters https://bugs.webkit.org/show_bug.cgi?id=215108 Reviewed by Youenn Fablet. This asserts because it appears that the WebContent and Networking process do not have the required entitlement com.apple.private.webkit.use-xpc-endpoint on the iOS Simulator. Add the entitlement for simulator. No new tests, covered by existing tests. * Resources/ios/XPCService-embedded-simulator.entitlements: 2020-08-03 Wenson Hsieh Allow -accessoryDone to blur the focused element on iPad when AutoFilling strong passwords https://bugs.webkit.org/show_bug.cgi?id=215105 Reviewed by Tim Horton. `-accessoryDone` is now used to dismiss the strong password AutoFill keyboard after choosing a password on iOS, due to how it hides the keyboard without causing the content view to resign first responder; being stuck in a state where the content view is not first responder causes several issues when choosing strong passwords on iOS, such as keyboard shortcuts no longer working. On iPad, to ensure that `-accessoryDone` actually dismisses the keyboard, we need to additionally teach `-endEditingAndUpdateFocusAppearanceWithReason:` (when given `EndEditingReasonAccessoryDone`) to allow the focused element to blur when dismissing the strong password input view. Test: KeyboardInputTests.TestWebViewAccessoryDoneDuringStrongPasswordAssistance * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView endEditingAndUpdateFocusAppearanceWithReason:]): Refactor this logic into a local helper lambda with early returns, instead of using a single if statement. 2020-08-03 Youenn Fablet Move user gesture propagation over promise behind a feature flag https://bugs.webkit.org/show_bug.cgi?id=215014 Reviewed by Eric Carlson. Add a preference, on by default. * Shared/WebPreferences.yaml: 2020-08-03 Alex Christensen Null check parentProcessConnection when creating a NetworkDataTaskCocoa https://bugs.webkit.org/show_bug.cgi?id=215109 Reviewed by Chris Dumez. * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (WebKit::NetworkSessionCocoa::sessionWrapperForTask): Null check parentProcessConnection. Otherwise, we can dereference null and crash between disconnecting with the parent process and terminating, which isn't the worst time to crash because we are trying to terminate anyways. But we may as well not crash. 2020-08-03 Wenson Hsieh Remove the ENABLE_DATA_INTERACTION feature flag https://bugs.webkit.org/show_bug.cgi?id=215091 Reviewed by Megan Gardner. * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: * UIProcess/WebPageProxy.messages.in: * UIProcess/ios/DragDropInteractionState.h: * UIProcess/ios/DragDropInteractionState.mm: * UIProcess/ios/PageClientImplIOS.h: * UIProcess/ios/PageClientImplIOS.mm: * UIProcess/ios/WKContentViewInteraction.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView setUpInteraction]): (-[WKContentView cleanUpInteraction]): (-[WKContentView actionSheetAssistant:showCustomSheetForElement:]): * UIProcess/ios/WebPageProxyIOS.mm: * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/ios/WebPageIOS.mm: 2020-08-03 Tim Horton Fix the macCatalyst build * UIProcess/EndowmentStateTracker.mm: (WebKit::EndowmentStateTracker::stateFromEndowments): 2020-08-03 Per Arne Vollan Finalize the list of MobileGestalt queries needed to populate the in-memory cache in the WebContent process https://bugs.webkit.org/show_bug.cgi?id=215095 Reviewed by Geoffrey Garen. When the MobileGestalt cache is invalid, we issue a temporary extension to the MobileGestalt daemon for the WebContent process, which will populate the in-memory cache by doing a set of MobileGestalt queries before revoking the extension. This patch finalizes the list of MobileGestalt queries needed to populate the in-memory cache in the WebContent process on iOS before revoking the temporary extension to com.apple.mobilegestalt.xpc. This list was compiled by querying every possible MobileGestalt key after the temporary extension was revoked, and make a note of all queries that were contacting the MobileGestalt daemon to get the answer. The added queries in this patch should make the list complete, and ensures that all cachable values are in the in-memory cache before revoking the extension, since every possible MobileGestalt query was tested. This again means that users that have an invalid MobileGestalt cache, will have access to the exact same MobileGestalt values, as those users who have a valid MobileGestalt cache. * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess): 2020-08-03 Wenson Hsieh [iOS 14] editing/selection/ios/select-all-non-editable-text-using-keyboard.html sometimes times out https://bugs.webkit.org/show_bug.cgi?id=215089 Reviewed by Tim Horton. * Platform/spi/ios/UIKitSPI.h: 2020-08-03 Devin Rousso should be able to request an editing context for a given region of a given input https://bugs.webkit.org/show_bug.cgi?id=215042 Reviewed by Wenson Hsieh. Right now, it's only possible to request an editing context for either an entire input element or a particular rect of the page. It should be possible to request an editing context for a particular rect within a given input element as well (e.g. get one paragraph or the currently selected text in a `