Title: [227378] trunk/Source/WebKit
Revision
227378
Author
jon...@apple.com
Date
2018-01-22 17:54:06 -0800 (Mon, 22 Jan 2018)

Log Message

Update title label size
https://bugs.webkit.org/show_bug.cgi?id=181962
rdar://problem/36754744

Reviewed by Simon Fraser.

* UIProcess/ios/WKFullScreenWindowControllerIOS.mm:
(-[_WKFullScreenViewController setLocation:secure:trustedName:trustedSite:]): Move titleLabel properties into
createSubviews.
(-[_WKFullScreenViewController createSubviews]): Set the title label for both the cancel and location buttons.
Refer to a const CGFloat for the font size.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (227377 => 227378)


--- trunk/Source/WebKit/ChangeLog	2018-01-23 01:45:27 UTC (rev 227377)
+++ trunk/Source/WebKit/ChangeLog	2018-01-23 01:54:06 UTC (rev 227378)
@@ -1,3 +1,17 @@
+2018-01-22  Jon Lee  <jon...@apple.com>
+
+        Update title label size
+        https://bugs.webkit.org/show_bug.cgi?id=181962
+        rdar://problem/36754744
+
+        Reviewed by Simon Fraser.
+
+        * UIProcess/ios/WKFullScreenWindowControllerIOS.mm:
+        (-[_WKFullScreenViewController setLocation:secure:trustedName:trustedSite:]): Move titleLabel properties into
+        createSubviews.
+        (-[_WKFullScreenViewController createSubviews]): Set the title label for both the cancel and location buttons.
+        Refer to a const CGFloat for the font size.
+
 2018-01-22  Megan Gardner  <megan_gard...@apple.com>
 
         Temporarily restore block selection code conditionally

Modified: trunk/Source/WebKit/UIProcess/ios/WKFullScreenWindowControllerIOS.mm (227377 => 227378)


--- trunk/Source/WebKit/UIProcess/ios/WKFullScreenWindowControllerIOS.mm	2018-01-23 01:45:27 UTC (rev 227377)
+++ trunk/Source/WebKit/UIProcess/ios/WKFullScreenWindowControllerIOS.mm	2018-01-23 01:54:06 UTC (rev 227378)
@@ -59,6 +59,7 @@
 
 static const NSTimeInterval showHideAnimationDuration = 0.1;
 static const NSTimeInterval autoHideDelay = 4.0;
+static const CGFloat fontSize = 12;
 
 static void replaceViewWithView(UIView *view, UIView *otherView)
 {
@@ -256,8 +257,6 @@
     [_locationButton setContentEdgeInsets:locationContentEdgeInsets];
     [_locationButton setImageEdgeInsets:locationImageEdgeInsets];
     [_locationButton setTitle:locationName forState:UIControlStateNormal];
-    [[_locationButton titleLabel] setLineBreakMode:NSLineBreakByTruncatingTail];
-    [[_locationButton titleLabel] setAdjustsFontSizeToFitWidth:NO];
 }
 
 - (void)createSubviews
@@ -274,6 +273,7 @@
     [[_cancelButton layer] setCompositingFilter:[CAFilter filterWithType:kCAFilterPlusL]];
     [_cancelButton setTitle:WEB_UI_STRING("Done", "Text of button that exits element fullscreen.") forState:UIControlStateNormal];
     [_cancelButton setTintColor:[UIColor whiteColor]];
+    [[_cancelButton titleLabel] setFont:[UIFont systemFontOfSize:fontSize]];
     [_cancelButton addTarget:self action:@selector(cancelAction:) forControlEvents:UIControlEventTouchUpInside];
 
     [[self view] addSubview:_cancelButton.get()];
@@ -283,6 +283,9 @@
     [_locationButton setAdjustsImageWhenHighlighted:NO];
     [_locationButton setBackgroundColor:[UIColor blackColor]];
     [[_locationButton layer] setCompositingFilter:[CAFilter filterWithType:kCAFilterPlusL]];
+    [[_locationButton titleLabel] setLineBreakMode:NSLineBreakByTruncatingTail];
+    [[_locationButton titleLabel] setAdjustsFontSizeToFitWidth:NO];
+    [[_locationButton titleLabel] setFont:[UIFont systemFontOfSize:fontSize]];
     [[self view] addSubview:_locationButton.get()];
 
     UILayoutGuide* containerGuide = [[self view] layoutMarginsGuide];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to