bug 841430 - nuke nsIEditorDocShell r=bz
authorTrevor Saunders <trev.saunders@gmail.com>
Wed, 13 Feb 2013 17:39:30 -0500
changeset 132688 9086328e2ea7666965bb38f1d6355905ebf0f2c0
parent 132687 8ddc33231c6feff61a1e288be40193b293e01be5
child 132689 13882bd746800f8509fb59d64c943a58fab29475
push id317
push userbbajaj@mozilla.com
push dateTue, 07 May 2013 01:20:33 +0000
treeherdermozilla-release@159a10910249 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs841430
milestone21.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 841430 - nuke nsIEditorDocShell r=bz
content/base/src/Element.cpp
content/base/src/FragmentOrElement.cpp
content/base/src/nsContentUtils.cpp
content/base/src/nsDocumentEncoder.cpp
content/base/src/nsFrameLoader.cpp
content/base/src/nsHTMLContentSerializer.cpp
content/base/src/nsINode.cpp
content/events/src/nsEventStateManager.cpp
content/events/src/nsIMEStateManager.cpp
content/html/content/src/HTMLBodyElement.cpp
content/html/document/src/nsHTMLDocument.cpp
content/html/document/src/nsHTMLDocument.h
docshell/base/Makefile.in
docshell/base/nsDocShell.cpp
docshell/base/nsDocShell.h
docshell/base/nsIDocShell.idl
docshell/base/nsIEditorDocShell.idl
dom/base/nsFocusManager.cpp
dom/base/nsGlobalWindow.cpp
editor/composer/src/nsEditingSession.cpp
editor/composer/src/nsEditingSession.h
editor/libeditor/html/tests/test_bug520189.html
editor/libeditor/html/tests/test_htmleditor_keyevent_handling.html
layout/generic/nsFrame.cpp
toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
widget/tests/test_imestate.html
widget/tests/window_composition_text_querycontent.xul
widget/tests/window_imestate_iframes.html
--- a/content/base/src/Element.cpp
+++ b/content/base/src/Element.cpp
@@ -84,17 +84,16 @@
 
 #include "nsNodeInfoManager.h"
 #include "nsICategoryManager.h"
 #include "nsIDOMDocumentType.h"
 #include "nsIDOMUserDataHandler.h"
 #include "nsGenericHTMLElement.h"
 #include "nsIEditor.h"
 #include "nsIEditorIMESupport.h"
-#include "nsIEditorDocShell.h"
 #include "nsEventDispatcher.h"
 #include "nsContentCreatorFunctions.h"
 #include "nsIControllers.h"
 #include "nsView.h"
 #include "nsViewManager.h"
 #include "nsIScrollableFrame.h"
 #include "nsXBLInsertionPoint.h"
 #include "mozilla/css/StyleRule.h" /* For nsCSSSelectorList */
--- a/content/base/src/FragmentOrElement.cpp
+++ b/content/base/src/FragmentOrElement.cpp
@@ -83,17 +83,16 @@
 
 #include "nsNodeInfoManager.h"
 #include "nsICategoryManager.h"
 #include "nsIDOMDocumentType.h"
 #include "nsIDOMUserDataHandler.h"
 #include "nsGenericHTMLElement.h"
 #include "nsIEditor.h"
 #include "nsIEditorIMESupport.h"
-#include "nsIEditorDocShell.h"
 #include "nsEventDispatcher.h"
 #include "nsContentCreatorFunctions.h"
 #include "nsIControllers.h"
 #include "nsView.h"
 #include "nsViewManager.h"
 #include "nsIScrollableFrame.h"
 #include "nsXBLInsertionPoint.h"
 #include "mozilla/css/StyleRule.h" /* For nsCSSSelectorList */
--- a/content/base/src/nsContentUtils.cpp
+++ b/content/base/src/nsContentUtils.cpp
@@ -154,17 +154,16 @@
 #include "mozilla/Preferences.h"
 #include "nsDOMMutationObserver.h"
 #include "nsIDOMDocumentType.h"
 #include "nsCharSeparatedTokenizer.h"
 #include "nsICharsetDetector.h"
 #include "nsICharsetDetectionObserver.h"
 #include "nsIPlatformCharset.h"
 #include "nsIEditor.h"
-#include "nsIEditorDocShell.h"
 #include "mozilla/Attributes.h"
 #include "nsIParserService.h"
 #include "nsIDOMScriptObjectFactory.h"
 #include "nsSandboxFlags.h"
 #include "nsSVGFeatures.h"
 #include "MediaDecoder.h"
 #include "DecoderTraits.h"
 
@@ -6796,24 +6795,24 @@ nsContentUtils::GetSelectionInTextContro
   aOutStartOffset = std::min(anchorOffset, focusOffset);
   aOutEndOffset = std::max(anchorOffset, focusOffset);
 }
 
 nsIEditor*
 nsContentUtils::GetHTMLEditor(nsPresContext* aPresContext)
 {
   nsCOMPtr<nsISupports> container = aPresContext->GetContainer();
-  nsCOMPtr<nsIEditorDocShell> editorDocShell(do_QueryInterface(container));
+  nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(container));
   bool isEditable;
-  if (!editorDocShell ||
-      NS_FAILED(editorDocShell->GetEditable(&isEditable)) || !isEditable)
+  if (!docShell ||
+      NS_FAILED(docShell->GetEditable(&isEditable)) || !isEditable)
     return nullptr;
 
   nsCOMPtr<nsIEditor> editor;
-  editorDocShell->GetEditor(getter_AddRefs(editor));
+  docShell->GetEditor(getter_AddRefs(editor));
   return editor;
 }
 
 bool
 nsContentUtils::InternalIsSupported(nsISupports* aObject,
                                     const nsAString& aFeature,
                                     const nsAString& aVersion)
 {
--- a/content/base/src/nsDocumentEncoder.cpp
+++ b/content/base/src/nsDocumentEncoder.cpp
@@ -43,17 +43,16 @@
 #include "nsITransferable.h" // for kUnicodeMime
 #include "nsContentUtils.h"
 #include "nsUnicharUtils.h"
 #include "nsReadableUtils.h"
 #include "nsTArray.h"
 #include "nsIFrame.h"
 #include "nsStringBuffer.h"
 #include "mozilla/dom/Element.h"
-#include "nsIEditorDocShell.h"
 #include "nsIEditor.h"
 #include "nsIHTMLEditor.h"
 #include "nsIDocShell.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 nsresult NS_NewDomSelection(nsISelection **aDomSelection);
@@ -338,27 +337,24 @@ IsInvisibleBreak(nsINode *aNode) {
 
   // Grab the editor associated with the document
   nsIDocument *doc = aNode->GetCurrentDoc();
   if (doc) {
     nsPIDOMWindow *window = doc->GetWindow();
     if (window) {
       nsIDocShell *docShell = window->GetDocShell();
       if (docShell) {
-        nsCOMPtr<nsIEditorDocShell> editorDocShell = do_QueryInterface(docShell);
-        if (editorDocShell) {
-          nsCOMPtr<nsIEditor> editor;
-          editorDocShell->GetEditor(getter_AddRefs(editor));
-          nsCOMPtr<nsIHTMLEditor> htmlEditor = do_QueryInterface(editor);
-          if (htmlEditor) {
-            bool isVisible = false;
-            nsCOMPtr<nsIDOMNode> domNode = do_QueryInterface(aNode);
-            htmlEditor->BreakIsVisible(domNode, &isVisible);
-            return !isVisible;
-          }
+        nsCOMPtr<nsIEditor> editor;
+        docShell->GetEditor(getter_AddRefs(editor));
+        nsCOMPtr<nsIHTMLEditor> htmlEditor = do_QueryInterface(editor);
+        if (htmlEditor) {
+          bool isVisible = false;
+          nsCOMPtr<nsIDOMNode> domNode = do_QueryInterface(aNode);
+          htmlEditor->BreakIsVisible(domNode, &isVisible);
+          return !isVisible;
         }
       }
     }
   }
   return false;
 }
 
 nsresult
--- a/content/base/src/nsFrameLoader.cpp
+++ b/content/base/src/nsFrameLoader.cpp
@@ -48,17 +48,16 @@
 #include "nsGUIEvent.h"
 #include "nsEventDispatcher.h"
 #include "nsISHistory.h"
 #include "nsISHistoryInternal.h"
 #include "nsIDocShellHistory.h"
 #include "nsIDOMHTMLDocument.h"
 #include "nsIXULWindow.h"
 #include "nsIEditor.h"
-#include "nsIEditorDocShell.h"
 #include "nsIMozBrowserFrame.h"
 #include "nsIPermissionManager.h"
 
 #include "nsLayoutUtils.h"
 #include "nsView.h"
 #include "nsAsyncDOMEvent.h"
 
 #include "nsIURI.h"
@@ -847,36 +846,32 @@ nsFrameLoader::Show(int32_t marginWidth,
 
     if (doc) {
       nsAutoString designMode;
       doc->GetDesignMode(designMode);
 
       if (designMode.EqualsLiteral("on")) {
         // Hold on to the editor object to let the document reattach to the
         // same editor object, instead of creating a new one.
-        nsCOMPtr<nsIEditorDocShell> editorDocshell = do_QueryInterface(mDocShell);
         nsCOMPtr<nsIEditor> editor;
-        nsresult rv = editorDocshell->GetEditor(getter_AddRefs(editor));
+        nsresult rv = mDocShell->GetEditor(getter_AddRefs(editor));
         NS_ENSURE_SUCCESS(rv, false);
 
         doc->SetDesignMode(NS_LITERAL_STRING("off"));
         doc->SetDesignMode(NS_LITERAL_STRING("on"));
       } else {
         // Re-initialize the presentation for contenteditable documents
-        nsCOMPtr<nsIEditorDocShell> editorDocshell = do_QueryInterface(mDocShell);
-        if (editorDocshell) {
-          bool editable = false,
-                 hasEditingSession = false;
-          editorDocshell->GetEditable(&editable);
-          editorDocshell->GetHasEditingSession(&hasEditingSession);
-          nsCOMPtr<nsIEditor> editor;
-          editorDocshell->GetEditor(getter_AddRefs(editor));
-          if (editable && hasEditingSession && editor) {
-            editor->PostCreate();
-          }
+        bool editable = false,
+             hasEditingSession = false;
+        mDocShell->GetEditable(&editable);
+        mDocShell->GetHasEditingSession(&hasEditingSession);
+        nsCOMPtr<nsIEditor> editor;
+        mDocShell->GetEditor(getter_AddRefs(editor));
+        if (editable && hasEditingSession && editor) {
+          editor->PostCreate();
         }
       }
     }
   }
 
   mInShow = false;
   if (mHideCalled) {
     mHideCalled = false;
--- a/content/base/src/nsHTMLContentSerializer.cpp
+++ b/content/base/src/nsHTMLContentSerializer.cpp
@@ -28,17 +28,16 @@
 #include "nsITextToSubURI.h"
 #include "nsCRT.h"
 #include "nsIParserService.h"
 #include "nsContentUtils.h"
 #include "nsLWBrkCIID.h"
 #include "nsIScriptElement.h"
 #include "nsAttrName.h"
 #include "nsIDocShell.h"
-#include "nsIEditorDocShell.h"
 #include "nsIEditor.h"
 #include "nsIHTMLEditor.h"
 #include "mozilla/dom/Element.h"
 #include "nsParserConstants.h"
 
 using namespace mozilla::dom;
 
 static const int32_t kLongLineLen = 128;
--- a/content/base/src/nsINode.cpp
+++ b/content/base/src/nsINode.cpp
@@ -53,17 +53,16 @@
 #include "nsIDocument.h"
 #include "nsIDOMDocument.h"
 #include "nsIDOMDocumentType.h"
 #include "nsIDOMEvent.h"
 #include "nsIDOMEventListener.h"
 #include "nsIDOMMutationEvent.h"
 #include "nsIDOMNodeList.h"
 #include "nsIDOMUserDataHandler.h"
-#include "nsIEditorDocShell.h"
 #include "nsIEditor.h"
 #include "nsIEditorIMESupport.h"
 #include "nsIFrame.h"
 #include "nsIJSContextStack.h"
 #include "nsILinkHandler.h"
 #include "nsINameSpaceManager.h"
 #include "nsINodeInfo.h"
 #include "nsIPresShell.h"
--- a/content/events/src/nsEventStateManager.cpp
+++ b/content/events/src/nsEventStateManager.cpp
@@ -15,17 +15,16 @@
 #include "nsINodeInfo.h"
 #include "nsIDocument.h"
 #include "nsIFrame.h"
 #include "nsIWidget.h"
 #include "nsPresContext.h"
 #include "nsIPresShell.h"
 #include "nsDOMEvent.h"
 #include "nsGkAtoms.h"
-#include "nsIEditorDocShell.h"
 #include "nsIFormControl.h"
 #include "nsIComboboxControlFrame.h"
 #include "nsIScrollableFrame.h"
 #include "nsIDOMHTMLElement.h"
 #include "nsIDOMXULControlElement.h"
 #include "nsINameSpaceManager.h"
 #include "nsIBaseWindow.h"
 #include "nsISelection.h"
--- a/content/events/src/nsIMEStateManager.cpp
+++ b/content/events/src/nsIMEStateManager.cpp
@@ -6,17 +6,16 @@
 
 #include "nsIMEStateManager.h"
 #include "nsCOMPtr.h"
 #include "nsViewManager.h"
 #include "nsIPresShell.h"
 #include "nsISupports.h"
 #include "nsPIDOMWindow.h"
 #include "nsIInterfaceRequestorUtils.h"
-#include "nsIEditorDocShell.h"
 #include "nsIContent.h"
 #include "nsIDocument.h"
 #include "nsPresContext.h"
 #include "nsIDOMWindow.h"
 #include "nsIDOMMouseEvent.h"
 #include "nsContentUtils.h"
 #include "nsINode.h"
 #include "nsIFrame.h"
--- a/content/html/content/src/HTMLBodyElement.cpp
+++ b/content/html/content/src/HTMLBodyElement.cpp
@@ -14,17 +14,16 @@
 #include "nsIPresShell.h"
 #include "nsIDocument.h"
 #include "nsHTMLStyleSheet.h"
 #include "nsIEditor.h"
 #include "nsIMarkupDocumentViewer.h"
 #include "nsMappedAttributes.h"
 #include "nsRuleData.h"
 #include "nsIDocShell.h"
-#include "nsIEditorDocShell.h"
 #include "nsRuleWalker.h"
 #include "nsGlobalWindow.h"
 
 NS_IMPL_NS_NEW_HTML_ELEMENT(Body)
 DOMCI_NODE_DATA(HTMLBodyElement, mozilla::dom::HTMLBodyElement)
 
 namespace mozilla {
 namespace dom {
@@ -471,22 +470,22 @@ HTMLBodyElement::GetAssociatedEditor()
 
   // For designmode, try to get document's editor
   nsPresContext* presContext = GetPresContext();
   if (!presContext) {
     return nullptr;
   }
 
   nsCOMPtr<nsISupports> container = presContext->GetContainer();
-  nsCOMPtr<nsIEditorDocShell> editorDocShell = do_QueryInterface(container);
-  if (!editorDocShell) {
+  nsCOMPtr<nsIDocShell> docShell = do_QueryInterface(container);
+  if (!docShell) {
     return nullptr;
   }
 
-  editorDocShell->GetEditor(getter_AddRefs(editor));
+  docShell->GetEditor(getter_AddRefs(editor));
   return editor.forget();
 }
 
 bool
 HTMLBodyElement::IsEventAttributeName(nsIAtom *aName)
 {
   return nsContentUtils::IsEventAttributeName(aName,
                                               EventNameType_HTML |
--- a/content/html/document/src/nsHTMLDocument.cpp
+++ b/content/html/document/src/nsHTMLDocument.cpp
@@ -82,17 +82,16 @@
 //AHMED 12-2
 #include "nsBidiUtils.h"
 
 #include "nsIEditingSession.h"
 #include "nsIEditor.h"
 #include "nsNodeInfoManager.h"
 #include "nsIPlaintextEditor.h"
 #include "nsIHTMLEditor.h"
-#include "nsIEditorDocShell.h"
 #include "nsIEditorStyleSheets.h"
 #include "nsIInlineSpellChecker.h"
 #include "nsRange.h"
 #include "mozAutoDocUpdate.h"
 #include "nsCCUncollectableMarker.h"
 #include "nsHtml5Module.h"
 #include "prprf.h"
 #include "mozilla/dom/Element.h"
@@ -2605,22 +2604,18 @@ nsHTMLDocument::DeferredContentEditableC
       nsPIDOMWindow *window = GetWindow();
       if (!window)
         return;
 
       nsIDocShell *docshell = window->GetDocShell();
       if (!docshell)
         return;
 
-      nsCOMPtr<nsIEditorDocShell> editorDocShell =
-        do_QueryInterface(docshell, &rv);
-      NS_ENSURE_SUCCESS_VOID(rv);
-
       nsCOMPtr<nsIEditor> editor;
-      editorDocShell->GetEditor(getter_AddRefs(editor));
+      docshell->GetEditor(getter_AddRefs(editor));
       if (editor) {
         nsRefPtr<nsRange> range = new nsRange();
         rv = range->SelectNode(node);
         if (NS_FAILED(rv)) {
           // The node might be detached from the document at this point,
           // which would cause this call to fail.  In this case, we can
           // safely ignore the contenteditable count change.
           return;
@@ -2882,21 +2877,17 @@ nsHTMLDocument::EditingStateChanged()
       // XXX This can cause flushing which can change the editing state, so make
       //     sure to avoid recursing.
       rv = editSession->MakeWindowEditable(window, "html", false, false,
                                            true);
       NS_ENSURE_SUCCESS(rv, rv);
     }
 
     // XXX Need to call TearDownEditorOnWindow for all failures.
-    nsCOMPtr<nsIEditorDocShell> editorDocShell =
-      do_QueryInterface(docshell, &rv);
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    editorDocShell->GetEditor(getter_AddRefs(editor));
+    docshell->GetEditor(getter_AddRefs(editor));
     if (!editor)
       return NS_ERROR_FAILURE;
 
     nsCOMPtr<nsIPresShell> presShell = GetShell();
     NS_ENSURE_TRUE(presShell, NS_ERROR_FAILURE);
 
     // If we're entering the design mode, put the selection at the beginning of
     // the document for compatibility reasons.
--- a/content/html/document/src/nsHTMLDocument.h
+++ b/content/html/document/src/nsHTMLDocument.h
@@ -23,17 +23,16 @@
 #include "nsIWyciwygChannel.h"
 #include "nsILoadGroup.h"
 #include "nsNetUtil.h"
 
 #include "nsICommandManager.h"
 #include "mozilla/dom/HTMLSharedElement.h"
 
 class nsIEditor;
-class nsIEditorDocShell;
 class nsIParser;
 class nsIURI;
 class nsIMarkupDocumentViewer;
 class nsIDocShell;
 class nsICachingChannel;
 
 class nsHTMLDocument : public nsDocument,
                        public nsIHTMLDocument,
--- a/docshell/base/Makefile.in
+++ b/docshell/base/Makefile.in
@@ -37,17 +37,16 @@ XPIDLSRCS = \
   nsITextScroll.idl \
   nsIDocCharset.idl \
   nsIWebNavigation.idl \
   nsIWebNavigationInfo.idl \
   nsIContentViewer.idl \
   nsIContentViewerEdit.idl \
   nsIContentViewerFile.idl \
   nsIURIFixup.idl \
-  nsIEditorDocShell.idl \
   nsIWebPageDescriptor.idl \
   nsIDownloadHistory.idl \
   nsILoadContext.idl \
   nsIRefreshURI.idl \
   nsIContentViewerContainer.idl \
   nsIDocumentLoaderFactory.idl \
   nsIPrivacyTransitionObserver.idl \
   $(NULL)
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -902,17 +902,16 @@ NS_INTERFACE_MAP_BEGIN(nsDocShell)
     NS_INTERFACE_MAP_ENTRY(nsIScrollable)
     NS_INTERFACE_MAP_ENTRY(nsITextScroll)
     NS_INTERFACE_MAP_ENTRY(nsIDocCharset)
     NS_INTERFACE_MAP_ENTRY(nsIScriptGlobalObjectOwner)
     NS_INTERFACE_MAP_ENTRY(nsIRefreshURI)
     NS_INTERFACE_MAP_ENTRY(nsIWebProgressListener)
     NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
     NS_INTERFACE_MAP_ENTRY(nsIContentViewerContainer)
-    NS_INTERFACE_MAP_ENTRY(nsIEditorDocShell)
     NS_INTERFACE_MAP_ENTRY(nsIWebPageDescriptor)
     NS_INTERFACE_MAP_ENTRY(nsIAuthPromptProvider)
     NS_INTERFACE_MAP_ENTRY(nsIObserver)
     NS_INTERFACE_MAP_ENTRY(nsILoadContext)
     NS_INTERFACE_MAP_ENTRY(nsIWebShellServices)
     NS_INTERFACE_MAP_ENTRY(nsILinkHandler)
     NS_INTERFACE_MAP_ENTRY(nsIClipboardCommands)
 NS_INTERFACE_MAP_END_INHERITING(nsDocLoader)
@@ -11099,20 +11098,16 @@ nsDocShell::ShouldDiscardLayoutState(nsI
     bool noStore = false, noCache = false;
     aChannel->GetSecurityInfo(getter_AddRefs(securityInfo));
     aChannel->IsNoStoreResponse(&noStore);
     aChannel->IsNoCacheResponse(&noCache);
 
     return (noStore || (noCache && securityInfo));
 }
 
-//*****************************************************************************
-// nsDocShell: nsIEditorDocShell
-//*****************************************************************************   
-
 NS_IMETHODIMP nsDocShell::GetEditor(nsIEditor * *aEditor)
 {
   NS_ENSURE_ARG_POINTER(aEditor);
 
   if (!mEditorData) {
     *aEditor = nullptr;
     return NS_OK;
   }
--- a/docshell/base/nsDocShell.h
+++ b/docshell/base/nsDocShell.h
@@ -21,17 +21,16 @@
 #include "nsIBaseWindow.h"
 #include "nsIScrollable.h"
 #include "nsITextScroll.h"
 #include "nsIDocShellTreeOwner.h"
 #include "nsIContentViewerContainer.h"
 
 #include "nsDocLoader.h"
 #include "nsIURILoader.h"
-#include "nsIEditorDocShell.h"
 
 #include "nsWeakReference.h"
 
 // Local Includes
 #include "nsDSURIContentListener.h"
 #include "nsDocShellEditorData.h"
 
 // Helper Classes
@@ -136,17 +135,16 @@ class nsDocShell : public nsDocLoader,
                    public nsIBaseWindow, 
                    public nsIScrollable, 
                    public nsITextScroll, 
                    public nsIDocCharset, 
                    public nsIContentViewerContainer,
                    public nsIScriptGlobalObjectOwner,
                    public nsIRefreshURI,
                    public nsIWebProgressListener,
-                   public nsIEditorDocShell,
                    public nsIWebPageDescriptor,
                    public nsIAuthPromptProvider,
                    public nsIObserver,
                    public nsILoadContext,
                    public nsIWebShellServices,
                    public nsILinkHandler,
                    public nsIClipboardCommands
 {
@@ -170,17 +168,16 @@ public:
     NS_DECL_NSIBASEWINDOW
     NS_DECL_NSISCROLLABLE
     NS_DECL_NSITEXTSCROLL
     NS_DECL_NSIDOCCHARSET
     NS_DECL_NSIINTERFACEREQUESTOR
     NS_DECL_NSIWEBPROGRESSLISTENER
     NS_DECL_NSIREFRESHURI
     NS_DECL_NSICONTENTVIEWERCONTAINER
-    NS_DECL_NSIEDITORDOCSHELL
     NS_DECL_NSIWEBPAGEDESCRIPTOR
     NS_DECL_NSIAUTHPROMPTPROVIDER
     NS_DECL_NSIOBSERVER
     NS_DECL_NSICLIPBOARDCOMMANDS
     NS_DECL_NSIWEBSHELLSERVICES
 
     NS_IMETHOD Stop() {
         // Need this here because otherwise nsIWebNavigation::Stop
--- a/docshell/base/nsIDocShell.idl
+++ b/docshell/base/nsIDocShell.idl
@@ -21,30 +21,31 @@ struct JSContext;
 [ptr] native nsIPresShell(nsIPresShell);
 
 interface nsIURI;
 interface nsIChannel;
 interface nsIContentViewer;
 interface nsIURIContentListener;
 interface nsIDOMEventTarget;
 interface nsIDocShellLoadInfo;
+interface nsIEditor;
 interface nsIWebNavigation;
 interface nsISimpleEnumerator;
 interface nsIInputStream;
 interface nsIRequest;
 interface nsISHEntry;
 interface nsILayoutHistoryState;
 interface nsISecureBrowserUI;
 interface nsIDOMStorage;
 interface nsIPrincipal;
 interface nsIWebBrowserPrint;
 interface nsIVariant;
 interface nsIPrivacyTransitionObserver;
 
-[scriptable, builtinclass, uuid(5ea80008-a166-4692-8a7e-39690dd192c6)]
+[scriptable, builtinclass, uuid(e8f6f3e5-8cee-4be3-8d56-5ed617305bf8)]
 interface nsIDocShell : nsIDocShellTreeItem
 {
   /**
    * Loads a given URI.  This will give priority to loading the requested URI
    * in the object implementing	this interface.  If it can't be loaded here
    * however, the URL dispatcher will go through its normal process of content
    * loading.
    *
@@ -784,9 +785,22 @@ interface nsIDocShell : nsIDocShellTreeI
 
   [noscript, infallible] attribute boolean affectPrivateSessionLifetime;
 
   /**
    * Indicates whether the UI may enable the character encoding menu. The UI
    * must disable the menu when this property is false.
    */
   [infallible] readonly attribute boolean mayEnableCharacterEncodingMenu;
+
+           attribute  nsIEditor editor;
+  readonly attribute  boolean   editable;             /* this docShell is editable */
+  readonly attribute  boolean   hasEditingSession;    /* this docShell has an editing session */
+    
+  /**
+   * Make this docShell editable, setting a flag that causes
+   * an editor to get created, either immediately, or after
+   * a url has been loaded.
+   *      @param  inWaitForUriLoad    true to wait for a URI before
+   *                                  creating the editor.
+   */     
+  void makeEditable(in boolean inWaitForUriLoad);
 };
deleted file mode 100644
--- a/docshell/base/nsIEditorDocShell.idl
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsISupports.idl"
-
-interface nsIEditor;
-
-/**
- * nsIEditorDocShell provides a way to get an editor from
- * a specific frame in a docShell hierarchy. It is intended
- * to be only used internally. Use nsIEditingShell.getEditorForFrame
- * from out side.
- */
-
-[scriptable, uuid(3BDB8F01-F141-11D4-A73C-FBA4ABA8A3FC)]
-interface nsIEditorDocShell : nsISupports
-{
-             attribute  nsIEditor editor;
-    readonly attribute  boolean   editable;             /* this docShell is editable */
-    readonly attribute  boolean   hasEditingSession;    /* this docShell has an editing session */
-    
-    /**
-     * Make this docShell editable, setting a flag that causes
-     * an editor to get created, either immediately, or after
-     * a url has been loaded.
-     *      @param  inWaitForUriLoad    true to wait for a URI before
-     *                                  creating the editor.
-     */     
-    void makeEditable(in boolean inWaitForUriLoad);
-};
-
--- a/dom/base/nsFocusManager.cpp
+++ b/dom/base/nsFocusManager.cpp
@@ -20,17 +20,16 @@
 #include "nsIDOMHTMLFrameElement.h"
 #include "nsIDOMHTMLInputElement.h"
 #include "nsIDOMHTMLMapElement.h"
 #include "nsIDOMHTMLLegendElement.h"
 #include "nsIDOMDocument.h"
 #include "nsIDOMRange.h"
 #include "nsIHTMLDocument.h"
 #include "nsIDocShell.h"
-#include "nsIEditorDocShell.h"
 #include "nsIDocShellTreeOwner.h"
 #include "nsLayoutUtils.h"
 #include "nsIPresShell.h"
 #include "nsIContentViewer.h"
 #include "nsFrameTraversal.h"
 #include "nsObjectFrame.h"
 #include "nsEventDispatcher.h"
 #include "nsEventStateManager.h"
@@ -601,28 +600,25 @@ nsFocusManager::MoveCaretToFocus(nsIDOMW
 {
   int32_t itemType = nsIDocShellTreeItem::typeChrome;
 
   nsCOMPtr<nsIWebNavigation> webnav = do_GetInterface(aWindow);
   nsCOMPtr<nsIDocShellTreeItem> dsti = do_QueryInterface(webnav);
   if (dsti) {
     dsti->GetItemType(&itemType);
     if (itemType != nsIDocShellTreeItem::typeChrome) {
-      // don't move the caret for editable documents
-      nsCOMPtr<nsIEditorDocShell> editorDocShell(do_QueryInterface(dsti));
-      if (editorDocShell) {
-        bool isEditable;
-        editorDocShell->GetEditable(&isEditable);
-        if (isEditable)
-          return NS_OK;
-      }
-
       nsCOMPtr<nsIDocShell> docShell = do_QueryInterface(dsti);
       NS_ENSURE_TRUE(docShell, NS_ERROR_FAILURE);
 
+      // don't move the caret for editable documents
+      bool isEditable;
+      docShell->GetEditable(&isEditable);
+      if (isEditable)
+        return NS_OK;
+
       nsCOMPtr<nsIPresShell> presShell = docShell->GetPresShell();
       NS_ENSURE_TRUE(presShell, NS_ERROR_FAILURE);
 
       nsCOMPtr<nsPIDOMWindow> window(do_QueryInterface(aWindow));
       nsCOMPtr<nsIContent> content = window->GetFocusedNode();
       if (content)
         MoveCaretToFocus(presShell, content);
     }
@@ -2025,32 +2021,29 @@ nsFocusManager::UpdateCaret(bool aMoveCa
   nsCOMPtr<nsIPresShell> presShell = focusedDocShell->GetPresShell();
   if (!presShell)
     return;
 
   // If this is an editable document which isn't contentEditable, or a
   // contentEditable document and the node to focus is contentEditable,
   // return, so that we don't mess with caret visibility.
   bool isEditable = false;
-  nsCOMPtr<nsIEditorDocShell> editorDocShell(do_QueryInterface(dsti));
-  if (editorDocShell) {
-    editorDocShell->GetEditable(&isEditable);
-
-    if (isEditable) {
-      nsCOMPtr<nsIHTMLDocument> doc =
-        do_QueryInterface(presShell->GetDocument());
-
-      bool isContentEditableDoc =
-        doc && doc->GetEditingState() == nsIHTMLDocument::eContentEditable;
-
-      bool isFocusEditable =
-        aContent && aContent->HasFlag(NODE_IS_EDITABLE);
-      if (!isContentEditableDoc || isFocusEditable)
-        return;
-    }
+  focusedDocShell->GetEditable(&isEditable);
+
+  if (isEditable) {
+    nsCOMPtr<nsIHTMLDocument> doc =
+      do_QueryInterface(presShell->GetDocument());
+
+    bool isContentEditableDoc =
+      doc && doc->GetEditingState() == nsIHTMLDocument::eContentEditable;
+
+    bool isFocusEditable =
+      aContent && aContent->HasFlag(NODE_IS_EDITABLE);
+    if (!isContentEditableDoc || isFocusEditable)
+      return;
   }
 
   if (!isEditable && aMoveCaretToFocus)
     MoveCaretToFocus(presShell, aContent);
 
   if (!aUpdateVisibility)
     return;
 
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -75,17 +75,16 @@
 #include "nsIWidget.h"
 #include "nsIWidgetListener.h"
 #include "nsIBaseWindow.h"
 #include "nsDeviceSensors.h"
 #include "nsIContent.h"
 #include "nsIContentViewerEdit.h"
 #include "nsIDocShell.h"
 #include "nsIDocShellLoadInfo.h"
-#include "nsIEditorDocShell.h"
 #include "nsIDocCharset.h"
 #include "nsIDocument.h"
 #include "nsIHTMLDocument.h"
 #include "nsIDOMHTMLDocument.h"
 #include "nsIDOMHTMLElement.h"
 #ifndef MOZ_DISABLE_DOMCRYPTO
 #include "nsIDOMCrypto.h"
 #endif
@@ -8452,23 +8451,20 @@ static nsCanvasFrame* FindCanvasFrame(ns
 void
 nsGlobalWindow::UpdateCanvasFocus(bool aFocusChanged, nsIContent* aNewContent)
 {
   // this is called from the inner window so use GetDocShell
   nsIDocShell* docShell = GetDocShell();
   if (!docShell)
     return;
 
-  nsCOMPtr<nsIEditorDocShell> editorDocShell = do_QueryInterface(docShell);
-  if (editorDocShell) {
-    bool editable;
-    editorDocShell->GetEditable(&editable);
-    if (editable)
-      return;
-  }
+  bool editable;
+  docShell->GetEditable(&editable);
+  if (editable)
+    return;
 
   nsCOMPtr<nsIPresShell> presShell = docShell->GetPresShell();
   if (!presShell || !mDocument)
     return;
 
   nsCOMPtr<nsIDocument> doc(do_QueryInterface(mDocument));
   Element *rootElement = doc->GetRootElement();
   if (rootElement) {
--- a/editor/composer/src/nsEditingSession.cpp
+++ b/editor/composer/src/nsEditingSession.cpp
@@ -25,17 +25,16 @@
 #include "nsIDOMDocument.h"             // for nsIDOMDocument
 #include "nsIDOMHTMLDocument.h"         // for nsIDOMHTMLDocument
 #include "nsIDOMWindow.h"               // for nsIDOMWindow
 #include "nsIDOMWindowUtils.h"          // for nsIDOMWindowUtils
 #include "nsIDocShell.h"                // for nsIDocShell
 #include "nsIDocument.h"                // for nsIDocument
 #include "nsIDocumentStateListener.h"
 #include "nsIEditor.h"                  // for nsIEditor
-#include "nsIEditorDocShell.h"          // for nsIEditorDocShell
 #include "nsIHTMLDocument.h"            // for nsIHTMLDocument, etc
 #include "nsIInterfaceRequestorUtils.h"  // for do_GetInterface
 #include "nsIPlaintextEditor.h"         // for nsIPlaintextEditor, etc
 #include "nsIRefreshURI.h"              // for nsIRefreshURI
 #include "nsIRequest.h"                 // for nsIRequest
 #include "nsISelection.h"               // for nsISelection
 #include "nsISelectionPrivate.h"        // for nsISelectionPrivate
 #include "nsITimer.h"                   // for nsITimer, etc
@@ -108,17 +107,17 @@ nsEditingSession::MakeWindowEditable(nsI
                                      bool aDoAfterUriLoad,
                                      bool aMakeWholeDocumentEditable,
                                      bool aInteractive)
 {
   mEditorType.Truncate();
   mEditorFlags = 0;
 
   // disable plugins
-  nsIDocShell *docShell = GetDocShellFromWindow(aWindow);
+  nsCOMPtr<nsIDocShell> docShell = GetDocShellFromWindow(aWindow);
   NS_ENSURE_TRUE(docShell, NS_ERROR_FAILURE);
 
   mDocShell = do_GetWeakReference(docShell);
   mInteractive = aInteractive;
   mMakeWholeDocumentEditable = aMakeWholeDocumentEditable;
 
   nsresult rv;
   if (!mInteractive) {
@@ -137,22 +136,18 @@ nsEditingSession::MakeWindowEditable(nsI
     aEditorType = DEFAULT_EDITOR_TYPE;
   mEditorType = aEditorType;
 
   // if all this does is setup listeners and I don't need listeners, 
   // can't this step be ignored?? (based on aDoAfterURILoad)
   rv = PrepareForEditing(aWindow);
   NS_ENSURE_SUCCESS(rv, rv);  
   
-  nsCOMPtr<nsIEditorDocShell> editorDocShell;
-  rv = GetEditorDocShellFromWindow(aWindow, getter_AddRefs(editorDocShell));
-  NS_ENSURE_SUCCESS(rv, rv);  
-  
   // set the flag on the docShell to say that it's editable
-  rv = editorDocShell->MakeEditable(aDoAfterUriLoad);
+  rv = docShell->MakeEditable(aDoAfterUriLoad);
   NS_ENSURE_SUCCESS(rv, rv);  
 
   // Setup commands common to plaintext and html editors,
   //  including the document creation observers
   // the first is an editing controller
   rv = SetupEditorCommandController("@mozilla.org/editor/editingcontroller;1",
                                     aWindow,
                                     static_cast<nsIEditingSession*>(this),
@@ -236,22 +231,20 @@ nsEditingSession::GetJsAndPluginsDisable
 
   WindowIsEditable
 
   boolean windowIsEditable (in nsIDOMWindow aWindow);
 ----------------------------------------------------------------------------*/
 NS_IMETHODIMP
 nsEditingSession::WindowIsEditable(nsIDOMWindow *aWindow, bool *outIsEditable)
 {
-  nsCOMPtr<nsIEditorDocShell> editorDocShell;
-  nsresult rv = GetEditorDocShellFromWindow(aWindow,
-                                            getter_AddRefs(editorDocShell));
-  NS_ENSURE_SUCCESS(rv, rv);  
+  nsCOMPtr<nsIDocShell> docShell = GetDocShellFromWindow(aWindow);
+  NS_ENSURE_STATE(docShell);
 
-  return editorDocShell->GetEditable(outIsEditable);
+  return docShell->GetEditable(outIsEditable);
 }
 
 
 // These are MIME types that are automatically parsed as "text/plain"
 //   and thus we can edit them as plaintext
 // Note: in older versions, we attempted to convert the mimetype of
 //   the network channel for these and "text/xml" to "text/plain", 
 //   but further investigation reveals that strategy doesn't work
@@ -393,44 +386,41 @@ nsEditingSession::SetupEditorOnWindow(ns
   if (mEditorStatus != eEditorCreationInProgress)
   {
     mStateMaintainer->NotifyDocumentCreated();
     return NS_ERROR_FAILURE;
   }
 
   // Create editor and do other things 
   //  only if we haven't found some error above,
-  nsIDocShell *docShell = GetDocShellFromWindow(aWindow);
+  nsCOMPtr<nsIDocShell> docShell = GetDocShellFromWindow(aWindow);
   NS_ENSURE_TRUE(docShell, NS_ERROR_FAILURE);  
 
   if (!mInteractive) {
     // Disable animation of images in this document:
     nsCOMPtr<nsIDOMWindowUtils> utils(do_GetInterface(aWindow));
     NS_ENSURE_TRUE(utils, NS_ERROR_FAILURE);
 
     rv = utils->GetImageAnimationMode(&mImageAnimationMode);
     NS_ENSURE_SUCCESS(rv, rv);
     utils->SetImageAnimationMode(imgIContainer::kDontAnimMode);
   }
 
   // create and set editor
-  nsCOMPtr<nsIEditorDocShell> editorDocShell = do_QueryInterface(docShell, &rv);
-  NS_ENSURE_SUCCESS(rv, rv);
-
   // Try to reuse an existing editor
   nsCOMPtr<nsIEditor> editor = do_QueryReferent(mExistingEditor);
   if (editor) {
     editor->PreDestroy(false);
   } else {
     editor = do_CreateInstance(classString, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
     mExistingEditor = do_GetWeakReference(editor);
   }
   // set the editor on the docShell. The docShell now owns it.
-  rv = editorDocShell->SetEditor(editor);
+  rv = docShell->SetEditor(editor);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // setup the HTML editor command controller
   if (needHTMLController)
   {
     // The third controller takes an nsIEditor as the context
     rv = SetupEditorCommandController("@mozilla.org/editor/htmleditorcontroller;1",
                                       aWindow, editor,
@@ -542,37 +532,36 @@ nsEditingSession::TearDownEditorOnWindow
   // Check if we're turning off editing (from contentEditable or designMode).
   nsCOMPtr<nsIDOMDocument> domDoc;
   aWindow->GetDocument(getter_AddRefs(domDoc));
   nsCOMPtr<nsIHTMLDocument> htmlDoc = do_QueryInterface(domDoc);
   bool stopEditing = htmlDoc && htmlDoc->IsEditingOn();
   if (stopEditing)
     RemoveWebProgressListener(aWindow);
 
-  nsCOMPtr<nsIEditorDocShell> editorDocShell;
-  rv = GetEditorDocShellFromWindow(aWindow, getter_AddRefs(editorDocShell));
-  NS_ENSURE_SUCCESS(rv, rv);
+  nsCOMPtr<nsIDocShell> docShell = GetDocShellFromWindow(aWindow);
+  NS_ENSURE_STATE(docShell);
   
   nsCOMPtr<nsIEditor> editor;
-  rv = editorDocShell->GetEditor(getter_AddRefs(editor));
+  rv = docShell->GetEditor(getter_AddRefs(editor));
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (stopEditing)
     htmlDoc->TearingDownEditor(editor);
 
   if (mStateMaintainer && editor)
   {
     // Null out the editor on the controllers first to prevent their weak 
     // references from pointing to a destroyed editor.
     SetEditorOnControllers(aWindow, nullptr);
   }
 
   // Null out the editor on the docShell to trigger PreDestroy which
   // needs to happen before document state listeners are removed below.
-  editorDocShell->SetEditor(nullptr);
+  docShell->SetEditor(nullptr);
 
   RemoveListenersAndControllers(aWindow, editor);
 
   if (stopEditing)
   {
     // Make things the way they were before we started editing.
     RestoreJSAndPlugins(aWindow);
     RestoreAnimationMode(aWindow);
@@ -598,22 +587,20 @@ nsEditingSession::TearDownEditorOnWindow
   GetEditorForFrame
 
   nsIEditor getEditorForFrame (in nsIDOMWindow aWindow);
 ----------------------------------------------------------------------------*/
 NS_IMETHODIMP 
 nsEditingSession::GetEditorForWindow(nsIDOMWindow *aWindow,
                                      nsIEditor **outEditor)
 {
-  nsCOMPtr<nsIEditorDocShell> editorDocShell;
-  nsresult rv = GetEditorDocShellFromWindow(aWindow,
-                                            getter_AddRefs(editorDocShell));
-  NS_ENSURE_SUCCESS(rv, rv);  
+  nsCOMPtr<nsIDocShell> docShell = GetDocShellFromWindow(aWindow);
+  NS_ENSURE_STATE(aWindow);
   
-  return editorDocShell->GetEditor(outEditor);
+  return docShell->GetEditor(outEditor);
 }
 
 /*---------------------------------------------------------------------------
 
   OnStateChange
 
 ----------------------------------------------------------------------------*/
 NS_IMETHODIMP
@@ -968,37 +955,35 @@ nsEditingSession::EndDocumentLoad(nsIWeb
 
   // cancel refresh from meta tags
   // we need to make sure that all pages in editor (whether editable or not)
   // can't refresh contents being edited
   nsCOMPtr<nsIRefreshURI> refreshURI = do_QueryInterface(docShell);
   if (refreshURI)
     refreshURI->CancelRefreshURITimers();
 
-  nsCOMPtr<nsIEditorDocShell> editorDocShell = do_QueryInterface(docShell);
-
   nsresult rv = NS_OK;
 
   // did someone set the flag to make this shell editable?
-  if (aIsToBeMadeEditable && mCanCreateEditor && editorDocShell)
+  if (aIsToBeMadeEditable && mCanCreateEditor)
   {
     bool    makeEditable;
-    editorDocShell->GetEditable(&makeEditable);
+    docShell->GetEditable(&makeEditable);
   
     if (makeEditable)
     {
       // To keep pre Gecko 1.9 behavior, setup editor always when
       // mMakeWholeDocumentEditable.
       bool needsSetup = false;
       if (mMakeWholeDocumentEditable) {
         needsSetup = true;
       } else {
         // do we already have an editor here?
         nsCOMPtr<nsIEditor> editor;
-        rv = editorDocShell->GetEditor(getter_AddRefs(editor));
+        rv = docShell->GetEditor(getter_AddRefs(editor));
         NS_ENSURE_SUCCESS(rv, rv);
 
         needsSetup = !editor;
       }
 
       if (needsSetup)
       {
         mCanCreateEditor = false;
@@ -1122,34 +1107,16 @@ nsEditingSession::GetDocShellFromWindow(
   nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aWindow);
   NS_ENSURE_TRUE(window, nullptr);
 
   return window->GetDocShell();
 }
 
 /*---------------------------------------------------------------------------
 
-  GetEditorDocShellFromWindow
-
-  Utility method. This will always return an error if no docShell
-  is returned.
-----------------------------------------------------------------------------*/
-nsresult
-nsEditingSession::GetEditorDocShellFromWindow(nsIDOMWindow *aWindow,
-                                              nsIEditorDocShell** outDocShell)
-{
-  nsIDocShell *docShell = GetDocShellFromWindow(aWindow);
-  NS_ENSURE_TRUE(docShell, NS_ERROR_FAILURE);
-  
-  return docShell->QueryInterface(NS_GET_IID(nsIEditorDocShell), 
-                                  (void **)outDocShell);
-}
-
-/*---------------------------------------------------------------------------
-
   PrepareForEditing
 
   Set up this editing session for one or more editors
 ----------------------------------------------------------------------------*/
 nsresult
 nsEditingSession::PrepareForEditing(nsIDOMWindow *aWindow)
 {
   if (mProgressListenerRegistered)
--- a/editor/composer/src/nsEditingSession.h
+++ b/editor/composer/src/nsEditingSession.h
@@ -36,17 +36,16 @@ class nsITimer;
 { 0xbc26ff01, 0xf2bd, 0x11d4, { 0xa7, 0x3c, 0xe5, 0xa4, 0xb5, 0xa8, 0xbd, 0xfc } }
 
 
 class nsComposerCommandsUpdater;
 class nsIChannel;
 class nsIControllers;
 class nsIDocShell;
 class nsIEditor;
-class nsIEditorDocShell;
 class nsIWebProgress;
 
 class nsEditingSession : public nsIEditingSession,
                          public nsIWebProgressListener,
                          public nsSupportsWeakReference
 {
 public:
 
@@ -60,18 +59,16 @@ public:
   NS_DECL_NSIWEBPROGRESSLISTENER
   
   // nsIEditingSession
   NS_DECL_NSIEDITINGSESSION
 
 protected:
 
   nsIDocShell *   GetDocShellFromWindow(nsIDOMWindow *aWindow);
-  nsresult        GetEditorDocShellFromWindow(nsIDOMWindow *aWindow, 
-                                              nsIEditorDocShell** outDocShell);
   
   nsresult        SetupEditorCommandController(const char *aControllerClassName,
                                                nsIDOMWindow *aWindow,
                                                nsISupports *aContext,
                                                uint32_t *aControllerId);
 
   nsresult        SetContextOnControllerById(nsIControllers* aControllers, 
                                             nsISupports* aContext,
--- a/editor/libeditor/html/tests/test_bug520189.html
+++ b/editor/libeditor/html/tests/test_bug520189.html
@@ -578,17 +578,17 @@ function runTest(test) {
     if ("isIFrame" in test) {
       win = elem.contentDocument.defaultView;
     } else {
       getSelection().collapse(elem, 0);
       win = window;
     }
     editor = SpecialPowers.wrap(win).QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor)
                           .getInterface(SpecialPowers.Ci.nsIWebNavigation)
-                          .QueryInterface(SpecialPowers.Ci.nsIEditorDocShell)
+                          .QueryInterface(SpecialPowers.Ci.nsIDocShell)
                           .editor;
     editor.pasteTransferable(trans);
   } else {
     var clipboard = SpecialPowers.Cc["@mozilla.org/widget/clipboard;1"]
                                  .getService(SpecialPowers.Ci.nsIClipboard);
 
     clipboard.setData(trans, null, SpecialPowers.Ci.nsIClipboard.kGlobalClipboard);
 
--- a/editor/libeditor/html/tests/test_htmleditor_keyevent_handling.html
+++ b/editor/libeditor/html/tests/test_htmleditor_keyevent_handling.html
@@ -669,17 +669,17 @@ function runTests()
   }
 
   doTest(htmlEditor, "contenteditable=\"true\"", false, true, false);
 
   const nsIPlaintextEditor = Components.interfaces.nsIPlaintextEditor;
   var editor =
     window.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
       getInterface(Components.interfaces.nsIWebNavigation).
-      QueryInterface(Components.interfaces.nsIEditorDocShell).editor;
+      QueryInterface(Components.interfaces.nsIDocShell).editor;
   var flags = editor.flags;
   // readonly
   editor.flags = flags | nsIPlaintextEditor.eEditorReadonlyMask;
   doTest(htmlEditor, "readonly HTML editor", true, true, false);
 
   // non-tabbable
   editor.flags = flags & ~(nsIPlaintextEditor.eEditorAllowInteraction);
   doTest(htmlEditor, "non-tabbable HTML editor", false, false, false);
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -34,17 +34,16 @@
 #include "prlog.h"
 #include "prprf.h"
 #include <stdarg.h>
 #include "nsFrameManager.h"
 #include "nsCSSRendering.h"
 #include "nsLayoutUtils.h"
 
 #include "nsIDOMNode.h"
-#include "nsIEditorDocShell.h"
 #include "nsEventStateManager.h"
 #include "nsISelection.h"
 #include "nsISelectionPrivate.h"
 #include "nsFrameSelection.h"
 #include "nsHTMLParts.h"
 #include "nsGkAtoms.h"
 #include "nsCSSAnonBoxes.h"
 #include "nsCSSPseudoElements.h"
--- a/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
+++ b/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
@@ -10,17 +10,16 @@
 #include "nsIWebBrowserChrome.h"
 #include "nsCURILoader.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsNetUtil.h"
 #include "nsIURL.h"
 #include "nsIURI.h"
 #include "nsIDocShell.h"
 #include "nsIDocShellTreeOwner.h"
-#include "nsIEditorDocShell.h"
 #include "nsISimpleEnumerator.h"
 #include "nsPIDOMWindow.h"
 #include "nsIPrefBranch.h"
 #include "nsIPrefService.h"
 #include "nsString.h"
 #include "nsCRT.h"
 
 #include "nsIDOMNode.h"
--- a/widget/tests/test_imestate.html
+++ b/widget/tests/test_imestate.html
@@ -1004,17 +1004,17 @@ function runComplexContenteditableTests(
      description + "The editor doesn't get focus");
   is(gUtils.IMEStatus, gUtils.IME_STATUS_ENABLED,
      description + "IME isn't enabled on HTML editor");
   const kReadonly =
     Components.interfaces.nsIPlaintextEditor.eEditorReadonlyMask;
   var editor =
     window.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
       getInterface(Components.interfaces.nsIWebNavigation).
-      QueryInterface(Components.interfaces.nsIEditorDocShell).editor;
+      QueryInterface(Components.interfaces.nsIDocShell).editor;
   var flags = editor.flags;
   editor.flags = flags | kReadonly;
   is(gFM.focusedElement, container,
      description + "The editor loses focus by flag change");
   is(gUtils.IMEStatus, gUtils.IME_STATUS_DISABLED,
      description + "IME is still enabled on readonly HTML editor");
   editor.flags = flags;
   is(gFM.focusedElement, container,
@@ -1036,17 +1036,17 @@ function runComplexContenteditableTests(
   container.setAttribute("contenteditable", "true");
   is(gFM.focusedElement, button,
      description + "The button loses focus, the container is editable now");
   todo_is(gUtils.IMEStatus, gUtils.IME_STATUS_ENABLED,
           description + "IME is still disabled on the button, the container is editable now");
   editor =
     window.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
       getInterface(Components.interfaces.nsIWebNavigation).
-      QueryInterface(Components.interfaces.nsIEditorDocShell).editor;
+      QueryInterface(Components.interfaces.nsIDocShell).editor;
   flags = editor.flags;
   editor.flags = flags | kReadonly;
   is(gFM.focusedElement, button,
      description + "The button loses focus by changing editor flags");
   is(gUtils.IMEStatus, gUtils.IME_STATUS_DISABLED,
      description + "IME is still enabled on the button, the container is readonly now");
   editor.flags = flags;
   is(gFM.focusedElement, button,
@@ -1078,17 +1078,17 @@ function runComplexContenteditableTests(
        description + "The " + aEditorDescription +
          " loses focus, the container is editable now");
     is(gUtils.IMEStatus, expectedState,
        description + "IME becomes " + unexpectedStateDescription +
          " on the " + aEditorDescription + ", the container is editable now");
     editor =
       window.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
         getInterface(Components.interfaces.nsIWebNavigation).
-        QueryInterface(Components.interfaces.nsIEditorDocShell).editor;
+        QueryInterface(Components.interfaces.nsIDocShell).editor;
     flags = editor.flags;
     editor.flags = flags | kReadonly;
     is(gFM.focusedElement, aEditor,
        description + "The " + aEditorDescription +
          " loses focus by changing editor flags");
     is(gUtils.IMEStatus, expectedState,
        description + "IME becomes " + unexpectedStateDescription + " on the " +
          aEditorDescription + ", the container is readonly now");
@@ -1146,17 +1146,17 @@ function runComplexContenteditableTests(
          " loses focus, a HTML editor is editable now");
     is(gUtils.IMEStatus, expectedState,
        description + "IME becomes " + unexpectedStateDescription +
          " on the " + aFocusNodeDescription +
          ", the HTML editor is editable now");
     editor =
       window.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
         getInterface(Components.interfaces.nsIWebNavigation).
-        QueryInterface(Components.interfaces.nsIEditorDocShell).editor;
+        QueryInterface(Components.interfaces.nsIDocShell).editor;
     flags = editor.flags;
     editor.flags = flags | kReadonly;
     is(gFM.focusedElement, aFocusNode,
        description + aFocusNodeDescription +
          " loses focus by changing HTML editor flags");
     is(gUtils.IMEStatus, expectedState,
        description + "IME becomes " + unexpectedStateDescription + " on " +
          aFocusNodeDescription + ", the HTML editor is readonly now");
@@ -1214,17 +1214,17 @@ function runEditorFlagChangeTests()
      description + "IME isn't enabled on HTML editor");
   const kIMEStateChangeFlags =
     Components.interfaces.nsIPlaintextEditor.eEditorPasswordMask |
     Components.interfaces.nsIPlaintextEditor.eEditorReadonlyMask |
     Components.interfaces.nsIPlaintextEditor.eEditorDisabledMask;
   var editor =
     window.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
       getInterface(Components.interfaces.nsIWebNavigation).
-      QueryInterface(Components.interfaces.nsIEditorDocShell).editor;
+      QueryInterface(Components.interfaces.nsIDocShell).editor;
   var editorIMESupport =
     editor.QueryInterface(Components.interfaces.nsIEditorIMESupport);
   var flags = editor.flags;
 
   // start composition
   synthesizeComposition({ type: "compositionstart" });
 
   // input characters
--- a/widget/tests/window_composition_text_querycontent.xul
+++ b/widget/tests/window_composition_text_querycontent.xul
@@ -82,17 +82,17 @@ var iframe3 = document.getElementById("i
 var input = document.getElementById("input");
 var textareaInFrame;
 
 const nsIDOMWindowUtils = Components.interfaces.nsIDOMWindowUtils;
 const nsIDOMNSEditableElement = Components.interfaces.nsIDOMNSEditableElement;
 const nsIEditorIMESupport = Components.interfaces.nsIEditorIMESupport;
 const nsIInterfaceRequestor = Components.interfaces.nsIInterfaceRequestor;
 const nsIWebNavigation = Components.interfaces.nsIWebNavigation;
-const nsIEditorDocShell = Components.interfaces.nsIEditorDocShell;
+const nsIDocShell = Components.interfaces.nsIDocShell;
 
 function hitEventLoop(aFunc, aTimes)
 {
   if (--aTimes) {
     setTimeout(hitEventLoop, 0, aFunc, aTimes);
   } else {
     setTimeout(aFunc, 20);
   }
@@ -104,17 +104,17 @@ function getEditorIMESupport(aNode)
                editor.
                QueryInterface(nsIEditorIMESupport);
 }
 
 function getHTMLEditorIMESupport(aWindow)
 {
   return aWindow.QueryInterface(nsIInterfaceRequestor).
                  getInterface(nsIWebNavigation).
-                 QueryInterface(nsIEditorDocShell).
+                 QueryInterface(nsIDocShell).
                  editor;
 }
 
 const kIsWin = (navigator.platform.indexOf("Win") == 0);
 const kIsMac = (navigator.platform.indexOf("Mac") == 0);
 
 const kLFLen = kIsWin ? 2 : 1;
 
--- a/widget/tests/window_imestate_iframes.html
+++ b/widget/tests/window_imestate_iframes.html
@@ -184,17 +184,17 @@ function runTests()
     const kReadonly =
       Components.interfaces.nsIPlaintextEditor.eEditorReadonlyMask;
     var description = "testOnEditorFlagChange: " + aDescription;
     resetFocusToParentHTML(description);
     var htmlEditor =
       iframe.contentWindow.
         QueryInterface(Components.interfaces.nsIInterfaceRequestor).
         getInterface(Components.interfaces.nsIWebNavigation).
-        QueryInterface(Components.interfaces.nsIEditorDocShell).editor;
+        QueryInterface(Components.interfaces.nsIDocShell).editor;
     var e = aIsInDesignMode ? root : editor;
     e.focus();
     is(fm.focusedElement, e,
        description + ": focus() of editor didn't move focus as expected");
     is(utils.IMEStatus, utils.IME_STATUS_ENABLED,
        description + ": IME isn't enabled when the editor gets focus");
     var flags = htmlEditor.flags;
     htmlEditor.flags |= kReadonly;