Electrolysis/places that need session history: Difference between revisions
No edit summary |
No edit summary |
||
Line 74: | Line 74: | ||
*'::_serializeSessionStorage()' || [http://mxr.mozilla.org/mozilla-central/source/browser/components/sessionstore/src/nsSessionStore.js#1348 nsSessionStore.js] | *'::_serializeSessionStorage()' || [http://mxr.mozilla.org/mozilla-central/source/browser/components/sessionstore/src/nsSessionStore.js#1348 nsSessionStore.js] | ||
*'::restoreHistory()' || [http://mxr.mozilla.org/mozilla-central/source/browser/components/sessionstore/src/nsSessionStore.js#2037 nsSessionStore.js] | *'::restoreHistory()' || [http://mxr.mozilla.org/mozilla-central/source/browser/components/sessionstore/src/nsSessionStore.js#2037 nsSessionStore.js] | ||
help.js || .history || | help.js || .history || |
Revision as of 18:07, 28 September 2009
Conceptual breakdown of session history usage
- History navigation: back/forward/reload/go to index. Some or all of these could probably use nsIWebNavigation instead, though there are some interesting behavior differences (e.g. location.reload() uses the nsIWebNavigation API while the browser's reload button uses the nsISHistory API and they behave differently in terms of flags passed in for the underlying load!). How to make goToIndex work sanely?
- History data reading (history menu, back/forward buttons). These are done both on-demand (filling the history menu) and via history notifications (back/forward enabled state).
- Identification of data for fetching from cache (using nsIWebPageDescriptor). This is what view-source does, e.g.
- Session restore: serializes/deserializes the entire history. Needs to be able to hook it up to the docshells when done.
- Save as: gets POST data from the session history.
- Content uses of session history: limited to nsIDOMHistory and nsIDOMLocation, I think. Effectively the former lets one do length/back/forward/go. The other interface members are UniversalBrowserRead-only bunk, and we should remove them. The latter only needs reload() and replace(); the rest is basic navigation.
- Issue: all embeddors needing to implement session history separately seems undesirable.
Places that need session history
This planning document is preparatory work for task "Session history for remote tabs" in [1]. It lists all the places that need (read / write) session history.
all the following objects make use of session history (or session history listener) in a certain way. For each of them, nsISHistory usage is detailled and links to code are provided.
NOTE: This list DOES NOT contain places that are part of /test subdirectories.
Places using Session History
WebNavigation interface || attribute sessionHistory ||
CCUncollectableMarker component || nsComPtr history ||
- '::MarkDocShell()' || nsCCUncollectableMarker.cpp
DocShell component || nsComPtr shistory & rootSH ||
- '::GetInterface()' || nsDocShell.cpp
- '::DoAddChildSHEntry()' || nsDocShell.cpp
- '::getCanGoBack()' || nsDocShell.cpp
- '::getCanGoForward()' || nsDocShell.cpp
- '::goBack()' || nsDocShell.cpp
- '::goForward()' || nsDocShell.cpp
- '::gotoIndex()' || nsDocShell.cpp
- '::Reload()' || nsDocShell.cpp
- '::EndPageLoad()' || nsDocShell.cpp
- '::RestoreFromHistory()' || nsDocShell.cpp
- '::OnNewURI()' || nsDocShell.cpp
SHEntry Component || QI for nsISHistoryInternal ||
- '::Expire()' || nsSHEntry.cpp
EmbedPrivate Component || public member mSessionHistory ||
- '::Realize()' || EmbedPrivate.cpp
WebBrowser Component || adds/removes SHistory listeners ||
- '::BindListener()' || nsWebBrowser.cpp
- '::UnBindListener()' || nsWebBrowser.cpp
- '::SetSessionHistory()' || nsWebBrowser.cpp
- '::GetSessionHistory()' || nsWebBrowser.cpp
- '::Create()' || nsWebBrowser.cpp
DocumentViewer Component || QI for nsISHistoryInternal ||
- '::Show()' || nsDocumentViewer.cpp
browser.js || .sessionHistory & .history ||
- '::prepareForStartup()' || browser.js
- '::gotoHistoryIndex()' || browser.js
- '::BrowserForward()' || browser.js
- '::BrowserBack()' || browser.js
- '::BrowserReloadWithFlags()' || browser.js
- '::gotoHistorFillHistoryMenuyIndex()' || browser.js
- '::getShortcutOrURI()' || browser.js
- '::BrowserSetForcedCharacterSet()' || browser.js
- '::undoCloseTab()' || browser.js
web-panels.js || .sessionHistory & .history ||
- '::PanelBrowserReload()' || web-panels.js
viewSource.js || .sessionhistory ||
- '::viewSource()' || viewSource.js
nsSessionStore.js || .history ||
- '::_collectTabData()' || nsSessionStore.js
- '::_serializeSessionStorage()' || nsSessionStore.js
- '::restoreHistory()' || nsSessionStore.js
help.js || .history ||
nsLoginManagerPrompter.js || .history ||
- '::_getNotifyBox()' || nsLoginManagerPrompter.js
contentAreaUtils.js || .history ||
- '::_getPostData()' || contentAreaUtils.js
Places using Session History Listener
SHistoryInternal interface || attribute listener ||
DocShell || nsComPtr listener||
- '::Reload()' || nsDocShell.cpp
WebBrowser || QI for nsISHistoryListener ||
- '::bindListener()' || nsWebBrowser.cpp
WebBrowserChrome || derives from nsISHistoryListener ||
Other places
FrameLoader || nsComPtr ourHistory || nsFrameLoader.cpp
- but it does NOT yet do anything useful with it. Take a look. (Sure it does. It bails out in cases when the swap would completely screw up session history. -bz)