Title: [246014] trunk/Source
Revision
246014
Author
[email protected]
Date
2019-06-01 09:19:40 -0700 (Sat, 01 Jun 2019)

Log Message

[Apple Pay] Every PaymentCoordinator client should explicitly decide whether they support unrestricted Apple Pay
https://bugs.webkit.org/show_bug.cgi?id=198449
<rdar://problem/51038583>

Reviewed by Wenson Hsieh.

Source/WebCore:

Rather than having a default return value of true for
PaymentCoordinatorClient::supportsUnrestrictedApplePay, make it pure virtual to force each
subclass to implement an override and explicitly choose an appropriate return value.

The only two clients that did not explicitly override were the empty client and
WebKitLegacy's client, and Apple Pay was never enabled in those clients, so there is no
change in behavior.

* Modules/applepay/PaymentCoordinatorClient.h:
(WebCore::PaymentCoordinatorClient::isAlwaysOnLoggingAllowed const):
(WebCore::PaymentCoordinatorClient::supportsUnrestrictedApplePay const): Deleted.
* loader/EmptyClients.cpp:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebPaymentCoordinatorClient.h:
* WebCoreSupport/WebPaymentCoordinatorClient.mm:
(WebPaymentCoordinatorClient::supportsUnrestrictedApplePay const):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (246013 => 246014)


--- trunk/Source/WebCore/ChangeLog	2019-06-01 06:19:52 UTC (rev 246013)
+++ trunk/Source/WebCore/ChangeLog	2019-06-01 16:19:40 UTC (rev 246014)
@@ -1,3 +1,24 @@
+2019-06-01  Andy Estes  <[email protected]>
+
+        [Apple Pay] Every PaymentCoordinator client should explicitly decide whether they support unrestricted Apple Pay
+        https://bugs.webkit.org/show_bug.cgi?id=198449
+        <rdar://problem/51038583>
+
+        Reviewed by Wenson Hsieh.
+
+        Rather than having a default return value of true for
+        PaymentCoordinatorClient::supportsUnrestrictedApplePay, make it pure virtual to force each
+        subclass to implement an override and explicitly choose an appropriate return value.
+
+        The only two clients that did not explicitly override were the empty client and
+        WebKitLegacy's client, and Apple Pay was never enabled in those clients, so there is no
+        change in behavior.
+
+        * Modules/applepay/PaymentCoordinatorClient.h:
+        (WebCore::PaymentCoordinatorClient::isAlwaysOnLoggingAllowed const):
+        (WebCore::PaymentCoordinatorClient::supportsUnrestrictedApplePay const): Deleted.
+        * loader/EmptyClients.cpp:
+
 2019-05-31  Youenn Fablet  <[email protected]>
 
         Add an option to mute audio capture automatically when page is not visible

Modified: trunk/Source/WebCore/Modules/applepay/PaymentCoordinatorClient.h (246013 => 246014)


--- trunk/Source/WebCore/Modules/applepay/PaymentCoordinatorClient.h	2019-06-01 06:19:52 UTC (rev 246013)
+++ trunk/Source/WebCore/Modules/applepay/PaymentCoordinatorClient.h	2019-06-01 16:19:40 UTC (rev 246014)
@@ -62,12 +62,12 @@
     virtual void abortPaymentSession() = 0;
     virtual void cancelPaymentSession() = 0;
     virtual void paymentCoordinatorDestroyed() = 0;
+    virtual bool supportsUnrestrictedApplePay() const = 0;
 
     virtual bool isMockPaymentCoordinator() const { return false; }
     virtual bool isWebPaymentCoordinator() const { return false; }
 
     virtual bool isAlwaysOnLoggingAllowed() const { return false; }
-    virtual bool supportsUnrestrictedApplePay() const { return true; }
 
 protected:
     virtual ~PaymentCoordinatorClient() = default;

Modified: trunk/Source/WebCore/loader/EmptyClients.cpp (246013 => 246014)


--- trunk/Source/WebCore/loader/EmptyClients.cpp	2019-06-01 06:19:52 UTC (rev 246013)
+++ trunk/Source/WebCore/loader/EmptyClients.cpp	2019-06-01 16:19:40 UTC (rev 246014)
@@ -332,6 +332,7 @@
     void cancelPaymentSession() final { }
     void abortPaymentSession() final { }
     void paymentCoordinatorDestroyed() final { }
+    bool supportsUnrestrictedApplePay() const final { return false; }
 };
 
 #endif

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (246013 => 246014)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2019-06-01 06:19:52 UTC (rev 246013)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2019-06-01 16:19:40 UTC (rev 246014)
@@ -1,3 +1,15 @@
+2019-06-01  Andy Estes  <[email protected]>
+
+        [Apple Pay] Every PaymentCoordinator client should explicitly decide whether they support unrestricted Apple Pay
+        https://bugs.webkit.org/show_bug.cgi?id=198449
+        <rdar://problem/51038583>
+
+        Reviewed by Wenson Hsieh.
+
+        * WebCoreSupport/WebPaymentCoordinatorClient.h:
+        * WebCoreSupport/WebPaymentCoordinatorClient.mm:
+        (WebPaymentCoordinatorClient::supportsUnrestrictedApplePay const):
+
 2019-05-29  Don Olmstead  <[email protected]>
 
         Remove ENABLE definitions from WebKit config files

Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebPaymentCoordinatorClient.h (246013 => 246014)


--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebPaymentCoordinatorClient.h	2019-06-01 06:19:52 UTC (rev 246013)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebPaymentCoordinatorClient.h	2019-06-01 16:19:40 UTC (rev 246014)
@@ -49,6 +49,7 @@
     void abortPaymentSession() override;
     void cancelPaymentSession() override;
     void paymentCoordinatorDestroyed() override;
+    bool supportsUnrestrictedApplePay() const override;
 };
 
 #endif

Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebPaymentCoordinatorClient.mm (246013 => 246014)


--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebPaymentCoordinatorClient.mm	2019-06-01 06:19:52 UTC (rev 246013)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebPaymentCoordinatorClient.mm	2019-06-01 16:19:40 UTC (rev 246014)
@@ -101,4 +101,9 @@
     delete this;
 }
 
+bool WebPaymentCoordinatorClient::supportsUnrestrictedApplePay() const
+{
+    return false;
+}
+
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to