Add to HistoryItem a way to know if its underlying CachedPage has expired.
authoralice.liu@apple.com <alice.liu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Mar 2013 07:30:59 +0000 (07:30 +0000)
committeralice.liu@apple.com <alice.liu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Mar 2013 07:30:59 +0000 (07:30 +0000)
commit81b29aca93368080505a827e17121d7db2aa49a6
treee9ebf121c0c09069e2692d75c97186196680f8b9
parent04b60b599641f977a3f0194bd20dc933466a2af5
Add to HistoryItem a way to know if its underlying CachedPage has expired.
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: https://svn.webkit.org/repository/webkit/trunk@145789 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/history/CachedPage.cpp
Source/WebCore/history/CachedPage.h
Source/WebCore/history/HistoryItem.cpp
Source/WebCore/history/HistoryItem.h
Source/WebCore/history/PageCache.cpp
Source/WebCore/page/Settings.in
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/History/WebHistoryItem.mm
Source/WebKit/mac/History/WebHistoryItemPrivate.h
Source/WebKit/mac/WebView/WebPreferences.mm
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.h
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h