WebCore:
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Jan 2009 15:40:24 +0000 (15:40 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Jan 2009 15:40:24 +0000 (15:40 +0000)
commitaadfe653c2d18af0053db5fc22419cc9a5f58973
tree88cc704478a8ea06af95f5d05a9183b4f4a6e004
parentba1b8f800f6ed6c85317569682efd69c8cb6ff1b
WebCore:

2009-01-07  Darin Adler  <darin@apple.com>

        Reviewed by Oliver Hunt.

        Bug 23160: add setMemoryCacheClientCallsEnabled SPI so Safari can be faster with activity window closed
        https://bugs.webkit.org/show_bug.cgi?id=23160

        * WebCore.base.exp: Added Page::setMemoryCacheClientCallsEnabled.

        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::didLoadResourceFromMemoryCache): Updated to take a CachedResource
        so that there's no extra work the caller has to do when the inspector is disabled.
        * inspector/InspectorController.h: Ditto.

        * loader/DocumentLoader.h: Added recordMemoryCacheLoadForFutureClientNotification,
        takeMemoryCacheLoadsForClientNotification, and m_resourcesLoadedFromMemoryCacheForClientNotification.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::loadedResourceFromMemoryCache): Streamlined code so less work is done when
        there's no inspector or client call needed. Added code to check areMemoryCacheClientCallsEnabled
        and if it's false, use recordMemoryCacheLoadForFutureClientNotification.
        (WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads): Added.
        * loader/FrameLoader.h: Ditto.

        * page/Page.cpp:
        (WebCore::Page::Page): Initialize m_areMemoryCacheClientCallsEnabled to be compatible with old behavior.
        (WebCore::Page::setMemoryCacheClientCallsEnabled): Added.
        * page/Page.h: Added setMemoryCacheClientCallsEnabled, areMemoryCacheClientCallsEnabled,
        and m_areMemoryCacheClientCallsEnabled.

WebKit/mac:

2009-01-07  Darin Adler  <darin@apple.com>

        Reviewed by Oliver Hunt.

        Bug 23160: add setMemoryCacheClientCallsEnabled SPI so Safari can be faster with activity window closed
        https://bugs.webkit.org/show_bug.cgi?id=23160

        * WebView/WebView.mm:
        (-[WebView setMemoryCacheDelegateCallsEnabled:]): Added.
        (-[WebView areMemoryCacheDelegateCallsEnabled]): Added
        * WebView/WebViewPrivate.h: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39681 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
WebCore/ChangeLog
WebCore/WebCore.base.exp
WebCore/inspector/InspectorController.cpp
WebCore/inspector/InspectorController.h
WebCore/loader/DocumentLoader.h
WebCore/loader/FrameLoader.cpp
WebCore/loader/FrameLoader.h
WebCore/page/Page.cpp
WebCore/page/Page.h
WebKit/mac/ChangeLog
WebKit/mac/WebView/WebView.mm
WebKit/mac/WebView/WebViewPrivate.h