Bug 1388001 - part3: Remove nsIEditor argument of nsIHTMLDocument::TearingDownEditor() since it's unused r?smaug
nsIHTMLDocument::TearingDownEditor() takes nsIEditor as an argument. However, it's not used in it. So, we can remove it.
MozReview-Commit-ID: KUmIsnVGB6H
--- a/dom/html/nsHTMLDocument.cpp
+++ b/dom/html/nsHTMLDocument.cpp
@@ -2656,17 +2656,17 @@ NotifyEditableStateChange(nsINode *aNode
if (child->IsElement()) {
child->AsElement()->UpdateState(true);
}
NotifyEditableStateChange(child, aDocument);
}
}
void
-nsHTMLDocument::TearingDownEditor(nsIEditor *aEditor)
+nsHTMLDocument::TearingDownEditor()
{
if (IsEditingOn()) {
EditingState oldState = mEditingState;
mEditingState = eTearingDown;
nsCOMPtr<nsIPresShell> presShell = GetShell();
if (!presShell)
return;
--- a/dom/html/nsHTMLDocument.h
+++ b/dom/html/nsHTMLDocument.h
@@ -17,17 +17,16 @@
#include "PLDHashTable.h"
#include "nsIHttpChannel.h"
#include "nsHTMLStyleSheet.h"
#include "nsICommandManager.h"
#include "mozilla/dom/HTMLSharedElement.h"
#include "mozilla/dom/BindingDeclarations.h"
-class nsIEditor;
class nsIURI;
class nsIDocShell;
class nsICachingChannel;
class nsIWyciwygChannel;
class nsILoadGroup;
namespace mozilla {
namespace dom {
@@ -100,17 +99,17 @@ public:
mozilla::dom::HTMLAllCollection* All();
nsISupports* ResolveName(const nsAString& aName, nsWrapperCache **aCache);
virtual void AddedForm() override;
virtual void RemovedForm() override;
virtual int32_t GetNumFormsSynchronous() override;
- virtual void TearingDownEditor(nsIEditor *aEditor) override;
+ virtual void TearingDownEditor() override;
virtual void SetIsXHTML(bool aXHTML) override
{
mType = (aXHTML ? eXHTML : eHTML);
}
virtual void SetDocWriteDisabled(bool aDisabled) override
{
mDisableDocWrite = aDisabled;
}
--- a/dom/html/nsIHTMLDocument.h
+++ b/dom/html/nsIHTMLDocument.h
@@ -6,17 +6,16 @@
#ifndef nsIHTMLDocument_h
#define nsIHTMLDocument_h
#include "nsISupports.h"
#include "nsCompatibility.h"
class nsIContent;
-class nsIEditor;
class nsContentList;
#define NS_IHTMLDOCUMENT_IID \
{ 0xcf814492, 0x303c, 0x4718, \
{ 0x9a, 0x3e, 0x39, 0xbc, 0xd5, 0x2c, 0x10, 0xdb } }
/**
* HTML document extensions to nsIDocument.
@@ -107,17 +106,17 @@ public:
/**
* Disables getting and setting cookies
*/
virtual void DisableCookieAccess() = 0;
/**
* Called when this nsIHTMLDocument's editor is destroyed.
*/
- virtual void TearingDownEditor(nsIEditor *aEditor) = 0;
+ virtual void TearingDownEditor() = 0;
virtual void SetIsXHTML(bool aXHTML) = 0;
virtual void SetDocWriteDisabled(bool aDisabled) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIHTMLDocument, NS_IHTMLDOCUMENT_IID)
--- a/editor/composer/nsEditingSession.cpp
+++ b/editor/composer/nsEditingSession.cpp
@@ -549,17 +549,17 @@ nsEditingSession::TearDownEditorOnWindow
RemoveWebProgressListener(window);
}
nsCOMPtr<nsIDocShell> docShell = window->GetDocShell();
NS_ENSURE_STATE(docShell);
RefPtr<HTMLEditor> htmlEditor = docShell->GetHTMLEditor();
if (stopEditing) {
- htmlDoc->TearingDownEditor(htmlEditor);
+ htmlDoc->TearingDownEditor();
}
if (mStateMaintainer && htmlEditor) {
// Null out the editor on the controllers first to prevent their weak
// references from pointing to a destroyed editor.
SetEditorOnControllers(aWindow, nullptr);
}