Changeset 189877 in webkit
- Timestamp:
- Sep 16, 2015 12:52:17 PM (9 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r189871 r189877 1 2015-09-16 Dan Bernstein <mitz@apple.com> 2 3 [iOS] Inline implementation of -[WKImagePreviewViewController previewActions] 4 https://bugs.webkit.org/show_bug.cgi?id=149224 5 6 Reviewed by Tim Horton. 7 8 * Platform/spi/ios/UIKitSPI.h: Declare UIViewControllerPreviewAction and its factory method. 9 * UIProcess/WKImagePreviewViewController.mm: 10 (-[WKImagePreviewViewController previewActions]): Moved here. 11 1 12 2015-09-16 Alexey Proskuryakov <ap@apple.com> 2 13 -
trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h
r189748 r189877 758 758 @end 759 759 760 @interface UIViewControllerPreviewAction : NSObject <NSCopying> 761 @end 762 763 @interface UIViewControllerPreviewAction () 764 + (instancetype)actionWithTitle:(NSString *)title handler:(void (^)(UIViewControllerPreviewAction *action, UIViewController *previewViewController))handler; 765 @end 766 760 767 #endif // USE(APPLE_INTERNAL_SDK) 761 768 -
trunk/Source/WebKit2/UIProcess/WKImagePreviewViewController.mm
r189674 r189877 92 92 } 93 93 94 #if USE(APPLE_INTERNAL_SDK) 95 #import <WebKitAdditions/WKImagePreviewViewController.mm> 94 #if HAVE(LINK_PREVIEW) 95 - (NSArray <UIViewControllerPreviewAction *> *)previewActions 96 { 97 NSMutableArray<UIViewControllerPreviewAction *> *previewActions = [NSMutableArray array]; 98 for (_WKElementAction *imageAction in _imageActions.get()) { 99 UIViewControllerPreviewAction *previewAction = [UIViewControllerPreviewAction actionWithTitle:imageAction.title handler:^(UIViewControllerPreviewAction *action, UIViewController *previewViewController) { 100 if ([imageAction respondsToSelector:@selector(runActionWithElementInfo:)]) 101 [imageAction runActionWithElementInfo:_activatedElementInfo.get()]; 102 }]; 103 104 [previewActions addObject:previewAction]; 105 } 106 107 return previewActions; 108 } 96 109 #endif 97 110
Note: See TracChangeset
for help on using the changeset viewer.