Changeset 91198 in webkit


Ignore:
Timestamp:
Jul 18, 2011 11:43:08 AM (13 years ago)
Author:
psolanki@apple.com
Message:

Part of https://bugs.webkit.org/show_bug.cgi?id=63674
Get webkit to compile with USE(CFNETWORK) enabled on Mac

Reviewed by David Kilzer.

Source/WebCore:

  • WebCore.exp.in:

Source/WebKit/mac:

Create an NSURLDownload from the CF objects that we have.

  • Misc/WebDownload.mm:

(-[WebDownload _initWithLoadingCFURLConnection:request:response:delegate:proxy:]):

  • Misc/WebDownloadInternal.h:
  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::download):

Location:
trunk/Source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r91195 r91198  
     12011-07-18  Pratik Solanki  <psolanki@apple.com>
     2
     3        Part of https://bugs.webkit.org/show_bug.cgi?id=63674
     4        Get webkit to compile with USE(CFNETWORK) enabled on Mac
     5
     6        Reviewed by David Kilzer.
     7
     8        * WebCore.exp.in:
     9
    1102011-07-18  Gavin Barraclough  <barraclough@apple.com>
    211
  • trunk/Source/WebCore/WebCore.exp.in

    r91154 r91198  
    358358__ZN7WebCore14FrameSelection9selectAllEv
    359359__ZN7WebCore14FrameSelectionC1EPNS_5FrameE
    360 __ZN7WebCore14ResourceHandle12releaseProxyEv
    361360__ZN7WebCore14ResourceHandle20forceContentSniffingEv
    362361__ZN7WebCore14ResourceHandle26synchronousLoadRunLoopModeEv
     
    19061905__ZNK7WebCore13ResourceErrorcvP9__CFErrorEv
    19071906__ZN7WebCore12SchedulePairC1EP11__CFRunLoopPK10__CFString
     1907__ZNK7WebCore15ResourceRequest12cfURLRequestEv
     1908__ZNK7WebCore16ResourceResponse13cfURLResponseEv
     1909__ZN7WebCore14ResourceHandle28releaseConnectionForDownloadEv
     1910__ZN7WebCore15ResourceRequestC1EP12NSURLRequest
     1911__ZN7WebCore16ResourceResponseC1EP13NSURLResponse
    19081912_wkCFURLRequestCopyHTTPRequestBodyParts
    19091913_wkCFURLRequestSetHTTPRequestBodyParts
     
    19151919__ZNK7WebCore13ResourceErrorcvP7NSErrorEv
    19161920__ZN7WebCore12SchedulePairC1EP9NSRunLoopPK10__CFString
    1917 #endif
     1921__ZN7WebCore14ResourceHandle12releaseProxyEv
     1922#endif
  • trunk/Source/WebKit/mac/ChangeLog

    r91154 r91198  
     12011-07-18  Pratik Solanki  <psolanki@apple.com>
     2
     3        Part of https://bugs.webkit.org/show_bug.cgi?id=63674
     4        Get webkit to compile with USE(CFNETWORK) enabled on Mac
     5
     6        Reviewed by David Kilzer.
     7
     8        Create an NSURLDownload from the CF objects that we have.
     9
     10        * Misc/WebDownload.mm:
     11        (-[WebDownload _initWithLoadingCFURLConnection:request:response:delegate:proxy:]):
     12        * Misc/WebDownloadInternal.h:
     13        * WebCoreSupport/WebFrameLoaderClient.mm:
     14        (WebFrameLoaderClient::download):
     15
    1162011-07-15  Pratik Solanki  <psolanki@apple.com>
    217
  • trunk/Source/WebKit/mac/Misc/WebDownload.mm

    r86414 r91198  
    4141#import "WebTypesInternal.h"
    4242
     43#if USE(CFNETWORK)
     44#import <CFNetwork/CFNetwork.h>
     45#import <CFNetwork/CFURLConnection.h>
     46#endif
     47
    4348using namespace WebCore;
    4449
     
    5661              delegate:(id)delegate
    5762             directory:(NSString *)directory;
     63
     64#if USE(CFNETWORK)
     65- (id)_initWithLoadingCFURLConnection:(CFURLConnectionRef)connection
     66                              request:(CFURLRequestRef)request
     67                             response:(CFURLResponseRef)response
     68                             delegate:(id)delegate
     69                                proxy:(NSURLConnectionDelegateProxy *)proxy;
     70#endif
     71
    5872@end
    5973
     
    237251}
    238252
     253#if USE(CFNETWORK)
     254- (id)_initWithLoadingCFURLConnection:(CFURLConnectionRef)connection
     255                              request:(CFURLRequestRef)request
     256                             response:(CFURLResponseRef)response
     257                             delegate:(id)delegate
     258                                proxy:(NSURLConnectionDelegateProxy *)proxy
     259{
     260    [self _setRealDelegate:delegate];
     261    return [super _initWithLoadingCFURLConnection:connection request:request response:response delegate:_webInternal proxy:proxy];
     262}
     263#endif
     264
    239265- (id)_initWithRequest:(NSURLRequest *)request
    240266              delegate:(id)delegate
  • trunk/Source/WebKit/mac/Misc/WebDownloadInternal.h

    r12070 r91198  
    2828 
    2929#import <WebKit/WebDownload.h>
     30
     31#if USE(CFNETWORK)
     32#import <CFNetwork/CFURLConnection.h>
     33#endif
    3034 
    3135@interface WebDownload (WebDownloadCreation)
     
    3943                 delegate:(id)delegate
    4044                directory:(NSString *)directory;
     45
     46#if USE(CFNETWORK)
     47+ (id)_downloadWithLoadingCFURLConnection:(CFURLConnectionRef)connection
     48                                  request:(CFURLRequestRef)request
     49                                 response:(CFURLResponseRef)response
     50                                 delegate:(id)delegate
     51                                    proxy:(id)proxy;
     52#endif
     53
    4154@end
  • trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm

    r90707 r91198  
    288288void WebFrameLoaderClient::download(ResourceHandle* handle, const ResourceRequest& request, const ResourceRequest& initialRequest, const ResourceResponse& response)
    289289{
     290#if USE(CFNETWORK)
     291    ASSERT([WebDownload respondsToSelector:@selector(_downloadWithLoadingCFURLConnection:request:response:delegate:proxy:)]);
     292    WebView *webView = getWebView(m_webFrame.get());
     293    CFURLConnectionRef connection = handle->connection();
     294    WebDownload *download = [WebDownload _downloadWithLoadingCFURLConnection:connection
     295                                                                     request:request.cfURLRequest()
     296                                                                    response:response.cfURLResponse()
     297                                                                    delegate:[webView downloadDelegate]
     298                                                                       proxy:nil];
     299    setOriginalURLForDownload(download, initialRequest);
     300
     301    // Release the connection since the NSURLDownload (actually CFURLDownload) will retain the connection and use it.
     302    handle->releaseConnectionForDownload();
     303    CFRelease(connection);
     304#else
    290305    id proxy = handle->releaseProxy();
    291306    ASSERT(proxy);
     
    299314   
    300315    setOriginalURLForDownload(download, initialRequest);   
     316#endif
    301317}
    302318
Note: See TracChangeset for help on using the changeset viewer.