Fix some deprecation warnings in WebEditingTester
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Mar 2016 00:55:12 +0000 (00:55 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Mar 2016 00:55:12 +0000 (00:55 +0000)
https://bugs.webkit.org/show_bug.cgi?id=155601

Reviewed by Simon Fraser.

* WebEditingTester/AppDelegate.m:
(-[WebEditingAppDelegate showOperations:]):
(-[WebEditingAppDelegate _updateNewWindowKeyEquivalents]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@198365 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/WebEditingTester/AppDelegate.m

index f6417de..73818be 100644 (file)
@@ -1,5 +1,16 @@
 2016-03-17  Tim Horton  <timothy_horton@apple.com>
 
+        Fix some deprecation warnings in WebEditingTester
+        https://bugs.webkit.org/show_bug.cgi?id=155601
+
+        Reviewed by Simon Fraser.
+
+        * WebEditingTester/AppDelegate.m:
+        (-[WebEditingAppDelegate showOperations:]):
+        (-[WebEditingAppDelegate _updateNewWindowKeyEquivalents]):
+
+2016-03-17  Tim Horton  <timothy_horton@apple.com>
+
         Find-in-page indicator in Mail viewer is the wrong scale and cut off
         https://bugs.webkit.org/show_bug.cgi?id=155605
         <rdar://problem/23948165>
index 200ae9d..640adc5 100644 (file)
@@ -77,7 +77,7 @@ static NSString * const UseWebKit2ByDefaultPreferenceKey = @"UseWebKit2ByDefault
     static BOOL initialized = NO;
 
     if (!initialized) {
-        NSFont *font = [NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize:NSMiniControlSize]];
+        NSFont *font = [NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize:NSControlSizeMini]];
         NSDictionary *attributes = [NSDictionary dictionaryWithObject:font forKey:NSFontAttributeName];
         NSArray *operations = editingOperations();
         
@@ -104,7 +104,7 @@ static NSString * const UseWebKit2ByDefaultPreferenceKey = @"UseWebKit2ByDefault
             }
             NSButton *button = [[NSButton alloc] initWithFrame:NSMakeRect(x, y, maxWidth, 16)];
             [button setBezelStyle:NSRoundedBezelStyle];
-            [button.cell setControlSize:NSMiniControlSize];
+            [button.cell setControlSize:NSControlSizeMini];
             [button setFont:font];
             [button setTitle:operationName];
             [button setAction:NSSelectorFromString(operationName)];
@@ -202,11 +202,11 @@ static NSString * const UseWebKit2ByDefaultPreferenceKey = @"UseWebKit2ByDefault
 - (void)_updateNewWindowKeyEquivalents
 {
     if (self.useWebKit2ByDefault) {
-        [_newWebKit1EditorItem setKeyEquivalentModifierMask:NSCommandKeyMask | NSAlternateKeyMask];
-        [_newWebKit2EditorItem setKeyEquivalentModifierMask:NSCommandKeyMask];
+        [_newWebKit1EditorItem setKeyEquivalentModifierMask:NSEventModifierFlagCommand | NSEventModifierFlagOption];
+        [_newWebKit2EditorItem setKeyEquivalentModifierMask:NSEventModifierFlagCommand];
     } else {
-        [_newWebKit1EditorItem setKeyEquivalentModifierMask:NSCommandKeyMask];
-        [_newWebKit2EditorItem setKeyEquivalentModifierMask:NSCommandKeyMask | NSAlternateKeyMask];
+        [_newWebKit1EditorItem setKeyEquivalentModifierMask:NSEventModifierFlagCommand];
+        [_newWebKit2EditorItem setKeyEquivalentModifierMask:NSEventModifierFlagCommand | NSEventModifierFlagOption];
     }
 }