Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 51b3b46f8e0b52d6dd39584f124a627127d32bc9 https://github.com/WebKit/WebKit/commit/51b3b46f8e0b52d6dd39584f124a627127d32bc9 Author: Ben Nham <n...@apple.com> Date: 2023-12-04 (Mon, 04 Dec 2023)
Changed paths: M Source/WebKit/Configurations/WebKitSwift.xcconfig M Source/WebKit/DerivedSources-output.xcfilelist M Source/WebKit/DerivedSources.make M Source/WebKit/Shared/NavigationActionData.h M Source/WebKit/Shared/NavigationActionData.serialization.in M Source/WebKit/UIProcess/Cocoa/NavigationState.mm M Source/WebKit/WebKit.xcodeproj/project.pbxproj M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp M Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp M Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp Log Message: ----------- Call into WKApplicationUtilities when handling certain types of links https://bugs.webkit.org/show_bug.cgi?id=265172 rdar://118667681 Reviewed by Brent Fulgham and Elliott Williams. Trying to re-land now that build system fix is in (rdar://119075401). In order to implement a particular feature, we need to call into WKApplicationUtilities when handling certain types of navigation actions. This then calls a Swift-only API. To do this, we copy WKApplicationUtilities.swift from WebKitAddition's include location to WebKit's DerivedSources. We use EXCLUDED_SOURCE_FILES to exclude that file on platforms and SDKs where it doesn't exist. This also requires us to know the top frame's origin at the point of navigation, and I couldn't find any good way of accessing that state in decidePolicyForNavigationAction. So I modified NavigationActionData to carry the topOrigin state. * Source/WebKit/Configurations/WebKitSwift.xcconfig: * Source/WebKit/DerivedSources-input.xcfilelist: * Source/WebKit/DerivedSources-output.xcfilelist: * Source/WebKit/DerivedSources.make: * Source/WebKit/Shared/NavigationActionData.h: * Source/WebKit/Shared/NavigationActionData.serialization.in: * Source/WebKit/UIProcess/Cocoa/NavigationState.mm: (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction): * Source/WebKit/WebKit.xcodeproj/project.pbxproj: * Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::createWindow): * Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): * Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp: (WebKit::WebLocalFrameLoaderClient::didSameDocumentNavigationForFrameViaJSHistoryAPI): (WebKit::WebLocalFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Canonical link: https://commits.webkit.org/271494@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes