зеркало из https://github.com/mozilla/pjs.git
Bug 597315 Part 1 (session history) - Frameset history does not work properly when restoring a tab [r=bz, a=blocking2.0:betaN+]
This commit is contained in:
Родитель
22fdc2e382
Коммит
846d176b60
|
@ -178,3 +178,9 @@ interface nsISHistory: nsISupports
|
||||||
*/
|
*/
|
||||||
readonly attribute nsISimpleEnumerator SHistoryEnumerator;
|
readonly attribute nsISimpleEnumerator SHistoryEnumerator;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[scriptable, uuid(ac8b3eb3-2051-4cce-8303-d6e7938501dd)]
|
||||||
|
interface nsISHistory_2_0_BRANCH: nsISHistory
|
||||||
|
{
|
||||||
|
void reloadCurrentEntry();
|
||||||
|
};
|
||||||
|
|
|
@ -153,6 +153,7 @@ NS_INTERFACE_MAP_BEGIN(nsSHistory)
|
||||||
NS_INTERFACE_MAP_ENTRY(nsISHistory)
|
NS_INTERFACE_MAP_ENTRY(nsISHistory)
|
||||||
NS_INTERFACE_MAP_ENTRY(nsIWebNavigation)
|
NS_INTERFACE_MAP_ENTRY(nsIWebNavigation)
|
||||||
NS_INTERFACE_MAP_ENTRY(nsISHistoryInternal)
|
NS_INTERFACE_MAP_ENTRY(nsISHistoryInternal)
|
||||||
|
NS_INTERFACE_MAP_ENTRY(nsISHistory_2_0_BRANCH)
|
||||||
NS_INTERFACE_MAP_END
|
NS_INTERFACE_MAP_END
|
||||||
|
|
||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
|
@ -796,6 +797,25 @@ nsSHistory::Reload(PRUint32 aReloadFlags)
|
||||||
return LoadEntry(mIndex, loadType, HIST_CMD_RELOAD);
|
return LoadEntry(mIndex, loadType, HIST_CMD_RELOAD);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NS_IMETHODIMP
|
||||||
|
nsSHistory::ReloadCurrentEntry()
|
||||||
|
{
|
||||||
|
// Notify listeners
|
||||||
|
PRBool canNavigate = PR_TRUE;
|
||||||
|
if (mListener) {
|
||||||
|
nsCOMPtr<nsISHistoryListener> listener(do_QueryReferent(mListener));
|
||||||
|
if (listener) {
|
||||||
|
nsCOMPtr<nsIURI> currentURI;
|
||||||
|
GetCurrentURI(getter_AddRefs(currentURI));
|
||||||
|
listener->OnHistoryGotoIndex(mIndex, currentURI, &canNavigate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!canNavigate)
|
||||||
|
return NS_OK;
|
||||||
|
|
||||||
|
return LoadEntry(mIndex, nsIDocShellLoadInfo::loadHistory, HIST_CMD_RELOAD);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsSHistory::EvictWindowContentViewers(PRInt32 aFromIndex, PRInt32 aToIndex)
|
nsSHistory::EvictWindowContentViewers(PRInt32 aFromIndex, PRInt32 aToIndex)
|
||||||
{
|
{
|
||||||
|
|
|
@ -62,7 +62,7 @@ class nsIDocShell;
|
||||||
class nsSHEnumerator;
|
class nsSHEnumerator;
|
||||||
class nsSHistoryObserver;
|
class nsSHistoryObserver;
|
||||||
class nsSHistory: public PRCList,
|
class nsSHistory: public PRCList,
|
||||||
public nsISHistory,
|
public nsISHistory_2_0_BRANCH,
|
||||||
public nsISHistoryInternal,
|
public nsISHistoryInternal,
|
||||||
public nsIWebNavigation
|
public nsIWebNavigation
|
||||||
{
|
{
|
||||||
|
@ -73,6 +73,7 @@ public:
|
||||||
NS_DECL_NSISHISTORY
|
NS_DECL_NSISHISTORY
|
||||||
NS_DECL_NSISHISTORYINTERNAL
|
NS_DECL_NSISHISTORYINTERNAL
|
||||||
NS_DECL_NSIWEBNAVIGATION
|
NS_DECL_NSIWEBNAVIGATION
|
||||||
|
NS_DECL_NSISHISTORY_2_0_BRANCH
|
||||||
|
|
||||||
// One time initialization method called upon docshell module construction
|
// One time initialization method called upon docshell module construction
|
||||||
static nsresult Startup();
|
static nsresult Startup();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче