From 74d906dbdff28c3c3f3dab10680b032e5986df1b Mon Sep 17 00:00:00 2001 From: "tbogard%aol.net" Date: Sun, 31 Oct 1999 02:05:21 +0000 Subject: [PATCH] Fixed changes to use the GetPresShell rather than using the now removed member variable. git-svn-id: svn://10.0.0.236/trunk@52348 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/html/nsHTMLDocShell.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mozilla/docshell/html/nsHTMLDocShell.cpp b/mozilla/docshell/html/nsHTMLDocShell.cpp index 48573dce194..f89ef0e0747 100644 --- a/mozilla/docshell/html/nsHTMLDocShell.cpp +++ b/mozilla/docshell/html/nsHTMLDocShell.cpp @@ -84,7 +84,9 @@ NS_IMETHODIMP nsHTMLDocShell::CanHandleContentType(const PRUnichar* contentType, NS_IMETHODIMP nsHTMLDocShell::ScrollToNode(nsIDOMNode* aNode) { NS_ENSURE_ARG(aNode); - NS_ENSURE_STATE(mPresShell); + NS_ENSURE_STATE(mContentViewer); + nsCOMPtr presShell; + NS_ENSURE_SUCCESS(GetPresShell(getter_AddRefs(presShell)), NS_ERROR_FAILURE); // Get the nsIContent interface, because that's what we need to // get the primary frame @@ -99,7 +101,7 @@ NS_IMETHODIMP nsHTMLDocShell::ScrollToNode(nsIDOMNode* aNode) NS_ERROR_FAILURE); // tell the pres shell to scroll to the frame - NS_ENSURE_SUCCESS(mPresShell->ScrollFrameIntoView(frame, + NS_ENSURE_SUCCESS(presShell->ScrollFrameIntoView(frame, NS_PRESSHELL_SCROLL_TOP, NS_PRESSHELL_SCROLL_ANYWHERE), NS_ERROR_FAILURE); return NS_OK; } @@ -283,7 +285,9 @@ NS_IMETHODIMP nsHTMLDocShell::SizeToContent() */ NS_IMETHODIMP nsHTMLDocShell::SelectAll() { - NS_ENSURE_STATE(mPresShell); + NS_ENSURE_STATE(mContentViewer); + nsCOMPtr presShell; + NS_ENSURE_SUCCESS(GetPresShell(getter_AddRefs(presShell)), NS_ERROR_FAILURE); /* XXX Implement - There is something not quite right with the objects being retrieved. bodyNode isn't defined and bodyElement isn't used and nor is node.