Bug 147173 - Animated images should animate in previews
Summary: Animated images should animate in previews
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-21 16:38 PDT by Beth Dakin
Modified: 2015-07-22 12:17 PDT (History)
4 users (show)

See Also:


Attachments
Patch (9.36 KB, patch)
2015-07-21 17:04 PDT, Beth Dakin
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Beth Dakin 2015-07-21 16:38:57 PDT
Animated images should animate in previews

rdar://problem/21637698
Comment 1 Beth Dakin 2015-07-21 17:04:55 PDT
Created attachment 257219 [details]
Patch
Comment 2 mitz 2015-07-21 17:14:48 PDT
Comment on attachment 257219 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=257219&action=review

> Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h:69
> +- (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForAnimatedImageAtURL:(NSURL *)url defaultActions:(NSArray *)actions elementInfo:(_WKActivatedElementInfo *)elementInfo imageSize:(CGSize)imageSize WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);

This (and some of the earlier-added) NSArray * argument should be a WK_ARRAY() of the appropriate type.

> Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:3288
> +            RetainPtr<NSArray> actions = [_actionSheetAssistant defaultActionsForImageSheet:elementInfo.get()];

Why get the actions and change _previewType outside the below if?
Comment 3 Beth Dakin 2015-07-22 11:46:05 PDT
(In reply to comment #2)
> Comment on attachment 257219 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=257219&action=review
> 
> > Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h:69
> > +- (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForAnimatedImageAtURL:(NSURL *)url defaultActions:(NSArray *)actions elementInfo:(_WKActivatedElementInfo *)elementInfo imageSize:(CGSize)imageSize WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
> 
> This (and some of the earlier-added) NSArray * argument should be a
> WK_ARRAY() of the appropriate type.
> 

Fixed this and the earlier-added arguments!

> > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:3288
> > +            RetainPtr<NSArray> actions = [_actionSheetAssistant defaultActionsForImageSheet:elementInfo.get()];
> 
> Why get the actions and change _previewType outside the below if?

No good reason! Fixed.

Thanks Dan!
Comment 4 Beth Dakin 2015-07-22 12:17:00 PDT
http://trac.webkit.org/changeset/187173