Skip to content
Permalink
Browse files
[Payment Request] Enable Payment Request whenever Apple Pay is enabled
https://bugs.webkit.org/show_bug.cgi?id=178880

Reviewed by Tim Horton.

Source/WebKit:

* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetPaymentRequestEnabled): Deleted.
(WKPreferencesGetPaymentRequestEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Tools:

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):


Canonical link: https://commits.webkit.org/195034@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224043 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
aestes committed Oct 26, 2017
1 parent 24dde66 commit 19a1047a4f0558898c51535831ead2b5eea9fa23
Showing 7 changed files with 26 additions and 26 deletions.
@@ -1,3 +1,18 @@
2017-10-26 Andy Estes <aestes@apple.com>

[Payment Request] Enable Payment Request whenever Apple Pay is enabled
https://bugs.webkit.org/show_bug.cgi?id=178880

Reviewed by Tim Horton.

* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetPaymentRequestEnabled): Deleted.
(WKPreferencesGetPaymentRequestEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

2017-10-26 Chris Dumez <cdumez@apple.com>

Bring back SWContextManager abstraction in WebCore
@@ -950,13 +950,6 @@ LinkPreloadEnabled:
humanReadableDescription: "Link preload support"
category: experimental

PaymentRequestEnabled:
type: bool
defaultValue: false
humanReadableName: "Payment Request"
humanReadableDescription: "W3C Payment Request API"
category: experimental

WebRTCLegacyAPIDisabled:
type: bool
defaultValue: DEFAULT_EXPERIMENTAL_FEATURES_ENABLED
@@ -1890,16 +1890,6 @@ bool WKPreferencesGetInspectorAdditionsEnabled(WKPreferencesRef preferencesRef)
return toImpl(preferencesRef)->inspectorAdditionsEnabled();
}

void WKPreferencesSetPaymentRequestEnabled(WKPreferencesRef preferencesRef, bool flag)
{
toImpl(preferencesRef)->setPaymentRequestEnabled(flag);
}

bool WKPreferencesGetPaymentRequestEnabled(WKPreferencesRef preferencesRef)
{
return toImpl(preferencesRef)->paymentRequestEnabled();
}

void WKPreferencesSetStorageAccessAPIEnabled(WKPreferencesRef preferencesRef, bool flag)
{
toImpl(preferencesRef)->setStorageAccessAPIEnabled(flag);
@@ -533,10 +533,6 @@ WK_EXPORT bool WKPreferencesGetIsSecureContextAttributeEnabled(WKPreferencesRef)
WK_EXPORT void WKPreferencesSetInspectorAdditionsEnabled(WKPreferencesRef, bool flag);
WK_EXPORT bool WKPreferencesGetInspectorAdditionsEnabled(WKPreferencesRef);

// Defaults to false.
WK_EXPORT void WKPreferencesSetPaymentRequestEnabled(WKPreferencesRef, bool flag);
WK_EXPORT bool WKPreferencesGetPaymentRequestEnabled(WKPreferencesRef);

// Defaults to false.
WK_EXPORT void WKPreferencesSetStorageAccessAPIEnabled(WKPreferencesRef, bool flag);
WK_EXPORT bool WKPreferencesGetStorageAccessAPIEnabled(WKPreferencesRef);
@@ -3393,7 +3393,7 @@ void WebPage::updatePreferences(const WebPreferencesStore& store)
#endif

#if ENABLE(PAYMENT_REQUEST)
settings.setPaymentRequestEnabled(store.getBoolValueForKey(WebPreferencesKey::paymentRequestEnabledKey()));
settings.setPaymentRequestEnabled(store.getBoolValueForKey(WebPreferencesKey::applePayEnabledKey()));
#endif

settings.setStorageAccessAPIEnabled(store.getBoolValueForKey(WebPreferencesKey::storageAccessAPIEnabledKey()));
@@ -1,3 +1,13 @@
2017-10-26 Andy Estes <aestes@apple.com>

[Payment Request] Enable Payment Request whenever Apple Pay is enabled
https://bugs.webkit.org/show_bug.cgi?id=178880

Reviewed by Tim Horton.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):

2017-10-26 Joseph Pecoraro <pecoraro@apple.com>

Add and update some watchlists
@@ -739,10 +739,6 @@ void TestController::resetPreferencesToConsistentValues(const TestOptions& optio

WKPreferencesSetInspectorAdditionsEnabled(preferences, options.enableInspectorAdditions);

#if ENABLE(PAYMENT_REQUEST)
WKPreferencesSetPaymentRequestEnabled(preferences, true);
#endif

WKPreferencesSetStorageAccessAPIEnabled(preferences, true);

platformResetPreferencesToConsistentValues();

0 comments on commit 19a1047

Please sign in to comment.