Title: [227551] trunk/Tools
Revision
227551
Author
achristen...@apple.com
Date
2018-01-24 12:55:28 -0800 (Wed, 24 Jan 2018)

Log Message

Remove pre-Sierra-OS-specific code in Tools
https://bugs.webkit.org/show_bug.cgi?id=182034

Reviewed by Tim Horton.

* DumpRenderTree/mac/DumpRenderTree.mm:
(setDefaultsToConsistentValuesForTesting):
* MiniBrowser/mac/BrowserWindowController.m:
(-[BrowserWindowController windowDidLoad]):
(-[BrowserWindowController share:]):
* MiniBrowser/mac/MiniBrowser_Prefix.pch:
* TestRunnerShared/EventSerialization/mac/EventSerializerMac.mm:
(-[EventStreamPlayer playbackTimerFired:]):
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/FontCache.cpp: Removed.
* TestWebKitAPI/Tests/WebKitCocoa/RunOpenPanel.mm:
* TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm:
(TestWebKitAPI::PageVisibilityStateWithWindowChanges::runTest):
* WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
(WTR::InjectedBundle::platformInitialize):
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::initializeWebViewConfiguration):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (227550 => 227551)


--- trunk/Tools/ChangeLog	2018-01-24 20:53:01 UTC (rev 227550)
+++ trunk/Tools/ChangeLog	2018-01-24 20:55:28 UTC (rev 227551)
@@ -1,3 +1,28 @@
+2018-01-24  Alex Christensen  <achristen...@webkit.org>
+
+        Remove pre-Sierra-OS-specific code in Tools
+        https://bugs.webkit.org/show_bug.cgi?id=182034
+
+        Reviewed by Tim Horton.
+
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (setDefaultsToConsistentValuesForTesting):
+        * MiniBrowser/mac/BrowserWindowController.m:
+        (-[BrowserWindowController windowDidLoad]):
+        (-[BrowserWindowController share:]):
+        * MiniBrowser/mac/MiniBrowser_Prefix.pch:
+        * TestRunnerShared/EventSerialization/mac/EventSerializerMac.mm:
+        (-[EventStreamPlayer playbackTimerFired:]):
+        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+        * TestWebKitAPI/Tests/WebCore/FontCache.cpp: Removed.
+        * TestWebKitAPI/Tests/WebKitCocoa/RunOpenPanel.mm:
+        * TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm:
+        (TestWebKitAPI::PageVisibilityStateWithWindowChanges::runTest):
+        * WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
+        (WTR::InjectedBundle::platformInitialize):
+        * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
+        (WTR::initializeWebViewConfiguration):
+
 2018-01-24  Alexey Proskuryakov  <a...@apple.com>
 
         REGRESSION (r226485): Many new wasm leaks detected by the leaks bot

Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (227550 => 227551)


--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm	2018-01-24 20:53:01 UTC (rev 227550)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm	2018-01-24 20:55:28 UTC (rev 227551)
@@ -1039,9 +1039,6 @@
         @"NSOverlayScrollersEnabled": @NO,
         @"AppleShowScrollBars": @"Always",
         @"NSButtonAnimationsEnabled": @NO, // Ideally, we should find a way to test animations, but for now, make sure that the dumped snapshot matches actual state.
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
-        @"AppleSystemFontOSSubversion": @(10),
-#endif
         @"NSWindowDisplayWithRunLoopObserver": @YES, // Temporary workaround, see <rdar://problem/20351297>.
         @"AppleEnableSwipeNavigateWithScrolls": @YES,
         @"com.apple.swipescrolldirection": @1,
@@ -1049,20 +1046,11 @@
 
     [[NSUserDefaults standardUserDefaults] setValuesForKeysWithDictionary:dict];
 
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
-    // Make NSFont use the new defaults.
-    [NSFont initialize];
-#endif
-
     NSDictionary *processInstanceDefaults = @{
         WebDatabaseDirectoryDefaultsKey: [libraryPath stringByAppendingPathComponent:@"Databases"],
         WebStorageDirectoryDefaultsKey: [libraryPath stringByAppendingPathComponent:@"LocalStorage"],
         WebKitLocalCacheDefaultsKey: [libraryPath stringByAppendingPathComponent:@"LocalCache"],
         WebKitResourceLoadStatisticsDirectoryDefaultsKey: [libraryPath stringByAppendingPathComponent:@"LocalStorage"],
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
-        // This needs to also be added to argument domain because of <rdar://problem/20210002>.
-        @"AppleSystemFontOSSubversion": @(10),
-#endif
     };
 
     [[NSUserDefaults standardUserDefaults] setVolatileDomain:processInstanceDefaults forName:NSArgumentDomain];

Modified: trunk/Tools/MiniBrowser/mac/BrowserWindowController.m (227550 => 227551)


--- trunk/Tools/MiniBrowser/mac/BrowserWindowController.m	2018-01-24 20:53:01 UTC (rev 227550)
+++ trunk/Tools/MiniBrowser/mac/BrowserWindowController.m	2018-01-24 20:55:28 UTC (rev 227551)
@@ -40,12 +40,7 @@
 
 - (void)windowDidLoad
 {
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
     [share sendActionOn:NSEventMaskLeftMouseDown];
-#else
-    [share sendActionOn:NSLeftMouseDownMask];
-#endif
-
     [super windowDidLoad];
 }
 
@@ -77,11 +72,7 @@
 {
     NSSharingServicePicker *picker = [[NSSharingServicePicker alloc] initWithItems:@[ self.currentURL ]];
     picker.delegate = self;
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
     [picker showRelativeToRect:NSZeroRect ofView:sender preferredEdge:NSRectEdgeMinY];
-#else
-    [picker showRelativeToRect:NSZeroRect ofView:sender preferredEdge:NSMinYEdge];
-#endif
 }
 
 - (IBAction)fetch:(id)sender

Modified: trunk/Tools/MiniBrowser/mac/MiniBrowser_Prefix.pch (227550 => 227551)


--- trunk/Tools/MiniBrowser/mac/MiniBrowser_Prefix.pch	2018-01-24 20:53:01 UTC (rev 227550)
+++ trunk/Tools/MiniBrowser/mac/MiniBrowser_Prefix.pch	2018-01-24 20:55:28 UTC (rev 227551)
@@ -26,14 +26,8 @@
 #ifdef __OBJC__
 #import <Cocoa/Cocoa.h>
 #import <WebKit/WebKit.h>
-
-#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101200
-static const NSEventModifierFlags NSEventModifierFlagCommand =  NSCommandKeyMask;
-static const NSEventModifierFlags NSEventModifierFlagOption = NSAlternateKeyMask;
 #endif
 
-#endif
-
 #define ENABLE_LOGGING 0
 
 #if ENABLE_LOGGING

Modified: trunk/Tools/TestRunnerShared/EventSerialization/mac/EventSerializerMac.mm (227550 => 227551)


--- trunk/Tools/TestRunnerShared/EventSerialization/mac/EventSerializerMac.mm	2018-01-24 20:53:01 UTC (rev 227550)
+++ trunk/Tools/TestRunnerShared/EventSerialization/mac/EventSerializerMac.mm	2018-01-24 20:55:28 UTC (rev 227551)
@@ -294,11 +294,7 @@
     if ([_remainingEventDictionaries count])
         return;
 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
     NSEventType applicationDefinedEventType = NSEventTypeApplicationDefined;
-#else
-    NSEventType applicationDefinedEventType = NSApplicationDefined;
-#endif
     [NSApp postEvent:[NSEvent otherEventWithType:applicationDefinedEventType location:NSZeroPoint modifierFlags:0 timestamp:0 windowNumber:0 context:0 subtype:0 data1:42 data2:0] atStart:NO];
     // Block until we send the last event we posted.
     while (true) {

Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/FontCache.cpp (227550 => 227551)


--- trunk/Tools/TestWebKitAPI/Tests/WebCore/FontCache.cpp	2018-01-24 20:53:01 UTC (rev 227550)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/FontCache.cpp	2018-01-24 20:55:28 UTC (rev 227551)
@@ -37,7 +37,7 @@
 
 namespace TestWebKitAPI {
 
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 && __MAC_OS_X_VERSION_MIN_REQUIRED < 101300
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101300
 
 class FontCacheTest : public testing::Test {
 public:

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/RunOpenPanel.mm (227550 => 227551)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/RunOpenPanel.mm	2018-01-24 20:53:01 UTC (rev 227550)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/RunOpenPanel.mm	2018-01-24 20:55:28 UTC (rev 227551)
@@ -25,7 +25,7 @@
 
 #import "config.h"
 
-#if WK_API_ENABLED && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
+#if WK_API_ENABLED && PLATFORM(MAC)
 
 #import "PlatformUtilities.h"
 #import "TestNavigationDelegate.h"
@@ -82,4 +82,4 @@
     
 } // namespace TestWebKitAPI
 
-#endif // WK_API_ENABLED && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
+#endif // WK_API_ENABLED && PLATFORM(MAC)

Modified: trunk/Tools/TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm (227550 => 227551)


--- trunk/Tools/TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm	2018-01-24 20:53:01 UTC (rev 227550)
+++ trunk/Tools/TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm	2018-01-24 20:55:28 UTC (rev 227551)
@@ -123,14 +123,8 @@
     EXPECT_JS_EQ(view, "document.visibilityState", "prerender");
     EXPECT_JS_EQ(view, "document.hidden", "true");
 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
-    NSWindowStyleMask windowStyle = NSWindowStyleMaskBorderless | NSWindowStyleMaskMiniaturizable;
-#else
-    NSUInteger windowStyle = NSBorderlessWindowMask | NSMiniaturizableWindowMask;
-#endif
-
     // Add it to a non-visible window. PageVisibility should still be "prerender".
-    RetainPtr<NSWindow> window = adoptNS([[NSWindow alloc] initWithContentRect:view.frame styleMask:windowStyle backing:NSBackingStoreBuffered defer:NO]);
+    RetainPtr<NSWindow> window = adoptNS([[NSWindow alloc] initWithContentRect:view.frame styleMask:NSWindowStyleMaskBorderless | NSWindowStyleMaskMiniaturizable backing:NSBackingStoreBuffered defer:NO]);
     [window.get().contentView addSubview:view];
     EXPECT_NOT_NULL([view window]);
     EXPECT_NOT_NULL([view superview]);

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm (227550 => 227551)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm	2018-01-24 20:53:01 UTC (rev 227550)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm	2018-01-24 20:55:28 UTC (rev 227551)
@@ -76,9 +76,6 @@
             @"wellcome": @"welcome",
             @"hellolfworld": @"hello\nworld"
         },
-#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
-        @"AppleSystemFontOSSubversion": @(10),
-#endif
         @"AppleEnableSwipeNavigateWithScrolls": @YES,
         @"com.apple.swipescrolldirection": @1,
         @"com.apple.trackpad.forceClick": @1,
@@ -86,11 +83,6 @@
 
     [[NSUserDefaults standardUserDefaults] setVolatileDomain:dict forName:NSArgumentDomain];
 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
-    // Make NSFont use the new defaults.
-    [NSFont initialize];
-#endif
-
     // Underlying frameworks have already read AppleAntiAliasingThreshold default before we changed it.
     // A distributed notification is delivered to all applications, but it should be harmless, and it's the only way to update all underlying frameworks anyway.
     [[NSDistributedNotificationCenter defaultCenter] postNotificationName:@"AppleAquaAntiAliasingChanged" object:nil userInfo:nil deliverImmediately:YES];

Modified: trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm (227550 => 227551)


--- trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm	2018-01-24 20:53:01 UTC (rev 227550)
+++ trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm	2018-01-24 20:55:28 UTC (rev 227551)
@@ -71,10 +71,7 @@
     globalWebViewConfiguration.processPool = (WKProcessPool *)context;
     globalWebViewConfiguration.websiteDataStore = (WKWebsiteDataStore *)WKContextGetWebsiteDataStore(context);
     globalWebViewConfiguration._allowUniversalAccessFromFileURLs = YES;
-
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || PLATFORM(IOS)
     globalWebViewConfiguration._applePayEnabled = YES;
-#endif
 
 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || PLATFORM(IOS)
     WKCookieManagerSetCookieStoragePartitioningEnabled(WKContextGetCookieManager(context), true);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to