mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1480641 - Remove nsITextScroll; r=nika
Summary: Implemented by nsDocShell and nsWebBrowser (which just wraps the docshell functions), but not actually used anywhere. MozReview-Commit-ID: 2YzfsrvOolX Test Plan: Try run Reviewers: nika Tags: #secure-revision Bug #: 1480641 Differential Revision: https://phabricator.services.mozilla.com/D2695
This commit is contained in:
parent
16ec846afc
commit
3b913b0f12
@ -48,7 +48,6 @@ XPIDL_SOURCES += [
|
||||
'nsIReflowObserver.idl',
|
||||
'nsIRefreshURI.idl',
|
||||
'nsIScrollable.idl',
|
||||
'nsITextScroll.idl',
|
||||
'nsITooltipListener.idl',
|
||||
'nsITooltipTextProvider.idl',
|
||||
'nsIURIFixup.idl',
|
||||
|
@ -520,7 +520,6 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsDocShell)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIWebNavigation)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIBaseWindow)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIScrollable)
|
||||
NS_INTERFACE_MAP_ENTRY(nsITextScroll)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIRefreshURI)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIWebProgressListener)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
|
||||
@ -6087,32 +6086,6 @@ nsDocShell::GetScrollbarVisibility(bool* aVerticalVisible,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
// nsDocShell::nsITextScroll
|
||||
//*****************************************************************************
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::ScrollByLines(int32_t aNumLines)
|
||||
{
|
||||
nsIScrollableFrame* sf = GetRootScrollFrame();
|
||||
NS_ENSURE_TRUE(sf, NS_ERROR_FAILURE);
|
||||
|
||||
sf->ScrollBy(nsIntPoint(0, aNumLines), nsIScrollableFrame::LINES,
|
||||
nsIScrollableFrame::SMOOTH);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::ScrollByPages(int32_t aNumPages)
|
||||
{
|
||||
nsIScrollableFrame* sf = GetRootScrollFrame();
|
||||
NS_ENSURE_TRUE(sf, NS_ERROR_FAILURE);
|
||||
|
||||
sf->ScrollBy(nsIntPoint(0, aNumPages), nsIScrollableFrame::PAGES,
|
||||
nsIScrollableFrame::SMOOTH);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
// nsDocShell::nsIRefreshURI
|
||||
//*****************************************************************************
|
||||
|
@ -34,7 +34,6 @@
|
||||
#include "nsIRefreshURI.h"
|
||||
#include "nsIScrollable.h"
|
||||
#include "nsITabParent.h"
|
||||
#include "nsITextScroll.h"
|
||||
#include "nsIWebNavigation.h"
|
||||
#include "nsIWebPageDescriptor.h"
|
||||
#include "nsIWebProgressListener.h"
|
||||
@ -121,7 +120,6 @@ class nsDocShell final
|
||||
, public nsIWebNavigation
|
||||
, public nsIBaseWindow
|
||||
, public nsIScrollable
|
||||
, public nsITextScroll
|
||||
, public nsIRefreshURI
|
||||
, public nsIWebProgressListener
|
||||
, public nsIWebPageDescriptor
|
||||
@ -170,7 +168,6 @@ public:
|
||||
NS_DECL_NSIWEBNAVIGATION
|
||||
NS_DECL_NSIBASEWINDOW
|
||||
NS_DECL_NSISCROLLABLE
|
||||
NS_DECL_NSITEXTSCROLL
|
||||
NS_DECL_NSIINTERFACEREQUESTOR
|
||||
NS_DECL_NSIWEBPROGRESSLISTENER
|
||||
NS_DECL_NSIREFRESHURI
|
||||
|
@ -1,33 +0,0 @@
|
||||
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
/**
|
||||
* The nsITextScroll is an interface that can be implemented by a control that
|
||||
* supports text scrolling.
|
||||
*/
|
||||
|
||||
[scriptable, uuid(067B28A0-877F-11d3-AF7E-00A024FFC08C)]
|
||||
interface nsITextScroll : nsISupports
|
||||
{
|
||||
/**
|
||||
* Scroll the view up or down by aNumLines lines. positive
|
||||
* values move down in the view. Prevents scrolling off the
|
||||
* end of the view.
|
||||
* @param numLines number of lines to scroll the view by
|
||||
*/
|
||||
void scrollByLines(in long numLines);
|
||||
|
||||
/**
|
||||
* Scroll the view up or down by numPages pages. a page
|
||||
* is considered to be the amount displayed by the clip view.
|
||||
* positive values move down in the view. Prevents scrolling
|
||||
* off the end of the view.
|
||||
* @param numPages number of pages to scroll the view by
|
||||
*/
|
||||
void scrollByPages(in long numPages);
|
||||
};
|
@ -113,7 +113,6 @@ NS_IMPL_CYCLE_COLLECTION(nsWebBrowser,
|
||||
mDocShellAsWin,
|
||||
mDocShellAsNav,
|
||||
mDocShellAsScrollable,
|
||||
mDocShellAsTextScroll,
|
||||
mWebProgress)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsWebBrowser)
|
||||
@ -122,7 +121,6 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsWebBrowser)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIWebNavigation)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIBaseWindow)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIScrollable)
|
||||
NS_INTERFACE_MAP_ENTRY(nsITextScroll)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDocShellTreeItem)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIInterfaceRequestor)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIWebBrowserPersist)
|
||||
@ -1559,26 +1557,6 @@ nsWebBrowser::GetScrollbarVisibility(bool* aVerticalVisible,
|
||||
aHorizontalVisible);
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
// nsWebBrowser::nsITextScroll
|
||||
//*****************************************************************************
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWebBrowser::ScrollByLines(int32_t aNumLines)
|
||||
{
|
||||
NS_ENSURE_STATE(mDocShell);
|
||||
|
||||
return mDocShellAsTextScroll->ScrollByLines(aNumLines);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWebBrowser::ScrollByPages(int32_t aNumPages)
|
||||
{
|
||||
NS_ENSURE_STATE(mDocShell);
|
||||
|
||||
return mDocShellAsTextScroll->ScrollByPages(aNumPages);
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
// nsWebBrowser: Listener Helpers
|
||||
//*****************************************************************************
|
||||
@ -1598,9 +1576,8 @@ nsWebBrowser::SetDocShell(nsIDocShell* aDocShell)
|
||||
nsCOMPtr<nsIBaseWindow> baseWin(do_QueryInterface(aDocShell));
|
||||
nsCOMPtr<nsIWebNavigation> nav(do_QueryInterface(aDocShell));
|
||||
nsCOMPtr<nsIScrollable> scrollable(do_QueryInterface(aDocShell));
|
||||
nsCOMPtr<nsITextScroll> textScroll(do_QueryInterface(aDocShell));
|
||||
nsCOMPtr<nsIWebProgress> progress(do_GetInterface(aDocShell));
|
||||
NS_ENSURE_TRUE(req && baseWin && nav && scrollable && textScroll && progress,
|
||||
NS_ENSURE_TRUE(req && baseWin && nav && scrollable && progress,
|
||||
NS_ERROR_FAILURE);
|
||||
|
||||
mDocShell = aDocShell;
|
||||
@ -1608,7 +1585,6 @@ nsWebBrowser::SetDocShell(nsIDocShell* aDocShell)
|
||||
mDocShellAsWin = baseWin;
|
||||
mDocShellAsNav = nav;
|
||||
mDocShellAsScrollable = scrollable;
|
||||
mDocShellAsTextScroll = textScroll;
|
||||
mWebProgress = progress;
|
||||
|
||||
// By default, do not allow DNS prefetch, so we don't break our frozen
|
||||
@ -1633,7 +1609,6 @@ nsWebBrowser::SetDocShell(nsIDocShell* aDocShell)
|
||||
mDocShellAsWin = nullptr;
|
||||
mDocShellAsNav = nullptr;
|
||||
mDocShellAsScrollable = nullptr;
|
||||
mDocShellAsTextScroll = nullptr;
|
||||
mWebProgress = nullptr;
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsIScrollable.h"
|
||||
#include "nsISHistory.h"
|
||||
#include "nsITextScroll.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsIWebProgress.h"
|
||||
#include "nsISecureBrowserUI.h"
|
||||
@ -72,7 +71,6 @@ class nsWebBrowser final : public nsIWebBrowser,
|
||||
public nsIDocShellTreeItem,
|
||||
public nsIBaseWindow,
|
||||
public nsIScrollable,
|
||||
public nsITextScroll,
|
||||
public nsIInterfaceRequestor,
|
||||
public nsIWebBrowserPersist,
|
||||
public nsIWebProgressListener,
|
||||
@ -110,7 +108,6 @@ public:
|
||||
NS_DECL_NSIDOCSHELLTREEITEM
|
||||
NS_DECL_NSIINTERFACEREQUESTOR
|
||||
NS_DECL_NSISCROLLABLE
|
||||
NS_DECL_NSITEXTSCROLL
|
||||
NS_DECL_NSIWEBBROWSER
|
||||
NS_DECL_NSIWEBNAVIGATION
|
||||
NS_DECL_NSIWEBBROWSERPERSIST
|
||||
@ -145,7 +142,6 @@ protected:
|
||||
nsCOMPtr<nsIBaseWindow> mDocShellAsWin;
|
||||
nsCOMPtr<nsIWebNavigation> mDocShellAsNav;
|
||||
nsCOMPtr<nsIScrollable> mDocShellAsScrollable;
|
||||
nsCOMPtr<nsITextScroll> mDocShellAsTextScroll;
|
||||
mozilla::OriginAttributes mOriginAttributes;
|
||||
|
||||
nsCOMPtr<nsIWidget> mInternalWidget;
|
||||
|
Loading…
Reference in New Issue
Block a user