Bug 1480628 - Remove nsIWebShellServices; r=nika

Summary:
nsIWebShellServices is only implemented by nsDocShell, and only used
in one place in C++. Move definitions to nsIDocShell, and rename
functions to show they are only used as part of Charset changes.

MozReview-Commit-ID: DOSeE3Doc51

Test Plan: Try run

Reviewers: nika

Tags: #secure-revision

Bug #: 1480628

Differential Revision: https://phabricator.services.mozilla.com/D2692
This commit is contained in:
Kyle Machulis
2018-08-02 16:42:00 -07:00
parent 1e4899ff89
commit 46398272f6
6 changed files with 22 additions and 55 deletions

View File

@@ -527,7 +527,6 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsDocShell)
NS_INTERFACE_MAP_ENTRY(nsIWebPageDescriptor)
NS_INTERFACE_MAP_ENTRY(nsIAuthPromptProvider)
NS_INTERFACE_MAP_ENTRY(nsILoadContext)
NS_INTERFACE_MAP_ENTRY(nsIWebShellServices)
NS_INTERFACE_MAP_ENTRY(nsILinkHandler)
NS_INTERFACE_MAP_ENTRY(nsIClipboardCommands)
NS_INTERFACE_MAP_ENTRY(nsIDOMStorageManager)
@@ -13784,9 +13783,9 @@ nsDocShell::PluginsAllowedInCurrentDoc()
// Web Shell Services API
// This functions is only called when a new charset is detected in loading a
// document. Its name should be changed to "CharsetReloadDocument"
NS_IMETHODIMP
nsDocShell::ReloadDocument(const char* aCharset, int32_t aSource)
// document.
nsresult
nsDocShell::CharsetChangeReloadDocument(const char* aCharset, int32_t aSource)
{
// XXX hack. keep the aCharset and aSource wait to pick it up
nsCOMPtr<nsIContentViewer> cv;
@@ -13818,8 +13817,8 @@ nsDocShell::ReloadDocument(const char* aCharset, int32_t aSource)
return NS_ERROR_DOCSHELL_REQUEST_REJECTED;
}
NS_IMETHODIMP
nsDocShell::StopDocumentLoad(void)
nsresult
nsDocShell::CharsetChangeStopDocumentLoad()
{
if (eCharsetReloadRequested != mCharsetReloadState) {
Stop(nsIWebNavigation::STOP_ALL);