[webkit-changes] [WebKit/WebKit] 1c1d09: [macOS][Writing Tools] Add `WKWebView` SPI to disp...
Aditya Keerthi
noreply at github.com
Fri Aug 30 15:50:06 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1c1d099cf602ba499634fcc7d29a50cc0a1a4fd4
https://github.com/WebKit/WebKit/commit/1c1d099cf602ba499634fcc7d29a50cc0a1a4fd4
Author: Aditya Keerthi <akeerthi at apple.com>
Date: 2024-08-30 (Fri, 30 Aug 2024)
Changed paths:
M Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
M Source/WebKit/UIProcess/API/mac/WKWebViewMac.mm
M Source/WebKit/UIProcess/mac/WebViewImpl.h
M Source/WebKit/UIProcess/mac/WebViewImpl.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WritingTools.mm
Log Message:
-----------
[macOS][Writing Tools] Add `WKWebView` SPI to display the panel
https://bugs.webkit.org/show_bug.cgi?id=278939
rdar://134965328
Reviewed by Richard Robinson and Wenson Hsieh.
Add SPI to let clients programmatically show the Writing Tools panel.
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:
* Source/WebKit/UIProcess/API/mac/WKWebViewMac.mm:
(-[WKWebView _showWritingTools]):
* Source/WebKit/UIProcess/mac/WebViewImpl.h:
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::WebViewImpl::showWritingTools):
If there is no selection, or the selection is a caret the panel will be anchored
to the view. Otherwise, it will be anchored to the selection.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WritingTools.mm:
(TEST(WritingTools, ShowPanelWithNoSelection)):
(TEST(WritingTools, ShowPanelWithCaretSelection)):
(TEST(WritingTools, ShowPanelWithRangedSelection)):
Canonical link: https://commits.webkit.org/282998@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list