From cbb1b1854eb63581e04239e0d5112aef01c69ea9 Mon Sep 17 00:00:00 2001 From: "pollmann%netscape.com" Date: Wed, 14 Jun 2000 23:37:06 +0000 Subject: [PATCH] Bug 32770: Save scroll position in session history r=nisheeth --- layout/base/public/nsIStatefulFrame.h | 11 ++++++++++- layout/generic/nsIStatefulFrame.h | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/layout/base/public/nsIStatefulFrame.h b/layout/base/public/nsIStatefulFrame.h index 40424d7819d..ae37fcd11d8 100644 --- a/layout/base/public/nsIStatefulFrame.h +++ b/layout/base/public/nsIStatefulFrame.h @@ -19,7 +19,16 @@ class nsIStatefulFrame : public nsISupports { // If you implement nsIStatefulFrame, add an entry to this enum and use it // in your GetStateType method to prevent collisions. enum StateType {eNoType=-1, eCheckboxType, eFileType, eRadioType, eSelectType, - eTextType, eNumStateTypes}; + eTextType, eScrollType, eNumStateTypes}; + + // If you create a special type stateful frame (e.g. scroll) that needs + // to be captured outside of the standard pass through the frames, you'll need + // a special ID by which to refer to that type. + // + // There is space reserved between standard ID's and special ID's by the + // offset NS_CONTENT_ID_COUNTER_BASE + enum SpecialStateID {eNoID=0, eDocumentScrollState}; + NS_IMETHOD GetStateType(nsIPresContext* aPresContext, nsIStatefulFrame::StateType* aStateType) = 0; NS_IMETHOD SaveState(nsIPresContext* aPresContext, nsIPresState** aState) = 0; diff --git a/layout/generic/nsIStatefulFrame.h b/layout/generic/nsIStatefulFrame.h index 40424d7819d..ae37fcd11d8 100644 --- a/layout/generic/nsIStatefulFrame.h +++ b/layout/generic/nsIStatefulFrame.h @@ -19,7 +19,16 @@ class nsIStatefulFrame : public nsISupports { // If you implement nsIStatefulFrame, add an entry to this enum and use it // in your GetStateType method to prevent collisions. enum StateType {eNoType=-1, eCheckboxType, eFileType, eRadioType, eSelectType, - eTextType, eNumStateTypes}; + eTextType, eScrollType, eNumStateTypes}; + + // If you create a special type stateful frame (e.g. scroll) that needs + // to be captured outside of the standard pass through the frames, you'll need + // a special ID by which to refer to that type. + // + // There is space reserved between standard ID's and special ID's by the + // offset NS_CONTENT_ID_COUNTER_BASE + enum SpecialStateID {eNoID=0, eDocumentScrollState}; + NS_IMETHOD GetStateType(nsIPresContext* aPresContext, nsIStatefulFrame::StateType* aStateType) = 0; NS_IMETHOD SaveState(nsIPresContext* aPresContext, nsIPresState** aState) = 0;