Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 85f7152d1097d85d636268bbf0ab96126fc9e610
https://github.com/WebKit/WebKit/commit/85f7152d1097d85d636268bbf0ab96126fc9e610
Author: Ari Young <[email protected]>
Date: 2024-07-19 (Fri, 19 Jul 2024)
Changed paths:
M Source/WebKit/DerivedSources-input.xcfilelist
M Source/WebKit/DerivedSources-output.xcfilelist
M Source/WebKit/DerivedSources.make
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M
Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPINamespaceCocoa.mm
A
Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPISidePanelCocoa.mm
A
Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPISidebarActionCocoa.mm
M Source/WebKit/WebProcess/Extensions/API/WebExtensionAPINamespace.h
A Source/WebKit/WebProcess/Extensions/API/WebExtensionAPISidePanel.h
A Source/WebKit/WebProcess/Extensions/API/WebExtensionAPISidebarAction.h
M
Source/WebKit/WebProcess/Extensions/Interfaces/WebExtensionAPINamespace.idl
A
Source/WebKit/WebProcess/Extensions/Interfaces/WebExtensionAPISidePanel.idl
A
Source/WebKit/WebProcess/Extensions/Interfaces/WebExtensionAPISidebarAction.idl
Log Message:
-----------
Add API stubs for sidePanel and sidebarAction.
https://webkit.org/b/276799
rdar://131488956
Reviewed by Timothy Hatcher.
This patch adds IDL files defining the sidebarAction and sidePanel JS
extension APIs. It also changes some project settings and infrastructure
to include these files in the build process. Finally, it also adds them
to the `browser` namespace in WebExtensionAPINamespace.idl and adds
additional machinery and stubs in related code to ensure everything
functions as intended. I tested this patch by compiling with
WK_WEB_EXTENSIONS_SIDEBAR enabled (and the properties enabled in
isPropertyAllowed) and verifying that the behavior from JS in a web
extension context is as intended (namely, returning an "unimplemented"
error).
* Source/WebKit/DerivedSources-input.xcfilelist: Add
WebExtensionAPISidebarAction.idl and WebExtensionAPISidePanel.idl
* Source/WebKit/DerivedSources-output.xcfilelist: Add
JSWebExtensionAPISidebarAction.{h,mm} and
JSWebExtensionAPISidePanel.{h,mm}
* Source/WebKit/DerivedSources.make: Add WebExtensionAPISidebarAction
and WebExtensionAPISidePanel interfaces
* Source/WebKit/WebKit.xcodeproj/project.pbxproj: Update project to
include new files and derived sources
*
Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPINamespaceCocoa.mm:
(WebKit::WebExtensionAPINamespace::isPropertyAllowed): Add cases for
sidebarAction and sidePanel properties (stubbed, both return `false` for
now).
(WebKit::WebExtensionAPINamespace::sidebarAction): Add getter for
m_sidebarAction
(WebKit::WebExtensionAPINamespace::sidePanel): Add getter for
m_sidePanel
*
Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPISidePanelCocoa.mm:
Added.
(WebKit::WebExtensionAPISidePanel::getOptions): Add stub for API
function returning 'Error: Unimplemented'
(WebKit::WebExtensionAPISidePanel::setOptions): Add stub for API
function returning 'Error: Unimplemented'
(WebKit::WebExtensionAPISidePanel::getPanelBehavior): Add stub for API
function returning 'Error: Unimplemented'
(WebKit::WebExtensionAPISidePanel::setPanelBehavior): Add stub for API
function returning 'Error: Unimplemented'
(WebKit::WebExtensionAPISidePanel::open): Add stub for API
function returning 'Error: Unimplemented'
*
Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPISidebarActionCocoa.mm:
Added.
(WebKit::WebExtensionAPISidebarAction::open): Add stub for API
function returning 'Error: Unimplemented'
(WebKit::WebExtensionAPISidebarAction::isOpen): Add stub for API
function returning 'Error: Unimplemented'
(WebKit::WebExtensionAPISidebarAction::close): Add stub for API
function returning 'Error: Unimplemented'
(WebKit::WebExtensionAPISidebarAction::toggle): Add stub for API
function returning 'Error: Unimplemented'
(WebKit::WebExtensionAPISidebarAction::getPanel): Add stub for API
function returning 'Error: Unimplemented'
(WebKit::WebExtensionAPISidebarAction::setPanel): Add stub for API
function returning 'Error: Unimplemented'
(WebKit::WebExtensionAPISidebarAction::getTitle): Add stub for API
function returning 'Error: Unimplemented'
(WebKit::WebExtensionAPISidebarAction::setTitle): Add stub for API
function returning 'Error: Unimplemented'
(WebKit::WebExtensionAPISidebarAction::setIcon): Add stub for API
function returning 'Error: Unimplemented'
* Source/WebKit/WebProcess/Extensions/API/WebExtensionAPINamespace.h:
Add m_sidebarAction and m_sidePanel private members, add declaration
for corresponding getters.
* Source/WebKit/WebProcess/Extensions/API/WebExtensionAPISidePanel.h: Added.
* Source/WebKit/WebProcess/Extensions/API/WebExtensionAPISidebarAction.h: Added.
* Source/WebKit/WebProcess/Extensions/Interfaces/WebExtensionAPINamespace.idl:
Add namespace properties for sidebarAction and sidePanel.
* Source/WebKit/WebProcess/Extensions/Interfaces/WebExtensionAPISidePanel.idl:
Added.
*
Source/WebKit/WebProcess/Extensions/Interfaces/WebExtensionAPISidebarAction.idl:
Added.
Canonical link: https://commits.webkit.org/281149@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