Changeset 195171 in webkit


Ignore:
Timestamp:
Jan 16, 2016 11:03:08 AM (8 years ago)
Author:
jhoneycutt@apple.com
Message:

[iOS] Replace deprecated -[UIDocumentMenuViewController
_setIgnoreApplicationEntitlementForImport:]

<https://bugs.webkit.org/show_bug.cgi?id=145690>
<rdar://problem/20636577>

Reviewed by Brent Fulgham.

  • Platform/spi/ios/UIKitSPI.h:

Replace deprecated SPI with newer SPI.

  • UIProcess/ios/forms/WKFileUploadPanel.mm:

(-[WKFileUploadPanel presentWithParameters:resultListener:]):
(-[WKFileUploadPanel _showDocumentPickerMenu]):
Ditto.

Location:
trunk/Source/WebKit2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r195168 r195171  
     12016-01-16  Jon Honeycutt  <jhoneycutt@apple.com>
     2
     3        [iOS] Replace deprecated -[UIDocumentMenuViewController
     4        _setIgnoreApplicationEntitlementForImport:]
     5
     6        <https://bugs.webkit.org/show_bug.cgi?id=145690>
     7        <rdar://problem/20636577>
     8
     9        Reviewed by Brent Fulgham.
     10
     11        * Platform/spi/ios/UIKitSPI.h:
     12        Replace deprecated SPI with newer SPI.
     13
     14        * UIProcess/ios/forms/WKFileUploadPanel.mm:
     15        (-[WKFileUploadPanel presentWithParameters:resultListener:]):
     16        (-[WKFileUploadPanel _showDocumentPickerMenu]):
     17        Ditto.
     18
    1192016-01-16  Michael Catanzaro  <mcatanzaro@igalia.com>
    220
  • trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h

    r191807 r195171  
    11/*
    2  * Copyright (C) 2014, 2015 Apple Inc. All rights reserved.
     2 * Copyright (C) 2014-2016 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    8484#else
    8585@interface UIDocumentMenuViewController ()
    86 @property (nonatomic, assign, setter = _setIgnoreApplicationEntitlementForImport:, getter = _ignoreApplicationEntitlementForImport) BOOL _ignoreApplicationEntitlementForImport;
     86- (instancetype)_initIgnoringApplicationEntitlementForImportOfTypes:(NSArray *)types;
    8787@end
    8888#endif
     
    764764
    765765@interface UIDocumentMenuViewController ()
    766 @property (nonatomic, assign, setter = _setIgnoreApplicationEntitlementForImport:, getter = _ignoreApplicationEntitlementForImport) BOOL _ignoreApplicationEntitlementForImport;
     766- (instancetype)_initIgnoringApplicationEntitlementForImportOfTypes:(NSArray *)types;
    767767@end
    768768
  • trunk/Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm

    r194496 r195171  
    11/*
    2  * Copyright (C) 2014 Apple Inc. All rights reserved.
     2 * Copyright (C) 2014, 2016 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    376376
    377377    // FIXME: Remove this check and the fallback code when a new SDK is available. <rdar://problem/20150072>
    378     if ([UIDocumentMenuViewController instancesRespondToSelector:@selector(_setIgnoreApplicationEntitlementForImport:)]) {
     378    if ([UIDocumentMenuViewController instancesRespondToSelector:@selector(_initIgnoringApplicationEntitlementForImportOfTypes:)]) {
    379379        [self _showDocumentPickerMenu];
    380380        return;
     
    516516{
    517517    // FIXME: Support multiple file selection when implemented. <rdar://17177981>
    518     // FIXME: We call -_setIgnoreApplicationEntitlementForImport: before initialization, because the assertion we're trying
    519     // to suppress is in the initializer. <rdar://problem/20137692> tracks doing this with a private initializer.
    520     _documentMenuController = adoptNS([UIDocumentMenuViewController alloc]);
    521 #pragma clang diagnostic push
    522 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
    523     [_documentMenuController _setIgnoreApplicationEntitlementForImport:YES];
    524 #pragma clang diagnostic pop
    525     [_documentMenuController initWithDocumentTypes:[self _documentPickerMenuMediaTypes] inMode:UIDocumentPickerModeImport];
     518    _documentMenuController = adoptNS([[UIDocumentMenuViewController alloc] _initIgnoringApplicationEntitlementForImportOfTypes:[self _documentPickerMenuMediaTypes]]);
    526519    [_documentMenuController setDelegate:self];
    527520
Note: See TracChangeset for help on using the changeset viewer.