Title: [227550] trunk/Source/WebKit
Revision
227550
Author
achristen...@apple.com
Date
2018-01-24 12:53:01 -0800 (Wed, 24 Jan 2018)

Log Message

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

Reviewed by Tim Horton.

* PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
* Shared/Cocoa/DataDetectionResult.mm:
(WebKit::DataDetectionResult::encode const):
* Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
(IPC::ArgumentCoder<WebCore::Payment>::encode):
(IPC::ArgumentCoder<WebCore::PaymentContact>::encode):
(IPC::ArgumentCoder<WebCore::PaymentMerchantSession>::encode):
(IPC::ArgumentCoder<WebCore::PaymentMethod>::encode):
* Shared/WebPreferencesDefaultValues.h:
* Shared/cg/ShareableBitmapCG.cpp:
(WebKit::wantsExtendedRange):
* Shared/ios/InteractionInformationAtPosition.mm:
(WebKit::InteractionInformationAtPosition::encode const):
* Shared/mac/CodeSigning.mm:
(WebKit::codeSigningIdentifier):
(WebKit::codeSigningIdentifierForCurrentProcess):
* Shared/mac/ColorSpaceData.mm:
(WebKit::ColorSpaceData::encode const):
* Shared/mac/PasteboardTypes.mm:
(WebKit::PasteboardTypes::forURL):
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData):
(IPC::ArgumentCoder<Credential>::encodePlatformData):
(IPC::ArgumentCoder<ContentFilterUnblockHandler>::encode):
(IPC::ArgumentCoder<MediaPlaybackTargetContext>::encodePlatformData):
* Shared/mac/WebHitTestResultData.mm:
(WebKit::WebHitTestResultData::platformEncode const):
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _setObject:forBundleParameter:]):
(-[WKProcessPool _setObjectsForBundleParametersWithDictionary:]):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _handleAcceptedCandidate:]):
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::handleAcceptedCandidate):
(WebKit::WebViewImpl::performDragOperation):
* UIProcess/mac/WebPopupMenuProxyMac.mm:
(WebKit::WebPopupMenuProxyMac::showPopupMenu):
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]):
* WebProcess/com.apple.WebProcess.sb.in:

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (227549 => 227550)


--- trunk/Source/WebKit/ChangeLog	2018-01-24 20:52:02 UTC (rev 227549)
+++ trunk/Source/WebKit/ChangeLog	2018-01-24 20:53:01 UTC (rev 227550)
@@ -1,5 +1,54 @@
 2018-01-24  Alex Christensen  <achristen...@webkit.org>
 
+        Remove pre-Sierra-OS-specific code in WebKit
+        https://bugs.webkit.org/show_bug.cgi?id=182024
+
+        Reviewed by Tim Horton.
+
+        * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
+        * Shared/Cocoa/DataDetectionResult.mm:
+        (WebKit::DataDetectionResult::encode const):
+        * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
+        (IPC::ArgumentCoder<WebCore::Payment>::encode):
+        (IPC::ArgumentCoder<WebCore::PaymentContact>::encode):
+        (IPC::ArgumentCoder<WebCore::PaymentMerchantSession>::encode):
+        (IPC::ArgumentCoder<WebCore::PaymentMethod>::encode):
+        * Shared/WebPreferencesDefaultValues.h:
+        * Shared/cg/ShareableBitmapCG.cpp:
+        (WebKit::wantsExtendedRange):
+        * Shared/ios/InteractionInformationAtPosition.mm:
+        (WebKit::InteractionInformationAtPosition::encode const):
+        * Shared/mac/CodeSigning.mm:
+        (WebKit::codeSigningIdentifier):
+        (WebKit::codeSigningIdentifierForCurrentProcess):
+        * Shared/mac/ColorSpaceData.mm:
+        (WebKit::ColorSpaceData::encode const):
+        * Shared/mac/PasteboardTypes.mm:
+        (WebKit::PasteboardTypes::forURL):
+        * Shared/mac/WebCoreArgumentCodersMac.mm:
+        (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData):
+        (IPC::ArgumentCoder<Credential>::encodePlatformData):
+        (IPC::ArgumentCoder<ContentFilterUnblockHandler>::encode):
+        (IPC::ArgumentCoder<MediaPlaybackTargetContext>::encodePlatformData):
+        * Shared/mac/WebHitTestResultData.mm:
+        (WebKit::WebHitTestResultData::platformEncode const):
+        * UIProcess/API/Cocoa/WKProcessPool.mm:
+        (-[WKProcessPool _setObject:forBundleParameter:]):
+        (-[WKProcessPool _setObjectsForBundleParametersWithDictionary:]):
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _handleAcceptedCandidate:]):
+        * UIProcess/Cocoa/WebViewImpl.h:
+        * UIProcess/Cocoa/WebViewImpl.mm:
+        (WebKit::WebViewImpl::handleAcceptedCandidate):
+        (WebKit::WebViewImpl::performDragOperation):
+        * UIProcess/mac/WebPopupMenuProxyMac.mm:
+        (WebKit::WebPopupMenuProxyMac::showPopupMenu):
+        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
+        (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]):
+        * WebProcess/com.apple.WebProcess.sb.in:
+
+2018-01-24  Alex Christensen  <achristen...@webkit.org>
+
         Stop using AuthenticationClient in WebKit
         https://bugs.webkit.org/show_bug.cgi?id=182016
 

Modified: trunk/Source/WebKit/PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in (227549 => 227550)


--- trunk/Source/WebKit/PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in	2018-01-24 20:52:02 UTC (rev 227549)
+++ trunk/Source/WebKit/PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in	2018-01-24 20:53:01 UTC (rev 227550)
@@ -350,9 +350,6 @@
     (global-name "com.apple.DiskArbitration.diskarbitrationd")
     (global-name "com.apple.FileCoordination")
     (global-name "com.apple.FontObjectsServer")
-#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
-    (global-name "com.apple.FontServer")
-#endif
     (global-name "com.apple.ImageCaptureExtension2.presence")
     (global-name "com.apple.PowerManagement.control")
     (global-name "com.apple.SecurityServer")
@@ -443,12 +440,8 @@
     (shared-preferences-read "org.cups.PrintingPrefs"))
 
 ;; Text Services Manager
-#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)
 (with-filter (iokit-registry-entry-class "IOHIDEventDriver")
     (allow iokit-set-properties (iokit-property "CapsLockDelayOverride")))
-#else
-(allow iokit-set-properties (iokit-property "CapsLockDelayOverride"))
-#endif
 
 ;; Image Capture
 (define (webkit-imagecapture)

Modified: trunk/Source/WebKit/Shared/Cocoa/DataDetectionResult.mm (227549 => 227550)


--- trunk/Source/WebKit/Shared/Cocoa/DataDetectionResult.mm	2018-01-24 20:52:02 UTC (rev 227549)
+++ trunk/Source/WebKit/Shared/Cocoa/DataDetectionResult.mm	2018-01-24 20:53:01 UTC (rev 227550)
@@ -41,19 +41,9 @@
 
 void DataDetectionResult::encode(IPC::Encoder& encoder) const
 {
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200)
-    auto data = "" alloc] init]);
-    auto archiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
-    [archiver setRequiresSecureCoding:YES];
-    [archiver encodeObject:results.get() forKey:@"dataDetectorResults"];
-    [archiver finishEncoding];
-
-    IPC::encode(encoder, reinterpret_cast<CFDataRef>(data.get()));
-#else
     auto archiver = secureArchiver();
     [archiver encodeObject:results.get() forKey:@"dataDetectorResults"];
     IPC::encode(encoder, reinterpret_cast<CFDataRef>(archiver.get().encodedData));
-#endif
 }
 
 bool DataDetectionResult::decode(IPC::Decoder& decoder, DataDetectionResult& result)

Modified: trunk/Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm (227549 => 227550)


--- trunk/Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm	2018-01-24 20:52:02 UTC (rev 227549)
+++ trunk/Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm	2018-01-24 20:53:01 UTC (rev 227550)
@@ -51,22 +51,11 @@
 
 void ArgumentCoder<WebCore::Payment>::encode(Encoder& encoder, const WebCore::Payment& payment)
 {
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200)
-    auto data = "" alloc] init]);
-    auto archiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
-
-    [archiver setRequiresSecureCoding:YES];
-#else
     auto archiver = secureArchiver();
-#endif
-
     [archiver encodeObject:payment.pkPayment() forKey:NSKeyedArchiveRootObjectKey];
     [archiver finishEncoding];
 
-#if (!PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)
     auto data = ""
-#endif
-
     encoder << DataReference(static_cast<const uint8_t*>([data bytes]), [data length]);
 }
 
@@ -113,22 +102,11 @@
 
 void ArgumentCoder<WebCore::PaymentContact>::encode(Encoder& encoder, const WebCore::PaymentContact& paymentContact)
 {
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200)
-    auto data = "" alloc] init]);
-    auto archiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
-
-    [archiver setRequiresSecureCoding:YES];
-#else
     auto archiver = secureArchiver();
-#endif
-
     [archiver encodeObject:paymentContact.pkContact() forKey:NSKeyedArchiveRootObjectKey];
     [archiver finishEncoding];
 
-#if (!PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)
     auto data = ""
-#endif
-
     encoder << DataReference(static_cast<const uint8_t*>([data bytes]), [data length]);
 }
 
@@ -181,22 +159,11 @@
 
 void ArgumentCoder<WebCore::PaymentMerchantSession>::encode(Encoder& encoder, const WebCore::PaymentMerchantSession& paymentMerchantSession)
 {
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200)
-    auto data = "" alloc] init]);
-    auto archiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
-
-    [archiver setRequiresSecureCoding:YES];
-#else
     auto archiver = secureArchiver();
-#endif
-
     [archiver encodeObject:paymentMerchantSession.pkPaymentMerchantSession() forKey:NSKeyedArchiveRootObjectKey];
     [archiver finishEncoding];
 
-#if (!PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)
     auto data = ""
-#endif
-
     encoder << DataReference(static_cast<const uint8_t*>([data bytes]), [data length]);
 }
 
@@ -222,22 +189,11 @@
 
 void ArgumentCoder<WebCore::PaymentMethod>::encode(Encoder& encoder, const WebCore::PaymentMethod& paymentMethod)
 {
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200)
-    auto data = "" alloc] init]);
-    auto archiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
-
-    [archiver setRequiresSecureCoding:YES];
-#else
     auto archiver = secureArchiver();
-#endif
-
     [archiver encodeObject:paymentMethod.pkPaymentMethod() forKey:NSKeyedArchiveRootObjectKey];
     [archiver finishEncoding];
 
-#if (!PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)
     auto data = ""
-#endif
-
     encoder << DataReference(static_cast<const uint8_t*>([data bytes]), [data length]);
 }
 

Modified: trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h (227549 => 227550)


--- trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h	2018-01-24 20:52:02 UTC (rev 227549)
+++ trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h	2018-01-24 20:53:01 UTC (rev 227550)
@@ -129,8 +129,7 @@
 #define DEFAULT_MODERN_MEDIA_CONTROLS_ENABLED false
 #endif
 
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
-// <https://webkit.org/b/168415> El Capitan NetworkLoadTiming values are sometimes jumbled
+#if PLATFORM(MAC)
 #define DEFAULT_RESOURCE_TIMING_ENABLED false
 #else
 #define DEFAULT_RESOURCE_TIMING_ENABLED true

Modified: trunk/Source/WebKit/Shared/cg/ShareableBitmapCG.cpp (227549 => 227550)


--- trunk/Source/WebKit/Shared/cg/ShareableBitmapCG.cpp	2018-01-24 20:52:02 UTC (rev 227549)
+++ trunk/Source/WebKit/Shared/cg/ShareableBitmapCG.cpp	2018-01-24 20:53:01 UTC (rev 227550)
@@ -45,12 +45,7 @@
 
 static bool wantsExtendedRange(const ShareableBitmap::Configuration& configuration)
 {
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || PLATFORM(IOS)
     return CGColorSpaceUsesExtendedRange(colorSpace(configuration));
-#else
-    UNUSED_PARAM(configuration);
-    return false;
-#endif
 }
 
 static CGBitmapInfo bitmapInfo(const ShareableBitmap::Configuration& configuration)

Modified: trunk/Source/WebKit/Shared/ios/InteractionInformationAtPosition.mm (227549 => 227550)


--- trunk/Source/WebKit/Shared/ios/InteractionInformationAtPosition.mm	2018-01-24 20:52:02 UTC (rev 227549)
+++ trunk/Source/WebKit/Shared/ios/InteractionInformationAtPosition.mm	2018-01-24 20:53:01 UTC (rev 227550)
@@ -73,19 +73,10 @@
     encoder << isDataDetectorLink;
     if (isDataDetectorLink) {
         encoder << dataDetectorIdentifier;
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200)
-        RetainPtr<NSMutableData> data = "" alloc] init]);
-        auto archiver = secureArchiverFromMutableData(data.get());
-        [archiver encodeObject:dataDetectorResults.get() forKey:@"dataDetectorResults"];
-        [archiver finishEncoding];
-        
-        IPC::encode(encoder, reinterpret_cast<CFDataRef>(data.get()));
-#else
         auto archiver = secureArchiver();
         [archiver encodeObject:dataDetectorResults.get() forKey:@"dataDetectorResults"];
 
         IPC::encode(encoder, reinterpret_cast<CFDataRef>(archiver.get().encodedData));
-#endif
     }
 #endif
 }

Modified: trunk/Source/WebKit/Shared/mac/CodeSigning.mm (227549 => 227550)


--- trunk/Source/WebKit/Shared/mac/CodeSigning.mm	2018-01-24 20:52:02 UTC (rev 227549)
+++ trunk/Source/WebKit/Shared/mac/CodeSigning.mm	2018-01-24 20:53:01 UTC (rev 227550)
@@ -34,32 +34,21 @@
 
 namespace WebKit {
 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
 static String codeSigningIdentifier(SecTaskRef task)
 {
     return adoptCF(SecTaskCopySigningIdentifier(task, nullptr)).get();
 }
-#endif
 
 String codeSigningIdentifierForCurrentProcess()
 {
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
     return codeSigningIdentifier(adoptCF(SecTaskCreateFromSelf(kCFAllocatorDefault)).get());
-#else
-    return { };
-#endif
 }
 
 String codeSigningIdentifier(xpc_connection_t connection)
 {
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
     audit_token_t auditToken;
     xpc_connection_get_audit_token(connection, &auditToken);
     return codeSigningIdentifier(adoptCF(SecTaskCreateWithAuditToken(kCFAllocatorDefault, auditToken)).get());
-#else
-    UNUSED_PARAM(connection);
-    return { };
-#endif
 }
 
 } // namespace WebKit

Modified: trunk/Source/WebKit/Shared/mac/ColorSpaceData.mm (227549 => 227550)


--- trunk/Source/WebKit/Shared/mac/ColorSpaceData.mm	2018-01-24 20:52:02 UTC (rev 227549)
+++ trunk/Source/WebKit/Shared/mac/ColorSpaceData.mm	2018-01-24 20:53:01 UTC (rev 227550)
@@ -49,12 +49,7 @@
         }
 
         // Failing that, just encode the ICC data.
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || PLATFORM(IOS)
-        RetainPtr<CFDataRef> profileData = adoptCF(CGColorSpaceCopyICCData(cgColorSpace.get()));
-#else
-        RetainPtr<CFDataRef> profileData = adoptCF(CGColorSpaceCopyICCProfile(cgColorSpace.get()));
-#endif
-        if (profileData) {
+        if (RetainPtr<CFDataRef> profileData = adoptCF(CGColorSpaceCopyICCData(cgColorSpace.get()))) {
             encoder.encodeEnum(Data);
             IPC::encode(encoder, profileData.get());
             return;

Modified: trunk/Source/WebKit/Shared/mac/PasteboardTypes.mm (227549 => 227550)


--- trunk/Source/WebKit/Shared/mac/PasteboardTypes.mm	2018-01-24 20:52:02 UTC (rev 227549)
+++ trunk/Source/WebKit/Shared/mac/PasteboardTypes.mm	2018-01-24 20:53:01 UTC (rev 227550)
@@ -53,11 +53,7 @@
 
 NSArray* PasteboardTypes::forURL()
 {
-    static NSArray *types = retain([NSArray arrayWithObjects:WebURLsWithTitlesPboardType, WebCore::legacyURLPasteboardType(), WebURLPboardType,  WebURLNamePboardType, WebCore::legacyStringPasteboardType(), WebCore::legacyFilenamesPasteboardType(),
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
-        WebCore::legacyFilesPromisePasteboardType(),
-#endif
-        nil]);
+    static NSArray *types = retain([NSArray arrayWithObjects:WebURLsWithTitlesPboardType, WebCore::legacyURLPasteboardType(), WebURLPboardType,  WebURLNamePboardType, WebCore::legacyStringPasteboardType(), WebCore::legacyFilenamesPasteboardType(), WebCore::legacyFilesPromisePasteboardType(), nil]);
     return types;
 }
 

Modified: trunk/Source/WebKit/Shared/mac/WebCoreArgumentCodersMac.mm (227549 => 227550)


--- trunk/Source/WebKit/Shared/mac/WebCoreArgumentCodersMac.mm	2018-01-24 20:52:02 UTC (rev 227549)
+++ trunk/Source/WebKit/Shared/mac/WebCoreArgumentCodersMac.mm	2018-01-24 20:53:01 UTC (rev 227550)
@@ -430,18 +430,9 @@
 
 void ArgumentCoder<ProtectionSpace>::encodePlatformData(Encoder& encoder, const ProtectionSpace& space)
 {
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200)
-    auto data = "" alloc] init]);
-    auto archiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
-    [archiver setRequiresSecureCoding:YES];
-    [archiver encodeObject:space.nsSpace() forKey:@"protectionSpace"];
-    [archiver finishEncoding];
-    IPC::encode(encoder, reinterpret_cast<CFDataRef>(data.get()));
-#else
     auto archiver = secureArchiver();
     [archiver encodeObject:space.nsSpace() forKey:@"protectionSpace"];
     IPC::encode(encoder, reinterpret_cast<CFDataRef>(archiver.get().encodedData));
-#endif
 }
 
 bool ArgumentCoder<ProtectionSpace>::decodePlatformData(Decoder& decoder, ProtectionSpace& space)
@@ -483,18 +474,9 @@
 
     encoder << false;
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200)
-    auto data = "" alloc] init]);
-    auto archiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
-    [archiver setRequiresSecureCoding:YES];
-    [archiver encodeObject:nsCredential forKey:@"credential"];
-    [archiver finishEncoding];
-    IPC::encode(encoder, reinterpret_cast<CFDataRef>(data.get()));
-#else
     auto archiver = secureArchiver();
     [archiver encodeObject:nsCredential forKey:@"credential"];
     IPC::encode(encoder, reinterpret_cast<CFDataRef>(archiver.get().encodedData));
-#endif
 }
 
 bool ArgumentCoder<Credential>::decodePlatformData(Decoder& decoder, Credential& credential)
@@ -591,18 +573,9 @@
 #if ENABLE(CONTENT_FILTERING)
 void ArgumentCoder<ContentFilterUnblockHandler>::encode(Encoder& encoder, const ContentFilterUnblockHandler& contentFilterUnblockHandler)
 {
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200)
-    auto data = "" alloc] init]);
-    auto archiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
-    [archiver setRequiresSecureCoding:YES];
-    contentFilterUnblockHandler.encode(archiver.get());
-    [archiver finishEncoding];
-    IPC::encode(encoder, reinterpret_cast<CFDataRef>(data.get()));
-#else
     auto archiver = secureArchiver();
     contentFilterUnblockHandler.encode(archiver.get());
     IPC::encode(encoder, reinterpret_cast<CFDataRef>(archiver.get().encodedData));
-#endif
 }
 
 bool ArgumentCoder<ContentFilterUnblockHandler>::decode(Decoder& decoder, ContentFilterUnblockHandler& contentFilterUnblockHandler)
@@ -630,17 +603,6 @@
 
 void ArgumentCoder<MediaPlaybackTargetContext>::encodePlatformData(Encoder& encoder, const MediaPlaybackTargetContext& target)
 {
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200)
-    auto data = "" alloc] init]);
-    auto archiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
-    [archiver setRequiresSecureCoding:YES];
-
-    if ([getAVOutputContextClass() conformsToProtocol:@protocol(NSSecureCoding)])
-        [archiver encodeObject:target.avOutputContext() forKey:deviceContextKey()];
-
-    [archiver finishEncoding];
-    IPC::encode(encoder, reinterpret_cast<CFDataRef>(data.get()));
-#else
     auto archiver = secureArchiver();
 
     if ([getAVOutputContextClass() conformsToProtocol:@protocol(NSSecureCoding)])
@@ -647,7 +609,6 @@
         [archiver encodeObject:target.avOutputContext() forKey:deviceContextKey()];
 
     IPC::encode(encoder, reinterpret_cast<CFDataRef>(archiver.get().encodedData));
-#endif
 }
 
 bool ArgumentCoder<MediaPlaybackTargetContext>::decodePlatformData(Decoder& decoder, MediaPlaybackTargetContext& target)

Modified: trunk/Source/WebKit/Shared/mac/WebHitTestResultData.mm (227549 => 227550)


--- trunk/Source/WebKit/Shared/mac/WebHitTestResultData.mm	2018-01-24 20:52:02 UTC (rev 227549)
+++ trunk/Source/WebKit/Shared/mac/WebHitTestResultData.mm	2018-01-24 20:53:01 UTC (rev 227550)
@@ -45,20 +45,10 @@
     if (!hasActionContext)
         return;
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200)
-    auto data = "" alloc] init]);
-    auto archiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
-    [archiver setRequiresSecureCoding:YES];
-    [archiver encodeObject:detectedDataActionContext.get() forKey:@"actionContext"];
-    [archiver finishEncoding];
-
-    IPC::encode(encoder, reinterpret_cast<CFDataRef>(data.get()));
-#else
     auto archiver = secureArchiver();
     [archiver encodeObject:detectedDataActionContext.get() forKey:@"actionContext"];
 
     IPC::encode(encoder, reinterpret_cast<CFDataRef>(archiver.get().encodedData));
-#endif
 
     encoder << detectedDataBoundingBox;
     encoder << detectedDataOriginatingPageOverlay;

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm (227549 => 227550)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm	2018-01-24 20:52:02 UTC (rev 227549)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm	2018-01-24 20:53:01 UTC (rev 227550)
@@ -227,14 +227,7 @@
 - (void)_setObject:(id <NSCopying, NSSecureCoding>)object forBundleParameter:(NSString *)parameter
 {
     auto copy = adoptNS([(NSObject *)object copy]);
-
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200)
-    auto data = "" alloc] init]);
-    auto keyedArchiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
-    [keyedArchiver setRequiresSecureCoding:YES];
-#else
     auto keyedArchiver = secureArchiver();
-#endif
 
     @try {
         [keyedArchiver encodeObject:copy.get() forKey:@"parameter"];
@@ -248,10 +241,7 @@
     else
         [_processPool->ensureBundleParameters() removeObjectForKey:parameter];
 
-#if (!PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)
     auto data = ""
-#endif
-
     _processPool->sendToAllProcesses(Messages::WebProcess::SetInjectedBundleParameter(parameter, IPC::DataReference(static_cast<const uint8_t*>([data bytes]), [data length])));
 }
 
@@ -258,14 +248,7 @@
 - (void)_setObjectsForBundleParametersWithDictionary:(NSDictionary *)dictionary
 {
     auto copy = adoptNS([[NSDictionary alloc] initWithDictionary:dictionary copyItems:YES]);
-
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200)
-    auto data = "" alloc] init]);
-    auto keyedArchiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
-    [keyedArchiver setRequiresSecureCoding:YES];
-#else
     auto keyedArchiver = secureArchiver();
-#endif
 
     @try {
         [keyedArchiver encodeObject:copy.get() forKey:@"parameters"];
@@ -276,10 +259,7 @@
 
     [_processPool->ensureBundleParameters() setValuesForKeysWithDictionary:copy.get()];
 
-#if (!PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)
     auto data = ""
-#endif
-
     _processPool->sendToAllProcesses(Messages::WebProcess::SetInjectedBundleParameters(IPC::DataReference(static_cast<const uint8_t*>([data bytes]), [data length])));
 }
 

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (227549 => 227550)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2018-01-24 20:52:02 UTC (rev 227549)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2018-01-24 20:53:01 UTC (rev 227550)
@@ -6027,9 +6027,7 @@
 
 - (void)_handleAcceptedCandidate:(NSTextCheckingResult *)candidate
 {
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
     _impl->handleAcceptedCandidate(candidate);
-#endif
 }
 
 - (void)_didHandleAcceptedCandidate

Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h (227549 => 227550)


--- trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h	2018-01-24 20:52:02 UTC (rev 227549)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h	2018-01-24 20:53:01 UTC (rev 227550)
@@ -331,9 +331,7 @@
     void lowercaseWord();
     void capitalizeWord();
 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
     void requestCandidatesForSelectionIfNeeded();
-#endif
 
     void preferencesDidChange();
 
@@ -509,9 +507,7 @@
     WebCore::UserInterfaceLayoutDirection userInterfaceLayoutDirection();
     void setUserInterfaceLayoutDirection(NSUserInterfaceLayoutDirection);
 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 
     void handleAcceptedCandidate(NSTextCheckingResult *acceptedCandidate);
-#endif
 
 #if HAVE(TOUCH_BAR)
     NSTouchBar *makeTouchBar();
@@ -604,9 +600,7 @@
     bool mightBeginDragWhileInactive();
     bool mightBeginScrollWhileInactive();
 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
     void handleRequestedCandidates(NSInteger sequenceNumber, NSArray<NSTextCheckingResult *> *candidates);
-#endif
 
     WeakObjCPtr<NSView<WebViewImplDelegate>> m_view;
     std::unique_ptr<PageClient> m_pageClient;
@@ -719,10 +713,8 @@
     RetainPtr<NSEvent> m_keyDownEventBeingResent;
     Vector<WebCore::KeypressCommand>* m_collectedKeypressCommands { nullptr };
 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
     String m_lastStringForCandidateRequest;
     NSInteger m_lastCandidateRequestSequenceNumber;
-#endif
     NSRange m_softSpaceRange { NSNotFound, 0 };
     bool m_isHandlingAcceptedCandidate { false };
     bool m_requiresUserActionForEditingControlsManager { false };

Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm (227549 => 227550)


--- trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm	2018-01-24 20:52:02 UTC (rev 227549)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm	2018-01-24 20:53:01 UTC (rev 227550)
@@ -2987,7 +2987,6 @@
     m_page->capitalizeWord();
 }
 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
 void WebViewImpl::requestCandidatesForSelectionIfNeeded()
 {
     if (!shouldRequestCandidates())
@@ -3103,7 +3102,6 @@
 
     m_page->handleAcceptedCandidate(textCheckingResultFromNSTextCheckingResult(acceptedCandidate));
 }
-#endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
 
 void WebViewImpl::preferencesDidChange()
 {
@@ -3710,9 +3708,7 @@
         for (NSString *file in files)
             fileNames.append(file);
         m_page->createSandboxExtensionsIfNeeded(fileNames, sandboxExtensionHandle, sandboxExtensionForUpload);
-    }
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
-    else if (![types containsObject:PasteboardTypes::WebArchivePboardType] && [types containsObject:WebCore::legacyFilesPromisePasteboardType()]) {
+    } else if (![types containsObject:PasteboardTypes::WebArchivePboardType] && [types containsObject:WebCore::legacyFilesPromisePasteboardType()]) {
         NSArray *files = [draggingInfo.draggingPasteboard propertyListForType:WebCore::legacyFilesPromisePasteboardType()];
         if (![files isKindOfClass:[NSArray class]])
             return false;
@@ -3745,7 +3741,6 @@
 
         return true;
     }
-#endif
 
     m_page->performDragOperation(dragData, draggingInfo.draggingPasteboard.name, WTFMove(sandboxExtensionHandle), WTFMove(sandboxExtensionForUpload));
 

Modified: trunk/Source/WebKit/UIProcess/mac/WebPopupMenuProxyMac.mm (227549 => 227550)


--- trunk/Source/WebKit/UIProcess/mac/WebPopupMenuProxyMac.mm	2018-01-24 20:52:02 UTC (rev 227549)
+++ trunk/Source/WebKit/UIProcess/mac/WebPopupMenuProxyMac.mm	2018-01-24 20:53:01 UTC (rev 227550)
@@ -127,24 +127,15 @@
         if (titleFrame.size.width <= 0 || titleFrame.size.height <= 0)
             titleFrame = rect;
         float verticalOffset = roundf((NSMaxY(rect) - NSMaxY(titleFrame)) + NSHeight(titleFrame)) + 1;
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
         if (textDirection == LTR)
             location = NSMakePoint(NSMinX(rect) + popOverHorizontalAdjust, NSMaxY(rect) - verticalOffset);
         else
             location = NSMakePoint(NSMaxX(rect) - popOverHorizontalAdjust, NSMaxY(rect) - verticalOffset);
-#else
-        location = NSMakePoint(NSMinX(rect) + popOverHorizontalAdjust, NSMaxY(rect) - verticalOffset);
-#endif
-
     } else {
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
         if (textDirection == LTR)
             location = NSMakePoint(NSMinX(rect) + popUnderHorizontalAdjust, NSMaxY(rect) + popUnderVerticalAdjust);
         else
             location = NSMakePoint(NSMaxX(rect) - popUnderHorizontalAdjust, NSMaxY(rect) + popUnderVerticalAdjust);
-#else
-        location = NSMakePoint(NSMinX(rect) + popUnderHorizontalAdjust, NSMaxY(rect) + popUnderVerticalAdjust);
-#endif
     }
     RetainPtr<NSView> dummyView = adoptNS([[NSView alloc] initWithFrame:rect]);
     [dummyView.get() setUserInterfaceLayoutDirection:textDirection == LTR ? NSUserInterfaceLayoutDirectionLeftToRight : NSUserInterfaceLayoutDirectionRightToLeft];

Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm (227549 => 227550)


--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm	2018-01-24 20:52:02 UTC (rev 227549)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm	2018-01-24 20:53:01 UTC (rev 227550)
@@ -484,13 +484,7 @@
             if (!userObject)
                 return;
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200)
-            auto data = "" alloc] init]);
-            auto archiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
-            [archiver setRequiresSecureCoding:YES];
-#else
             auto archiver = secureArchiver();
-#endif
             @try {
                 [archiver encodeObject:userObject forKey:@"userObject"];
             } @catch (NSException *exception) {
@@ -499,11 +493,7 @@
             }
             [archiver finishEncoding];
 
-#if (!PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)
-            auto data = ""
-#endif
-
-            userData = API::Data::createWithoutCopying(WTFMove(data));
+            userData = API::Data::createWithoutCopying(archiver.get().encodedData);
         }
 
         void willSubmitForm(WebPage*, HTMLFormElement* formElement, WebFrame* frame, WebFrame* sourceFrame, const Vector<std::pair<WTF::String, WTF::String>>& values, RefPtr<API::Object>& userData) override

Modified: trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in (227549 => 227550)


--- trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2018-01-24 20:52:02 UTC (rev 227549)
+++ trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2018-01-24 20:53:01 UTC (rev 227550)
@@ -170,9 +170,7 @@
 (deny process-info*)
 (allow process-info-pidinfo)
 (allow process-info-setcontrol (target self))
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
 (allow process-codesigning-status*)
-#endif
 
 (deny sysctl*)
 (allow sysctl-read
@@ -465,9 +463,6 @@
         "com.apple.driver.AppleBluetoothMultitouch.trackpad"
         "com.apple.driver.AppleHIDMouse"
         "com.apple.lookup.shared"
-#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
-        "com.apple.mediaaccessibility"
-#endif
         "com.apple.networkConnect"
         "com.apple.security"
         "com.apple.security.common"
@@ -507,12 +502,6 @@
 (if (defined? 'mach-register)
     (allow mach-register (global-name-regex #"^_oglprof_attach_<[0-9]+>$")))
 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
-;; MediaAccessibility
-(allow user-preference-read user-preference-write
-    (preference-domain "com.apple.mediaaccessibility.public"))
-#endif
-
 (if (positive? (string-length (param "DARWIN_USER_CACHE_DIR")))
     (allow-read-write-directory-and-issue-read-write-extensions (param "DARWIN_USER_CACHE_DIR")))
 
@@ -558,9 +547,6 @@
 (allow mach-lookup
        (global-name "com.apple.FileCoordination")
        (global-name "com.apple.FontObjectsServer")
-#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
-       (global-name "com.apple.FontServer")
-#endif
        (global-name "com.apple.PowerManagement.control")
        (global-name "com.apple.SystemConfiguration.configd")
        (global-name "com.apple.SystemConfiguration.PPPController")
@@ -583,9 +569,7 @@
        (global-name "com.apple.fonts")
        (global-name "com.apple.iconservices")
        (global-name "com.apple.iconservices.store")
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
        (global-name "com.apple.mediaremoted.xpc")
-#endif
        (global-name "com.apple.logd")
        (global-name "com.apple.logd.events")
        (global-name "com.apple.lsd.mapdb")
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to