Bug 1531173 - Drop nsIContentViewer.scrollToNode. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D21458

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Hiroyuki Ikezoe 2019-02-28 01:31:47 +00:00
parent 1c7e3fffd8
commit 163a45f495
2 changed files with 0 additions and 26 deletions

View File

@ -232,10 +232,6 @@ interface nsIContentViewer : nsISupports
* Set collector for navigation timing data (load, unload events).
*/
[noscript,notxpcom,nostdcall] void setNavigationTiming(in nsDOMNavigationTimingPtr aTiming);
/*
Scrolls to a given DOM content node.
*/
void scrollToNode(in Node node);
/** The amount by which to scale all text. Default is 1.0. */
attribute float textZoom;

View File

@ -2672,28 +2672,6 @@ NS_IMETHODIMP nsDocumentViewer::SetCommandNode(nsINode* aNode) {
return NS_OK;
}
NS_IMETHODIMP nsDocumentViewer::ScrollToNode(nsINode* aNode) {
NS_ENSURE_ARG(aNode);
NS_ENSURE_TRUE(mDocument, NS_ERROR_NOT_AVAILABLE);
nsCOMPtr<nsIPresShell> presShell = GetPresShell();
// Get the nsIContent interface, because that's what we need to
// get the primary frame
nsCOMPtr<nsIContent> content(do_QueryInterface(aNode));
NS_ENSURE_TRUE(content, NS_ERROR_FAILURE);
// Tell the PresShell to scroll to the primary frame of the content.
NS_ENSURE_SUCCESS(
presShell->ScrollContentIntoView(
content,
nsIPresShell::ScrollAxis(nsIPresShell::SCROLL_TOP,
nsIPresShell::SCROLL_ALWAYS),
nsIPresShell::ScrollAxis(), nsIPresShell::SCROLL_OVERFLOW_HIDDEN),
NS_ERROR_FAILURE);
return NS_OK;
}
void nsDocumentViewer::CallChildren(CallChildFunc aFunc, void* aClosure) {
nsCOMPtr<nsIDocShell> docShell(mContainer);
if (docShell) {