WebCore:
authorbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Jun 2006 01:29:57 +0000 (01:29 +0000)
committerbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Jun 2006 01:29:57 +0000 (01:29 +0000)
commit43271e227218e659b3cd47c6b452d743aa6effac
tree420781c6141a5c111b02fa63c56eafe938fc39a8
parentd66c336589a6e8dc1ecf3f3ce6c96271240c51eb
WebCore:

        Reviewed by Maciej.

        More changes/additions setting the stage for the major IconDatabase hookup.

        * WebCore.xcodeproj/project.pbxproj:  Added SQLTransaction.cpp

        * bridge/mac/WebCoreIconDatabaseBridge.h: Added call-throughs and translations to pass WebKit DB to WebCore DB
        * bridge/mac/WebCoreIconDatabaseBridge.mm:
        (+[WebCoreIconDatabaseBridge sharedBridgeInstance]):
        (-[WebCoreIconDatabaseBridge setPrivateBrowsingEnabled:]):
        (-[WebCoreIconDatabaseBridge iconForURL:withSize:]):
        (-[WebCoreIconDatabaseBridge iconURLForURL:]):
        (-[WebCoreIconDatabaseBridge defaultIconWithSize:]):
        (-[WebCoreIconDatabaseBridge retainIconForURL:]):
        (-[WebCoreIconDatabaseBridge releaseIconForURL:]):
        (-[WebCoreIconDatabaseBridge _setIconData:forIconURL:]):
        (-[WebCoreIconDatabaseBridge _setHaveNoIconForIconURL:]):
        (-[WebCoreIconDatabaseBridge _setIconURL:forURL:]):
        (-[WebCoreIconDatabaseBridge _hasIconForIconURL:]):

        * bridge/mac/WebCorePageBridge.mm: Added WebCore's IconDatabase logging channel to the user-prefs check
        (initializeLoggingChannelsIfNecessary):

        * icon/IconDatabase.cpp:  Added stubs and basic SQL usage to create the sqlite DB and respond to WebKit calls
        (WebCore::IconDatabase::IconDatabase):
        (WebCore::IconDatabase::open):
        (WebCore::IconDatabase::close):
        (WebCore::IconDatabase::isValidDatabase):
        (WebCore::IconDatabase::recreateDatabase):
        (WebCore::IconDatabase::setPrivateBrowsingEnabled):
        (WebCore::IconDatabase::iconForURL):
        (WebCore::IconDatabase::iconURLForURL):
        (WebCore::IconDatabase::defaultIcon):
        (WebCore::IconDatabase::retainIconForURL):
        (WebCore::IconDatabase::releaseIconForURL):
        (WebCore::IconDatabase::setIconForIconURL):
        (WebCore::IconDatabase::setHaveNoIconForIconURL):
        (WebCore::IconDatabase::setIconURLForPageURL):
        (WebCore::IconDatabase::hasIconForIconURL):

        * icon/IconDatabase.h:  WebIcon will be an internal class used in IconDatabase but is not complete yet
        (WebCore::WebIcon::getExpiration):
        (WebCore::WebIcon::getTouch):

        * icon/SQLDatabase.cpp:  Added more SQLite convenience methods
        (SQLDatabase::setFullsync):
        (SQLDatabase::setBusyTimeout):
        (SQLDatabase::setBusyHandler):
        * icon/SQLDatabase.h:
        * icon/SQLStatement.cpp:
        (WebCore::SQLStatement::returnsAtLeastOneResult):

        * icon/SQLTransaction.cpp: Added basic commit/rollback support with this simple class
        (SQLTransaction::SQLTransaction):
        (SQLTransaction::~SQLTransaction):
        (SQLTransaction::begin):
        (SQLTransaction::commit):
        (SQLTransaction::rollback):

WebKit:

        Reviewed by Maciej

        Added calls through to the WebCoreIconDatabaseBridge for all the major WebIconDatabase API.  For now these calls
        are wrapped with #ifdef's and are for debugging only.

        * Misc/WebIconDatabase.h:
        * Misc/WebIconDatabase.m:
        (-[NSMutableDictionary _scaleIcon:toSize:]):
        (-[NSMutableDictionary init]):
        (-[NSMutableDictionary iconForURL:withSize:cache:]):
        (-[NSMutableDictionary iconURLForURL:]):
        (-[NSMutableDictionary retainIconForURL:]):
        (-[NSMutableDictionary releaseIconForURL:]):
        (-[WebIconDatabase _setHaveNoIconForIconURL:]):
        (-[WebIconDatabase _setIconURL:forURL:]):
        (-[WebIconDatabase _hasIconForIconURL:]):
        * Misc/WebIconLoader.m:
        (-[WebIconLoader didFinishLoading]):

        * Misc/WebKitLogging.h:  Added a logging channel for WebIconDatabase debugging
        * Misc/WebKitLogging.m:
        (WebKitInitializeLoggingChannelsIfNecessary):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14933 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bridge/mac/WebCoreIconDatabaseBridge.h
WebCore/bridge/mac/WebCoreIconDatabaseBridge.mm
WebCore/bridge/mac/WebCorePageBridge.mm
WebCore/icon/IconDatabase.cpp
WebCore/icon/IconDatabase.h
WebCore/icon/SQLDatabase.cpp
WebCore/icon/SQLDatabase.h
WebCore/icon/SQLStatement.cpp
WebCore/icon/SQLTransaction.cpp [new file with mode: 0644]
WebKit/ChangeLog
WebKit/Misc/WebIconDatabase.h
WebKit/Misc/WebIconDatabase.m
WebKit/Misc/WebIconLoader.m
WebKit/Misc/WebKitLogging.h
WebKit/Misc/WebKitLogging.m