Changeset 223857 in webkit


Ignore:
Timestamp:
Oct 23, 2017 2:58:42 PM (6 years ago)
Author:
timothy_horton@apple.com
Message:

Stop using _UIApplicationUsesLegacyUI()
https://bugs.webkit.org/show_bug.cgi?id=178680
<rdar://problem/35131949>

Reviewed by Dan Bernstein.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/forms/WKFormSelectPopover.mm:

(-[WKSelectTableViewController tableView:cellForRowAtIndexPath:]):
(-[WKSelectPopover initWithView:hasGroups:]):
Resolve _UIApplicationUsesLegacyUI to false and simplify.

Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r223851 r223857  
     12017-10-23  Tim Horton  <timothy_horton@apple.com>
     2
     3        Stop using _UIApplicationUsesLegacyUI()
     4        https://bugs.webkit.org/show_bug.cgi?id=178680
     5        <rdar://problem/35131949>
     6
     7        Reviewed by Dan Bernstein.
     8
     9        * Platform/spi/ios/UIKitSPI.h:
     10        * UIProcess/ios/forms/WKFormSelectPopover.mm:
     11        (-[WKSelectTableViewController tableView:cellForRowAtIndexPath:]):
     12        (-[WKSelectPopover initWithView:hasGroups:]):
     13        Resolve _UIApplicationUsesLegacyUI to false and simplify.
     14
    1152017-10-23  Ryan Haddad  <ryanhaddad@apple.com>
    216
  • trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h

    r223647 r223857  
    983983BOOL _UIApplicationIsExtension(void);
    984984void _UIApplicationLoadWebKit(void);
    985 BOOL _UIApplicationUsesLegacyUI(void);
    986985
    987986void UIImageDataWriteToSavedPhotosAlbum(NSData *imageData, id completionTarget, SEL completionSelector, void *contextInfo);
  • trunk/Source/WebKit/UIProcess/ios/forms/WKFormSelectPopover.mm

    r223851 r223857  
    265265   
    266266    // Assume all cells have the same available text width.
    267 #pragma clang diagnostic push
    268 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
    269     CGFloat initialFontSize = _UIApplicationUsesLegacyUI() ? UITableViewCellDefaultFontSize : cell.textLabel.font.pointSize;
    270     UIFont *font = _UIApplicationUsesLegacyUI() ? [UIFont boldSystemFontOfSize:initialFontSize] : cell.textLabel.font;
    271 #pragma clang diagnostic pop
     267    UIFont *font = cell.textLabel.font;
     268    CGFloat initialFontSize = font.pointSize;
    272269    ASSERT(initialFontSize);
    273270    if (textRect.size.width != _maximumTextWidth || _fontSize == 0) {
     
    394391    UINavigationController *navController = nil;
    395392    NSString *title = view.assistedNodeInformation.title;
    396 #pragma clang diagnostic push
    397 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
    398     BOOL needsNavigationController = (self.view && _UIApplicationUsesLegacyUI()) || [title length];
    399 #pragma clang diagnostic pop
     393    BOOL needsNavigationController = !!title.length;
    400394    if (needsNavigationController) {
    401395        navController = [[UINavigationController alloc] initWithRootViewController:_tableViewController.get()];
    402396        popoverViewController = navController;
    403        
    404 #pragma clang diagnostic push
    405 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
    406         if (self.view.assistedNodeInformation.isMultiSelect && _UIApplicationUsesLegacyUI())
    407 #pragma clang diagnostic pop
    408             _tableViewController.get().navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(_userActionDismissedPopover:)] autorelease];
    409397    }
    410398   
Note: See TracChangeset for help on using the changeset viewer.