⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 236491 in webkit


Ignore:
Timestamp:
Sep 25, 2018, 6:18:53 PM (8 years ago)
Author:
Conrad Shultz
Message:

Enable customization of the file upload panel
https://bugs.webkit.org/show_bug.cgi?id=189970

Reviewed by Wenson Hsieh.

With this change, platform implementations can override, or implement in a category,
+[WKContentView _fileUploadPanelClass] as needed.

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _showRunOpenPanel:resultListener:]):

Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r236487 r236491  
     12018-09-25  Conrad Shultz  <conrad_shultz@apple.com>
     2
     3        Enable customization of the file upload panel
     4        https://bugs.webkit.org/show_bug.cgi?id=189970
     5
     6        Reviewed by Wenson Hsieh.
     7
     8        With this change, platform implementations can override, or implement in a category,
     9        +[WKContentView _fileUploadPanelClass] as needed.
     10
     11        * UIProcess/ios/WKContentViewInteraction.h:
     12        * UIProcess/ios/WKContentViewInteraction.mm:
     13        (-[WKContentView _showRunOpenPanel:resultListener:]):
     14
    1152018-09-25  Chris Dumez  <cdumez@apple.com>
    216
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h

    r235955 r236491  
    405405#endif
    406406
     407@interface WKContentView (WKFileUploadPanel)
     408+ (Class)_fileUploadPanelClass;
     409@end
     410
    407411#endif // PLATFORM(IOS)
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r236417 r236491  
    116116#if ENABLE(INPUT_TYPE_COLOR)
    117117#import "WKFormColorControl.h"
     118#endif
     119
     120#if USE(APPLE_INTERNAL_SDK) && __has_include(<WebKitAdditions/WKPlatformFileUploadPanel.mm>)
     121#import <WebKitAdditions/WKPlatformFileUploadPanel.mm>
    118122#endif
    119123
     
    47324736        return;
    47334737
    4734     _fileUploadPanel = adoptNS([[WKFileUploadPanel alloc] initWithView:self]);
     4738    Class ownClass = self.class;
     4739    Class panelClass = nil;
     4740    if ([ownClass respondsToSelector:@selector(_fileUploadPanelClass)])
     4741        panelClass = [ownClass _fileUploadPanelClass];
     4742    if (!panelClass)
     4743        panelClass = [WKFileUploadPanel class];
     4744
     4745    _fileUploadPanel = adoptNS([[panelClass alloc] initWithView:self]);
    47354746    [_fileUploadPanel setDelegate:self];
    47364747    [_fileUploadPanel presentWithParameters:parameters resultListener:listener];
Note: See TracChangeset for help on using the changeset viewer.