Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 7b5ac8389382fefbf45f9cb626343d7b94d60116 https://github.com/WebKit/WebKit/commit/7b5ac8389382fefbf45f9cb626343d7b94d60116 Author: Ari Young <ari_yo...@apple.com> Date: 2024-09-20 (Fri, 20 Sep 2024)
Changed paths: M Source/WebKit/DerivedSources-input.xcfilelist M Source/WebKit/DerivedSources.make M Source/WebKit/Scripts/webkit/messages.py A Source/WebKit/Shared/Extensions/WebExtensionActionClickBehavior.h A Source/WebKit/Shared/Extensions/WebExtensionActionClickBehavior.serialization.in M Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPISidebarCocoa.mm M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm M Source/WebKit/UIProcess/Extensions/WebExtensionContext.h M Source/WebKit/UIProcess/Extensions/WebExtensionContext.messages.in M Source/WebKit/WebKit.xcodeproj/project.pbxproj M Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPISidePanelCocoa.mm M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPISidebar.mm Log Message: ----------- Implement sidePanel setPanelBehavior/getPanelBehavior API methods. https://webkit.org/b/280021 rdar://135894275 Reviewed by Timothy Hatcher. This patch implements the sidePanel.setPanelBehavior and sidePanel.getPanelBehavior API methods. Additionally, it adds two tests to verify the functionality of these APIs. * Source/WebKit/DerivedSources-input.xcfilelist: Add WebExtensionActionClickbehavior.serialization.in. * Source/WebKit/DerivedSources.make: Add WebExtensionActionClickBehavior.serialization.in. * Source/WebKit/Scripts/webkit/messages.py: (types_that_cannot_be_forward_declared): Add WebKit::WebExtensionActionClickBehavior to types_that_cannot_be_forward_declared. * Source/WebKit/Shared/Extensions/WebExtensionActionClickBehavior.h: Added. * Source/WebKit/Shared/Extensions/WebExtensionActionClickBehavior.serialization.in: Added. * Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPISidebarCocoa.mm: (WebKit::WebExtensionContext::sidebarSetActionClickBehavior): Add IPC message receiver. (WebKit::WebExtensionContext::sidebarGetActionClickBehavior): Add IPC message receiver. * Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm: (WebKit::WebExtensionContext::performAction): Add case to open the sidebar if configured and it is possible. * Source/WebKit/UIProcess/Extensions/WebExtensionContext.h: Add prototypes for new IPC message receivers. * Source/WebKit/UIProcess/Extensions/WebExtensionContext.messages.in: Add IPC messages SidebarSetActionClickBehavior and SidebarGetActionClickBehavior. * Source/WebKit/WebKit.xcodeproj/project.pbxproj: Add WebExtensionActionClickBehavior.h and WebExtensionActionClickBehavior.serialization.in. * Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPISidePanelCocoa.mm: (WebKit::parseActionClickBehavior): Add helper function to parse the behavior argument to sidePanel.setPanelBehavior. (WebKit::WebExtensionAPISidePanel::getPanelBehavior): Add implementation. (WebKit::WebExtensionAPISidePanel::setPanelBehavior): Add implementation. * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPISidebar.mm: (TestWebKitAPI::TEST_F(WKWebExtensionAPISidebar, SidePanelSetPanelBehaviorPersists)): Add test which ensures that the panel behavior configuration is persisted. (TestWebKitAPI::TEST_F(WKWebExtensionAPISidebar, SidePanelOpensSidebarOnActionClickWhenConfigured)): Add test which ensures that the correct WebExtensionControllerDelegate method is called based on the action icon's behavior configuration. Canonical link: https://commits.webkit.org/283997@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes