diff --git a/mozilla/docshell/shistory/public/nsISHEntry.idl b/mozilla/docshell/shistory/public/nsISHEntry.idl index 8b7222025ee..f0f34c43ce8 100644 --- a/mozilla/docshell/shistory/public/nsISHEntry.idl +++ b/mozilla/docshell/shistory/public/nsISHEntry.idl @@ -61,6 +61,11 @@ attribute nsISHEntry parent; * when reload is pressed, it has the appropriate reload flag */ attribute unsigned long loadType; +/** + * An ID to help identify this entry from others during + * subframe navigation + */ +attribute unsigned long ID; /** Additional ways to create an entry */ void create(in nsIURI aURI, in wstring aTitle, in nsIDOMDocument aDocument, diff --git a/mozilla/docshell/shistory/src/nsSHEntry.cpp b/mozilla/docshell/shistory/src/nsSHEntry.cpp index d0c2c3c967a..0d9c9e9ea5f 100644 --- a/mozilla/docshell/shistory/src/nsSHEntry.cpp +++ b/mozilla/docshell/shistory/src/nsSHEntry.cpp @@ -25,6 +25,7 @@ #include "nsXPIDLString.h" #include "nsIDocShellLoadInfo.h" +PRUint32 gEntryID=0; //***************************************************************************** //*** nsSHEntry: Object Management //***************************************************************************** @@ -33,6 +34,7 @@ nsSHEntry::nsSHEntry() { NS_INIT_REFCNT(); mParent = nsnull; + mID = gEntryID++; } nsSHEntry::~nsSHEntry() @@ -163,6 +165,20 @@ NS_IMETHODIMP nsSHEntry::SetLoadType(PRUint32 aLoadType) return NS_OK; } +NS_IMETHODIMP nsSHEntry::GetID(PRUint32 * aResult) +{ + NS_ENSURE_ARG_POINTER(aResult); + + *aResult = mID; + return NS_OK; +} + +NS_IMETHODIMP nsSHEntry::SetID(PRUint32 aID) +{ + mID = aID; + return NS_OK; +} + nsresult nsSHEntry::Create(nsIURI * aURI, const PRUnichar * aTitle, nsIDOMDocument * aDOMDocument, nsIInputStream * aInputStream, nsILayoutHistoryState * aHistoryLayoutState) diff --git a/mozilla/docshell/shistory/src/nsSHEntry.h b/mozilla/docshell/shistory/src/nsSHEntry.h index 87d2ea2a88d..6210f2e407c 100644 --- a/mozilla/docshell/shistory/src/nsSHEntry.h +++ b/mozilla/docshell/shistory/src/nsSHEntry.h @@ -63,6 +63,7 @@ private: nsCOMPtr mLayoutHistoryState; nsVoidArray mChildren; PRUint32 mLoadType; + PRUint32 mID; nsISHEntry * mParent; // weak reference };