WebCore:
authorbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Nov 2006 19:24:52 +0000 (19:24 +0000)
committerbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Nov 2006 19:24:52 +0000 (19:24 +0000)
        Reviewed by Darin

        Took out WebIconDatabaseBridge and made WebKit call IconDatabase directly

        * WebCore.exp:
        * WebCore.xcodeproj/project.pbxproj:
        * bridge/mac/WebCoreIconDatabaseBridge.h: Removed.
        * bridge/mac/WebCoreIconDatabaseBridge.mm: Removed.
        * loader/FrameLoaderClient.h:
        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::sharedIconDatabase):
        (WebCore::IconDatabase::~IconDatabase):
        * loader/icon/IconDatabase.h:
        (WebCore::IconDatabase::isPrivateBrowsingEnabled):
        (WebCore::IconDatabase::enabled):
        * loader/icon/IconLoader.cpp:
        (WebCore::IconLoader::finishLoading):
        * loader/mac/FrameLoaderMac.mm:

WebKit:

        Reviewed by Darin

        Took out WebIconDatabaseBridge and made WebKit call IconDatabase directly

        * Misc/WebIconDatabase.m:
        (-[WebIconDatabase init]):
        (-[WebIconDatabase iconForURL:withSize:cache:]):
        (-[WebIconDatabase iconURLForURL:]):
        (-[WebIconDatabase defaultIconWithSize:]):
        (-[WebIconDatabase defaultIconForURL:withSize:]):
        (-[WebIconDatabase retainIconForURL:]):
        (-[WebIconDatabase releaseIconForURL:]):
        (-[WebIconDatabase setDelegate:]):
        (-[WebIconDatabase removeAllIcons]):
        (-[WebIconDatabase isIconExpiredForIconURL:]):
        (-[WebIconDatabase _isEnabled]):
        (-[WebIconDatabase _setIconData:forIconURL:]):
        (-[WebIconDatabase _setHaveNoIconForIconURL:]):
        (-[WebIconDatabase _setIconURL:forURL:]):
        (-[WebIconDatabase _hasEntryForIconURL:]):
        (-[WebIconDatabase _applicationWillTerminate:]):
        (-[WebIconDatabase _resetCachedWebPreferences:]):
        (-[WebIconDatabase _convertToWebCoreFormat]):
        (webGetNSImage):
        * Misc/WebIconDatabaseInternal.h: Added.
        * Misc/WebIconDatabasePrivate.h:
        * WebCoreSupport/WebFrameLoaderClient.h:
        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::dispatchDidReceiveIcon):
        * WebCoreSupport/WebIconDatabaseBridge.h: Removed.
        * WebCoreSupport/WebIconDatabaseBridge.m: Removed.
        * WebKit.xcodeproj/project.pbxproj:

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

18 files changed:
WebCore/ChangeLog
WebCore/WebCore.exp
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bridge/mac/WebCoreIconDatabaseBridge.h [deleted file]
WebCore/bridge/mac/WebCoreIconDatabaseBridge.mm [deleted file]
WebCore/loader/FrameLoaderClient.h
WebCore/loader/icon/IconDatabase.cpp
WebCore/loader/icon/IconDatabase.h
WebCore/loader/icon/IconLoader.cpp
WebCore/loader/mac/FrameLoaderMac.mm
WebKit/ChangeLog
WebKit/Misc/WebIconDatabase.m
WebKit/Misc/WebIconDatabaseInternal.h [moved from WebKit/WebCoreSupport/WebIconDatabaseBridge.h with 85% similarity]
WebKit/Misc/WebIconDatabasePrivate.h
WebKit/WebCoreSupport/WebFrameLoaderClient.h
WebKit/WebCoreSupport/WebFrameLoaderClient.mm
WebKit/WebCoreSupport/WebIconDatabaseBridge.m [deleted file]
WebKit/WebKit.xcodeproj/project.pbxproj

index 699199adf5c0095f4a8b5120cd1b9b04ef051576..2d0fc76d312bf18f2d316c8fd02bf4e3294881c6 100644 (file)
@@ -1,3 +1,24 @@
+2006-11-10  Brady Eidson  <beidson@apple.com>
+
+        Reviewed by Darin
+
+        Took out WebIconDatabaseBridge and made WebKit call IconDatabase directly
+
+        * WebCore.exp:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bridge/mac/WebCoreIconDatabaseBridge.h: Removed.
+        * bridge/mac/WebCoreIconDatabaseBridge.mm: Removed.
+        * loader/FrameLoaderClient.h:
+        * loader/icon/IconDatabase.cpp:
+        (WebCore::IconDatabase::sharedIconDatabase):
+        (WebCore::IconDatabase::~IconDatabase):
+        * loader/icon/IconDatabase.h:
+        (WebCore::IconDatabase::isPrivateBrowsingEnabled):
+        (WebCore::IconDatabase::enabled):
+        * loader/icon/IconLoader.cpp:
+        (WebCore::IconLoader::finishLoading):
+        * loader/mac/FrameLoaderMac.mm:
+
 2006-11-10  Zack Rusin  <zack@kde.org>
 
         Reviewed and landed by Anders.
index 365fd90677b058e43499c41caa3da7af74e4bdbd..a5df6eb9472049f2ac9bdb2b9eb162aca9866862 100644 (file)
 .objc_class_name_WebCoreEncodings
 .objc_class_name_WebCoreFrameBridge
 .objc_class_name_WebCoreHistory
-.objc_class_name_WebCoreIconDatabaseBridge
 .objc_class_name_WebCoreJavaScript
 .objc_class_name_WebCoreKeyGenerator
 .objc_class_name_WebCorePageState
@@ -165,6 +164,26 @@ __ZN7WebCore11RenderLayer18gAlignCenterAlwaysE
 __ZN7WebCore11selectRangeEPNS_19SelectionControllerEPNS_5RangeENS_9EAffinityEb
 __ZN7WebCore11toUserSpaceERK7_NSRectP8NSWindow
 __ZN7WebCore12AtomicString3addEPNS_10StringImplE
+__ZN7WebCore12IconDatabase10setEnabledEb
+__ZN7WebCore12IconDatabase10setEnabledEb
+__ZN7WebCore12IconDatabase11defaultIconERKNS_7IntSizeE
+__ZN7WebCore12IconDatabase14iconForPageURLERKNS_6StringERKNS_7IntSizeEb
+__ZN7WebCore12IconDatabase14removeAllIconsEv
+__ZN7WebCore12IconDatabase17iconURLForPageURLERKNS_6StringE
+__ZN7WebCore12IconDatabase18hasEntryForIconURLERKNS_6StringE
+__ZN7WebCore12IconDatabase18sharedIconDatabaseEv
+__ZN7WebCore12IconDatabase18sharedIconDatabaseEv
+__ZN7WebCore12IconDatabase20retainIconForPageURLERKNS_6StringE
+__ZN7WebCore12IconDatabase20setIconURLForPageURLERKNS_6StringES3_
+__ZN7WebCore12IconDatabase21releaseIconForPageURLERKNS_6StringE
+__ZN7WebCore12IconDatabase21setIconDataForIconURLEPKviRKNS_6StringE
+__ZN7WebCore12IconDatabase23defaultDatabaseFilenameEv
+__ZN7WebCore12IconDatabase23isIconExpiredForIconURLERKNS_6StringE
+__ZN7WebCore12IconDatabase23setHaveNoIconForIconURLERKNS_6StringE
+__ZN7WebCore12IconDatabase25setPrivateBrowsingEnabledEb
+__ZN7WebCore12IconDatabase4openERKNS_6StringE
+__ZN7WebCore12IconDatabase5closeEv
+__ZN7WebCore12IconDatabase7isEmptyEv
 __ZN7WebCore12nsURLRequestERKNS_15ResourceRequestE
 __ZN7WebCore13HitTestResultC1ERKNS_8IntPointE
 __ZN7WebCore13HitTestResultC1ERKS0_
@@ -232,6 +251,7 @@ __ZN7WebCore6Editor7outdentEv
 __ZN7WebCore6StringC1EP8NSString
 __ZN7WebCore6StringC1EPKc
 __ZN7WebCore6StringC1ERKNS_16DeprecatedStringE
+__ZN7WebCore7IntSizeC1ERK7_NSSize
 __ZN7WebCore7nsColorERKNS_5ColorE
 __ZN7WebCore8Document11completeURLERKNS_16DeprecatedStringE
 __ZN7WebCore8Document12setFocusNodeEN3WTF10PassRefPtrINS_4NodeEEE
@@ -304,6 +324,7 @@ __ZNK7WebCore11FrameLoader16outgoingReferrerEv
 __ZNK7WebCore11FrameLoader20activeDocumentLoaderEv
 __ZNK7WebCore11FrameLoader21isQuickRedirectComingEv
 __ZNK7WebCore11FrameLoader27numPendingOrLoadingRequestsEb
+__ZNK7WebCore11FrameLoader3urlEv
 __ZNK7WebCore11FrameLoader6clientEv
 __ZNK7WebCore11FrameLoader8loadTypeEv
 __ZNK7WebCore11FrameLoader8referrerEv
index fa7ded4cd9374b2e2ad2be630ef834df104e4cdc..193849113d51f5a5cb819f650a31b248fe77fd89 100644 (file)
                5115095C0A9CE04700901013 /* urlIcon.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 5115095B0A9CE04600901013 /* urlIcon.tiff */; };
                5126E6BB0A2E3B12005C29FA /* IconDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5126E6B90A2E3B12005C29FA /* IconDatabase.cpp */; };
                5126E6BC0A2E3B12005C29FA /* IconDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 5126E6BA0A2E3B12005C29FA /* IconDatabase.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               5126E6BF0A2E3B29005C29FA /* WebCoreIconDatabaseBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 5126E6BD0A2E3B29005C29FA /* WebCoreIconDatabaseBridge.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               5126E6C00A2E3B29005C29FA /* WebCoreIconDatabaseBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5126E6BE0A2E3B29005C29FA /* WebCoreIconDatabaseBridge.mm */; };
                51386EE70AB4F0D5004AF79E /* IntSizeHash.h in Headers */ = {isa = PBXBuildFile; fileRef = 51386EE60AB4F0D5004AF79E /* IntSizeHash.h */; };
                513F14530AB634C400094DDF /* IconLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 513F14510AB634C400094DDF /* IconLoader.cpp */; };
                513F14540AB634C400094DDF /* IconLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 513F14520AB634C400094DDF /* IconLoader.h */; };
                5186C0560A9C21470034FE94 /* IconDataCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5186C0550A9C21470034FE94 /* IconDataCache.cpp */; };
                51D3EA160A3D24D300BADA35 /* SQLDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D3EA130A3D24D300BADA35 /* SQLDatabase.cpp */; };
-               51D3EA170A3D24D300BADA35 /* SQLDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D3EA140A3D24D300BADA35 /* SQLDatabase.h */; };
+               51D3EA170A3D24D300BADA35 /* SQLDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D3EA140A3D24D300BADA35 /* SQLDatabase.h */; settings = {ATTRIBUTES = (Private, ); }; };
                51D3EA180A3D24D300BADA35 /* SQLStatement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D3EA150A3D24D300BADA35 /* SQLStatement.cpp */; };
                51F11E150A48C2920034A24E /* SQLTransaction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F11E140A48C2920034A24E /* SQLTransaction.cpp */; };
                550A0BC9085F6039007353D6 /* QualifiedName.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 550A0BC7085F6039007353D6 /* QualifiedName.cpp */; };
                5115095B0A9CE04600901013 /* urlIcon.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = urlIcon.tiff; sourceTree = "<group>"; };
                5126E6B90A2E3B12005C29FA /* IconDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IconDatabase.cpp; sourceTree = "<group>"; };
                5126E6BA0A2E3B12005C29FA /* IconDatabase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IconDatabase.h; sourceTree = "<group>"; };
-               5126E6BD0A2E3B29005C29FA /* WebCoreIconDatabaseBridge.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebCoreIconDatabaseBridge.h; sourceTree = "<group>"; };
-               5126E6BE0A2E3B29005C29FA /* WebCoreIconDatabaseBridge.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreIconDatabaseBridge.mm; sourceTree = "<group>"; };
                51386EE60AB4F0D5004AF79E /* IntSizeHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IntSizeHash.h; sourceTree = "<group>"; };
                513F14510AB634C400094DDF /* IconLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IconLoader.cpp; sourceTree = "<group>"; };
                513F14520AB634C400094DDF /* IconLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IconLoader.h; sourceTree = "<group>"; };
                                654EC60F097778F500DAB52C /* WebCoreFrameBridge.h */,
                                654EC610097778F500DAB52C /* WebCoreFrameBridge.mm */,
                                F587854C02DE375901EA4122 /* WebCoreFrameView.h */,
-                               5126E6BD0A2E3B29005C29FA /* WebCoreIconDatabaseBridge.h */,
-                               5126E6BE0A2E3B29005C29FA /* WebCoreIconDatabaseBridge.mm */,
                                F5B2A52B02E22573018635CB /* WebCoreJavaScript.h */,
                                F5B2A52C02E22573018635CB /* WebCoreJavaScript.mm */,
                                BE983D95052A2E0A00892D85 /* WebCoreKeyboardAccess.h */,
                                DD7CDF250A23CF9800069928 /* CSSUnknownRule.h in Headers */,
                                A833C80D0A2CF25600D57664 /* XMLNames.h in Headers */,
                                5126E6BC0A2E3B12005C29FA /* IconDatabase.h in Headers */,
-                               5126E6BF0A2E3B29005C29FA /* WebCoreIconDatabaseBridge.h in Headers */,
                                D07DEABA0A36554A00CA30F8 /* InsertListCommand.h in Headers */,
                                4E1959220A39DABA00220FE5 /* MediaFeatureNames.h in Headers */,
                                4E19592A0A39DACC00220FE5 /* MediaQuery.h in Headers */,
                                A833C80C0A2CF25600D57664 /* XMLNames.cpp in Sources */,
                                A833C8520A2CF52800D57664 /* SVGElementFactory.cpp in Sources */,
                                5126E6BB0A2E3B12005C29FA /* IconDatabase.cpp in Sources */,
-                               5126E6C00A2E3B29005C29FA /* WebCoreIconDatabaseBridge.mm in Sources */,
                                D07DEAB90A36554A00CA30F8 /* InsertListCommand.cpp in Sources */,
                                4E1959210A39DABA00220FE5 /* MediaFeatureNames.cpp in Sources */,
                                4E1959290A39DACC00220FE5 /* MediaQuery.cpp in Sources */,
diff --git a/WebCore/bridge/mac/WebCoreIconDatabaseBridge.h b/WebCore/bridge/mac/WebCoreIconDatabaseBridge.h
deleted file mode 100644 (file)
index ac9305d..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2006 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``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 COMPUTER, INC. OR
- * 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. 
- */
-
-#ifdef __cplusplus
-namespace WebCore { 
-    class IconDatabase; 
-}
-typedef WebCore::IconDatabase WebCoreIconDatabase;
-#else
-@class WebCoreIconDatabase;
-#endif
-
-@interface WebCoreIconDatabaseBridge : NSObject 
-{
-}
-+ (WebCoreIconDatabaseBridge *)sharedInstance;
-
-- (BOOL)openSharedDatabaseWithPath:(NSString *)path;
-- (void)closeSharedDatabase;
-- (BOOL)isOpen;
-- (void)removeAllIcons;
-
-- (NSImage *)iconForPageURL:(NSString *)url withSize:(NSSize)size;
-- (NSString *)iconURLForPageURL:(NSString *)url;
-- (NSImage *)defaultIconWithSize:(NSSize)size;
-- (void)retainIconForURL:(NSString *)url;
-- (void)releaseIconForURL:(NSString *)url;
-
-- (BOOL)isIconExpiredForIconURL:(NSString *)iconURL;
-
-- (void)setPrivateBrowsingEnabled:(BOOL)flag;
-- (BOOL)privateBrowsingEnabled;
-
-- (NSString *)defaultDatabaseFilename;
-
-- (void)_setIconData:(NSData *)data forIconURL:(NSString *)iconURL;
-- (void)_setHaveNoIconForIconURL:(NSString *)iconURL;
-- (BOOL)_setIconURL:(NSString *)iconURL forPageURL:(NSString *)pageURL;
-- (BOOL)_hasEntryForIconURL:(NSString *)iconURL;
-
-- (BOOL)_isEmpty;
-- (void)_setEnabled:(BOOL)enabled;
-- (BOOL)_isEnabled;
-@end
-
-// The WebCoreIconDatabaseBridge protocol contains methods for use by the WebCore side of the bridge.
-
-@protocol WebCoreIconDatabaseBridge
-+ (WebCoreIconDatabaseBridge *)createInstance;
-@end
-
-// This interface definition allows those who hold a WebCoreIconDatabaseBridge * to call all the methods
-// in the WebCoreIconDatabaseBridge protocol without requiring the base implementation to supply the methods.
-// This idiom is appropriate because WebCoreIconDatabaseBridge is an abstract class.
-
-@interface WebCoreIconDatabaseBridge (SubclassResponsibility) <WebCoreIconDatabaseBridge>
-@end
diff --git a/WebCore/bridge/mac/WebCoreIconDatabaseBridge.mm b/WebCore/bridge/mac/WebCoreIconDatabaseBridge.mm
deleted file mode 100644 (file)
index 5f6c260..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Copyright (C) 2006 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``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 COMPUTER, INC. OR
- * 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 "config.h"
-#import "WebCoreIconDatabaseBridge.h"
-
-#import "IconDatabase.h"
-#import "Image.h"
-#import "Logging.h"
-#import "PlatformString.h"
-#import "RetainPtr.h"
-
-using namespace WebCore;
-
-@implementation WebCoreIconDatabaseBridge
-
-- (BOOL)openSharedDatabaseWithPath:(NSString *)path
-{
-    ASSERT(path);
-    
-    IconDatabase* iconDB = IconDatabase::sharedIconDatabase();
-    
-    iconDB->open((String([path stringByStandardizingPath])));
-    if (!iconDB->isOpen()) {
-        [self closeSharedDatabase];
-        NSLog(@"Unable to open icon database at %@ - Check your write permissions at that path.  Icon database will be disabled for this browsing session", path);
-        return NO;
-    }
-    return YES;
-}
-
-- (void)closeSharedDatabase
-{
-    IconDatabase::sharedIconDatabase()->close();
-}
-
-- (BOOL)isOpen
-{
-    return IconDatabase::sharedIconDatabase()->isOpen();
-}
-
-- (void)removeAllIcons
-{
-    IconDatabase::sharedIconDatabase()->removeAllIcons();
-}
-
-- (BOOL)_isEmpty
-{
-    return IconDatabase::sharedIconDatabase()->isEmpty();
-}
-
-- (BOOL)isIconExpiredForIconURL:(NSString *)iconURL
-{
-    return IconDatabase::sharedIconDatabase()->isIconExpiredForIconURL(iconURL);
-}
-
-- (void)setPrivateBrowsingEnabled:(BOOL)flag
-{
-    IconDatabase::sharedIconDatabase()->setPrivateBrowsingEnabled(flag);
-}
-
-- (BOOL)privateBrowsingEnabled
-{
-    return IconDatabase::sharedIconDatabase()->getPrivateBrowsingEnabled();
-}
-
-- (NSImage *)iconForPageURL:(NSString *)url withSize:(NSSize)size
-{
-    ASSERT(url);
-    ASSERT(size.width);
-    ASSERT(size.height);
-
-    // FIXME - We're doing the resize here for now because WebCore::Image doesn't yet support resizing/multiple representations
-    // This makes it so there's effectively only one size of a particular icon in the system at a time.  We really need to move this
-    // to WebCore::Image and WebCore::IconDatabase asap
-    Image* image = IconDatabase::sharedIconDatabase()->iconForPageURL(String(url), IntSize(size));
-    if (image) {
-        NSImage* nsImage = image->getNSImage();
-        if (!nsImage) {
-            LOG(IconDatabase, "image didn't return a valid NSImage for URL %@", url);
-            return nil;
-        }
-        LOG(IconDatabase, "Found %i representations in the NSImage", [[nsImage representations] count]);
-        
-        if (!NSEqualSizes([nsImage size], size)) {
-            [nsImage setScalesWhenResized:YES];
-            [nsImage setSize:size];
-        }
-        return nsImage;
-    }
-    return nil;
-}
-
-- (NSString *)iconURLForPageURL:(NSString *)url
-{
-    ASSERT(url);
-    
-    String iconURL = IconDatabase::sharedIconDatabase()->iconURLForPageURL(String(url));
-    return (NSString*)iconURL;
-}
-
-- (NSImage *)defaultIconWithSize:(NSSize)size
-{
-    ASSERT(size.width);
-    ASSERT(size.height);
-    
-    Image* image = IconDatabase::sharedIconDatabase()->defaultIcon(IntSize(size));
-    if (image)
-        return image->getNSImage();
-    return nil;
-}
-
-- (void)retainIconForURL:(NSString *)url
-{
-    ASSERT(url);
-    
-    IconDatabase::sharedIconDatabase()->retainIconForPageURL(String(url));
-}
-
-- (void)releaseIconForURL:(NSString *)url
-{
-    ASSERT(url);
-    
-    IconDatabase::sharedIconDatabase()->releaseIconForPageURL(String(url));
-}
-
-- (void)_setIconData:(NSData *)data forIconURL:(NSString *)iconURL
-{
-    ASSERT(data);
-    ASSERT(iconURL);
-    
-    IconDatabase::sharedIconDatabase()->setIconDataForIconURL([data bytes], [data length], String(iconURL));
-}
-
-- (void)_setHaveNoIconForIconURL:(NSString *)iconURL
-{
-    ASSERT(iconURL);
-    
-    IconDatabase::sharedIconDatabase()->setHaveNoIconForIconURL(String(iconURL));
-}
-
-- (BOOL)_setIconURL:(NSString *)iconURL forPageURL:(NSString *)pageURL
-{
-    ASSERT(iconURL);
-    ASSERT(pageURL);
-    
-    return IconDatabase::sharedIconDatabase()->setIconURLForPageURL(String(iconURL), String(pageURL));
-}
-
-- (BOOL)_hasEntryForIconURL:(NSString *)iconURL
-{    
-    return IconDatabase::sharedIconDatabase()->hasEntryForIconURL(iconURL);
-}
-
-- (NSString *)defaultDatabaseFilename
-{
-    return IconDatabase::defaultDatabaseFilename();
-}
-
-- (void)_setEnabled:(BOOL)enabled
-{
-    IconDatabase::sharedIconDatabase()->setEnabled(enabled);
-}
-
-- (BOOL)_isEnabled
-{
-    return IconDatabase::sharedIconDatabase()->enabled();
-}
-
-+ (WebCoreIconDatabaseBridge *)sharedInstance
-{
-    static RetainPtr<WebCoreIconDatabaseBridge> bridge;
-    if (!bridge)
-        bridge = [self createInstance];
-    return bridge.get();
-}
-
-@end
index 011d74b34e85a662d8854ebd173deac29d4bfc11..d0b0a2bc6647f15852c8bd4d0c1d617b7e5ac36b 100644 (file)
@@ -125,9 +125,7 @@ namespace WebCore {
         virtual void dispatchWillPerformClientRedirect(const KURL&, double interval, double fireDate) = 0;
         virtual void dispatchDidChangeLocationWithinPage() = 0;
         virtual void dispatchWillClose() = 0;
-#if PLATFORM(MAC)
-        virtual void dispatchDidReceiveIcon(NSImage *) = 0;
-#endif
+        virtual void dispatchDidReceiveIcon() = 0;
         virtual void dispatchDidStartProvisionalLoad() = 0;
         virtual void dispatchDidReceiveTitle(const String& title) = 0;
         virtual void dispatchDidCommitLoad() = 0;
index 3754e5c38516f4ce079e1f8155d544a82917845c..1e24d0d3e858739fd32f6573e1e97b629a54a95b 100644 (file)
@@ -30,7 +30,6 @@
 #include "IconDataCache.h"
 #include "Image.h"
 #include "Logging.h"
-#include "PlatformString.h"
 #include "SQLStatement.h"
 #include "SQLTransaction.h"
 #include "SystemTime.h"
 
 namespace WebCore {
 
-IconDatabase* IconDatabase::m_sharedInstance = 0;
+static IconDatabase* sharedInstance = 0;
 
 // This version number is in the DB and marks the current generation of the schema
 // Theoretically once the switch is flipped this should never change
 // Currently, an out-of-date schema causes the DB to be wiped and reset.  This isn't 
 // so bad during development but in the future, we would need to write a conversion
 // function to advance older released schemas to "current"
-const int IconDatabase::currentDatabaseVersion = 5;
+const int currentDatabaseVersion = 5;
 
 // Icons expire once a day
-const int IconDatabase::iconExpirationTime = 60*60*24; 
+const int iconExpirationTime = 60*60*24; 
 // Absent icons are rechecked once a week
-const int IconDatabase::missingIconExpirationTime = 60*60*24*7; 
+const int missingIconExpirationTime = 60*60*24*7; 
 
-const int IconDatabase::updateTimerDelay = 5; 
+const int updateTimerDelay = 5; 
 
 const String& IconDatabase::defaultDatabaseFilename()
 {
@@ -68,10 +67,9 @@ const String& IconDatabase::defaultDatabaseFilename()
 
 IconDatabase* IconDatabase::sharedIconDatabase()
 {
-    if (!m_sharedInstance)
-        m_sharedInstance = new IconDatabase();
-        
-    return m_sharedInstance;
+    if (!sharedInstance)
+        sharedInstance = new IconDatabase;
+    return sharedInstance;
 }
 
 IconDatabase::IconDatabase()
@@ -920,8 +918,8 @@ IconDatabase::~IconDatabase()
     close();
     m_startupTimer.stop();
     m_updateTimer.stop();
-    if (m_sharedInstance == this)
-        m_sharedInstance = 0;
+    if (sharedInstance == this)
+        sharedInstance = 0;
 }
 
 // readySQLStatement() handles two things
@@ -1078,4 +1076,4 @@ bool IconDatabase::hasIconForIconURLQuery(SQLDatabase& db, const String& iconURL
     return result == SQLResultRow;
 }
 
-} //namespace WebCore
+} // namespace WebCore
index 02684973d46b00a20f8817886837253a4fecfcd0..387ffca8de9bef9ade7ee90d9f2a6d81312bddb7 100644 (file)
 #ifndef ICONDATABASE_H
 #define ICONDATABASE_H
 
-#include "config.h"
-
-#include "IntSize.h"
-#include "IntSizeHash.h"
-#include "PlatformString.h"
 #include "SQLDatabase.h"
 #include "StringHash.h"
 #include "Timer.h"
-
-
+#include <wtf/Noncopyable.h>
+#include <wtf/HashMap.h>
+#include <wtf/HashSet.h>
 
 namespace WebCore { 
 
 class Image;
+class IntSize;
 class IconDataCache;
 class SQLTransaction;
-class SQLStatement;
 
-class IconDatabase
-{
+class IconDatabase : Noncopyable {
 public:
     static IconDatabase* sharedIconDatabase();
-    ~IconDatabase();
 
     bool open(const String& path);
     bool isOpen() { return m_mainDB.isOpen() && m_privateBrowsingDB.isOpen(); }
@@ -67,7 +61,7 @@ public:
     void releaseIconForPageURL(const String&);
     
     void setPrivateBrowsingEnabled(bool flag);
-    bool getPrivateBrowsingEnabled() { return m_privateBrowsingEnabled; }
+    bool isPrivateBrowsingEnabled() const { return m_privateBrowsingEnabled; }
 
     bool hasEntryForIconURL(const String&);
 
@@ -80,17 +74,14 @@ public:
     bool setIconURLForPageURL(const String& iconURL, const String& pageURL);
     
     void setEnabled(bool enabled);
-    bool enabled() { return m_isEnabled; }
+    bool enabled() const { return m_isEnabled; }
 
     static const String& defaultDatabaseFilename();
     
-    static const int currentDatabaseVersion;    
-    static const int iconExpirationTime;
-    static const int missingIconExpirationTime;
-    static const int updateTimerDelay;
 private:
     IconDatabase();
-    
+    ~IconDatabase();
+
     // This tries to get the iconID for the IconURL and, if it doesn't exist and createIfNecessary is true,
     // it will create the entry and return the new iconID
     int64_t establishIconIDForIconURL(SQLDatabase&, const String&, bool createIfNecessary = true);
@@ -143,45 +134,38 @@ private:
     
     // Query - Returns the time stamp for an Icon entry
     int timeStampForIconURLQuery(SQLDatabase&, const String& iconURL);    
-    SQLStatement *m_timeStampForIconURLStatement;
+    SQLStatementm_timeStampForIconURLStatement;
     
     // Query - Returns the IconURL for a PageURL
     String iconURLForPageURLQuery(SQLDatabase&, const String& pageURL);    
-    SQLStatement *m_iconURLForPageURLStatement;
+    SQLStatementm_iconURLForPageURLStatement;
     
     // Query - Checks for the existence of the given IconURL in the Icon table
     bool hasIconForIconURLQuery(SQLDatabase& db, const String& iconURL);
-    SQLStatement *m_hasIconForIconURLStatement;
+    SQLStatementm_hasIconForIconURLStatement;
     
     // Query - Deletes a PageURL from the PageURL table
     void forgetPageURLQuery(SQLDatabase& db, const String& pageURL);
-    SQLStatement *m_forgetPageURLStatement;
+    SQLStatementm_forgetPageURLStatement;
     
     // Query - Sets the Icon.iconID for a PageURL in the PageURL table
     void setIconIDForPageURLQuery(SQLDatabase& db, int64_t, const String&);
-    SQLStatement *m_setIconIDForPageURLStatement;
+    SQLStatementm_setIconIDForPageURLStatement;
     
     // Query - Returns the iconID for the given IconURL
     int64_t getIconIDForIconURLQuery(SQLDatabase& db, const String& iconURL);
-    SQLStatement *m_getIconIDForIconURLStatement;
+    SQLStatementm_getIconIDForIconURLStatement;
     
     // Query - Creates the Icon entry for the given IconURL and returns the resulting iconID
     int64_t addIconForIconURLQuery(SQLDatabase& db, const String& iconURL);
-    SQLStatement *m_addIconForIconURLStatement;
+    SQLStatementm_addIconForIconURLStatement;
     
     // Query - Returns the image data from the given database for the given IconURL
     void imageDataForIconURLQuery(SQLDatabase& db, const String& iconURL, Vector<unsigned char>& result);
-    SQLStatement *m_imageDataForIconURLStatement;
+    SQLStatementm_imageDataForIconURLStatement;
 
     void deleteAllPreparedStatements(bool withSync);
 
-    // 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&);
-    
-    static IconDatabase* m_sharedInstance;
-        
     SQLDatabase m_mainDB;
     SQLDatabase m_privateBrowsingDB;
     SQLDatabase* m_currentDB;
index b7858967997556c1a607f38b2a75ed8e35b55770..53aad06385f9c29b0f5e2c52abcfa082c0c0e0f7 100644 (file)
@@ -29,6 +29,7 @@
 #include "Document.h"
 #include "Frame.h"
 #include "FrameLoader.h"
+#include "FrameLoaderClient.h"
 #include "IconDatabase.h"
 #include "Logging.h"
 #include "ResourceHandle.h"
@@ -133,15 +134,8 @@ void IconLoader::didFinishLoading(ResourceHandle* handle)
 void IconLoader::finishLoading(const KURL& iconURL)
 {
     IconDatabase::sharedIconDatabase()->setIconDataForIconURL(m_buffer.data(), m_buffer.size(), iconURL.url());
-
-    // Tell the frame to map its URL(s) to its iconURL in the database.
     m_frame->loader()->commitIconURLToIconDatabase(iconURL);
-
-    // Send the notification to the app that this icon is finished loading.
-#if PLATFORM(MAC) // turn this on for other platforms when FrameLoader is deployed more fully
-    m_frame->loader()->notifyIconChanged();
-#endif
-
+    m_frame->loader()->client()->dispatchDidReceiveIcon();
     clearLoadingState();
 }
 
index 42f2a2f989786f09274c9bb139e1f4f35db24988..d11c60dd5f2effc14245e7dea8aceeae8e33204c 100644 (file)
@@ -47,6 +47,7 @@
 #import "HTMLFormElement.h"
 #import "HTMLFrameElement.h"
 #import "HTMLNames.h"
+#import "IconDatabase.h"
 #import "LoaderNSURLExtras.h"
 #import "LoaderNSURLRequestExtras.h"
 #import "MainResourceLoader.h"
@@ -60,7 +61,6 @@
 #import "SystemTime.h"
 #import "TextResourceDecoder.h"
 #import "WebCoreFrameBridge.h"
-#import "WebCoreIconDatabaseBridge.h"
 #import "WebCorePageState.h"
 #import "WebCoreSystemInterface.h"
 #import "WebDataProtocol.h"
@@ -570,15 +570,6 @@ void FrameLoader::mainReceivedError(NSError *error, bool isComplete)
     activeDocumentLoader()->mainReceivedError(error, isComplete);
 }
 
-void FrameLoader::notifyIconChanged()
-{
-    ASSERT([[WebCoreIconDatabaseBridge sharedInstance] _isEnabled]);
-    NSImage *icon = [[WebCoreIconDatabaseBridge sharedInstance]
-        iconForPageURL:urlOriginalDataAsString(activeDocumentLoader()->URL().getNSURL())
-        withSize:NSMakeSize(16, 16)];
-    m_client->dispatchDidReceiveIcon(icon);
-}
-
 NSError *FrameLoader::cancelledError(NSURLRequest *request) const
 {
     return m_client->cancelledError(request);
index 4b6355fdcd35c67bac8055e9bdabee5d145dc2c7..7702a797814560a52482b1b6858985426d8161f3 100644 (file)
@@ -1,3 +1,38 @@
+2006-11-10  Brady Eidson  <beidson@apple.com>
+
+        Reviewed by Darin
+  
+        Took out WebIconDatabaseBridge and made WebKit call IconDatabase directly
+
+        * Misc/WebIconDatabase.m:
+        (-[WebIconDatabase init]):
+        (-[WebIconDatabase iconForURL:withSize:cache:]):
+        (-[WebIconDatabase iconURLForURL:]):
+        (-[WebIconDatabase defaultIconWithSize:]):
+        (-[WebIconDatabase defaultIconForURL:withSize:]):
+        (-[WebIconDatabase retainIconForURL:]):
+        (-[WebIconDatabase releaseIconForURL:]):
+        (-[WebIconDatabase setDelegate:]):
+        (-[WebIconDatabase removeAllIcons]):
+        (-[WebIconDatabase isIconExpiredForIconURL:]):
+        (-[WebIconDatabase _isEnabled]):
+        (-[WebIconDatabase _setIconData:forIconURL:]):
+        (-[WebIconDatabase _setHaveNoIconForIconURL:]):
+        (-[WebIconDatabase _setIconURL:forURL:]):
+        (-[WebIconDatabase _hasEntryForIconURL:]):
+        (-[WebIconDatabase _applicationWillTerminate:]):
+        (-[WebIconDatabase _resetCachedWebPreferences:]):
+        (-[WebIconDatabase _convertToWebCoreFormat]):
+        (webGetNSImage):
+        * Misc/WebIconDatabaseInternal.h: Added.
+        * Misc/WebIconDatabasePrivate.h:
+        * WebCoreSupport/WebFrameLoaderClient.h:
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+        (WebFrameLoaderClient::dispatchDidReceiveIcon):
+        * WebCoreSupport/WebIconDatabaseBridge.h: Removed.
+        * WebCoreSupport/WebIconDatabaseBridge.m: Removed.
+        * WebKit.xcodeproj/project.pbxproj:
+
 2006-11-09  Oliver Hunt  <oliver@apple.com>
 
         Reviewed by Brady.
index 8fbd9e6508857ee1925756ef10cf99525498b07e..0c6aaae1b190d3c10ed422410524f234202f3617 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2005, 2006 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
  * (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/WebIconDatabase.h>
 
-#import "WebIconDatabaseDelegate.h"
-#import <WebKit/WebIconDatabasePrivate.h>
-#import <WebKit/WebKitLogging.h>
-#import <WebKit/WebKitNSStringExtras.h>
-#import <WebKit/WebNSURLExtras.h>
-#import <WebKit/WebPreferences.h>
-
-#import <WebKit/WebIconDatabaseBridge.h>
+#import "WebIconDatabaseInternal.h"
 
+#import "WebIconDatabaseDelegate.h"
+#import "WebKitLogging.h"
+#import "WebKitNSStringExtras.h"
+#import "WebNSURLExtras.h"
+#import "WebPreferences.h"
 #import "WebTypesInternal.h"
+#import <WebCore/IconDatabase.h>
+#import <WebCore/Image.h>
+#import <WebCore/IntSize.h>
+
+using namespace WebCore;
 
 NSString * const WebIconDatabaseVersionKey =    @"WebIconDatabaseVersion";
 NSString * const WebURLToIconURLKey =           @"WebSiteURLToIconURLKey";
@@ -82,13 +84,6 @@ NSSize WebIconLargeSize = {128, 128};
     
     _private = [[WebIconDatabasePrivate alloc] init];
     
-    // Get/create the shared database bridge - bail if we fail
-    _private->databaseBridge = [WebIconDatabaseBridge sharedInstance];
-    if (!_private->databaseBridge) {
-        LOG_ERROR("Unable to create IconDatabaseBridge");
-        return self;
-    }
-    
     // Check the user defaults and see if the icon database should even be enabled.
     // Inform the bridge and, if we're disabled, bail from init right here
     NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
@@ -97,7 +92,7 @@ NSSize WebIconLargeSize = {128, 128};
     [defaults registerDefaults:initialDefaults];
     [initialDefaults release];
     BOOL enabled = [defaults boolForKey:WebIconDatabaseEnabledDefaultsKey];
-    [_private->databaseBridge _setEnabled:enabled];
+    IconDatabase::sharedIconDatabase()->setEnabled(enabled);
     if (!enabled)
         return self;
     
@@ -107,16 +102,16 @@ NSSize WebIconLargeSize = {128, 128};
         databaseDirectory = WebIconDatabasePath;
         [defaults setObject:databaseDirectory forKey:WebIconDatabaseDirectoryDefaultsKey];
     }
-    databaseDirectory = [databaseDirectory stringByExpandingTildeInPath];
+    databaseDirectory = [[databaseDirectory stringByExpandingTildeInPath] stringByStandardizingPath];
     
     // Open the WebCore icon database and convert the old WebKit icon database if we haven't done the initial conversion yet
-    if (![_private->databaseBridge openSharedDatabaseWithPath:databaseDirectory])
-        LOG_ERROR("Unable to open IconDatabaseBridge");
+    if (!IconDatabase::sharedIconDatabase()->open(databaseDirectory))
+        LOG_ERROR("Unable to open icon database");
     else
         if ([self _isEnabled])
             [self _convertToWebCoreFormat];
 
-    [_private->databaseBridge setPrivateBrowsingEnabled:[[WebPreferences standardPreferences] privateBrowsingEnabled]];
+    IconDatabase::sharedIconDatabase()->setPrivateBrowsingEnabled([[WebPreferences standardPreferences] privateBrowsingEnabled]);
     
     // Register for important notifications
     [[NSNotificationCenter defaultCenter] addObserver:self
@@ -142,9 +137,9 @@ NSSize WebIconLargeSize = {128, 128};
     if ([URL _webkit_isFileURL])
         return [self _iconForFileURL:URL withSize:size];
       
-    NSImage* image = [_private->databaseBridge iconForPageURL:URL withSize:size];
-    if (image)
-        return image;
+    if (Image* image = IconDatabase::sharedIconDatabase()->iconForPageURL(URL, IntSize(size)))
+        if (NSImage *icon = webGetNSImage(image, size))
+            return icon;
     return [self defaultIconForURL:URL withSize:size];
 }
 
@@ -158,8 +153,7 @@ NSSize WebIconLargeSize = {128, 128};
     if (![self _isEnabled])
         return nil;
         
-    NSString* iconurl = [_private->databaseBridge iconURLForPageURL:URL];
-    return iconurl;
+    return IconDatabase::sharedIconDatabase()->iconURLForPageURL(URL);
 }
 
 - (NSImage *)defaultIconWithSize:(NSSize)size
@@ -167,14 +161,15 @@ NSSize WebIconLargeSize = {128, 128};
     ASSERT(size.width);
     ASSERT(size.height);
     
-    return [_private->databaseBridge defaultIconWithSize:size];
+    Image* image = IconDatabase::sharedIconDatabase()->defaultIcon(IntSize(size));
+    return image ? image->getNSImage() : nil;
 }
 
 - (NSImage *)defaultIconForURL:(NSString *)URL withSize:(NSSize)size
 {
-    if (_private->delegateDefaultIconForURL)
+    if (_private->delegateImplementsDefaultIconForURL)
         return [_private->delegate webIconDatabase:self defaultIconForURL:URL withSize:size];
-    return [_private->databaseBridge defaultIconWithSize:size];
+    return [self defaultIconWithSize:size];
 }
 
 - (void)retainIconForURL:(NSString *)URL
@@ -183,7 +178,7 @@ NSSize WebIconLargeSize = {128, 128};
     if (![self _isEnabled])
         return;
 
-    [_private->databaseBridge retainIconForURL:URL];
+    IconDatabase::sharedIconDatabase()->retainIconForPageURL(URL);
 }
 
 - (void)releaseIconForURL:(NSString *)pageURL
@@ -192,13 +187,13 @@ NSSize WebIconLargeSize = {128, 128};
     if (![self _isEnabled])
         return;
 
-    [_private->databaseBridge releaseIconForURL:pageURL];
+    IconDatabase::sharedIconDatabase()->releaseIconForPageURL(pageURL);
 }
 
 - (void)setDelegate:(id)delegate
 {
     _private->delegate = delegate;
-    _private->delegateDefaultIconForURL = [delegate respondsToSelector:@selector(webIconDatabase:defaultIconForURL:withSize:)];
+    _private->delegateImplementsDefaultIconForURL = [delegate respondsToSelector:@selector(webIconDatabase:defaultIconForURL:withSize:)];
 }
 
 - (id)delegate
@@ -213,13 +208,10 @@ NSSize WebIconLargeSize = {128, 128};
 
 - (void)removeAllIcons
 {
-    // <rdar://problem/4678414> - New IconDB needs to delete icons when asked
-
     if (![self _isEnabled])
         return;
-        
-    [_private->databaseBridge removeAllIcons];
-
+    IconDatabase::sharedIconDatabase()->removeAllIcons();
+    // FIXME: This notification won't get sent if WebCore calls removeAllIcons.
     [[NSNotificationCenter defaultCenter] postNotificationName:WebIconDatabaseDidRemoveAllIconsNotification
                                                         object:self
                                                       userInfo:nil];
@@ -227,7 +219,7 @@ NSSize WebIconLargeSize = {128, 128};
 
 - (BOOL)isIconExpiredForIconURL:(NSString *)iconURL
 {
-    return [_private->databaseBridge isIconExpiredForIconURL:iconURL];
+    return IconDatabase::sharedIconDatabase()->isIconExpiredForIconURL(iconURL);
 }
 
 @end
@@ -236,8 +228,7 @@ NSSize WebIconLargeSize = {128, 128};
 
 - (BOOL)_isEnabled
 {
-    // If we weren't enabled on startup, we marked the databaseBridge as nil
-    return [_private->databaseBridge _isEnabled];
+    return IconDatabase::sharedIconDatabase()->enabled();
 }
 
 - (void)_setIconData:(NSData *)data forIconURL:(NSString *)iconURL
@@ -246,7 +237,7 @@ NSSize WebIconLargeSize = {128, 128};
     ASSERT(iconURL);
     ASSERT([self _isEnabled]);   
 
-    [_private->databaseBridge _setIconData:data forIconURL:iconURL];
+    IconDatabase::sharedIconDatabase()->setIconDataForIconURL([data bytes], [data length], iconURL);
 }
 
 - (void)_setHaveNoIconForIconURL:(NSString *)iconURL
@@ -254,7 +245,7 @@ NSSize WebIconLargeSize = {128, 128};
     ASSERT(iconURL);
     ASSERT([self _isEnabled]);
 
-    [_private->databaseBridge _setHaveNoIconForIconURL:iconURL];
+    IconDatabase::sharedIconDatabase()->setHaveNoIconForIconURL(iconURL);
 }
 
 - (void)_setIconURL:(NSString *)iconURL forURL:(NSString *)URL
@@ -266,7 +257,8 @@ NSSize WebIconLargeSize = {128, 128};
     // If this iconURL already maps to this pageURL, don't bother sending the notification
     // The WebCore::IconDatabase returns TRUE if we should send the notification, and false if we shouldn't.
     // This is a measurable win on the iBench - about 1% worth on average
-    if ([_private->databaseBridge _setIconURL:iconURL forPageURL:URL])
+    if (IconDatabase::sharedIconDatabase()->setIconURLForPageURL(iconURL, URL))
+        // FIXME: This notification won't get set when WebCore sets an icon.
         [self _sendNotificationForURL:URL];
 }
 
@@ -274,7 +266,7 @@ NSSize WebIconLargeSize = {128, 128};
 {
     ASSERT([self _isEnabled]);
 
-    return [_private->databaseBridge _hasEntryForIconURL:iconURL];
+    return IconDatabase::sharedIconDatabase()->hasEntryForIconURL(iconURL);
 }
 
 - (void)_sendNotificationForURL:(NSString *)URL
@@ -294,10 +286,9 @@ NSSize WebIconLargeSize = {128, 128};
 
 - (void)_applicationWillTerminate:(NSNotification *)notification
 {
-    [_private->databaseBridge closeSharedDatabase];
+    IconDatabase::sharedIconDatabase()->close();
 }
 
-
 - (NSImage *)_iconForFileURL:(NSString *)file withSize:(NSSize)size
 {
     ASSERT(size.width);
@@ -330,8 +321,7 @@ NSSize WebIconLargeSize = {128, 128};
 - (void)_resetCachedWebPreferences:(NSNotification *)notification
 {
     BOOL privateBrowsingEnabledNow = [[WebPreferences standardPreferences] privateBrowsingEnabled];
-
-    [_private->databaseBridge setPrivateBrowsingEnabled:privateBrowsingEnabledNow];
+    IconDatabase::sharedIconDatabase()->setPrivateBrowsingEnabled(privateBrowsingEnabledNow);
 }
 
 - (NSImage *)_largestIconFromDictionary:(NSMutableDictionary *)icons
@@ -507,15 +497,12 @@ static NSData* iconDataFromPathForIconURL(NSString *databasePath, NSString *icon
 
 - (void)_convertToWebCoreFormat
 {
-    ASSERT(_private);
-    ASSERT(_private->databaseBridge);
-    
+    ASSERT(_private);    
     
     // If the WebCore Icon Database is not empty, we assume that this conversion has already
     // taken place and skip the rest of the steps 
-    if (![_private->databaseBridge _isEmpty]) {
+    if (!IconDatabase::sharedIconDatabase()->isEmpty())
         return;
-    }
 
     // Get the directory the old icon database *should* be in
     NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
@@ -542,7 +529,7 @@ static NSData* iconDataFromPathForIconURL(NSString *databasePath, NSString *icon
         iconURL = [pageURLToIconURL objectForKey:url];
         if (!iconURL)
             continue;
-        [_private->databaseBridge _setIconURL:iconURL forPageURL:url];
+        IconDatabase::sharedIconDatabase()->setIconURLForPageURL(iconURL, url);
     }    
 
     // Second, we'll get a list of the unique IconURLs we have
@@ -554,12 +541,12 @@ static NSData* iconDataFromPathForIconURL(NSString *databasePath, NSString *icon
     while ((url = [enumerator nextObject]) != nil) {
         iconData = iconDataFromPathForIconURL(databaseDirectory, url);
         if (iconData)
-            [_private->databaseBridge _setIconData:iconData forIconURL:url];
+            IconDatabase::sharedIconDatabase()->setIconDataForIconURL([iconData bytes], [iconData length], url);
         else {
             // This really *shouldn't* happen, so it'd be good to track down why it might happen in a debug build
             // however, we do know how to handle it gracefully in release
             LOG_ERROR("%@ is marked as having an icon on disk, but we couldn't get the data for it", url);
-            [_private->databaseBridge _setHaveNoIconForIconURL:url];
+            IconDatabase::sharedIconDatabase()->setHaveNoIconForIconURL(url);
         }
     }
 
@@ -568,7 +555,7 @@ static NSData* iconDataFromPathForIconURL(NSString *databasePath, NSString *icon
     NSFileManager *fileManager = [NSFileManager defaultManager];
     enumerator = [[fileManager directoryContentsAtPath:databaseDirectory] objectEnumerator];
     
-    NSString *databaseFilename = [_private->databaseBridge defaultDatabaseFilename];
+    NSString *databaseFilename = IconDatabase::sharedIconDatabase()->defaultDatabaseFilename();
 
     NSString *file;
     while ((file = [enumerator nextObject]) != nil) {
@@ -582,7 +569,25 @@ static NSData* iconDataFromPathForIconURL(NSString *databasePath, NSString *icon
 
 @end
 
-// This empty implementation must exist 
 @implementation WebIconDatabasePrivate
 @end
 
+NSImage *webGetNSImage(Image* image, NSSize size)
+{
+    ASSERT(size.width);
+    ASSERT(size.height);
+
+    // FIXME: We're doing the resize here for now because WebCore::Image doesn't yet support resizing/multiple representations
+    // This makes it so there's effectively only one size of a particular icon in the system at a time. We should move this
+    // to WebCore::Image at some point.
+    if (!image)
+        return nil;
+    NSImage* nsImage = image->getNSImage();
+    if (!nsImage)
+        return nil;
+    if (!NSEqualSizes([nsImage size], size)) {
+        [nsImage setScalesWhenResized:YES];
+        [nsImage setSize:size];
+    }
+    return nsImage;
+}
similarity index 85%
rename from WebKit/WebCoreSupport/WebIconDatabaseBridge.h
rename to WebKit/Misc/WebIconDatabaseInternal.h
index a820b3fde0a901bcb8ae410ee37654f741a88f71..4b38fe3ba85c391ba73baeed92f51ada22800730 100644 (file)
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import <WebCore/WebCoreIconDatabaseBridge.h>
+#import "WebIconDatabasePrivate.h"
 
-@interface WebIconDatabaseBridge : WebCoreIconDatabaseBridge <WebCoreIconDatabaseBridge>
-{
+namespace WebCore {
+    class Image;
+}
+
+@interface WebIconDatabasePrivate : NSObject {
+@public
+    id delegate;
+    BOOL delegateImplementsDefaultIconForURL;
+    NSMutableDictionary *htmlIcons;
 }
 @end
+
+NSImage *webGetNSImage(WebCore::Image*, NSSize);
index 122101e88219b3cf9ffb5f42bbddac0a8434e116..bef70c1c8848b687ee7ff59000e2fd21cc16ddf6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2005, 2006 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
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import <Cocoa/Cocoa.h>
 #import <WebKit/WebIconDatabase.h>
 
+// FIXME: Some of the following is not API and should be moved
+// either inside WebIconDatabase.mm, or to WebIconDatabaseInternal.h.
 
-@class WebCoreIconDatabaseBridge;
-@class WebDataSource;
-
-@interface WebIconDatabasePrivate : NSObject {
-
-@public
-    WebCoreIconDatabaseBridge *databaseBridge;
-    id delegate;
-    
-    BOOL delegateDefaultIconForURL;
-    
-    NSMutableDictionary *htmlIcons;
-    NSMutableDictionary *defaultIcons;
-}
-
-@end
-
-// Sent when all icons are removed from the databse. The object of the notification is 
+// Sent when all icons are removed from the database. The object of the notification is 
 // the icon database. There is no userInfo. Clients should react by removing any cached
 // icon images from the user interface. Clients need not and should not call 
 // releaseIconForURL: in response to this notification.
 extern NSString *WebIconDatabaseDidRemoveAllIconsNotification;
 
 @interface WebIconDatabase (WebPendingPublic)
+
 /*!
    @method removeAllIcons:
    @discussion Causes the icon database to delete all of the images that it has stored,
@@ -71,11 +56,12 @@ extern NSString *WebIconDatabaseDidRemoveAllIconsNotification;
 
 @interface WebIconDatabase (WebPrivate)
 
-- (BOOL)_isEnabled;
+// None of these are used in WebKit outside WebIconDatabase.m, so if we can verify that
+// they are not used outside WebKit, then we can just remove these declarations and
+// make them "file internal".
 
-// Called by WebDataSource to bind a web site URL to a icon URL and icon image.
+- (BOOL)_isEnabled;
 - (void)_setIconURL:(NSString *)iconURL forURL:(NSString *)URL;
-
 - (BOOL)_hasEntryForIconURL:(NSString *)iconURL;
 - (void)_sendNotificationForURL:(NSString *)URL;
 
index d1a2f00ac857a936cda63c3363d986791fcbee1c..a0fbd0e3402e6f4f453443470e1d909b98442b97 100644 (file)
@@ -112,7 +112,7 @@ private:
     virtual void dispatchWillPerformClientRedirect(const WebCore::KURL&, double interval, double fireDate);
     virtual void dispatchDidChangeLocationWithinPage();
     virtual void dispatchWillClose();
-    virtual void dispatchDidReceiveIcon(NSImage *);
+    virtual void dispatchDidReceiveIcon();
     virtual void dispatchDidStartProvisionalLoad();
     virtual void dispatchDidReceiveTitle(const WebCore::String& title);
     virtual void dispatchDidCommitLoad();
index 765a9ae3d328b6cb627bea57f3f5a49f6521af14..3b027ec995503a60f2ebc5d4c993a87bddaa7d13 100644 (file)
@@ -42,6 +42,7 @@
 #import "WebDownloadInternal.h"
 #import "WebElementDictionary.h"
 #import "WebFormDelegate.h"
+#import "WebFrameBridge.h"
 #import "WebFrameInternal.h"
 #import "WebFrameLoadDelegate.h"
 #import "WebFrameViewInternal.h"
@@ -49,6 +50,7 @@
 #import "WebHTMLView.h"
 #import "WebHistoryItemPrivate.h"
 #import "WebHistoryPrivate.h"
+#import "WebIconDatabaseInternal.h"
 #import "WebKitErrorsPrivate.h"
 #import "WebKitNSStringExtras.h"
 #import "WebNSURLExtras.h"
@@ -67,6 +69,7 @@
 #import <WebCore/FrameLoader.h>
 #import <WebCore/FrameLoaderTypes.h>
 #import <WebCore/FrameMac.h>
+#import <WebCore/IconDatabase.h>
 #import <WebCore/PageState.h>
 #import <WebCore/FrameTree.h>
 #import <WebCore/MouseEvent.h>
@@ -559,12 +562,20 @@ void WebFrameLoaderClient::dispatchWillClose()
     [[webView _frameLoadDelegateForwarder] webView:webView willCloseFrame:m_webFrame.get()];
 }
 
-void WebFrameLoaderClient::dispatchDidReceiveIcon(NSImage *icon)
+void WebFrameLoaderClient::dispatchDidReceiveIcon()
 {
     WebView *webView = getWebView(m_webFrame.get());   
     ASSERT([m_webFrame.get() _isMainFrame]);
+    // FIXME: This willChangeValueForKey call is too late, because the icon has already changed by now.
     [webView _willChangeValueForKey:_WebMainFrameIconKey];
-    [[webView _frameLoadDelegateForwarder] webView:webView didReceiveIcon:icon forFrame:m_webFrame.get()];
+    id delegate = [webView frameLoadDelegate];
+    if ([delegate respondsToSelector:@selector(webView:didReceiveIcon:forFrame:)]) {
+        Image* image = IconDatabase::sharedIconDatabase()->
+            iconForPageURL(core(m_webFrame.get())->loader()->url().url(), IntSize(16, 16));
+        NSImage *icon = webGetNSImage(image, NSMakeSize(16, 16));
+        if (icon)
+            [delegate webView:webView didReceiveIcon:icon forFrame:m_webFrame.get()];
+    }
     [webView _didChangeValueForKey:_WebMainFrameIconKey];
 }
 
diff --git a/WebKit/WebCoreSupport/WebIconDatabaseBridge.m b/WebKit/WebCoreSupport/WebIconDatabaseBridge.m
deleted file mode 100644 (file)
index e11b6cc..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (C) 2006 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 "WebIconDatabaseBridge.h"
-
-#import "WebIconDatabasePrivate.h"
-#import <JavaScriptCore/Assertions.h>
-
-@implementation WebIconDatabaseBridge
-
-// Only sharedInstance is allowed to create the bridge.
-// Return nil if someone tries to init.
-- (id)init
-{
-    [self release];
-    return nil;
-}
-
-- (id)_init
-{
-    self = [super init];
-    return self;
-}
-
-// 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
-{
-    [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
-{
-    [super _setHaveNoIconForIconURL:iconURL];
-}
-
-+ (WebCoreIconDatabaseBridge *)createInstance
-{    
-    return [[WebIconDatabaseBridge alloc] _init];
-}
-
-- (void)dealloc
-{
-    // The single instance should be kept around forever, so this code should never be reached.
-    ASSERT(false);
-    [super dealloc];
-}
-
-- (void)finalize
-{
-    // The single instance should be kept around forever, so this code should never be reached.
-    ASSERT(false);
-    [super finalize];
-}
-
-@end
index 5649973740f282ed12c901b6053d7dd84d7d88af..173c6cc806f9152f595d8c376eb0fa91f394411a 100644 (file)
@@ -42,8 +42,6 @@
                4BF99F900AE050BC00815C2B /* WebEditorClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF99F8E0AE050BC00815C2B /* WebEditorClient.h */; };
                4BF99F910AE050BC00815C2B /* WebEditorClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4BF99F8F0AE050BC00815C2B /* WebEditorClient.mm */; };
                51B2A1000ADB15D0002A9BEE /* WebIconDatabaseDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 51B2A0FF0ADB15D0002A9BEE /* WebIconDatabaseDelegate.h */; };
-               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 */; };
                650F74E509E488F70020118A /* WebUnarchivingState.m in Sources */ = {isa = PBXBuildFile; fileRef = 650F74E309E488F70020118A /* WebUnarchivingState.m */; };
                65488DA1084FBCCB00831AD0 /* WebNSDictionaryExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 65488D9F084FBCCB00831AD0 /* WebNSDictionaryExtras.h */; };
@@ -68,6 +66,7 @@
                7E6FEF0808985A7200C44C3F /* WebScriptDebugDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E6FEF0508985A7200C44C3F /* WebScriptDebugDelegate.h */; settings = {ATTRIBUTES = (Private, ); }; };
                7E6FEF0908985A7200C44C3F /* WebScriptDebugDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E6FEF0608985A7200C44C3F /* WebScriptDebugDelegate.m */; };
                7E6FEF0A08985A7200C44C3F /* WebScriptDebugDelegatePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E6FEF0708985A7200C44C3F /* WebScriptDebugDelegatePrivate.h */; };
+               9304B3000B02341500F7850D /* WebIconDatabaseInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 9304B2FF0B02341500F7850D /* WebIconDatabaseInternal.h */; };
                931633EB0AEDFF930062B92D /* WebFrameLoaderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 931633EA0AEDFF930062B92D /* WebFrameLoaderClient.h */; };
                931633EF0AEDFFAE0062B92D /* WebFrameLoaderClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = 931633EE0AEDFFAE0062B92D /* WebFrameLoaderClient.mm */; };
                939810110824BF01008DF038 /* WebBackForwardList.h in Headers */ = {isa = PBXBuildFile; fileRef = 3944607D020F50ED0ECA1767 /* WebBackForwardList.h */; settings = {ATTRIBUTES = (Public, ); }; };
                51A8B57D0428353A00CA2D3A /* WebViewPrivate.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebViewPrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                51B2A0FF0ADB15D0002A9BEE /* WebIconDatabaseDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebIconDatabaseDelegate.h; sourceTree = "<group>"; };
                51C16E4006138EB400A1657B /* npfunctions.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = npfunctions.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
-               51E4D3970A886B5E00ECEE2C /* WebIconDatabaseBridge.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebIconDatabaseBridge.h; sourceTree = "<group>"; };
-               51E4D3980A886B5E00ECEE2C /* WebIconDatabaseBridge.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = WebIconDatabaseBridge.m; sourceTree = "<group>"; };
                51E94C3406C0321200A9B09E /* WebPDFView.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebPDFView.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                51E94C3506C0321200A9B09E /* WebPDFView.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebPDFView.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                51E94C6806C0347500A9B09E /* WebPDFRepresentation.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebPDFRepresentation.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                84CA5F7E042685E800CA2ACA /* WebKitErrorsPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebKitErrorsPrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                84D4BFF70348EF7600CA2ACA /* WebNetscapePluginEmbeddedView.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebNetscapePluginEmbeddedView.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                84D4BFF80348EF7600CA2ACA /* WebNetscapePluginEmbeddedView.m */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; indentWidth = 4; path = WebNetscapePluginEmbeddedView.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+               9304B2FF0B02341500F7850D /* WebIconDatabaseInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebIconDatabaseInternal.h; sourceTree = "<group>"; };
                9305892A070868B300E79D96 /* WebDashboardRegion.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebDashboardRegion.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                930D02BB06275F640076701E /* WebViewInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebViewInternal.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                930D02BD06275F710076701E /* WebFrameInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebFrameInternal.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F5143A370221DCCE01A80181 /* WebFrame.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebFrame.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F520FB190221DEFD01C1A525 /* WebHistory.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebHistory.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F528E3E9031E91AD01CA2ACA /* WebIconDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebIconDatabase.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
-               F528E3EA031E91AD01CA2ACA /* WebIconDatabase.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebIconDatabase.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+               F528E3EA031E91AD01CA2ACA /* WebIconDatabase.m */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; indentWidth = 4; path = WebIconDatabase.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F528E3EB031E91AD01CA2ACA /* WebIconDatabasePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebIconDatabasePrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F53444CE02E87CBA018635CA /* WebKitStatistics.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebKitStatistics.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F53444CF02E87CBA018635CA /* WebKitStatistics.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebKitStatistics.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                                F528E3E9031E91AD01CA2ACA /* WebIconDatabase.h */,
                                F528E3EA031E91AD01CA2ACA /* WebIconDatabase.m */,
                                51B2A0FF0ADB15D0002A9BEE /* WebIconDatabaseDelegate.h */,
+                               9304B2FF0B02341500F7850D /* WebIconDatabaseInternal.h */,
                                F528E3EB031E91AD01CA2ACA /* WebIconDatabasePrivate.h */,
                                2568C72C0174912D0ECA149E /* WebKit.h */,
                                F5927D4E02D26C5E01CA2DBB /* WebKitErrors.h */,
                                F5AFB45F02B94DC8018635CA /* WebFrameBridge.mm */,
                                931633EA0AEDFF930062B92D /* WebFrameLoaderClient.h */,
                                931633EE0AEDFFAE0062B92D /* WebFrameLoaderClient.mm */,
-                               51E4D3970A886B5E00ECEE2C /* WebIconDatabaseBridge.h */,
-                               51E4D3980A886B5E00ECEE2C /* WebIconDatabaseBridge.m */,
                                9CE1F8A302A5C6F30ECA2ACD /* WebImageRendererFactory.m */,
                                9345D4EA0365C5B2008635CE /* WebJavaScriptTextInputPanel.h */,
                                9345D4EB0365C5B2008635CE /* WebJavaScriptTextInputPanel.m */,
                                DD7CDEE70A23BA9E00069928 /* WebTypesInternal.h in Headers */,
                                1C0706630A431E01001078F6 /* WebScriptDebugServer.h in Headers */,
                                1C07079A0A433E22001078F6 /* WebScriptDebugServerPrivate.h in Headers */,
-                               51E4D3990A886B5E00ECEE2C /* WebIconDatabaseBridge.h in Headers */,
                                1C0D40870AC1C8F40009C113 /* WebKitVersionChecks.h in Headers */,
                                65FFB7FC0AD0B7D30048CD05 /* WebDocumentLoaderMac.h in Headers */,
                                51B2A1000ADB15D0002A9BEE /* WebIconDatabaseDelegate.h in Headers */,
                                656D333E0AF21AE900212169 /* WebResourceLoadDelegatePrivate.h in Headers */,
                                931633EB0AEDFF930062B92D /* WebFrameLoaderClient.h in Headers */,
                                14D8252F0AF955090004F057 /* WebChromeClient.h in Headers */,
+                               9304B3000B02341500F7850D /* WebIconDatabaseInternal.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                650F74E509E488F70020118A /* WebUnarchivingState.m in Sources */,
                                93EB178D09F88D460091F8FF /* WebSystemInterface.m in Sources */,
                                1C07073D0A433BD8001078F6 /* WebScriptDebugServer.m in Sources */,
-                               51E4D39A0A886B5E00ECEE2C /* WebIconDatabaseBridge.m in Sources */,
                                1C0D40880AC1C8F40009C113 /* WebKitVersionChecks.m in Sources */,
                                65FFB7FD0AD0B7D30048CD05 /* WebDocumentLoaderMac.mm in Sources */,
                                4BF99F910AE050BC00815C2B /* WebEditorClient.mm in Sources */,