2007-04-27 Timothy Hatcher <timothy@apple.com>
authorthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Apr 2007 04:48:58 +0000 (04:48 +0000)
committerthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Apr 2007 04:48:58 +0000 (04:48 +0000)
        Reviewed by Darin.

        There were only a couple calls to ResourceLoadDelegate forwarder left,
        this removed the calls and added 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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@21159 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/ChangeLog
WebKit/DefaultDelegates/WebDefaultResourceLoadDelegate.h [deleted file]
WebKit/DefaultDelegates/WebDefaultResourceLoadDelegate.m [deleted file]
WebKit/Plugins/WebNullPluginView.mm
WebKit/WebCoreSupport/WebFrameLoaderClient.mm
WebKit/WebKit.xcodeproj/project.pbxproj
WebKit/WebView/WebDataSource.mm
WebKit/WebView/WebView.mm
WebKit/WebView/WebViewInternal.h
WebKit/WebView/WebViewPrivate.h

index a072c4b068b900ef82e0206712c853f96ddff7f2..662dcf239a625ab67e9a5846ce24671e81c5739e 100644 (file)
@@ -1,3 +1,20 @@
+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.
diff --git a/WebKit/DefaultDelegates/WebDefaultResourceLoadDelegate.h b/WebKit/DefaultDelegates/WebDefaultResourceLoadDelegate.h
deleted file mode 100644 (file)
index 9f2adbf..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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
diff --git a/WebKit/DefaultDelegates/WebDefaultResourceLoadDelegate.m b/WebKit/DefaultDelegates/WebDefaultResourceLoadDelegate.m
deleted file mode 100644 (file)
index 95d2bac..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * 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
-
-
index 67e72444a53d7c653ffd9c465e17ffde510006dd..026decadd4d7295b21fa893c4a9e2e874040738c 100644 (file)
@@ -76,8 +76,10 @@ static NSImage *image = nil;
         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];
     }
 }
 
index 02e1e3566f96a5a041eaef93319699a1c31253af..572398f8aaf512abab5f0a31bf06a55c2cf4d28b 100644 (file)
@@ -38,7 +38,6 @@
 #import "WebChromeClient.h"
 #import "WebDataSourceInternal.h"
 #import "WebPolicyDelegatePrivate.h"
-#import "WebDefaultResourceLoadDelegate.h"
 #import "WebDocumentInternal.h"
 #import "WebDocumentLoaderMac.h"
 #import "WebDownloadInternal.h"
@@ -209,7 +208,6 @@ void WebFrameLoaderClient::setCopiesOnScroll()
 
 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
 }
 
@@ -369,7 +367,11 @@ void WebFrameLoaderClient::dispatchDidFinishLoading(DocumentLoader* loader, unsi
 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);
index 1e5c3703fed8106db232daf4dbb669f1e29d6dd0..9914315854b1f11bb6c0e162317024b85a1eb4c0 100644 (file)
@@ -20,8 +20,6 @@
                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 */,
index 582e68bfbcf8901ca80bb5530aefe922331e8f9f..3ee187d7314fa1443c428f3e421c0cdef91baddb 100644 (file)
@@ -31,7 +31,6 @@
 #import "WebArchive.h"
 #import "WebArchiver.h"
 #import "WebDataSourceInternal.h"
-#import "WebDefaultResourceLoadDelegate.h"
 #import "WebDocument.h"
 #import "WebDocumentLoaderMac.h"
 #import "WebFrameBridge.h"
index 0e2724f18b3bc4dd43024b142c8d8e91e32987e3..6137860d46177ac53f7b403a027d66087ac233c1 100644 (file)
@@ -41,7 +41,6 @@
 #import "WebDefaultEditingDelegate.h"
 #import "WebDefaultFrameLoadDelegate.h"
 #import "WebDefaultPolicyDelegate.h"
-#import "WebDefaultResourceLoadDelegate.h"
 #import "WebDefaultScriptDebugDelegate.h"
 #import "WebDefaultUIDelegate.h"
 #import "WebDocument.h"
@@ -257,7 +256,6 @@ static int pluginDatabaseClientCount = 0;
     id UIDelegate;
     id UIDelegateForwarder;
     id resourceProgressDelegate;
-    id resourceProgressDelegateForwarder;
     id downloadDelegate;
     id policyDelegate;
     id policyDelegateForwarder;
@@ -438,7 +436,6 @@ static BOOL grammarCheckingEnabled;
     [hostWindow release];
     
     [policyDelegateForwarder release];
-    [resourceProgressDelegateForwarder release];
     [UIDelegateForwarder release];
     [frameLoadDelegateForwarder release];
     [editingDelegateForwarder release];
@@ -884,13 +881,6 @@ static bool debugWidget = true;
     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;
@@ -900,6 +890,7 @@ static bool debugWidget = true;
     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:)];
@@ -919,6 +910,8 @@ static bool debugWidget = true;
         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)
@@ -1301,11 +1294,6 @@ WebResourceDelegateImplementationCache WebViewGetResourceLoadDelegateImplementat
     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);
@@ -1918,8 +1906,6 @@ NS_ENDHANDLER
 - (void)setResourceLoadDelegate: delegate
 {
     _private->resourceProgressDelegate = delegate;
-    [_private->resourceProgressDelegateForwarder release];
-    _private->resourceProgressDelegateForwarder = nil;
     [self _cacheResourceLoadDelegateImplementations];
 }
 
@@ -2262,7 +2248,7 @@ NS_ENDHANDLER
     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;
     }
     
@@ -2464,16 +2450,15 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
 - (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];
index 3c44dcb5b202db170c10a2fa8f57c31aee45b4bd..aff7dce0e201364cac59f2ef4c8166547f4710b6 100644 (file)
@@ -71,7 +71,6 @@ WebResourceDelegateImplementationCache WebViewGetResourceLoadDelegateImplementat
 - (WebCorePage*)page;
 - (NSMenu *)_menuForElement:(NSDictionary *)element defaultItems:(NSArray *)items;
 - (id)_UIDelegateForwarder;
-- (id)_resourceLoadDelegateForwarder;
 - (id)_frameLoadDelegateForwarder;
 - (id)_editingDelegateForwarder;
 - (id)_policyDelegateForwarder;
index 801c4517c44460dd20d55bffbbac49bb2852940a..822757b9d3d3d0d14541f0713c41b8f869d684b4 100644 (file)
@@ -48,6 +48,7 @@ typedef NSURLRequest *(*WebWillSendRequestFunc)(id, SEL, WebView *, id, NSURLReq
 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 *);
 
@@ -57,6 +58,7 @@ typedef struct _WebResourceDelegateImplementationCache {
     uint delegateImplementsDidReceiveResponse:1;
     uint delegateImplementsDidReceiveContentLength:1;
     uint delegateImplementsDidFinishLoadingFromDataSource:1;
+    uint delegateImplementsDidFailLoadingWithErrorFromDataSource:1;
     uint delegateImplementsWillSendRequest:1;
     uint delegateImplementsIdentifierForRequest:1;
     uint delegateImplementsDidLoadResourceFromMemoryCache:1;
@@ -69,6 +71,7 @@ typedef struct _WebResourceDelegateImplementationCache {
     WebDidReceiveResponseFunc didReceiveResponseFunc;
     WebDidReceiveContentLengthFunc didReceiveContentLengthFunc;
     WebDidFinishLoadingFromDataSourceFunc didFinishLoadingFromDataSourceFunc;
+    WebDidFailLoadingWithErrorFromDataSourceFunc didFailLoadingWithErrorFromDataSourceFunc;
     WebDidLoadResourceFromMemoryCacheFunc didLoadResourceFromMemoryCacheFunc;
     WebWillCacheResponseFunc willCacheResponseFunc;
 } WebResourceDelegateImplementationCache;
@@ -266,7 +269,6 @@ Could be worth adding to the API.
 - (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;