Summary: | [iOS] Replace deprecated -[UIDocumentMenuViewController _setIgnoreApplicationEntitlementForImport:] | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jon Honeycutt <jhoneycutt> | ||||||||
Component: | Forms | Assignee: | Jon Honeycutt <jhoneycutt> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | aestes, andersca, commit-queue, dbates, ddkilzer, lforschler, mitz, sam | ||||||||
Priority: | P2 | Keywords: | InRadar, PlatformOnly | ||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | iOS 8.2 | ||||||||||
Attachments: |
|
Description
Jon Honeycutt
2015-06-05 02:44:37 PDT
Created attachment 254349 [details]
Patch
Comment on attachment 254349 [details]
Patch
Unless the new method is supported in iOS 8.x, we need to add a #if version check here.
Comment on attachment 254349 [details]
Patch
As I noted in the previous comment, to support building on iOS 8.x, we need to add version checks:
#if __IPHONE_OS_VERSION_MIN_REQUIRED < 90000
// iOS 8 code
#else
// Mysterious future code
#endif
The content of attachment 254349 [details] has been deleted by David Kilzer (:ddkilzer) <ddkilzer@webkit.org> without providing any reason. The token used to delete this attachment was generated at 2015-06-05 12:43:37 PDT. Created attachment 254390 [details]
Patch
Comment on attachment 254390 [details]
Patch
This looks correct. I'll attempt to merge and land if it builds and runs.
Created attachment 268977 [details]
Rebaselined Patch
Comment on attachment 268977 [details] Rebaselined Patch View in context: https://bugs.webkit.org/attachment.cgi?id=268977&action=review > Source/WebKit2/Platform/spi/ios/UIKitSPI.h:88 > #import <UIKit/UIDocumentMenuViewController_Private.h> > #else > @interface UIDocumentMenuViewController () > -@property (nonatomic, assign, setter = _setIgnoreApplicationEntitlementForImport:, getter = _ignoreApplicationEntitlementForImport) BOOL _ignoreApplicationEntitlementForImport; > +- (instancetype)_initIgnoringApplicationEntitlementForImportOfTypes:(NSArray *)types; > @end > #endif I suggest that you address the FIXME on line 81 instead of doing this here. > Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm:378 > // FIXME: Remove this check and the fallback code when a new SDK is available. <rdar://problem/20150072> > - if ([UIDocumentMenuViewController instancesRespondToSelector:@selector(_setIgnoreApplicationEntitlementForImport:)]) { > + if ([UIDocumentMenuViewController instancesRespondToSelector:@selector(_initIgnoringApplicationEntitlementForImportOfTypes:)]) { You should address the FIXME instead of changing this. > Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm:518 > + _documentMenuController = adoptNS([[UIDocumentMenuViewController alloc] _initIgnoringApplicationEntitlementForImportOfTypes:[self _documentPickerMenuMediaTypes]]); You can write self._documentPickerMenuMediaTypes instead of using brackets. Comment on attachment 268977 [details] Rebaselined Patch Clearing flags on attachment: 268977 Committed r195171: <http://trac.webkit.org/changeset/195171> All reviewed patches have been landed. Closing bug. Kind of disappointing that none of my comments were addressed. |