Title: [238470] trunk/Source
Revision
238470
Author
[email protected]
Date
2018-11-24 10:37:14 -0800 (Sat, 24 Nov 2018)

Log Message

[Cocoa] SOFT_LINK_CLASS_FOR_{HEADER,SOURCE} should generate a more concise getter function
https://bugs.webkit.org/show_bug.cgi?id=191899

Reviewed by Dean Jackson.

Source/WebCore:

* editing/cocoa/DataDetection.mm:
* editing/cocoa/FontAttributesCocoa.mm:
* editing/cocoa/FontShadowCocoa.mm:
* platform/cocoa/DataDetectorsCoreSoftLink.h:
* platform/graphics/cocoa/ColorCocoa.mm:
* platform/ios/PlatformScreenIOS.mm:

Source/WebCore/PAL:

* pal/cocoa/PassKitSoftLink.h:
* pal/ios/UIKitSoftLink.h:

Source/WebKit:

* Shared/cocoa/WebCoreArgumentCodersCocoa.mm:
* UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
* UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:

Source/WTF:

Currently, SOFT_LINK_CLASS_FOR_HEADER declares a class getter function that includes the
framework name. For example, NSView would have a class getter named
namespace::get_AppKit_NSViewClass().

Including the framework name in the getter is unnecessary. Objective-C classes already exist
in a global namespace, so there is no need to disambiguate class names by framework. This
patch elides the framework name from the getter function. For example, NSView would now have
a getter named namespace::getNSViewClass().

* wtf/cocoa/SoftLinking.h:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (238469 => 238470)


--- trunk/Source/WTF/ChangeLog	2018-11-24 15:13:15 UTC (rev 238469)
+++ trunk/Source/WTF/ChangeLog	2018-11-24 18:37:14 UTC (rev 238470)
@@ -1,3 +1,21 @@
+2018-11-24  Andy Estes  <[email protected]>
+
+        [Cocoa] SOFT_LINK_CLASS_FOR_{HEADER,SOURCE} should generate a more concise getter function
+        https://bugs.webkit.org/show_bug.cgi?id=191899
+
+        Reviewed by Dean Jackson.
+
+        Currently, SOFT_LINK_CLASS_FOR_HEADER declares a class getter function that includes the
+        framework name. For example, NSView would have a class getter named
+        namespace::get_AppKit_NSViewClass().
+
+        Including the framework name in the getter is unnecessary. Objective-C classes already exist
+        in a global namespace, so there is no need to disambiguate class names by framework. This
+        patch elides the framework name from the getter function. For example, NSView would now have
+        a getter named namespace::getNSViewClass().
+
+        * wtf/cocoa/SoftLinking.h:
+
 2018-11-24  Michael Catanzaro  <[email protected]>
 
         CRASH() should call abort() except on Darwin and in developer builds

Modified: trunk/Source/WTF/wtf/cocoa/SoftLinking.h (238469 => 238470)


--- trunk/Source/WTF/wtf/cocoa/SoftLinking.h	2018-11-24 15:13:15 UTC (rev 238469)
+++ trunk/Source/WTF/wtf/cocoa/SoftLinking.h	2018-11-24 18:37:14 UTC (rev 238470)
@@ -378,14 +378,14 @@
 #define SOFT_LINK_PRIVATE_FRAMEWORK_FOR_SOURCE(functionNamespace, framework) \
     SOFT_LINK_PRIVATE_FRAMEWORK_FOR_SOURCE_WITH_EXPORT(functionNamespace, framework, )
 
-#define SOFT_LINK_CLASS_FOR_HEADER(functionNamespace, framework, className) \
+#define SOFT_LINK_CLASS_FOR_HEADER(functionNamespace, className) \
     @class className; \
     namespace functionNamespace { \
-    extern Class (*get_##framework##_##className##Class)(); \
+    extern Class (*get##className##Class)(); \
     className *alloc##className##Instance(); \
     inline className *alloc##className##Instance() \
     { \
-        return [get_##framework##_##className##Class() alloc]; \
+        return [get##className##Class() alloc]; \
     } \
     }
 
@@ -393,7 +393,7 @@
     @class className; \
     namespace functionNamespace { \
     static Class init##className(); \
-    export Class (*get_##framework##_##className##Class)() = init##className; \
+    export Class (*get##className##Class)() = init##className; \
     static Class class##className; \
     \
     static Class className##Function() \
@@ -408,7 +408,7 @@
             framework##Library(); \
             class##className = objc_getClass(#className); \
             RELEASE_ASSERT(class##className); \
-            get_##framework##_##className##Class = className##Function; \
+            get##className##Class = className##Function; \
         }); \
         return class##className; \
     } \

Modified: trunk/Source/WebCore/ChangeLog (238469 => 238470)


--- trunk/Source/WebCore/ChangeLog	2018-11-24 15:13:15 UTC (rev 238469)
+++ trunk/Source/WebCore/ChangeLog	2018-11-24 18:37:14 UTC (rev 238470)
@@ -1,3 +1,17 @@
+2018-11-24  Andy Estes  <[email protected]>
+
+        [Cocoa] SOFT_LINK_CLASS_FOR_{HEADER,SOURCE} should generate a more concise getter function
+        https://bugs.webkit.org/show_bug.cgi?id=191899
+
+        Reviewed by Dean Jackson.
+
+        * editing/cocoa/DataDetection.mm:
+        * editing/cocoa/FontAttributesCocoa.mm:
+        * editing/cocoa/FontShadowCocoa.mm:
+        * platform/cocoa/DataDetectorsCoreSoftLink.h:
+        * platform/graphics/cocoa/ColorCocoa.mm:
+        * platform/ios/PlatformScreenIOS.mm:
+
 2018-11-23  Jiewen Tan  <[email protected]>
 
         [WebAuthN] Enable Web Authentication as an experimental feature for macOS

Modified: trunk/Source/WebCore/PAL/ChangeLog (238469 => 238470)


--- trunk/Source/WebCore/PAL/ChangeLog	2018-11-24 15:13:15 UTC (rev 238469)
+++ trunk/Source/WebCore/PAL/ChangeLog	2018-11-24 18:37:14 UTC (rev 238470)
@@ -1,3 +1,13 @@
+2018-11-24  Andy Estes  <[email protected]>
+
+        [Cocoa] SOFT_LINK_CLASS_FOR_{HEADER,SOURCE} should generate a more concise getter function
+        https://bugs.webkit.org/show_bug.cgi?id=191899
+
+        Reviewed by Dean Jackson.
+
+        * pal/cocoa/PassKitSoftLink.h:
+        * pal/ios/UIKitSoftLink.h:
+
 2018-11-23  Wenson Hsieh  <[email protected]>
 
         Enable drag and drop support for iOSMac

Modified: trunk/Source/WebCore/PAL/pal/cocoa/PassKitSoftLink.h (238469 => 238470)


--- trunk/Source/WebCore/PAL/pal/cocoa/PassKitSoftLink.h	2018-11-24 15:13:15 UTC (rev 238469)
+++ trunk/Source/WebCore/PAL/pal/cocoa/PassKitSoftLink.h	2018-11-24 18:37:14 UTC (rev 238470)
@@ -32,24 +32,24 @@
 
 SOFT_LINK_FRAMEWORK_FOR_HEADER(PAL, PassKit)
 
-SOFT_LINK_CLASS_FOR_HEADER(PAL, PassKit, PKContact)
-SOFT_LINK_CLASS_FOR_HEADER(PAL, PassKit, PKPassLibrary)
-SOFT_LINK_CLASS_FOR_HEADER(PAL, PassKit, PKPayment)
-SOFT_LINK_CLASS_FOR_HEADER(PAL, PassKit, PKPaymentAuthorizationViewController)
-SOFT_LINK_CLASS_FOR_HEADER(PAL, PassKit, PKPaymentMethod)
-SOFT_LINK_CLASS_FOR_HEADER(PAL, PassKit, PKPaymentMerchantSession)
-SOFT_LINK_CLASS_FOR_HEADER(PAL, PassKit, PKPaymentRequest)
-SOFT_LINK_CLASS_FOR_HEADER(PAL, PassKit, PKPaymentSummaryItem)
-SOFT_LINK_CLASS_FOR_HEADER(PAL, PassKit, PKShippingMethod)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, PKContact)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, PKPassLibrary)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, PKPayment)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, PKPaymentAuthorizationViewController)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, PKPaymentMethod)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, PKPaymentMerchantSession)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, PKPaymentRequest)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, PKPaymentSummaryItem)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, PKShippingMethod)
 
 SOFT_LINK_FUNCTION_FOR_HEADER(PAL, PassKit, PKCanMakePaymentsWithMerchantIdentifierAndDomain, void, (NSString *identifier, NSString *domain, PKCanMakePaymentsCompletion completion), (identifier, domain, completion))
 SOFT_LINK_FUNCTION_FOR_HEADER(PAL, PassKit, PKDrawApplePayButton, void, (CGContextRef context, CGRect drawRect, CGFloat scale, PKPaymentButtonType type, PKPaymentButtonStyle style, NSString *languageCode), (context, drawRect, scale, type, style, languageCode))
 
 #if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300)
-SOFT_LINK_CLASS_FOR_HEADER(PAL, PassKit, PKPaymentAuthorizationResult)
-SOFT_LINK_CLASS_FOR_HEADER(PAL, PassKit, PKPaymentRequestPaymentMethodUpdate)
-SOFT_LINK_CLASS_FOR_HEADER(PAL, PassKit, PKPaymentRequestShippingContactUpdate)
-SOFT_LINK_CLASS_FOR_HEADER(PAL, PassKit, PKPaymentRequestShippingMethodUpdate)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, PKPaymentAuthorizationResult)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, PKPaymentRequestPaymentMethodUpdate)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, PKPaymentRequestShippingContactUpdate)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, PKPaymentRequestShippingMethodUpdate)
 
 SOFT_LINK_CONSTANT_FOR_HEADER(PAL, PassKit, PKContactFieldEmailAddress, PKContactField)
 SOFT_LINK_CONSTANT_FOR_HEADER(PAL, PassKit, PKContactFieldName, PKContactField)

Modified: trunk/Source/WebCore/PAL/pal/ios/UIKitSoftLink.h (238469 => 238470)


--- trunk/Source/WebCore/PAL/pal/ios/UIKitSoftLink.h	2018-11-24 15:13:15 UTC (rev 238469)
+++ trunk/Source/WebCore/PAL/pal/ios/UIKitSoftLink.h	2018-11-24 18:37:14 UTC (rev 238470)
@@ -32,12 +32,12 @@
 
 SOFT_LINK_FRAMEWORK_FOR_HEADER(PAL, UIKit)
 
-SOFT_LINK_CLASS_FOR_HEADER(PAL, UIKit, NSParagraphStyle)
-SOFT_LINK_CLASS_FOR_HEADER(PAL, UIKit, NSShadow)
-SOFT_LINK_CLASS_FOR_HEADER(PAL, UIKit, NSTextList)
-SOFT_LINK_CLASS_FOR_HEADER(PAL, UIKit, UIApplication)
-SOFT_LINK_CLASS_FOR_HEADER(PAL, UIKit, UIScreen)
-SOFT_LINK_CLASS_FOR_HEADER(PAL, UIKit, UIColor)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, NSParagraphStyle)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, NSShadow)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, NSTextList)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, UIApplication)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, UIScreen)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, UIColor)
 SOFT_LINK_FUNCTION_FOR_HEADER(PAL, UIKit, UIAccessibilityIsGrayscaleEnabled, BOOL, (void), ())
 SOFT_LINK_FUNCTION_FOR_HEADER(PAL, UIKit, UIAccessibilityIsInvertColorsEnabled, BOOL, (void), ())
 

Modified: trunk/Source/WebCore/editing/cocoa/DataDetection.mm (238469 => 238470)


--- trunk/Source/WebCore/editing/cocoa/DataDetection.mm	2018-11-24 15:13:15 UTC (rev 238469)
+++ trunk/Source/WebCore/editing/cocoa/DataDetection.mm	2018-11-24 18:37:14 UTC (rev 238470)
@@ -643,7 +643,7 @@
     if (lastTextNodeToUpdate)
         lastTextNodeToUpdate->setData(lastNodeContent);
     
-    return [get_DataDetectorsCore_DDScannerResultClass() resultsFromCoreResults:scannerResults.get()];
+    return [getDDScannerResultClass() resultsFromCoreResults:scannerResults.get()];
 }
 
 #else

Modified: trunk/Source/WebCore/editing/cocoa/FontAttributesCocoa.mm (238469 => 238470)


--- trunk/Source/WebCore/editing/cocoa/FontAttributesCocoa.mm	2018-11-24 15:13:15 UTC (rev 238469)
+++ trunk/Source/WebCore/editing/cocoa/FontAttributesCocoa.mm	2018-11-24 18:37:14 UTC (rev 238470)
@@ -76,7 +76,7 @@
 #if PLATFORM(MAC)
     Class textListClass = NSTextList.class;
 #else
-    Class textListClass = PAL::get_UIKit_NSTextListClass();
+    Class textListClass = PAL::getNSTextListClass();
 #endif
     auto result = adoptNS([[textListClass alloc] initWithMarkerFormat:cocoaTextListMarkerName(style, ordered) options:0]);
     [result setStartingItemNumber:startingItemNumber];
@@ -106,7 +106,7 @@
 #if PLATFORM(MAC)
     Class paragraphStyleClass = NSParagraphStyle.class;
 #else
-    Class paragraphStyleClass = PAL::get_UIKit_NSParagraphStyleClass();
+    Class paragraphStyleClass = PAL::getNSParagraphStyleClass();
 #endif
     auto style = adoptNS([[paragraphStyleClass defaultParagraphStyle] mutableCopy]);
 

Modified: trunk/Source/WebCore/editing/cocoa/FontShadowCocoa.mm (238469 => 238470)


--- trunk/Source/WebCore/editing/cocoa/FontShadowCocoa.mm	2018-11-24 15:13:15 UTC (rev 238469)
+++ trunk/Source/WebCore/editing/cocoa/FontShadowCocoa.mm	2018-11-24 18:37:14 UTC (rev 238470)
@@ -40,7 +40,7 @@
 #if USE(APPKIT)
     auto shadow = adoptNS([NSShadow new]);
 #elif PLATFORM(IOS_FAMILY)
-    auto shadow = adoptNS([PAL::get_UIKit_NSShadowClass() new]);
+    auto shadow = adoptNS([PAL::getNSShadowClass() new]);
 #endif
     [shadow setShadowColor:platformColor(color)];
     [shadow setShadowOffset:offset];

Modified: trunk/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.h (238469 => 238470)


--- trunk/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.h	2018-11-24 15:13:15 UTC (rev 238469)
+++ trunk/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.h	2018-11-24 18:37:14 UTC (rev 238470)
@@ -32,7 +32,7 @@
 
 #if PLATFORM(IOS_FAMILY)
 
-SOFT_LINK_CLASS_FOR_HEADER(WebCore, DataDetectorsCore, DDScannerResult)
+SOFT_LINK_CLASS_FOR_HEADER(WebCore, DDScannerResult)
 SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, DataDetectorsCore, DDScannerCreate, DDScannerRef, (DDScannerType type, DDScannerOptions options, CFErrorRef * errorRef), (type, options, errorRef))
 SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, DataDetectorsCore, DDScannerScanQuery, Boolean, (DDScannerRef scanner, DDScanQueryRef query), (scanner, query))
 SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, DataDetectorsCore, DDScanQueryCreate, DDScanQueryRef, (CFAllocatorRef allocator), (allocator))

Modified: trunk/Source/WebCore/platform/graphics/cocoa/ColorCocoa.mm (238469 => 238470)


--- trunk/Source/WebCore/platform/graphics/cocoa/ColorCocoa.mm	2018-11-24 15:13:15 UTC (rev 238469)
+++ trunk/Source/WebCore/platform/graphics/cocoa/ColorCocoa.mm	2018-11-24 18:37:14 UTC (rev 238470)
@@ -48,7 +48,7 @@
 
 UIColor *platformColor(const Color& color)
 {
-    return [PAL::get_UIKit_UIColorClass() _disambiguated_due_to_CIImage_colorWithCGColor:cachedCGColor(color)];
+    return [PAL::getUIColorClass() _disambiguated_due_to_CIImage_colorWithCGColor:cachedCGColor(color)];
 }
 
 #endif

Modified: trunk/Source/WebCore/platform/ios/PlatformScreenIOS.mm (238469 => 238470)


--- trunk/Source/WebCore/platform/ios/PlatformScreenIOS.mm	2018-11-24 15:13:15 UTC (rev 238469)
+++ trunk/Source/WebCore/platform/ios/PlatformScreenIOS.mm	2018-11-24 18:37:14 UTC (rev 238470)
@@ -129,16 +129,16 @@
 
 FloatSize screenSize()
 {
-    if (deviceHasIPadCapability() && [[PAL::get_UIKit_UIApplicationClass() sharedApplication] _isClassic])
+    if (deviceHasIPadCapability() && [[PAL::getUIApplicationClass() sharedApplication] _isClassic])
         return { 320, 480 };
-    return FloatSize([[PAL::get_UIKit_UIScreenClass() mainScreen] _referenceBounds].size);
+    return FloatSize([[PAL::getUIScreenClass() mainScreen] _referenceBounds].size);
 }
 
 FloatSize availableScreenSize()
 {
-    if (deviceHasIPadCapability() && [[PAL::get_UIKit_UIApplicationClass() sharedApplication] _isClassic])
+    if (deviceHasIPadCapability() && [[PAL::getUIApplicationClass() sharedApplication] _isClassic])
         return { 320, 480 };
-    return FloatSize([PAL::get_UIKit_UIScreenClass() mainScreen].bounds.size);
+    return FloatSize([PAL::getUIScreenClass() mainScreen].bounds.size);
 }
 
 #if USE(APPLE_INTERNAL_SDK) && __has_include(<WebKitAdditions/PlatformScreenIOS.mm>)
@@ -153,7 +153,7 @@
 float screenScaleFactor(UIScreen *screen)
 {
     if (!screen)
-        screen = [PAL::get_UIKit_UIScreenClass() mainScreen];
+        screen = [PAL::getUIScreenClass() mainScreen];
 
     return screen.scale;
 }

Modified: trunk/Source/WebKit/ChangeLog (238469 => 238470)


--- trunk/Source/WebKit/ChangeLog	2018-11-24 15:13:15 UTC (rev 238469)
+++ trunk/Source/WebKit/ChangeLog	2018-11-24 18:37:14 UTC (rev 238470)
@@ -1,3 +1,14 @@
+2018-11-24  Andy Estes  <[email protected]>
+
+        [Cocoa] SOFT_LINK_CLASS_FOR_{HEADER,SOURCE} should generate a more concise getter function
+        https://bugs.webkit.org/show_bug.cgi?id=191899
+
+        Reviewed by Dean Jackson.
+
+        * Shared/cocoa/WebCoreArgumentCodersCocoa.mm:
+        * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
+        * UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
+
 2018-11-23  Antti Koivisto  <[email protected]>
 
         Replace LayerOrView typedef with a class

Modified: trunk/Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm (238469 => 238470)


--- trunk/Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm	2018-11-24 15:13:15 UTC (rev 238469)
+++ trunk/Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm	2018-11-24 18:37:14 UTC (rev 238470)
@@ -55,7 +55,7 @@
     auto data = "" alloc] initWithBytesNoCopy:const_cast<void*>(static_cast<const void*>(dataReference.data())) length:dataReference.size() freeWhenDone:NO]);
     auto unarchiver = secureUnarchiverFromData(data.get());
     @try {
-        PKPayment *pkPayment = [unarchiver decodeObjectOfClass:PAL::get_PassKit_PKPaymentClass() forKey:NSKeyedArchiveRootObjectKey];
+        PKPayment *pkPayment = [unarchiver decodeObjectOfClass:PAL::getPKPaymentClass() forKey:NSKeyedArchiveRootObjectKey];
         payment = Payment(pkPayment);
     } @catch (NSException *exception) {
         LOG_ERROR("Failed to decode PKPayment: %@", exception);
@@ -106,7 +106,7 @@
     auto data = "" alloc] initWithBytesNoCopy:const_cast<void*>(static_cast<const void*>(dataReference.data())) length:dataReference.size() freeWhenDone:NO]);
     auto unarchiver = secureUnarchiverFromData(data.get());
     @try {
-        PKContact *pkContact = [unarchiver decodeObjectOfClass:PAL::get_PassKit_PKContactClass() forKey:NSKeyedArchiveRootObjectKey];
+        PKContact *pkContact = [unarchiver decodeObjectOfClass:PAL::getPKContactClass() forKey:NSKeyedArchiveRootObjectKey];
         paymentContact = PaymentContact(pkContact);
     } @catch (NSException *exception) {
         LOG_ERROR("Failed to decode PKContact: %@", exception);
@@ -163,7 +163,7 @@
     auto data = "" alloc] initWithBytesNoCopy:const_cast<void*>(static_cast<const void*>(dataReference.data())) length:dataReference.size() freeWhenDone:NO]);
     auto unarchiver = secureUnarchiverFromData(data.get());
     @try {
-        PKPaymentMerchantSession *pkPaymentMerchantSession = [unarchiver decodeObjectOfClass:PAL::get_PassKit_PKPaymentMerchantSessionClass() forKey:NSKeyedArchiveRootObjectKey];
+        PKPaymentMerchantSession *pkPaymentMerchantSession = [unarchiver decodeObjectOfClass:PAL::getPKPaymentMerchantSessionClass() forKey:NSKeyedArchiveRootObjectKey];
         paymentMerchantSession = PaymentMerchantSession(pkPaymentMerchantSession);
     } @catch (NSException *exception) {
         LOG_ERROR("Failed to decode PKPaymentMerchantSession: %@", exception);
@@ -193,7 +193,7 @@
     auto data = "" alloc] initWithBytesNoCopy:const_cast<void*>(static_cast<const void*>(dataReference.data())) length:dataReference.size() freeWhenDone:NO]);
     auto unarchiver = secureUnarchiverFromData(data.get());
     @try {
-        PKPaymentMethod *pkPaymentMethod = [unarchiver decodeObjectOfClass:PAL::get_PassKit_PKPaymentMethodClass() forKey:NSKeyedArchiveRootObjectKey];
+        PKPaymentMethod *pkPaymentMethod = [unarchiver decodeObjectOfClass:PAL::getPKPaymentMethodClass() forKey:NSKeyedArchiveRootObjectKey];
         paymentMethod = PaymentMethod(pkPaymentMethod);
     } @catch (NSException *exception) {
         LOG_ERROR("Failed to decode PKPayment: %@", exception);

Modified: trunk/Source/WebKit/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm (238469 => 238470)


--- trunk/Source/WebKit/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm	2018-11-24 15:13:15 UTC (rev 238469)
+++ trunk/Source/WebKit/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm	2018-11-24 18:37:14 UTC (rev 238470)
@@ -84,7 +84,7 @@
     ASSERT(!_sessionBlock);
     _sessionBlock = sessionBlock;
 
-    [PAL::get_PassKit_PKPaymentAuthorizationViewControllerClass() paymentServicesMerchantURL:^(NSURL *merchantURL, NSError *error) {
+    [PAL::getPKPaymentAuthorizationViewControllerClass() paymentServicesMerchantURL:^(NSURL *merchantURL, NSError *error) {
         if (error)
             LOG_ERROR("PKCanMakePaymentsWithMerchantIdentifierAndDomain error %@", error);
 
@@ -258,7 +258,7 @@
 
 bool WebPaymentCoordinatorProxy::platformCanMakePayments()
 {
-    return [PAL::get_PassKit_PKPaymentAuthorizationViewControllerClass() canMakePayments];
+    return [PAL::getPKPaymentAuthorizationViewControllerClass() canMakePayments];
 }
 
 void WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard(const String& merchantIdentifier, const String& domainName, WTF::Function<void (bool)>&& completionHandler)
@@ -350,7 +350,7 @@
 
 static RetainPtr<PKPaymentSummaryItem> toPKPaymentSummaryItem(const WebCore::ApplePaySessionPaymentRequest::LineItem& lineItem)
 {
-    return [PAL::get_PassKit_PKPaymentSummaryItemClass() summaryItemWithLabel:lineItem.label amount:toDecimalNumber(lineItem.amount) type:toPKPaymentSummaryItemType(lineItem.type)];
+    return [PAL::getPKPaymentSummaryItemClass() summaryItemWithLabel:lineItem.label amount:toDecimalNumber(lineItem.amount) type:toPKPaymentSummaryItemType(lineItem.type)];
 }
 
 static RetainPtr<NSArray> toPKPaymentSummaryItems(const WebCore::ApplePaySessionPaymentRequest::TotalAndLineItems& totalAndLineItems)
@@ -409,7 +409,7 @@
 
 static RetainPtr<PKShippingMethod> toPKShippingMethod(const WebCore::ApplePaySessionPaymentRequest::ShippingMethod& shippingMethod)
 {
-    RetainPtr<PKShippingMethod> result = [PAL::get_PassKit_PKShippingMethodClass() summaryItemWithLabel:shippingMethod.label amount:toDecimalNumber(shippingMethod.amount)];
+    RetainPtr<PKShippingMethod> result = [PAL::getPKShippingMethodClass() summaryItemWithLabel:shippingMethod.label amount:toDecimalNumber(shippingMethod.amount)];
     [result setIdentifier:shippingMethod.identifier];
     [result setDetail:shippingMethod.detail];
 
@@ -798,7 +798,7 @@
 
 Vector<String> WebPaymentCoordinatorProxy::platformAvailablePaymentNetworks()
 {
-    NSArray<PKPaymentNetwork> *availableNetworks = [PAL::get_PassKit_PKPaymentRequestClass() availableNetworks];
+    NSArray<PKPaymentNetwork> *availableNetworks = [PAL::getPKPaymentRequestClass() availableNetworks];
     Vector<String> result;
     result.reserveInitialCapacity(availableNetworks.count);
     for (PKPaymentNetwork network in availableNetworks)

Modified: trunk/Source/WebKit/UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm (238469 => 238470)


--- trunk/Source/WebKit/UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm	2018-11-24 15:13:15 UTC (rev 238469)
+++ trunk/Source/WebKit/UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm	2018-11-24 18:37:14 UTC (rev 238470)
@@ -41,7 +41,7 @@
 
     auto showPaymentUIRequestSeed = m_showPaymentUIRequestSeed;
     auto weakThis = makeWeakPtr(*this);
-    [PAL::get_PassKit_PKPaymentAuthorizationViewControllerClass() requestViewControllerWithPaymentRequest:paymentRequest.get() completion:BlockPtr<void(PKPaymentAuthorizationViewController *, NSError *)>::fromCallable([paymentRequest, showPaymentUIRequestSeed, weakThis, completionHandler = WTFMove(completionHandler)](PKPaymentAuthorizationViewController *viewController, NSError *error) {
+    [PAL::getPKPaymentAuthorizationViewControllerClass() requestViewControllerWithPaymentRequest:paymentRequest.get() completion:BlockPtr<void(PKPaymentAuthorizationViewController *, NSError *)>::fromCallable([paymentRequest, showPaymentUIRequestSeed, weakThis, completionHandler = WTFMove(completionHandler)](PKPaymentAuthorizationViewController *viewController, NSError *error) {
         auto paymentCoordinatorProxy = weakThis.get();
         if (!paymentCoordinatorProxy)
             return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to