Title: [202444] trunk/Source
Revision
202444
Author
[email protected]
Date
2016-06-24 13:49:31 -0700 (Fri, 24 Jun 2016)

Log Message

Inline more of the Apple Pay source code
https://bugs.webkit.org/show_bug.cgi?id=159099

Reviewed by Andreas Kling.

Source/WebCore:

* page/Settings.h:
(WebCore::Settings::applePayEnabled):
(WebCore::Settings::setApplePayEnabled):
(WebCore::Settings::applePayCapabilityDisclosureAllowed):
(WebCore::Settings::setApplePayCapabilityDisclosureAllowed):

Source/WebKit2:

* Shared/Cocoa/WebCoreArgumentCodersCocoa.h: Removed.
* Shared/WebCoreArgumentCoders.h:
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _applePayCapabilityDisclosureAllowed]):
(-[WKPreferences _setApplePayCapabilityDisclosureAllowed:]):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _applePayEnabled]):
(-[WKWebViewConfiguration _setApplePayEnabled:]):
(-[WKWebViewConfiguration _paymentsEnabled]):
(-[WKWebViewConfiguration _setPaymentsEnabled:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::reattachToWebProcess):
(WebKit::WebPageProxy::resetState):
* UIProcess/WebPageProxy.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_userInterfaceLayoutDirection):
(WebKit::WebPage::updatePreferences):

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (202443 => 202444)


--- trunk/Source/WebCore/ChangeLog	2016-06-24 20:30:04 UTC (rev 202443)
+++ trunk/Source/WebCore/ChangeLog	2016-06-24 20:49:31 UTC (rev 202444)
@@ -1,5 +1,18 @@
 2016-06-24  Anders Carlsson  <[email protected]>
 
+        Inline more of the Apple Pay source code
+        https://bugs.webkit.org/show_bug.cgi?id=159099
+
+        Reviewed by Andreas Kling.
+
+        * page/Settings.h:
+        (WebCore::Settings::applePayEnabled):
+        (WebCore::Settings::setApplePayEnabled):
+        (WebCore::Settings::applePayCapabilityDisclosureAllowed):
+        (WebCore::Settings::setApplePayCapabilityDisclosureAllowed):
+
+2016-06-24  Anders Carlsson  <[email protected]>
+
         Windows build fix.
 
         * platform/GenericTaskQueue.h:

Modified: trunk/Source/WebCore/page/Settings.h (202443 => 202444)


--- trunk/Source/WebCore/page/Settings.h	2016-06-24 20:30:04 UTC (rev 202443)
+++ trunk/Source/WebCore/page/Settings.h	2016-06-24 20:49:31 UTC (rev 202444)
@@ -289,6 +289,14 @@
     WEBCORE_EXPORT static void setMockCaptureDevicesEnabled(bool);
 #endif
 
+#if ENABLE(APPLE_PAY)
+    bool applePayEnabled() const { return m_applePayEnabled; }
+    void setApplePayEnabled(bool applePayEnabled) { m_applePayEnabled = applePayEnabled; }
+
+    bool applePayCapabilityDisclosureAllowed() const { return m_applePayCapabilityDisclosureAllowed; }
+    void setApplePayCapabilityDisclosureAllowed(bool applePayCapabilityDisclosureAllowed) { m_applePayCapabilityDisclosureAllowed = applePayCapabilityDisclosureAllowed; }
+#endif
+
     WEBCORE_EXPORT void setForcePendingWebGLPolicy(bool);
     bool isForcePendingWebGLPolicy() const { return m_forcePendingWebGLPolicy; }
 
@@ -295,10 +303,6 @@
     WEBCORE_EXPORT static void setAllowsAnySSLCertificate(bool);
     static bool allowsAnySSLCertificate();
 
-#if USE(APPLE_INTERNAL_SDK)
-#import <WebKitAdditions/SettingsGettersAndSetters.h>
-#endif
-
 private:
     explicit Settings(Page*);
 
@@ -390,13 +394,14 @@
     static bool gMockCaptureDevicesEnabled;
 #endif
 
+#if ENABLE(APPLE_PAY)
+    bool m_applePayEnabled { false };
+    bool m_applePayCapabilityDisclosureAllowed { true };
+#endif
+
     static bool gLowPowerVideoAudioBufferSizeEnabled;
     static bool gResourceLoadStatisticsEnabledEnabled;
     static bool gAllowsAnySSLCertificate;
-
-#if USE(APPLE_INTERNAL_SDK)
-#import <WebKitAdditions/SettingsMembers.h>
-#endif
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebKit2/ChangeLog (202443 => 202444)


--- trunk/Source/WebKit2/ChangeLog	2016-06-24 20:30:04 UTC (rev 202443)
+++ trunk/Source/WebKit2/ChangeLog	2016-06-24 20:49:31 UTC (rev 202444)
@@ -1,3 +1,35 @@
+2016-06-24  Anders Carlsson  <[email protected]>
+
+        Inline more of the Apple Pay source code
+        https://bugs.webkit.org/show_bug.cgi?id=159099
+
+        Reviewed by Andreas Kling.
+
+        * Shared/Cocoa/WebCoreArgumentCodersCocoa.h: Removed.
+        * Shared/WebCoreArgumentCoders.h:
+        * Shared/WebPreferencesDefinitions.h:
+        * UIProcess/API/Cocoa/WKPreferences.mm:
+        (-[WKPreferences _applePayCapabilityDisclosureAllowed]):
+        (-[WKPreferences _setApplePayCapabilityDisclosureAllowed:]):
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _initializeWithConfiguration:]):
+        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
+        (-[WKWebViewConfiguration copyWithZone:]):
+        (-[WKWebViewConfiguration _applePayEnabled]):
+        (-[WKWebViewConfiguration _setApplePayEnabled:]):
+        (-[WKWebViewConfiguration _paymentsEnabled]):
+        (-[WKWebViewConfiguration _setPaymentsEnabled:]):
+        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::WebPageProxy):
+        (WebKit::WebPageProxy::reattachToWebProcess):
+        (WebKit::WebPageProxy::resetState):
+        * UIProcess/WebPageProxy.h:
+        * WebKit2.xcodeproj/project.pbxproj:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::m_userInterfaceLayoutDirection):
+        (WebKit::WebPage::updatePreferences):
+
 2016-06-21  Anders Carlsson  <[email protected]>
 
         Rename NoncopyableFunction to Function

Deleted: trunk/Source/WebKit2/Shared/Cocoa/WebCoreArgumentCodersCocoa.h (202443 => 202444)


--- trunk/Source/WebKit2/Shared/Cocoa/WebCoreArgumentCodersCocoa.h	2016-06-24 20:30:04 UTC (rev 202443)
+++ trunk/Source/WebKit2/Shared/Cocoa/WebCoreArgumentCodersCocoa.h	2016-06-24 20:49:31 UTC (rev 202444)
@@ -1,91 +0,0 @@
-/*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#if ENABLE(APPLE_PAY)
-
-#include <WebCore/PaymentHeaders.h>
-
-namespace IPC {
-
-template<> struct ArgumentCoder<WebCore::Payment> {
-    static void encode(ArgumentEncoder&, const WebCore::Payment&);
-    static bool decode(ArgumentDecoder&, WebCore::Payment&);
-};
-
-template<> struct ArgumentCoder<WebCore::PaymentContact> {
-    static void encode(ArgumentEncoder&, const WebCore::PaymentContact&);
-    static bool decode(ArgumentDecoder&, WebCore::PaymentContact&);
-};
-
-template<> struct ArgumentCoder<WebCore::PaymentMerchantSession> {
-    static void encode(ArgumentEncoder&, const WebCore::PaymentMerchantSession&);
-    static bool decode(ArgumentDecoder&, WebCore::PaymentMerchantSession&);
-};
-
-template<> struct ArgumentCoder<WebCore::PaymentMethod> {
-    static void encode(ArgumentEncoder&, const WebCore::PaymentMethod&);
-    static bool decode(ArgumentDecoder&, WebCore::PaymentMethod&);
-};
-
-template<> struct ArgumentCoder<WebCore::PaymentRequest> {
-    static void encode(ArgumentEncoder&, const WebCore::PaymentRequest&);
-    static bool decode(ArgumentDecoder&, WebCore::PaymentRequest&);
-};
-
-template<> struct ArgumentCoder<WebCore::PaymentRequest::AddressFields> {
-    static void encode(ArgumentEncoder&, const WebCore::PaymentRequest::AddressFields&);
-    static bool decode(ArgumentDecoder&, WebCore::PaymentRequest::AddressFields&);
-};
-
-template<> struct ArgumentCoder<WebCore::PaymentRequest::LineItem> {
-    static void encode(ArgumentEncoder&, const WebCore::PaymentRequest::LineItem&);
-    static bool decode(ArgumentDecoder&, WebCore::PaymentRequest::LineItem&);
-};
-
-template<> struct ArgumentCoder<WebCore::PaymentRequest::MerchantCapabilities> {
-    static void encode(ArgumentEncoder&, const WebCore::PaymentRequest::MerchantCapabilities&);
-    static bool decode(ArgumentDecoder&, WebCore::PaymentRequest::MerchantCapabilities&);
-};
-
-template<> struct ArgumentCoder<WebCore::PaymentRequest::ShippingMethod> {
-    static void encode(ArgumentEncoder&, const WebCore::PaymentRequest::ShippingMethod&);
-    static bool decode(ArgumentDecoder&, WebCore::PaymentRequest::ShippingMethod&);
-};
-
-template<> struct ArgumentCoder<WebCore::PaymentRequest::SupportedNetworks> {
-    static void encode(ArgumentEncoder&, const WebCore::PaymentRequest::SupportedNetworks&);
-    static bool decode(ArgumentDecoder&, WebCore::PaymentRequest::SupportedNetworks&);
-};
-
-template<> struct ArgumentCoder<WebCore::PaymentRequest::TotalAndLineItems> {
-    static void encode(ArgumentEncoder&, const WebCore::PaymentRequest::TotalAndLineItems&);
-    static bool decode(ArgumentDecoder&, WebCore::PaymentRequest::TotalAndLineItems&);
-};
-
-}
-
-#endif

Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h (202443 => 202444)


--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h	2016-06-24 20:30:04 UTC (rev 202443)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h	2016-06-24 20:49:31 UTC (rev 202444)
@@ -27,6 +27,7 @@
 #define WebCoreArgumentCoders_h
 
 #include "ArgumentCoders.h"
+#include <WebCore/PaymentHeaders.h>
 
 namespace WebCore {
 class AffineTransform;
@@ -473,10 +474,65 @@
     static bool decode(ArgumentDecoder&, WebCore::ResourceLoadStatistics&);
 };
 
-} // namespace IPC
+#if ENABLE(APPLE_PAY)
 
-#if USE(APPLE_INTERNAL_SDK)
-#include <WebKitAdditions/WebCoreArgumentCodersAdditions.h>
+template<> struct ArgumentCoder<WebCore::Payment> {
+    static void encode(ArgumentEncoder&, const WebCore::Payment&);
+    static bool decode(ArgumentDecoder&, WebCore::Payment&);
+};
+
+template<> struct ArgumentCoder<WebCore::PaymentContact> {
+    static void encode(ArgumentEncoder&, const WebCore::PaymentContact&);
+    static bool decode(ArgumentDecoder&, WebCore::PaymentContact&);
+};
+
+template<> struct ArgumentCoder<WebCore::PaymentMerchantSession> {
+    static void encode(ArgumentEncoder&, const WebCore::PaymentMerchantSession&);
+    static bool decode(ArgumentDecoder&, WebCore::PaymentMerchantSession&);
+};
+
+template<> struct ArgumentCoder<WebCore::PaymentMethod> {
+    static void encode(ArgumentEncoder&, const WebCore::PaymentMethod&);
+    static bool decode(ArgumentDecoder&, WebCore::PaymentMethod&);
+};
+
+template<> struct ArgumentCoder<WebCore::PaymentRequest> {
+    static void encode(ArgumentEncoder&, const WebCore::PaymentRequest&);
+    static bool decode(ArgumentDecoder&, WebCore::PaymentRequest&);
+};
+
+template<> struct ArgumentCoder<WebCore::PaymentRequest::AddressFields> {
+    static void encode(ArgumentEncoder&, const WebCore::PaymentRequest::AddressFields&);
+    static bool decode(ArgumentDecoder&, WebCore::PaymentRequest::AddressFields&);
+};
+
+template<> struct ArgumentCoder<WebCore::PaymentRequest::LineItem> {
+    static void encode(ArgumentEncoder&, const WebCore::PaymentRequest::LineItem&);
+    static bool decode(ArgumentDecoder&, WebCore::PaymentRequest::LineItem&);
+};
+
+template<> struct ArgumentCoder<WebCore::PaymentRequest::MerchantCapabilities> {
+    static void encode(ArgumentEncoder&, const WebCore::PaymentRequest::MerchantCapabilities&);
+    static bool decode(ArgumentDecoder&, WebCore::PaymentRequest::MerchantCapabilities&);
+};
+
+template<> struct ArgumentCoder<WebCore::PaymentRequest::ShippingMethod> {
+    static void encode(ArgumentEncoder&, const WebCore::PaymentRequest::ShippingMethod&);
+    static bool decode(ArgumentDecoder&, WebCore::PaymentRequest::ShippingMethod&);
+};
+
+template<> struct ArgumentCoder<WebCore::PaymentRequest::SupportedNetworks> {
+    static void encode(ArgumentEncoder&, const WebCore::PaymentRequest::SupportedNetworks&);
+    static bool decode(ArgumentDecoder&, WebCore::PaymentRequest::SupportedNetworks&);
+};
+
+template<> struct ArgumentCoder<WebCore::PaymentRequest::TotalAndLineItems> {
+    static void encode(ArgumentEncoder&, const WebCore::PaymentRequest::TotalAndLineItems&);
+    static bool decode(ArgumentDecoder&, WebCore::PaymentRequest::TotalAndLineItems&);
+};
+
 #endif
 
+} // namespace IPC
+
 #endif // WebCoreArgumentCoders_h

Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (202443 => 202444)


--- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h	2016-06-24 20:30:04 UTC (rev 202443)
+++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h	2016-06-24 20:49:31 UTC (rev 202444)
@@ -26,14 +26,6 @@
 #ifndef WebPreferencesDefinitions_h
 #define WebPreferencesDefinitions_h
 
-#if USE(APPLE_INTERNAL_SDK)
-#import <WebKitAdditions/WebPreferencesDefinitionsAdditions.h>
-#endif
-
-#if !defined(FOR_EACH_ADDITIONAL_WEBKIT_BOOL_PREFERENCE)
-#define FOR_EACH_ADDITIONAL_WEBKIT_BOOL_PREFERENCE(macro)
-#endif
-
 #if PLATFORM(GTK)
 #define DEFAULT_WEBKIT_TABSTOLINKS_ENABLED true
 #else
@@ -236,7 +228,8 @@
     macro(FetchAPIEnabled, fetchAPIEnabled, Bool, bool, false, "", "") \
     macro(DownloadAttributeEnabled, downloadAttributeEnabled, Bool, bool, false, "", "") \
     macro(SelectionPaintingWithoutSelectionGapsEnabled, selectionPaintingWithoutSelectionGapsEnabled, Bool, bool, DEFAULT_SELECTION_PAINTING_WITHOUT_SELECTION_GAPS_ENABLED, "", "") \
-    FOR_EACH_ADDITIONAL_WEBKIT_BOOL_PREFERENCE(macro) \
+    macro(ApplePayEnabled, applePayEnabled, Bool, bool, false, "", "") \
+    macro(ApplePayCapabilityDisclosureAllowed, applePayCapabilityDisclosureAllowed, Bool, bool, true, "", "") \
     \
 
 #define FOR_EACH_WEBKIT_DOUBLE_PREFERENCE(macro) \

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm (202443 => 202444)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm	2016-06-24 20:30:04 UTC (rev 202443)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm	2016-06-24 20:49:31 UTC (rev 202444)
@@ -449,10 +449,22 @@
     _preferences->setEnabledForFeature(value, *feature->_experimentalFeature);
 }
 
-#if USE(APPLE_INTERNAL_SDK)
-#import <WebKitAdditions/WKPreferencesPrivateMethods.mm>
+- (BOOL)_applePayCapabilityDisclosureAllowed
+{
+#if ENABLE(APPLE_PAY)
+    return _preferences->applePayCapabilityDisclosureAllowed();
+#else
+    return NO;
 #endif
+}
 
+- (void)_setApplePayCapabilityDisclosureAllowed:(BOOL)applePayCapabilityDisclosureAllowed
+{
+#if ENABLE(APPLE_PAY)
+    _preferences->setApplePayCapabilityDisclosureAllowed(applePayCapabilityDisclosureAllowed);
+#endif
+}
+
 @end
 
 #endif // WK_API_ENABLED

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (202443 => 202444)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2016-06-24 20:30:04 UTC (rev 202443)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2016-06-24 20:49:31 UTC (rev 202444)
@@ -480,8 +480,8 @@
     pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::allowsAirPlayForMediaPlaybackKey(), WebKit::WebPreferencesStore::Value(!![_configuration allowsAirPlayForMediaPlayback]));
 #endif
 
-#if USE(APPLE_INTERNAL_SDK)
-#import <WebKitAdditions/WKWebViewInitialization.mm>
+#if ENABLE(APPLE_PAY)
+    pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::applePayEnabledKey(), WebKit::WebPreferencesStore::Value(!![_configuration _applePayEnabled]));
 #endif
 
 #if PLATFORM(IOS)

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm (202443 => 202444)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm	2016-06-24 20:30:04 UTC (rev 202443)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm	2016-06-24 20:49:31 UTC (rev 202444)
@@ -124,8 +124,8 @@
 #endif
     BOOL _initialCapitalizationEnabled;
 
-#if USE(APPLE_INTERNAL_SDK)
-#import <WebKitAdditions/WKWebViewConfigurationIvars.mm>
+#if ENABLE(APPLE_PAY)
+    BOOL _applePayEnabled;
 #endif
 }
 
@@ -303,9 +303,8 @@
 #if ENABLE(WIRELESS_TARGET_PLAYBACK)
     configuration->_allowsAirPlayForMediaPlayback = self->_allowsAirPlayForMediaPlayback;
 #endif
-
-#if USE(APPLE_INTERNAL_SDK)
-#import <WebKitAdditions/WKWebViewConfigurationCopy.mm>
+#if ENABLE(APPLE_PAY)
+    configuration->_applePayEnabled = self->_applePayEnabled;
 #endif
 
     return configuration;
@@ -705,10 +704,32 @@
 
 #endif // PLATFORM(MAC)
 
-#if USE(APPLE_INTERNAL_SDK)
-#import <WebKitAdditions/WKWebViewConfigurationPrivateMethods.mm>
+- (BOOL)_applePayEnabled
+{
+#if ENABLE(APPLE_PAY)
+    return _applePayEnabled;
+#else
+    return NO;
 #endif
+}
 
+- (void)_setApplePayEnabled:(BOOL)applePayEnabled
+{
+#if ENABLE(APPLE_PAY)
+    _applePayEnabled = applePayEnabled;
+#endif
+}
+
+- (BOOL)_paymentsEnabled
+{
+    return self._applePayEnabled;
+}
+
+- (void)_setPaymentsEnabled:(BOOL)paymentsEnabled
+{
+    [self _setApplePayEnabled:paymentsEnabled];
+}
+
 @end
 
 @implementation WKWebViewConfiguration (WKDeprecated)

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h (202443 => 202444)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h	2016-06-24 20:30:04 UTC (rev 202443)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h	2016-06-24 20:49:31 UTC (rev 202444)
@@ -55,6 +55,7 @@
 @property (nonatomic, setter=_setMediaDataLoadsAutomatically:) BOOL _mediaDataLoadsAutomatically WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
 @property (nonatomic, setter=_setAttachmentElementEnabled:) BOOL _attachmentElementEnabled WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
 @property (nonatomic, setter=_setInitialCapitalizationEnabled:) BOOL _initialCapitalizationEnabled WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
+@property (nonatomic, setter=_setApplePayEnabled:) BOOL _applePayEnabled WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
 
 #if TARGET_OS_IPHONE
 @property (nonatomic, setter=_setAlwaysRunsAtForegroundPriority:) BOOL _alwaysRunsAtForegroundPriority WK_AVAILABLE(NA, 9_0);

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (202443 => 202444)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2016-06-24 20:30:04 UTC (rev 202443)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2016-06-24 20:49:31 UTC (rev 202444)
@@ -480,8 +480,8 @@
     m_vibration = WebVibrationProxy::create(this);
 #endif
 
-#if USE(APPLE_INTERNAL_SDK)
-#include <WebKitAdditions/WebPageProxyInitialization.cpp>
+#if ENABLE(APPLE_PAY)
+    m_paymentCoordinator = std::make_unique<WebPaymentCoordinatorProxy>(*this);
 #endif
 
     m_process->addMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_pageID, *this);
@@ -715,8 +715,8 @@
     m_videoFullscreenManager = WebVideoFullscreenManagerProxy::create(*this, *m_playbackSessionManager);
 #endif
 
-#if USE(APPLE_INTERNAL_SDK)
-#include <WebKitAdditions/WebPageProxyInitialization.cpp>
+#if ENABLE(APPLE_PAY)
+    m_paymentCoordinator = std::make_unique<WebPaymentCoordinatorProxy>(*this);
 #endif
 
     initializeWebPage();
@@ -5202,8 +5202,8 @@
     m_pageClient.mediaSessionManager().removeAllPlaybackTargetPickerClients(*this);
 #endif
 
-#if USE(APPLE_INTERNAL_SDK)
-#include <WebKitAdditions/WebPageProxyInvalidation.cpp>
+#if ENABLE(APPLE_PAY)
+    m_paymentCoordinator = nullptr;
 #endif
 
     CallbackBase::Error error;

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (202443 => 202444)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2016-06-24 20:30:04 UTC (rev 202443)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2016-06-24 20:49:31 UTC (rev 202444)
@@ -1584,8 +1584,8 @@
     RefPtr<WebVibrationProxy> m_vibration;
 #endif
 
-#if USE(APPLE_INTERNAL_SDK)
-#include <WebKitAdditions/WebPageProxyMembers.h>
+#if ENABLE(APPLE_PAY)
+    std::unique_ptr<WebPaymentCoordinatorProxy> m_paymentCoordinator;
 #endif
 
     CallbackMap m_callbacks;

Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (202443 => 202444)


--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2016-06-24 20:30:04 UTC (rev 202443)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2016-06-24 20:49:31 UTC (rev 202444)
@@ -390,7 +390,6 @@
 		1AB1F78B1D1B3355007C9BD1 /* WebPaymentCoordinatorProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AB1F7881D1B3355007C9BD1 /* WebPaymentCoordinatorProxy.cpp */; };
 		1AB1F78C1D1B3355007C9BD1 /* WebPaymentCoordinatorProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AB1F7891D1B3355007C9BD1 /* WebPaymentCoordinatorProxy.h */; };
 		1AB1F7901D1B34A6007C9BD1 /* WebCoreArgumentCodersCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AB1F78E1D1B34A6007C9BD1 /* WebCoreArgumentCodersCocoa.mm */; };
-		1AB1F7911D1B34A6007C9BD1 /* WebCoreArgumentCodersCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AB1F78F1D1B34A6007C9BD1 /* WebCoreArgumentCodersCocoa.h */; };
 		1AB1F7961D1B3613007C9BD1 /* WebPaymentCoordinatorMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AB1F7921D1B3613007C9BD1 /* WebPaymentCoordinatorMessageReceiver.cpp */; };
 		1AB1F7971D1B3613007C9BD1 /* WebPaymentCoordinatorMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AB1F7931D1B3613007C9BD1 /* WebPaymentCoordinatorMessages.h */; };
 		1AB1F7981D1B3613007C9BD1 /* WebPaymentCoordinatorProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AB1F7941D1B3613007C9BD1 /* WebPaymentCoordinatorProxyMessageReceiver.cpp */; };
@@ -2379,11 +2378,10 @@
 		1AB1F7891D1B3355007C9BD1 /* WebPaymentCoordinatorProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPaymentCoordinatorProxy.h; sourceTree = "<group>"; };
 		1AB1F78A1D1B3355007C9BD1 /* WebPaymentCoordinatorProxy.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebPaymentCoordinatorProxy.messages.in; sourceTree = "<group>"; };
 		1AB1F78E1D1B34A6007C9BD1 /* WebCoreArgumentCodersCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreArgumentCodersCocoa.mm; sourceTree = "<group>"; };
-		1AB1F78F1D1B34A6007C9BD1 /* WebCoreArgumentCodersCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreArgumentCodersCocoa.h; sourceTree = "<group>"; };
-		1AB1F7921D1B3613007C9BD1 /* WebPaymentCoordinatorMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebPaymentCoordinatorMessageReceiver.cpp; path = WebPaymentCoordinatorMessageReceiver.cpp; sourceTree = "<group>"; };
-		1AB1F7931D1B3613007C9BD1 /* WebPaymentCoordinatorMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebPaymentCoordinatorMessages.h; path = WebPaymentCoordinatorMessages.h; sourceTree = "<group>"; };
-		1AB1F7941D1B3613007C9BD1 /* WebPaymentCoordinatorProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebPaymentCoordinatorProxyMessageReceiver.cpp; path = WebPaymentCoordinatorProxyMessageReceiver.cpp; sourceTree = "<group>"; };
-		1AB1F7951D1B3613007C9BD1 /* WebPaymentCoordinatorProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebPaymentCoordinatorProxyMessages.h; path = WebPaymentCoordinatorProxyMessages.h; sourceTree = "<group>"; };
+		1AB1F7921D1B3613007C9BD1 /* WebPaymentCoordinatorMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebPaymentCoordinatorMessageReceiver.cpp; sourceTree = "<group>"; };
+		1AB1F7931D1B3613007C9BD1 /* WebPaymentCoordinatorMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPaymentCoordinatorMessages.h; sourceTree = "<group>"; };
+		1AB1F7941D1B3613007C9BD1 /* WebPaymentCoordinatorProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebPaymentCoordinatorProxyMessageReceiver.cpp; sourceTree = "<group>"; };
+		1AB1F7951D1B3613007C9BD1 /* WebPaymentCoordinatorProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPaymentCoordinatorProxyMessages.h; sourceTree = "<group>"; };
 		1AB31A9316BC65AB00F6DBC9 /* StorageManager.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = StorageManager.messages.in; sourceTree = "<group>"; };
 		1AB31A9416BC688100F6DBC9 /* StorageManagerMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StorageManagerMessageReceiver.cpp; sourceTree = "<group>"; };
 		1AB31A9516BC688100F6DBC9 /* StorageManagerMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageManagerMessages.h; sourceTree = "<group>"; };
@@ -5241,8 +5239,6 @@
 		37C4C0901814B37B003688B9 /* cocoa */ = {
 			isa = PBXGroup;
 			children = (
-				1AB1F78E1D1B34A6007C9BD1 /* WebCoreArgumentCodersCocoa.mm */,
-				1AB1F78F1D1B34A6007C9BD1 /* WebCoreArgumentCodersCocoa.h */,
 				1A1EF1971A1D5B420023200A /* APIDataCocoa.mm */,
 				378E1A3B181ED6FF0031007A /* APIObject.mm */,
 				37BEC4DF19491486008B4286 /* CompletionHandlerCallChecker.h */,
@@ -5249,6 +5245,7 @@
 				37BEC4DE19491486008B4286 /* CompletionHandlerCallChecker.mm */,
 				C55F916C1C595E440029E92D /* DataDetectionResult.h */,
 				C55F916D1C595E440029E92D /* DataDetectionResult.mm */,
+				1AB1F78E1D1B34A6007C9BD1 /* WebCoreArgumentCodersCocoa.mm */,
 				37C4C0921814B3AF003688B9 /* WKNSArray.h */,
 				37C4C0911814B3AF003688B9 /* WKNSArray.mm */,
 				373CEAD4185417AE008C363D /* WKNSData.h */,
@@ -8139,7 +8136,6 @@
 				1AD01BCD1905D54900C9C45F /* WKReloadFrameErrorRecoveryAttempter.h in Headers */,
 				1A9E329B1822E1CC00F5D04C /* WKRemoteObject.h in Headers */,
 				1A9E329F1822FEDD00F5D04C /* WKRemoteObjectCoder.h in Headers */,
-				1AB1F7911D1B34A6007C9BD1 /* WebCoreArgumentCodersCocoa.h in Headers */,
 				37948409150C4B9700E52CE9 /* WKRenderLayer.h in Headers */,
 				37608823150414F700FC82C7 /* WKRenderObject.h in Headers */,
 				3336763B130C99DC006C9DE2 /* WKResourceCacheManager.h in Headers */,

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (202443 => 202444)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2016-06-24 20:30:04 UTC (rev 202443)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2016-06-24 20:49:31 UTC (rev 202444)
@@ -92,6 +92,7 @@
 #include "WebPageMessages.h"
 #include "WebPageOverlay.h"
 #include "WebPageProxyMessages.h"
+#include "WebPaymentCoordinator.h"
 #include "WebPlugInClient.h"
 #include "WebPopupMenu.h"
 #include "WebPreferencesDefinitions.h"
@@ -239,10 +240,6 @@
 #include <WebCore/MediaPlayerRequestInstallMissingPluginsCallback.h>
 #endif
 
-#if USE(APPLE_INTERNAL_SDK)
-#include <WebKitAdditions/WebPageIncludes.h>
-#endif
-
 using namespace JSC;
 using namespace WebCore;
 
@@ -412,8 +409,8 @@
     pageConfiguration.userContentProvider = m_userContentController.ptr();
     pageConfiguration.visitedLinkStore = VisitedLinkTableController::getOrCreate(parameters.visitedLinkTableID);
 
-#if USE(APPLE_INTERNAL_SDK)
-#include <WebKitAdditions/WebPageInitialization.h>
+#if ENABLE(APPLE_PAY)
+    pageConfiguration.paymentCoordinatorClient = new WebPaymentCoordinator(*this);
 #endif
 
     m_page = std::make_unique<Page>(WTFMove(pageConfiguration));
@@ -3108,8 +3105,9 @@
     if (systemLayoutDirectionCandidate == WebCore::LTR || systemLayoutDirectionCandidate == WebCore::RTL)
         settings.setSystemLayoutDirection(systemLayoutDirectionCandidate);
 
-#if USE(APPLE_INTERNAL_SDK)
-#include <WebKitAdditions/WebPagePreferences.cpp>
+#if ENABLE(APPLE_PAY)
+    settings.setApplePayEnabled(store.getBoolValueForKey(WebPreferencesKey::applePayEnabledKey()));
+    settings.setApplePayCapabilityDisclosureAllowed(store.getBoolValueForKey(WebPreferencesKey::applePayCapabilityDisclosureAllowedKey()));
 #endif
 
 #if PLATFORM(IOS)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to