WebKit Bugzilla
Attachment 368866 Details for
Bug 197540
: Need additional UIPreviewAction information in WKImagePreviewViewController
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197540-20190503120233.patch (text/plain), 2.88 KB, created by
Dean Jackson
on 2019-05-02 19:02:35 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Dean Jackson
Created:
2019-05-02 19:02:35 PDT
Size:
2.88 KB
patch
obsolete
>Subversion Revision: 244839 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 7a1dd8a896acbb712b0a3e2ef7b121fdb5a45732..407ed203e4e65004fc67047e9807263da8c78912 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,20 @@ >+2019-05-02 Dean Jackson <dino@apple.com> >+ >+ Need additional UIPreviewAction information in WKImagePreviewViewController >+ https://bugs.webkit.org/show_bug.cgi?id=197540 >+ <rdar://problem/50430510> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Include a WebKitAdditions file to provide a macro for >+ additional UIPreviewAction information. >+ >+ While here, take the opportunity to move from the deprecated >+ UIViewControllerPreviewAction to the newer UIPreviewAction. >+ >+ * UIProcess/WKImagePreviewViewController.mm: >+ (-[WKImagePreviewViewController previewActionItems]): >+ > 2019-05-02 Dean Jackson <dino@apple.com> > > Provide UIImages for element actions >diff --git a/Source/WebKit/UIProcess/WKImagePreviewViewController.mm b/Source/WebKit/UIProcess/WKImagePreviewViewController.mm >index ce4065a6560202fde721d05256cd8171db65c0c3..ca482ccdccada29a9010feaaa6c7fce97dc704e3 100644 >--- a/Source/WebKit/UIProcess/WKImagePreviewViewController.mm >+++ b/Source/WebKit/UIProcess/WKImagePreviewViewController.mm >@@ -32,6 +32,12 @@ > #import <WebCore/IntSize.h> > #import <_WKElementAction.h> > >+#if USE(APPLE_INTERNAL_SDK) && __has_include(<WebKitAdditions/WKImagePreviewViewControllerAdditions.mm>) >+#include <WebKitAdditions/WKImagePreviewViewControllerAdditions.mm> >+#else >+#define ADDITIONAL_PREVIEW_ACTION_ITEM_INFO >+#endif >+ > @implementation WKImagePreviewViewController { > RetainPtr<CGImageRef> _image; > RetainPtr<UIImageView> _imageView; >@@ -93,15 +99,14 @@ static CGSize _scaleSizeWithinSize(CGSize source, CGSize destination) > } > > #if HAVE(LINK_PREVIEW) >-IGNORE_WARNINGS_BEGIN("deprecated-implementations") >-- (NSArray <UIViewControllerPreviewAction *> *)previewActions >-IGNORE_WARNINGS_END >+- (NSArray<UIPreviewAction *> *)previewActionItems > { >- NSMutableArray<UIViewControllerPreviewAction *> *previewActions = [NSMutableArray array]; >+ NSMutableArray<UIPreviewAction *> *previewActions = [NSMutableArray array]; > for (_WKElementAction *imageAction in _imageActions.get()) { >- UIViewControllerPreviewAction *previewAction = [UIViewControllerPreviewAction actionWithTitle:imageAction.title handler:^(UIViewControllerPreviewAction *action, UIViewController *previewViewController) { >+ UIPreviewAction *previewAction = [UIPreviewAction actionWithTitle:imageAction.title style:UIPreviewActionStyleDefault handler:^(UIPreviewAction *action, UIViewController *previewViewController) { > [imageAction runActionWithElementInfo:_activatedElementInfo.get()]; > }]; >+ ADDITIONAL_PREVIEW_ACTION_ITEM_INFO; > > [previewActions addObject:previewAction]; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
wenson_hsieh
:
review+
ews-watchlist
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197540
:
368863
|
368865
| 368866 |
368874