Diff
Modified: trunk/Source/WTF/ChangeLog (279183 => 279184)
--- trunk/Source/WTF/ChangeLog 2021-06-23 20:20:15 UTC (rev 279183)
+++ trunk/Source/WTF/ChangeLog 2021-06-23 20:27:12 UTC (rev 279184)
@@ -1,3 +1,18 @@
+2021-06-23 Kate Cheney <katherine_che...@apple.com>
+
+ Migrate App Privacy Report code from WebKitAdditions
+ https://bugs.webkit.org/show_bug.cgi?id=227045
+ <rdar://problem/74333287>
+
+ Reviewed by Alex Christensen.
+
+ Update compile flag naming to align with the App Privacy Report
+ feature. Added a new check for Symptoms for a simpler, more clear
+ check.
+
+ * wtf/PlatformEnableCocoa.h:
+ * wtf/PlatformHave.h:
+
2021-06-23 Aditya Keerthi <akeer...@apple.com>
[iOS] Adopt new date picker presentation SPI
Modified: trunk/Source/WTF/wtf/PlatformEnableCocoa.h (279183 => 279184)
--- trunk/Source/WTF/wtf/PlatformEnableCocoa.h 2021-06-23 20:20:15 UTC (rev 279183)
+++ trunk/Source/WTF/wtf/PlatformEnableCocoa.h 2021-06-23 20:27:12 UTC (rev 279184)
@@ -699,8 +699,8 @@
#define ENABLE_NOTIFY_FILTERING 1
#endif
-#if !defined(ENABLE_APP_BOUND_REQUESTS) && PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000
-#define ENABLE_APP_BOUND_REQUESTS 1
+#if !defined(ENABLE_APP_PRIVACY_REPORT) && PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000
+#define ENABLE_APP_PRIVACY_REPORT 1
#endif
#if !defined(ENABLE_DESTINATION_COLOR_SPACE_DISPLAY_P3)
Modified: trunk/Source/WTF/wtf/PlatformHave.h (279183 => 279184)
--- trunk/Source/WTF/wtf/PlatformHave.h 2021-06-23 20:20:15 UTC (rev 279183)
+++ trunk/Source/WTF/wtf/PlatformHave.h 2021-06-23 20:27:12 UTC (rev 279184)
@@ -1066,3 +1066,7 @@
#if PLATFORM(IOS) || PLATFORM(MACCATALYST)
#define HAVE_UITOOLBAR_STANDARD_APPEARANCE 1
#endif
+
+#if !PLATFORM(IOS_FAMILY_SIMULATOR) && !PLATFORM(WATCHOS)
+#define HAVE_SYMPTOMS_FRAMEWORK 1
+#endif
Modified: trunk/Source/WebKit/ChangeLog (279183 => 279184)
--- trunk/Source/WebKit/ChangeLog 2021-06-23 20:20:15 UTC (rev 279183)
+++ trunk/Source/WebKit/ChangeLog 2021-06-23 20:27:12 UTC (rev 279184)
@@ -1,3 +1,27 @@
+2021-06-23 Kate Cheney <katherine_che...@apple.com>
+
+ Migrate App Privacy Report code from WebKitAdditions
+ https://bugs.webkit.org/show_bug.cgi?id=227045
+ <rdar://problem/74333287>
+
+ Reviewed by Alex Christensen.
+
+ * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
+ (processPCMRequest):
+ (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
+ (contextString): Deleted.
+ This patch deletes the contextString function because it is no longer
+ needed now that CFNetwork sets the attribution context based on the
+ main document URL, and it seemed silly to migrate code from
+ WebKitAdditions just to delete it immediately. This also moves the
+ processPCMRequest function declaration from WebKitAdditions so we can
+ remove NETWORK_DATA_TASK_COCOA_ADDITIONS.
+ * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+ (WebKit::isActingOnBehalfOfAFullWebBrowser):
+ (WebKit::NetworkSessionCocoa::removeNetworkWebsiteData):
+ * UIProcess/Cocoa/WebPageProxyCocoa.mm:
+ (WebKit::WebPageProxy::setLastNavigationWasAppBound):
+
2021-06-23 Aditya Keerthi <akeer...@apple.com>
[iOS] Adopt new date picker presentation SPI
Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm (279183 => 279184)
--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm 2021-06-23 20:20:15 UTC (rev 279183)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm 2021-06-23 20:27:12 UTC (rev 279184)
@@ -57,8 +57,7 @@
#if USE(APPLE_INTERNAL_SDK)
#import <WebKitAdditions/NetworkDataTaskCocoaAdditions.h>
#else
-#define NETWORK_DATA_TASK_COCOA_ADDITIONS UNUSED_VARIABLE(pcmDataCarried);
-static WebCore::RegistrableDomain contextString(NSURLRequest *) { return { }; }
+static void processPCMRequest(WebCore::PrivateClickMeasurement::PcmDataCarried, NSMutableURLRequest *) { };
#endif
namespace WebKit {
@@ -338,24 +337,31 @@
#endif
restrictRequestReferrerToOriginIfNeeded(request);
- // FIXME: Once we are done with NETWORK_DATA_TASK_COCOA_ADDITIONS, make nsRequest a RetainPtr and get rid of protectedNSRequest and pcmDataCarried.
- NSURLRequest *nsRequest = request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody);
- auto pcmDataCarried = parameters.pcmDataCarried;
+ RetainPtr<NSURLRequest> nsRequest = request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody);
+ RetainPtr<NSMutableURLRequest> mutableRequest = adoptNS([nsRequest.get() mutableCopy]);
- NETWORK_DATA_TASK_COCOA_ADDITIONS
+#if ENABLE(APP_PRIVACY_REPORT)
+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN
+ mutableRequest.get()._isNonAppInitiated = !request.isAppBound();
+ ALLOW_DEPRECATED_DECLARATIONS_END
+#endif
- auto protectedNSRequest = retainPtr(nsRequest);
- m_session->appBoundNavigationTestingData().updateAppBoundNavigationTestingData(request, contextString(protectedNSRequest.get()));
+ if (parameters.pcmDataCarried)
+ processPCMRequest(*parameters.pcmDataCarried, mutableRequest.get());
- applySniffingPoliciesAndBindRequestToInferfaceIfNeeded(protectedNSRequest, parameters.contentSniffingPolicy == WebCore::ContentSniffingPolicy::SniffContent && !url.isLocalFile(), parameters.contentEncodingSniffingPolicy == WebCore::ContentEncodingSniffingPolicy::Sniff);
+ nsRequest = mutableRequest;
- m_task = [m_sessionWrapper->session dataTaskWithRequest:protectedNSRequest.get()];
+ m_session->appBoundNavigationTestingData().updateAppBoundNavigationTestingData(request, request.firstPartyForCookies().isEmpty() ? WebCore::RegistrableDomain(request.url()) : WebCore::RegistrableDomain(request.firstPartyForCookies()));
+ applySniffingPoliciesAndBindRequestToInferfaceIfNeeded(nsRequest, parameters.contentSniffingPolicy == WebCore::ContentSniffingPolicy::SniffContent && !url.isLocalFile(), parameters.contentEncodingSniffingPolicy == WebCore::ContentEncodingSniffingPolicy::Sniff);
+
+ m_task = [m_sessionWrapper->session dataTaskWithRequest:nsRequest.get()];
+
WTFBeginSignpost(m_task.get(), "DataTask", "%{public}s pri: %.2f preconnect: %d", url.string().ascii().data(), toNSURLSessionTaskPriority(request.priority()), parameters.shouldPreconnectOnly == PreconnectOnly::Yes);
RELEASE_ASSERT(!m_sessionWrapper->dataTaskMap.contains([m_task taskIdentifier]));
m_sessionWrapper->dataTaskMap.add([m_task taskIdentifier], this);
- LOG(NetworkSession, "%lu Creating NetworkDataTask with URL %s", (unsigned long)[m_task taskIdentifier], [protectedNSRequest URL].absoluteString.UTF8String);
+ LOG(NetworkSession, "%lu Creating NetworkDataTask with URL %s", (unsigned long)[m_task taskIdentifier], [nsRequest URL].absoluteString.UTF8String);
if (parameters.shouldPreconnectOnly == PreconnectOnly::Yes) {
#if ENABLE(SERVER_PRECONNECT)
@@ -372,9 +378,9 @@
if (shouldBlockCookies) {
#if !RELEASE_LOG_DISABLED
if (m_session->shouldLogCookieInformation())
- RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, "%p - NetworkDataTaskCocoa::logCookieInformation: pageID=%" PRIu64 ", frameID=%" PRIu64 ", taskID=%lu: Blocking cookies for URL %s", this, pageID().toUInt64(), frameID().toUInt64(), (unsigned long)[m_task taskIdentifier], [protectedNSRequest URL].absoluteString.UTF8String);
+ RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, "%p - NetworkDataTaskCocoa::logCookieInformation: pageID=%" PRIu64 ", frameID=%" PRIu64 ", taskID=%lu: Blocking cookies for URL %s", this, pageID().toUInt64(), frameID().toUInt64(), (unsigned long)[m_task taskIdentifier], [nsRequest URL].absoluteString.UTF8String);
#else
- LOG(NetworkSession, "%lu Blocking cookies for URL %s", (unsigned long)[m_task taskIdentifier], [protectedNSRequest URL].absoluteString.UTF8String);
+ LOG(NetworkSession, "%lu Blocking cookies for URL %s", (unsigned long)[m_task taskIdentifier], [nsRequest URL].absoluteString.UTF8String);
#endif
blockCookies();
}
Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (279183 => 279184)
--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2021-06-23 20:20:15 UTC (rev 279183)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2021-06-23 20:27:12 UTC (rev 279184)
@@ -59,10 +59,29 @@
#import <wtf/SoftLinking.h>
#import <wtf/URL.h>
#import <wtf/WeakObjCPtr.h>
+#import <wtf/cocoa/VectorCocoa.h>
+#import <wtf/darwin/WeakLinking.h>
#import <wtf/text/WTFString.h>
#if USE(APPLE_INTERNAL_SDK)
#import <WebKitAdditions/NetworkSessionCocoaAdditions.h>
+
+#if ENABLE(APP_PRIVACY_REPORT) && HAVE(SYMPTOMS_FRAMEWORK)
+#import <Symptoms/SymptomAnalytics.h>
+#import <Symptoms/SymptomPresentationFeed.h>
+
+SOFT_LINK_PRIVATE_FRAMEWORK_IN_UMBRELLA_OPTIONAL(Symptoms, SymptomAnalytics);
+SOFT_LINK_PRIVATE_FRAMEWORK_IN_UMBRELLA_OPTIONAL(Symptoms, SymptomPresentationFeed);
+SOFT_LINK_PRIVATE_FRAMEWORK_IN_UMBRELLA_OPTIONAL(Symptoms, SymptomPresentationLite);
+SOFT_LINK_CLASS_OPTIONAL(SymptomAnalytics, AnalyticsWorkspace);
+SOFT_LINK_CLASS_OPTIONAL(SymptomPresentationFeed, UsageFeed);
+SOFT_LINK_CONSTANT_MAY_FAIL(SymptomPresentationFeed, kSymptomAnalyticsServiceDomainTrackingClearHistoryBundleIDs, const NSString *);
+SOFT_LINK_CONSTANT_MAY_FAIL(SymptomPresentationFeed, kSymptomAnalyticsServiceDomainTrackingClearHistoryStartDate, const NSString *);
+SOFT_LINK_CONSTANT_MAY_FAIL(SymptomPresentationFeed, kSymptomAnalyticsServiceDomainTrackingClearHistoryEndDate, const NSString *);
+SOFT_LINK_CONSTANT_MAY_FAIL(SymptomPresentationFeed, kSymptomAnalyticsServiceDomainTrackingClearHistoryKey, const NSString *);
+SOFT_LINK_CONSTANT_MAY_FAIL(SymptomPresentationLite, kSymptomAnalyticsServiceEndpoint, NSString *)
+#endif
+
#else
#define NETWORK_SESSION_COCOA_ADDITIONS_1
void WebKit::NetworkSessionCocoa::removeNetworkWebsiteData(std::optional<WallTime>, std::optional<HashSet<WebCore::RegistrableDomain>>&&, CompletionHandler<void()>&& completionHandler) { completionHandler(); }
@@ -1764,4 +1783,85 @@
#endif
}
+#if USE(APPLE_INTERNAL_SDK)
+
+#if ENABLE(APP_PRIVACY_REPORT) && HAVE(SYMPTOMS_FRAMEWORK)
+static bool isActingOnBehalfOfAFullWebBrowser(const String& bundleID)
+{
+ return bundleID == "com.apple.webbookmarksd";
+}
+#endif
+
+void NetworkSessionCocoa::removeNetworkWebsiteData(std::optional<WallTime> modifiedSince, std::optional<HashSet<WebCore::RegistrableDomain>>&& domains, CompletionHandler<void()>&& completionHandler)
+{
+#if ENABLE(APP_PRIVACY_REPORT) && HAVE(SYMPTOMS_FRAMEWORK)
+ auto bundleID = WebCore::applicationBundleIdentifier();
+ if (!isParentProcessAFullWebBrowser(networkProcess()) && !isActingOnBehalfOfAFullWebBrowser(bundleID))
+ return completionHandler();
+
+ if (!SymptomAnalyticsLibrary()
+ || !SymptomPresentationFeedLibrary()
+ || !SymptomPresentationLiteLibrary()
+ || !getAnalyticsWorkspaceClass()
+ || !getUsageFeedClass()
+ || !canLoadkSymptomAnalyticsServiceEndpoint()) {
+ completionHandler();
+ return;
+ }
+
+ RetainPtr<AnalyticsWorkspace> workspace = adoptNS([allocAnalyticsWorkspaceInstance() initWorkspaceWithService:getkSymptomAnalyticsServiceEndpoint()]);
+ RetainPtr<UsageFeed> usageFeed = adoptNS([allocUsageFeedInstance() initWithWorkspace:workspace.get()]);
+
+ if (![usageFeed.get() respondsToSelector:@selector(performNetworkDomainsActionWithOptions:reply:)]
+ || !canLoadkSymptomAnalyticsServiceDomainTrackingClearHistoryKey()
+ || !canLoadkSymptomAnalyticsServiceDomainTrackingClearHistoryBundleIDs()
+ || !canLoadkSymptomAnalyticsServiceDomainTrackingClearHistoryStartDate()
+ || !canLoadkSymptomAnalyticsServiceDomainTrackingClearHistoryEndDate()) {
+ completionHandler();
+ return;
+ }
+
+ auto *startDate = [NSDate distantPast];
+ if (modifiedSince) {
+ NSTimeInterval timeInterval = modifiedSince.value().secondsSinceEpoch().seconds();
+ startDate = [NSDate dateWithTimeIntervalSince1970:timeInterval];
+ }
+
+ auto contextArray = adoptNS([[NSMutableArray alloc] init]);
+ if (domains) {
+ contextArray = createNSArray(*domains, [&] (auto domain) {
+ return [NSString stringWithUTF8String:domain.string().utf8().data()];
+ });
+ }
+
+ if (isActingOnBehalfOfAFullWebBrowser(bundleID))
+ bundleID = "com.apple.mobilesafari";
+
+ NSDictionary *options = @{
+ (id)getkSymptomAnalyticsServiceDomainTrackingClearHistoryKey(): @{
+ (id)getkSymptomAnalyticsServiceDomainTrackingClearHistoryBundleIDs(): @{
+ bundleID : contextArray.get(),
+ },
+ (id)getkSymptomAnalyticsServiceDomainTrackingClearHistoryStartDate(): startDate,
+ (id)getkSymptomAnalyticsServiceDomainTrackingClearHistoryEndDate(): [NSDate distantFuture]
+ }
+ };
+
+ bool result = [usageFeed performNetworkDomainsActionWithOptions:options reply:makeBlockPtr([completionHandler = WTFMove(completionHandler)](NSDictionary *reply, NSError *error) mutable {
+ if (error)
+ LOG(NetworkSession, "Error deleting network domain data %" PUBLIC_LOG_STRING, error);
+
+ completionHandler();
+ }).get()];
+
+ if (!result)
+ LOG(NetworkSession, "Error deleting network domain data: invalid parameter or failure to contact the service");
+#else
+ UNUSED_PARAM(modifiedSince);
+ completionHandler();
+#endif
+}
+
+#endif // USE(APPLE_INTERNAL_SDK)
+
} // namespace WebKit
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm (279183 => 279184)
--- trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm 2021-06-23 20:20:15 UTC (rev 279183)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm 2021-06-23 20:27:12 UTC (rev 279184)
@@ -48,6 +48,7 @@
#import "WebProcessProxy.h"
#import "WebsiteDataStore.h"
#import "WKErrorInternal.h"
+#import <Foundation/NSURLRequest.h>
#import <WebCore/DragItem.h>
#import <WebCore/GeometryUtilities.h>
#import <WebCore/HighlightVisibility.h>
@@ -85,13 +86,6 @@
SOFT_LINK_CLASS(WebContentAnalysis, WebFilterEvaluator);
#endif
-#if USE(APPLE_INTERNAL_SDK)
-// FIXME: This additions file should be renamed to WebPageProxyAdditions.mm.
-#import <WebKitAdditions/WebPageProxyAdditions.h>
-#else
-#define WEB_PAGE_PROXY_ADDITIONS
-#endif
-
#define MESSAGE_CHECK(assertion) MESSAGE_CHECK_BASE(assertion, process().connection())
#define MESSAGE_CHECK_COMPLETION(assertion, completion) MESSAGE_CHECK_COMPLETION_BASE(assertion, process().connection(), completion)
@@ -658,7 +652,12 @@
void WebPageProxy::setLastNavigationWasAppBound(ResourceRequest& request)
{
- WEB_PAGE_PROXY_ADDITIONS
+#if ENABLE(APP_PRIVACY_REPORT)
+ auto *nsRequest = request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::DoNotUpdateHTTPBody);
+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN
+ request.setIsAppBound(!nsRequest._isNonAppInitiated);
+ ALLOW_DEPRECATED_DECLARATIONS_END
+#endif
m_lastNavigationWasAppBound = request.isAppBound();
}
Modified: trunk/Tools/ChangeLog (279183 => 279184)
--- trunk/Tools/ChangeLog 2021-06-23 20:20:15 UTC (rev 279183)
+++ trunk/Tools/ChangeLog 2021-06-23 20:27:12 UTC (rev 279184)
@@ -1,3 +1,13 @@
+2021-06-23 Kate Cheney <katherine_che...@apple.com>
+
+ Migrate App Privacy Report code from WebKitAdditions
+ https://bugs.webkit.org/show_bug.cgi?id=227045
+ <rdar://problem/74333287>
+
+ Reviewed by Alex Christensen.
+
+ * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
+
2021-06-23 Andres Gonzalez <andresg...@apple.com>
Accessibility support for image text recognition.
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm (279183 => 279184)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm 2021-06-23 20:20:15 UTC (rev 279183)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm 2021-06-23 20:27:12 UTC (rev 279184)
@@ -33,6 +33,7 @@
#import "TestURLSchemeHandler.h"
#import "TestWKWebView.h"
#import "WKWebViewConfigurationExtras.h"
+#import <Foundation/NSURLRequest.h>
#import <WebCore/RegistrableDomain.h>
#import <WebCore/RuntimeApplicationChecks.h>
#import <WebKit/WKHTTPCookieStorePrivate.h>
@@ -43,13 +44,10 @@
#import <WebKit/WKWebsiteDataStorePrivate.h>
#import <WebKit/_WKUserContentWorld.h>
#import <WebKit/_WKUserStyleSheet.h>
+#import <pal/spi/cf/CFNetworkSPI.h>
#import <wtf/RunLoop.h>
#import <wtf/text/WTFString.h>
-#if USE(APPLE_INTERNAL_SDK)
-#import <WebKitAdditions/InAppBrowserPrivacyAdditions.h>
-#endif
-
#if ENABLE(APP_BOUND_DOMAINS)
static bool isDone;
@@ -1420,7 +1418,7 @@
#endif // ENABLE(APP_BOUND_DOMAINS)
-#if USE(APPLE_INTERNAL_SDK) && ENABLE(APP_BOUND_REQUESTS)
+#if ENABLE(APP_PRIVACY_REPORT)
TEST(InAppBrowserPrivacy, AppBoundRequest)
{
auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
@@ -1430,8 +1428,11 @@
__block bool isDone = false;
NSMutableURLRequest *nonAppBoundRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]];
- APP_BOUND_REQUEST_ADDITIONS
+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN
+ nonAppBoundRequest._isNonAppInitiated = YES;
+ ALLOW_DEPRECATED_DECLARATIONS_END
+
[webView loadRequest:nonAppBoundRequest];
[webView _test_waitForDidFinishNavigation];
@@ -1484,7 +1485,9 @@
isDone = false;
NSMutableURLRequest *nonAppBoundRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:nonAppBoundURL]];
- APP_BOUND_REQUEST_ADDITIONS
+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN
+ nonAppBoundRequest._isNonAppInitiated = YES;
+ ALLOW_DEPRECATED_DECLARATIONS_END
isDone = false;
[webView _clearAppBoundNavigationData:^{
@@ -1542,7 +1545,9 @@
__block bool isDone = false;
auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
NSMutableURLRequest *nonAppBoundRequest = [NSMutableURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"page-with-csp" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];
- APP_BOUND_REQUEST_ADDITIONS
+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN
+ nonAppBoundRequest._isNonAppInitiated = YES;
+ ALLOW_DEPRECATED_DECLARATIONS_END
[webView loadRequest:nonAppBoundRequest];
@@ -1622,7 +1627,9 @@
NSURLRequest *request = server.request();
if (appBound == IsAppBound::No) {
NSMutableURLRequest *nonAppBoundRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/", server.port()]]];
- APP_BOUND_REQUEST_ADDITIONS
+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN
+ nonAppBoundRequest._isNonAppInitiated = YES;
+ ALLOW_DEPRECATED_DECLARATIONS_END
request = nonAppBoundRequest;
}
@@ -1730,7 +1737,9 @@
isDone = false;
NSMutableURLRequest *nonAppBoundRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/main.html", server.port()]]];
- APP_BOUND_REQUEST_ADDITIONS
+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN
+ nonAppBoundRequest._isNonAppInitiated = YES;
+ ALLOW_DEPRECATED_DECLARATIONS_END
[webView2 loadRequest:nonAppBoundRequest];
EXPECT_WK_STREQ([webView2 _test_waitForAlert], "fetched from server");
@@ -1780,7 +1789,9 @@
NSURLRequest *request = server1.request();
if (isAppBound == IsAppBound::No) {
NSMutableURLRequest *nonAppBoundRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/", server1.port()]]];
- APP_BOUND_REQUEST_ADDITIONS
+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN
+ nonAppBoundRequest._isNonAppInitiated = YES;
+ ALLOW_DEPRECATED_DECLARATIONS_END
request = nonAppBoundRequest;
}
@@ -1799,7 +1810,9 @@
NSURLRequest *request2 = server2.request();
if (isAppBound == IsAppBound::No) {
NSMutableURLRequest *nonAppBoundRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/", server2.port()]]];
- APP_BOUND_REQUEST_ADDITIONS
+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN
+ nonAppBoundRequest._isNonAppInitiated = YES;
+ ALLOW_DEPRECATED_DECLARATIONS_END
request2 = nonAppBoundRequest;
}
@@ -1850,7 +1863,9 @@
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]];
if (isAppBound == IsAppBound::No) {
NSMutableURLRequest *nonAppBoundRequest = request;
- APP_BOUND_REQUEST_ADDITIONS
+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN
+ nonAppBoundRequest._isNonAppInitiated = YES;
+ ALLOW_DEPRECATED_DECLARATIONS_END
request = nonAppBoundRequest;
}
@@ -2005,7 +2020,9 @@
expectedMessage = "starts app-bound";
receivedMessage = false;
NSMutableURLRequest *nonAppBoundRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://127.0.0.1:%d/main.html", server.port()]]];
- APP_BOUND_REQUEST_ADDITIONS
+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN
+ nonAppBoundRequest._isNonAppInitiated = YES;
+ ALLOW_DEPRECATED_DECLARATIONS_END
[webView2 loadRequest:nonAppBoundRequest];
TestWebKitAPI::Util::run(&receivedMessage);