Diff
Modified: trunk/Source/WebCore/ChangeLog (235584 => 235585)
--- trunk/Source/WebCore/ChangeLog 2018-09-01 23:14:31 UTC (rev 235584)
+++ trunk/Source/WebCore/ChangeLog 2018-09-02 02:54:58 UTC (rev 235585)
@@ -1,3 +1,19 @@
+2018-09-01 Darin Adler <[email protected]>
+
+ [CFNetwork] Update CFNetwork SPI use to use CFNetworkSPI.h more consistently
+ https://bugs.webkit.org/show_bug.cgi?id=189072
+
+ Reviewed by Dan Bernstein.
+
+ * platform/mac/WebCoreNSURLExtras.mm: Include CFNetworkSPI.h and remove a
+ declaration of +[NSURLProtocol _protocolClassForRequest:].
+
+ * platform/network/mac/ResourceHandleMac.mm: Remove a declaration of
+ -[NSURLConnection _initWithRequest:delegate:usesCache:maxContentLength:startImmediately:connectionProperties:].
+ (WebCore::ResourceHandle::createNSURLConnection): Add ignore of
+ "-Wdeprecated-declarations" around use of the above method, since it
+ is deprecated.
+
2018-09-01 Simon Fraser <[email protected]>
Add some more filter logging
Modified: trunk/Source/WebCore/PAL/ChangeLog (235584 => 235585)
--- trunk/Source/WebCore/PAL/ChangeLog 2018-09-01 23:14:31 UTC (rev 235584)
+++ trunk/Source/WebCore/PAL/ChangeLog 2018-09-02 02:54:58 UTC (rev 235585)
@@ -1,3 +1,19 @@
+2018-09-01 Darin Adler <[email protected]>
+
+ [CFNetwork] Update CFNetwork SPI use to use CFNetworkSPI.h more consistently
+ https://bugs.webkit.org/show_bug.cgi?id=189072
+
+ Reviewed by Dan Bernstein.
+
+ * pal/spi/cf/CFNetworkSPI.h: Added a FIXME about USE(CFNETWORK_IGNORE_HSTS).
+ Sorted Objective-C class interfaces alphabetically instead of having them
+ relatively randomly ordered in the file. Reduced the platform #if statements
+ since it's not critical to have these SPIs declared only where they are
+ present, as long as they are used only when they are present. Moved some
+ additional declarations into this file.
+
+ * pal/spi/cocoa/NSURLDownloadSPI.h: Added more NSURLDownload methods.
+
2018-08-30 Don Olmstead <[email protected]>
[CMake] Replace AVFoundationSupport.py using CMake
Modified: trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h (235584 => 235585)
--- trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h 2018-09-01 23:14:31 UTC (rev 235584)
+++ trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h 2018-09-02 02:54:58 UTC (rev 235585)
@@ -30,6 +30,10 @@
#include <CFNetwork/CFNetwork.h>
#include <pal/spi/cf/CFNetworkConnectionCacheSPI.h>
+// FIXME: Policy about which CFNetwork features to *use* in WebKit does not belong in the SPI header.
+// The SPI header should define which CFNetwork features *exist* in the underlying system, but not
+// policy about what WebKit should do. Accordingly, we should move this somewhere else or rename it
+// to be about CFNetwork capabilities (HAVE) rather than about WebKit policy (USE).
#if ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101302 && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110200) || (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 40200) || (PLATFORM(TVOS) && __TV_OS_VERSION_MIN_REQUIRED >= 110200))
#define USE_CFNETWORK_IGNORE_HSTS 1
#endif
@@ -91,6 +95,45 @@
- (CFURLCacheRef)_CFURLCache;
@end
+@interface NSCachedURLResponse ()
+- (id)_initWithCFCachedURLResponse:(CFCachedURLResponseRef)cachedResponse;
+- (CFCachedURLResponseRef)_CFCachedURLResponse;
+@end
+
+@interface NSHTTPCookie ()
+- (CFHTTPCookieRef)_CFHTTPCookie;
++ (CFArrayRef __nullable)_ns2cfCookies:(NSArray * __nullable)nsCookies CF_RETURNS_RETAINED;
+- (CFHTTPCookieRef __nullable)_GetInternalCFHTTPCookie;
+@property (nullable, readonly, copy) NSString *_storagePartition;
+@end
+
+@interface NSHTTPCookieStorage ()
+- (id)_initWithIdentifier:(NSString *)identifier private:(bool)isPrivate;
+- (void)_getCookiesForURL:(NSURL *)url mainDocumentURL:(NSURL *)mainDocumentURL partition:(NSString *)partition completionHandler:(void (^)(NSArray *))completionHandler;
+- (void)_getCookiesForURL:(NSURL *)url mainDocumentURL:(NSURL *)mainDocumentURL partition:(NSString *)partition policyProperties:(NSDictionary*)props completionHandler:(void (^)(NSArray *))completionHandler;
+- (void)_setCookies:(NSArray *)cookies forURL:(NSURL *)URL mainDocumentURL:(NSURL *)mainDocumentURL policyProperties:(NSDictionary*) props;
+- (void)removeCookiesSinceDate:(NSDate *)date;
+- (id)_initWithCFHTTPCookieStorage:(CFHTTPCookieStorageRef)cfStorage;
+- (CFHTTPCookieStorageRef)_cookieStorage;
+- (void)_saveCookies;
+- (void)_saveCookies:(dispatch_block_t) completionHandler;
+@end
+
+@interface NSURLConnection ()
+- (id)_initWithRequest:(NSURLRequest *)request delegate:(id)delegate usesCache:(BOOL)usesCacheFlag maxContentLength:(long long)maxContentLength startImmediately:(BOOL)startImmediately connectionProperties:(NSDictionary *)connectionProperties;
+@end
+
+@interface NSMutableURLRequest ()
+- (void)setContentDispositionEncodingFallbackArray:(NSArray *)theEncodingFallbackArray;
+- (void)setBoundInterfaceIdentifier:(NSString *)identifier;
+- (void)_setPreventHSTSStorage:(BOOL)preventHSTSStorage;
+- (void)_setIgnoreHSTS:(BOOL)ignoreHSTS;
+@end
+
+@interface NSURLProtocol ()
++ (Class)_protocolClassForRequest:(NSURLRequest *)request;
+@end
+
@interface NSURLRequest ()
+ (NSArray *)allowsSpecificHTTPSCertificateForHost:(NSString *)host;
+ (void)setAllowsSpecificHTTPSCertificate:(NSArray *)allow forHost:(NSString *)host;
@@ -100,22 +143,11 @@
- (id)_initWithCFURLRequest:(CFURLRequestRef)request;
- (id)_propertyForKey:(NSString *)key;
- (void)_setProperty:(id)value forKey:(NSString *)key;
-#if USE(CFNETWORK_IGNORE_HSTS)
- (BOOL)_schemeWasUpgradedDueToDynamicHSTS;
- (BOOL)_preventHSTSStorage;
- (BOOL)_ignoreHSTS;
-#endif
@end
-@interface NSMutableURLRequest ()
-- (void)setContentDispositionEncodingFallbackArray:(NSArray *)theEncodingFallbackArray;
-- (void)setBoundInterfaceIdentifier:(NSString *)identifier;
-#if USE(CFNETWORK_IGNORE_HSTS)
-- (void)_setPreventHSTSStorage:(BOOL)preventHSTSStorage;
-- (void)_setIgnoreHSTS:(BOOL)ignoreHSTS;
-#endif
-@end
-
@interface NSURLResponse ()
+ (NSURLResponse *)_responseWithCFURLResponse:(CFURLResponseRef)response;
- (CFURLResponseRef)_CFURLResponse;
@@ -122,12 +154,6 @@
- (NSDate *)_lastModifiedDate;
@end
-@interface NSHTTPCookie ()
-- (CFHTTPCookieRef)_CFHTTPCookie;
-+ (CFArrayRef __nullable)_ns2cfCookies:(NSArray * __nullable)nsCookies CF_RETURNS_RETAINED;
-- (CFHTTPCookieRef __nullable)_GetInternalCFHTTPCookie;
-@end
-
@interface NSURLSessionConfiguration ()
@property (assign) _TimingDataOptions _timingDataOptions;
@property (copy) NSData *_sourceApplicationAuditTokenData;
@@ -140,8 +166,16 @@
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
@property (nullable, copy) NSSet *_suppressedAutoAddedHTTPHeaders;
#endif
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000)
-@property (copy) NSDictionary *_socketStreamProperties;
+@end
+
+@interface NSURLSessionTask ()
+- (NSDictionary *)_timingData;
+@property (readwrite, copy) NSString *_pathToDownloadTaskFile;
+@property (copy) NSString *_storagePartitionIdentifier;
+@property (nullable, readwrite, retain) NSURL *_siteForCookies;
+@property (readwrite) BOOL _isTopLevelNavigation;
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
+@property (nonatomic, assign) BOOL _preconnect;
#endif
@end
@@ -156,28 +190,6 @@
@end
#endif
-@interface NSHTTPCookie ()
-@property (nullable, readonly, copy) NSString *_storagePartition;
-@end
-
-@interface NSHTTPCookieStorage ()
-- (id)_initWithIdentifier:(NSString *)identifier private:(bool)isPrivate;
-- (void)_getCookiesForURL:(NSURL *)url mainDocumentURL:(NSURL *)mainDocumentURL partition:(NSString *)partition completionHandler:(void (^)(NSArray *))completionHandler;
-- (void)_getCookiesForURL:(NSURL *)url mainDocumentURL:(NSURL *)mainDocumentURL partition:(NSString *)partition policyProperties:(NSDictionary*)props completionHandler:(void (^)(NSArray *))completionHandler;
-- (void)_setCookies:(NSArray *)cookies forURL:(NSURL *)URL mainDocumentURL:(NSURL *)mainDocumentURL policyProperties:(NSDictionary*) props;
-@end
-
-@interface NSURLSessionTask ()
-- (NSDictionary *)_timingData;
-@property (readwrite, copy) NSString *_pathToDownloadTaskFile;
-@property (copy) NSString *_storagePartitionIdentifier;
-@property (nullable, readwrite, retain) NSURL *_siteForCookies;
-@property (readwrite) BOOL _isTopLevelNavigation;
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
-@property (nonatomic, assign) BOOL _preconnect;
-#endif
-@end
-
extern NSString * const NSURLAuthenticationMethodOAuth;
#endif // defined(__OBJC__)
@@ -285,11 +297,6 @@
NSHTTPCookieAcceptPolicyExclusivelyFromMainDocumentDomain = 3,
};
-@interface NSCachedURLResponse ()
--(id)_initWithCFCachedURLResponse:(CFCachedURLResponseRef)cachedResponse;
--(CFCachedURLResponseRef)_CFCachedURLResponse;
-@end
-
#endif
WTF_EXTERN_C_BEGIN
@@ -314,6 +321,9 @@
#if defined(__OBJC__)
+// FIXME: Move these declarations the above section under !USE(APPLE_INTERNAL_SDK) when possible so that
+// Apple internal SDK builds use headers instead.
+
@interface NSHTTPCookie ()
#if PLATFORM(MAC)
+ (NSArray *)_parsedCookiesWithResponseHeaderFields:(NSDictionary *)headerFields forURL:(NSURL *)aURL;
@@ -321,18 +331,7 @@
+ (NSArray *)_cf2nsCookies:(CFArrayRef)cfCookies;
@end
-#if !USE(APPLE_INTERNAL_SDK)
@interface NSHTTPCookieStorage ()
-- (void)removeCookiesSinceDate:(NSDate *)date;
-- (id)_initWithCFHTTPCookieStorage:(CFHTTPCookieStorageRef)cfStorage;
-- (CFHTTPCookieStorageRef)_cookieStorage;
-- (void)_saveCookies;
-- (void)_saveCookies:(dispatch_block_t) completionHandler;
-@end
-#endif
-
-// FIXME: Move +_setSharedHTTPCookieStorage: into the above section under !USE(APPLE_INTERNAL_SDK) when possible (soon).
-@interface NSHTTPCookieStorage ()
+ (void)_setSharedHTTPCookieStorage:(NSHTTPCookieStorage *)storage;
@end
@@ -340,4 +339,15 @@
- (void)_setMIMEType:(NSString *)type;
@end
+@interface NSURLSessionConfiguration ()
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000)
+// FIXME: Remove this once rdar://problem/40650244 is in a build.
+@property (copy) NSDictionary *_socketStreamProperties;
+#endif
+@end
+
+@interface NSURLSessionTask ()
+- (void)_setExplicitCookieStorage:(CFHTTPCookieStorageRef)storage;
+@end
+
#endif // defined(__OBJC__)
Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/NSURLDownloadSPI.h (235584 => 235585)
--- trunk/Source/WebCore/PAL/pal/spi/cocoa/NSURLDownloadSPI.h 2018-09-01 23:14:31 UTC (rev 235584)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/NSURLDownloadSPI.h 2018-09-02 02:54:58 UTC (rev 235585)
@@ -25,8 +25,6 @@
#pragma once
-#import <Foundation/NSObject.h>
-
#if PLATFORM(MAC) || USE(APPLE_INTERNAL_SDK)
#import <Foundation/NSURLDownload.h>
@@ -33,10 +31,6 @@
#if USE(APPLE_INTERNAL_SDK)
#import <Foundation/NSURLDownloadPrivate.h>
-#else
-@interface NSURLDownload ()
-+(id)_downloadWithLoadingConnection:(NSURLConnection *)connection request:(NSURLRequest *)request response:(NSURLResponse *)response delegate:(id)delegate proxy:(id)proxy;
-@end
#endif
#else
@@ -48,6 +42,12 @@
@class NSURLRequest;
@class NSURLResponse;
+#ifndef WebDownload_h
+/* Also defined in <WebKit/WebDownload.h>. */
+@interface NSURLDownload : NSObject
+@end
+#endif
+
@protocol NSURLDownloadDelegate <NSObject>
@optional
- (void)downloadDidBegin:(NSURLDownload *)download;
@@ -65,12 +65,6 @@
- (void)download:(NSURLDownload *)download didFailWithError:(NSError *)error;
@end
-#ifndef WebDownload_h
-/* Also defined in <WebKit/WebDownload.h>. */
-@interface NSURLDownload : NSObject
-@end
-#endif
-
@interface NSURLDownload ()
- (instancetype)initWithRequest:(NSURLRequest *)request delegate:(id <NSURLDownloadDelegate>)delegate;
- (instancetype)initWithResumeData:(NSData *)resumeData delegate:(id <NSURLDownloadDelegate>)delegate path:(NSString *)path;
@@ -79,8 +73,19 @@
@property (readonly, copy) NSURLRequest *request;
@property (readonly, copy) NSData *resumeData;
@property BOOL deletesFileUponFailure;
+@end
-+(id)_downloadWithLoadingConnection:(NSURLConnection *)connection request:(NSURLRequest *)request response:(NSURLResponse *)response delegate:(id)delegate proxy:(id)proxy;
+#endif
+
+#if !USE(APPLE_INTERNAL_SDK)
+
+@class NSURLConnectionDelegateProxy;
+
+@interface NSURLDownload ()
++ (id)_downloadWithRequest:(NSURLRequest *)request delegate:(id)delegate directory:(NSString *)directory;
++ (id)_downloadWithLoadingConnection:(NSURLConnection *)connection request:(NSURLRequest *)request response:(NSURLResponse *)response delegate:(id)delegate proxy:(id)proxy;
+- (id)_initWithLoadingConnection:(NSURLConnection *)connection request:(NSURLRequest *)request response:(NSURLResponse *)response delegate:(id)delegate proxy:(NSURLConnectionDelegateProxy *)proxy;
+- (id)_initWithRequest:(NSURLRequest *)request delegate:(id)delegate directory:(NSString *)directory;
@end
#endif
Modified: trunk/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm (235584 => 235585)
--- trunk/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm 2018-09-01 23:14:31 UTC (rev 235584)
+++ trunk/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm 2018-09-02 02:54:58 UTC (rev 235585)
@@ -29,6 +29,7 @@
#import "config.h"
#import "URLParser.h"
#import "WebCoreNSURLExtras.h"
+#import <pal/spi/cf/CFNetworkSPI.h>
#import <wtf/Function.h>
#import <wtf/HexNumber.h>
#import <wtf/ObjcRuntimeExtras.h>
@@ -47,11 +48,6 @@
static uint32_t IDNScriptWhiteList[(USCRIPT_CODE_LIMIT + 31) / 32];
-
-@interface NSURLProtocol (WKNSURLProtocolInternal)
-+ (Class)_protocolClassForRequest:(NSURLRequest *)request;
-@end
-
namespace WebCore {
static bool isArmenianLookalikeCharacter(UChar32 codePoint)
Modified: trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm (235584 => 235585)
--- trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm 2018-09-01 23:14:31 UTC (rev 235584)
+++ trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm 2018-09-02 02:54:58 UTC (rev 235585)
@@ -63,10 +63,6 @@
using namespace WebCore;
-@interface NSURLConnection ()
--(id)_initWithRequest:(NSURLRequest *)request delegate:(id)delegate usesCache:(BOOL)usesCacheFlag maxContentLength:(long long)maxContentLength startImmediately:(BOOL)startImmediately connectionProperties:(NSDictionary *)connectionProperties;
-@end
-
namespace WebCore {
static void applyBasicAuthorizationHeader(ResourceRequest& request, const Credential& credential)
@@ -224,7 +220,10 @@
// web content for purposes of App Transport Security.
[propertyDictionary setObject:@{@"NSAllowsArbitraryLoadsInWebContent": @YES} forKey:@"_kCFURLConnectionPropertyATSFrameworkOverrides"];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
d->m_connection = adoptNS([[NSURLConnection alloc] _initWithRequest:nsRequest delegate:delegate usesCache:usesCache maxContentLength:0 startImmediately:NO connectionProperties:propertyDictionary]);
+#pragma clang diagnostic pop
}
bool ResourceHandle::start()
Modified: trunk/Source/WebKit/ChangeLog (235584 => 235585)
--- trunk/Source/WebKit/ChangeLog 2018-09-01 23:14:31 UTC (rev 235584)
+++ trunk/Source/WebKit/ChangeLog 2018-09-02 02:54:58 UTC (rev 235585)
@@ -1,3 +1,16 @@
+2018-09-01 Darin Adler <[email protected]>
+
+ [CFNetwork] Update CFNetwork SPI use to use CFNetworkSPI.h more consistently
+ https://bugs.webkit.org/show_bug.cgi?id=189072
+
+ Reviewed by Dan Bernstein.
+
+ * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: Removed NSURLSessionTask
+ method declarations from this file, they are in CFNetworkSPI.h.
+
+ * NetworkProcess/cocoa/NetworkSessionCocoa.mm: Removed NSURLSessionConfiguration
+ method declarations from this file, they are in CFNetworkSPI.h.
+
2018-09-01 Dan Bernstein <[email protected]>
[Cocoa] Crash using KVO for 'serverTrust' property of WKWebView - "this class is not key value coding-compliant for the key serverTrust"
Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm (235584 => 235585)
--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm 2018-09-01 23:14:31 UTC (rev 235584)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm 2018-09-02 02:54:58 UTC (rev 235585)
@@ -45,26 +45,10 @@
#import <wtf/ProcessPrivilege.h>
#import <wtf/text/Base64.h>
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000)
-@interface NSURLSessionTask (Staging)
-@property (readwrite, retain) NSURL *_siteForCookies;
-@property (readwrite) BOOL _isTopLevelNavigation;
-@end
-#endif
-
#if HAVE(NW_ACTIVITY)
#import <CFNetwork/CFNSURLConnection.h>
#endif
-#if HAVE(CFNETWORK_STORAGE_PARTITIONING)
-
-// FIXME: Move to CFNetworkSPI.h?
-@interface NSURLSessionTask ()
-- (void)_setExplicitCookieStorage:(CFHTTPCookieStorageRef)storage;
-@end
-
-#endif
-
namespace WebKit {
#if USE(CREDENTIAL_STORAGE_WITH_NETWORK_SESSION)
Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (235584 => 235585)
--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2018-09-01 23:14:31 UTC (rev 235584)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2018-09-02 02:54:58 UTC (rev 235585)
@@ -54,16 +54,6 @@
using namespace WebKit;
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
-@interface NSURLSessionConfiguration (WKStaging)
-@property (copy) NSSet *_suppressedAutoAddedHTTPHeaders;
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000)
-// FIXME: Remove this once rdar://problem/40650244 is in a build.
-@property (copy) NSDictionary *_socketStreamProperties;
-#endif
-@end
-#endif
-
static NSURLSessionResponseDisposition toNSURLSessionResponseDisposition(WebCore::PolicyAction disposition)
{
switch (disposition) {
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (235584 => 235585)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2018-09-01 23:14:31 UTC (rev 235584)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2018-09-02 02:54:58 UTC (rev 235585)
@@ -1,3 +1,22 @@
+2018-09-01 Darin Adler <[email protected]>
+
+ [CFNetwork] Update CFNetwork SPI use to use CFNetworkSPI.h more consistently
+ https://bugs.webkit.org/show_bug.cgi?id=189072
+ Reviewed by Dan Bernstein.
+
+ * Misc/WebDownload.mm: Removed forward declaration of NSURLConnectionDelegateProxy
+ and declarations for NSURLDownload init methods.
+
+ * Misc/WebDownloadInternal.h: Removed.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm: Removed include of WebDownloadInternal.h.
+ (WebFrameLoaderClient::convertMainResourceLoadToDownload): Ignore
+ "-Wdeprecated-declarations" because the method used here is deprecated.
+
+ * WebView/WebView.mm:
+ (-[WebView _downloadURL:]): Ignore "-Wdeprecated-declarations" because the method
+ used here is deprecated.
+
2018-08-31 Chris Dumez <[email protected]>
Assertion hit in ~CompletionHandler() from ~WebFrame()
Modified: trunk/Source/WebKitLegacy/mac/Misc/WebDownload.mm (235584 => 235585)
--- trunk/Source/WebKitLegacy/mac/Misc/WebDownload.mm 2018-09-01 23:14:31 UTC (rev 235584)
+++ trunk/Source/WebKitLegacy/mac/Misc/WebDownload.mm 2018-09-02 02:54:58 UTC (rev 235585)
@@ -41,30 +41,10 @@
using namespace WebCore;
-@class NSURLConnectionDelegateProxy;
-
-// FIXME: The following are NSURLDownload SPI - it would be nice to not have to override them at
-// some point in the future
-@interface NSURLDownload (WebDownloadCapability)
-- (id)_initWithLoadingConnection:(NSURLConnection *)connection
- request:(NSURLRequest *)request
- response:(NSURLResponse *)response
- delegate:(id)delegate
- proxy:(NSURLConnectionDelegateProxy *)proxy;
-- (id)_initWithRequest:(NSURLRequest *)request
- delegate:(id)delegate
- directory:(NSString *)directory;
-
-@end
-
-@interface WebDownloadInternal : NSObject <NSURLDownloadDelegate>
-{
-@public
+@interface WebDownloadInternal : NSObject <NSURLDownloadDelegate> {
id realDelegate;
}
-
-- (void)setRealDelegate:(id)rd;
-
+- (void)setRealDelegate:(id)realDelegate;
@end
@implementation WebDownloadInternal
Deleted: trunk/Source/WebKitLegacy/mac/Misc/WebDownloadInternal.h (235584 => 235585)
--- trunk/Source/WebKitLegacy/mac/Misc/WebDownloadInternal.h 2018-09-01 23:14:31 UTC (rev 235584)
+++ trunk/Source/WebKitLegacy/mac/Misc/WebDownloadInternal.h 2018-09-02 02:54:58 UTC (rev 235585)
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2005 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.
- * 3. Neither the name of Apple Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE 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 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.
-*/
-
-#import <WebKitLegacy/WebDownload.h>
-
-@interface WebDownload (WebDownloadCreation)
-+(id)_downloadWithLoadingConnection:(NSURLConnection *)connection request:(NSURLRequest *)request response:(NSURLResponse *)r delegate:(id)delegate proxy:(id)proxy;
-
-+(id)_downloadWithRequest:(NSURLRequest *)request delegate:(id)delegate directory:(NSString *)directory;
-
-@end
Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm (235584 => 235585)
--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm 2018-09-01 23:14:31 UTC (rev 235584)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm 2018-09-02 02:54:58 UTC (rev 235585)
@@ -39,7 +39,7 @@
#import "WebDelegateImplementationCaching.h"
#import "WebDocumentInternal.h"
#import "WebDocumentLoaderMac.h"
-#import "WebDownloadInternal.h"
+#import "WebDownload.h"
#import "WebDynamicScrollBarsViewInternal.h"
#import "WebElementDictionary.h"
#import "WebFormDelegate.h"
@@ -318,7 +318,10 @@
ResourceHandle* handle = mainResourceLoader->handle();
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[WebDownload _downloadWithLoadingConnection:handle->connection() request:request.nsURLRequest(HTTPBodyUpdatePolicy::UpdateHTTPBody) response:response.nsURLResponse() delegate:[webView downloadDelegate] proxy:nil];
+#pragma clang diagnostic pop
}
bool WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache(DocumentLoader* loader, const ResourceRequest& request, const ResourceResponse& response, int length)
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (235584 => 235585)
--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2018-09-01 23:14:31 UTC (rev 235584)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2018-09-02 02:54:58 UTC (rev 235585)
@@ -58,7 +58,6 @@
#import "WebDocument.h"
#import "WebDocumentInternal.h"
#import "WebDownload.h"
-#import "WebDownloadInternal.h"
#import "WebDragClient.h"
#import "WebDynamicScrollBarsViewInternal.h"
#import "WebEditingDelegate.h"
@@ -219,6 +218,7 @@
#import <pal/spi/cf/CFNetworkSPI.h>
#import <pal/spi/cf/CFUtilitiesSPI.h>
#import <pal/spi/cocoa/NSTouchBarSPI.h>
+#import <pal/spi/cocoa/NSURLDownloadSPI.h>
#import <pal/spi/cocoa/NSURLFileTypeMappingsSPI.h>
#import <pal/spi/mac/NSResponderSPI.h>
#import <pal/spi/mac/NSSpellCheckerSPI.h>
@@ -2450,11 +2450,12 @@
ASSERT(URL);
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:URL];
- WebDownload *download = [WebDownload _downloadWithRequest:request
- delegate:_private->downloadDelegate
- directory:nil];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ WebDownload *download = [WebDownload _downloadWithRequest:request delegate:_private->downloadDelegate directory:nil];
+#pragma clang diagnostic pop
[request release];
-
+
return download;
}