From 9a38cbd61b8a4d715d4f88fbe7b9f2b322eeb760 Mon Sep 17 00:00:00 2001 From: "cbiesinger%web.de" Date: Fri, 18 Jun 2004 14:54:56 +0000 Subject: [PATCH] bug 227313 patch by Ludovic Hirlimann r+sr=roc remove unused code related to PresShell::ScrollFrameIntoView(nsIFrame*) --- layout/base/nsPresShell.cpp | 23 +---------------------- layout/base/public/nsIFocusTracker.h | 6 ------ layout/html/base/src/nsPresShell.cpp | 23 +---------------------- 3 files changed, 2 insertions(+), 50 deletions(-) diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index c01a766c7e8..782dd9818d7 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -1231,8 +1231,6 @@ public: nsEventStatus* aStatus); NS_IMETHOD ResizeReflow(nsIView *aView, nscoord aWidth, nscoord aHeight); - //nsIFocusTracker interface - NS_IMETHOD ScrollFrameIntoView(nsIFrame *aFrame); // caret handling NS_IMETHOD GetCaret(nsICaret **aOutCaret); NS_IMETHOD SetCaretEnabled(PRBool aInEnable); @@ -1413,7 +1411,6 @@ protected: nsCOMPtr mSelection; nsCOMPtr mCaret; PRInt16 mSelectionFlags; - PRPackedBool mScrollingEnabled; //used to disable programmable scrolling from outside PRPackedBool mBatchReflows; // When set to true, the pres shell batches reflow commands. PresShellViewEventListener *mViewEventListener; nsCOMPtr mEventQueueService; @@ -1468,11 +1465,6 @@ private: void FreeDynamicStack(); - //helper funcs for disabing autoscrolling - void DisableScrolling(){mScrollingEnabled = PR_FALSE;} - void EnableScrolling(){mScrollingEnabled = PR_TRUE;} - PRBool IsScrollingEnabled(){return mScrollingEnabled;} - //helper funcs for event handling nsIFrame* GetCurrentEventFrame(); void PushCurrentEventInfo(nsIFrame* aFrame, nsIContent* aContent); @@ -1612,8 +1604,7 @@ PresShell::PresShell(): #ifdef IBMBIDI mBidiLevel(BIDI_LEVEL_UNDEFINED), #endif - mEnablePrefStyleSheet(PR_TRUE), - mScrollingEnabled(PR_TRUE) + mEnablePrefStyleSheet(PR_TRUE) { #ifdef MOZ_REFLOW_PERF mReflowCountMgr = new ReflowCountMgr(); @@ -3128,18 +3119,6 @@ PresShell::FireResizeEvent() } } -NS_IMETHODIMP -PresShell::ScrollFrameIntoView(nsIFrame *aFrame) -{ - if (!aFrame) - return NS_ERROR_NULL_POINTER; - - if (IsScrollingEnabled()) - return ScrollFrameIntoView(aFrame, NS_PRESSHELL_SCROLL_ANYWHERE, - NS_PRESSHELL_SCROLL_ANYWHERE); - return NS_OK; -} - NS_IMETHODIMP PresShell::SetIgnoreFrameDestruction(PRBool aIgnore) { diff --git a/layout/base/public/nsIFocusTracker.h b/layout/base/public/nsIFocusTracker.h index ce0a48b169e..7ab3e15f7bd 100644 --- a/layout/base/public/nsIFocusTracker.h +++ b/layout/base/public/nsIFocusTracker.h @@ -55,12 +55,6 @@ class nsIFocusTracker : public nsISupports public: NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFOCUSTRACKER_IID) - /** ScrollFrameIntoView - * limited version of nsPresShell::ScrollFrameIntoView - * @param aFrame will be the frame to scroll into view. - */ - NS_IMETHOD ScrollFrameIntoView(nsIFrame *aFrame) = 0; - /** * Returns the primary frame associated with the content object. * diff --git a/layout/html/base/src/nsPresShell.cpp b/layout/html/base/src/nsPresShell.cpp index c01a766c7e8..782dd9818d7 100644 --- a/layout/html/base/src/nsPresShell.cpp +++ b/layout/html/base/src/nsPresShell.cpp @@ -1231,8 +1231,6 @@ public: nsEventStatus* aStatus); NS_IMETHOD ResizeReflow(nsIView *aView, nscoord aWidth, nscoord aHeight); - //nsIFocusTracker interface - NS_IMETHOD ScrollFrameIntoView(nsIFrame *aFrame); // caret handling NS_IMETHOD GetCaret(nsICaret **aOutCaret); NS_IMETHOD SetCaretEnabled(PRBool aInEnable); @@ -1413,7 +1411,6 @@ protected: nsCOMPtr mSelection; nsCOMPtr mCaret; PRInt16 mSelectionFlags; - PRPackedBool mScrollingEnabled; //used to disable programmable scrolling from outside PRPackedBool mBatchReflows; // When set to true, the pres shell batches reflow commands. PresShellViewEventListener *mViewEventListener; nsCOMPtr mEventQueueService; @@ -1468,11 +1465,6 @@ private: void FreeDynamicStack(); - //helper funcs for disabing autoscrolling - void DisableScrolling(){mScrollingEnabled = PR_FALSE;} - void EnableScrolling(){mScrollingEnabled = PR_TRUE;} - PRBool IsScrollingEnabled(){return mScrollingEnabled;} - //helper funcs for event handling nsIFrame* GetCurrentEventFrame(); void PushCurrentEventInfo(nsIFrame* aFrame, nsIContent* aContent); @@ -1612,8 +1604,7 @@ PresShell::PresShell(): #ifdef IBMBIDI mBidiLevel(BIDI_LEVEL_UNDEFINED), #endif - mEnablePrefStyleSheet(PR_TRUE), - mScrollingEnabled(PR_TRUE) + mEnablePrefStyleSheet(PR_TRUE) { #ifdef MOZ_REFLOW_PERF mReflowCountMgr = new ReflowCountMgr(); @@ -3128,18 +3119,6 @@ PresShell::FireResizeEvent() } } -NS_IMETHODIMP -PresShell::ScrollFrameIntoView(nsIFrame *aFrame) -{ - if (!aFrame) - return NS_ERROR_NULL_POINTER; - - if (IsScrollingEnabled()) - return ScrollFrameIntoView(aFrame, NS_PRESSHELL_SCROLL_ANYWHERE, - NS_PRESSHELL_SCROLL_ANYWHERE); - return NS_OK; -} - NS_IMETHODIMP PresShell::SetIgnoreFrameDestruction(PRBool aIgnore) {