Bug 1406161 - Part 3: Remove a dead member function. r?smaug
MozReview-Commit-ID: LYNUZhvnAdm
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -13734,44 +13734,16 @@ nsDocShell::GetPromptAndStringBundle(nsI
NS_ENSURE_SUCCESS(
stringBundleService->CreateBundle(kAppstringsBundleURL, aStringBundle),
NS_ERROR_FAILURE);
return NS_OK;
}
-NS_IMETHODIMP
-nsDocShell::GetChildOffset(nsIDOMNode* aChild, nsIDOMNode* aParent,
- int32_t* aOffset)
-{
- NS_ENSURE_ARG_POINTER(aChild || aParent);
-
- nsCOMPtr<nsIDOMNodeList> childNodes;
- NS_ENSURE_SUCCESS(aParent->GetChildNodes(getter_AddRefs(childNodes)),
- NS_ERROR_FAILURE);
- NS_ENSURE_TRUE(childNodes, NS_ERROR_FAILURE);
-
- int32_t i = 0;
-
- for (; true; i++) {
- nsCOMPtr<nsIDOMNode> childNode;
- NS_ENSURE_SUCCESS(childNodes->Item(i, getter_AddRefs(childNode)),
- NS_ERROR_FAILURE);
- NS_ENSURE_TRUE(childNode, NS_ERROR_FAILURE);
-
- if (childNode.get() == aChild) {
- *aOffset = i;
- return NS_OK;
- }
- }
-
- return NS_ERROR_FAILURE;
-}
-
nsIScrollableFrame*
nsDocShell::GetRootScrollFrame()
{
nsCOMPtr<nsIPresShell> shell = GetPresShell();
NS_ENSURE_TRUE(shell, nullptr);
return shell->GetRootScrollFrameAsScrollable();
}
--- a/docshell/base/nsDocShell.h
+++ b/docshell/base/nsDocShell.h
@@ -904,19 +904,16 @@ private: // member functions
// children docshells.
void FirePageHideNotificationInternal(bool aIsUnload,
bool aSkipCheckingDynEntries);
// Dispatch a runnable to the TabGroup associated to this docshell.
nsresult DispatchToTabGroup(mozilla::TaskCategory aCategory,
already_AddRefed<nsIRunnable>&& aRunnable);
- NS_IMETHOD GetChildOffset(nsIDOMNode* aChild, nsIDOMNode* aParent,
- int32_t* aOffset);
-
void SetupReferrerFromChannel(nsIChannel* aChannel);
void SetReferrerURI(nsIURI* aURI);
void SetReferrerPolicy(uint32_t aReferrerPolicy);
void ReattachEditorToWindow(nsISHEntry* aSHEntry);
void RecomputeCanExecuteScripts();
void ClearFrameHistory(nsISHEntry* aEntry);
void UpdateGlobalHistoryTitle(nsIURI* aURI);
bool IsFrame();