Changeset 290103 in webkit
- Timestamp:
- Feb 17, 2022, 6:31:16 PM (4 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r290098 r290103 1 2022-02-17 Kate Cheney <katherine_cheney@apple.com> 2 3 Refactor share menu item presentation 4 https://bugs.webkit.org/show_bug.cgi?id=236806 5 <rdar://problem/88858606> 6 7 Reviewed by Aditya Keerthi. 8 9 * page/ContextMenuController.cpp: 10 (WebCore::ContextMenuController::populate): 11 1 12 2022-02-17 Aditya Keerthi <akeerthi@apple.com> 2 13 -
trunk/Source/WebCore/PAL/ChangeLog
r290076 r290103 1 2022-02-17 Kate Cheney <katherine_cheney@apple.com> 2 3 Refactor share menu item presentation 4 https://bugs.webkit.org/show_bug.cgi?id=236806 5 <rdar://problem/88858606> 6 7 Reviewed by Aditya Keerthi. 8 9 * pal/spi/mac/NSSharingServicePickerSPI.h: 10 1 11 2022-02-17 Jer Noble <jer.noble@apple.com> 2 12 -
trunk/Source/WebCore/PAL/pal/spi/mac/NSSharingServicePickerSPI.h
r261921 r290103 28 28 #import <AppKit/NSSharingService_Private.h> 29 29 30 @interface NSSharingServicePicker (Staging_r88855017) 31 - (NSMenuItem *)standardShareMenuItem; 32 @end 33 30 34 #else 31 35 … … 41 45 @interface NSSharingServicePicker (Private) 42 46 @property NSSharingServicePickerStyle style; 47 - (NSMenuItem *)standardShareMenuItem; 43 48 - (NSMenu *)menu; 44 49 - (void)getMenuWithCompletion:(void(^)(NSMenu *))completion; -
trunk/Source/WebCore/page/ContextMenuController.cpp
r289851 r290103 841 841 ContextMenuItem ShareMenuItem; 842 842 #else 843 ContextMenuItem ShareMenuItem( SubmenuType, ContextMenuItemTagShareMenu, emptyString());843 ContextMenuItem ShareMenuItem(ActionType, ContextMenuItemTagShareMenu, emptyString()); 844 844 #endif 845 845 -
trunk/Source/WebKit/ChangeLog
r290098 r290103 1 2022-02-17 Kate Cheney <katherine_cheney@apple.com> 2 3 Refactor share menu item presentation 4 https://bugs.webkit.org/show_bug.cgi?id=236806 5 <rdar://problem/88858606> 6 7 Reviewed by Aditya Keerthi. 8 9 * UIProcess/mac/WebContextMenuProxyMac.mm: 10 (WebKit::WebContextMenuProxyMac::setupServicesMenu): 11 (WebKit::WebContextMenuProxyMac::getShareMenuItem): 12 1 13 2022-02-17 Aditya Keerthi <akeerthi@apple.com> 2 14 -
trunk/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm
r289908 r290103 259 259 [[WKSharingServicePickerDelegate sharedSharingServicePickerDelegate] setAttachmentID:m_context.controlledImageAttachmentID()]; 260 260 261 m_menu = adoptNS([[picker menu] copy]); 261 if ([picker respondsToSelector:@selector(standardShareMenuItem)]) 262 m_menu = adoptNS([[[picker standardShareMenuItem] menu] copy]); 263 else 264 m_menu = adoptNS([[picker menu] copy]); 262 265 263 266 if (!hasControlledImage) … … 406 409 } 407 410 411 auto sharingServicePicker = adoptNS([[NSSharingServicePicker alloc] initWithItems:items.get()]); 412 if ([sharingServicePicker respondsToSelector:@selector(standardShareMenuItem)]) { 413 NSMenuItem *shareMenuItem = [sharingServicePicker standardShareMenuItem]; 414 shareMenuItem.identifier = _WKMenuItemIdentifierShareMenu; 415 completionHandler(shareMenuItem); 416 return; 417 } 418 408 419 getStandardShareMenuItem(items.get(), makeBlockPtr([completionHandler = WTFMove(completionHandler), protectedThis = Ref { *this }, this](NSMenuItem *item) mutable { 409 420 if (!item) {
Note:
See TracChangeset
for help on using the changeset viewer.