Skip to content
  • alice.liu@apple.com's avatar
    Add to HistoryItem a way to know if its underlying CachedPage has expired. · 03a44196
    alice.liu@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=110652
    
    Reviewed by Brady Eidson.
    
    Source/WebCore: 
    
    * WebCore.exp.in: Added WebCore::HistoryItem::isInPageCache and hasCachedPageExpired.
    * history/CachedPage.cpp: Add a data member, m_expirationTime, and a function, hasExpired().
    * history/CachedPage.h:
    * history/HistoryItem.cpp:
    (WebCore::HistoryItem::hasCachedPageExpired): Added. returns m_cachedPage's expiration state.
    * history/HistoryItem.h:
    * history/PageCache.cpp:
    (WebCore::PageCache::get):  Address the fixme about not using WebKitBackForwardCacheExpirationIntervalKey. 
    * page/Settings.in: Add backForwardCacheExpirationInterval to the automatically generated setters for Settings.
    
    Source/WebKit/mac: 
    
    * History/WebHistoryItem.mm:
    (-[WebHistoryItem _isInPageCache]): Added. Just calls and returns core imple's function. 
    (-[WebHistoryItem _hasCachedPageExpired]): Same thing. 
    * History/WebHistoryItemPrivate.h:
    * WebView/WebPreferences.mm:
    (-[WebPreferences _backForwardCacheExpirationInterval]): Address fixme, now that WebCore::Settings
    has getters and setters with default value.
    * WebView/WebView.mm:
    (-[WebView _preferencesChanged:]): call setBackForwardCacheExpirationInterval similar to other settings.
    
    Source/WebKit2: 
    
    Hook up hasCachedPageExpired in InjectedBundle's BackForwardListItem.
    * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
    (WKBundleBackForwardListItemHasCachedPageExpired):
    * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.h:
    * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
    (WebKit::InjectedBundleBackForwardListItem::hasCachedPageExpired):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145789 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    03a44196