Title: [223857] trunk/Source/WebKit
Revision
223857
Author
[email protected]
Date
2017-10-23 14:58:42 -0700 (Mon, 23 Oct 2017)

Log 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.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (223856 => 223857)


--- trunk/Source/WebKit/ChangeLog	2017-10-23 21:34:59 UTC (rev 223856)
+++ trunk/Source/WebKit/ChangeLog	2017-10-23 21:58:42 UTC (rev 223857)
@@ -1,3 +1,17 @@
+2017-10-23  Tim Horton  <[email protected]>
+
+        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.
+
 2017-10-23  Ryan Haddad  <[email protected]>
 
         Unreviewed, suppress deprecation warnings to fix the build.

Modified: trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h (223856 => 223857)


--- trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h	2017-10-23 21:34:59 UTC (rev 223856)
+++ trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h	2017-10-23 21:58:42 UTC (rev 223857)
@@ -982,7 +982,6 @@
 extern UIApplication *UIApp;
 BOOL _UIApplicationIsExtension(void);
 void _UIApplicationLoadWebKit(void);
-BOOL _UIApplicationUsesLegacyUI(void);
 
 void UIImageDataWriteToSavedPhotosAlbum(NSData *imageData, id completionTarget, SEL completionSelector, void *contextInfo);
 

Modified: trunk/Source/WebKit/UIProcess/ios/forms/WKFormSelectPopover.mm (223856 => 223857)


--- trunk/Source/WebKit/UIProcess/ios/forms/WKFormSelectPopover.mm	2017-10-23 21:34:59 UTC (rev 223856)
+++ trunk/Source/WebKit/UIProcess/ios/forms/WKFormSelectPopover.mm	2017-10-23 21:58:42 UTC (rev 223857)
@@ -264,11 +264,8 @@
     ASSERT(textRect.size.width > 0.0);
     
     // Assume all cells have the same available text width.
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-    CGFloat initialFontSize = _UIApplicationUsesLegacyUI() ? UITableViewCellDefaultFontSize : cell.textLabel.font.pointSize;
-    UIFont *font = _UIApplicationUsesLegacyUI() ? [UIFont boldSystemFontOfSize:initialFontSize] : cell.textLabel.font;
-#pragma clang diagnostic pop
+    UIFont *font = cell.textLabel.font;
+    CGFloat initialFontSize = font.pointSize;
     ASSERT(initialFontSize);
     if (textRect.size.width != _maximumTextWidth || _fontSize == 0) {
         _maximumTextWidth = textRect.size.width;
@@ -393,19 +390,10 @@
     UIViewController *popoverViewController = _tableViewController.get();
     UINavigationController *navController = nil;
     NSString *title = view.assistedNodeInformation.title;
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-    BOOL needsNavigationController = (self.view && _UIApplicationUsesLegacyUI()) || [title length];
-#pragma clang diagnostic pop
+    BOOL needsNavigationController = !!title.length;
     if (needsNavigationController) {
         navController = [[UINavigationController alloc] initWithRootViewController:_tableViewController.get()];
         popoverViewController = navController;
-        
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-        if (self.view.assistedNodeInformation.isMultiSelect && _UIApplicationUsesLegacyUI())
-#pragma clang diagnostic pop
-            _tableViewController.get().navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(_userActionDismissedPopover:)] autorelease];
     }
     
     CGSize popoverSize = [_tableViewController.get().tableView sizeThatFits:CGSizeMake(320, CGFLOAT_MAX)];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to