зеркало из https://github.com/mozilla/gecko-dev.git
Separate out the concepts of "history entries separated by just a scroll" and
"history entries with the same postdata". The latter is implied by the former, but not conversely. Bug 264964, r=biesi, sr=darin
This commit is contained in:
Родитель
e117f7c124
Коммит
d043a3ce48
|
@ -49,7 +49,7 @@
|
|||
interface nsILayoutHistoryState;
|
||||
interface nsIDOMDocument;
|
||||
|
||||
[scriptable, uuid(65281BA1-988A-11d3-BDC7-0050040A9B44)]
|
||||
[scriptable, uuid(6b596e1f-a3bd-40f9-a7ee-ab3edc7f9960)]
|
||||
interface nsISHEntry : nsISupports
|
||||
{
|
||||
|
||||
|
@ -86,6 +86,16 @@ attribute unsigned long loadType;
|
|||
*/
|
||||
attribute unsigned long ID;
|
||||
|
||||
/**
|
||||
* pageIdentifier is an integer that should be the same for two entries
|
||||
* attached to the same docshell only if the two entries are entries for the
|
||||
* same page in the sense that one could go from the state represented by one
|
||||
* to the state represented by the other simply by scrolling (so the entries
|
||||
* are separated by an anchor traversal or a subframe navigation in some other
|
||||
* frame).
|
||||
*/
|
||||
attribute unsigned long pageIdentifier;
|
||||
|
||||
/** attribute to set and get the cache key for the entry */
|
||||
attribute nsISupports cacheKey;
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@ static PRUint32 gEntryID = 0;
|
|||
nsSHEntry::nsSHEntry()
|
||||
: mLoadType(0)
|
||||
, mID(gEntryID++)
|
||||
, mPageIdentifier(mID)
|
||||
, mScrollPositionX(0)
|
||||
, mScrollPositionY(0)
|
||||
, mIsFrameNavigation(PR_FALSE)
|
||||
|
@ -70,6 +71,7 @@ nsSHEntry::nsSHEntry(const nsSHEntry &other)
|
|||
, mLayoutHistoryState(other.mLayoutHistoryState)
|
||||
, mLoadType(0) // XXX why not copy?
|
||||
, mID(other.mID)
|
||||
, mPageIdentifier(other.mPageIdentifier)
|
||||
, mScrollPositionX(0) // XXX why not copy?
|
||||
, mScrollPositionY(0) // XXX why not copy?
|
||||
, mIsFrameNavigation(other.mIsFrameNavigation)
|
||||
|
@ -215,6 +217,18 @@ NS_IMETHODIMP nsSHEntry::SetID(PRUint32 aID)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsSHEntry::GetPageIdentifier(PRUint32 * aResult)
|
||||
{
|
||||
*aResult = mPageIdentifier;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsSHEntry::SetPageIdentifier(PRUint32 aPageIdentifier)
|
||||
{
|
||||
mPageIdentifier = aPageIdentifier;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsSHEntry::GetIsSubFrame(PRBool * aFlag)
|
||||
{
|
||||
*aFlag = mIsFrameNavigation;
|
||||
|
|
|
@ -80,6 +80,7 @@ private:
|
|||
nsCOMArray<nsISHEntry> mChildren;
|
||||
PRUint32 mLoadType;
|
||||
PRUint32 mID;
|
||||
PRUint32 mPageIdentifier;
|
||||
PRInt32 mScrollPositionX;
|
||||
PRInt32 mScrollPositionY;
|
||||
PRPackedBool mIsFrameNavigation;
|
||||
|
|
Загрузка…
Ссылка в новой задаче