Bug 1489308 part 9. Remove now-unused wyciwyg bits. r=mccr8
authorBoris Zbarsky <bzbarsky@mit.edu>
Thu, 28 Feb 2019 01:09:48 +0000
changeset 519460 5fbeaa1c39971f0f41bc7cd04610234f27fc18a2
parent 519459 8e1196296ad4ff8e525194bce2eb9f043ee60834
child 519461 a01586b62cf510bb165057e0bea9a45cc76e961e
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1489308
milestone67.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 1489308 part 9. Remove now-unused wyciwyg bits. r=mccr8 Differential Revision: https://phabricator.services.mozilla.com/D17327
browser/base/content/browser.js
browser/components/urlbar/UrlbarInput.jsm
browser/docs/AddressBar.rst
docshell/base/nsDefaultURIFixup.cpp
docshell/base/nsDocShell.cpp
docshell/base/nsDocShell.h
docshell/base/nsIURIFixup.idl
dom/base/Document.cpp
dom/base/Document.h
dom/base/nsContentUtils.cpp
dom/base/nsContentUtils.h
dom/browser-element/BrowserElementChildPreload.js
dom/browser-element/mochitest/browserElement_ExposableURI.js
dom/browser-element/mochitest/file_wyciwyg.html
dom/browser-element/mochitest/mochitest.ini
dom/html/nsHTMLDocument.cpp
dom/html/nsHTMLDocument.h
dom/html/test/browser.ini
dom/html/test/browser_bug649778.js
dom/html/test/browser_refresh_after_document_write.js
dom/html/test/browser_refresh_wyciwyg_url.js
dom/html/test/file_bug649778.html
dom/html/test/file_bug649778.html^headers^
dom/html/test/file_refresh_after_document_write.html
dom/html/test/file_refresh_wyciwyg_url.html
dom/ipc/ContentParent.cpp
dom/ipc/ContentParent.h
dom/localstorage/LocalStorageManager2.cpp
dom/localstorage/PBackgroundLSDatabase.ipdl
dom/localstorage/nsILocalStorageManager.idl
dom/security/nsContentSecurityManager.cpp
ipc/ipdl/ipdl/direct_call.py
ipc/ipdl/message-metadata.ini
mobile/android/base/java/org/mozilla/gecko/db/LocalTabsAccessor.java
mobile/android/base/java/org/mozilla/gecko/restrictions/GuestProfileConfiguration.java
mobile/android/chrome/content/browser.js
mobile/android/components/HelperAppDialog.js
mobile/android/components/SessionStore.js
mobile/android/components/build/nsAndroidHistory.cpp
mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/android/RepoUtils.java
mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFilterOpenTab.java
netwerk/base/nsIChannel.idl
netwerk/base/nsNetUtil.cpp
netwerk/base/nsNetUtil.h
netwerk/build/components.conf
netwerk/build/moz.build
netwerk/build/nsNetCID.h
netwerk/cache2/OldWrappers.cpp
netwerk/ipc/NeckoChild.cpp
netwerk/ipc/NeckoChild.h
netwerk/ipc/NeckoParent.cpp
netwerk/ipc/NeckoParent.h
netwerk/ipc/PNecko.ipdl
netwerk/protocol/ftp/FTPChannelParent.cpp
netwerk/protocol/http/HttpBaseChannel.cpp
netwerk/protocol/http/HttpChannelParent.cpp
netwerk/protocol/moz.build
netwerk/protocol/wyciwyg/PWyciwygChannel.ipdl
netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp
netwerk/protocol/wyciwyg/WyciwygChannelChild.h
netwerk/protocol/wyciwyg/WyciwygChannelParent.cpp
netwerk/protocol/wyciwyg/WyciwygChannelParent.h
netwerk/protocol/wyciwyg/moz.build
netwerk/protocol/wyciwyg/nsIWyciwygChannel.idl
netwerk/protocol/wyciwyg/nsWyciwyg.cpp
netwerk/protocol/wyciwyg/nsWyciwyg.h
netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp
netwerk/protocol/wyciwyg/nsWyciwygChannel.h
netwerk/protocol/wyciwyg/nsWyciwygProtocolHandler.cpp
netwerk/protocol/wyciwyg/nsWyciwygProtocolHandler.h
parser/html/nsHtml5StreamParser.cpp
security/manager/ssl/nsSecureBrowserUIImpl.cpp
security/manager/ssl/tests/mochitest/mixedcontent/bug329869.js
testing/web-platform/meta/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html.ini
toolkit/components/places/nsNavHistory.cpp
toolkit/components/places/tests/history/test_async_history_api.js
toolkit/components/places/tests/unit/test_isURIVisited.js
toolkit/components/places/tests/unit/test_isvisited.js
toolkit/modules/sessionstore/SessionHistory.jsm
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -2658,17 +2658,17 @@ function URLBarSetURI(aURI, updatePopupN
   var value = gBrowser.userTypedValue;
   var valid = false;
 
   // Explicitly check for nulled out value. We don't want to reset the URL
   // bar if the user has deleted the URL and we'd just put the same URL
   // back. See bug 304198.
   if (value === null) {
     let uri = aURI || gBrowser.currentURI;
-    // Strip off "wyciwyg://" and passwords for the location bar
+    // Strip off usernames and passwords for the location bar
     try {
       uri = Services.uriFixup.createExposableURI(uri);
     } catch (e) {}
 
     // Replace initial page URIs with an empty string
     // only if there's no opener (bug 370555).
     if (isInitialPage(uri) &&
         checkEmptyPageOrigin(gBrowser.selectedBrowser, uri)) {
--- a/browser/components/urlbar/UrlbarInput.jsm
+++ b/browser/components/urlbar/UrlbarInput.jsm
@@ -161,18 +161,18 @@ class UrlbarInput {
     this.inputField.focus();
   }
 
   blur() {
     this.inputField.blur();
   }
 
   /**
-   * Converts an internal URI (e.g. a wyciwyg URI) into one which we can
-   * expose to the user.
+   * Converts an internal URI (e.g. a URI with a username or password) into one
+   * which we can expose to the user.
    *
    * @param {nsIURI} uri
    *   The URI to be converted
    * @returns {nsIURI}
    *   The converted, exposable URI
    */
   makeURIReadable(uri) {
     // Avoid copying 'about:reader?url=', and always provide the original URI:
--- a/browser/docs/AddressBar.rst
+++ b/browser/docs/AddressBar.rst
@@ -289,18 +289,18 @@ Implements an input box *View*, owns an 
     // Used to trim urls when necessary (e.g. removing "http://")
     trimValue();
     // Uses UrlbarValueFormatter to highlight the base host, search aliases
     // and to keep the host visible on overflow.
     formatValue(val);
     // Manage view visibility.
     closePopup();
     openResults();
-    // Converts an internal URI (e.g. a wyciwyg URI) into one which we can
-    // expose to the user.
+    // Converts an internal URI (e.g. a URI with a username or password) into
+    // one which we can expose to the user.
     makeURIReadable(uri);
     // Handles an event which would cause a url or text to be opened.
     handleCommand();
     // Called by the view when a result is selected.
     resultsSelected();
     // The underlying textbox
     textbox;
     // The results panel.
--- a/docshell/base/nsDefaultURIFixup.cpp
+++ b/docshell/base/nsDefaultURIFixup.cpp
@@ -46,38 +46,28 @@ nsDefaultURIFixup::nsDefaultURIFixup() {
 
 nsDefaultURIFixup::~nsDefaultURIFixup() {}
 
 NS_IMETHODIMP
 nsDefaultURIFixup::CreateExposableURI(nsIURI* aURI, nsIURI** aReturn) {
   NS_ENSURE_ARG_POINTER(aURI);
   NS_ENSURE_ARG_POINTER(aReturn);
 
-  bool isWyciwyg = net::SchemeIsWYCIWYG(aURI);
-
   nsAutoCString userPass;
   aURI->GetUserPass(userPass);
 
   // most of the time we can just AddRef and return
-  if (!isWyciwyg && userPass.IsEmpty()) {
+  if (userPass.IsEmpty()) {
     *aReturn = aURI;
     NS_ADDREF(*aReturn);
     return NS_OK;
   }
 
   // Rats, we have to massage the URI
-  nsCOMPtr<nsIURI> uri;
-  if (isWyciwyg) {
-    nsresult rv =
-        nsContentUtils::RemoveWyciwygScheme(aURI, getter_AddRefs(uri));
-    NS_ENSURE_SUCCESS(rv, rv);
-  } else {
-    // No need to clone the URI as NS_MutateURI does that for us.
-    uri = aURI;
-  }
+  nsCOMPtr<nsIURI> uri = aURI;
 
   Unused << NS_MutateURI(uri).SetUserPass(EmptyCString()).Finalize(uri);
 
   uri.forget(aReturn);
   return NS_OK;
 }
 
 NS_IMETHODIMP
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -144,17 +144,16 @@
 #include "nsIWebBrowserChrome.h"
 #include "nsIWebBrowserChrome3.h"
 #include "nsIWebBrowserChromeFocus.h"
 #include "nsIWebBrowserFind.h"
 #include "nsIWebProgress.h"
 #include "nsIWidget.h"
 #include "nsIWindowWatcher.h"
 #include "nsIWritablePropertyBag2.h"
-#include "nsIWyciwygChannel.h"
 
 #include "nsCommandManager.h"
 #include "nsPIDOMWindow.h"
 #include "nsPIWindowRoot.h"
 
 #include "IHistory.h"
 #include "IUrlClassifierUITelemetry.h"
 
@@ -3271,28 +3270,21 @@ nsDocShell::AddChild(nsIDocShellTreeItem
   if (!mContentViewer) {
     return NS_OK;
   }
   Document* doc = mContentViewer->GetDocument();
   if (!doc) {
     return NS_OK;
   }
 
-  if (!(mCurrentURI && SchemeIsWYCIWYG(mCurrentURI))) {
-    // If this docshell is loaded from a wyciwyg: URI, don't
-    // advertise our charset since it does not in any way reflect
-    // the actual source charset, which is what we're trying to
-    // expose here.
-
-    const Encoding* parentCS = doc->GetDocumentCharacterSet();
-    int32_t charsetSource = doc->GetDocumentCharacterSetSource();
-    // set the child's parentCharset
-    childAsDocShell->SetParentCharset(parentCS, charsetSource,
-                                      doc->NodePrincipal());
-  }
+  const Encoding* parentCS = doc->GetDocumentCharacterSet();
+  int32_t charsetSource = doc->GetDocumentCharacterSetSource();
+  // set the child's parentCharset
+  childAsDocShell->SetParentCharset(parentCS, charsetSource,
+                                    doc->NodePrincipal());
 
   // printf("### 1 >>> Adding child. Parent CS = %s. ItemType = %d.\n",
   //        NS_LossyConvertUTF16toASCII(parentCS).get(), mItemType);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
@@ -6246,28 +6238,16 @@ nsresult nsDocShell::Embed(nsIContentVie
                            const char* aCommand, nsISupports* aExtraInfo) {
   // Save the LayoutHistoryState of the previous document, before
   // setting up new document
   PersistLayoutHistoryState();
 
   nsresult rv = SetupNewViewer(aContentViewer);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  // If we are loading a wyciwyg url from history, change the base URI for
-  // the document to the original http url that created the document.write().
-  // This makes sure that all relative urls in a document.written page loaded
-  // via history work properly.
-  if (mCurrentURI &&
-      (mLoadType & LOAD_CMD_HISTORY || mLoadType == LOAD_RELOAD_NORMAL ||
-       mLoadType == LOAD_RELOAD_CHARSET_CHANGE ||
-       mLoadType == LOAD_RELOAD_CHARSET_CHANGE_BYPASS_CACHE ||
-       mLoadType == LOAD_RELOAD_CHARSET_CHANGE_BYPASS_PROXY_AND_CACHE) &&
-      SchemeIsWYCIWYG(mCurrentURI)) {
-    SetBaseUrlForWyciwyg(aContentViewer);
-  }
   // XXX What if SetupNewViewer fails?
   if (mLSHE) {
     // Restore the editing state, if it's stored in session history.
     if (mLSHE->HasDetachedEditor()) {
       ReattachEditorToWindow(mLSHE);
     }
     // Set history.state
     SetDocCurrentStateObj(mLSHE);
@@ -6316,72 +6296,22 @@ nsDocShell::OnStateChange(nsIWebProgress
   if ((~aStateFlags & (STATE_START | STATE_IS_NETWORK)) == 0) {
     // Save timing statistics.
     nsCOMPtr<nsIChannel> channel(do_QueryInterface(aRequest));
     nsCOMPtr<nsIURI> uri;
     channel->GetURI(getter_AddRefs(uri));
     nsAutoCString aURI;
     uri->GetAsciiSpec(aURI);
 
-    nsCOMPtr<nsIWyciwygChannel> wcwgChannel(do_QueryInterface(aRequest));
-    nsCOMPtr<nsIWebProgress> webProgress =
-        do_QueryInterface(GetAsSupports(this));
-
-    // We don't update navigation timing for wyciwyg channels
-    if (this == aProgress && !wcwgChannel) {
+    if (this == aProgress) {
       mozilla::Unused << MaybeInitTiming();
       mTiming->NotifyFetchStart(uri,
                                 ConvertLoadTypeToNavigationType(mLoadType));
     }
 
-    // Was the wyciwyg document loaded on this docshell?
-    if (wcwgChannel && !mLSHE && (mItemType == typeContent) &&
-        aProgress == webProgress.get()) {
-      bool equalUri = true;
-      // Store the wyciwyg url in session history, only if it is
-      // being loaded fresh for the first time. We don't want
-      // multiple entries for successive loads
-      if (mCurrentURI && NS_SUCCEEDED(uri->Equals(mCurrentURI, &equalUri)) &&
-          !equalUri) {
-        nsCOMPtr<nsIDocShellTreeItem> parentAsItem;
-        GetSameTypeParent(getter_AddRefs(parentAsItem));
-        nsCOMPtr<nsIDocShell> parentDS(do_QueryInterface(parentAsItem));
-        bool inOnLoadHandler = false;
-        if (parentDS) {
-          parentDS->GetIsExecutingOnLoadHandler(&inOnLoadHandler);
-        }
-        if (inOnLoadHandler) {
-          // We're handling parent's load event listener, which causes
-          // document.write in a subdocument.
-          // Need to clear the session history for all child
-          // docshells so that we can handle them like they would
-          // all be added dynamically.
-          nsCOMPtr<nsIDocShell> parent = do_QueryInterface(parentAsItem);
-          if (parent) {
-            bool oshe = false;
-            nsCOMPtr<nsISHEntry> entry;
-            parent->GetCurrentSHEntry(getter_AddRefs(entry), &oshe);
-            static_cast<nsDocShell*>(parent.get())->ClearFrameHistory(entry);
-          }
-        }
-
-        // This is a document.write(). Get the made-up url
-        // from the channel and store it in session history.
-        // Pass false for aCloneChildren, since we're creating
-        // a new DOM here.
-        AddToSessionHistory(uri, wcwgChannel, nullptr, nullptr, nullptr, false,
-                            getter_AddRefs(mLSHE));
-        SetCurrentURI(uri, aRequest, true, 0);
-        // Save history state of the previous page
-        PersistLayoutHistoryState();
-        // We'll never get an Embed() for this load, so just go ahead
-        // and SetHistoryEntry now.
-        SetHistoryEntry(&mOSHE, mLSHE);
-      }
-    }
     // Page has begun to load
     mBusyFlags = (BusyFlags)(BUSY_FLAGS_BUSY | BUSY_FLAGS_BEFORE_PAGE_LOAD);
 
     if ((aStateFlags & STATE_RESTORING) == 0) {
       // Show the progress cursor if the pref is set
       if (nsContentUtils::UseActivityCursor()) {
         nsCOMPtr<nsIWidget> mainWidget;
         GetMainWidget(getter_AddRefs(mainWidget));
@@ -7743,18 +7673,16 @@ nsresult nsDocShell::RestoreFromHistory(
   // to avoid teardown of the presentation.
   mContentViewer->SetSticky(sticky);
 
   NS_ENSURE_SUCCESS(rv, rv);
 
   // mLSHE is now our currently-loaded document.
   SetHistoryEntry(&mOSHE, mLSHE);
 
-  // XXX special wyciwyg handling in Embed()?
-
   // We aren't going to restore any items from the LayoutHistoryState,
   // but we don't want them to stay around in case the page is reloaded.
   SetLayoutHistoryState(nullptr);
 
   // This is the end of our Embed() replacement
 
   mSavingOldViewer = false;
   mEODForCurrentDocument = false;
@@ -9168,23 +9096,16 @@ nsresult nsDocShell::InternalLoad(nsDocS
     return NS_ERROR_NOT_AVAILABLE;
   }
 
   nsresult rv = EnsureScriptEnvironment();
   if (NS_FAILED(rv)) {
     return rv;
   }
 
-  // wyciwyg urls can only be loaded through history. Any normal load of
-  // wyciwyg through docshell is  illegal. Disallow such loads.
-  if ((aLoadState->LoadType() & LOAD_CMD_NORMAL) &&
-      SchemeIsWYCIWYG(aLoadState->URI())) {
-    return NS_ERROR_FAILURE;
-  }
-
   // If we have a target to move to, do that now.
   if (!aLoadState->Target().IsEmpty()) {
     return PerformRetargeting(aLoadState, aDocShell, aRequest);
   }
 
   // If we don't have a target, we're loading into ourselves, and our load
   // delegate may want to intercept that load.
   bool handled;
@@ -12223,38 +12144,16 @@ nsDocShell::InterfaceRequestorProxy::Get
   nsCOMPtr<nsIInterfaceRequestor> ifReq = do_QueryReferent(mWeakPtr);
   if (ifReq) {
     return ifReq->GetInterface(aIID, aSink);
   }
   *aSink = nullptr;
   return NS_NOINTERFACE;
 }
 
-nsresult nsDocShell::SetBaseUrlForWyciwyg(nsIContentViewer* aContentViewer) {
-  if (!aContentViewer) {
-    return NS_ERROR_FAILURE;
-  }
-
-  nsCOMPtr<nsIURI> baseURI;
-  nsresult rv = NS_ERROR_NOT_AVAILABLE;
-
-  if (sURIFixup) {
-    rv = sURIFixup->CreateExposableURI(mCurrentURI, getter_AddRefs(baseURI));
-  }
-
-  // Get the current document and set the base uri
-  if (baseURI) {
-    Document* document = aContentViewer->GetDocument();
-    if (document) {
-      document->SetBaseURI(baseURI);
-    }
-  }
-  return rv;
-}
-
 //*****************************************************************************
 // nsDocShell::nsIAuthPromptProvider
 //*****************************************************************************
 
 NS_IMETHODIMP
 nsDocShell::GetAuthPrompt(uint32_t aPromptReason, const nsIID& aIID,
                           void** aResult) {
   // a priority prompt request will override a false mAllowAuth setting
--- a/docshell/base/nsDocShell.h
+++ b/docshell/base/nsDocShell.h
@@ -866,17 +866,16 @@ class nsDocShell final : public nsDocLoa
   nsresult EnsureCommandHandler();
   nsresult RefreshURIFromQueue();
   nsresult Embed(nsIContentViewer* aContentViewer, const char* aCommand,
                  nsISupports* aExtraInfo);
   nsPresContext* GetEldestPresContext();
   nsresult CheckLoadingPermissions();
   nsresult PersistLayoutHistoryState();
   nsresult LoadHistoryEntry(nsISHEntry* aEntry, uint32_t aLoadType);
-  nsresult SetBaseUrlForWyciwyg(nsIContentViewer* aContentViewer);
   nsresult GetHttpChannel(nsIChannel* aChannel, nsIHttpChannel** aReturn);
   nsresult ConfirmRepost(bool* aRepost);
   nsresult GetPromptAndStringBundle(nsIPrompt** aPrompt,
                                     nsIStringBundle** aStringBundle);
   nsresult SetCurScrollPosEx(int32_t aCurHorizontalPos,
                              int32_t aCurVerticalPos);
   nsPoint GetCurScrollPos();
 
--- a/docshell/base/nsIURIFixup.idl
+++ b/docshell/base/nsIURIFixup.idl
@@ -92,18 +92,18 @@ interface nsIURIFixup : nsISupports
     /*
      * Fix common scheme typos.
      */
     const unsigned long FIXUP_FLAG_FIX_SCHEME_TYPOS = 8;
 
     /* NB: If adding an extra flag, 4 is free (again) */
 
     /**
-     * Converts an internal URI (e.g. a wyciwyg URI) into one which we can
-     * expose to the user, for example on the URL bar.
+     * Converts an internal URI (e.g. one that has a username and password in
+     * it) into one which we can expose to the user, for example on the URL bar.
      *
      * @param  aURI       The URI to be converted
      * @return nsIURI     The converted, exposable URI
      * @throws NS_ERROR_MALFORMED_URI when the exposable portion of aURI is malformed
      * @throws NS_ERROR_UNKNOWN_PROTOCOL when we can't get a protocol handler service
      *         for the URI scheme.
      */
     nsIURI createExposableURI(in nsIURI aURI);
--- a/dom/base/Document.cpp
+++ b/dom/base/Document.cpp
@@ -1975,27 +1975,16 @@ void Document::Reset(nsIChannel* aChanne
   nsCOMPtr<nsIURI> uri;
   nsCOMPtr<nsIPrincipal> principal;
   if (aChannel) {
     // Note: this code is duplicated in XULDocument::StartDocumentLoad and
     // nsScriptSecurityManager::GetChannelResultPrincipal.
     // Note: this should match nsDocShell::OnLoadingSite
     NS_GetFinalChannelURI(aChannel, getter_AddRefs(uri));
 
-    bool isWyciwyg = false;
-    uri->SchemeIs("wyciwyg", &isWyciwyg);
-    if (isWyciwyg) {
-      nsCOMPtr<nsIURI> cleanURI;
-      nsresult rv =
-          nsContentUtils::RemoveWyciwygScheme(uri, getter_AddRefs(cleanURI));
-      if (NS_SUCCEEDED(rv)) {
-        uri = cleanURI;
-      }
-    }
-
     nsIScriptSecurityManager* securityManager =
         nsContentUtils::GetSecurityManager();
     if (securityManager) {
       securityManager->GetChannelResultPrincipal(aChannel,
                                                  getter_AddRefs(principal));
     }
   }
 
--- a/dom/base/Document.h
+++ b/dom/base/Document.h
@@ -589,17 +589,17 @@ class Document : public nsINode,
    * *aDocListener; this is the job of subclasses.
    */
   virtual nsresult StartDocumentLoad(const char* aCommand, nsIChannel* aChannel,
                                      nsILoadGroup* aLoadGroup,
                                      nsISupports* aContainer,
                                      nsIStreamListener** aDocListener,
                                      bool aReset,
                                      nsIContentSink* aSink = nullptr) = 0;
-  virtual void StopDocumentLoad();
+  void StopDocumentLoad();
 
   virtual void SetSuppressParserErrorElement(bool aSuppress) {}
   virtual bool SuppressParserErrorElement() { return false; }
 
   virtual void SetSuppressParserErrorConsoleMessages(bool aSuppress) {}
   virtual bool SuppressParserErrorConsoleMessages() { return false; }
 
   // nsINode
@@ -828,17 +828,17 @@ class Document : public nsINode,
    */
   NotNull<const Encoding*> GetDocumentCharacterSet() const {
     return mCharacterSet;
   }
 
   /**
    * Set the document's character encoding.
    */
-  virtual void SetDocumentCharacterSet(NotNull<const Encoding*> aEncoding);
+  void SetDocumentCharacterSet(NotNull<const Encoding*> aEncoding);
 
   int32_t GetDocumentCharacterSetSource() const { return mCharacterSetSource; }
 
   // This method MUST be called before SetDocumentCharacterSet if
   // you're planning to call both.
   void SetDocumentCharacterSetSource(int32_t aCharsetSource) {
     mCharacterSetSource = aCharsetSource;
   }
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -743,43 +743,16 @@ nsresult nsContentUtils::Init() {
   uio->Init();
   uio.forget(&sUserInteractionObserver);
 
   sInitialized = true;
 
   return NS_OK;
 }
 
-nsresult nsContentUtils::RemoveWyciwygScheme(nsIURI* aURI, nsIURI** aReturn) {
-#ifdef DEBUG
-  bool isWyciwyg = false;
-  aURI->SchemeIs("wyciwyg", &isWyciwyg);
-  MOZ_ASSERT(isWyciwyg, "Scheme should be wyciwyg");
-#endif
-  nsAutoCString path;
-  nsresult rv = aURI->GetPathQueryRef(path);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  uint32_t pathLength = path.Length();
-  if (pathLength <= 2) {
-    return NS_ERROR_FAILURE;
-  }
-
-  // Path is of the form "//123/http://foo/bar", with a variable number of
-  // digits. To figure out where the "real" URL starts, search path for a '/',
-  // starting at the third character.
-  int32_t slashIndex = path.FindChar('/', 2);
-  if (slashIndex == kNotFound) {
-    return NS_ERROR_FAILURE;
-  }
-
-  return NS_NewURI(
-      aReturn, Substring(path, slashIndex + 1, pathLength - slashIndex - 1));
-}
-
 void nsContentUtils::GetShiftText(nsAString& text) {
   if (!sShiftText) InitializeModifierStrings();
   text.Assign(*sShiftText);
 }
 
 void nsContentUtils::GetControlText(nsAString& text) {
   if (!sControlText) InitializeModifierStrings();
   text.Assign(*sControlText);
--- a/dom/base/nsContentUtils.h
+++ b/dom/base/nsContentUtils.h
@@ -214,19 +214,16 @@ class nsContentUtils {
   typedef mozilla::ChromeOnlyDispatch ChromeOnlyDispatch;
   typedef mozilla::EventMessage EventMessage;
   typedef mozilla::TimeDuration TimeDuration;
   typedef mozilla::Trusted Trusted;
 
  public:
   static nsresult Init();
 
-  // Strip off "wyciwyg://n/" part of a URL. aURI must have "wyciwyg" scheme.
-  static nsresult RemoveWyciwygScheme(nsIURI* aURI, nsIURI** aReturn);
-
   static bool IsCallerChrome();
   static bool ThreadsafeIsCallerChrome();
   static bool IsCallerContentXBL();
   static bool IsCallerUAWidget();
   static bool IsFuzzingEnabled()
 #ifndef FUZZING
   {
     return false;
--- a/dom/browser-element/BrowserElementChildPreload.js
+++ b/dom/browser-element/BrowserElementChildPreload.js
@@ -1025,17 +1025,17 @@ BrowserElementChild.prototype = {
       }
 
       // Ignore locationchange events which occur before the first loadstart.
       // These are usually about:blank loads we don't care about.
       if (!this._seenLoadStart) {
         return;
       }
 
-      // Remove password and wyciwyg from uri.
+      // Remove password from uri.
       location = Cc["@mozilla.org/docshell/urifixup;1"]
         .getService(Ci.nsIURIFixup).createExposableURI(location);
 
       var webNav = docShell.QueryInterface(Ci.nsIWebNavigation);
 
       sendAsyncMsg('locationchange', { url: location.spec,
                                        canGoBack: webNav.canGoBack,
                                        canGoForward: webNav.canGoForward });
--- a/dom/browser-element/mochitest/browserElement_ExposableURI.js
+++ b/dom/browser-element/mochitest/browserElement_ExposableURI.js
@@ -18,40 +18,18 @@ function testPassword() {
        "Username and password shouldn't be exposed in uri.");
     SimpleTest.finish();
   }
 
   iframe.addEventListener('mozbrowserlocationchange', locationchange);
   iframe.src = "http://iamuser:iampassword@mochi.test:8888/tests/dom/browser-element/mochitest/file_empty.html";
 }
 
-function testWyciwyg() {
-  var locationChangeCount = 0;
-
-  function locationchange(e) {
-    // locationChangeCount:
-    //  0 - the first load.
-    //  1 - after document.write().
-    if (locationChangeCount == 0) {
-      locationChangeCount ++;
-    } else if (locationChangeCount == 1) {
-      var uri = e.detail.url;
-      is(uri, 'http://mochi.test:8888/tests/dom/browser-element/mochitest/file_wyciwyg.html', "Scheme in string shouldn't be wyciwyg");
-      iframe.removeEventListener('mozbrowserlocationchange', locationchange);
-      SimpleTest.executeSoon(testPassword);
-    }
-  }
-
-  // file_wyciwyg.html calls document.write() to create a wyciwyg channel.
-  iframe.src = 'file_wyciwyg.html';
-  iframe.addEventListener('mozbrowserlocationchange', locationchange);
-}
-
 function runTest() {
   SpecialPowers.pushPrefEnv({set: [["network.http.rcwn.enabled", false]]}, _=>{
     iframe = document.createElement('iframe');
     iframe.setAttribute('mozbrowser', 'true');
     document.body.appendChild(iframe);
-    testWyciwyg();
+    testPassword();
   });
 }
 
 addEventListener('testready', runTest);
deleted file mode 100644
--- a/dom/browser-element/mochitest/file_wyciwyg.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<html>
-<head>
-<title>test</title>
-<script type="text/javascript">
-addEventListener('load', function() {
-  window.setTimeout(function() {
-    document.write("test");
-  }, 0);
-});
-</script>
-</head>
-<body>
-</body>
-</html>
--- a/dom/browser-element/mochitest/mochitest.ini
+++ b/dom/browser-element/mochitest/mochitest.ini
@@ -80,17 +80,16 @@ support-files =
   file_browserElement_XFrameOptionsDeny.html
   file_browserElement_XFrameOptionsSameOrigin.html
   file_bug741717.sjs
   file_empty.html
   file_empty_script.js
   file_focus.html
   file_http_401_response.sjs
   file_http_407_response.sjs
-  file_wyciwyg.html
   noaudio.webm
 
 # Note: browserElementTestHelpers.js looks at the test's filename to determine
 # whether the test should be OOP.  "_oop_" signals OOP, "_inproc_" signals in
 # process.  Default is OOP.
 [test_browserElement_NoAttr.html]
 [test_browserElement_NoPref.html]
 [test_browserElement_NoPermission.html]
--- a/dom/html/nsHTMLDocument.cpp
+++ b/dom/html/nsHTMLDocument.cpp
@@ -63,17 +63,16 @@
 #include "nsFrameSelection.h"
 
 #include "nsContentUtils.h"
 #include "nsJSUtils.h"
 #include "DocumentInlines.h"
 #include "nsIDocumentEncoder.h"  //for outputting selection
 #include "nsICachingChannel.h"
 #include "nsIContentViewer.h"
-#include "nsIWyciwygChannel.h"
 #include "nsIScriptElement.h"
 #include "nsIScriptError.h"
 #include "nsIMutableArray.h"
 #include "nsArrayUtils.h"
 #include "nsIEffectiveTLDService.h"
 
 // AHMED 12-2
 #include "nsBidiUtils.h"
@@ -123,18 +122,16 @@ using namespace mozilla::dom;
 #define NS_MAX_DOCUMENT_WRITE_DEPTH 20
 
 #include "prtime.h"
 
 //#define DEBUG_charset
 
 static NS_DEFINE_CID(kCParserCID, NS_PARSER_CID);
 
-uint32_t nsHTMLDocument::gWyciwygSessionCnt = 0;
-
 // this function will return false if the command is not recognized
 // inCommandID will be converted as necessary for internal operations
 // inParam will be converted as necessary for internal operations
 // outParam will be Empty if no parameter is needed or if returning a boolean
 // outIsBoolean will determine whether to send param as a boolean or string
 // outBooleanParam will not be set unless outIsBoolean
 static bool ConvertToMidasInternalCommand(const nsAString& inCommandID,
                                           const nsAString& inParam,
@@ -186,17 +183,17 @@ nsHTMLDocument::nsHTMLDocument()
   mType = eHTML;
   mDefaultElementType = kNameSpaceID_XHTML;
   mCompatMode = eCompatibility_NavQuirks;
 }
 
 nsHTMLDocument::~nsHTMLDocument() {}
 
 NS_IMPL_CYCLE_COLLECTION_INHERITED(nsHTMLDocument, Document, mAll,
-                                   mWyciwygChannel, mMidasCommandManager)
+                                   mMidasCommandManager)
 
 NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(nsHTMLDocument, Document,
                                              nsIHTMLDocument)
 
 JSObject* nsHTMLDocument::WrapNode(JSContext* aCx,
                                    JS::Handle<JSObject*> aGivenProto) {
   return HTMLDocument_Binding::Wrap(aCx, this, aGivenProto);
 }
@@ -230,21 +227,16 @@ void nsHTMLDocument::ResetToURI(nsIURI* 
   mApplets = nullptr;
   mEmbeds = nullptr;
   mLinks = nullptr;
   mAnchors = nullptr;
   mScripts = nullptr;
 
   mForms = nullptr;
 
-  NS_ASSERTION(!mWyciwygChannel,
-               "nsHTMLDocument::Reset() - Wyciwyg Channel  still exists!");
-
-  mWyciwygChannel = nullptr;
-
   // Make the content type default to "text/html", we are a HTML
   // document, after all. Once we start getting data, this may be
   // changed.
   SetContentTypeInternal(nsDependentCString("text/html"));
 }
 
 void nsHTMLDocument::TryHintCharset(nsIContentViewer* aCv,
                                     int32_t& aCharsetSource,
@@ -442,30 +434,16 @@ void nsHTMLDocument::TryTLD(int32_t& aCh
 void nsHTMLDocument::TryFallback(int32_t& aCharsetSource,
                                  NotNull<const Encoding*>& aEncoding) {
   if (kCharsetFromFallback <= aCharsetSource) return;
 
   aCharsetSource = kCharsetFromFallback;
   aEncoding = FallbackEncoding::FromLocale();
 }
 
-void nsHTMLDocument::SetDocumentCharacterSet(
-    NotNull<const Encoding*> aEncoding) {
-  Document::SetDocumentCharacterSet(aEncoding);
-  // Make sure to stash this charset on our channel as needed if it's a wyciwyg
-  // channel.
-  nsCOMPtr<nsIWyciwygChannel> wyciwygChannel = do_QueryInterface(mChannel);
-  if (wyciwygChannel) {
-    nsAutoCString charset;
-    aEncoding->Name(charset);
-    wyciwygChannel->SetCharsetAndSource(GetDocumentCharacterSetSource(),
-                                        charset);
-  }
-}
-
 nsresult nsHTMLDocument::StartDocumentLoad(const char* aCommand,
                                            nsIChannel* aChannel,
                                            nsILoadGroup* aLoadGroup,
                                            nsISupports* aContainer,
                                            nsIStreamListener** aDocListener,
                                            bool aReset, nsIContentSink* aSink) {
   if (!aCommand) {
     MOZ_ASSERT(false, "Command is mandatory");
@@ -533,17 +511,17 @@ nsresult nsHTMLDocument::StartDocumentLo
   CSSLoader()->SetCompatibilityMode(mCompatMode);
 
   nsresult rv = Document::StartDocumentLoad(aCommand, aChannel, aLoadGroup,
                                             aContainer, aDocListener, aReset);
   if (NS_FAILED(rv)) {
     return rv;
   }
 
-  // Store the security info for future use with wyciwyg channels.
+  // Store the security info for future use.
   aChannel->GetSecurityInfo(getter_AddRefs(mSecurityInfo));
 
   nsCOMPtr<nsIURI> uri;
   rv = aChannel->GetURI(getter_AddRefs(uri));
   if (NS_FAILED(rv)) {
     return rv;
   }
 
@@ -600,133 +578,88 @@ nsresult nsHTMLDocument::StartDocumentLo
 #ifdef DEBUG_charset
   printf("Determining charset for %s\n", urlSpec.get());
 #endif
 
   // These are the charset source and charset for our document
   int32_t charsetSource;
   auto encoding = UTF_8_ENCODING;
 
-  // These are the charset source and charset for the parser.  This can differ
-  // from that for the document if the channel is a wyciwyg channel.
-  int32_t parserCharsetSource;
-  auto parserCharset = UTF_8_ENCODING;
-
-  nsCOMPtr<nsIWyciwygChannel> wyciwygChannel;
-
   // For error reporting and referrer policy setting
   nsHtml5TreeOpExecutor* executor = nullptr;
   if (loadAsHtml5) {
     executor = static_cast<nsHtml5TreeOpExecutor*>(mParser->GetContentSink());
     if (mReferrerPolicySet) {
       // CSP may have set the referrer policy, so a speculative parser should
       // start with the new referrer policy.
       executor->SetSpeculationReferrerPolicy(
           static_cast<ReferrerPolicy>(mReferrerPolicy));
     }
   }
 
   if (forceUtf8) {
     charsetSource = kCharsetFromUtf8OnlyMime;
-    parserCharsetSource = charsetSource;
   } else if (!IsHTMLDocument() || !docShell) {  // no docshell for text/html XHR
     charsetSource =
         IsHTMLDocument() ? kCharsetFromFallback : kCharsetFromDocTypeDefault;
     TryChannelCharset(aChannel, charsetSource, encoding, executor);
-    parserCharset = encoding;
-    parserCharsetSource = charsetSource;
   } else {
     NS_ASSERTION(docShell, "Unexpected null value");
 
     charsetSource = kCharsetUninitialized;
-    wyciwygChannel = do_QueryInterface(aChannel);
 
     // The following will try to get the character encoding from various
     // sources. Each Try* function will return early if the source is already
     // at least as large as any of the sources it might look at.  Some of
     // these functions (like TryHintCharset and TryParentCharset) can set
     // charsetSource to various values depending on where the charset they
     // end up finding originally comes from.
 
-    // Don't actually get the charset from the channel if this is a
-    // wyciwyg channel; it'll always be UTF-16
-    if (!wyciwygChannel) {
-      // Otherwise, try the channel's charset (e.g., charset from HTTP
-      // "Content-Type" header) first. This way, we get to reject overrides in
-      // TryParentCharset and TryUserForcedCharset if the channel said UTF-16.
-      // This is to avoid socially engineered XSS by adding user-supplied
-      // content to a UTF-16 site such that the byte have a dangerous
-      // interpretation as ASCII and the user can be lured to using the
-      // charset menu.
-      TryChannelCharset(aChannel, charsetSource, encoding, executor);
-    }
+    // Try the channel's charset (e.g., charset from HTTP
+    // "Content-Type" header) first. This way, we get to reject overrides in
+    // TryParentCharset and TryUserForcedCharset if the channel said UTF-16.
+    // This is to avoid socially engineered XSS by adding user-supplied
+    // content to a UTF-16 site such that the byte have a dangerous
+    // interpretation as ASCII and the user can be lured to using the
+    // charset menu.
+    TryChannelCharset(aChannel, charsetSource, encoding, executor);
 
     TryUserForcedCharset(cv, docShell, charsetSource, encoding);
 
     TryHintCharset(cv, charsetSource, encoding);  // XXX mailnews-only
     TryParentCharset(docShell, charsetSource, encoding);
 
     if (cachingChan && !urlSpec.IsEmpty()) {
       TryCacheCharset(cachingChan, charsetSource, encoding);
     }
 
     TryTLD(charsetSource, encoding);
     TryFallback(charsetSource, encoding);
-
-    if (wyciwygChannel) {
-      // We know for sure that the parser needs to be using UTF16.
-      parserCharset = UTF_16LE_ENCODING;
-      parserCharsetSource = charsetSource < kCharsetFromChannel
-                                ? kCharsetFromChannel
-                                : charsetSource;
-
-      nsAutoCString cachedCharset;
-      int32_t cachedSource;
-      rv = wyciwygChannel->GetCharsetAndSource(&cachedSource, cachedCharset);
-      if (NS_SUCCEEDED(rv)) {
-        if (cachedSource > charsetSource) {
-          auto cachedEncoding = Encoding::ForLabel(cachedCharset);
-          if (cachedEncoding) {
-            charsetSource = cachedSource;
-            encoding = WrapNotNull(cachedEncoding);
-          }
-        }
-      } else {
-        // Don't propagate this error.
-        rv = NS_OK;
-      }
-    } else {
-      parserCharset = encoding;
-      parserCharsetSource = charsetSource;
-    }
   }
 
   SetDocumentCharacterSetSource(charsetSource);
   SetDocumentCharacterSet(encoding);
 
   if (cachingChan) {
-    NS_ASSERTION(encoding == parserCharset,
-                 "How did those end up different here?  wyciwyg channels are "
-                 "not nsICachingChannel");
     nsAutoCString charset;
     encoding->Name(charset);
     rv = cachingChan->SetCacheTokenCachedCharset(charset);
     NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "cannot SetMetaDataElement");
     rv = NS_OK;  // don't propagate error
   }
 
   // Set the parser as the stream listener for the document loader...
   rv = NS_OK;
   nsCOMPtr<nsIStreamListener> listener = mParser->GetStreamListener();
   listener.forget(aDocListener);
 
 #ifdef DEBUG_charset
   printf(" charset = %s source %d\n", charset.get(), charsetSource);
 #endif
-  mParser->SetDocumentCharset(parserCharset, parserCharsetSource);
+  mParser->SetDocumentCharset(encoding, charsetSource);
   mParser->SetCommand(aCommand);
 
   if (!IsHTMLDocument()) {
     MOZ_ASSERT(!loadAsHtml5);
     nsCOMPtr<nsIXMLContentSink> xmlsink;
     NS_NewXMLContentSink(getter_AddRefs(xmlsink), this, uri, docShell,
                          aChannel);
     mParser->SetContentSink(xmlsink);
@@ -762,30 +695,16 @@ nsresult nsHTMLDocument::StartDocumentLo
   }
 
   // parser the content of the URI
   mParser->Parse(uri, nullptr, (void*)this);
 
   return rv;
 }
 
-void nsHTMLDocument::StopDocumentLoad() {
-  BlockOnload();
-
-  // Remove the wyciwyg channel request from the document load group
-  // that we added in Open() if Open() was called on this doc.
-  RemoveWyciwygChannel();
-  NS_ASSERTION(!mWyciwygChannel,
-               "nsHTMLDocument::StopDocumentLoad(): "
-               "nsIWyciwygChannel could not be removed!");
-
-  Document::StopDocumentLoad();
-  UnblockOnload(false);
-}
-
 void nsHTMLDocument::BeginLoad() {
   if (IsEditingOn()) {
     // Reset() blows away all event listeners in the document, and our
     // editor relies heavily on those. Midas is turned on, to make it
     // work, re-initialize it to give it a chance to add its event
     // listeners again.
 
     TurnEditingOff();
@@ -1562,27 +1481,16 @@ void nsHTMLDocument::WriteCommon(const n
     // onbeforeunload), don't write anything.
     if (aRv.Failed() || !mParser) {
       return;
     }
   }
 
   static NS_NAMED_LITERAL_STRING(new_line, "\n");
 
-  // Save the data in cache if the write isn't from within the doc
-  if (mWyciwygChannel && !key) {
-    if (!aText.IsEmpty()) {
-      mWyciwygChannel->WriteToCacheEntry(aText);
-    }
-
-    if (aNewlineTerminate) {
-      mWyciwygChannel->WriteToCacheEntry(new_line);
-    }
-  }
-
   ++mWriteLevel;
 
   // This could be done with less code, but for performance reasons it
   // makes sense to have the code for two separate Parse() calls here
   // since the concatenation of strings costs more than we like. And
   // why pay that price when we don't need to?
   if (aNewlineTerminate) {
     aRv = (static_cast<nsHtml5Parser*>(mParser.get()))
@@ -1757,94 +1665,16 @@ void nsHTMLDocument::GetSupportedNames(n
 
 // forms related stuff
 
 bool nsHTMLDocument::MatchFormControls(Element* aElement, int32_t aNamespaceID,
                                        nsAtom* aAtom, void* aData) {
   return aElement->IsNodeOfType(nsIContent::eHTML_FORM_CONTROL);
 }
 
-nsresult nsHTMLDocument::CreateAndAddWyciwygChannel(void) {
-  nsresult rv = NS_OK;
-  nsAutoCString url, originalSpec;
-
-  mDocumentURI->GetSpec(originalSpec);
-
-  // Generate the wyciwyg url
-  url = NS_LITERAL_CSTRING("wyciwyg://") +
-        nsPrintfCString("%d", gWyciwygSessionCnt++) + NS_LITERAL_CSTRING("/") +
-        originalSpec;
-
-  nsCOMPtr<nsIURI> wcwgURI;
-  NS_NewURI(getter_AddRefs(wcwgURI), url);
-
-  // Create the nsIWyciwygChannel to store out-of-band
-  // document.write() script to cache
-  nsCOMPtr<nsIChannel> channel;
-  // Create a wyciwyg Channel
-  rv = NS_NewChannel(getter_AddRefs(channel), wcwgURI, NodePrincipal(),
-                     nsILoadInfo::SEC_FORCE_INHERIT_PRINCIPAL,
-                     nsIContentPolicy::TYPE_OTHER);
-  NS_ENSURE_SUCCESS(rv, rv);
-  nsCOMPtr<nsILoadInfo> loadInfo = channel->LoadInfo();
-  loadInfo->SetPrincipalToInherit(NodePrincipal());
-
-  mWyciwygChannel = do_QueryInterface(channel);
-
-  mWyciwygChannel->SetSecurityInfo(mSecurityInfo);
-
-  // Note: we want to treat this like a "previous document" hint so that,
-  // e.g. a <meta> tag in the document.write content can override it.
-  SetDocumentCharacterSetSource(kCharsetFromHintPrevDoc);
-  nsAutoCString charset;
-  GetDocumentCharacterSet()->Name(charset);
-  mWyciwygChannel->SetCharsetAndSource(kCharsetFromHintPrevDoc, charset);
-
-  // Inherit load flags from the original document's channel
-  channel->SetLoadFlags(mLoadFlags);
-
-  nsCOMPtr<nsILoadGroup> loadGroup = GetDocumentLoadGroup();
-
-  // Use the Parent document's loadgroup to trigger load notifications
-  if (loadGroup && channel) {
-    rv = channel->SetLoadGroup(loadGroup);
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    nsLoadFlags loadFlags = 0;
-    channel->GetLoadFlags(&loadFlags);
-    loadFlags |= nsIChannel::LOAD_DOCUMENT_URI;
-    if (nsDocShell::SandboxFlagsImplyCookies(mSandboxFlags)) {
-      loadFlags |= nsIRequest::LOAD_DOCUMENT_NEEDS_COOKIE;
-    }
-    channel->SetLoadFlags(loadFlags);
-
-    channel->SetOriginalURI(wcwgURI);
-
-    rv = loadGroup->AddRequest(mWyciwygChannel, nullptr);
-    NS_ASSERTION(NS_SUCCEEDED(rv), "Failed to add request to load group.");
-  }
-
-  return rv;
-}
-
-nsresult nsHTMLDocument::RemoveWyciwygChannel(void) {
-  nsCOMPtr<nsILoadGroup> loadGroup = GetDocumentLoadGroup();
-
-  // note there can be a write request without a load group if
-  // this is a synchronously constructed about:blank document
-  if (loadGroup && mWyciwygChannel) {
-    mWyciwygChannel->CloseCacheEntry(NS_OK);
-    loadGroup->RemoveRequest(mWyciwygChannel, nullptr, NS_OK);
-  }
-
-  mWyciwygChannel = nullptr;
-
-  return NS_OK;
-}
-
 void* nsHTMLDocument::GenerateParserKey(void) {
   if (!mScriptLoader) {
     // If we don't have a script loader, then the parser probably isn't parsing
     // anything anyway, so just return null.
     return nullptr;
   }
 
   // The script loader provides us with the currently executing script element,
@@ -3008,17 +2838,16 @@ void nsHTMLDocument::RemovedFromDocShell
 /* virtual */ void nsHTMLDocument::DocAddSizeOfExcludingThis(
     nsWindowSizes& aWindowSizes) const {
   Document::DocAddSizeOfExcludingThis(aWindowSizes);
 
   // Measurement of the following members may be added later if DMD finds it is
   // worthwhile:
   // - mLinks
   // - mAnchors
-  // - mWyciwygChannel
   // - mMidasCommandManager
 }
 
 bool nsHTMLDocument::WillIgnoreCharsetOverride() {
   if (mEncodingMenuDisabled) {
     return true;
   }
   if (mType != eHTML) {
@@ -3027,20 +2856,16 @@ bool nsHTMLDocument::WillIgnoreCharsetOv
   }
   if (mCharacterSetSource >= kCharsetFromByteOrderMark) {
     return true;
   }
   if (!mCharacterSet->IsAsciiCompatible() &&
       mCharacterSet != ISO_2022_JP_ENCODING) {
     return true;
   }
-  nsCOMPtr<nsIWyciwygChannel> wyciwyg = do_QueryInterface(mChannel);
-  if (wyciwyg) {
-    return true;
-  }
   nsIURI* uri = GetOriginalURI();
   if (uri) {
     bool schemeIs = false;
     uri->SchemeIs("about", &schemeIs);
     if (schemeIs) {
       return true;
     }
     bool isResource;
--- a/dom/html/nsHTMLDocument.h
+++ b/dom/html/nsHTMLDocument.h
@@ -19,17 +19,16 @@
 #include "nsThreadUtils.h"
 #include "nsICommandManager.h"
 #include "mozilla/dom/HTMLSharedElement.h"
 #include "mozilla/dom/BindingDeclarations.h"
 
 class nsIURI;
 class nsIDocShell;
 class nsICachingChannel;
-class nsIWyciwygChannel;
 class nsILoadGroup;
 
 namespace mozilla {
 namespace dom {
 class HTMLAllCollection;
 template <typename T>
 struct Nullable;
 class WindowProxyHolder;
@@ -60,17 +59,16 @@ class nsHTMLDocument : public mozilla::d
                           nsIPrincipal* aPrincipal) override;
 
   virtual nsresult StartDocumentLoad(const char* aCommand, nsIChannel* aChannel,
                                      nsILoadGroup* aLoadGroup,
                                      nsISupports* aContainer,
                                      nsIStreamListener** aDocListener,
                                      bool aReset = true,
                                      nsIContentSink* aSink = nullptr) override;
-  virtual void StopDocumentLoad() override;
 
   virtual void BeginLoad() override;
   virtual void EndLoad() override;
 
   // nsIHTMLDocument
   virtual void SetCompatibilityMode(nsCompatibility aMode) override;
 
   virtual bool IsWriting() override { return mWriteLevel != uint32_t(0); }
@@ -230,19 +228,16 @@ class nsHTMLDocument : public mozilla::d
       const nsAString& aHostSuffixString, nsIURI* aOrigHost);
 
   void WriteCommon(const nsAString& aText, bool aNewlineTerminate,
                    mozilla::ErrorResult& aRv);
   // A version of WriteCommon used by WebIDL bindings
   void WriteCommon(const mozilla::dom::Sequence<nsString>& aText,
                    bool aNewlineTerminate, mozilla::ErrorResult& rv);
 
-  nsresult CreateAndAddWyciwygChannel(void);
-  nsresult RemoveWyciwygChannel(void);
-
   // This should *ONLY* be used in GetCookie/SetCookie.
   already_AddRefed<nsIChannel> CreateDummyChannelForCookies(
       nsIURI* aCodebaseURI);
 
   /**
    * Like IsEditingOn(), but will flush as needed first.
    */
   bool IsEditingOnAfterFlush();
@@ -275,37 +270,31 @@ class nsHTMLDocument : public mozilla::d
   friend class ContentListHolder;
   ContentListHolder* mContentListHolder;
 
   RefPtr<mozilla::dom::HTMLAllCollection> mAll;
 
   /** # of forms in the document, synchronously set */
   int32_t mNumForms;
 
-  static uint32_t gWyciwygSessionCnt;
-
   static void TryHintCharset(nsIContentViewer* aContentViewer,
                              int32_t& aCharsetSource,
                              NotNull<const Encoding*>& aEncoding);
   void TryUserForcedCharset(nsIContentViewer* aCv, nsIDocShell* aDocShell,
                             int32_t& aCharsetSource,
                             NotNull<const Encoding*>& aEncoding);
   static void TryCacheCharset(nsICachingChannel* aCachingChannel,
                               int32_t& aCharsetSource,
                               NotNull<const Encoding*>& aEncoding);
   void TryParentCharset(nsIDocShell* aDocShell, int32_t& charsetSource,
                         NotNull<const Encoding*>& aEncoding);
   void TryTLD(int32_t& aCharsetSource, NotNull<const Encoding*>& aCharset);
   static void TryFallback(int32_t& aCharsetSource,
                           NotNull<const Encoding*>& aEncoding);
 
-  // Override so we can munge the charset on our wyciwyg channel as needed.
-  virtual void SetDocumentCharacterSet(
-      NotNull<const Encoding*> aEncoding) override;
-
   /**
    * MaybeDispatchCheckKeyPressEventModelEvent() dispatches
    * "CheckKeyPressEventModel" event to check whether we should dispatch
    * keypress events in confluent model or split model.  This should be
    * called only when mEditingState is changed to eDesignMode or
    * eConentEditable at first time.
    */
   void MaybeDispatchCheckKeyPressEventModelEvent();
@@ -320,18 +309,16 @@ class nsHTMLDocument : public mozilla::d
   uint32_t mLoadFlags;
 
   bool mTooDeepWriteRecursion;
 
   bool mDisableDocWrite;
 
   bool mWarnedWidthHeight;
 
-  nsCOMPtr<nsIWyciwygChannel> mWyciwygChannel;
-
   /* Midas implementation */
   nsresult GetMidasCommandManager(nsICommandManager** aCommandManager);
 
   nsCOMPtr<nsICommandManager> mMidasCommandManager;
 
   nsresult TurnEditingOff();
   nsresult EditingStateChanged();
   void MaybeEditingStateChanged();
--- a/dom/html/test/browser.ini
+++ b/dom/html/test/browser.ini
@@ -1,26 +1,22 @@
 [DEFAULT]
 support-files =
   bug592641_img.jpg
   dummy_page.html
-  file_bug649778.html
-  file_bug649778.html^headers^
   file_fullscreen-api-keys.html
   file_content_contextmenu.html
   submission_flush.html
   post_action_page.html
   form_data_file.bin
   form_data_file.txt
   form_submit_server.sjs
   head.js
 
 [browser_bug592641.js]
-[browser_bug649778.js]
-skip-if = e10s # Bug 1271025
 [browser_bug1081537.js]
 [browser_bug1108547.js]
 support-files =
   file_bug1108547-1.html
   file_bug1108547-2.html
   file_bug1108547-3.html
 [browser_content_contextmenu_userinput.js]
 [browser_DOMDocElementInserted.js]
@@ -29,15 +25,15 @@ support-files =
 tags = fullscreen
 [browser_fullscreen-contextmenu-esc.js]
 tags = fullscreen
 [browser_fullscreen-newtab.js]
 tags = fullscreen
 support-files = file_fullscreen-newtab.html
 skip-if = os == 'mac' # bug 1494843
 [browser_submission_flush.js]
-[browser_refresh_wyciwyg_url.js]
+[browser_refresh_after_document_write.js]
 support-files =
-  file_refresh_wyciwyg_url.html
+  file_refresh_after_document_write.html
 [browser_targetBlankNoOpener.js]
 support-files =
   empty.html
   image_yellow.png
deleted file mode 100644
--- a/dom/html/test/browser_bug649778.js
+++ /dev/null
@@ -1,81 +0,0 @@
-// Test for bug 649778 - document.write may cause a document to be written to disk cache even when the page has Cache-Control: no-store
-
-// Globals
-var testPath = "http://mochi.test:8888/browser/dom/html/test/";
-var popup;
-
-var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-function checkCache(url, inMemory, shouldExist, cb)
-{
-  var cache = Services.cache2;
-  var storage = cache.diskCacheStorage(Services.loadContextInfo.default, false);
-
-  function CheckCacheListener(inMemory, shouldExist)
-  {
-    this.inMemory = inMemory;
-    this.shouldExist = shouldExist;
-    this.onCacheEntryCheck = function() {
-      return Ci.nsICacheEntryOpenCallback.ENTRY_WANTED;
-    };
-
-    this.onCacheEntryAvailable = function oCEA(entry, isNew, appCache, status) {
-      if (shouldExist) {
-        ok(entry, "Entry not found");
-        is(this.inMemory, !entry.persistent, "Entry is " + (inMemory ? "" : " not ") + " in memory as expected");
-        is(status, Cr.NS_OK, "Entry not found");
-      } else {
-        ok(!entry, "Entry found");
-        is(status, Cr.NS_ERROR_CACHE_KEY_NOT_FOUND,
-           "Invalid error code");
-      }
-
-      setTimeout(cb, 0);
-    };
-  };
-
-  storage.asyncOpenURI(Services.io.newURI(url), "",
-                       Ci.nsICacheStorage.OPEN_READONLY,
-                       new CheckCacheListener(inMemory, shouldExist));
-}
-function getPopupURL() {
-  var sh = popup.docShell
-                .QueryInterface(Ci.nsIWebNavigation)
-                .sessionHistory;
-
-  return sh.legacySHistory.getEntryAtIndex(sh.index).URI.spec;
-}
-
-var wyciwygURL;
-function testContinue() {
-  wyciwygURL = getPopupURL();
-  is(wyciwygURL.substring(0, 10), "wyciwyg://", "Unexpected URL.");
-  popup.close()
-
-  // We have to find the entry and it must not be persisted to disk
-  checkCache(wyciwygURL, true, true, finish);
-}
-
-function waitForWyciwygDocument() {
-  try {
-    var url = getPopupURL();
-    if (url.substring(0, 10) == "wyciwyg://") {
-      setTimeout(testContinue, 0);
-      return;
-    }
-  }
-  catch (e) {
-  }
-  setTimeout(waitForWyciwygDocument, 100);
-}
-
-// Entry point from Mochikit
-function test() {
-  waitForExplicitFinish();
-
-  popup = window.open(testPath + "file_bug649778.html", "popup 0",
-                      "height=200,width=200,location=yes," +
-                      "menubar=yes,status=yes,toolbar=yes,dependent=yes");
-
-  waitForWyciwygDocument();
-}
rename from dom/html/test/browser_refresh_wyciwyg_url.js
rename to dom/html/test/browser_refresh_after_document_write.js
--- a/dom/html/test/browser_refresh_wyciwyg_url.js
+++ b/dom/html/test/browser_refresh_after_document_write.js
@@ -1,19 +1,18 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 /*
 Test that after using document.write(...), refreshing the document and calling write again,
-resulting document.URL does not contain 'wyciwyg' schema
-and instead is identical to the original URL.
+resulting document.URL is identical to the original URL.
 
 This testcase is aimed at preventing bug 619092
 */
-var testURL = "http://mochi.test:8888/browser/dom/html/test/file_refresh_wyciwyg_url.html";
+var testURL = "http://mochi.test:8888/browser/dom/html/test/file_refresh_after_document_write.html";
 let aTab, aBrowser;
 
 function test(){
     waitForExplicitFinish();
 
     aTab = BrowserTestUtils.addTab(gBrowser, testURL);
     aBrowser = gBrowser.getBrowserForTab(aTab);
     BrowserTestUtils.browserLoaded(aBrowser).then(() => {
deleted file mode 100644
--- a/dom/html/test/file_bug649778.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html>
-<script>
-function test() {
-  document.open();
-  document.write('<html><body>WYCIWYG DOCUMENT</body></html>');
-  document.close();
-}
-</script>
-<body onload="setTimeout(test, 0);">
-</body>
-</html>
deleted file mode 100644
--- a/dom/html/test/file_bug649778.html^headers^
+++ /dev/null
@@ -1,1 +0,0 @@
-Cache-Control: no-store
rename from dom/html/test/file_refresh_wyciwyg_url.html
rename to dom/html/test/file_refresh_after_document_write.html
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -5248,17 +5248,17 @@ void ContentParent::UpdateCookieStatus(n
   PCookieServiceParent* csParent =
       LoneManagedOrNullAsserts(neckoParent->ManagedPCookieServiceParent());
   if (csParent) {
     auto* cs = static_cast<CookieServiceParent*>(csParent);
     cs->TrackCookieLoad(aChannel);
   }
 }
 
-nsresult ContentParent::AboutToLoadHttpFtpWyciwygDocumentForChild(
+nsresult ContentParent::AboutToLoadHttpFtpDocumentForChild(
     nsIChannel* aChannel) {
   MOZ_ASSERT(aChannel);
 
   nsresult rv;
   bool isDocument = aChannel->IsDocument();
   if (!isDocument) {
     // We may be looking at a nsIHttpChannel which has isMainDocumentChannel set
     // (e.g. the internal http channel for a view-source: load.).
--- a/dom/ipc/ContentParent.h
+++ b/dom/ipc/ContentParent.h
@@ -584,20 +584,20 @@ class ContentParent final : public PCont
 
   bool DeallocPURLClassifierParent(PURLClassifierParent* aActor);
 
   // Use the PHangMonitor channel to ask the child to repaint a tab.
   void PaintTabWhileInterruptingJS(TabParent* aTabParent, bool aForceRepaint,
                                    const layers::LayersObserverEpoch& aEpoch);
 
   // This function is called when we are about to load a document from an
-  // HTTP(S), FTP or wyciwyg channel for a content process.  It is a useful
-  // place to start to kick off work as early as possible in response to such
+  // HTTP(S) or FTP channel for a content process.  It is a useful place
+  // to start to kick off work as early as possible in response to such
   // document loads.
-  nsresult AboutToLoadHttpFtpWyciwygDocumentForChild(nsIChannel* aChannel);
+  nsresult AboutToLoadHttpFtpDocumentForChild(nsIChannel* aChannel);
 
   nsresult TransmitPermissionsForPrincipal(nsIPrincipal* aPrincipal);
 
   void OnCompositorDeviceReset() override;
 
   PClientOpenWindowOpParent* AllocPClientOpenWindowOpParent(
       const ClientOpenWindowArgs& aArgs);
 
--- a/dom/localstorage/LocalStorageManager2.cpp
+++ b/dom/localstorage/LocalStorageManager2.cpp
@@ -108,17 +108,17 @@ LocalStorageManager2::PrecacheStorage(ns
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aPrincipal);
   MOZ_ASSERT(_retval);
 
   // This method was created as part of the e10s-ification of the old LS
   // implementation to perform a preload in the content/current process.  That's
   // not how things work in LSNG.  Instead everything happens in the parent
   // process, triggered by the official preloading spot,
-  // ContentParent::AboutToLoadHttpFtpWyciwygDocumentForChild.
+  // ContentParent::AboutToLoadHttpFtpDocumentForChild.
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 LocalStorageManager2::CreateStorage(mozIDOMWindow* aWindow,
                                     nsIPrincipal* aPrincipal,
                                     const nsAString& aDocumentURI,
                                     bool aPrivate, Storage** _retval) {
--- a/dom/localstorage/PBackgroundLSDatabase.ipdl
+++ b/dom/localstorage/PBackgroundLSDatabase.ipdl
@@ -66,17 +66,17 @@ struct LSSnapshotInitInfo
 /**
  * This protocol is asynchronously created via constructor on PBackground but
  * has synchronous semantics from the perspective of content on the main thread.
  * The construction potentially involves waiting for disk I/O to load the
  * LocalStorage data from disk as well as related QuotaManager checks, so async
  * calls to PBackground are the only viable mechanism because blocking
  * PBackground is not acceptable.  (Note that an attempt is made to minimize any
  * I/O latency by triggering preloading from
- * ContentParent::AboutToLoadHttpFtpWyciwygDocumentForChild, the central place
+ * ContentParent::AboutToLoadHttpFtpDocumentForChild, the central place
  * for pre-loading.)
  */
 sync protocol PBackgroundLSDatabase
 {
   manager PBackground;
   manages PBackgroundLSSnapshot;
 
 parent:
--- a/dom/localstorage/nsILocalStorageManager.idl
+++ b/dom/localstorage/nsILocalStorageManager.idl
@@ -15,17 +15,17 @@ interface nsIPrincipal;
  */
 [scriptable, builtinclass, uuid(d4f534da-2744-4db3-8774-8b187c64ade9)]
 interface nsILocalStorageManager : nsISupports
 {
   readonly attribute boolean nextGenLocalStorageEnabled;
 
   /**
    * Trigger preload of LocalStorage for the given principal.  For use by
-   * ContentParent::AboutToLoadHttpFtpWyciwygDocumentForChild to maximize the
+   * ContentParent::AboutToLoadHttpFtpDocumentForChild to maximize the
    * amount of time we have to load the data off disk before the page might
    * attempt to touch LocalStorage.
    *
    * This method will not create a QuotaManager-managed directory on disk if
    * one does not already exist for the principal.
    */
   [implicit_jscontext] nsISupports
   preload(in nsIPrincipal aPrincipal);
--- a/dom/security/nsContentSecurityManager.cpp
+++ b/dom/security/nsContentSecurityManager.cpp
@@ -360,31 +360,16 @@ static nsresult DoContentSecurityChecks(
   nsContentPolicyType internalContentPolicyType =
       aLoadInfo->InternalContentPolicyType();
   nsCString mimeTypeGuess;
 
   nsCOMPtr<nsIURI> uri;
   nsresult rv = NS_GetFinalChannelURI(aChannel, getter_AddRefs(uri));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  if (contentPolicyType == nsIContentPolicy::TYPE_DOCUMENT ||
-      contentPolicyType == nsIContentPolicy::TYPE_SUBDOCUMENT) {
-    // TYPE_DOCUMENT and TYPE_SUBDOCUMENT loads might potentially
-    // be wyciwyg:// channels. Let's fix up the URI so we can
-    // perform proper security checks.
-    nsCOMPtr<nsIURIFixup> urifixup(components::URIFixup::Service());
-    if (urifixup) {
-      nsCOMPtr<nsIURI> fixedURI;
-      rv = urifixup->CreateExposableURI(uri, getter_AddRefs(fixedURI));
-      if (NS_SUCCEEDED(rv)) {
-        uri = fixedURI;
-      }
-    }
-  }
-
   switch (contentPolicyType) {
     case nsIContentPolicy::TYPE_OTHER: {
       mimeTypeGuess = EmptyCString();
       break;
     }
 
     case nsIContentPolicy::TYPE_SCRIPT: {
       mimeTypeGuess = NS_LITERAL_CSTRING("application/javascript");
@@ -877,34 +862,16 @@ static void AddLoadFlags(nsIRequest* aRe
  * if this requesst should not be permitted.
  */
 nsresult nsContentSecurityManager::CheckChannel(nsIChannel* aChannel) {
   nsCOMPtr<nsILoadInfo> loadInfo = aChannel->LoadInfo();
   nsCOMPtr<nsIURI> uri;
   nsresult rv = NS_GetFinalChannelURI(aChannel, getter_AddRefs(uri));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  nsContentPolicyType contentPolicyType =
-      loadInfo->GetExternalContentPolicyType();
-
-  if (contentPolicyType == nsIContentPolicy::TYPE_DOCUMENT ||
-      contentPolicyType == nsIContentPolicy::TYPE_SUBDOCUMENT) {
-    // TYPE_DOCUMENT and TYPE_SUBDOCUMENT loads might potentially
-    // be wyciwyg:// channels. Let's fix up the URI so we can
-    // perform proper security checks.
-    nsCOMPtr<nsIURIFixup> urifixup(components::URIFixup::Service());
-    if (urifixup) {
-      nsCOMPtr<nsIURI> fixedURI;
-      rv = urifixup->CreateExposableURI(uri, getter_AddRefs(fixedURI));
-      if (NS_SUCCEEDED(rv)) {
-        uri = fixedURI;
-      }
-    }
-  }
-
   // Handle cookie policies
   uint32_t cookiePolicy = loadInfo->GetCookiePolicy();
   if (cookiePolicy == nsILoadInfo::SEC_COOKIES_SAME_ORIGIN) {
     // We shouldn't have the SEC_COOKIES_SAME_ORIGIN flag for top level loads
     MOZ_ASSERT(loadInfo->GetExternalContentPolicyType() !=
                nsIContentPolicy::TYPE_DOCUMENT);
     nsIPrincipal* loadingPrincipal = loadInfo->LoadingPrincipal();
 
--- a/ipc/ipdl/ipdl/direct_call.py
+++ b/ipc/ipdl/ipdl/direct_call.py
@@ -589,17 +589,16 @@ VIRTUAL_CALL_CLASSES = set([
     ("PBrowserStream", "parent"),
     ("PExternalHelperApp", "parent"),
     ("PFTPChannel", "child"),
     ("PFTPChannel", "parent"),
     ("PHttpChannel", "child"),
     ("PHttpChannel", "parent"),
     ("PSessionStorageObserver", "child"),
     ("PSessionStorageObserver", "parent"),
-    ("PWyciwygChannel", "child"),
 
     # bug 1513911
     ("PIndexedDBPermissionRequest", "child"),
 
     # Recv* methods are MOZ_CAN_RUN_SCRIPT and OnMessageReceived is not, so
     # it's not allowed to call them.
     ("PBrowser", "child"),
 
--- a/ipc/ipdl/message-metadata.ini
+++ b/ipc/ipdl/message-metadata.ini
@@ -15,20 +15,16 @@ segment_capacity = 8192
 [PHttpChannel::OnStartRequest]
 segment_capacity = 8192
 [PHttpChannel::Redirect1Begin]
 segment_capacity = 8192
 [PHttpBackgroundChannel::OnTransportAndData]
 segment_capacity = 8192
 [PNecko::PHttpChannelConstructor]
 segment_capacity = 8192
-[PWyciwygChannel::WriteToCacheEntry]
-segment_capacity = 8192
-[PWyciwygChannel::SetSecurityInfo]
-segment_capacity = 8192
 [PMessagePort::PostMessages]
 segment_capacity = 12288
 [PMessagePort::ReceiveData]
 segment_capacity = 12288
 
 #------------------------------------------------------------
 # Small-size messages.
 #------------------------------------------------------------
--- a/mobile/android/base/java/org/mozilla/gecko/db/LocalTabsAccessor.java
+++ b/mobile/android/base/java/org/mozilla/gecko/db/LocalTabsAccessor.java
@@ -57,17 +57,17 @@ public class LocalTabsAccessor implement
             // If two clients somehow had the same last modified time, this will
             // group them (arbitrarily).
             BrowserContract.Clients.GUID + " DESC, " +
             // Within a single client, most recently used tabs first.
             BrowserContract.Tabs.LAST_USED + " DESC";
 
     private static final String LOCAL_CLIENT_SELECTION = BrowserContract.Clients.GUID + " IS NULL";
 
-    private static final Pattern FILTERED_URL_PATTERN = Pattern.compile("^(about|chrome|wyciwyg|file):");
+    private static final Pattern FILTERED_URL_PATTERN = Pattern.compile("^(about|chrome|file):");
 
     private final Uri clientsNoStaleSortedUriWithProfile;
     private final Uri tabsUriWithProfile;
     private final Uri clientsUriWithProfile;
 
     public LocalTabsAccessor(String profileName) {
         tabsUriWithProfile = DBUtils.appendProfileWithDefault(profileName, BrowserContract.Tabs.CONTENT_URI);
         clientsUriWithProfile = DBUtils.appendProfileWithDefault(profileName, BrowserContract.Clients.CONTENT_URI);
--- a/mobile/android/base/java/org/mozilla/gecko/restrictions/GuestProfileConfiguration.java
+++ b/mobile/android/base/java/org/mozilla/gecko/restrictions/GuestProfileConfiguration.java
@@ -31,18 +31,17 @@ public class GuestProfileConfiguration i
             Restrictable.DEFAULT_THEME
     );
 
     @SuppressWarnings("serial")
     private static final List<String> BANNED_SCHEMES = Arrays.asList(
             "file",
             "chrome",
             "resource",
-            "jar",
-            "wyciwyg"
+            "jar"
     );
 
     private static final List<String> BANNED_URLS = Arrays.asList(
             "about:config",
             "about:addons"
     );
 
     @Override
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -4655,17 +4655,19 @@ Tab.prototype = {
       }
 
       this.browser.docShell.displayLoadError(Cr.NS_ERROR_UNKNOWN_PROTOCOL, fixedURI, null);
     }
 
     let contentType = contentWin.document.contentType;
 
     // If fixedURI matches browser.lastURI, we assume this isn't a real location
-    // change but rather a spurious addition like a wyciwyg URI prefix. See Bug 747883.
+    // change but rather a spurious addition like adding a username/password. See Bug 747883.
+    // XXXbz Is this still relevant now that document.open doesn't do such
+    // things?  See bug 1528448.
     // Note that we have to ensure fixedURI is not the same as aLocationURI so we
     // don't false-positive page reloads as spurious additions.
     let sameDocument = (aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_SAME_DOCUMENT) != 0 ||
                        ((this.browser.lastURI != null) && fixedURI.equals(this.browser.lastURI) && !fixedURI.equals(aLocationURI));
     this.browser.lastURI = fixedURI;
 
     // Let the reader logic know about same document changes because we won't get a DOMContentLoaded
     // or pageshow event, but we'll still want to update the reader view button to account for this change.
--- a/mobile/android/components/HelperAppDialog.js
+++ b/mobile/android/components/HelperAppDialog.js
@@ -57,17 +57,16 @@ HelperAppLauncherDialog.prototype = {
         url.schemeIs("ftp")) {
       return true;
     }
 
     // The less-common opposite case.
     if (url.schemeIs("chrome") ||
         url.schemeIs("jar") ||
         url.schemeIs("resource") ||
-        url.schemeIs("wyciwyg") ||
         url.schemeIs("file")) {
       return false;
     }
 
     // For all other URIs, try to resolve them to an inner URI, and check that.
     if (!alreadyResolved) {
       let innerURI = NetUtil.newChannel({
         uri: url,
--- a/mobile/android/components/SessionStore.js
+++ b/mobile/android/components/SessionStore.js
@@ -757,32 +757,16 @@ SessionStore.prototype = {
 
     // Serialize the tab's session history data.
     let data = SessionHistory.collect(aBrowser.docShell);
     if (!data.index) {
       // Bail out if we couldn't collect even basic fallback data.
       return;
     }
 
-    // Filter out any top level "wyciwyg" entries that might have come through.
-    // Once we can figure out a GroupedSHistory-compatible way of doing this,
-    // we should move this into SessionHistory.jsm (see bug 1340874).
-    let historyIndex = data.index - 1;
-    for (let i = 0; i < data.entries.length; i++) {
-      if (data.entries[i].url.startsWith("wyciwyg")) {
-        // Adjust the index to account for skipped history entries.
-        if (i <= historyIndex) {
-          data.index--;
-          historyIndex--;
-        }
-        data.entries.splice(i, 1);
-        i--;
-      }
-    }
-
     let formdata;
     let scrolldata;
     if (aBrowser.__SS_data) {
       formdata = aBrowser.__SS_data.formdata;
       scrolldata = aBrowser.__SS_data.scrolldata;
     }
     delete aBrowser.__SS_data;
 
--- a/mobile/android/components/build/nsAndroidHistory.cpp
+++ b/mobile/android/components/build/nsAndroidHistory.cpp
@@ -359,16 +359,16 @@ nsAndroidHistory::CanAddURI(nsIURI* aURI
     }
   }
 
   // now check for all bad things
   if (scheme.EqualsLiteral("about") || scheme.EqualsLiteral("imap") ||
       scheme.EqualsLiteral("news") || scheme.EqualsLiteral("mailbox") ||
       scheme.EqualsLiteral("moz-anno") || scheme.EqualsLiteral("view-source") ||
       scheme.EqualsLiteral("chrome") || scheme.EqualsLiteral("resource") ||
-      scheme.EqualsLiteral("data") || scheme.EqualsLiteral("wyciwyg") ||
-      scheme.EqualsLiteral("javascript") || scheme.EqualsLiteral("blob")) {
+      scheme.EqualsLiteral("data") || scheme.EqualsLiteral("javascript") ||
+      scheme.EqualsLiteral("blob")) {
     *canAdd = false;
     return NS_OK;
   }
   *canAdd = true;
   return NS_OK;
 }
--- a/mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/android/RepoUtils.java
+++ b/mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/android/RepoUtils.java
@@ -167,17 +167,16 @@ public class RepoUtils {
         scheme.equals("imap") ||
         scheme.equals("news") ||
         scheme.equals("mailbox") ||
         scheme.equals("moz-anno") ||
         scheme.equals("view-source") ||
         scheme.equals("chrome") ||
         scheme.equals("resource") ||
         scheme.equals("data") ||
-        scheme.equals("wyciwyg") ||
         scheme.equals("javascript")) {
       return false;
     }
 
     return true;
   }
 
   /**
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFilterOpenTab.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFilterOpenTab.java
@@ -82,35 +82,31 @@ public class testFilterOpenTab extends C
         @Override
         public void test() throws Exception {
             final String TITLE1 = "Google";
             final String URL1 = "http://www.google.com/";
             final String TITLE2 = "Mozilla Start Page";
             final String URL2 = "about:home";
             final String TITLE3 = "Chrome Weave URL";
             final String URL3 = "chrome://weave/";
-            final String TITLE4 = "What You Cache Is What You Get";
-            final String URL4 = "wyciwyg://1/test.com";
-            final String TITLE5 = "Root Folder";
-            final String URL5 = "file:///";
+            final String TITLE4 = "Root Folder";
+            final String URL4 = "file:///";
 
             // Create a list of local tabs.
             List<Tab> tabs = new ArrayList<Tab>(6);
             Tab tab1 = createTab(1, URL1, false, 0, TITLE1);
             Tab tab2 = createTab(2, URL2, false, 0, TITLE2);
             Tab tab3 = createTab(3, URL3, false, 0, TITLE3);
             Tab tab4 = createTab(4, URL4, false, 0, TITLE4);
-            Tab tab5 = createTab(5, URL5, false, 0, TITLE5);
-            Tab tab6 = createPrivateTab(6, URL1, false, 0, TITLE1);
+            Tab tab5 = createPrivateTab(5, URL1, false, 0, TITLE1);
             tabs.add(tab1);
             tabs.add(tab2);
             tabs.add(tab3);
             tabs.add(tab4);
             tabs.add(tab5);
-            tabs.add(tab6);
 
             // Persist the created tabs. Normally, you should be careful that you get a profile on the
             // original thread, and do the work in a background one, but for testing we don't.
             final DatabaseHelper helper = new DatabaseHelper(getActivity(), mAsserter);
             helper.getProfileDB().getTabsAccessor().persistLocalTabs(mResolver, tabs);
 
             // Get the persisted tab and check if urls are filtered.
             Cursor c = getTabsFromLocalClient();
--- a/netwerk/base/nsIChannel.idl
+++ b/netwerk/base/nsIChannel.idl
@@ -83,21 +83,20 @@ interface nsIChannel : nsIRequest
     attribute nsIInterfaceRequestor notificationCallbacks;
 
     /**
      * Transport-level security information (if any) corresponding to the
      * channel.
      *
      * NOTE: In some circumstances TLS information is propagated onto
      * non-nsIHttpChannel objects to indicate that their contents were likely
-     * delivered over TLS all the same.  For example, document.open() may
-     * create an nsWyciwygChannel to store the data that will be written to the
-     * document.  In that case, if the caller has TLS information, we propagate
-     * that info onto the nsWyciwygChannel given that it is likely that the
-     * caller will be writing data that was delivered over TLS to the document.
+     * delivered over TLS all the same.
+     *
+     * FIXME(bz, bug 1528449) is that still true now that
+     * document.open() doesn't do this?
      */
     readonly attribute nsISupports securityInfo;
 
     /**
      * The MIME type of the channel's content if available. 
      * 
      * NOTE: the content type can often be wrongly specified (e.g., wrong file
      * extension, wrong MIME type, wrong document type stored on a server, etc.),
--- a/netwerk/base/nsNetUtil.cpp
+++ b/netwerk/base/nsNetUtil.cpp
@@ -2861,21 +2861,16 @@ bool SchemeIsFile(nsIURI *aURI) {
   return aURI->SchemeIs("file");
 }
 
 bool SchemeIsData(nsIURI *aURI) {
   MOZ_ASSERT(aURI);
   return aURI->SchemeIs("data");
 }
 
-bool SchemeIsWYCIWYG(nsIURI *aURI) {
-  MOZ_ASSERT(aURI);
-  return aURI->SchemeIs("wyciwyg");
-}
-
 bool SchemeIsViewSource(nsIURI *aURI) {
   MOZ_ASSERT(aURI);
   return aURI->SchemeIs("view-source");
 }
 
 bool SchemeIsResource(nsIURI *aURI) {
   MOZ_ASSERT(aURI);
   return aURI->SchemeIs("resource");
--- a/netwerk/base/nsNetUtil.h
+++ b/netwerk/base/nsNetUtil.h
@@ -948,16 +948,15 @@ nsresult GetParameterHTTP(const nsACStri
 bool SchemeIsHTTP(nsIURI *aURI);
 bool SchemeIsHTTPS(nsIURI *aURI);
 bool SchemeIsJavascript(nsIURI *aURI);
 bool SchemeIsChrome(nsIURI *aURI);
 bool SchemeIsAbout(nsIURI *aURI);
 bool SchemeIsBlob(nsIURI *aURI);
 bool SchemeIsFile(nsIURI *aURI);
 bool SchemeIsData(nsIURI *aURI);
-bool SchemeIsWYCIWYG(nsIURI *aURI);
 bool SchemeIsViewSource(nsIURI *aURI);
 bool SchemeIsResource(nsIURI *aURI);
 bool SchemeIsFTP(nsIURI *aURI);
 }  // namespace net
 }  // namespace mozilla
 
 #endif  // !nsNetUtil_h__
--- a/netwerk/build/components.conf
+++ b/netwerk/build/components.conf
@@ -333,23 +333,16 @@ Classes = [
     },
     {
         'cid': '{dc01dbbb-a5bb-4cbb-82bb-085cce06c0bb}',
         'contract_ids': ['@mozilla.org/network/protocol;1?name=wss'],
         'singleton': True,
         'legacy_constructor': 'mozilla::net::WebSocketSSLChannelConstructor',
     },
     {
-        'cid': '{e7509b46-2eb2-410a-9d7c-c3ce73284d01}',
-        'contract_ids': ['@mozilla.org/network/protocol;1?name=wyciwyg'],
-        'singleton': True,
-        'type': 'nsWyciwygProtocolHandler',
-        'headers': ['/netwerk/protocol/wyciwyg/nsWyciwygProtocolHandler.h'],
-    },
-    {
         'cid': '{a181af0d-68b8-4308-94db-d4f859058215}',
         'contract_ids': ['@mozilla.org/network/safe-file-output-stream;1'],
         'type': 'nsAtomicFileOutputStream',
         'headers': ['nsFileStreams.h'],
     },
     {
         'cid': '{d6ef593d-a429-4b14-a887-d9e2f765d9ed}',
         'contract_ids': ['@mozilla.org/network/serialization-helper;1'],
--- a/netwerk/build/moz.build
+++ b/netwerk/build/moz.build
@@ -29,17 +29,16 @@ LOCAL_INCLUDES += [
     '/netwerk/protocol/about',
     '/netwerk/protocol/data',
     '/netwerk/protocol/file',
     '/netwerk/protocol/ftp',
     '/netwerk/protocol/http',
     '/netwerk/protocol/res',
     '/netwerk/protocol/viewsource',
     '/netwerk/protocol/websocket',
-    '/netwerk/protocol/wyciwyg',
     '/netwerk/socket',
     '/netwerk/streamconv',
     '/netwerk/streamconv/converters',
 ]
 
 if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
     LOCAL_INCLUDES += [
         '/netwerk/protocol/gio',
--- a/netwerk/build/nsNetCID.h
+++ b/netwerk/build/nsNetCID.h
@@ -572,27 +572,16 @@
 #define NS_VIEWSOURCEHANDLER_CID                     \
   { /* {0x9c7ec5d1-23f9-11d5-aea8-8fcc0793e97f} */   \
     0x9c7ec5d1, 0x23f9, 0x11d5, {                    \
       0xae, 0xa8, 0x8f, 0xcc, 0x07, 0x93, 0xe9, 0x7f \
     }                                                \
   }
 
 /******************************************************************************
- * netwerk/protocol/wyciwyg/ classes
- */
-
-#define NS_WYCIWYGPROTOCOLHANDLER_CID                \
-  { /* {0xe7509b46-2eB2-410a-9d7c-c3ce73284d01} */   \
-    0xe7509b46, 0x2eb2, 0x410a, {                    \
-      0x9d, 0x7c, 0xc3, 0xce, 0x73, 0x28, 0x4d, 0x01 \
-    }                                                \
-  }
-
-/******************************************************************************
  * netwerk/protocol/websocket/ classes
  */
 
 #define NS_WEBSOCKETPROTOCOLHANDLER_CID              \
   { /* {dc01db59-a513-4c90-824b-085cce06c0aa} */     \
     0xdc01db59, 0xa513, 0x4c90, {                    \
       0x82, 0x4b, 0x08, 0x5c, 0xce, 0x06, 0xc0, 0xaa \
     }                                                \
--- a/netwerk/cache2/OldWrappers.cpp
+++ b/netwerk/cache2/OldWrappers.cpp
@@ -491,23 +491,16 @@ nsresult GetCacheSessionNameForStoragePo
         // any compatibility damage.
         sessionName.AssignLiteral("HTTP-offline");
         break;
       default:
         sessionName.AssignLiteral("HTTP");
         break;
     }
   }
-  // WYCIWYG
-  else if (scheme.EqualsLiteral("wyciwyg")) {
-    if (isPrivate)
-      sessionName.AssignLiteral("wyciwyg-private");
-    else
-      sessionName.AssignLiteral("wyciwyg");
-  }
   // FTP
   else if (scheme.EqualsLiteral("ftp")) {
     if (isPrivate)
       sessionName.AssignLiteral("FTP-private");
     else
       sessionName.AssignLiteral("FTP");
   }
   // all remaining URL scheme
@@ -616,17 +609,17 @@ nsresult _OldCacheLoad::Start() {
   LOG(("_OldCacheLoad::Start [this=%p, key=%s]", this, mCacheKey.get()));
 
   mLoadStart = mozilla::TimeStamp::Now();
 
   nsresult rv;
 
   // Consumers that can invoke this code as first and off the main thread
   // are responsible for initiating these two services on the main thread.
-  // Currently this is only nsWyciwygChannel.
+  // Currently no one does that.
 
   // XXX: Start the cache service; otherwise DispatchToCacheIOThread will
   // fail.
   nsCOMPtr<nsICacheService> service =
       do_GetService(NS_CACHESERVICE_CONTRACTID, &rv);
 
   // Ensure the stream transport service gets initialized on the main thread
   if (NS_SUCCEEDED(rv) && NS_IsMainThread()) {
@@ -918,24 +911,17 @@ NS_IMETHODIMP _OldStorage::AsyncEvictSto
     nsCOMPtr<nsICacheSession> session;
     rv = GetCacheSession(NS_LITERAL_CSTRING("http"), mWriteToDisk, mLoadInfo,
                          mAppCache, getter_AddRefs(session));
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = session->EvictEntries();
     NS_ENSURE_SUCCESS(rv, rv);
 
-    rv = GetCacheSession(NS_LITERAL_CSTRING("wyciwyg"), mWriteToDisk, mLoadInfo,
-                         mAppCache, getter_AddRefs(session));
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    rv = session->EvictEntries();
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    // This clears any data from scheme other then http, wyciwyg or ftp
+    // This clears any data from schemes other than http or ftp.
     rv = GetCacheSession(EmptyCString(), mWriteToDisk, mLoadInfo, mAppCache,
                          getter_AddRefs(session));
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = session->EvictEntries();
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
@@ -1014,19 +1000,16 @@ nsresult _OldStorage::AssembleCacheKey(n
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = noRefURI->GetAsciiSpec(uriSpec);
     NS_ENSURE_SUCCESS(rv, rv);
 
     if (!aCacheKey.IsEmpty()) {
       aCacheKey.AppendLiteral("uri=");
     }
-  } else if (aScheme.EqualsLiteral("wyciwyg")) {
-    rv = aURI->GetSpec(uriSpec);
-    NS_ENSURE_SUCCESS(rv, rv);
   } else {
     rv = aURI->GetAsciiSpec(uriSpec);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   aCacheKey.Append(uriSpec);
 
   return NS_OK;
--- a/netwerk/ipc/NeckoChild.cpp
+++ b/netwerk/ipc/NeckoChild.cpp
@@ -7,17 +7,16 @@
 
 #include "necko-config.h"
 #include "nsHttp.h"
 #include "mozilla/net/NeckoChild.h"
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/dom/TabChild.h"
 #include "mozilla/net/HttpChannelChild.h"
 #include "mozilla/net/CookieServiceChild.h"
-#include "mozilla/net/WyciwygChannelChild.h"
 #include "mozilla/net/FTPChannelChild.h"
 #include "mozilla/net/WebSocketChannelChild.h"
 #include "mozilla/net/WebSocketEventListenerChild.h"
 #include "mozilla/net/DNSRequestChild.h"
 #include "mozilla/net/ChannelDiverterChild.h"
 #include "mozilla/net/IPCTransportProvider.h"
 #include "mozilla/dom/network/TCPSocketChild.h"
 #include "mozilla/dom/network/TCPServerSocketChild.h"
@@ -170,31 +169,16 @@ bool NeckoChild::DeallocPCookieServiceCh
   NS_ASSERTION(IsNeckoChild(),
                "DeallocPCookieServiceChild called by non-child!");
 
   CookieServiceChild* p = static_cast<CookieServiceChild*>(cs);
   p->Release();
   return true;
 }
 
-PWyciwygChannelChild* NeckoChild::AllocPWyciwygChannelChild() {
-  // We don't allocate here: see nsWyciwygProtocolHandler::NewChannel2()
-  MOZ_ASSERT_UNREACHABLE("AllocPWyciwygChannelChild should not be called");
-  return nullptr;
-}
-
-bool NeckoChild::DeallocPWyciwygChannelChild(PWyciwygChannelChild* channel) {
-  MOZ_ASSERT(IsNeckoChild(),
-             "DeallocPWyciwygChannelChild called by non-child!");
-
-  WyciwygChannelChild* p = static_cast<WyciwygChannelChild*>(channel);
-  p->ReleaseIPDLReference();
-  return true;
-}
-
 PWebSocketChild* NeckoChild::AllocPWebSocketChild(
     const PBrowserOrId& browser, const SerializedLoadContext& aSerialized,
     const uint32_t& aSerial) {
   MOZ_ASSERT_UNREACHABLE("AllocPWebSocketChild should not be called");
   return nullptr;
 }
 
 bool NeckoChild::DeallocPWebSocketChild(PWebSocketChild* child) {
--- a/netwerk/ipc/NeckoChild.h
+++ b/netwerk/ipc/NeckoChild.h
@@ -39,18 +39,16 @@ class NeckoChild : public PNeckoChild {
 
   PAltDataOutputStreamChild* AllocPAltDataOutputStreamChild(
       const nsCString& type, const int64_t& predictedSize,
       PHttpChannelChild* channel);
   bool DeallocPAltDataOutputStreamChild(PAltDataOutputStreamChild* aActor);
 
   PCookieServiceChild* AllocPCookieServiceChild();
   bool DeallocPCookieServiceChild(PCookieServiceChild*);
-  PWyciwygChannelChild* AllocPWyciwygChannelChild();
-  bool DeallocPWyciwygChannelChild(PWyciwygChannelChild*);
   PFTPChannelChild* AllocPFTPChannelChild(
       const PBrowserOrId& aBrowser, const SerializedLoadContext& aSerialized,
       const FTPChannelCreationArgs& aOpenArgs);
   bool DeallocPFTPChannelChild(PFTPChannelChild*);
   PWebSocketChild* AllocPWebSocketChild(const PBrowserOrId&,
                                         const SerializedLoadContext&,
                                         const uint32_t&);
   bool DeallocPWebSocketChild(PWebSocketChild*);
--- a/netwerk/ipc/NeckoParent.cpp
+++ b/netwerk/ipc/NeckoParent.cpp
@@ -9,17 +9,16 @@
 #include "nsHttp.h"
 #include "mozilla/BasePrincipal.h"
 #include "mozilla/ContentPrincipal.h"
 #include "mozilla/ipc/IPCStreamUtils.h"
 #include "mozilla/net/ExtensionProtocolHandler.h"
 #include "mozilla/net/NeckoParent.h"
 #include "mozilla/net/HttpChannelParent.h"
 #include "mozilla/net/CookieServiceParent.h"
-#include "mozilla/net/WyciwygChannelParent.h"
 #include "mozilla/net/FTPChannelParent.h"
 #include "mozilla/net/WebSocketChannelParent.h"
 #include "mozilla/net/WebSocketEventListenerParent.h"
 #include "mozilla/net/DataChannelParent.h"
 #include "mozilla/net/SimpleChannelParent.h"
 #include "mozilla/net/AltDataOutputStreamParent.h"
 #include "mozilla/Unused.h"
 #include "mozilla/net/FileChannelParent.h"
@@ -422,28 +421,16 @@ PCookieServiceParent* NeckoParent::Alloc
   return new CookieServiceParent();
 }
 
 bool NeckoParent::DeallocPCookieServiceParent(PCookieServiceParent* cs) {
   delete cs;
   return true;
 }
 
-PWyciwygChannelParent* NeckoParent::AllocPWyciwygChannelParent() {
-  WyciwygChannelParent* p = new WyciwygChannelParent();
-  p->AddRef();
-  return p;
-}
-
-bool NeckoParent::DeallocPWyciwygChannelParent(PWyciwygChannelParent* channel) {
-  WyciwygChannelParent* p = static_cast<WyciwygChannelParent*>(channel);
-  p->Release();
-  return true;
-}
-
 PWebSocketParent* NeckoParent::AllocPWebSocketParent(
     const PBrowserOrId& browser, const SerializedLoadContext& serialized,
     const uint32_t& aSerial) {
   nsCOMPtr<nsILoadContext> loadContext;
   const char* error = CreateChannelLoadContext(browser, Manager(), serialized,
                                                nullptr, loadContext);
   if (error) {
     printf_stderr(
--- a/netwerk/ipc/NeckoParent.h
+++ b/netwerk/ipc/NeckoParent.h
@@ -108,18 +108,16 @@ class NeckoParent : public PNeckoParent 
   bool DeallocPWebrtcProxyChannelParent(PWebrtcProxyChannelParent* aActor);
 
   PAltDataOutputStreamParent* AllocPAltDataOutputStreamParent(
       const nsCString& type, const int64_t& predictedSize,
       PHttpChannelParent* channel);
   bool DeallocPAltDataOutputStreamParent(PAltDataOutputStreamParent* aActor);
 
   bool DeallocPCookieServiceParent(PCookieServiceParent*);
-  PWyciwygChannelParent* AllocPWyciwygChannelParent();
-  bool DeallocPWyciwygChannelParent(PWyciwygChannelParent*);
   PFTPChannelParent* AllocPFTPChannelParent(
       const PBrowserOrId& aBrowser, const SerializedLoadContext& aSerialized,
       const FTPChannelCreationArgs& aOpenArgs);
   virtual mozilla::ipc::IPCResult RecvPFTPChannelConstructor(
       PFTPChannelParent* aActor, const PBrowserOrId& aBrowser,
       const SerializedLoadContext& aSerialized,
       const FTPChannelCreationArgs& aOpenArgs) override;
   bool DeallocPFTPChannelParent(PFTPChannelParent*);
--- a/netwerk/ipc/PNecko.ipdl
+++ b/netwerk/ipc/PNecko.ipdl
@@ -4,17 +4,16 @@
 /* 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 protocol PContent;
 include protocol PHttpChannel;
 include protocol PCookieService;
 include protocol PBrowser;
-include protocol PWyciwygChannel;
 include protocol PFTPChannel;
 include protocol PWebSocket;
 include protocol PWebSocketEventListener;
 include protocol PTCPSocket;
 include protocol PTCPServerSocket;
 include protocol PUDPSocket;
 include protocol PDNSRequest;
 include protocol PChannelDiverter;
@@ -46,17 +45,16 @@ namespace mozilla {
 namespace net {
 
 //-------------------------------------------------------------------
 nested(upto inside_cpow) sync protocol PNecko
 {
   manager PContent;
   manages PHttpChannel;
   manages PCookieService;
-  manages PWyciwygChannel;
   manages PFTPChannel;
   manages PWebSocket;
   manages PWebSocketEventListener;
   manages PTCPSocket;
   manages PTCPServerSocket;
   manages PUDPSocket;
   manages PDNSRequest;
   manages PDataChannel;
@@ -71,17 +69,16 @@ nested(upto inside_cpow) sync protocol P
 
 parent:
   async __delete__();
 
   nested(inside_cpow) async PCookieService();
   async PHttpChannel(PBrowserOrId browser,
                      SerializedLoadContext loadContext,
                      HttpChannelCreationArgs args);
-  async PWyciwygChannel();
   async PFTPChannel(PBrowserOrId browser, SerializedLoadContext loadContext,
                     FTPChannelCreationArgs args);
 
   async PWebSocket(PBrowserOrId browser, SerializedLoadContext loadContext,
                    uint32_t aSerialID);
   async PTCPServerSocket(uint16_t localPort, uint16_t backlog, bool useArrayBuffers);
   async PUDPSocket(Principal principal, nsCString filter);
 
--- a/netwerk/protocol/ftp/FTPChannelParent.cpp
+++ b/netwerk/protocol/ftp/FTPChannelParent.cpp
@@ -394,18 +394,18 @@ FTPChannelParent::OnStartRequest(nsIRequ
   NS_ENSURE_TRUE(chan, NS_ERROR_UNEXPECTED);
 
   // Send down any permissions which are relevant to this URL if we are
   // performing a document load.
   if (!mIPCClosed) {
     PContentParent* pcp = Manager()->Manager();
     MOZ_ASSERT(pcp, "We should have a manager if our IPC isn't closed");
     DebugOnly<nsresult> rv =
-        static_cast<ContentParent*>(pcp)
-            ->AboutToLoadHttpFtpWyciwygDocumentForChild(chan);
+        static_cast<ContentParent*>(pcp)->AboutToLoadHttpFtpDocumentForChild(
+            chan);
     MOZ_ASSERT(NS_SUCCEEDED(rv));
   }
 
   int64_t contentLength;
   chan->GetContentLength(&contentLength);
   nsCString contentType;
   chan->GetContentType(contentType);
 
--- a/netwerk/protocol/http/HttpBaseChannel.cpp
+++ b/netwerk/protocol/http/HttpBaseChannel.cpp
@@ -1662,49 +1662,16 @@ HttpBaseChannel::SetReferrerWithPolicy(n
   }
   if (userReferrerLevel < referrerLevel) {
     return NS_OK;
   }
 
   nsCOMPtr<nsIURI> referrerGrip;
   bool match;
 
-  //
-  // Strip off "wyciwyg://123/" from wyciwyg referrers.
-  //
-  // XXX this really belongs elsewhere since wyciwyg URLs aren't part of necko.
-  //   perhaps some sort of generic nsINestedURI could be used.  then, if an URI
-  //   fails the whitelist test, then we could check for an inner URI and try
-  //   that instead.  though, that might be too automatic.
-  //
-  rv = referrer->SchemeIs("wyciwyg", &match);
-  if (NS_FAILED(rv)) return rv;
-  if (match) {
-    nsAutoCString path;
-    rv = referrer->GetPathQueryRef(path);
-    if (NS_FAILED(rv)) return rv;
-
-    uint32_t pathLength = path.Length();
-    if (pathLength <= 2) return NS_ERROR_FAILURE;
-
-    // Path is of the form "//123/http://foo/bar", with a variable number of
-    // digits. To figure out where the "real" URL starts, search path for a
-    // '/', starting at the third character.
-    int32_t slashIndex = path.FindChar('/', 2);
-    if (slashIndex == kNotFound) return NS_ERROR_FAILURE;
-
-    // Replace |referrer| with a URI without wyciwyg://123/.
-    rv =
-        NS_NewURI(getter_AddRefs(referrerGrip),
-                  Substring(path, slashIndex + 1, pathLength - slashIndex - 1));
-    if (NS_FAILED(rv)) return rv;
-
-    referrer = referrerGrip.get();
-  }
-
   // Enforce Referrer whitelist
   if (!IsReferrerSchemeAllowed(referrer)) {
     return NS_OK;  // kick out....
   }
 
   //
   // Handle secure referrals.
   //
--- a/netwerk/protocol/http/HttpChannelParent.cpp
+++ b/netwerk/protocol/http/HttpChannelParent.cpp
@@ -1339,18 +1339,18 @@ HttpChannelParent::OnStartRequest(nsIReq
              "HttpBaseChannel instance");
 
   // Send down any permissions which are relevant to this URL if we are
   // performing a document load. We can't do that if mIPCClosed is set.
   if (!mIPCClosed) {
     PContentParent* pcp = Manager()->Manager();
     MOZ_ASSERT(pcp, "We should have a manager if our IPC isn't closed");
     DebugOnly<nsresult> rv =
-        static_cast<ContentParent*>(pcp)
-            ->AboutToLoadHttpFtpWyciwygDocumentForChild(chan);
+        static_cast<ContentParent*>(pcp)->AboutToLoadHttpFtpDocumentForChild(
+            chan);
     MOZ_ASSERT(NS_SUCCEEDED(rv));
   }
 
   bool isFromCache = false;
   uint64_t cacheEntryId = 0;
   int32_t fetchCount = 0;
   uint32_t expirationTime = nsICacheEntry::NO_EXPIRATION_TIME;
   nsCString cachedCharset;
--- a/netwerk/protocol/moz.build
+++ b/netwerk/protocol/moz.build
@@ -2,9 +2,9 @@
 # vim: set filetype=python:
 # 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/.
 
 DIRS += ['about', 'data', 'file', 'ftp']
 if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
     DIRS += ['gio']
-DIRS += ['http', 'res', 'viewsource', 'websocket', 'wyciwyg']
+DIRS += ['http', 'res', 'viewsource', 'websocket' ]
deleted file mode 100644
--- a/netwerk/protocol/wyciwyg/PWyciwygChannel.ipdl
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set sw=2 ts=8 et tw=80 ft=cpp : */
-/* 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 protocol PNecko;
-include protocol PBrowser;
-include URIParams;
-include PBackgroundSharedTypes;
-include PBrowserOrId;
-
-using class IPC::SerializedLoadContext from "SerializedLoadContext.h";
-
-namespace mozilla {
-namespace net {
-
-//-------------------------------------------------------------------
-protocol PWyciwygChannel
-{
-  manager PNecko;
-
-parent:
-  async __delete__();
-
-  async Init(URIParams     uri,
-             PrincipalInfo requestingPrincipalInfo,
-             PrincipalInfo triggeringPrincipalInfo,
-             PrincipalInfo principalToInheritInfo,
-             uint32_t      securityFlags,
-             uint32_t      contentPolicyType);
-  async AsyncOpen(URIParams             originalURI,
-                  uint32_t              loadFlags,
-                  SerializedLoadContext loadContext,
-                  PBrowserOrId browser);
-  async AppData(SerializedLoadContext loadContext, PBrowserOrId browser);
-
-  // methods corresponding to those of nsIWyciwygChannel
-  async WriteToCacheEntry(nsDependentSubstring data);
-  async CloseCacheEntry(nsresult reason);
-  async SetCharsetAndSource(int32_t source, nsCString charset);
-  async SetSecurityInfo(nsCString securityInfo);
-  async Cancel(nsresult status);
-
-child:
-  async OnStartRequest(nsresult  statusCode,
-                       int64_t   contentLength,
-                       int32_t   source,
-                       nsCString charset,
-                       nsCString securityInfo);
-
-  async OnDataAvailable(nsCString data,
-                        uint64_t  offset);
-
-  async OnStopRequest(nsresult statusCode);
-
-  async CancelEarly(nsresult statusCode);
-};
-
-
-} // namespace net
-} // namespace mozilla
deleted file mode 100644
--- a/netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp
+++ /dev/null
@@ -1,712 +0,0 @@
-/* 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 "nsWyciwyg.h"
-
-#include "base/compiler_specific.h"
-
-#include "mozilla/net/ChannelEventQueue.h"
-#include "WyciwygChannelChild.h"
-#include "mozilla/dom/TabChild.h"
-#include "mozilla/dom/ContentChild.h"
-#include "mozilla/net/NeckoChild.h"
-
-#include "nsCharsetSource.h"
-#include "nsContentUtils.h"
-#include "nsStringStream.h"
-#include "nsNetUtil.h"
-#include "nsISerializable.h"
-#include "nsSerializationHelper.h"
-#include "nsIProgressEventSink.h"
-#include "mozilla/ipc/URIUtils.h"
-#include "SerializedLoadContext.h"
-#include "mozilla/ipc/BackgroundUtils.h"
-#include "nsProxyRelease.h"
-#include "nsContentSecurityManager.h"
-
-using namespace mozilla::ipc;
-using namespace mozilla::dom;
-
-namespace mozilla {
-namespace net {
-
-NS_IMPL_ISUPPORTS(WyciwygChannelChild, nsIRequest, nsIChannel,
-                  nsIWyciwygChannel, nsIPrivateBrowsingChannel)
-
-WyciwygChannelChild::WyciwygChannelChild(nsIEventTarget* aNeckoTarget)
-    : NeckoTargetHolder(aNeckoTarget),
-      mStatus(NS_OK),
-      mIsPending(false),
-      mCanceled(false),
-      mLoadFlags(LOAD_NORMAL),
-      mContentLength(-1),
-      mCharsetSource(kCharsetUninitialized),
-      mState(WCC_NEW),
-      mIPCOpen(false),
-      mSentAppData(false) {
-  LOG(("Creating WyciwygChannelChild @%p\n", this));
-  mEventQ = new ChannelEventQueue(NS_ISUPPORTS_CAST(nsIWyciwygChannel*, this));
-
-  if (mNeckoTarget) {
-    gNeckoChild->SetEventTargetForActor(this, mNeckoTarget);
-  }
-
-  gNeckoChild->SendPWyciwygChannelConstructor(this);
-  // IPDL holds a reference until IPDL channel gets destroyed
-  AddIPDLReference();
-}
-
-WyciwygChannelChild::~WyciwygChannelChild() {
-  LOG(("Destroying WyciwygChannelChild @%p\n", this));
-  if (mLoadInfo) {
-    NS_ReleaseOnMainThreadSystemGroup("WyciwygChannelChild::mLoadInfo",
-                                      mLoadInfo.forget());
-  }
-}
-
-void WyciwygChannelChild::AddIPDLReference() {
-  MOZ_ASSERT(!mIPCOpen, "Attempt to retain more than one IPDL reference");
-  mIPCOpen = true;
-  AddRef();
-}
-
-void WyciwygChannelChild::ReleaseIPDLReference() {
-  MOZ_ASSERT(mIPCOpen, "Attempt to release nonexistent IPDL reference");
-  mIPCOpen = false;
-  Release();
-}
-
-nsresult WyciwygChannelChild::Init(nsIURI* uri) {
-  NS_ENSURE_ARG_POINTER(uri);
-
-  mState = WCC_INIT;
-
-  mURI = uri;
-  mOriginalURI = uri;
-
-  URIParams serializedUri;
-  SerializeURI(uri, serializedUri);
-
-  // propagate loadInfo
-  mozilla::ipc::PrincipalInfo requestingPrincipalInfo;
-  mozilla::ipc::PrincipalInfo triggeringPrincipalInfo;
-  mozilla::ipc::PrincipalInfo principalToInheritInfo;
-  uint32_t securityFlags;
-  uint32_t policyType;
-  if (mLoadInfo) {
-    mozilla::ipc::PrincipalToPrincipalInfo(mLoadInfo->LoadingPrincipal(),
-                                           &requestingPrincipalInfo);
-    mozilla::ipc::PrincipalToPrincipalInfo(mLoadInfo->TriggeringPrincipal(),
-                                           &triggeringPrincipalInfo);
-    mozilla::ipc::PrincipalToPrincipalInfo(mLoadInfo->PrincipalToInherit(),
-                                           &principalToInheritInfo);
-    securityFlags = mLoadInfo->GetSecurityFlags();
-    policyType = mLoadInfo->InternalContentPolicyType();
-  } else {
-    // use default values if no loadInfo is provided
-    mozilla::ipc::PrincipalToPrincipalInfo(nsContentUtils::GetSystemPrincipal(),
-                                           &requestingPrincipalInfo);
-    mozilla::ipc::PrincipalToPrincipalInfo(nsContentUtils::GetSystemPrincipal(),
-                                           &triggeringPrincipalInfo);
-    mozilla::ipc::PrincipalToPrincipalInfo(nsContentUtils::GetSystemPrincipal(),
-                                           &principalToInheritInfo);
-    securityFlags = nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL;
-    policyType = nsIContentPolicy::TYPE_OTHER;
-  }
-
-  SendInit(serializedUri, requestingPrincipalInfo, triggeringPrincipalInfo,
-           principalToInheritInfo, securityFlags, policyType);
-  return NS_OK;
-}
-
-//-----------------------------------------------------------------------------
-// WyciwygChannelChild::PWyciwygChannelChild
-//-----------------------------------------------------------------------------
-
-class WyciwygStartRequestEvent
-    : public NeckoTargetChannelEvent<WyciwygChannelChild> {
- public:
-  WyciwygStartRequestEvent(WyciwygChannelChild* child,
-                           const nsresult& statusCode,
-                           const int64_t& contentLength, const int32_t& source,
-                           const nsCString& charset,
-                           const nsCString& securityInfo)
-      : NeckoTargetChannelEvent<WyciwygChannelChild>(child),
-        mStatusCode(statusCode),
-        mContentLength(contentLength),
-        mSource(source),
-        mCharset(charset),
-        mSecurityInfo(securityInfo) {}
-
-  void Run() override {
-    mChild->OnStartRequest(mStatusCode, mContentLength, mSource, mCharset,
-                           mSecurityInfo);
-  }
-
- private:
-  nsresult mStatusCode;
-  int64_t mContentLength;
-  int32_t mSource;
-  nsCString mCharset;
-  nsCString mSecurityInfo;
-};
-
-mozilla::ipc::IPCResult WyciwygChannelChild::RecvOnStartRequest(
-    const nsresult& statusCode, const int64_t& contentLength,
-    const int32_t& source, const nsCString& charset,
-    const nsCString& securityInfo) {
-  mEventQ->RunOrEnqueue(new WyciwygStartRequestEvent(
-      this, statusCode, contentLength, source, charset, securityInfo));
-  return IPC_OK();
-}
-
-void WyciwygChannelChild::OnStartRequest(const nsresult& statusCode,
-                                         const int64_t& contentLength,
-                                         const int32_t& source,
-                                         const nsCString& charset,
-                                         const nsCString& securityInfo) {
-  LOG(("WyciwygChannelChild::RecvOnStartRequest [this=%p]\n", this));
-  nsresult rv;
-  mState = WCC_ONSTART;
-
-  if (!mCanceled && NS_SUCCEEDED(mStatus)) {
-    mStatus = statusCode;
-  }
-  mContentLength = contentLength;
-  mCharsetSource = source;
-  mCharset = charset;
-
-  if (!securityInfo.IsEmpty()) {
-    rv = NS_DeserializeObject(securityInfo, getter_AddRefs(mSecurityInfo));
-    MOZ_DIAGNOSTIC_ASSERT(NS_SUCCEEDED(rv),
-                          "Deserializing security info should not fail");
-  }
-
-  AutoEventEnqueuer ensureSerialDispatch(mEventQ);
-
-  rv = mListener->OnStartRequest(this);
-  if (NS_FAILED(rv)) Cancel(rv);
-}
-
-class WyciwygDataAvailableEvent
-    : public NeckoTargetChannelEvent<WyciwygChannelChild> {
- public:
-  WyciwygDataAvailableEvent(WyciwygChannelChild* child, const nsCString& data,
-                            const uint64_t& offset)
-      : NeckoTargetChannelEvent<WyciwygChannelChild>(child),
-        mData(data),
-        mOffset(offset) {}
-
-  void Run() override { mChild->OnDataAvailable(mData, mOffset); }
-
- private:
-  nsCString mData;
-  uint64_t mOffset;
-};
-
-mozilla::ipc::IPCResult WyciwygChannelChild::RecvOnDataAvailable(
-    const nsCString& data, const uint64_t& offset) {
-  mEventQ->RunOrEnqueue(new WyciwygDataAvailableEvent(this, data, offset));
-  return IPC_OK();
-}
-
-void WyciwygChannelChild::OnDataAvailable(const nsCString& data,
-                                          const uint64_t& offset) {
-  LOG(("WyciwygChannelChild::RecvOnDataAvailable [this=%p]\n", this));
-
-  if (mCanceled) return;
-
-  mState = WCC_ONDATA;
-
-  // NOTE: the OnDataAvailable contract requires the client to read all the data
-  // in the inputstream.  This code relies on that ('data' will go away after
-  // this function).  Apparently the previous, non-e10s behavior was to actually
-  // support only reading part of the data, allowing later calls to read the
-  // rest.
-  nsCOMPtr<nsIInputStream> stringStream;
-  nsresult rv = NS_NewByteInputStream(getter_AddRefs(stringStream), data,
-                                      NS_ASSIGNMENT_DEPEND);
-  if (NS_FAILED(rv)) {
-    Cancel(rv);
-    return;
-  }
-
-  AutoEventEnqueuer ensureSerialDispatch(mEventQ);
-
-  rv = mListener->OnDataAvailable(this, stringStream, offset,
-                                  data.Length());
-  if (NS_FAILED(rv)) Cancel(rv);
-
-  if (mProgressSink && NS_SUCCEEDED(rv)) {
-    mProgressSink->OnProgress(this, nullptr, offset + data.Length(),
-                              mContentLength);
-  }
-}
-
-class WyciwygStopRequestEvent
-    : public NeckoTargetChannelEvent<WyciwygChannelChild> {
- public:
-  WyciwygStopRequestEvent(WyciwygChannelChild* child,
-                          const nsresult& statusCode)
-      : NeckoTargetChannelEvent<WyciwygChannelChild>(child),
-        mStatusCode(statusCode) {}
-
-  void Run() override { mChild->OnStopRequest(mStatusCode); }
-
- private:
-  nsresult mStatusCode;
-};
-
-mozilla::ipc::IPCResult WyciwygChannelChild::RecvOnStopRequest(
-    const nsresult& statusCode) {
-  mEventQ->RunOrEnqueue(new WyciwygStopRequestEvent(this, statusCode));
-  return IPC_OK();
-}
-
-void WyciwygChannelChild::OnStopRequest(const nsresult& statusCode) {
-  LOG(("WyciwygChannelChild::RecvOnStopRequest [this=%p status=%" PRIu32 "]\n",
-       this, static_cast<uint32_t>(statusCode)));
-
-  {  // We need to ensure that all IPDL message dispatching occurs
-    // before we delete the protocol below
-    AutoEventEnqueuer ensureSerialDispatch(mEventQ);
-
-    mState = WCC_ONSTOP;
-
-    mIsPending = false;
-
-    if (!mCanceled) mStatus = statusCode;
-
-    mListener->OnStopRequest(this, statusCode);
-
-    mListener = nullptr;
-
-    if (mLoadGroup) mLoadGroup->RemoveRequest(this, nullptr, mStatus);
-
-    mCallbacks = nullptr;
-    mProgressSink = nullptr;
-  }
-
-  if (mIPCOpen) PWyciwygChannelChild::Send__delete__(this);
-}
-
-class WyciwygCancelEvent : public NeckoTargetChannelEvent<WyciwygChannelChild> {
- public:
-  WyciwygCancelEvent(WyciwygChannelChild* child, const nsresult& status)
-      : NeckoTargetChannelEvent<WyciwygChannelChild>(child), mStatus(status) {}
-
-  void Run() override { mChild->CancelEarly(mStatus); }
-
- private:
-  nsresult mStatus;
-};
-
-mozilla::ipc::IPCResult WyciwygChannelChild::RecvCancelEarly(
-    const nsresult& statusCode) {
-  mEventQ->RunOrEnqueue(new WyciwygCancelEvent(this, statusCode));
-  return IPC_OK();
-}
-
-void WyciwygChannelChild::CancelEarly(const nsresult& statusCode) {
-  LOG(("WyciwygChannelChild::CancelEarly [this=%p]\n", this));
-
-  if (mCanceled) return;
-
-  mCanceled = true;
-  mStatus = statusCode;
-
-  mIsPending = false;
-  if (mLoadGroup) mLoadGroup->RemoveRequest(this, nullptr, mStatus);
-
-  if (mListener) {
-    mListener->OnStartRequest(this);
-    mListener->OnStopRequest(this, mStatus);
-  }
-  mListener = nullptr;
-
-  if (mIPCOpen) PWyciwygChannelChild::Send__delete__(this);
-}
-
-//-----------------------------------------------------------------------------
-// nsIRequest
-//-----------------------------------------------------------------------------
-
-NS_IMETHODIMP
-WyciwygChannelChild::GetName(nsACString& aName) { return mURI->GetSpec(aName); }
-
-NS_IMETHODIMP
-WyciwygChannelChild::IsPending(bool* aIsPending) {
-  *aIsPending = mIsPending;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-WyciwygChannelChild::GetStatus(nsresult* aStatus) {
-  *aStatus = mStatus;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-WyciwygChannelChild::Cancel(nsresult aStatus) {
-  if (mCanceled) return NS_OK;
-
-  mCanceled = true;
-  mStatus = aStatus;
-  if (mIPCOpen) SendCancel(aStatus);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-WyciwygChannelChild::Suspend() { return NS_ERROR_NOT_IMPLEMENTED; }
-
-NS_IMETHODIMP
-WyciwygChannelChild::Resume() { return NS_ERROR_NOT_IMPLEMENTED; }
-
-NS_IMETHODIMP
-WyciwygChannelChild::GetLoadGroup(nsILoadGroup** aLoadGroup) {
-  *aLoadGroup = mLoadGroup;
-  NS_IF_ADDREF(*aLoadGroup);
-  return NS_OK;
-}
-NS_IMETHODIMP
-WyciwygChannelChild::SetLoadGroup(nsILoadGroup* aLoadGroup) {
-  if (!CanSetLoadGroup(aLoadGroup)) {
-    return NS_ERROR_FAILURE;
-  }
-
-  mLoadGroup = aLoadGroup;
-  NS_QueryNotificationCallbacks(mCallbacks, mLoadGroup,
-                                NS_GET_IID(nsIProgressEventSink),
-                                getter_AddRefs(mProgressSink));
-
-  UpdatePrivateBrowsing();
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-WyciwygChannelChild::GetLoadFlags(nsLoadFlags* aLoadFlags) {
-  *aLoadFlags = mLoadFlags;
-  return NS_OK;
-}
-NS_IMETHODIMP
-WyciwygChannelChild::SetLoadFlags(nsLoadFlags aLoadFlags) {
-  mLoadFlags = aLoadFlags;
-  return NS_OK;
-}
-
-//-----------------------------------------------------------------------------
-// nsIChannel
-//-----------------------------------------------------------------------------
-
-NS_IMETHODIMP
-WyciwygChannelChild::GetOriginalURI(nsIURI** aOriginalURI) {
-  *aOriginalURI = mOriginalURI;
-  NS_ADDREF(*aOriginalURI);
-  return NS_OK;
-}
-NS_IMETHODIMP
-WyciwygChannelChild::SetOriginalURI(nsIURI* aOriginalURI) {
-  NS_ENSURE_TRUE(mState == WCC_INIT, NS_ERROR_UNEXPECTED);
-
-  NS_ENSURE_ARG_POINTER(aOriginalURI);
-  mOriginalURI = aOriginalURI;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-WyciwygChannelChild::GetURI(nsIURI** aURI) {
-  *aURI = mURI;
-  NS_IF_ADDREF(*aURI);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-WyciwygChannelChild::GetOwner(nsISupports** aOwner) {
-  NS_IF_ADDREF(*aOwner = mOwner);
-  return NS_OK;
-}
-NS_IMETHODIMP
-WyciwygChannelChild::SetOwner(nsISupports* aOwner) {
-  mOwner = aOwner;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-WyciwygChannelChild::GetLoadInfo(nsILoadInfo** aLoadInfo) {
-  NS_IF_ADDREF(*aLoadInfo = mLoadInfo);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-WyciwygChannelChild::SetLoadInfo(nsILoadInfo* aLoadInfo) {
-  mLoadInfo = aLoadInfo;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-WyciwygChannelChild::GetIsDocument(bool* aIsDocument) {
-  return NS_GetIsDocumentChannel(this, aIsDocument);
-}
-
-NS_IMETHODIMP
-WyciwygChannelChild::GetNotificationCallbacks(
-    nsIInterfaceRequestor** aCallbacks) {
-  *aCallbacks = mCallbacks;
-  NS_IF_ADDREF(*aCallbacks);
-  return NS_OK;
-}
-NS_IMETHODIMP
-WyciwygChannelChild::SetNotificationCallbacks(
-    nsIInterfaceRequestor* aCallbacks) {
-  if (!CanSetCallbacks(aCallbacks)) {
-    return NS_ERROR_FAILURE;
-  }
-
-  mCallbacks = aCallbacks;
-  NS_QueryNotificationCallbacks(mCallbacks, mLoadGroup,
-                                NS_GET_IID(nsIProgressEventSink),
-                                getter_AddRefs(mProgressSink));
-  UpdatePrivateBrowsing();
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-WyciwygChannelChild::GetSecurityInfo(nsISupports** aSecurityInfo) {
-  NS_IF_ADDREF(*aSecurityInfo = mSecurityInfo);
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-WyciwygChannelChild::GetContentType(nsACString& aContentType) {
-  aContentType.AssignLiteral(WYCIWYG_TYPE);
-  return NS_OK;
-}
-NS_IMETHODIMP
-WyciwygChannelChild::SetContentType(const nsACString& aContentType) {
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
-WyciwygChannelChild::GetContentCharset(nsACString& aContentCharset) {
-  aContentCharset.AssignLiteral("UTF-16LE");
-  return NS_OK;
-}
-NS_IMETHODIMP
-WyciwygChannelChild::SetContentCharset(const nsACString& aContentCharset) {
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
-WyciwygChannelChild::GetContentDisposition(uint32_t* aContentDisposition) {
-  return NS_ERROR_NOT_AVAILABLE;
-}
-
-NS_IMETHODIMP
-WyciwygChannelChild::SetContentDisposition(uint32_t aContentDisposition) {
-  return NS_ERROR_NOT_AVAILABLE;
-}
-
-NS_IMETHODIMP
-WyciwygChannelChild::GetContentDispositionFilename(
-    nsAString& aContentDispositionFilename) {
-  return NS_ERROR_NOT_AVAILABLE;
-}
-
-NS_IMETHODIMP
-WyciwygChannelChild::SetContentDispositionFilename(
-    const nsAString& aContentDispositionFilename) {
-  return NS_ERROR_NOT_AVAILABLE;
-}
-
-NS_IMETHODIMP
-WyciwygChannelChild::GetContentDispositionHeader(
-    nsACString& aContentDispositionHeader) {
-  return NS_ERROR_NOT_AVAILABLE;
-}
-
-NS_IMETHODIMP
-WyciwygChannelChild::GetContentLength(int64_t* aContentLength) {
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-NS_IMETHODIMP
-WyciwygChannelChild::SetContentLength(int64_t aContentLength) {
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
-WyciwygChannelChild::Open(nsIInputStream** aStream) {
-  nsCOMPtr<nsIStreamListener> listener;
-  nsresult rv =
-      nsContentSecurityManager::doContentSecurityCheck(this, listener);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-static mozilla::dom::TabChild* GetTabChild(nsIChannel* aChannel) {
-  nsCOMPtr<nsITabChild> iTabChild;
-  NS_QueryNotificationCallbacks(aChannel, iTabChild);
-  return iTabChild ? static_cast<mozilla::dom::TabChild*>(iTabChild.get())
-                   : nullptr;
-}
-
-NS_IMETHODIMP
-WyciwygChannelChild::AsyncOpen(nsIStreamListener* aListener) {
-  nsCOMPtr<nsIStreamListener> listener = aListener;
-  nsresult rv =
-      nsContentSecurityManager::doContentSecurityCheck(this, listener);
-  if (NS_FAILED(rv)) {
-    mCallbacks = nullptr;
-    return rv;
-  }
-  MOZ_ASSERT(
-      !mLoadInfo || mLoadInfo->GetSecurityMode() == 0 ||
-          mLoadInfo->GetInitialSecurityCheckDone() ||
-          (mLoadInfo->GetSecurityMode() ==
-               nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL &&
-           nsContentUtils::IsSystemPrincipal(mLoadInfo->LoadingPrincipal())),
-      "security flags in loadInfo but doContentSecurityCheck() not called");
-
-  LOG(("WyciwygChannelChild::AsyncOpen [this=%p]\n", this));
-
-  // The only places creating wyciwyg: channels should be
-  // HTMLDocument::OpenCommon and session history.  Both should be setting an
-  // owner or loadinfo.
-  MOZ_ASSERT(mOwner || mLoadInfo, "Must have a principal");
-  NS_ENSURE_STATE(mOwner || mLoadInfo);
-
-  NS_ENSURE_ARG_POINTER(aListener);
-  NS_ENSURE_TRUE(!mIsPending, NS_ERROR_IN_PROGRESS);
-
-  mListener = aListener;
-  mIsPending = true;
-
-  if (mLoadGroup) {
-    mLoadGroup->AddRequest(this, nullptr);
-  }
-
-  URIParams originalURI;
-  SerializeURI(mOriginalURI, originalURI);
-
-  mozilla::dom::TabChild* tabChild = GetTabChild(this);
-  if (MissingRequiredTabChild(tabChild, "wyciwyg")) {
-    mCallbacks = nullptr;
-    return NS_ERROR_ILLEGAL_VALUE;
-  }
-
-  PBrowserOrId browser = static_cast<ContentChild*>(Manager()->Manager())
-                             ->GetBrowserOrId(tabChild);
-
-  SendAsyncOpen(originalURI, mLoadFlags, IPC::SerializedLoadContext(this),
-                browser);
-
-  mSentAppData = true;
-  mState = WCC_OPENED;
-
-  return NS_OK;
-}
-
-//-----------------------------------------------------------------------------
-// nsIWyciwygChannel
-//-----------------------------------------------------------------------------
-
-NS_IMETHODIMP
-WyciwygChannelChild::WriteToCacheEntry(const nsAString& aData) {
-  NS_ENSURE_TRUE((mState == WCC_INIT) || (mState == WCC_ONWRITE),
-                 NS_ERROR_UNEXPECTED);
-
-  if (!mSentAppData) {
-    mozilla::dom::TabChild* tabChild = GetTabChild(this);
-
-    PBrowserOrId browser = static_cast<ContentChild*>(Manager()->Manager())
-                               ->GetBrowserOrId(tabChild);
-
-    SendAppData(IPC::SerializedLoadContext(this), browser);
-    mSentAppData = true;
-  }
-
-  mState = WCC_ONWRITE;
-
-  // Give ourselves a megabyte of headroom for the message size. Convert bytes
-  // to wide chars.
-  static const size_t kMaxMessageSize =
-      (IPC::Channel::kMaximumMessageSize - 1024) / 2;
-
-  size_t curIndex = 0;
-  size_t charsRemaining = aData.Length();
-  do {
-    size_t chunkSize = std::min(charsRemaining, kMaxMessageSize);
-    SendWriteToCacheEntry(Substring(aData, curIndex, chunkSize));
-
-    charsRemaining -= chunkSize;
-    curIndex += chunkSize;
-  } while (charsRemaining != 0);
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-WyciwygChannelChild::CloseCacheEntry(nsresult reason) {
-  NS_ENSURE_TRUE(mState == WCC_ONWRITE, NS_ERROR_UNEXPECTED);
-
-  SendCloseCacheEntry(reason);
-  mState = WCC_ONCLOSED;
-
-  if (mIPCOpen) PWyciwygChannelChild::Send__delete__(this);
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-WyciwygChannelChild::SetSecurityInfo(nsISupports* aSecurityInfo) {
-  mSecurityInfo = aSecurityInfo;
-
-  if (mSecurityInfo) {
-    nsCOMPtr<nsISerializable> serializable = do_QueryInterface(mSecurityInfo);
-    if (serializable) {
-      nsCString secInfoStr;
-      NS_SerializeToString(serializable, secInfoStr);
-      SendSetSecurityInfo(secInfoStr);
-    } else {
-      NS_WARNING("Can't serialize security info");
-    }
-  }
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-WyciwygChannelChild::SetCharsetAndSource(int32_t aSource,
-                                         const nsACString& aCharset) {
-  // mState == WCC_ONSTART when reading from the channel
-  // mState == WCC_INIT when writing to the cache
-  NS_ENSURE_TRUE((mState == WCC_ONSTART) || (mState == WCC_INIT),
-                 NS_ERROR_UNEXPECTED);
-
-  mCharsetSource = aSource;
-  mCharset = aCharset;
-
-  // TODO ensure that nsWyciwygChannel in the parent has still the cache entry
-  SendSetCharsetAndSource(mCharsetSource, mCharset);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-WyciwygChannelChild::GetCharsetAndSource(int32_t* aSource,
-                                         nsACString& _retval) {
-  NS_ENSURE_TRUE((mState == WCC_ONSTART) || (mState == WCC_ONDATA) ||
-                     (mState == WCC_ONSTOP),
-                 NS_ERROR_NOT_AVAILABLE);
-
-  if (mCharsetSource == kCharsetUninitialized) return NS_ERROR_NOT_AVAILABLE;
-
-  *aSource = mCharsetSource;
-  _retval = mCharset;
-  return NS_OK;
-}
-
-//------------------------------------------------------------------------------
-}  // namespace net
-}  // namespace mozilla
deleted file mode 100644
--- a/netwerk/protocol/wyciwyg/WyciwygChannelChild.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/* 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/. */
-
-#ifndef mozilla_net_WyciwygChannelChild_h
-#define mozilla_net_WyciwygChannelChild_h
-
-#include "mozilla/net/NeckoTargetHolder.h"
-#include "mozilla/net/PWyciwygChannelChild.h"
-#include "nsIWyciwygChannel.h"
-#include "nsIChannel.h"
-#include "nsILoadInfo.h"
-#include "PrivateBrowsingChannel.h"
-
-class nsIProgressEventSink;
-
-namespace mozilla {
-namespace net {
-
-class ChannelEventQueue;
-
-// TODO: replace with IPDL states
-enum WyciwygChannelChildState {
-  WCC_NEW,
-  WCC_INIT,
-
-  // States when reading from the channel
-  WCC_OPENED,
-  WCC_ONSTART,
-  WCC_ONDATA,
-  WCC_ONSTOP,
-
-  // States when writing to the cache
-  WCC_ONWRITE,
-  WCC_ONCLOSED
-};
-
-// Header file contents
-class WyciwygChannelChild final
-    : public PWyciwygChannelChild,
-      public nsIWyciwygChannel,
-      public PrivateBrowsingChannel<WyciwygChannelChild>,
-      public NeckoTargetHolder {
- public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSIREQUEST
-  NS_DECL_NSICHANNEL
-  NS_DECL_NSIWYCIWYGCHANNEL
-
-  explicit WyciwygChannelChild(nsIEventTarget* aNeckoTarget);
-
-  void AddIPDLReference();
-  void ReleaseIPDLReference();
-
-  nsresult Init(nsIURI* uri);
-
-  bool IsSuspended();
-
- protected:
-  virtual ~WyciwygChannelChild();
-
-  mozilla::ipc::IPCResult RecvOnStartRequest(
-      const nsresult& statusCode, const int64_t& contentLength,
-      const int32_t& source, const nsCString& charset,
-      const nsCString& securityInfo) override;
-  mozilla::ipc::IPCResult RecvOnDataAvailable(const nsCString& data,
-                                              const uint64_t& offset) override;
-  mozilla::ipc::IPCResult RecvOnStopRequest(
-      const nsresult& statusCode) override;
-  mozilla::ipc::IPCResult RecvCancelEarly(const nsresult& statusCode) override;
-
-  void OnStartRequest(const nsresult& statusCode, const int64_t& contentLength,
-                      const int32_t& source, const nsCString& charset,
-                      const nsCString& securityInfo);
-  void OnDataAvailable(const nsCString& data, const uint64_t& offset);
-  void OnStopRequest(const nsresult& statusCode);
-  void CancelEarly(const nsresult& statusCode);
-
-  friend class PrivateBrowsingChannel<WyciwygChannelChild>;
-
- private:
-  nsresult mStatus;
-  bool mIsPending;
-  bool mCanceled;
-  uint32_t mLoadFlags;
-  int64_t mContentLength;
-  int32_t mCharsetSource;
-  nsCString mCharset;
-  nsCOMPtr<nsIURI> mURI;
-  nsCOMPtr<nsIURI> mOriginalURI;
-  nsCOMPtr<nsISupports> mOwner;
-  nsCOMPtr<nsILoadInfo> mLoadInfo;
-  nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
-  nsCOMPtr<nsIProgressEventSink> mProgressSink;
-  nsCOMPtr<nsILoadGroup> mLoadGroup;
-  nsCOMPtr<nsIStreamListener> mListener;
-  nsCOMPtr<nsISupports> mSecurityInfo;
-
-  // FIXME: replace with IPDL states (bug 536319)
-  enum WyciwygChannelChildState mState;
-
-  bool mIPCOpen;
-  bool mSentAppData;
-  RefPtr<ChannelEventQueue> mEventQ;
-
-  friend class WyciwygStartRequestEvent;
-  friend class WyciwygDataAvailableEvent;
-  friend class WyciwygStopRequestEvent;
-  friend class WyciwygCancelEvent;
-  friend class NeckoTargetChannelEvent<WyciwygChannelChild>;
-};
-
-inline bool WyciwygChannelChild::IsSuspended() { return false; }
-
-}  // namespace net
-}  // namespace mozilla
-
-#endif  // mozilla_net_WyciwygChannelChild_h
deleted file mode 100644
--- a/netwerk/protocol/wyciwyg/WyciwygChannelParent.cpp
+++ /dev/null
@@ -1,382 +0,0 @@
-/* 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 "nsWyciwyg.h"
-
-#include "mozilla/net/WyciwygChannelParent.h"
-#include "nsWyciwygChannel.h"
-#include "nsNetUtil.h"
-#include "nsCharsetSource.h"
-#include "nsISerializable.h"
-#include "nsSerializationHelper.h"
-#include "mozilla/ipc/URIUtils.h"
-#include "mozilla/net/NeckoParent.h"
-#include "SerializedLoadContext.h"
-#include "nsIContentPolicy.h"
-#include "mozilla/ipc/BackgroundUtils.h"
-#include "mozilla/dom/ContentParent.h"
-
-using namespace mozilla::ipc;
-
-namespace mozilla {
-namespace net {
-
-WyciwygChannelParent::WyciwygChannelParent()
-    : mIPCClosed(false), mReceivedAppData(false) {}
-
-void WyciwygChannelParent::ActorDestroy(ActorDestroyReason why) {
-  // We may still have refcount>0 if the channel hasn't called OnStopRequest
-  // yet, but we must not send any more msgs to child.
-  mIPCClosed = true;
-
-  // We need to force the cycle to break here
-  if (mChannel) {
-    mChannel->SetNotificationCallbacks(nullptr);
-  }
-}
-
-//-----------------------------------------------------------------------------
-// WyciwygChannelParent::nsISupports
-//-----------------------------------------------------------------------------
-
-NS_IMPL_ISUPPORTS(WyciwygChannelParent, nsIStreamListener,
-                  nsIInterfaceRequestor, nsIRequestObserver)
-
-//-----------------------------------------------------------------------------
-// WyciwygChannelParent::PWyciwygChannelParent
-//-----------------------------------------------------------------------------
-
-mozilla::ipc::IPCResult WyciwygChannelParent::RecvInit(
-    const URIParams& aURI, const ipc::PrincipalInfo& aRequestingPrincipalInfo,
-    const ipc::PrincipalInfo& aTriggeringPrincipalInfo,
-    const ipc::PrincipalInfo& aPrincipalToInheritInfo,
-    const uint32_t& aSecurityFlags, const uint32_t& aContentPolicyType) {
-  nsresult rv;
-
-  nsCOMPtr<nsIURI> uri = DeserializeURI(aURI);
-  if (!uri) return IPC_FAIL_NO_REASON(this);
-
-  LOG(("WyciwygChannelParent RecvInit [this=%p uri=%s]\n", this,
-       uri->GetSpecOrDefault().get()));
-
-  nsCOMPtr<nsIIOService> ios(do_GetIOService(&rv));
-  if (NS_FAILED(rv)) {
-    if (!SendCancelEarly(rv)) {
-      return IPC_FAIL_NO_REASON(this);
-    }
-    return IPC_OK();
-  }
-
-  nsCOMPtr<nsIPrincipal> requestingPrincipal =
-      mozilla::ipc::PrincipalInfoToPrincipal(aRequestingPrincipalInfo, &rv);
-  if (NS_FAILED(rv)) {
-    if (!SendCancelEarly(rv)) {
-      return IPC_FAIL_NO_REASON(this);
-    }
-    return IPC_OK();
-  }
-
-  nsCOMPtr<nsIPrincipal> triggeringPrincipal =
-      mozilla::ipc::PrincipalInfoToPrincipal(aTriggeringPrincipalInfo, &rv);
-  if (NS_FAILED(rv)) {
-    if (!SendCancelEarly(rv)) {
-      return IPC_FAIL_NO_REASON(this);
-    }
-    return IPC_OK();
-  }
-
-  nsCOMPtr<nsIPrincipal> principalToInherit =
-      mozilla::ipc::PrincipalInfoToPrincipal(aPrincipalToInheritInfo, &rv);
-  if (NS_FAILED(rv)) {
-    if (!SendCancelEarly(rv)) {
-      return IPC_FAIL_NO_REASON(this);
-    }
-    return IPC_OK();
-  }
-
-  nsCOMPtr<nsIChannel> chan;
-  rv = NS_NewChannelWithTriggeringPrincipal(
-      getter_AddRefs(chan), uri, requestingPrincipal, triggeringPrincipal,
-      aSecurityFlags, aContentPolicyType,
-      nullptr,  // PerformanceStorage
-      nullptr,  // loadGroup
-      nullptr,  // aCallbacks
-      nsIRequest::LOAD_NORMAL, ios);
-
-  if (NS_FAILED(rv)) {
-    if (!SendCancelEarly(rv)) {
-      return IPC_FAIL_NO_REASON(this);
-    }
-    return IPC_OK();
-  }
-
-  nsCOMPtr<nsILoadInfo> loadInfo = chan->LoadInfo();
-  rv = loadInfo->SetPrincipalToInherit(principalToInherit);
-  if (NS_FAILED(rv)) {
-    if (!SendCancelEarly(rv)) {
-      return IPC_FAIL_NO_REASON(this);
-    }
-    return IPC_OK();
-  }
-
-  mChannel = do_QueryInterface(chan, &rv);
-  if (NS_FAILED(rv)) {
-    if (!SendCancelEarly(rv)) {
-      return IPC_FAIL_NO_REASON(this);
-    }
-    return IPC_OK();
-  }
-
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult WyciwygChannelParent::RecvAppData(
-    const IPC::SerializedLoadContext& loadContext, const PBrowserOrId& parent) {
-  LOG(("WyciwygChannelParent RecvAppData [this=%p]\n", this));
-
-  if (!SetupAppData(loadContext, parent)) return IPC_FAIL_NO_REASON(this);
-
-  if (!mChannel) {
-    return IPC_FAIL(this, "Should have a channel");
-  }
-
-  mChannel->SetNotificationCallbacks(this);
-  return IPC_OK();
-}
-
-bool WyciwygChannelParent::SetupAppData(
-    const IPC::SerializedLoadContext& loadContext,
-    const PBrowserOrId& aParent) {
-  if (!mChannel) return true;
-
-  const char* error = NeckoParent::CreateChannelLoadContext(
-      aParent, Manager()->Manager(), loadContext, nullptr, mLoadContext);
-  if (error) {
-    printf_stderr("WyciwygChannelParent::SetupAppData: FATAL ERROR: %s\n",
-                  error);
-    return false;
-  }
-
-  if (!mLoadContext && loadContext.IsPrivateBitValid()) {
-    nsCOMPtr<nsIPrivateBrowsingChannel> pbChannel = do_QueryInterface(mChannel);
-    if (pbChannel)
-      pbChannel->SetPrivate(loadContext.mOriginAttributes.mPrivateBrowsingId >
-                            0);
-  }
-
-  mReceivedAppData = true;
-  return true;
-}
-
-mozilla::ipc::IPCResult WyciwygChannelParent::RecvAsyncOpen(
-    const URIParams& aOriginal, const uint32_t& aLoadFlags,
-    const IPC::SerializedLoadContext& loadContext,
-    const PBrowserOrId& aParent) {
-  nsCOMPtr<nsIURI> original = DeserializeURI(aOriginal);
-  if (!original) return IPC_FAIL_NO_REASON(this);
-
-  LOG(("WyciwygChannelParent RecvAsyncOpen [this=%p]\n", this));
-
-  if (!mChannel) return IPC_OK();
-
-  nsresult rv;
-
-  rv = mChannel->SetOriginalURI(original);
-  if (NS_FAILED(rv)) {
-    if (!SendCancelEarly(rv)) {
-      return IPC_FAIL_NO_REASON(this);
-    }
-    return IPC_OK();
-  }
-
-  rv = mChannel->SetLoadFlags(aLoadFlags);
-  if (NS_FAILED(rv)) {
-    if (!SendCancelEarly(rv)) {
-      return IPC_FAIL_NO_REASON(this);
-    }
-    return IPC_OK();
-  }
-
-  if (!mReceivedAppData && !SetupAppData(loadContext, aParent)) {
-    return IPC_FAIL_NO_REASON(this);
-  }
-
-  rv = mChannel->SetNotificationCallbacks(this);
-  if (NS_FAILED(rv)) {
-    if (!SendCancelEarly(rv)) {
-      return IPC_FAIL_NO_REASON(this);
-    }
-    return IPC_OK();
-  }
-
-  nsCOMPtr<nsILoadInfo> loadInfo = mChannel->LoadInfo();
-  rv = mChannel->AsyncOpen(this);
-
-  if (NS_FAILED(rv)) {
-    if (!SendCancelEarly(rv)) {
-      return IPC_FAIL_NO_REASON(this);
-    }
-    return IPC_OK();
-  }
-
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult WyciwygChannelParent::RecvWriteToCacheEntry(
-    const nsDependentSubstring& data) {
-  if (!mReceivedAppData) {
-    printf_stderr(
-        "WyciwygChannelParent::RecvWriteToCacheEntry: FATAL ERROR: didn't "
-        "receive app data\n");
-    return IPC_FAIL_NO_REASON(this);
-  }
-
-  if (mChannel) mChannel->WriteToCacheEntry(data);
-
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult WyciwygChannelParent::RecvCloseCacheEntry(
-    const nsresult& reason) {
-  if (mChannel) {
-    mChannel->CloseCacheEntry(reason);
-  }
-
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult WyciwygChannelParent::RecvSetCharsetAndSource(
-    const int32_t& aCharsetSource, const nsCString& aCharset) {
-  if (mChannel) mChannel->SetCharsetAndSource(aCharsetSource, aCharset);
-
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult WyciwygChannelParent::RecvSetSecurityInfo(
-    const nsCString& aSecurityInfo) {
-  nsresult rv;
-  if (mChannel) {
-    nsCOMPtr<nsISupports> securityInfo;
-    rv = NS_DeserializeObject(aSecurityInfo, getter_AddRefs(securityInfo));
-    MOZ_DIAGNOSTIC_ASSERT(NS_SUCCEEDED(rv),
-                          "Deserializing security info should not fail");
-    Unused << rv;  // So we don't get an unused error in release builds.
-    mChannel->SetSecurityInfo(securityInfo);
-  }
-
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult WyciwygChannelParent::RecvCancel(
-    const nsresult& aStatusCode) {
-  if (mChannel) mChannel->Cancel(aStatusCode);
-  return IPC_OK();
-}
-
-//-----------------------------------------------------------------------------
-// WyciwygChannelParent::nsIRequestObserver
-//-----------------------------------------------------------------------------
-
-NS_IMETHODIMP
-WyciwygChannelParent::OnStartRequest(nsIRequest* aRequest) {
-  LOG(("WyciwygChannelParent::OnStartRequest [this=%p]\n", this));
-
-  nsresult rv;
-
-  nsCOMPtr<nsIWyciwygChannel> chan = do_QueryInterface(aRequest, &rv);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  // Send down any permissions which are relevant to this URL if we are
-  // performing a document load.
-  if (!mIPCClosed) {
-    PContentParent* pcp = Manager()->Manager();
-    MOZ_ASSERT(pcp, "We should have a manager if our IPC isn't closed");
-    rv = static_cast<ContentParent*>(pcp)
-             ->AboutToLoadHttpFtpWyciwygDocumentForChild(chan);
-    MOZ_ASSERT(NS_SUCCEEDED(rv));
-  }
-
-  nsresult status;
-  chan->GetStatus(&status);
-
-  int64_t contentLength = -1;
-  chan->GetContentLength(&contentLength);
-
-  int32_t charsetSource = kCharsetUninitialized;
-  nsAutoCString charset;
-  chan->GetCharsetAndSource(&charsetSource, charset);
-
-  nsCOMPtr<nsISupports> securityInfo;
-  chan->GetSecurityInfo(getter_AddRefs(securityInfo));
-  nsCString secInfoStr;
-  if (securityInfo) {
-    nsCOMPtr<nsISerializable> serializable = do_QueryInterface(securityInfo);
-    if (serializable)
-      NS_SerializeToString(serializable, secInfoStr);
-    else {
-      NS_ERROR("Can't serialize security info");
-      return NS_ERROR_UNEXPECTED;
-    }
-  }
-
-  if (mIPCClosed || !SendOnStartRequest(status, contentLength, charsetSource,
-                                        charset, secInfoStr)) {
-    return NS_ERROR_UNEXPECTED;
-  }
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-WyciwygChannelParent::OnStopRequest(nsIRequest* aRequest,
-                                    nsresult aStatusCode) {
-  LOG(("WyciwygChannelParent::OnStopRequest: [this=%p status=%" PRIu32 "]\n",
-       this, static_cast<uint32_t>(aStatusCode)));
-
-  if (mIPCClosed || !SendOnStopRequest(aStatusCode)) {
-    return NS_ERROR_UNEXPECTED;
-  }
-
-  return NS_OK;
-}
-
-//-----------------------------------------------------------------------------
-// WyciwygChannelParent::nsIStreamListener
-//-----------------------------------------------------------------------------
-
-NS_IMETHODIMP
-WyciwygChannelParent::OnDataAvailable(nsIRequest* aRequest,
-                                      nsIInputStream* aInputStream,
-                                      uint64_t aOffset, uint32_t aCount) {
-  LOG(("WyciwygChannelParent::OnDataAvailable [this=%p]\n", this));
-
-  nsCString data;
-  nsresult rv = NS_ReadInputStreamToString(aInputStream, data, aCount);
-  if (NS_FAILED(rv)) return rv;
-
-  if (mIPCClosed || !SendOnDataAvailable(data, aOffset)) {
-    return NS_ERROR_UNEXPECTED;
-  }
-
-  return NS_OK;
-}
-
-//-----------------------------------------------------------------------------
-// WyciwygChannelParent::nsIInterfaceRequestor
-//-----------------------------------------------------------------------------
-
-NS_IMETHODIMP
-WyciwygChannelParent::GetInterface(const nsIID& uuid, void** result) {
-  // Only support nsILoadContext if child channel's callbacks did too
-  if (uuid.Equals(NS_GET_IID(nsILoadContext)) && mLoadContext) {
-    nsCOMPtr<nsILoadContext> copy = mLoadContext;
-    copy.forget(result);
-    return NS_OK;
-  }
-
-  return QueryInterface(uuid, result);
-}
-
-}  // namespace net
-}  // namespace mozilla
deleted file mode 100644
--- a/netwerk/protocol/wyciwyg/WyciwygChannelParent.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* 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/. */
-
-#ifndef mozilla_net_WyciwygChannelParent_h
-#define mozilla_net_WyciwygChannelParent_h
-
-#include "mozilla/net/PWyciwygChannelParent.h"
-#include "mozilla/net/NeckoCommon.h"
-#include "nsIStreamListener.h"
-
-#include "nsIWyciwygChannel.h"
-#include "nsIInterfaceRequestor.h"
-#include "nsILoadContext.h"
-
-namespace mozilla {
-namespace dom {
-class PBrowserParent;
-}  // namespace dom
-
-namespace net {
-
-class WyciwygChannelParent : public PWyciwygChannelParent,
-                             public nsIStreamListener,
-                             public nsIInterfaceRequestor {
-  friend class PWyciwygChannelParent;
-
- public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSIREQUESTOBSERVER
-  NS_DECL_NSISTREAMLISTENER
-  NS_DECL_NSIINTERFACEREQUESTOR
-
-  WyciwygChannelParent();
-
- protected:
-  virtual ~WyciwygChannelParent() = default;
-
-  mozilla::ipc::IPCResult RecvInit(
-      const URIParams& uri, const ipc::PrincipalInfo& aRequestingPrincipalInfo,
-      const ipc::PrincipalInfo& aTriggeringPrincipalInfo,
-      const ipc::PrincipalInfo& aPrincipalToInheritInfo,
-      const uint32_t& aSecurityFlags, const uint32_t& aContentPolicyType);
-  mozilla::ipc::IPCResult RecvAsyncOpen(
-      const URIParams& original, const uint32_t& loadFlags,
-      const IPC::SerializedLoadContext& loadContext,
-      const PBrowserOrId& parent);
-  mozilla::ipc::IPCResult RecvWriteToCacheEntry(
-      const nsDependentSubstring& data);
-  mozilla::ipc::IPCResult RecvCloseCacheEntry(const nsresult& reason);
-  mozilla::ipc::IPCResult RecvSetCharsetAndSource(const int32_t& source,
-                                                  const nsCString& charset);
-  mozilla::ipc::IPCResult RecvSetSecurityInfo(const nsCString& securityInfo);
-  mozilla::ipc::IPCResult RecvCancel(const nsresult& statusCode);
-  mozilla::ipc::IPCResult RecvAppData(
-      const IPC::SerializedLoadContext& loadContext,
-      const PBrowserOrId& parent);
-
-  virtual void ActorDestroy(ActorDestroyReason why) override;
-
-  bool SetupAppData(const IPC::SerializedLoadContext& loadContext,
-                    const PBrowserOrId& aParent);
-
-  nsCOMPtr<nsIWyciwygChannel> mChannel;
-  bool mIPCClosed;
-  bool mReceivedAppData;
-  nsCOMPtr<nsILoadContext> mLoadContext;
-};
-
-}  // namespace net
-}  // namespace mozilla
-
-#endif  // mozilla_net_WyciwygChannelParent_h
deleted file mode 100644
--- a/netwerk/protocol/wyciwyg/moz.build
+++ /dev/null
@@ -1,36 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
-XPIDL_SOURCES += [
-    'nsIWyciwygChannel.idl',
-]
-
-XPIDL_MODULE = 'necko_wyciwyg'
-
-EXPORTS.mozilla.net += [
-    'WyciwygChannelChild.h',
-    'WyciwygChannelParent.h',
-]
-
-UNIFIED_SOURCES += [
-    'nsWyciwyg.cpp',
-    'nsWyciwygChannel.cpp',
-    'nsWyciwygProtocolHandler.cpp',
-    'WyciwygChannelChild.cpp',
-    'WyciwygChannelParent.cpp',
-]
-
-IPDL_SOURCES += [
-    'PWyciwygChannel.ipdl',
-]
-
-include('/ipc/chromium/chromium-config.mozbuild')
-
-FINAL_LIBRARY = 'xul'
-
-LOCAL_INCLUDES += [
-    '/netwerk/base',
-]
deleted file mode 100644
--- a/netwerk/protocol/wyciwyg/nsIWyciwygChannel.idl
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; 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 "nsIChannel.idl"
-
-/**
- * A channel to  manage all cache-related interactions for layout
- * when it is dealing with dynamic pages created through 
- * document.write(). This interface provides methods that will
- * help layout save dynamic pages in cache for future retrievals.
- */
-
-[scriptable, uuid (8b8f3341-46da-40f5-a16f-41a91f5d25dd)]
-interface nsIWyciwygChannel : nsIChannel
-{
-  /**
-   * Append data to the cache entry; opens the cache entry if necessary.
-   */
-  void writeToCacheEntry(in AString aData);
-
-  /**
-   * Close the cache entry; subsequent writes have undefined behavior.
-   */
-  void closeCacheEntry(in nsresult reason);
-
-  /**
-   * Set the wyciwyg channels security info
-   */
-  void setSecurityInfo(in nsISupports aSecurityInfo);
-
-  /**
-   * Store and read a charset and charset source on the wyciwyg channel.  These
-   * are opaque values to the channel; consumers who set them should know what
-   * they mean.
-   */
-  void setCharsetAndSource(in long aSource, in ACString aCharset);
-  /**
-   * The return value is the charset.  Throws if either the charset or the
-   * source cannot be retrieved.  This is guaranteed to return a nonzero source
-   * and a nonempty charset if it does not throw.
-   */
-  ACString getCharsetAndSource(out long aSource);
-};
deleted file mode 100644
--- a/netwerk/protocol/wyciwyg/nsWyciwyg.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-/* 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 "nsWyciwyg.h"
-#include "nscore.h"
-
-mozilla::LazyLogModule gWyciwygLog("nsWyciwygChannel");
deleted file mode 100644
--- a/netwerk/protocol/wyciwyg/nsWyciwyg.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* 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/. */
-
-#ifndef nsWyciwyg_h__
-#define nsWyciwyg_h__
-
-#include "mozilla/net/NeckoChild.h"
-
-// Get rid of chromium's LOG.
-#undef LOG
-
-#include "mozilla/Logging.h"
-
-//
-// Log module for HTTP Protocol logging...
-//
-// To enable logging (see prlog.h for full details):
-//
-//    set MOZ_LOG=nsWyciwyg:5
-//    set MOZ_LOG_FILE=wyciwyg.log
-//
-// This enables LogLevel::Debug level information and places all output in
-// the file wyciwyg.log.
-//
-extern mozilla::LazyLogModule gWyciwygLog;
-
-// http logging
-#define LOG1(args) MOZ_LOG(gWyciwygLog, mozilla::LogLevel::Error, args)
-#define LOG2(args) MOZ_LOG(gWyciwygLog, mozilla::LogLevel::Warning, args)
-#define LOG3(args) MOZ_LOG(gWyciwygLog, mozilla::LogLevel::Info, args)
-#define LOG4(args) MOZ_LOG(gWyciwygLog, mozilla::LogLevel::Debug, args)
-#define LOG(args) LOG4(args)
-
-#define LOG1_ENABLED() MOZ_LOG_TEST(gWyciwygLog, mozilla::LogLevel::Error)
-#define LOG2_ENABLED() MOZ_LOG_TEST(gWyciwygLog, mozilla::LogLevel::Warning)
-#define LOG3_ENABLED() MOZ_LOG_TEST(gWyciwygLog, mozilla::LogLevel::Info)
-#define LOG4_ENABLED() MOZ_LOG_TEST(gWyciwygLog, mozilla::LogLevel::Debug)
-#define LOG_ENABLED() LOG4_ENABLED()
-
-#define WYCIWYG_TYPE "text/html"
-
-#endif  // nsWyciwyg_h__
deleted file mode 100644
--- a/netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp
+++ /dev/null
@@ -1,733 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; 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 "nsWyciwyg.h"
-#include "nsWyciwygChannel.h"
-#include "nsILoadGroup.h"
-#include "nsNetUtil.h"
-#include "nsNetCID.h"
-#include "LoadContextInfo.h"
-#include "nsICacheService.h"  // only to initialize
-#include "nsICacheStorageService.h"
-#include "nsICacheStorage.h"
-#include "nsICacheEntry.h"
-#include "nsCharsetSource.h"
-#include "nsProxyRelease.h"
-#include "nsThreadUtils.h"
-#include "nsIInputStream.h"
-#include "nsIInputStreamPump.h"
-#include "nsIOutputStream.h"
-#include "nsIProgressEventSink.h"
-#include "nsIURI.h"
-#include "mozilla/DebugOnly.h"
-#include "mozilla/Unused.h"
-#include "mozilla/BasePrincipal.h"
-#include "nsProxyRelease.h"
-#include "nsContentSecurityManager.h"
-#include "nsContentUtils.h"
-
-typedef mozilla::net::LoadContextInfo LoadContextInfo;
-
-// nsWyciwygChannel methods
-nsWyciwygChannel::nsWyciwygChannel()
-    : mMode(NONE),
-      mStatus(NS_OK),
-      mIsPending(false),
-      mNeedToWriteCharset(false),
-      mCharsetSource(kCharsetUninitialized),
-      mContentLength(-1),
-      mLoadFlags(LOAD_NORMAL),
-      mNeedToSetSecurityInfo(false) {}
-
-nsWyciwygChannel::~nsWyciwygChannel() {
-  if (mLoadInfo) {
-    NS_ReleaseOnMainThreadSystemGroup("nsWyciwygChannel::mLoadInfo",
-                                      mLoadInfo.forget(), false);
-  }
-}
-
-NS_IMPL_ISUPPORTS(nsWyciwygChannel, nsIChannel, nsIRequest, nsIStreamListener,
-                  nsIRequestObserver, nsICacheEntryOpenCallback,
-                  nsIWyciwygChannel, nsIPrivateBrowsingChannel)
-
-nsresult nsWyciwygChannel::Init(nsIURI *uri) {
-  NS_ENSURE_ARG_POINTER(uri);
-
-  mURI = uri;
-  mOriginalURI = uri;
-
-  return NS_OK;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// nsIRequest methods:
-///////////////////////////////////////////////////////////////////////////////
-
-NS_IMETHODIMP
-nsWyciwygChannel::GetName(nsACString &aName) { return mURI->GetSpec(aName); }
-
-NS_IMETHODIMP
-nsWyciwygChannel::IsPending(bool *aIsPending) {
-  *aIsPending = mIsPending;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::GetStatus(nsresult *aStatus) {
-  if (NS_SUCCEEDED(mStatus) && mPump)
-    mPump->GetStatus(aStatus);
-  else
-    *aStatus = mStatus;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::Cancel(nsresult status) {
-  mStatus = status;
-  if (mPump) mPump->Cancel(status);
-  // else we're waiting for OnCacheEntryAvailable
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::Suspend() {
-  if (mPump) mPump->Suspend();
-  // XXX else, we'll ignore this ... and that's probably bad!
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::Resume() {
-  if (mPump) mPump->Resume();
-  // XXX else, we'll ignore this ... and that's probably bad!
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::GetLoadGroup(nsILoadGroup **aLoadGroup) {
-  *aLoadGroup = mLoadGroup;
-  NS_IF_ADDREF(*aLoadGroup);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::SetLoadGroup(nsILoadGroup *aLoadGroup) {
-  if (!CanSetLoadGroup(aLoadGroup)) {
-    return NS_ERROR_FAILURE;
-  }
-
-  mLoadGroup = aLoadGroup;
-  NS_QueryNotificationCallbacks(mCallbacks, mLoadGroup,
-                                NS_GET_IID(nsIProgressEventSink),
-                                getter_AddRefs(mProgressSink));
-  UpdatePrivateBrowsing();
-  NS_GetOriginAttributes(this, mOriginAttributes);
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::SetLoadFlags(uint32_t aLoadFlags) {
-  mLoadFlags = aLoadFlags;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::GetLoadFlags(uint32_t *aLoadFlags) {
-  *aLoadFlags = mLoadFlags;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::GetIsDocument(bool *aIsDocument) {
-  return NS_GetIsDocumentChannel(this, aIsDocument);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// nsIChannel methods:
-///////////////////////////////////////////////////////////////////////////////
-
-NS_IMETHODIMP
-nsWyciwygChannel::GetOriginalURI(nsIURI **aURI) {
-  *aURI = mOriginalURI;
-  NS_ADDREF(*aURI);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::SetOriginalURI(nsIURI *aURI) {
-  NS_ENSURE_ARG_POINTER(aURI);
-  mOriginalURI = aURI;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::GetURI(nsIURI **aURI) {
-  *aURI = mURI;
-  NS_IF_ADDREF(*aURI);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::GetOwner(nsISupports **aOwner) {
-  NS_IF_ADDREF(*aOwner = mOwner);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::SetOwner(nsISupports *aOwner) {
-  mOwner = aOwner;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::GetLoadInfo(nsILoadInfo **aLoadInfo) {
-  NS_IF_ADDREF(*aLoadInfo = mLoadInfo);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::SetLoadInfo(nsILoadInfo *aLoadInfo) {
-  mLoadInfo = aLoadInfo;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::GetNotificationCallbacks(nsIInterfaceRequestor **aCallbacks) {
-  *aCallbacks = mCallbacks.get();
-  NS_IF_ADDREF(*aCallbacks);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::SetNotificationCallbacks(
-    nsIInterfaceRequestor *aNotificationCallbacks) {
-  if (!CanSetCallbacks(aNotificationCallbacks)) {
-    return NS_ERROR_FAILURE;
-  }
-
-  mCallbacks = aNotificationCallbacks;
-  NS_QueryNotificationCallbacks(mCallbacks, mLoadGroup,
-                                NS_GET_IID(nsIProgressEventSink),
-                                getter_AddRefs(mProgressSink));
-
-  UpdatePrivateBrowsing();
-  NS_GetOriginAttributes(this, mOriginAttributes);
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::GetSecurityInfo(nsISupports **aSecurityInfo) {
-  NS_IF_ADDREF(*aSecurityInfo = mSecurityInfo);
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::GetContentType(nsACString &aContentType) {
-  aContentType.AssignLiteral(WYCIWYG_TYPE);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::SetContentType(const nsACString &aContentType) {
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::GetContentCharset(nsACString &aContentCharset) {
-  aContentCharset.AssignLiteral("UTF-16LE");
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::SetContentCharset(const nsACString &aContentCharset) {
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::GetContentDisposition(uint32_t *aContentDisposition) {
-  return NS_ERROR_NOT_AVAILABLE;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::SetContentDisposition(uint32_t aContentDisposition) {
-  return NS_ERROR_NOT_AVAILABLE;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::GetContentDispositionFilename(
-    nsAString &aContentDispositionFilename) {
-  return NS_ERROR_NOT_AVAILABLE;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::SetContentDispositionFilename(
-    const nsAString &aContentDispositionFilename) {
-  return NS_ERROR_NOT_AVAILABLE;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::GetContentDispositionHeader(
-    nsACString &aContentDispositionHeader) {
-  return NS_ERROR_NOT_AVAILABLE;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::GetContentLength(int64_t *aContentLength) {
-  *aContentLength = mContentLength;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::SetContentLength(int64_t aContentLength) {
-  mContentLength = aContentLength;
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::Open(nsIInputStream **aStream) {
-  nsCOMPtr<nsIStreamListener> listener;
-  nsresult rv =
-      nsContentSecurityManager::doContentSecurityCheck(this, listener);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::AsyncOpen(nsIStreamListener *aListener) {
-  nsCOMPtr<nsIStreamListener> listener = aListener;
-  nsresult rv =
-      nsContentSecurityManager::doContentSecurityCheck(this, listener);
-  if (NS_FAILED(rv)) {
-    mIsPending = false;
-    mCallbacks = nullptr;
-    return rv;
-  }
-
-  LOG(("nsWyciwygChannel::AsyncOpen [this=%p]\n", this));
-  MOZ_ASSERT(mMode == NONE, "nsWyciwygChannel already open");
-
-  NS_ENSURE_TRUE(!mIsPending, NS_ERROR_IN_PROGRESS);
-  NS_ENSURE_TRUE(mMode == NONE, NS_ERROR_IN_PROGRESS);
-  NS_ENSURE_ARG_POINTER(listener);
-
-  mMode = READING;
-
-  // open a cache entry for this channel...
-  // mIsPending set to true since OnCacheEntryAvailable may be called
-  // synchronously and fails when mIsPending found false.
-  mIsPending = true;
-  rv = OpenCacheEntryForReading(mURI);
-  if (NS_FAILED(rv)) {
-    LOG(("nsWyciwygChannel::OpenCacheEntryForReading failed [rv=%" PRIx32 "]\n",
-         static_cast<uint32_t>(rv)));
-    mIsPending = false;
-    mCallbacks = nullptr;
-    return rv;
-  }
-
-  // There is no code path that would invoke the listener sooner than
-  // we get to this line in case OnCacheEntryAvailable is invoked
-  // synchronously.
-  mListener = listener;
-
-  if (mLoadGroup) mLoadGroup->AddRequest(this, nullptr);
-
-  return NS_OK;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// nsIWyciwygChannel
-//////////////////////////////////////////////////////////////////////////////
-
-NS_IMETHODIMP
-nsWyciwygChannel::WriteToCacheEntry(const nsAString &aData) {
-  LOG(("nsWyciwygChannel::WriteToCacheEntry [this=%p]", this));
-
-  nsresult rv;
-
-  if (mMode == READING) {
-    LOG(("nsWyciwygChannel::WriteToCacheEntry already open for reading"));
-    MOZ_ASSERT(false);
-    return NS_ERROR_UNEXPECTED;
-  }
-
-  mMode = WRITING;
-
-  if (!mCacheEntry) {
-    nsresult rv = OpenCacheEntryForWriting(mURI);
-    if (NS_FAILED(rv) || !mCacheEntry) {
-      LOG(("  could not synchronously open cache entry for write!"));
-      return NS_ERROR_FAILURE;
-    }
-  }
-
-  if (mLoadFlags & INHIBIT_PERSISTENT_CACHING) {
-    rv = mCacheEntry->SetMetaDataElement("inhibit-persistent-caching", "1");
-    if (NS_FAILED(rv)) return rv;
-  }
-
-  if (mNeedToSetSecurityInfo) {
-    mCacheEntry->SetSecurityInfo(mSecurityInfo);
-    mNeedToSetSecurityInfo = false;
-  }
-
-  if (mNeedToWriteCharset) {
-    WriteCharsetAndSourceToCache(mCharsetSource, mCharset);
-    mNeedToWriteCharset = false;
-  }
-
-  uint32_t out;
-  if (!mCacheOutputStream) {
-    // Get the outputstream from the cache entry.
-    rv = mCacheEntry->OpenOutputStream(0, -1,
-                                       getter_AddRefs(mCacheOutputStream));
-    if (NS_FAILED(rv)) return rv;
-
-    // Write out a Byte Order Mark, so that we'll know if the data is
-    // BE or LE when we go to read it.
-    char16_t bom = 0xFEFF;
-    rv = mCacheOutputStream->Write((char *)&bom, sizeof(bom), &out);
-    if (NS_FAILED(rv)) return rv;
-  }
-
-  return mCacheOutputStream->Write((const char *)PromiseFlatString(aData).get(),
-                                   aData.Length() * sizeof(char16_t), &out);
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::CloseCacheEntry(nsresult reason) {
-  if (mCacheEntry) {
-    LOG(("nsWyciwygChannel::CloseCacheEntry [this=%p ]", this));
-    mCacheOutputStream = nullptr;
-
-    if (NS_FAILED(reason)) {
-      mCacheEntry->AsyncDoom(nullptr);
-    }
-
-    mCacheEntry = nullptr;
-  }
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::SetSecurityInfo(nsISupports *aSecurityInfo) {
-  if (mMode == READING) {
-    MOZ_ASSERT(false);
-    return NS_ERROR_UNEXPECTED;
-  }
-
-  mSecurityInfo = aSecurityInfo;
-
-  if (mCacheEntry) {
-    return mCacheEntry->SetSecurityInfo(mSecurityInfo);
-  }
-
-  mNeedToSetSecurityInfo = true;
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::SetCharsetAndSource(int32_t aSource,
-                                      const nsACString &aCharset) {
-  NS_ENSURE_ARG(!aCharset.IsEmpty());
-
-  if (mCacheEntry) {
-    WriteCharsetAndSourceToCache(mCharsetSource, mCharset);
-  } else {
-    MOZ_ASSERT(mMode != WRITING, "We must have an entry!");
-    if (mMode == READING) {
-      return NS_ERROR_NOT_AVAILABLE;
-    }
-    mNeedToWriteCharset = true;
-    mCharsetSource = aSource;
-    mCharset = aCharset;
-  }
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::GetCharsetAndSource(int32_t *aSource, nsACString &aCharset) {
-  MOZ_ASSERT(mMode == READING);
-
-  if (!mCacheEntry) {
-    return NS_ERROR_NOT_AVAILABLE;
-  }
-
-  nsCString data;
-  mCacheEntry->GetMetaDataElement("charset", getter_Copies(data));
-
-  if (data.IsEmpty()) {
-    return NS_ERROR_NOT_AVAILABLE;
-  }
-
-  nsCString sourceStr;
-  mCacheEntry->GetMetaDataElement("charset-source", getter_Copies(sourceStr));
-
-  int32_t source;
-  nsresult err;
-  source = sourceStr.ToInteger(&err);
-  if (NS_FAILED(err) || source == 0) {
-    return NS_ERROR_NOT_AVAILABLE;
-  }
-
-  *aSource = source;
-  aCharset = data;
-  return NS_OK;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// nsICacheEntryOpenCallback
-//////////////////////////////////////////////////////////////////////////////
-
-NS_IMETHODIMP
-nsWyciwygChannel::OnCacheEntryCheck(nsICacheEntry *entry,
-                                    nsIApplicationCache *appCache,
-                                    uint32_t *aResult) {
-  *aResult = ENTRY_WANTED;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::OnCacheEntryAvailable(nsICacheEntry *aCacheEntry, bool aNew,
-                                        nsIApplicationCache *aAppCache,
-                                        nsresult aStatus) {
-  LOG(
-      ("nsWyciwygChannel::OnCacheEntryAvailable [this=%p entry=%p "
-       "new=%d status=%" PRIx32 "]\n",
-       this, aCacheEntry, aNew, static_cast<uint32_t>(aStatus)));
-
-  MOZ_RELEASE_ASSERT(!aNew,
-                     "New entry must not be returned when flag "
-                     "OPEN_READONLY is used!");
-
-  // if the channel's already fired onStopRequest,
-  // then we should ignore this event.
-  if (!mIsPending) return NS_OK;
-
-  if (NS_SUCCEEDED(mStatus)) {
-    if (NS_SUCCEEDED(aStatus)) {
-      MOZ_ASSERT(aCacheEntry);
-      mCacheEntry = aCacheEntry;
-      nsresult rv = ReadFromCache();
-      if (NS_FAILED(rv)) {
-        mStatus = rv;
-      }
-    } else {
-      mStatus = aStatus;
-    }
-  }
-
-  if (NS_FAILED(mStatus)) {
-    LOG(("channel was canceled [this=%p status=%" PRIx32 "]\n", this,
-         static_cast<uint32_t>(mStatus)));
-    // Since OnCacheEntryAvailable can be called directly from AsyncOpen
-    // we must dispatch.
-    NS_DispatchToCurrentThread(
-        mozilla::NewRunnableMethod("nsWyciwygChannel::NotifyListener", this,
-                                   &nsWyciwygChannel::NotifyListener));
-  }
-
-  return NS_OK;
-}
-
-//-----------------------------------------------------------------------------
-// nsWyciwygChannel::nsIStreamListener
-//-----------------------------------------------------------------------------
-
-NS_IMETHODIMP
-nsWyciwygChannel::OnDataAvailable(nsIRequest *request,
-                                  nsIInputStream *input, uint64_t offset,
-                                  uint32_t count) {
-  LOG(("nsWyciwygChannel::OnDataAvailable [this=%p request=%p offset=%" PRIu64
-       " count=%u]\n",
-       this, request, offset, count));
-
-  nsresult rv;
-
-  nsCOMPtr<nsIStreamListener> listener = mListener;
-
-  if (listener) {
-    rv = listener->OnDataAvailable(this, input, offset, count);
-  } else {
-    MOZ_ASSERT(false, "We must have a listener!");
-    rv = NS_ERROR_UNEXPECTED;
-  }
-
-  // XXX handle 64-bit stuff for real
-  if (mProgressSink && NS_SUCCEEDED(rv)) {
-    mProgressSink->OnProgress(this, nullptr, offset + count, mContentLength);
-  }
-
-  return rv;  // let the pump cancel on failure
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// nsIRequestObserver
-//////////////////////////////////////////////////////////////////////////////
-
-NS_IMETHODIMP
-nsWyciwygChannel::OnStartRequest(nsIRequest *request) {
-  LOG(("nsWyciwygChannel::OnStartRequest [this=%p request=%p]\n", this,
-       request));
-
-  nsCOMPtr<nsIStreamListener> listener = mListener;
-
-  if (listener) {
-    return listener->OnStartRequest(this);
-  }
-
-  MOZ_ASSERT(false, "We must have a listener!");
-  return NS_ERROR_UNEXPECTED;
-}
-
-NS_IMETHODIMP
-nsWyciwygChannel::OnStopRequest(nsIRequest *request,
-                                nsresult status) {
-  LOG(("nsWyciwygChannel::OnStopRequest [this=%p request=%p status=%" PRIu32
-       "]\n",
-       this, request, static_cast<uint32_t>(status)));
-
-  if (NS_SUCCEEDED(mStatus)) mStatus = status;
-
-  mIsPending = false;
-
-  nsCOMPtr<nsIStreamListener> listener;
-  listener.swap(mListener);
-
-  if (listener) {
-    listener->OnStopRequest(this, mStatus);
-  } else {
-    MOZ_ASSERT(false, "We must have a listener!");
-  }
-
-  if (mLoadGroup) mLoadGroup->RemoveRequest(this, nullptr, mStatus);
-
-  CloseCacheEntry(mStatus);
-  mPump = nullptr;
-
-  // Drop notification callbacks to prevent cycles.
-  mCallbacks = nullptr;
-  mProgressSink = nullptr;
-
-  return NS_OK;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// Helper functions
-//////////////////////////////////////////////////////////////////////////////
-
-nsresult nsWyciwygChannel::GetCacheStorage(nsICacheStorage **_retval) {
-  nsresult rv;
-
-  nsCOMPtr<nsICacheStorageService> cacheService =
-      do_GetService("@mozilla.org/netwerk/cache-storage-service;1", &rv);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  bool anonymous = mLoadFlags & LOAD_ANONYMOUS;
-  mOriginAttributes.SyncAttributesWithPrivateBrowsing(mPrivateBrowsing);
-  RefPtr<LoadContextInfo> loadInfo =
-      mozilla::net::GetLoadContextInfo(anonymous, mOriginAttributes);
-
-  if (mLoadFlags & INHIBIT_PERSISTENT_CACHING) {
-    return cacheService->MemoryCacheStorage(loadInfo, _retval);
-  }
-
-  return cacheService->DiskCacheStorage(loadInfo, false, _retval);
-}
-
-nsresult nsWyciwygChannel::OpenCacheEntryForReading(nsIURI *aURI) {
-  nsresult rv;
-
-  nsCOMPtr<nsICacheStorage> cacheStorage;
-  rv = GetCacheStorage(getter_AddRefs(cacheStorage));
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  return cacheStorage->AsyncOpenURI(
-      aURI, EmptyCString(),
-      nsICacheStorage::OPEN_READONLY | nsICacheStorage::CHECK_MULTITHREADED,
-      this);
-}
-
-nsresult nsWyciwygChannel::OpenCacheEntryForWriting(nsIURI *aURI) {
-  nsresult rv;
-
-  nsCOMPtr<nsICacheStorage> cacheStorage;
-  rv = GetCacheStorage(getter_AddRefs(cacheStorage));
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  return cacheStorage->OpenTruncate(aURI, EmptyCString(),
-                                    getter_AddRefs(mCacheEntry));
-}
-
-nsresult nsWyciwygChannel::ReadFromCache() {
-  LOG(("nsWyciwygChannel::ReadFromCache [this=%p] ", this));
-
-  NS_ENSURE_TRUE(mCacheEntry, NS_ERROR_FAILURE);
-  nsresult rv;
-
-  // Get the stored security info
-  mCacheEntry->GetSecurityInfo(getter_AddRefs(mSecurityInfo));
-
-  nsAutoCString tmpStr;
-  rv = mCacheEntry->GetMetaDataElement("inhibit-persistent-caching",
-                                       getter_Copies(tmpStr));
-  if (NS_SUCCEEDED(rv) && tmpStr.EqualsLiteral("1"))
-    mLoadFlags |= INHIBIT_PERSISTENT_CACHING;
-
-  // Get a transport to the cached data...
-  nsCOMPtr<nsIInputStream> inputStream;
-  rv = mCacheEntry->OpenInputStream(0, getter_AddRefs(inputStream));
-  if (NS_FAILED(rv)) return rv;
-  NS_ENSURE_TRUE(inputStream, NS_ERROR_UNEXPECTED);
-
-  rv = NS_NewInputStreamPump(getter_AddRefs(mPump), inputStream.forget());
-  if (NS_FAILED(rv)) return rv;
-
-  // Pump the cache data downstream
-  return mPump->AsyncRead(this, nullptr);
-}
-
-void nsWyciwygChannel::WriteCharsetAndSourceToCache(int32_t aSource,
-                                                    const nsCString &aCharset) {
-  MOZ_ASSERT(mCacheEntry, "Better have cache entry!");
-
-  mCacheEntry->SetMetaDataElement("charset", aCharset.get());
-
-  nsAutoCString source;
-  source.AppendInt(aSource);
-  mCacheEntry->SetMetaDataElement("charset-source", source.get());
-}
-
-void nsWyciwygChannel::NotifyListener() {
-  nsCOMPtr<nsIStreamListener> listener;
-
-  listener.swap(mListener);
-
-  if (listener) {
-    listener->OnStartRequest(this);
-    mIsPending = false;
-    listener->OnStopRequest(this, mStatus);
-  } else {
-    MOZ_ASSERT(false, "We must have the listener!");
-    mIsPending = false;
-  }
-
-  CloseCacheEntry(mStatus);
-
-  // Remove ourselves from the load group.
-  if (mLoadGroup) {
-    mLoadGroup->RemoveRequest(this, nullptr, mStatus);
-  }
-}
-
-// vim: ts=2 sw=2
deleted file mode 100644
--- a/netwerk/protocol/wyciwyg/nsWyciwygChannel.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/* -*- Mode: C++; 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/. */
-
-#ifndef nsWyciwygChannel_h___
-#define nsWyciwygChannel_h___
-
-#include "nsString.h"
-#include "nsCOMPtr.h"
-
-#include "nsILoadInfo.h"
-#include "nsIWyciwygChannel.h"
-#include "nsIStreamListener.h"
-#include "nsICacheEntryOpenCallback.h"
-#include "PrivateBrowsingChannel.h"
-#include "mozilla/BasePrincipal.h"
-
-class nsICacheEntry;
-class nsICacheStorage;
-class nsIInputStream;
-class nsIInputStreamPump;
-class nsILoadGroup;
-class nsIOutputStream;
-class nsIProgressEventSink;
-class nsIURI;
-
-extern mozilla::LazyLogModule gWyciwygLog;
-
-//-----------------------------------------------------------------------------
-
-class nsWyciwygChannel final
-    : public nsIWyciwygChannel,
-      public nsIStreamListener,
-      public nsICacheEntryOpenCallback,
-      public mozilla::net::PrivateBrowsingChannel<nsWyciwygChannel> {
- public:
-  NS_DECL_THREADSAFE_ISUPPORTS
-  NS_DECL_NSIREQUEST
-  NS_DECL_NSICHANNEL
-  NS_DECL_NSIWYCIWYGCHANNEL
-  NS_DECL_NSIREQUESTOBSERVER
-  NS_DECL_NSISTREAMLISTENER
-  NS_DECL_NSICACHEENTRYOPENCALLBACK
-
-  // nsWyciwygChannel methods:
-  nsWyciwygChannel();
-
-  nsresult Init(nsIURI *uri);
-
- protected:
-  virtual ~nsWyciwygChannel();
-
-  nsresult ReadFromCache();
-  nsresult EnsureWriteCacheEntry();
-  nsresult GetCacheStorage(nsICacheStorage **_retval);
-  nsresult OpenCacheEntryForReading(nsIURI *aURI);
-  nsresult OpenCacheEntryForWriting(nsIURI *aURI);
-
-  void WriteCharsetAndSourceToCache(int32_t aSource, const nsCString &aCharset);
-
-  void NotifyListener();
-
-  friend class mozilla::net::PrivateBrowsingChannel<nsWyciwygChannel>;
-
-  enum EMode { NONE, WRITING, READING };
-
-  EMode mMode;
-  nsresult mStatus;
-  bool mIsPending;
-  bool mNeedToWriteCharset;
-  int32_t mCharsetSource;
-  nsCString mCharset;
-  int64_t mContentLength;
-  uint32_t mLoadFlags;
-  mozilla::OriginAttributes mOriginAttributes;
-  nsCOMPtr<nsIURI> mURI;
-  nsCOMPtr<nsIURI> mOriginalURI;
-  nsCOMPtr<nsISupports> mOwner;
-  nsCOMPtr<nsILoadInfo> mLoadInfo;
-  nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
-  nsCOMPtr<nsIProgressEventSink> mProgressSink;
-  nsCOMPtr<nsILoadGroup> mLoadGroup;
-  nsCOMPtr<nsIStreamListener> mListener;
-
-  // reuse as much of this channel implementation as we can
-  nsCOMPtr<nsIInputStreamPump> mPump;
-
-  // Cache related stuff
-  nsCOMPtr<nsICacheEntry> mCacheEntry;
-  nsCOMPtr<nsIOutputStream> mCacheOutputStream;
-
-  bool mNeedToSetSecurityInfo;
-  nsCOMPtr<nsISupports> mSecurityInfo;
-};
-
-/**
- * Casting nsWyciwygChannel to nsISupports is ambiguous.
- * This method handles that.
- */
-inline nsISupports *ToSupports(nsWyciwygChannel *p) {
-  return NS_ISUPPORTS_CAST(nsIStreamListener *, p);
-}
-
-#endif /* nsWyciwygChannel_h___ */
deleted file mode 100644
--- a/netwerk/protocol/wyciwyg/nsWyciwygProtocolHandler.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; 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 "nsContentUtils.h"
-#include "nsWyciwyg.h"
-#include "nsWyciwygChannel.h"
-#include "nsWyciwygProtocolHandler.h"
-#include "nsNetCID.h"
-#include "nsServiceManagerUtils.h"
-#include "plstr.h"
-#include "nsIObserverService.h"
-#include "nsIURI.h"
-#include "nsIURIMutator.h"
-
-#include "mozilla/dom/ContentChild.h"
-#include "mozilla/net/NeckoChild.h"
-
-using namespace mozilla::net;
-#include "mozilla/net/WyciwygChannelChild.h"
-
-////////////////////////////////////////////////////////////////////////////////
-
-nsWyciwygProtocolHandler::nsWyciwygProtocolHandler() {
-  LOG(("Creating nsWyciwygProtocolHandler [this=%p].\n", this));
-}
-
-nsWyciwygProtocolHandler::~nsWyciwygProtocolHandler() {
-  LOG(("Deleting nsWyciwygProtocolHandler [this=%p]\n", this));
-}
-
-NS_IMPL_ISUPPORTS(nsWyciwygProtocolHandler, nsIProtocolHandler)
-
-////////////////////////////////////////////////////////////////////////////////
-// nsIProtocolHandler methods:
-////////////////////////////////////////////////////////////////////////////////
-
-NS_IMETHODIMP
-nsWyciwygProtocolHandler::GetScheme(nsACString &result) {
-  result = "wyciwyg";
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygProtocolHandler::GetDefaultPort(int32_t *result) {
-  return NS_ERROR_NOT_AVAILABLE;
-}
-
-NS_IMETHODIMP
-nsWyciwygProtocolHandler::AllowPort(int32_t port, const char *scheme,
-                                    bool *_retval) {
-  // don't override anything.
-  *_retval = false;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygProtocolHandler::NewURI(const nsACString &aSpec,
-                                 const char *aCharset,  // ignored
-                                 nsIURI *aBaseURI, nsIURI **result) {
-  return NS_MutateURI(NS_SIMPLEURIMUTATOR_CONTRACTID)
-      .SetSpec(aSpec)
-      .Finalize(result);
-}
-
-NS_IMETHODIMP
-nsWyciwygProtocolHandler::NewChannel(nsIURI *url, nsILoadInfo *aLoadInfo,
-                                     nsIChannel **result) {
-  if (mozilla::net::IsNeckoChild()) mozilla::net::NeckoChild::InitNeckoChild();
-
-  NS_ENSURE_ARG_POINTER(url);
-  nsresult rv;
-
-  nsCOMPtr<nsIWyciwygChannel> channel;
-  if (IsNeckoChild()) {
-    NS_ENSURE_TRUE(gNeckoChild != nullptr, NS_ERROR_FAILURE);
-
-    ContentChild *cc = static_cast<ContentChild *>(gNeckoChild->Manager());
-    if (cc->IsShuttingDown()) {
-      return NS_ERROR_FAILURE;
-    }
-
-    nsCOMPtr<nsIEventTarget> target = nsContentUtils::GetEventTargetByLoadInfo(
-        aLoadInfo, mozilla::TaskCategory::Other);
-    WyciwygChannelChild *wcc = new WyciwygChannelChild(target);
-
-    if (!wcc) return NS_ERROR_OUT_OF_MEMORY;
-
-    channel = wcc;
-    rv = wcc->Init(url);
-    if (NS_FAILED(rv)) PWyciwygChannelChild::Send__delete__(wcc);
-  } else {
-    // If original channel used https, make sure PSM is initialized
-    // (this may be first channel to load during a session restore)
-    nsAutoCString path;
-    rv = url->GetPathQueryRef(path);
-    NS_ENSURE_SUCCESS(rv, rv);
-    int32_t slashIndex = path.FindChar('/', 2);
-    if (slashIndex == kNotFound) return NS_ERROR_FAILURE;
-    if (path.Length() < (uint32_t)slashIndex + 1 + 5) return NS_ERROR_FAILURE;
-    if (!PL_strncasecmp(path.get() + slashIndex + 1, "https", 5))
-      net_EnsurePSMInit();
-
-    nsWyciwygChannel *wc = new nsWyciwygChannel();
-    channel = wc;
-    rv = wc->Init(url);
-  }
-
-  if (NS_FAILED(rv)) return rv;
-
-  // set the loadInfo on the new channel
-  rv = channel->SetLoadInfo(aLoadInfo);
-  if (NS_FAILED(rv)) {
-    return rv;
-  }
-
-  channel.forget(result);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsWyciwygProtocolHandler::GetProtocolFlags(uint32_t *result) {
-  // Should this be an an nsINestedURI?  We don't really want random webpages
-  // loading these URIs...
-
-  // Note that using URI_INHERITS_SECURITY_CONTEXT here is OK -- untrusted code
-  // is not allowed to link to wyciwyg URIs and users shouldn't be able to get
-  // at them, and nsDocShell::InternalLoad forbids non-history loads of these
-  // URIs.  And when loading from history we end up using the principal from
-  // the history entry, which we put there ourselves, so all is ok.
-  *result = URI_NORELATIVE | URI_NOAUTH | URI_DANGEROUS_TO_LOAD |
-            URI_INHERITS_SECURITY_CONTEXT;
-  return NS_OK;
-}
deleted file mode 100644
--- a/netwerk/protocol/wyciwyg/nsWyciwygProtocolHandler.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* -*- Mode: C++; 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/. */
-
-#ifndef nsWyciwygProtocolHandler_h___
-#define nsWyciwygProtocolHandler_h___
-
-#include "nsIProtocolHandler.h"
-
-class nsWyciwygProtocolHandler : public nsIProtocolHandler {
-  virtual ~nsWyciwygProtocolHandler();
-
- public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSIPROTOCOLHANDLER
-
-  nsWyciwygProtocolHandler();
-};
-
-#endif /* nsWyciwygProtocolHandler_h___ */
--- a/parser/html/nsHtml5StreamParser.cpp
+++ b/parser/html/nsHtml5StreamParser.cpp
@@ -23,17 +23,16 @@
 #include "mozilla/StaticPrefs.h"
 #include "mozilla/SystemGroup.h"
 #include "mozilla/UniquePtrExtensions.h"
 #include "nsHtml5Highlighter.h"
 #include "expat_config.h"
 #include "expat.h"
 #include "nsINestedURI.h"
 #include "nsCharsetSource.h"
-#include "nsIWyciwygChannel.h"
 #include "nsIThreadRetargetableRequest.h"
 #include "nsPrintfCString.h"
 #include "nsNetUtil.h"
 #include "nsUdetXPCOMWrapper.h"
 #include "nsXULAppAPI.h"
 #include "mozilla/SchedulerGroup.h"
 #include "nsJSEnvironment.h"
 #include "mozilla/dom/Document.h"
@@ -1031,18 +1030,17 @@ nsresult nsHtml5StreamParser::OnStartReq
     // Remember this in case chardet overwrites mCharsetSource
     mInitialEncodingWasFromParentFrame = true;
   }
 
   if (mCharsetSource >= kCharsetFromAutoDetection) {
     mFeedChardetIfEncoding = nullptr;
   }
 
-  nsCOMPtr<nsIWyciwygChannel> wyciwygChannel(do_QueryInterface(mRequest));
-  if (mCharsetSource < kCharsetFromUtf8OnlyMime && !wyciwygChannel) {
+  if (mCharsetSource < kCharsetFromUtf8OnlyMime) {
     // we aren't ready to commit to an encoding yet
     // leave converter uninstantiated for now
     return NS_OK;
   }
 
   // We are reloading a document.open()ed doc or loading JSON/WebVTT/etc. into
   // a browsing context. In the latter case, there's no need to remove the
   // BOM manually here, because the UTF-8 decoder removes it.
--- a/security/manager/ssl/nsSecureBrowserUIImpl.cpp
+++ b/security/manager/ssl/nsSecureBrowserUIImpl.cpp
@@ -215,67 +215,36 @@ void nsSecureBrowserUIImpl::CheckForCont
 
   if (doc->GetHasCookiesLoaded()) {
     mEvent |= STATE_COOKIES_LOADED;
   }
 }
 
 // Helper function to determine if the given URI can be considered secure.
 // Essentially, only "https" URIs can be considered secure. However, the URI we
-// have may be e.g. view-source:https://example.com or
-// wyciwyg://https://example.com, in which case we have to evaluate the
-// innermost URI.
+// have may be e.g. view-source:https://example.com, in which case we have to
+// evaluate the innermost URI.
 static nsresult URICanBeConsideredSecure(
     nsIURI* uri, /* out */ bool& canBeConsideredSecure) {
   MOZ_ASSERT(uri);
   NS_ENSURE_ARG(uri);
 
   canBeConsideredSecure = false;
 
   nsCOMPtr<nsIURI> innermostURI = NS_GetInnermostURI(uri);
   if (!innermostURI) {
     MOZ_LOG(gSecureBrowserUILog, LogLevel::Debug,
             ("  couldn't get innermost URI"));
     return NS_ERROR_FAILURE;
   }
   MOZ_LOG(gSecureBrowserUILog, LogLevel::Debug,
           ("  innermost URI is '%s'", innermostURI->GetSpecOrDefault().get()));
 
-  // Unfortunately, wyciwyg URIs don't know about innermost URIs, so we have to
-  // manually get the innermost URI if we have such a URI.
-  bool isWyciwyg;
-  nsresult rv = innermostURI->SchemeIs("wyciwyg", &isWyciwyg);
-  if (NS_FAILED(rv)) {
-    MOZ_LOG(gSecureBrowserUILog, LogLevel::Debug,
-            ("  nsIURI->SchemeIs failed"));
-    return rv;
-  }
-
-  if (isWyciwyg) {
-    nsCOMPtr<nsIURI> nonWyciwygURI;
-    rv = nsContentUtils::RemoveWyciwygScheme(innermostURI,
-                                             getter_AddRefs(nonWyciwygURI));
-    if (NS_FAILED(rv)) {
-      MOZ_LOG(gSecureBrowserUILog, LogLevel::Debug,
-              ("  nsContentUtils::RemoveWyciwygScheme failed"));
-      return rv;
-    }
-    if (!nonWyciwygURI) {
-      MOZ_LOG(gSecureBrowserUILog, LogLevel::Debug,
-              ("  apparently that wasn't a valid wyciwyg URI"));
-      return NS_ERROR_FAILURE;
-    }
-    innermostURI = nonWyciwygURI;
-    MOZ_LOG(gSecureBrowserUILog, LogLevel::Debug,
-            ("  innermost URI is now '%s'",
-             innermostURI->GetSpecOrDefault().get()));
-  }
-
   bool isHttps;
-  rv = innermostURI->SchemeIs("https", &isHttps);
+  nsresult rv = innermostURI->SchemeIs("https", &isHttps);
   if (NS_FAILED(rv)) {
     MOZ_LOG(gSecureBrowserUILog, LogLevel::Debug,
             ("  nsIURI->SchemeIs failed"));
     return rv;
   }
 
   canBeConsideredSecure = isHttps;
 
--- a/security/manager/ssl/tests/mochitest/mixedcontent/bug329869.js
+++ b/security/manager/ssl/tests/mochitest/mixedcontent/bug329869.js
@@ -1,9 +1,8 @@
 /* import-globals-from mixedContentTest.js */
 "use strict";
 
 document.open();
-// This test depends on nsSecureBrowserUIImpl handling wyciwyg:https:// URIs properly.
 // eslint-disable-next-line no-unsanitized/method
 document.write("This is insecure XSS script " + document.cookie);
 isSecurityState("broken", "security broken after document write from unsecure script");
 finish();
--- a/testing/web-platform/meta/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html.ini
+++ b/testing/web-platform/meta/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html.ini
@@ -136,19 +136,16 @@
     expected: FAIL
 
   [unregisterProtocolHandler: Attempting to override the "ws" protocol should throw SECURITY_ERR.]
     expected: FAIL
 
   [unregisterProtocolHandler: Attempting to override the "wss" protocol should throw SECURITY_ERR.]
     expected: FAIL
 
-  [unregisterProtocolHandler: Attempting to override the "wyciwyg" protocol should throw SECURITY_ERR.]
-    expected: FAIL
-
   [unregisterProtocolHandler: Attempting to override the "unrecognized" protocol should throw SECURITY_ERR.]
     expected: FAIL
 
   [unregisterProtocolHandler: Attempting to override the "mаilto" protocol should throw SECURITY_ERR.]
     expected: FAIL
 
   [unregisterProtocolHandler: Attempting to override the "mailto:" protocol should throw SECURITY_ERR.]
     expected: FAIL
--- a/toolkit/components/places/nsNavHistory.cpp
+++ b/toolkit/components/places/nsNavHistory.cpp
@@ -926,18 +926,17 @@ nsNavHistory::CanAddURI(nsIURI* aURI, bo
   }
 
   // now check for all bad things
   if (scheme.EqualsLiteral("about") || scheme.EqualsLiteral("blob") ||
       scheme.EqualsLiteral("chrome") || scheme.EqualsLiteral("data") ||
       scheme.EqualsLiteral("imap") || scheme.EqualsLiteral("javascript") ||
       scheme.EqualsLiteral("mailbox") || scheme.EqualsLiteral("moz-anno") ||
       scheme.EqualsLiteral("news") || scheme.EqualsLiteral("page-icon") ||
-      scheme.EqualsLiteral("resource") || scheme.EqualsLiteral("view-source") ||
-      scheme.EqualsLiteral("wyciwyg")) {
+      scheme.EqualsLiteral("resource") || scheme.EqualsLiteral("view-source")) {
     return NS_OK;
   }
   *canAdd = true;
   return NS_OK;
 }
 
 // nsNavHistory::GetNewQuery
 
--- a/toolkit/components/places/tests/history/test_async_history_api.js
+++ b/toolkit/components/places/tests/history/test_async_history_api.js
@@ -341,17 +341,16 @@ add_task(async function test_non_addable
     "imap://cyrus.andrew.cmu.edu/archive.imap",
     "news://new.mozilla.org/mozilla.dev.apps.firefox",
     "mailbox:Inbox",
     "moz-anno:favicon:http://mozilla.org/made-up-favicon",
     "view-source:http://mozilla.org",
     "chrome://browser/content/browser.xul",
     "resource://gre-resources/hiddenWindow.html",
     "data:,Hello%2C%20World!",
-    "wyciwyg:/0/http://mozilla.org",
     "javascript:alert('hello wolrd!');",
     "blob:foo",
   ];
   let places = [];
   URLS.forEach(function(url) {
     try {
       let place = {
         uri: NetUtil.newURI(url),
--- a/toolkit/components/places/tests/unit/test_isURIVisited.js
+++ b/toolkit/components/places/tests/unit/test_isURIVisited.js
@@ -14,17 +14,16 @@ const SCHEMES = {
 //  "imap://": false,
   "news://": false,
   "mailbox:": false,
   "moz-anno:favicon:http://": false,
   "view-source:http://": false,
   "chrome://browser/content/browser.xul?": false,
   "resource://": false,
   "data:,": false,
-  "wyciwyg:/0/http://": false,
   "javascript:": false,
 };
 
 add_task(async function test_isURIVisited() {
   let history = Cc["@mozilla.org/browser/history;1"]
                   .getService(Ci.mozIAsyncHistory);
 
   function visitsPromise(uri) {
--- a/toolkit/components/places/tests/unit/test_isvisited.js
+++ b/toolkit/components/places/tests/unit/test_isvisited.js
@@ -37,17 +37,16 @@ add_task(async function test_execute() {
     "imap://cyrus.andrew.cmu.edu/archive.imap",
     "news://new.mozilla.org/mozilla.dev.apps.firefox",
     "mailbox:Inbox",
     "moz-anno:favicon:http://mozilla.org/made-up-favicon",
     "view-source:http://mozilla.org",
     "chrome://browser/content/browser.xul",
     "resource://gre-resources/hiddenWindow.html",
     "data:,Hello%2C%20World!",
-    "wyciwyg:/0/http://mozilla.org",
     "javascript:alert('hello wolrd!');",
     "http://localhost/" + "a".repeat(1984),
   ];
   for (let currentURL of URLS) {
     try {
       var cantAddUri = uri(currentURL);
     } catch (e) {
       // nsIIOService.newURI() can throw if e.g. our app knows about imap://
--- a/toolkit/modules/sessionstore/SessionHistory.jsm
+++ b/toolkit/modules/sessionstore/SessionHistory.jsm
@@ -237,17 +237,18 @@ var SessionHistoryInternal = {
 
     if (shEntry.childCount > 0 && !shEntry.hasDynamicallyAddedChild()) {
       let children = [];
       for (let i = 0; i < shEntry.childCount; i++) {
         let child = shEntry.GetChildAt(i);
 
         if (child) {
           // Don't try to restore framesets containing wyciwyg URLs.
-          // (cf. bug 424689 and bug 450595)
+          // (cf. bug 424689 and bug 450595).  Note that these may be left
+          // over from pre-wyciwyg-removal profiles.
           if (child.URI.schemeIs("wyciwyg")) {
             children.length = 0;
             break;
           }
 
           children.push(this.serializeEntry(child));
         }
       }