+2006-09-16 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Hyatt
+
+ Pruning code relating to WebKit's icon loader
+
+ * bridge/mac/WebCoreIconDatabaseBridge.h:
+ * bridge/mac/WebCoreIconDatabaseBridge.mm:
+ * loader/icon/IconDatabase.h:
+ * page/Frame.cpp:
+ (WebCore::Frame::endIfNotLoading): Moved a FIXME in from WebKit's IconLoader to
+ its new home
+
2006-09-16 Sam Weinig <sam.weinig@gmail.com>
Reviewed by Tim H.
@protocol WebCoreIconDatabaseBridge
+ (WebCoreIconDatabaseBridge *)sharedInstance;
-- (void)loadIconFromURL:(NSString *)iconURL;
@end
// This interface definition allows those who hold a WebCoreIconDatabaseBridge * to call all the methods
using namespace WebCore;
-namespace WebCore {
-
-void IconDatabase::loadIconFromURL(const String& url)
-{
- if (url.isEmpty())
- return;
- [[WebCoreIconDatabaseBridge sharedInstance] loadIconFromURL:(NSString *)url];
-}
-
-}
-
@implementation WebCoreIconDatabaseBridge
- (BOOL)openSharedDatabaseWithPath:(NSString *)path
// FIXME: This method is currently implemented in WebCoreIconDatabaseBridge so we can be in ObjC++ and fire off a loader in Webkit
// Once all of the loader logic is sufficiently moved into WebCore we need to move this implementation to IconDatabase.cpp
// using WebCore-style loaders
- void loadIconFromURL(const String&);
+ // void loadIconFromURL(const String&);
static IconDatabase* m_sharedInstance;
// last one to complete.
checkCompleted();
+ // FIXME - Right now, we kick off the icon loader when the frame is done receiving all its main resource.
+ // We could kick off the icon loader after we're done parsing the HEAD element, if that becomes convinient to find
+ // at a future date
+
// Don't load an icon if -
// 1) This is not the main frame
// 2) The database is disabled
+2006-09-16 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Hyatt
+
+ WebIconLoader is dead, long live WebCore::IconLoader
+ (code prune)
+
+ * Loader/WebFrameLoader.h:
+ * Loader/WebFrameLoader.m:
+ (-[WebFrameLoader dealloc]):
+ (-[WebFrameLoader commitProvisionalLoad]):
+ * Loader/WebIconLoader.h: Removed.
+ * Loader/WebIconLoader.m: Removed.
+ * Misc/WebIconDatabase.h:
+ * Misc/WebIconDatabase.m:
+ * Misc/WebIconDatabasePrivate.h:
+ * WebCoreSupport/WebFrameBridge.m:
+ (-[WebFrameBridge notifyIconChanged:]):
+ * WebCoreSupport/WebIconDatabaseBridge.h:
+ * WebCoreSupport/WebIconDatabaseBridge.m:
+ (-[WebIconDatabaseBridge _init]):
+ (-[WebIconDatabaseBridge _setIconData:forIconURL:]):
+ (-[WebIconDatabaseBridge _setHaveNoIconForIconURL:]):
+ * WebKit.exp:
+ * WebKit.xcodeproj/project.pbxproj:
+ * WebView/WebDataSource.m:
+ (-[WebDataSourcePrivate dealloc]):
+ (-[WebDataSource _stopLoading]):
+ (-[WebDataSource _setPrimaryLoadComplete:]):
+ * WebView/WebDataSourceInternal.h:
+
2006-09-16 Mark Rowe <opendarwin.org@bdash.net.nz>
Reviewed by Anders.
@class WebArchive;
@class WebDataSource;
@class WebMainResourceLoader;
-@class WebIconLoader;
@class WebLoader;
@class WebResource;
@class WebFrame;
NSMutableArray *subresourceLoaders;
NSMutableArray *plugInStreamLoaders;
- WebIconLoader *iconLoader;
WebFrame *webFrame;
WebDataSource *dataSource;
}
- (id)initWithWebFrame:(WebFrame *)wf;
-// FIXME: should really split isLoadingIcon from hasLoadedIcon, no?
-- (BOOL)hasIconLoader;
-- (void)loadIconWithRequest:(NSURLRequest *)request;
-- (void)stopLoadingIcon;
- (void)addPlugInStreamLoader:(WebLoader *)loader;
- (void)removePlugInStreamLoader:(WebLoader *)loader;
- (void)setDefersCallbacks:(BOOL)defers;
- (void)_setResponse:(NSURLResponse *)response;
- (void)_mainReceivedError:(NSError *)error complete:(BOOL)isComplete;
- (void)_finishedLoading;
-- (void)_iconLoaderReceivedPageIcon:(NSURL *)iconURL;
- (NSURL *)_URL;
- (NSError *)cancelledErrorWithRequest:(NSURLRequest *)request;
+ (BOOL)_canShowMIMEType:(NSString *)MIMEType;
+ (BOOL)_representationExistsForURLScheme:(NSString *)URLScheme;
+ (NSString *)_generatedMIMETypeForURLScheme:(NSString *)URLScheme;
-- (void)_updateIconDatabaseWithURL:(NSURL *)iconURL;
- (void)_notifyIconChanged:(NSURL *)iconURL;
- (void)_checkNavigationPolicyForRequest:(NSURLRequest *)newRequest andCall:(id)obj withSelector:(SEL)sel;
- (void)_checkContentPolicyForMIMEType:(NSString *)MIMEType andCall:(id)obj withSelector:(SEL)sel;
#import <JavaScriptCore/Assertions.h>
#import <WebKit/WebDataSourceInternal.h>
#import <WebKit/WebFrameInternal.h>
-#import <WebKit/WebIconLoader.h>
#import <WebKit/WebMainResourceLoader.h>
#import <WebKit/WebKitLogging.h>
#import <WebKit/WebViewInternal.h>
[mainResourceLoader release];
[subresourceLoaders release];
[plugInStreamLoaders release];
- [iconLoader release];
[dataSource release];
[provisionalDataSource release];
[super dealloc];
}
-- (BOOL)hasIconLoader
-{
- return iconLoader != nil;
-}
-
-- (void)loadIconWithRequest:(NSURLRequest *)request
-{
- ASSERT(!iconLoader);
- iconLoader = [[WebIconLoader alloc] initWithRequest:request];
- [iconLoader setFrameLoader:self];
- [iconLoader loadWithRequest:request];
-}
-
-- (void)stopLoadingIcon
-{
- [iconLoader stopLoading];
-}
-
- (void)addPlugInStreamLoader:(WebLoader *)loader
{
if (!plugInStreamLoaders)
[self _setState:WebFrameStateComplete];
}
-- (void)clearIconLoader
-{
- [iconLoader release];
- iconLoader = nil;
-}
-
- (void)commitProvisionalLoad
{
[self stopLoadingSubresources];
[self stopLoadingPlugIns];
- [self clearIconLoader];
[self _setDataSource:provisionalDataSource];
[self _setProvisionalDataSource:nil];
[self release];
}
-- (void)_updateIconDatabaseWithURL:(NSURL *)iconURL
-{
- ASSERT([[WebIconDatabase sharedIconDatabase] _isEnabled]);
-
- WebIconDatabase *iconDB = [WebIconDatabase sharedIconDatabase];
-
- // Bind the URL of the original request and the final URL to the icon URL.
- [iconDB _setIconURL:[iconURL _web_originalDataAsString] forURL:[[[self activeDataSource] _URL] _web_originalDataAsString]];
- [iconDB _setIconURL:[iconURL _web_originalDataAsString] forURL:[[[[self activeDataSource] _originalRequest] URL] _web_originalDataAsString]];
-}
-
- (void)_notifyIconChanged:(NSURL *)iconURL
{
ASSERT([[WebIconDatabase sharedIconDatabase] _isEnabled]);
[[webFrame webView] _didChangeValueForKey:_WebMainFrameIconKey];
}
-- (void)_iconLoaderReceivedPageIcon:(NSURL *)iconURL
-{
- [self _updateIconDatabaseWithURL:iconURL];
- [self _notifyIconChanged:iconURL];
-}
-
- (NSURL *)_URL
{
return [[self activeDataSource] _URL];
+++ /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/WebLoader.h>
-
-@class WebIconLoaderPrivate;
-
-/*!
- @class WebIconLoader
-*/
-@interface WebIconLoader : WebLoader
-{
- WebIconLoaderPrivate *_private;
-}
-
-/*!
- @method initWithRequest:
- @param request
-*/
-- (id)initWithRequest:(NSURLRequest *)request;
-
-/*!
- @method URL
-*/
-- (NSURL *)URL;
-
-/*!
- @method startLoading
-*/
-- (void)startLoading;
-
-/*!
- @method stopLoading
-*/
-- (void)stopLoading;
-@end
-
-@interface NSObject(WebIconLoaderDelegate)
-- (void)_iconLoaderReceivedPageIcon:(WebIconLoader *)iconLoader;
-@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/WebIconLoader.h>
-
-#import <JavaScriptCore/Assertions.h>
-#import <WebKit/WebFrameLoader.h>
-#import <WebKit/WebIconDatabase.h>
-#import <WebKit/WebIconDatabaseBridge.h>
-#import <WebKit/WebIconDatabasePrivate.h>
-#import <WebKit/WebKitLogging.h>
-
-#import <WebKit/WebNSURLExtras.h>
-
-@interface WebIconLoaderPrivate : NSObject
-{
-@public
- NSURLRequest *initialRequest;
-}
-
-@end;
-
-@implementation WebIconLoaderPrivate
-
-- (void)dealloc
-{
- [initialRequest release];
- [super dealloc];
-}
-
-@end;
-
-@implementation WebIconLoader
-
-- (id)initWithRequest:(NSURLRequest *)initialRequest;
-{
- ASSERT([[WebIconDatabase sharedIconDatabase] _isEnabled]);
- [super init];
- _private = [[WebIconLoaderPrivate alloc] init];
- _private->initialRequest = [initialRequest copy];
- return self;
-}
-
-- (void)dealloc
-{
- [_private release];
- [super dealloc];
-}
-
-- (NSURL *)URL
-{
- return [_private->initialRequest URL];
-}
-
-- (void)startLoading
-{
- [self loadWithRequest:_private->initialRequest];
-}
-
-- (void)stopLoading
-{
- [self cancel];
-}
-
-- (void)didFinishLoading
-{
- NSData *data;
-
- id response = [self response];
- if ([response isKindOfClass:[NSHTTPURLResponse class]] && ([response statusCode] < 200 || [response statusCode] > 299))
- data = nil;
- else
- data = [self resourceData];
-
- if (data)
- [[WebIconDatabase sharedIconDatabase] _setIconData:data forIconURL:[[self URL] _web_originalDataAsString]];
- else
- [[WebIconDatabase sharedIconDatabase] _setHaveNoIconForIconURL:[[self URL] _web_originalDataAsString]];
-
- [frameLoader _iconLoaderReceivedPageIcon:[self URL]];
- [super didFinishLoading];
-}
-
-- (NSURLRequest *)willSendRequest:(NSURLRequest *)newRequest redirectResponse:(NSURLResponse *)redirectResponse;
-{
- ASSERT(!reachedTerminalState);
-
- // We now allow a WebIconLoader without an associated WebDataSource for kicking off a contextless icon load,
- // so we override this special case in WebIconLoader only. If we passed this through to the super class version,
- // it would pass back a nil Request so the icon wouldn't actually load because it is designed to be part of a page load
- if (!frameLoader)
- return newRequest;
- return [super willSendRequest:newRequest redirectResponse:redirectResponse];
-}
-
-// We don't ever want to prompt for authentication just for a site icon, so
-// override this WebBaseResourceDelegate method to refuse the challenge
-- (void)didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
-{
- [[challenge sender] cancelAuthenticationChallenge:challenge];
-}
-
-- (void)didCancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
-{
-}
-
-@end
- icon update notification
Uses:
- - WebIconLoader to cache icon images
- UI elements to retrieve icons that represent site URLs.
- Save icons to disk for later use.
userInfo:userInfo];
}
-- (void)loadIconFromURL:(NSString *)iconURL
-{
- [_private->databaseBridge loadIconFromURL:iconURL];
-}
-
@end
@implementation WebIconDatabase (WebInternal)
- (BOOL)_isEnabled;
-// Called by WebIconLoader after loading an icon.
-- (void)_setIconData:(NSData *)data forIconURL:(NSString *)iconURL;
-- (void)_setHaveNoIconForIconURL:(NSString *)iconURL;
-
// Called by WebDataSource to bind a web site URL to a icon URL and icon image.
- (void)_setIconURL:(NSString *)iconURL forURL:(NSString *)URL;
- (BOOL)_hasEntryForIconURL:(NSString *)iconURL;
- (void)_sendNotificationForURL:(NSString *)URL;
-- (void)loadIconFromURL:(NSString *)iconURL;
-
@end
- (void)notifyIconChanged:(NSURL*)iconURL
{
- ASSERT([[WebIconDatabase sharedIconDatabase] _isEnabled]);
- ASSERT(_frame == [[_frame webView] mainFrame]);
-
- [[_frame webView] _willChangeValueForKey:_WebMainFrameIconKey];
-
- NSImage *icon = [[WebIconDatabase sharedIconDatabase] iconForURL:[[[[_frame _frameLoader] activeDataSource] _URL] _web_originalDataAsString] withSize:WebIconSmallSize];
-
- [[[_frame webView] _frameLoadDelegateForwarder] webView:[_frame webView]
- didReceiveIcon:icon
- forFrame:_frame];
-
- [[_frame webView] _didChangeValueForKey:_WebMainFrameIconKey];
+ [[_frame _frameLoader] _notifyIconChanged:iconURL];
}
- (NSURL*)originalRequestURL
@interface WebIconDatabaseBridge : WebCoreIconDatabaseBridge <WebCoreIconDatabaseBridge>
{
- NSMutableDictionary* cachedLoaders;
}
@end
#import "WebIconDatabaseBridge.h"
#import "WebIconDatabasePrivate.h"
-#import "WebIconLoader.h"
#import <JavaScriptCore/Assertions.h>
@implementation WebIconDatabaseBridge
- (id)_init
{
self = [super init];
- if (!self)
- return nil;
- cachedLoaders = [[NSMutableDictionary alloc] init];
return self;
}
-- (void)loadIconFromURL:(NSString *)iconURL
-{
- if ([cachedLoaders valueForKey:iconURL])
- return;
-
- NSURL *url = [[NSURL alloc] initWithString:iconURL];
- NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:60];
- [url release];
-
- WebIconLoader *iconLoader = [[WebIconLoader alloc] initWithRequest:request];
-
- [iconLoader loadWithRequest:request];
- [cachedLoaders setValue:iconLoader forKey:iconURL];
- [iconLoader release];
- [request release];
-}
-
-- (void)releaseCachedLoaderForIconURL:(NSString*)iconURL
-{
- WebIconLoader *iconLoader = [cachedLoaders valueForKey:iconURL];
- if (iconLoader) {
- [iconLoader stopLoading];
- [cachedLoaders removeObjectForKey:iconURL];
- }
-}
-
// FIXME rdar://4668102 - This is a likely place to add an NSNotification here to notify the app of the updated icon
- (void)_setIconData:(NSData *)data forIconURL:(NSString *)iconURL
{
- [self releaseCachedLoaderForIconURL:iconURL];
[super _setIconData:data forIconURL:iconURL];
}
// FIXME rdar://4668102 - This is a likely place to add an NSNotification here to notify the app of the updated icon
- (void)_setHaveNoIconForIconURL:(NSString *)iconURL
{
- [self releaseCachedLoaderForIconURL:iconURL];
[super _setHaveNoIconForIconURL:iconURL];
}
.objc_class_name_WebHistory
.objc_class_name_WebHistoryItem
.objc_class_name_WebIconDatabase
-.objc_class_name_WebIconLoader
.objc_class_name_WebInspector
.objc_class_name_WebJavaScriptTextInputPanel
.objc_class_name_WebKeyGenerator
22E42A4F0A5B9F620003275B /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22E42A4E0A5B9F620003275B /* OpenGL.framework */; };
22E42A9A0A5BA4D00003275B /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22E42A990A5BA4D00003275B /* AGL.framework */; };
22F219CC08D236730030E078 /* WebBackForwardListPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 22F219CB08D236730030E078 /* WebBackForwardListPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 51700DAA0A9052A700DAAA8E /* WebIconLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 51700DA80A9052A700DAAA8E /* WebIconLoader.h */; };
- 51700DAB0A9052A700DAAA8E /* WebIconLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 51700DA90A9052A700DAAA8E /* WebIconLoader.m */; };
51E4D3990A886B5E00ECEE2C /* WebIconDatabaseBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E4D3970A886B5E00ECEE2C /* WebIconDatabaseBridge.h */; };
51E4D39A0A886B5E00ECEE2C /* WebIconDatabaseBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 51E4D3980A886B5E00ECEE2C /* WebIconDatabaseBridge.m */; };
650F74E409E488F70020118A /* WebUnarchivingState.h in Headers */ = {isa = PBXBuildFile; fileRef = 650F74E209E488F70020118A /* WebUnarchivingState.h */; };
515E27CF0458CA4B00CA2D3A /* WebDefaultUIDelegate.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebDefaultUIDelegate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
515E27D00458CA4B00CA2D3A /* WebDefaultUIDelegate.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebDefaultUIDelegate.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
516F296F03A6C45A00CA2D3A /* WebHistoryItemPrivate.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebHistoryItemPrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
- 51700DA80A9052A700DAAA8E /* WebIconLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebIconLoader.h; sourceTree = "<group>"; };
- 51700DA90A9052A700DAAA8E /* WebIconLoader.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = WebIconLoader.m; sourceTree = "<group>"; };
51863EFC065419EB00E9E8DD /* WebJavaPlugIn.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebJavaPlugIn.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
51A8B52E04282B5900CA2D3A /* WebFrameView.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebFrameView.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
51A8B52F04282B5900CA2D3A /* WebFrameView.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebFrameView.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
651A93860A83F883007FEDF0 /* WebDataProtocol.m */,
654B3C290A82C47200E1AE3D /* WebFrameLoader.h */,
654B3C2A0A82C47200E1AE3D /* WebFrameLoader.m */,
- 51700DA80A9052A700DAAA8E /* WebIconLoader.h */,
- 51700DA90A9052A700DAAA8E /* WebIconLoader.m */,
654B3C2B0A82C47200E1AE3D /* WebLoader.h */,
654B3C2C0A82C47200E1AE3D /* WebLoader.m */,
654B3C2D0A82C47200E1AE3D /* WebMainResourceLoader.h */,
654B3C3B0A82C47200E1AE3D /* WebSubresourceLoader.h in Headers */,
651A93870A83F883007FEDF0 /* WebDataProtocol.h in Headers */,
51E4D3990A886B5E00ECEE2C /* WebIconDatabaseBridge.h in Headers */,
- 51700DAA0A9052A700DAAA8E /* WebIconLoader.h in Headers */,
6538B1C80A90596D00A07522 /* WebFormDataStream.h in Headers */,
65A734610A923948001B57E8 /* WebPlugInStreamLoaderDelegate.h in Headers */,
659044280A9D3B4200E89459 /* WebDocumentLoadState.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 */,
);
654B3C3C0A82C47200E1AE3D /* WebSubresourceLoader.m in Sources */,
651A93880A83F883007FEDF0 /* WebDataProtocol.m in Sources */,
51E4D39A0A886B5E00ECEE2C /* WebIconDatabaseBridge.m in Sources */,
- 51700DAB0A9052A700DAAA8E /* WebIconLoader.m in Sources */,
6538B1C90A90596E00A07522 /* WebFormDataStream.m in Sources */,
659044290A9D3B4200E89459 /* WebDocumentLoadState.m in Sources */,
);
BOOL representationFinishedLoading;
BOOL defersCallbacks;
-
- NSURL *iconURL;
-
+
// The action that triggered loading of this data source -
// we keep this around for the benefit of the various policy
// handlers.
[pageTitle release];
[response release];
[mainDocumentError release];
- [iconURL release];
[triggeringAction release];
[lastCheckedRequest release];
[responses release];
_private->representationFinishedLoading = NO;
}
-- (void)_loadIcon
-{
-}
-
- (NSError *)_cancelledError
{
return [NSError _webKitErrorWithDomain:NSURLErrorDomain
// but not loads initiated by child frames' data sources -- that's the WebFrame's job.
- (void)_stopLoading
{
- // Always attempt to stop the icon loader because it may still be loading after the data source
+ // Always attempt to stop the bridge/part because it may still be loading/parsing after the data source
// is done loading and not stopping it can cause a world leak.
- [[_private->webFrame _frameLoader] stopLoadingIcon];
-
- // The same goes for the bridge/part, which may still be parsing.
if (_private->committed)
[[self _bridge] stopLoading];
_private->primaryLoadComplete = flag;
if (flag) {
- // FIXME: We could actually load it as soon as we've parsed
- // the HEAD section, or determined there isn't one - but
- // there's no callback for that.
- [self _loadIcon];
-
if ([[_private->webFrame _frameLoader] isLoadingMainResource]) {
[_private->loadState setMainResourceData:[[_private->webFrame _frameLoader] mainResourceData]];
[[_private->webFrame _frameLoader] releaseMainResourceLoader];
_private->overrideEncoding = copy;
}
-- (void)_setIconURL:(NSURL *)URL
-{
- // Lower priority than typed icon, so ignore this if we already have an iconURL.
- if (_private->iconURL == nil) {
- [_private->iconURL release];
- _private->iconURL = [URL retain];
- }
-}
-
-- (void)_setIconURL:(NSURL *)URL withType:(NSString *)iconType
-{
- // FIXME: Should check to make sure the type is one we know how to handle.
- [_private->iconURL release];
- _private->iconURL = [URL retain];
-}
-
- (NSString *)_overrideEncoding
{
return [[_private->overrideEncoding copy] autorelease];
@interface WebDataSource (WebInternal)
- (void)_setTitle:(NSString *)title;
- (NSString *)_overrideEncoding;
-- (void)_setIconURL:(NSURL *)URL;
-- (void)_setIconURL:(NSURL *)URL withType:(NSString *)iconType;
- (void)_setOverrideEncoding:(NSString *)overrideEncoding;
- (void)_addToUnarchiveState:(WebArchive *)archive;
- (NSURL *)_URLForHistory;