WebCore:
authorbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Sep 2006 07:16:10 +0000 (07:16 +0000)
committerbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Sep 2006 07:16:10 +0000 (07:16 +0000)
commit637ec5bc9c0d52ab511db775ebc87935f95c6c6d
tree18e4e16cbd53761e7cc0998f82134e80966ddf76
parente13f25f8a21ad7858afc0cd940299e7db9eecdb6
WebCore:

        Reviewed by Sarge Decker

        <rdar://problem/4739892> and <rdar://problem/4729797>
        - WebCore::IconDatabase needs to have and respect an enabled() flag
        - Mail on ToT WebKit crashes in IconDatabase code when mailing a page from Safari

        * bridge/mac/WebCoreIconDatabaseBridge.h:
        * bridge/mac/WebCoreIconDatabaseBridge.mm:
        (-[WebCoreIconDatabaseBridge _setEnabled:]): Added
        (-[WebCoreIconDatabaseBridge _isEnabled]): Added
        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::IconDatabase):
        (WebCore::IconDatabase::open): Don't open if disabled
        (WebCore::IconDatabase::removeAllIcons): Ignore if disabled/closed
        (WebCore::IconDatabase::setPrivateBrowsingEnabled): Ignore if disabled/closed
        (WebCore::IconDatabase::iconForPageURL): Default Icon if disabled/closed
        (WebCore::IconDatabase::isIconExpiredForIconURL): Default return if disabled/closed
        (WebCore::IconDatabase::iconURLForPageURL): Default return if disabled/closed
        (WebCore::IconDatabase::retainIconForPageURL): Ignore if disabled/closed
        (WebCore::IconDatabase::releaseIconForPageURL): Ignore if disabled/closed
        (WebCore::IconDatabase::releaseIconURL):
        (WebCore::IconDatabase::setIconDataForIconURL): Ignore if disabled/closed
        (WebCore::IconDatabase::setIconURLForPageURL): Ignore if disabled/closed
        (WebCore::IconDatabase::hasEntryForIconURL): Default return if disabled/closed
        (WebCore::IconDatabase::setEnabled): Added
        * loader/icon/IconDatabase.h:
        (WebCore::IconDatabase::enabled): Added
        * page/Frame.cpp:
        (WebCore::Frame::endIfNotLoading): do an IconDatabase::enabled() check before bothering to load the icon
        * platform/mac/ResourceLoaderMac.mm: Removed extraneous #include

WebKit:

        Reviewed by Sarge Decker

        <rdar://problem/4739892> and <rdar://problem/4729797>
        - WebCore::IconDatabase needs to have and respect an enabled() flag
        - Mail on ToT WebKit crashes in IconDatabase code when mailing a page from Safari

        * Misc/WebIconDatabase.m:
        (-[WebIconDatabase init]): If preference says icons are disabled, tell the bridge
        (-[WebIconDatabase _isEnabled]): Ask the bridge if the database is enabled

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16464 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/bridge/mac/WebCoreIconDatabaseBridge.h
WebCore/bridge/mac/WebCoreIconDatabaseBridge.mm
WebCore/loader/icon/IconDatabase.cpp
WebCore/loader/icon/IconDatabase.h
WebCore/page/Frame.cpp
WebCore/platform/mac/ResourceLoaderMac.mm
WebKit/ChangeLog
WebKit/Misc/WebIconDatabase.m