2022-05-28 Adrian Perez de Castro Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.36.3 release * wpe/NEWS: Add release notes for 2.36.3. 2022-05-26 Adrian Perez de Castro Unreviewed. Update OptionsGTK.cmake and NEWS for 2.36.3 release * gtk/NEWS: Add release notes for 2.36.3. 2022-05-17 Adrian Perez de Castro Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.36.2 release * wpe/NEWS: Add release notes for 2.36.2. 2022-05-17 Adrian Perez de Castro Unreviewed. Update OptionsGTK.cmake and NEWS for 2.36.2 release * gtk/NEWS: Add release notes for 2.36.2. 2022-04-02 Yury Semikhatsky GTK doesn't compile with ENABLE_ACCESSIBILITY=0 https://bugs.webkit.org/show_bug.cgi?id=238669 Reviewed by Michael Catanzaro. Fix GTK compilation with ENABLE_ACCESSIBILITY=0 No new tests. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseDispose): (webkit_web_view_base_class_init): 2022-04-21 Adrian Perez de Castro Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.36.1 release * wpe/NEWS: Add release notes for 2.36.1. 2022-04-21 Carlos Garcia Campos Unreviewed. Update OptionsGTK.cmake and NEWS for 2.36.1 release * gtk/NEWS: Add release notes for 2.36.1. 2022-04-08 Philippe Normand [WPE][2.36] Build with a11y disabled fails https://bugs.webkit.org/show_bug.cgi?id=239004 Reviewed by Michael Catanzaro. Add accessibility build guards. * UIProcess/Launcher/glib/XDGDBusProxy.cpp: (WebKit::XDGDBusProxy::XDGDBusProxy): (WebKit::XDGDBusProxy::launch const): 2022-04-01 Carlos Garcia Campos REGRESSION(r290360): [GLX] Crash on process exit https://bugs.webkit.org/show_bug.cgi?id=238494 Reviewed by Michael Catanzaro. * WebProcess/gtk/WaylandCompositorDisplay.cpp: (WebKit::WaylandCompositorDisplay::WaylandCompositorDisplay): 2022-03-30 Pablo Saavedra [GTK][WPE] Exit cleanly if Connection to UIProcess severed. Regression (r214307) https://bugs.webkit.org/show_bug.cgi?id=235224 This patch reverts the WPE and GTK specific code removed in '[WK2] Make establishing a connection between the WebProcess and the Network process more robust' (r12345): GTK+ and WPE ports don't exit on send sync message failure. In those particular cases, the network process can be terminated by the UI process while the Web process is still initializing, so we always want to exit instead of crashing. This can happen when the WebView is created and then destroyed quickly. See https://bugs.webkit.org/show_bug.cgi?id=183348. Reviewed by Carlos Garcia Campos. * WebProcess/WebProcess.cpp: (WebKit::getNetworkProcessConnection): (WebKit::WebProcess::getGPUProcessConnection): (WebKit::getWebAuthnProcessConnection): 2022-03-22 Miguel Gomez Ensure that proxies are invalidated before destroying them. https://bugs.webkit.org/show_bug.cgi?id=237187 Reviewed by Carlos Garcia Campos. * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: (WebKit::CoordinatedGraphicsScene::updateSceneState): 2022-03-25 Adrian Perez de Castro Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.36.0 release * wpe/NEWS: Add release notes for 2.36.0. 2022-03-21 Carlos Garcia Campos Unreviewed. Update OptionsGTK.cmake and NEWS for 2.36.0 release * gtk/NEWS: Add release notes for 2.36.0. 2022-03-18 Carlos Garcia Campos [WPE][GTK] Fix a crash after r290360 https://bugs.webkit.org/show_bug.cgi?id=237917 Reviewed by Youenn Fablet. When AuxiliaryProcess::shutDown is called for the WebProcess there might be pages not closed yet, for example when swapping process on navigation, the close message is sent to the page after the shutdown. In the case of GTK and WPE ports the pages are closed before stopping the run loop to ensure associated resources (like GPU resources) are released. Closing the last page makes the process termination allowed, which ends up calling AuxiliaryProcess::terminate again. Also, when the shutdown message is received we don't want to ask again the UI process whether the process can be terminated, since the UI process asked it. * Shared/AuxiliaryProcess.cpp: (WebKit::AuxiliaryProcess::enableTermination): Return early if m_isInShutDown is true. (WebKit::AuxiliaryProcess::shutDown): Set m_isInShutDown for the scope. * Shared/AuxiliaryProcess.h: 2022-03-18 Carlos Garcia Campos Remove AuxiliaryProcess termination timeout https://bugs.webkit.org/show_bug.cgi?id=238012 Reviewed by Chris Dumez. It was only used by the plugin process, now it's always set to 0 for all processes, so it's useless. * Shared/AuxiliaryProcess.cpp: (WebKit::AuxiliaryProcess::AuxiliaryProcess): (WebKit::AuxiliaryProcess::disableTermination): (WebKit::AuxiliaryProcess::enableTermination): (WebKit::AuxiliaryProcess::terminationTimerFired): Deleted. * Shared/AuxiliaryProcess.h: (WebKit::AuxiliaryProcess::setTerminationTimeout): Deleted. * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode const): (WebKit::WebProcessCreationParameters::decode): * Shared/WebProcessCreationParameters.h: * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::initializeNewWebProcess): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): 2022-03-16 Pablo Saavedra [GTK][WPE] Crash during the WebPage::close() related to GL resources destruction https://bugs.webkit.org/show_bug.cgi?id=237588 Reviewed by Carlos Garcia Campos. * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h: * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp: (WebKit::ThreadedCompositor::invalidate): (WebKit::ThreadedCompositor::updateSceneWithoutRendering): * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h: 2022-03-07 Adrian Perez de Castro [GTK] generate-automation-atom.py breaks reproducible builds https://bugs.webkit.org/show_bug.cgi?id=237506 Reviewed by Carlos Garcia Campos. * Scripts/generate-automation-atom.py: (append_functions): Sort utility functions to produce stable output. 2022-03-01 Michael Catanzaro Misc compiler warnings, late Feb 2022 edition https://bugs.webkit.org/show_bug.cgi?id=237275 Reviewed by Adrian Perez de Castro. Delete an unused function. Remove a redundant move. * Shared/AuxiliaryProcess.cpp: (WebKit::applySandboxProfileForDaemon): Deleted. * Shared/WebFoundTextRange.cpp: (WebKit::WebFoundTextRange::decode): 2022-02-25 Adrian Perez de Castro Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.35.90 release * wpe/NEWS: Add release notes for 2.35.90. 2022-02-25 Adrian Perez de Castro Unreviewed non-unified build fix. * WebProcess/glib/WebProcessGLib.cpp: Add missing WebPage.h inclusion. 2022-02-25 Carlos Garcia Campos Unreviewed. Update OptionsGTK.cmake and NEWS for 2.35.90 release * gtk/NEWS: Add release notes for 2.35.90. 2022-02-23 Philippe Normand [GStreamer] De-initialize GStreamer before terminating WebProcess https://bugs.webkit.org/show_bug.cgi?id=237084 Reviewed by Carlos Garcia Campos. Allowing the leak tracer to report/log leaks. There is an issue though, if the UIProcess exits too early, the leak tracer reporting will be interrupted potentially too early. The workaround is to have 2 tabs open in the GTK MiniBrowser, closing the one where media handling and leak tracing was done and keeping the second tab open. * WebProcess/glib/WebProcessGLib.cpp: (WebKit::WebProcess::stopRunLoop): 2022-02-22 Brent Fulgham PingLoader is failing to call completion handler in error case https://bugs.webkit.org/show_bug.cgi?id=237062 Reviewed by Chris Dumez. The completion handler was not being called in the case of a PingLoad being redirected to a non-HTTP(S) scheme. * NetworkProcess/PingLoad.cpp: (WebKit::PingLoad::willPerformHTTPRedirection): 2022-02-23 Maxim Cournoyer [WPE][GTK] Paths should be canonicalized before calling bwrap https://bugs.webkit.org/show_bug.cgi?id=211131 Reviewed by Michael Catanzaro. * UIProcess/Launcher/glib/BubblewrapLauncher.cpp: (WebKit::bindSymlinksRealPath): Relocate earlier in file, add a 'bindOption' argument and use FileSystem::realPath instead of realpath from the standard C library. (WebKit::bindIfExists): Use the modified above procedure to canonicalize the source path, and avoid adding bind mounts for locations under /etc. 2022-02-23 Liliana Marie Prikler Bubblewrap launcher doesn't bind font locations from XDG_DATA_DIRS https://bugs.webkit.org/show_bug.cgi?id=237089 Reviewed by Michael Catanzaro. * UIProcess/Launcher/glib/BubblewrapLauncher.cpp: (WebKit::bindFonts): Expose font directories present in the XDG_DATA_DIRS environment variable. 2022-02-22 Alexander Kanavin When building introspection files, add CMAKE_C_FLAGS to the compiler flags. https://bugs.webkit.org/show_bug.cgi?id=232936 Reviewed by Michael Catanzaro. g-ir-compiler is using a C compiler internally, so it needs to set the proper flags for it. * PlatformGTK.cmake: 2022-02-23 Pablo Saavedra [GTK][WPE] PlatformDisplay::terminateEglDisplays() is never called https://bugs.webkit.org/show_bug.cgi?id=217655 Stop the run loop for GTK and WPE to ensure a normal exit, since we need atexit handlers to be called to cleanup resources like EGL displays. Reviewed by Carlos Garcia Campos. * Shared/AuxiliaryProcess.cpp: (WebKit::AuxiliaryProcess::didClose): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeConnection): * WebProcess/WebProcess.h: * WebProcess/glib/WebProcessGLib.cpp: (WebKit::WebProcess::stopRunLoop): 2022-02-22 Kate Cheney NSSharingServicePicker gets deallocated when using the standard share menu item https://bugs.webkit.org/show_bug.cgi?id=236998 Reviewed by Wenson Hsieh. The NSMenuItem should keep the NSSharingServicePicker alive. * UIProcess/mac/WebContextMenuProxyMac.mm: (WebKit::WebContextMenuProxyMac::getShareMenuItem): 2022-02-22 Carlos Garcia Campos [GTK][WPE] Suspend web process after some time in the process cache https://bugs.webkit.org/show_bug.cgi?id=236971 Reviewed by Michael Catanzaro. Implement platformSuspendProcess() and platformResumeProcess() for GTK and WPE ports. * UIProcess/WebProcessCache.cpp: (WebKit::WebProcessCache::addProcess): (WebKit::WebProcessCache::CachedProcess::CachedProcess): (WebKit::WebProcessCache::CachedProcess::~CachedProcess): (WebKit::WebProcessCache::CachedProcess::takeProcess): * UIProcess/WebProcessCache.h: * UIProcess/WebProcessProxy.h: * UIProcess/glib/WebProcessProxyGLib.cpp: (WebKit::WebProcessProxy::platformSuspendProcess): (WebKit::WebProcessProxy::platformResumeProcess): 2022-02-21 Alex Christensen Allow adattributiond to start on iOS devices https://bugs.webkit.org/show_bug.cgi?id=237009 Reviewed by Per Arne Vollan. There were three more problems preventing it from starting: 1. The code signature said to look for a sandbox profile with "webkit" in the name, but the profile had "WebKit" in the name. These names are case sensitive. 2. The sandbox profile would not let it load the WebKit framework, so dyld would fail and the process would fail to launch. I added the framework directories that the XPC services are allowed to access. 3. Once it started, it would crash inside WTF::initializeMainThread when calling WTF::pageSize which requires access to the hw.pagesize_compat syscall. As a starting point, I'm going to allow all the syscalls that the network process currently has access to, which is enough to get it to respond without crashing. 4. We need access to com.apple.diagnosticd and com.apple.analyticsd in order to be able to generate crash reports. This is quite useful. Yes, I know I said there were only three problems, but the 4th is so useful I thought I'd put it in the list. * Resources/SandboxProfiles/ios/com.apple.WebKit.adattributiond.sb: * Scripts/process-entitlements.sh: 2022-02-21 Alex Christensen Improve const correctness for SecurityOrigin accessors https://bugs.webkit.org/show_bug.cgi?id=236983 Reviewed by Chris Dumez. * UIProcess/Notifications/WebNotification.h: (WebKit::WebNotification::origin const): (WebKit::WebNotification::origin): 2022-02-21 Wenson Hsieh [iOS] Adjust some behaviors around the "Markup Image" action in the callout bar https://bugs.webkit.org/show_bug.cgi?id=236980 Reviewed by Aditya Keerthi. Adjust the following behaviors around the "Markup Image" callout bar item on iOS: 1. The item should be present as long as the selection range contains a single image item (not only if the selection range exactly encompasses a single image element. 2. The item should appear in the callout bar before other WebKit-client-provided menu controller items. This patch also adds a new API test to exercise these behaviors and, in doing so, also refactors logic around determining whether or not to show this item so that it's dependent on a WebKit internal feature instead of just the system feature flag (with the default value of the internal feature being equal to whether or not the system feature is enabled). This means we can run tests for these features without requiring the system feature flag to be enabled. See below for more details. Test: ImageAnalysisTests.MenuControllerItems * Platform/cocoa/TextRecognitionUtilities.mm: (WebKit::makeTextRecognitionResult): Drive-by fix for some API tests: only attempt to send the platform image analysis result over IPC if it is a `VKCImageAnalysis`. In some API tests, we use mock objects here instead, which currently causes the IPC message send to fail due to encoding failure. * Shared/Cocoa/WebPreferencesDefaultValuesCocoa.mm: (WebKit::defaultImageAnalysisMarkupEnabled): * Shared/WebPreferencesDefaultValues.h: Make the new internal feature flag default to the system feature flag. * UIProcess/ios/WKActionSheetAssistant.h: * UIProcess/ios/WKActionSheetAssistant.mm: (-[WKActionSheetAssistant defaultActionsForLinkSheet:]): (-[WKActionSheetAssistant defaultActionsForImageSheet:]): Consult a new delegate method (`-actionSheetAssistantShouldIncludeCopyCroppedImageAction:`) instead of checking the system feature flag directly. * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView updateImageAnalysisMarkupMenuItems:]): Append the "Markup Image" item at the start of the list of additional menu items. (-[WKContentView canPerformImageAnalysisMarkup]): Check the internal feature instead of the system feature flag. (-[WKContentView performImageAnalysisMarkup:]): Now that this action can be triggered even when the current selection doens't encompass only a single image, we need to use `replaceWithPasteboardData()` instead, passing in the element context of the image element we want to replace. (-[WKContentView actionSheetAssistantShouldIncludeCopyCroppedImageAction:]): Only attempt to show the new items if the internal feature is enabled. Consulted by `WKActionSheetAssistant` above. * UIProcess/mac/WebContextMenuProxyMac.mm: (WebKit::WebContextMenuProxyMac::setupServicesMenu): Check the internal feature instead of the system feature flag. * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::getPlatformEditorState const): Make a minor adjustment here to bail early only if we find multiple image elements in the selected range, rather than bailing if we find anything that's not an image element. 2022-02-21 Alexander Kanavin Fix racy parallel build of WebKit2-4.0.gir https://bugs.webkit.org/show_bug.cgi?id=232935 Reviewed by Michael Catanzaro. This is a target and not a command because it's used to build another .gir and a .typelib, which would trigger two racy parallel builds when using command (e.g. command would run twice, target runs only once). * PlatformGTK.cmake: 2022-02-21 Myles C. Maxfield Sort WebCore and WebKit Xcode project files https://bugs.webkit.org/show_bug.cgi?id=237010 Unreviewed. * WebKit.xcodeproj/project.pbxproj: 2022-02-21 Aditya Keerthi [iOS] Fix the internal build after rdar://88354008 https://bugs.webkit.org/show_bug.cgi?id=236999 Unreviewed build fix. Mark deprecated implementations. * UIProcess/API/ios/WKWebViewIOS.mm: * UIProcess/ios/WKContentViewInteraction.mm: == Rolled over to ChangeLog-2022-02-22 ==