зеркало из https://github.com/mozilla/pjs.git
Remove effectively-unused Set/GetScrollPreference API on nsIScrollableView.h. b=259617 r+sr=roc
This commit is contained in:
Родитель
a90452e0a2
Коммит
fa2cc9940e
|
@ -979,23 +979,4 @@ nsContentSink::StartLayout(PRBool aIsFrameset)
|
|||
mRef = Substring(start, end);
|
||||
}
|
||||
}
|
||||
|
||||
if (!mRef.IsEmpty() || aIsFrameset) {
|
||||
// Disable the scroll bars.
|
||||
for (i = 0; i < ns; i++) {
|
||||
nsIPresShell *shell = mDocument->GetShellAt(i);
|
||||
|
||||
nsIViewManager* vm = shell->GetViewManager();
|
||||
if (vm) {
|
||||
nsIView* rootView = nsnull;
|
||||
vm->GetRootView(rootView);
|
||||
nsIScrollableView* sview;
|
||||
CallQueryInterface(rootView, &sview);
|
||||
|
||||
if (sview) {
|
||||
sview->SetScrollPreference(nsScrollPreference_kNeverScroll);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6974,15 +6974,8 @@ PresShell::VerifyIncrementalReflow()
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Get our scrolling preference
|
||||
nsScrollPreference scrolling;
|
||||
nsIView* rootView;
|
||||
mViewManager->GetRootView(rootView);
|
||||
nsIScrollableView* scrollView;
|
||||
rv = rootView->QueryInterface(NS_GET_IID(nsIScrollableView),
|
||||
(void**)&scrollView);
|
||||
if (NS_SUCCEEDED (rv)) {
|
||||
scrollView->GetScrollPreference(scrolling);
|
||||
}
|
||||
void* nativeParentWidget = rootView->GetWidget()->GetNativeData(NS_NATIVE_WIDGET);
|
||||
|
||||
// Create a new view manager.
|
||||
|
|
|
@ -6974,15 +6974,8 @@ PresShell::VerifyIncrementalReflow()
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Get our scrolling preference
|
||||
nsScrollPreference scrolling;
|
||||
nsIView* rootView;
|
||||
mViewManager->GetRootView(rootView);
|
||||
nsIScrollableView* scrollView;
|
||||
rv = rootView->QueryInterface(NS_GET_IID(nsIScrollableView),
|
||||
(void**)&scrollView);
|
||||
if (NS_SUCCEEDED (rv)) {
|
||||
scrollView->GetScrollPreference(scrolling);
|
||||
}
|
||||
void* nativeParentWidget = rootView->GetWidget()->GetNativeData(NS_NATIVE_WIDGET);
|
||||
|
||||
// Create a new view manager.
|
||||
|
|
|
@ -259,8 +259,6 @@ nsScrollBoxFrame::CreateScrollingView(nsPresContext* aPresContext)
|
|||
nsIScrollableView* scrollingView;
|
||||
CallQueryInterface(view, &scrollingView);
|
||||
|
||||
scrollingView->SetScrollPreference(nsScrollPreference_kNeverScroll);
|
||||
|
||||
// Have the scrolling view create its internal widgets
|
||||
if (NeedsClipWidget()) {
|
||||
scrollingView->CreateScrollControls();
|
||||
|
|
|
@ -46,21 +46,13 @@ class nsIView;
|
|||
class nsIScrollPositionListener;
|
||||
struct nsMargin;
|
||||
|
||||
typedef enum {
|
||||
nsScrollPreference_kAuto = 0,
|
||||
nsScrollPreference_kNeverScroll,
|
||||
nsScrollPreference_kAlwaysScroll,
|
||||
nsScrollPreference_kAlwaysScrollHorizontal,
|
||||
nsScrollPreference_kAlwaysScrollVertical
|
||||
} nsScrollPreference;
|
||||
|
||||
// the percentage of the page that is scrolled on a page up or down
|
||||
#define PAGE_SCROLL_PERCENT 0.9
|
||||
|
||||
// IID for the nsIScrollableView interface
|
||||
#define NS_ISCROLLABLEVIEW_IID \
|
||||
{ 0xc95f1830, 0xc376, 0x11d1, \
|
||||
{ 0xb7, 0x21, 0x0, 0x60, 0x8, 0x91, 0xd8, 0xc9 } }
|
||||
{ 0x6d63ae50, 0x55c7, 0x47b9, \
|
||||
{ 0xad, 0x00, 0xe7, 0xa7, 0x79, 0x1e, 0x3d, 0x87 } }
|
||||
|
||||
/**
|
||||
* A scrolling view allows an arbitrary view that you supply to be scrolled
|
||||
|
@ -116,20 +108,6 @@ public:
|
|||
*/
|
||||
NS_IMETHOD GetScrolledView(nsIView *&aScrolledView) const = 0;
|
||||
|
||||
/**
|
||||
* Select whether scroll bars should be displayed all the time, never or
|
||||
* only when necessary.
|
||||
* @param aPref desired scrollbar selection
|
||||
*/
|
||||
NS_IMETHOD SetScrollPreference(nsScrollPreference aPref) = 0;
|
||||
|
||||
/**
|
||||
* Query whether scroll bars should be displayed all the time, never or
|
||||
* only when necessary.
|
||||
* @return current scrollbar selection
|
||||
*/
|
||||
NS_IMETHOD GetScrollPreference(nsScrollPreference& aScrollPreference) const = 0;
|
||||
|
||||
/**
|
||||
* Get the position of the scrolled view.
|
||||
*/
|
||||
|
|
|
@ -193,16 +193,6 @@ NS_IMETHODIMP nsScrollPortView::GetContainerSize(nscoord *aWidth, nscoord *aHeig
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsScrollPortView::SetScrollPreference(nsScrollPreference aPref)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsScrollPortView::GetScrollPreference(nsScrollPreference &aScrollPreference) const
|
||||
{
|
||||
return nsScrollPreference_kNeverScroll;
|
||||
}
|
||||
|
||||
static void ComputeVelocities(PRInt32 aCurVelocity, nscoord aCurPos, nscoord aDstPos,
|
||||
PRInt32* aVelocities, float aT2P, float aP2T) {
|
||||
// scrolling always works in units of whole pixels. So compute velocities
|
||||
|
|
|
@ -66,8 +66,6 @@ public:
|
|||
NS_IMETHOD SetScrolledView(nsIView *aScrolledView);
|
||||
NS_IMETHOD GetScrolledView(nsIView *&aScrolledView) const;
|
||||
|
||||
NS_IMETHOD SetScrollPreference(nsScrollPreference aPref);
|
||||
NS_IMETHOD GetScrollPreference(nsScrollPreference &aScrollPreference) const;
|
||||
NS_IMETHOD GetScrollPosition(nscoord &aX, nscoord &aY) const;
|
||||
NS_IMETHOD ScrollTo(nscoord aX, nscoord aY, PRUint32 aUpdateFlags);
|
||||
NS_IMETHOD GetScrollbarVisibility(PRBool *aVerticalVisible,
|
||||
|
|
Загрузка…
Ссылка в новой задаче