Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 89ae1db8d2023fa260344907f26020938f661dbd
https://github.com/WebKit/WebKit/commit/89ae1db8d2023fa260344907f26020938f661dbd
Author: Richard Robinson <[email protected]>
Date: 2025-04-28 (Mon, 28 Apr 2025)
Changed paths:
M Source/WebKit/_WebKit_SwiftUI/API/View+WebViewModifiers.swift
M Source/WebKit/_WebKit_SwiftUI/Implementation/CocoaWebViewAdapter.swift
M
Source/WebKit/_WebKit_SwiftUI/Implementation/EnvironmentValues+Extras.swift
M Source/WebKit/_WebKit_SwiftUI/Implementation/ViewModifierContexts.swift
M Source/WebKit/_WebKit_SwiftUI/Implementation/WebViewRepresentable.swift
M Tools/SwiftBrowser/Source/Views/ContentView.swift
Log Message:
-----------
[SwiftUI] Support the standard `findNavigator` view modifier
https://bugs.webkit.org/show_bug.cgi?id=292216
rdar://141503384
Reviewed by Aditya Keerthi.
Add support for the standard `findNavigator` set of view modifiers instead of
having to use ad-hoc
custom view modifiers like `webViewFindNavigator` by leveraging the
`findContext` environment value.
* Source/WebKit/_WebKit_SwiftUI/API/View+WebViewModifiers.swift:
(View.webViewFindNavigator(_:)): Deleted.
(View.webViewFindDisabled(_:)): Deleted.
(View.webViewReplaceDisabled(_:)): Deleted.
Remove the old custom view modifiers.
* Source/WebKit/_WebKit_SwiftUI/Implementation/CocoaWebViewAdapter.swift:
(CocoaWebViewAdapter.isFindBarVisible):
Add compile-time guards to protect the build against configurations where
`FindContext` is unavailable.
* Source/WebKit/_WebKit_SwiftUI/Implementation/EnvironmentValues+Extras.swift:
(EnvironmentValues.webViewFindContext): Deleted.
Remove the custom environment value entry.
* Source/WebKit/_WebKit_SwiftUI/Implementation/ViewModifierContexts.swift:
(FindContext.isPresented): Deleted.
Remove the custom WebKit-specific FindContext struct.
* Source/WebKit/_WebKit_SwiftUI/Implementation/WebViewRepresentable.swift:
(WebViewCoordinator.update(_:configuration:context:)):
(WebViewCoordinator.updateFindInteraction(_:context:)):
Adjust the implementation for the slightly different interface of
`SwiftUI.FindContext` compared to the
previous `WebKit.FindContext` struct. Specifically, `findContext == nil`
implies that
`findContext.canFind == false`.
* Tools/SwiftBrowser/Source/Views/ContentView.swift:
(ContentView.body):
Update the test app to use the standard view modifier.
Canonical link: https://commits.webkit.org/294223@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes