Reviewed by Steve Falkenburg.
authorweinig <weinig@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Oct 2007 00:10:07 +0000 (00:10 +0000)
committerweinig <weinig@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Oct 2007 00:10:07 +0000 (00:10 +0000)
commit281b084ad322bfa75299c1839164350311261e2f
tree374a3fa2e2ce7ac57b18c352f8a2dd8b9c97cb7a
parent97e8e5728e84b67c9349777d16de3a966794acd4
    Reviewed by Steve Falkenburg.

        Fix for <rdar://problem/5463608>
        Port WebKit cache model code (Windows needs a big disk cache, smarter memory cache)

        * Interfaces/IWebPreferences.idl:
        Deprecate pageCacheSize and objectCacheSize and add cacheModel/setCacheModel.

        * Interfaces/IWebPreferencesPrivate.idl:
        Add automaticallyDetectsCacheModel/setAutomaticallyDetectsCacheModel

        * WebFrame.cpp:
        (WebFrame::didPerformFirstNavigation):
        Implement based on the mac version.

        * WebKit.vcproj/WebKit.vcproj:
        * WebKitSystemBits.cpp: Added.
        (WebMemorySize): Moved and renamed from WebPreferences.cpp
        (WebVolumeFreeSize): Added.
        * WebKitSystemBits.h: Added.
        * WebPreferenceKeysPrivate.h: Added WebKitCacheModelPreferenceKey.

        * WebPreferences.cpp:
        (WebPreferences::sharedStandardPreferences):
        (WebPreferences::WebPreferences):
        (WebPreferences::initializeDefaultSettings): Added default for cacheModel.
        (WebPreferences::webPreferencesChangedNotification):
        (WebPreferences::webPreferencesRemovedNotification):
        (WebPreferences::initWithIdentifier): Post a preferences change notification.
        (WebPreferences::pageCacheSize): Deprecated.
        (WebPreferences::objectCacheSize): Deprecated.
        (WebPreferences::cacheModel): Added.
        (WebPreferences::setCacheModel): Added.
        (WebPreferences::setAutomaticallyDetectsCacheModel): Added.
        (WebPreferences::automaticallyDetectsCacheModel): Added.
        (WebPreferences::willAddToWebView): Added.
        (WebPreferences::didRemoveFromWebView): Added.
        * WebPreferences.h:

        * WebView.cpp:
        (PreferencesChangedOrRemovedObserver::PreferencesChangedOrRemovedObserver):
        (PreferencesChangedOrRemovedObserver::~PreferencesChangedOrRemovedObserver):
        (PreferencesChangedOrRemovedObserver::QueryInterface):
        (PreferencesChangedOrRemovedObserver::AddRef):
        (PreferencesChangedOrRemovedObserver::Release):
        (PreferencesChangedOrRemovedObserver::sharedInstance):
        (PreferencesChangedOrRemovedObserver::onNotify):
        (PreferencesChangedOrRemovedObserver::notifyPreferencesChanged):
        (PreferencesChangedOrRemovedObserver::notifyPreferencesRemoved):
        This singleton class updates static properties for all webviews when
        preferenceChange or preferenceRemoved notifications are fired for
        any WebPreference.
        (WebView::WebView):
        (WebView::~WebView):
        (initializeStaticObservers):
        (allWebViewsSet):
        (WebView::addToAllWebViewsSet):
        (WebView::removeFromAllWebViewsSet):
        (WebView::setCacheModel):
        (WebView::cacheModel):
        (WebView::didSetCacheModel):
        (WebView::maxCacheModelInAnyInstance):
        (WebView::close):
        (WebViewWndProc):
        (WebView::developerExtrasEnabled):
        (WebView::initWithFrame):
        (WebView::setPreferences):
        (WebView::preferences):
        (WebView::onNotify):
        (WebView::notifyPreferencesChanged):
        (updateSharedSettingsFromPreferencesIfNeeded):
        * WebView.h:
        Match the macs behavior by using explicit postings of notifications to
        update the preferences.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
WebKit/win/ChangeLog
WebKit/win/Interfaces/IWebPreferences.idl
WebKit/win/Interfaces/IWebPreferencesPrivate.idl
WebKit/win/WebFrame.cpp
WebKit/win/WebKit.vcproj/WebKit.vcproj
WebKit/win/WebKitSystemBits.cpp [new file with mode: 0644]
WebKit/win/WebKitSystemBits.h [new file with mode: 0644]
WebKit/win/WebPreferenceKeysPrivate.h
WebKit/win/WebPreferences.cpp
WebKit/win/WebPreferences.h
WebKit/win/WebView.cpp
WebKit/win/WebView.h