зеркало из https://github.com/mozilla/pjs.git
Fix for bug 59774. Save scrollbar positions in sessionhistory when jumping from one anchor to another in a page. r=adamlock sr=alecf a=asa. Approved by ADT.
This commit is contained in:
Родитель
0e044cb465
Коммит
784eaea912
|
@ -95,6 +95,10 @@ attribute boolean saveLayoutStateFlag;
|
|||
/** attribute to indicate whether the page is already expired in cache */
|
||||
attribute boolean expirationStatus;
|
||||
|
||||
/** Set/Get scrollers' positon in anchored pages */
|
||||
void setScrollPosition(in PRInt32 x, in PRInt32 y);
|
||||
void getScrollPosition(out PRInt32 x, out PRInt32 y);
|
||||
|
||||
/** Additional ways to create an entry */
|
||||
void create(in nsIURI aURI, in wstring aTitle, in nsIDOMDocument aDocument,
|
||||
in nsIInputStream aInputStream, in nsILayoutHistoryState aHistoryLayoutState,
|
||||
|
|
|
@ -69,6 +69,21 @@ NS_INTERFACE_MAP_END
|
|||
//*****************************************************************************
|
||||
// nsSHEntry: nsISHEntry
|
||||
//*****************************************************************************
|
||||
NS_IMETHODIMP nsSHEntry::SetScrollPosition(PRInt32 x, PRInt32 y)
|
||||
{
|
||||
mScrollPositionX = x;
|
||||
mScrollPositionY = y;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsSHEntry::GetScrollPosition(PRInt32 *x, PRInt32 *y)
|
||||
{
|
||||
if (x && y) {
|
||||
*x = mScrollPositionX;
|
||||
*y = mScrollPositionY;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsSHEntry::GetURI(nsIURI** aURI)
|
||||
{
|
||||
|
|
|
@ -57,13 +57,15 @@ private:
|
|||
|
||||
nsCOMPtr<nsIURI> mURI;
|
||||
nsCOMPtr<nsIURI> mReferrerURI;
|
||||
nsCOMPtr<nsIDOMDocument> mDocument;
|
||||
nsString mTitle;
|
||||
nsCOMPtr<nsIInputStream> mPostData;
|
||||
nsCOMPtr<nsILayoutHistoryState> mLayoutHistoryState;
|
||||
nsVoidArray mChildren;
|
||||
PRUint32 mLoadType;
|
||||
PRUint32 mID;
|
||||
nsCOMPtr<nsIDOMDocument> mDocument;
|
||||
nsString mTitle;
|
||||
nsCOMPtr<nsIInputStream> mPostData;
|
||||
nsCOMPtr<nsILayoutHistoryState> mLayoutHistoryState;
|
||||
nsVoidArray mChildren;
|
||||
PRUint32 mLoadType;
|
||||
PRUint32 mID;
|
||||
PRInt32 mScrollPositionX;
|
||||
PRInt32 mScrollPositionY;
|
||||
PRPackedBool mIsFrameNavigation;
|
||||
PRPackedBool mSaveLayoutState;
|
||||
PRPackedBool mExpired;
|
||||
|
|
Загрузка…
Ссылка в новой задаче