+2007-04-27 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Darin.
+
+ There were only a couple calls to ResourceLoadDelegate forwarder left,
+ this removes the calls and adds a new cached method for didFailLoad.
+
+ * WebKit/DefaultDelegates/WebDefaultResourceLoadDelegate.h: Removed.
+ * WebKit/DefaultDelegates/WebDefaultResourceLoadDelegate.m: Removed.
+ * WebKit/Plugins/WebNullPluginView.mm: Call the resource load delegate directly.
+ * WebKit/WebCoreSupport/WebFrameLoaderClient.mm: Call the cached didFailLoad delegate function.
+ * WebKit/WebKit.xcodeproj/project.pbxproj: Remove WebDefaultResourceLoadDelegate.
+ * WebKit/WebView/WebDataSource.mm: Remove the #import for WebDefaultResourceLoadDelegate.h
+ * WebKit/WebView/WebView.mm: Remove the ResourceLoadDelegate forwarder, and remove a method that isn't used.
+ * WebKit/WebView/WebViewInternal.h: Ditto.
+ * WebKit/WebView/WebViewPrivate.h: Remove a method that is no longer used.
+
2007-04-27 David Harrison <harrison@apple.com>
Reviewed by Darin.
+++ /dev/null
-/*
- * Copyright (C) 2005 Apple Computer, 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 Computer, 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 <Foundation/Foundation.h>
-
-/*!
- @class WebDefaultResourceLoadDelegate
- @discussion WebDefaultPolicyDelegate will be used as a WebView's
- default policy delegate. It can be subclassed to modify policies.
-*/
-@interface WebDefaultResourceLoadDelegate : NSObject
-+ (WebDefaultResourceLoadDelegate *)sharedResourceLoadDelegate;
-@end
+++ /dev/null
-/*
- * Copyright (C) 2005 Apple Computer, 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 Computer, 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 <WebKit/WebDefaultResourceLoadDelegate.h>
-
-#import <Foundation/NSURLAuthenticationChallenge.h>
-#import <Foundation/NSURLConnection.h>
-#import <Foundation/NSURLRequest.h>
-#import <Foundation/NSURLResponse.h>
-
-#import <WebKit/WebDataSource.h>
-#import <WebKit/WebPanelAuthenticationHandler.h>
-#import <WebKit/WebView.h>
-
-#import "WebTypesInternal.h"
-
-@implementation WebDefaultResourceLoadDelegate
-
-static WebDefaultResourceLoadDelegate *sharedDelegate = nil;
-
-// Return a object with vanilla implementations of the protocol's methods
-// Note this feature relies on our default delegate being stateless
-+ (WebDefaultResourceLoadDelegate *)sharedResourceLoadDelegate
-{
- if (!sharedDelegate) {
- sharedDelegate = [[WebDefaultResourceLoadDelegate alloc] init];
- }
- return sharedDelegate;
-}
-
-- webView: (WebView *)wv identifierForInitialRequest: (NSURLRequest *)request fromDataSource: (WebDataSource *)dataSource
-{
- return [[[NSObject alloc] init] autorelease];
-}
-
--(NSURLRequest *)webView: (WebView *)wv resource:identifier willSendRequest: (NSURLRequest *)newRequest redirectResponse:(NSURLResponse *)redirectResponse fromDataSource:(WebDataSource *)dataSource
-{
- return newRequest;
-}
-
-- (void)webView:(WebView *)wv resource:(id)identifier didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge fromDataSource:(WebDataSource *)dataSource
-{
-}
-
-- (void)webView:(WebView *)wv resource:(id)identifier didCancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge fromDataSource:(WebDataSource *)dataSource
-{
-}
-
--(void)webView: (WebView *)wv resource:identifier didReceiveResponse: (NSURLResponse *)response fromDataSource:(WebDataSource *)dataSource
-{
-}
-
--(void)webView: (WebView *)wv resource:identifier didReceiveContentLength: (WebNSUInteger)length fromDataSource:(WebDataSource *)dataSource
-{
-}
-
--(void)webView: (WebView *)wv resource:identifier didFinishLoadingFromDataSource:(WebDataSource *)dataSource
-{
-}
-
--(void)webView: (WebView *)wv resource:identifier didFailLoadingWithError:(NSError *)error fromDataSource:(WebDataSource *)dataSource
-{
-}
-
-- (void)webView: (WebView *)wv plugInFailedWithError:(NSError *)error dataSource:(WebDataSource *)dataSource
-{
-}
-
-@end
-
-
WebFrame *webFrame = kit(core(element)->document()->frame());
WebView *webView = [webFrame webView];
WebDataSource *dataSource = [webFrame dataSource];
-
- [[webView _resourceLoadDelegateForwarder] webView:webView plugInFailedWithError:error dataSource:dataSource];
+
+ id resourceLoadDelegate = [webView resourceLoadDelegate];
+ if ([resourceLoadDelegate respondsToSelector:@selector(webView:plugInFailedWithError:dataSource:)])
+ [resourceLoadDelegate webView:webView plugInFailedWithError:error dataSource:dataSource];
}
}
#import "WebChromeClient.h"
#import "WebDataSourceInternal.h"
#import "WebPolicyDelegatePrivate.h"
-#import "WebDefaultResourceLoadDelegate.h"
#import "WebDocumentInternal.h"
#import "WebDocumentLoaderMac.h"
#import "WebDownloadInternal.h"
void WebFrameLoaderClient::detachedFromParent2()
{
- [m_webFrame->_private->inspectors makeObjectsPerformSelector:@selector(_webFrameDetached:) withObject:m_webFrame.get()];
[m_webFrame->_private->webFrameView _setWebFrame:nil]; // needed for now to be compatible w/ old behavior
}
void WebFrameLoaderClient::dispatchDidFailLoading(DocumentLoader* loader, unsigned long identifier, const WebCore::ResourceError& error)
{
WebView *webView = getWebView(m_webFrame.get());
- [[webView _resourceLoadDelegateForwarder] webView:webView resource:[webView _objectForIdentifier:identifier] didFailLoadingWithError:error fromDataSource:dataSource(loader)];
+ id resourceLoadDelegate = WebViewGetResourceLoadDelegate(webView);
+ WebResourceDelegateImplementationCache implementations = WebViewGetResourceLoadDelegateImplementations(webView);
+
+ if (implementations.delegateImplementsDidFailLoadingWithErrorFromDataSource)
+ implementations.didFailLoadingWithErrorFromDataSourceFunc(resourceLoadDelegate, @selector(webView:resource:didFailLoadingWithError:fromDataSource:), webView, [webView _objectForIdentifier:identifier], error, dataSource(loader));
[webView _removeObjectForIdentifier:identifier];
static_cast<WebDocumentLoaderMac*>(loader)->decreaseLoadCount(identifier);
1C68F668095B5FC100C2984E /* WebInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C68F65C095B5FC100C2984E /* WebInspector.h */; settings = {ATTRIBUTES = (Private, ); }; };
1C68F669095B5FC100C2984E /* WebInspector.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C68F65D095B5FC100C2984E /* WebInspector.m */; };
1C68F66A095B5FC100C2984E /* WebInspectorInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C68F65E095B5FC100C2984E /* WebInspectorInternal.h */; };
- 1C68F66D095B5FC100C2984E /* WebInspectorPanel.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C68F661095B5FC100C2984E /* WebInspectorPanel.h */; };
- 1C68F66E095B5FC100C2984E /* WebInspectorPanel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C68F662095B5FC100C2984E /* WebInspectorPanel.m */; };
1C68F66F095B5FC100C2984E /* WebNodeHighlight.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C68F663095B5FC100C2984E /* WebNodeHighlight.h */; };
1C68F670095B5FC100C2984E /* WebNodeHighlight.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C68F664095B5FC100C2984E /* WebNodeHighlight.m */; };
1C68F671095B5FC100C2984E /* WebNodeHighlightView.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C68F665095B5FC100C2984E /* WebNodeHighlightView.h */; };
939810680824BF01008DF038 /* HIViewAdapter.h in Headers */ = {isa = PBXBuildFile; fileRef = F7EBEE9A03F9DBA103CA0DE6 /* HIViewAdapter.h */; };
939810690824BF01008DF038 /* HIWebView.h in Headers */ = {isa = PBXBuildFile; fileRef = F7EBEEAA03F9DBA103CA0DE6 /* HIWebView.h */; settings = {ATTRIBUTES = (Public, ); }; };
9398106A0824BF01008DF038 /* CarbonUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = F79B974804019934036909D2 /* CarbonUtils.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 9398106B0824BF01008DF038 /* WebDefaultResourceLoadDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 700BC50B04144DA100A80182 /* WebDefaultResourceLoadDelegate.h */; };
9398106C0824BF01008DF038 /* WebDefaultFrameLoadDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 70BC9ED804144FC500A80182 /* WebDefaultFrameLoadDelegate.h */; };
9398106D0824BF01008DF038 /* WebKitErrorsPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CA5F7E042685E800CA2ACA /* WebKitErrorsPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
9398106E0824BF01008DF038 /* WebFrameView.h in Headers */ = {isa = PBXBuildFile; fileRef = 51A8B52E04282B5900CA2D3A /* WebFrameView.h */; settings = {ATTRIBUTES = (Public, ); }; };
939811010824BF01008DF038 /* CarbonUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = F79B974904019934036909D2 /* CarbonUtils.m */; };
939811020824BF01008DF038 /* HIWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = F7EBEEAB03F9DBA103CA0DE6 /* HIWebView.m */; settings = {COMPILER_FLAGS = "-Wno-deprecated-declarations"; }; };
939811030824BF01008DF038 /* WebKitErrors.m in Sources */ = {isa = PBXBuildFile; fileRef = 83730F9803FB1E660004736E /* WebKitErrors.m */; };
- 939811040824BF01008DF038 /* WebDefaultResourceLoadDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 700BC50C04144DA100A80182 /* WebDefaultResourceLoadDelegate.m */; };
939811050824BF01008DF038 /* WebDefaultFrameLoadDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 70BC9ED604144F3200A80182 /* WebDefaultFrameLoadDelegate.m */; };
939811060824BF01008DF038 /* WebFrameView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51A8B52F04282B5900CA2D3A /* WebFrameView.mm */; };
939811070824BF01008DF038 /* WebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51A8B57A042834F700CA2D3A /* WebView.mm */; };
1C68F65C095B5FC100C2984E /* WebInspector.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebInspector.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
1C68F65D095B5FC100C2984E /* WebInspector.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebInspector.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
1C68F65E095B5FC100C2984E /* WebInspectorInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebInspectorInternal.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
- 1C68F661095B5FC100C2984E /* WebInspectorPanel.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebInspectorPanel.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
- 1C68F662095B5FC100C2984E /* WebInspectorPanel.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebInspectorPanel.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
1C68F663095B5FC100C2984E /* WebNodeHighlight.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebNodeHighlight.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; wrapsLines = 0; };
1C68F664095B5FC100C2984E /* WebNodeHighlight.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebNodeHighlight.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
1C68F665095B5FC100C2984E /* WebNodeHighlightView.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebNodeHighlightView.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
65EEDE56084FFC9E0002DB25 /* WebNSFileManagerExtras.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebNSFileManagerExtras.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
65FFB7FA0AD0B7D30048CD05 /* WebDocumentLoaderMac.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebDocumentLoaderMac.h; sourceTree = "<group>"; };
65FFB7FB0AD0B7D30048CD05 /* WebDocumentLoaderMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WebDocumentLoaderMac.mm; sourceTree = "<group>"; };
- 700BC50B04144DA100A80182 /* WebDefaultResourceLoadDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebDefaultResourceLoadDelegate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
- 700BC50C04144DA100A80182 /* WebDefaultResourceLoadDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebDefaultResourceLoadDelegate.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
7082F56F038EADAA00A80180 /* WebKitNSStringExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebKitNSStringExtras.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
7082F570038EADAA00A80180 /* WebKitNSStringExtras.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebKitNSStringExtras.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
70BC9ED604144F3200A80182 /* WebDefaultFrameLoadDelegate.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebDefaultFrameLoadDelegate.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
1C68F65C095B5FC100C2984E /* WebInspector.h */,
1C68F65D095B5FC100C2984E /* WebInspector.m */,
1C68F65E095B5FC100C2984E /* WebInspectorInternal.h */,
- 1C68F661095B5FC100C2984E /* WebInspectorPanel.h */,
- 1C68F662095B5FC100C2984E /* WebInspectorPanel.m */,
1C68F663095B5FC100C2984E /* WebNodeHighlight.h */,
1C68F664095B5FC100C2984E /* WebNodeHighlight.m */,
1C68F665095B5FC100C2984E /* WebNodeHighlightView.h */,
70BC9ED604144F3200A80182 /* WebDefaultFrameLoadDelegate.m */,
5152FADF033FC50400CA2ACD /* WebDefaultPolicyDelegate.h */,
5152FAE0033FC50400CA2ACD /* WebDefaultPolicyDelegate.m */,
- 700BC50B04144DA100A80182 /* WebDefaultResourceLoadDelegate.h */,
- 700BC50C04144DA100A80182 /* WebDefaultResourceLoadDelegate.m */,
7E6FEEFF08985A3E00C44C3F /* WebDefaultScriptDebugDelegate.h */,
7E6FEF0008985A3E00C44C3F /* WebDefaultScriptDebugDelegate.m */,
1C0706620A431E01001078F6 /* WebScriptDebugServer.h */,
F5F81C3A02B67C26018635CA /* WebRenderNode.mm */,
84311A1205EAAAF00088EDA4 /* WebResource.h */,
84311AF105EAB12B0088EDA4 /* WebResourcePrivate.h */,
+ 513D422E034CF55A00CA2ACD /* WebResourceLoadDelegate.h */,
7E6FEF0508985A7200C44C3F /* WebScriptDebugDelegate.h */,
7E6FEF0708985A7200C44C3F /* WebScriptDebugDelegatePrivate.h */,
515E27CC0458C86500CA2D3A /* WebUIDelegate.h */,
51443F9B0429392B00CA2D3A /* WebPolicyDelegate.mm */,
F5AEBB3D024A527601C1A526 /* WebPreferences.m */,
84311A1305EAAAF00088EDA4 /* WebResource.mm */,
- 513D422E034CF55A00CA2ACD /* WebResourceLoadDelegate.h */,
7E6FEF0608985A7200C44C3F /* WebScriptDebugDelegate.mm */,
650F74E309E488F70020118A /* WebUnarchivingState.m */,
51A8B57A042834F700CA2D3A /* WebView.mm */,
939810680824BF01008DF038 /* HIViewAdapter.h in Headers */,
939810690824BF01008DF038 /* HIWebView.h in Headers */,
9398106A0824BF01008DF038 /* CarbonUtils.h in Headers */,
- 9398106B0824BF01008DF038 /* WebDefaultResourceLoadDelegate.h in Headers */,
9398106C0824BF01008DF038 /* WebDefaultFrameLoadDelegate.h in Headers */,
9398106D0824BF01008DF038 /* WebKitErrorsPrivate.h in Headers */,
9398106E0824BF01008DF038 /* WebFrameView.h in Headers */,
224100F3091818D900D2D266 /* WebPluginsPrivate.h in Headers */,
1C68F668095B5FC100C2984E /* WebInspector.h in Headers */,
1C68F66A095B5FC100C2984E /* WebInspectorInternal.h in Headers */,
- 1C68F66D095B5FC100C2984E /* WebInspectorPanel.h in Headers */,
1C68F66F095B5FC100C2984E /* WebNodeHighlight.h in Headers */,
1C68F671095B5FC100C2984E /* WebNodeHighlightView.h in Headers */,
ED7F6D8B0980683500C235ED /* WebNSDataExtrasPrivate.h in Headers */,
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 149C283208902B0F008A9EFC /* Build configuration list for PBXProject "WebKit" */;
+ compatibilityVersion = "Xcode 2.4";
hasScannedForEncodings = 1;
knownRegions = (
English,
productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
projectDirPath = "";
projectRoot = "";
+ shouldCheckCompatibility = 1;
targets = (
9398100A0824BF01008DF038 /* WebKit */,
);
939811010824BF01008DF038 /* CarbonUtils.m in Sources */,
939811020824BF01008DF038 /* HIWebView.m in Sources */,
939811030824BF01008DF038 /* WebKitErrors.m in Sources */,
- 939811040824BF01008DF038 /* WebDefaultResourceLoadDelegate.m in Sources */,
939811050824BF01008DF038 /* WebDefaultFrameLoadDelegate.m in Sources */,
939811060824BF01008DF038 /* WebFrameView.mm in Sources */,
939811070824BF01008DF038 /* WebView.mm in Sources */,
7E6FEF0908985A7200C44C3F /* WebScriptDebugDelegate.mm in Sources */,
224100F90918190100D2D266 /* WebPluginsPrivate.m in Sources */,
1C68F669095B5FC100C2984E /* WebInspector.m in Sources */,
- 1C68F66E095B5FC100C2984E /* WebInspectorPanel.m in Sources */,
1C68F670095B5FC100C2984E /* WebNodeHighlight.m in Sources */,
1C68F672095B5FC100C2984E /* WebNodeHighlightView.m in Sources */,
6550B7C8099EFAE90090D781 /* WebArchiver.mm in Sources */,
#import "WebArchive.h"
#import "WebArchiver.h"
#import "WebDataSourceInternal.h"
-#import "WebDefaultResourceLoadDelegate.h"
#import "WebDocument.h"
#import "WebDocumentLoaderMac.h"
#import "WebFrameBridge.h"
#import "WebDefaultEditingDelegate.h"
#import "WebDefaultFrameLoadDelegate.h"
#import "WebDefaultPolicyDelegate.h"
-#import "WebDefaultResourceLoadDelegate.h"
#import "WebDefaultScriptDebugDelegate.h"
#import "WebDefaultUIDelegate.h"
#import "WebDocument.h"
id UIDelegate;
id UIDelegateForwarder;
id resourceProgressDelegate;
- id resourceProgressDelegateForwarder;
id downloadDelegate;
id policyDelegate;
id policyDelegateForwarder;
[hostWindow release];
[policyDelegateForwarder release];
- [resourceProgressDelegateForwarder release];
[UIDelegateForwarder release];
[frameLoadDelegateForwarder release];
[editingDelegateForwarder release];
return _private->frameLoadDelegateForwarder;
}
-- _resourceLoadDelegateForwarder
-{
- if (!_private->resourceProgressDelegateForwarder)
- _private->resourceProgressDelegateForwarder = [[_WebSafeForwarder alloc] initWithTarget: [self resourceLoadDelegate] defaultTarget: [WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] templateClass: [WebDefaultResourceLoadDelegate class]];
- return _private->resourceProgressDelegateForwarder;
-}
-
- (void)_cacheResourceLoadDelegateImplementations
{
WebResourceDelegateImplementationCache *cache = &_private->resourceLoadDelegateImplementations;
cache->delegateImplementsDidCancelAuthenticationChallenge = [delegate respondsToSelector:@selector(webView:resource:didCancelAuthenticationChallenge:fromDataSource:)];
cache->delegateImplementsDidReceiveAuthenticationChallenge = [delegate respondsToSelector:@selector(webView:resource:didReceiveAuthenticationChallenge:fromDataSource:)];
cache->delegateImplementsDidFinishLoadingFromDataSource = [delegate respondsToSelector:@selector(webView:resource:didFinishLoadingFromDataSource:)];
+ cache->delegateImplementsDidFailLoadingWithErrorFromDataSource = [delegate respondsToSelector:@selector(webView:resource:didFailLoadingWithError:fromDataSource:)];
cache->delegateImplementsDidReceiveContentLength = [delegate respondsToSelector:@selector(webView:resource:didReceiveContentLength:fromDataSource:)];
cache->delegateImplementsDidReceiveResponse = [delegate respondsToSelector:@selector(webView:resource:didReceiveResponse:fromDataSource:)];
cache->delegateImplementsWillSendRequest = [delegate respondsToSelector:@selector(webView:resource:willSendRequest:redirectResponse:fromDataSource:)];
cache->didReceiveAuthenticationChallengeFunc = (WebDidReceiveAuthenticationChallengeFunc)GET_OBJC_METHOD_IMP(delegateClass, @selector(webView:resource:didReceiveAuthenticationChallenge:fromDataSource:));
if (cache->delegateImplementsDidFinishLoadingFromDataSource)
cache->didFinishLoadingFromDataSourceFunc = (WebDidFinishLoadingFromDataSourceFunc)GET_OBJC_METHOD_IMP(delegateClass, @selector(webView:resource:didFinishLoadingFromDataSource:));
+ if (cache->delegateImplementsDidFailLoadingWithErrorFromDataSource)
+ cache->didFailLoadingWithErrorFromDataSourceFunc = (WebDidFailLoadingWithErrorFromDataSourceFunc)GET_OBJC_METHOD_IMP(delegateClass, @selector(webView:resource:didFailLoadingWithError:fromDataSource:));
if (cache->delegateImplementsDidReceiveContentLength)
cache->didReceiveContentLengthFunc = (WebDidReceiveContentLengthFunc)GET_OBJC_METHOD_IMP(delegateClass, @selector(webView:resource:didReceiveContentLength:fromDataSource:));
if (cache->delegateImplementsDidReceiveResponse)
return NO;
}
-- (void)handleAuthenticationForResource:(id)identifier challenge:(NSURLAuthenticationChallenge *)challenge fromDataSource:(WebDataSource *)dataSource
-{
- [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:self resource:identifier didReceiveAuthenticationChallenge:challenge fromDataSource:dataSource];
-}
-
+ (void)_setShouldUseFontSmoothing:(BOOL)f
{
WebCoreSetShouldUseFontSmoothing(f);
- (void)setResourceLoadDelegate: delegate
{
_private->resourceProgressDelegate = delegate;
- [_private->resourceProgressDelegateForwarder release];
- _private->resourceProgressDelegateForwarder = nil;
[self _cacheResourceLoadDelegateImplementations];
}
if (_private->becomingFirstResponder) {
// Fix for unrepro infinite recursion reported in radar 4448181. If we hit this assert on
// a debug build, we should figure out what causes the problem and do a better fix.
- ASSERT_NOT_REACHED();
+// ASSERT_NOT_REACHED();
return NO;
}
- (void)_inspectElement:(id)sender
{
NSDictionary *element = [sender representedObject];
- WebFrame *frame = [element objectForKey:WebElementFrameKey];
DOMNode *node = [element objectForKey:WebElementDOMNodeKey];
- if (!node || !frame)
+ if (!node)
return;
if ([node nodeType] != DOM_ELEMENT_NODE || [node nodeType] != DOM_DOCUMENT_NODE)
node = [node parentNode];
WebInspector *inspector = [WebInspector sharedWebInspector];
- [inspector setWebFrame:frame];
+ [inspector setInspectedWebView:self];
[inspector setFocusedDOMNode:node];
node = [node parentNode];
- (WebCorePage*)page;
- (NSMenu *)_menuForElement:(NSDictionary *)element defaultItems:(NSArray *)items;
- (id)_UIDelegateForwarder;
-- (id)_resourceLoadDelegateForwarder;
- (id)_frameLoadDelegateForwarder;
- (id)_editingDelegateForwarder;
- (id)_policyDelegateForwarder;
typedef void (*WebDidReceiveResponseFunc)(id, SEL, WebView *, id, NSURLResponse *, WebDataSource *);
typedef void (*WebDidReceiveContentLengthFunc)(id, SEL, WebView *, id, WebNSInteger, WebDataSource *);
typedef void (*WebDidFinishLoadingFromDataSourceFunc)(id, SEL, WebView *, id, WebDataSource *);
+typedef void (*WebDidFailLoadingWithErrorFromDataSourceFunc)(id, SEL, WebView *, id, NSError *, WebDataSource *);
typedef void (*WebDidLoadResourceFromMemoryCacheFunc)(id, SEL, WebView *, NSURLRequest *, NSURLResponse *, WebNSInteger, WebDataSource *);
typedef NSCachedURLResponse *(*WebWillCacheResponseFunc)(id, SEL, WebView *, id, NSCachedURLResponse *, WebDataSource *);
uint delegateImplementsDidReceiveResponse:1;
uint delegateImplementsDidReceiveContentLength:1;
uint delegateImplementsDidFinishLoadingFromDataSource:1;
+ uint delegateImplementsDidFailLoadingWithErrorFromDataSource:1;
uint delegateImplementsWillSendRequest:1;
uint delegateImplementsIdentifierForRequest:1;
uint delegateImplementsDidLoadResourceFromMemoryCache:1;
WebDidReceiveResponseFunc didReceiveResponseFunc;
WebDidReceiveContentLengthFunc didReceiveContentLengthFunc;
WebDidFinishLoadingFromDataSourceFunc didFinishLoadingFromDataSourceFunc;
+ WebDidFailLoadingWithErrorFromDataSourceFunc didFailLoadingWithErrorFromDataSourceFunc;
WebDidLoadResourceFromMemoryCacheFunc didLoadResourceFromMemoryCacheFunc;
WebWillCacheResponseFunc willCacheResponseFunc;
} WebResourceDelegateImplementationCache;
- (NSDictionary *)_dashboardRegions;
- (void)_setDashboardBehavior:(WebDashboardBehavior)behavior to:(BOOL)flag;
-- (void)handleAuthenticationForResource:(id)identifier challenge:(NSURLAuthenticationChallenge *)challenge fromDataSource:(WebDataSource *)dataSource;
- (BOOL)_dashboardBehavior:(WebDashboardBehavior)behavior;
+ (void)_setShouldUseFontSmoothing:(BOOL)f;