Bug 1388001 - part3: Remove nsIEditor argument of nsIHTMLDocument::TearingDownEditor() since it's unused r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Mon, 07 Aug 2017 14:25:52 +0900
changeset 424048 b34a665b7879156cbba82fcbe0f9e3379d2c5a48
parent 424047 6280fc4d74687b481862f20dfc1def656011003d
child 424049 5beaa5c88e2008fb5cad46fe7c3d77928298a227
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1388001
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
dom/html/nsHTMLDocument.cpp
dom/html/nsHTMLDocument.h
dom/html/nsIHTMLDocument.h
editor/composer/nsEditingSession.cpp
--- 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);
   }