merge mozilla-central to mozilla-inbound. r=merge a=merge
authorSebastian Hengst <archaeopteryx@coole-files.de>
Mon, 31 Jul 2017 11:28:37 +0200
changeset 423171 d8a326479290fdebaff3e555613d30bcf54a0536
parent 423170 2b347fb55a9965acec727f6e40671ba859636603 (current diff)
parent 423072 26516ba270816a6cc90f5c42a9b66701369a551f (diff)
child 423172 9236439b1cd419e4b7caa60bdcfb57a975abed90
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge, merge
milestone56.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
merge mozilla-central to mozilla-inbound. r=merge a=merge
dom/base/nsObjectLoadingContent.cpp
dom/base/test/test_applet_alternate_content.html
dom/html/HTMLSharedObjectElement.cpp
dom/html/HTMLSharedObjectElement.h
dom/html/test/test_applet_attributes_reflection.html
dom/interfaces/html/nsIDOMHTMLAppletElement.idl
dom/media/MediaManager.cpp
dom/plugins/base/nsPluginHost.cpp
dom/plugins/test/mochitest/file_bug738396.html
dom/plugins/test/mochitest/test_bug738396.html
dom/plugins/test/testplugin/javaplugin/Info.plist
dom/plugins/test/testplugin/javaplugin/moz.build
dom/plugins/test/testplugin/javaplugin/nptest.def
dom/plugins/test/testplugin/javaplugin/nptest.rc
dom/plugins/test/testplugin/javaplugin/nptest_name.cpp
dom/security/test/csp/file_shouldprocess.html
dom/security/test/csp/test_shouldprocess.html
dom/tests/mochitest/dom-level2-html/test_HTMLAppletElement01.html
dom/tests/mochitest/dom-level2-html/test_HTMLAppletElement02.html
dom/tests/mochitest/dom-level2-html/test_HTMLAppletElement03.html
dom/tests/mochitest/dom-level2-html/test_HTMLAppletElement04.html
dom/tests/mochitest/dom-level2-html/test_HTMLAppletElement05.html
dom/tests/mochitest/dom-level2-html/test_HTMLAppletElement06.html
dom/tests/mochitest/dom-level2-html/test_HTMLAppletElement07.html
dom/tests/mochitest/dom-level2-html/test_HTMLAppletElement08.html
dom/tests/mochitest/dom-level2-html/test_HTMLAppletElement09.html
dom/tests/mochitest/dom-level2-html/test_HTMLAppletElement10.html
dom/tests/mochitest/dom-level2-html/test_HTMLAppletElement11.html
dom/tests/mochitest/dom-level2-html/test_HTMLDocument08.html
dom/webidl/HTMLAppletElement.webidl
--- a/accessible/html/HTMLTableAccessible.cpp
+++ b/accessible/html/HTMLTableAccessible.cpp
@@ -1104,19 +1104,18 @@ HTMLTableAccessible::IsProbablyLayoutTab
 
   // Two column rules
   if (rowCount * colCount <= 10) {
     RETURN_LAYOUT_ANSWER(true, "2-4 columns, 10 cells or less, non-bordered");
   }
 
   if (HasDescendant(NS_LITERAL_STRING("embed")) ||
       HasDescendant(NS_LITERAL_STRING("object")) ||
-      HasDescendant(NS_LITERAL_STRING("applet")) ||
       HasDescendant(NS_LITERAL_STRING("iframe"))) {
-    RETURN_LAYOUT_ANSWER(true, "Has no borders, and has iframe, object, applet or iframe, typical of advertisements");
+    RETURN_LAYOUT_ANSWER(true, "Has no borders, and has iframe, object, or iframe, typical of advertisements");
   }
 
   RETURN_LAYOUT_ANSWER(false, "no layout factor strong enough, so will guess data");
 }
 
 
 ////////////////////////////////////////////////////////////////////////////////
 // HTMLCaptionAccessible
--- a/addon-sdk/source/lib/sdk/content/context-menu.js
+++ b/addon-sdk/source/lib/sdk/content/context-menu.js
@@ -73,17 +73,16 @@ function getSelection(window) {
   return node.value.substring(node.selectionStart, node.selectionEnd);
 }
 
 //These are used by PageContext.isCurrent below. If the popupNode or any of
 //its ancestors is one of these, Firefox uses a tailored context menu, and so
 //the page context doesn't apply.
 const NON_PAGE_CONTEXT_ELTS = [
   Ci.nsIDOMHTMLAnchorElement,
-  Ci.nsIDOMHTMLAppletElement,
   Ci.nsIDOMHTMLAreaElement,
   Ci.nsIDOMHTMLButtonElement,
   Ci.nsIDOMHTMLCanvasElement,
   Ci.nsIDOMHTMLEmbedElement,
   Ci.nsIDOMHTMLImageElement,
   Ci.nsIDOMHTMLInputElement,
   Ci.nsIDOMHTMLMapElement,
   Ci.nsIDOMHTMLMediaElement,
--- a/browser/base/content/nsContextMenu.js
+++ b/browser/base/content/nsContextMenu.js
@@ -864,18 +864,17 @@ nsContextMenu.prototype = {
         }
         if (computedURL) {
           this.hasBGImage = true;
           this.bgImageURL = makeURLAbsolute(bodyElt.baseURI,
                                             computedURL);
         }
       }
     } else if ((this.target instanceof HTMLEmbedElement ||
-              this.target instanceof HTMLObjectElement ||
-              this.target instanceof HTMLAppletElement) &&
+              this.target instanceof HTMLObjectElement) &&
              this.target.displayedType == HTMLObjectElement.TYPE_NULL &&
              this.target.pluginFallbackType == HTMLObjectElement.PLUGIN_CLICK_TO_PLAY) {
       this.onCTPPlugin = true;
     }
 
     this.canSpellCheck = this._isSpellCheckEnabled(this.target);
   },
 
--- a/build/unix/elfhack/elfhack.cpp
+++ b/build/unix/elfhack/elfhack.cpp
@@ -725,17 +725,17 @@ int do_relocation_section(Elf *elf, unsi
         Rel_Type &rel = new_rels.back();
         memset(&rel, 0, sizeof(rel));
         rel.r_info = ELF32_R_INFO(std::distance(symtab->syms.begin(), std::vector<Elf_SymValue>::iterator(mprotect)), rel_type2);
 
         // Find the beginning of the bss section, and use an aligned location in there
         // for the relocation.
         for (ElfSegment *segment = elf->getSegmentByType(PT_LOAD); segment;
              segment = elf->getSegmentByType(PT_LOAD, segment)) {
-            if (segment->getFlags() & PF_W == 0)
+            if ((segment->getFlags() & PF_W) == 0)
                 continue;
             size_t ptr_size = Elf_Addr::size(elf->getClass());
             size_t aligned_mem_end = (segment->getAddr() + segment->getMemSize() + ptr_size - 1) & ~(ptr_size - 1);
             size_t aligned_file_end = (segment->getAddr() + segment->getFileSize() + ptr_size - 1) & ~(ptr_size - 1);
             if (aligned_mem_end - aligned_file_end >= Elf_Addr::size(elf->getClass())) {
                 mprotect_cb = rel.r_offset = aligned_file_end;
                 break;
             }
--- a/config/external/moz.build
+++ b/config/external/moz.build
@@ -16,16 +16,18 @@ if not CONFIG['MOZ_SYSTEM_JPEG']:
 if CONFIG['MOZ_UPDATER']:
     if not CONFIG['MOZ_SYSTEM_BZ2']:
         external_dirs += ['modules/libbz2']
 
 # There's no "native" brotli or woff2 yet, but probably in the future...
 external_dirs += ['modules/brotli']
 external_dirs += ['modules/woff2']
 
+external_dirs += ['modules/xz-embedded']
+
 if CONFIG['MOZ_VORBIS']:
     external_dirs += ['media/libvorbis']
 
 if CONFIG['MOZ_TREMOR']:
     external_dirs += ['media/libtremor']
 
 if CONFIG['MOZ_WEBM_ENCODER']:
     external_dirs += ['media/libmkv']
@@ -59,12 +61,9 @@ external_dirs += [
     'media/libopus',
     'media/libtheora',
     'media/libspeex_resampler',
     'media/libstagefright',
     'media/libsoundtouch',
     'media/psshparser'
 ]
 
-if CONFIG['MOZ_LINKER']:
-    external_dirs += ['modules/xz-embedded']
-
 DIRS += ['../../' + i for i in external_dirs]
--- a/docshell/base/nsDocShellTreeOwner.cpp
+++ b/docshell/base/nsDocShellTreeOwner.cpp
@@ -37,17 +37,16 @@
 #include "mozilla/dom/SVGTitleElement.h"
 #include "nsIDOMEvent.h"
 #include "nsIDOMFileList.h"
 #include "nsIDOMMouseEvent.h"
 #include "nsIFormControl.h"
 #include "nsIDOMHTMLInputElement.h"
 #include "nsIDOMHTMLTextAreaElement.h"
 #include "nsIDOMHTMLHtmlElement.h"
-#include "nsIDOMHTMLAppletElement.h"
 #include "nsIDOMHTMLObjectElement.h"
 #include "nsIDOMHTMLEmbedElement.h"
 #include "nsIDOMHTMLDocument.h"
 #include "nsIImageLoadingContent.h"
 #include "nsIWebNavigation.h"
 #include "nsIDOMHTMLElement.h"
 #include "nsIPresShell.h"
 #include "nsIStringBundle.h"
@@ -1579,27 +1578,26 @@ ChromeContextMenuListener::HandleEvent(n
             }
           }
 
           targetDOMnode = node;
         }
       }
     }
 
-    // always consume events for plugins and Java who may throw their
-    // own context menus but not for image objects.  Document objects
-    // will never be targets or ancestors of targets, so that's OK.
+    // always consume events for plugins who may throw their own context menus
+    // but not for image objects. Document objects will never be targets or
+    // ancestors of targets, so that's OK.
     nsCOMPtr<nsIDOMHTMLObjectElement> objectElement;
     if (!(flags & nsIContextMenuListener::CONTEXT_IMAGE)) {
       objectElement = do_QueryInterface(node);
     }
     nsCOMPtr<nsIDOMHTMLEmbedElement> embedElement(do_QueryInterface(node));
-    nsCOMPtr<nsIDOMHTMLAppletElement> appletElement(do_QueryInterface(node));
 
-    if (objectElement || embedElement || appletElement) {
+    if (objectElement || embedElement) {
       return NS_OK;
     }
   }
 
   // Bubble out, looking for items of interest
   do {
     uint16_t nodeType;
     res = node->GetNodeType(&nodeType);
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -484,21 +484,20 @@ Element::ClearStyleStateLocks()
 }
 
 bool
 Element::GetBindingURL(nsIDocument *aDocument, css::URLValue **aResult)
 {
   // If we have a frame the frame has already loaded the binding.  And
   // otherwise, don't do anything else here unless we're dealing with
   // XUL or an HTML element that may have a plugin-related overlay
-  // (i.e. object, embed, or applet).
+  // (i.e. object or embed).
   bool isXULorPluginElement = (IsXULElement() ||
                                IsHTMLElement(nsGkAtoms::object) ||
-                               IsHTMLElement(nsGkAtoms::embed) ||
-                               IsHTMLElement(nsGkAtoms::applet));
+                               IsHTMLElement(nsGkAtoms::embed));
   nsIPresShell* shell = aDocument->GetShell();
   if (!shell || GetPrimaryFrame() || !isXULorPluginElement) {
     *aResult = nullptr;
     return true;
   }
 
   // Get the computed -moz-binding directly from the style context
   RefPtr<nsStyleContext> sc =
--- a/dom/base/nsContentList.cpp
+++ b/dom/base/nsContentList.cpp
@@ -147,16 +147,77 @@ NS_IMPL_ADDREF_INHERITED(nsSimpleContent
 NS_IMPL_RELEASE_INHERITED(nsSimpleContentList, nsBaseContentList)
 
 JSObject*
 nsSimpleContentList::WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto)
 {
   return NodeListBinding::Wrap(cx, this, aGivenProto);
 }
 
+NS_IMPL_CYCLE_COLLECTION_INHERITED(nsEmptyContentList, nsBaseContentList, mRoot)
+
+NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsEmptyContentList)
+NS_INTERFACE_MAP_END_INHERITING(nsBaseContentList)
+
+
+NS_IMPL_ADDREF_INHERITED(nsEmptyContentList, nsBaseContentList)
+NS_IMPL_RELEASE_INHERITED(nsEmptyContentList, nsBaseContentList)
+
+JSObject*
+nsEmptyContentList::WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto)
+{
+  return NodeListBinding::Wrap(cx, this, aGivenProto);
+}
+
+NS_IMETHODIMP
+nsEmptyContentList::GetLength(uint32_t* aLength)
+{
+  *aLength = 0;
+
+  return NS_OK;
+}
+
+NS_IMETHODIMP
+nsEmptyContentList::Item(uint32_t aIndex, nsIDOMNode** aReturn)
+{
+  *aReturn = nullptr;
+  return NS_OK;
+}
+
+NS_IMETHODIMP
+nsEmptyContentList::NamedItem(const nsAString& aName, nsIDOMNode** aReturn)
+{
+  *aReturn = nullptr;
+  return NS_OK;
+}
+
+mozilla::dom::Element*
+nsEmptyContentList::GetElementAt(uint32_t index)
+{
+  return nullptr;
+}
+
+mozilla::dom::Element*
+nsEmptyContentList::GetFirstNamedElement(const nsAString& aName, bool& aFound)
+{
+  aFound = false;
+  return nullptr;
+}
+
+void
+nsEmptyContentList::GetSupportedNames(nsTArray<nsString>& aNames)
+{
+}
+
+nsIContent*
+nsEmptyContentList::Item(uint32_t aIndex)
+{
+  return nullptr;
+}
+
 // Hashtable for storing nsContentLists
 static PLDHashTable* gContentListHashTable;
 
 #define RECENTLY_USED_CONTENT_LIST_CACHE_SIZE 31
 static nsContentList*
   sRecentlyUsedContentLists[RECENTLY_USED_CONTENT_LIST_CACHE_SIZE] = {};
 
 static MOZ_ALWAYS_INLINE uint32_t
--- a/dom/base/nsContentList.h
+++ b/dom/base/nsContentList.h
@@ -134,16 +134,62 @@ public:
 protected:
   virtual ~nsSimpleContentList() {}
 
 private:
   // This has to be a strong reference, the root might go away before the list.
   nsCOMPtr<nsINode> mRoot;
 };
 
+// Used for returning lists that will always be empty, such as the applets list
+// in HTML Documents
+class nsEmptyContentList: public nsBaseContentList,
+                          public nsIHTMLCollection
+{
+public:
+  explicit nsEmptyContentList(nsINode* aRoot) : nsBaseContentList(),
+                                                mRoot(aRoot)
+  {
+  }
+
+  // nsIDOMHTMLCollection
+  NS_DECL_ISUPPORTS_INHERITED
+  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsEmptyContentList,
+                                           nsBaseContentList)
+  NS_DECL_NSIDOMHTMLCOLLECTION
+
+  virtual nsINode* GetParentObject() override
+  {
+    return mRoot;
+  }
+
+  virtual JSObject* WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
+
+  virtual JSObject* GetWrapperPreserveColorInternal() override
+  {
+    return nsWrapperCache::GetWrapperPreserveColor();
+  }
+  virtual void PreserveWrapperInternal(nsISupports* aScriptObjectHolder) override
+  {
+    nsWrapperCache::PreserveWrapper(aScriptObjectHolder);
+  }
+
+  virtual nsIContent* Item(uint32_t aIndex) override;
+  virtual mozilla::dom::Element* GetElementAt(uint32_t index) override;
+  virtual mozilla::dom::Element*
+  GetFirstNamedElement(const nsAString& aName, bool& aFound) override;
+  virtual void GetSupportedNames(nsTArray<nsString>& aNames) override;
+
+protected:
+  virtual ~nsEmptyContentList() {}
+private:
+  // This has to be a strong reference, the root might go away before the list.
+  nsCOMPtr<nsINode> mRoot;
+};
+
 /**
  * Class that's used as the key to hash nsContentList implementations
  * for fast retrieval
  */
 struct nsContentListKey
 {
   // We have to take an aIsHTMLDocument arg for two reasons:
   // 1) We don't want to include nsIDocument.h in this header.
--- a/dom/base/nsHTMLContentSerializer.cpp
+++ b/dom/base/nsHTMLContentSerializer.cpp
@@ -113,20 +113,19 @@ nsHTMLContentSerializer::SerializeHTMLAt
     bool isJS = IsJavaScript(aContent, attrName, namespaceID, valueStr);
 
     if (((attrName == nsGkAtoms::href &&
           (namespaceID == kNameSpaceID_None ||
            namespaceID == kNameSpaceID_XLink)) ||
          (attrName == nsGkAtoms::src && namespaceID == kNameSpaceID_None))) {
       // Make all links absolute when converting only the selection:
       if (mFlags & nsIDocumentEncoder::OutputAbsoluteLinks) {
-        // Would be nice to handle OBJECT and APPLET tags,
-        // but that gets more complicated since we have to
-        // search the tag list for CODEBASE as well.
-        // For now, just leave them relative.
+        // Would be nice to handle OBJECT tags, but that gets more complicated
+        // since we have to search the tag list for CODEBASE as well. For now,
+        // just leave them relative.
         nsCOMPtr<nsIURI> uri = aContent->GetBaseURI();
         if (uri) {
           nsAutoString absURI;
           rv = NS_MakeAbsoluteURI(absURI, valueStr, uri);
           if (NS_SUCCEEDED(rv)) {
             valueStr = absURI;
           }
         }
--- a/dom/base/nsIContent.h
+++ b/dom/base/nsIContent.h
@@ -817,42 +817,44 @@ public:
   virtual void BeginAddingChildren()
   {
   }
 
   /**
    * This method is called when the parser finishes creating the element's children,
    * if any are present.
    *
-   * NOTE: this is currently only called for textarea, select, applet, and
-   * object elements in the HTML content sink.  If you want
-   * to call it on your element, modify the content sink of your
-   * choice to do so.  This is an efficiency measure.
+   * NOTE: this is currently only called for textarea, select, and object
+   * elements in the HTML content sink. If you want to call it on your element,
+   * modify the content sink of your choice to do so. This is an efficiency
+   * measure.
    *
    * If you also need to determine whether the parser is the one creating your
    * element (through createElement() or cloneNode() generally) then add a
    * boolean aFromParser to the NS_NewXXX() constructor for your element and
    * have the parser pass true.  See HTMLInputElement.cpp and
    * nsHTMLContentSink::MakeContentObject().
    *
    * @param aHaveNotified Whether there has been a
    *        ContentInserted/ContentAppended notification for this content node
    *        yet.
    */
   virtual void DoneAddingChildren(bool aHaveNotified)
   {
   }
 
   /**
-   * For HTML textarea, select, applet, and object elements, returns
-   * true if all children have been added OR if the element was not
-   * created by the parser. Returns true for all other elements.
+   * For HTML textarea, select, and object elements, returns true if all
+   * children have been added OR if the element was not created by the parser.
+   * Returns true for all other elements.
+   *
    * @returns false if the element was created by the parser and
-   *                   it is an HTML textarea, select, applet, or object
+   *                   it is an HTML textarea, select, or object
    *                   element and not all children have been added.
+   *
    * @returns true otherwise.
    */
   virtual bool IsDoneAddingChildren()
   {
     return true;
   }
 
   /**
--- a/dom/base/nsIDocument.h
+++ b/dom/base/nsIDocument.h
@@ -3087,19 +3087,20 @@ protected:
   RefPtr<mozilla::css::Loader> mCSSLoader;
   RefPtr<mozilla::css::ImageLoader> mStyleImageLoader;
   RefPtr<nsHTMLStyleSheet> mAttrStyleSheet;
   RefPtr<nsHTMLCSSStyleSheet> mStyleAttrStyleSheet;
 
   // Tracking for images in the document.
   RefPtr<mozilla::dom::ImageTracker> mImageTracker;
 
-  // The set of all object, embed, applet, video/audio elements or
-  // nsIObjectLoadingContent or nsIDocumentActivity for which this is the
-  // owner document. (They might not be in the document.)
+  // The set of all object, embed, video/audio elements or
+  // nsIObjectLoadingContent or nsIDocumentActivity for which this is the owner
+  // document. (They might not be in the document.)
+  //
   // These are non-owning pointers, the elements are responsible for removing
   // themselves when they go away.
   nsAutoPtr<nsTHashtable<nsPtrHashKey<nsISupports> > > mActivityObservers;
 
   // The array of all links that need their status resolved.  Links must add themselves
   // to this set by calling RegisterPendingLinkUpdate when added to a document.
   static const size_t kSegmentSize = 128;
   mozilla::SegmentedVector<nsCOMPtr<mozilla::dom::Link>,
--- a/dom/base/nsObjectLoadingContent.cpp
+++ b/dom/base/nsObjectLoadingContent.cpp
@@ -1,32 +1,31 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 /*
  * A base class implementing nsIObjectLoadingContent for use by
  * various content nodes that want to provide plugin/document/image
- * loading functionality (eg <embed>, <object>, <applet>, etc).
+ * loading functionality (eg <embed>, <object>, etc).
  */
 
 // Interface headers
 #include "imgLoader.h"
 #include "nsIClassOfService.h"
 #include "nsIConsoleService.h"
 #include "nsIContent.h"
 #include "nsIContentInlines.h"
 #include "nsIDocShell.h"
 #include "nsIDocShellLoadInfo.h"
 #include "nsIDocument.h"
 #include "nsIDOMCustomEvent.h"
 #include "nsIDOMDocument.h"
 #include "nsIDOMHTMLObjectElement.h"
-#include "nsIDOMHTMLAppletElement.h"
 #include "nsIExternalProtocolHandler.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIObjectFrame.h"
 #include "nsIPermissionManager.h"
 #include "nsPluginHost.h"
 #include "nsPluginInstanceOwner.h"
 #include "nsJSNPRuntime.h"
 #include "nsINestedURI.h"
@@ -85,30 +84,29 @@
 #include "mozilla/dom/ScriptSettings.h"
 #include "mozilla/dom/PluginCrashedEvent.h"
 #include "mozilla/AsyncEventDispatcher.h"
 #include "mozilla/EventDispatcher.h"
 #include "mozilla/EventStateManager.h"
 #include "mozilla/EventStates.h"
 #include "mozilla/IntegerPrintfMacros.h"
 #include "mozilla/dom/HTMLObjectElementBinding.h"
-#include "mozilla/dom/HTMLSharedObjectElement.h"
+#include "mozilla/dom/HTMLEmbedElement.h"
 #include "mozilla/dom/HTMLObjectElement.h"
 #include "nsChannelClassifier.h"
 
 #ifdef XP_WIN
 // Thanks so much, Microsoft! :(
 #ifdef CreateEvent
 #undef CreateEvent
 #endif
 #endif // XP_WIN
 
 static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID);
 
-static const char *kPrefJavaMIME = "plugin.java.mime";
 static const char *kPrefYoutubeRewrite = "plugins.rewrite_youtube_embeds";
 static const char *kPrefBlockURIs = "browser.safebrowsing.blockedURIs.enabled";
 static const char *kPrefFavorFallbackMode = "plugins.favorfallback.mode";
 static const char *kPrefFavorFallbackRules = "plugins.favorfallback.rules";
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::net;
@@ -119,23 +117,16 @@ GetObjectLog()
   static LazyLogModule sLog("objlc");
   return sLog;
 }
 
 #define LOG(args) MOZ_LOG(GetObjectLog(), mozilla::LogLevel::Debug, args)
 #define LOG_ENABLED() MOZ_LOG_TEST(GetObjectLog(), mozilla::LogLevel::Debug)
 
 static bool
-IsJavaMIME(const nsACString & aMIMEType)
-{
-  return
-    nsPluginHost::GetSpecialType(aMIMEType) == nsPluginHost::eSpecialType_Java;
-}
-
-static bool
 IsFlashMIME(const nsACString & aMIMEType)
 {
   return
     nsPluginHost::GetSpecialType(aMIMEType) == nsPluginHost::eSpecialType_Flash;
 }
 
 static bool
 InActiveDocument(nsIContent *aContent)
@@ -865,18 +856,17 @@ nsObjectLoadingContent::GetPluginAttribu
 
 void
 nsObjectLoadingContent::GetPluginParameters(nsTArray<MozPluginParameter>& aParameters)
 {
   aParameters = mCachedParameters;
 }
 
 void
-nsObjectLoadingContent::GetNestedParams(nsTArray<MozPluginParameter>& aParams,
-                                        bool aIgnoreCodebase)
+nsObjectLoadingContent::GetNestedParams(nsTArray<MozPluginParameter>& aParams)
 {
   nsCOMPtr<Element> ourElement =
     do_QueryInterface(static_cast<nsIObjectLoadingContent*>(this));
 
   nsCOMPtr<nsIHTMLCollection> allParams;
   NS_NAMED_LITERAL_STRING(xhtml_ns, "http://www.w3.org/1999/xhtml");
   ErrorResult rv;
   allParams = ourElement->GetElementsByTagNameNS(xhtml_ns,
@@ -894,44 +884,35 @@ nsObjectLoadingContent::GetNestedParams(
     nsAutoString name;
     element->GetAttribute(NS_LITERAL_STRING("name"), name);
 
     if (name.IsEmpty())
       continue;
 
     nsCOMPtr<nsIContent> parent = element->GetParent();
     nsCOMPtr<nsIDOMHTMLObjectElement> domObject;
-    nsCOMPtr<nsIDOMHTMLAppletElement> domApplet;
-    while (!(domObject || domApplet) && parent) {
+    while (!domObject && parent) {
       domObject = do_QueryInterface(parent);
-      domApplet = do_QueryInterface(parent);
       parent = parent->GetParent();
     }
 
-    if (domApplet) {
-      parent = do_QueryInterface(domApplet);
-    } else if (domObject) {
+    if (domObject) {
       parent = do_QueryInterface(domObject);
     } else {
       continue;
     }
 
     if (parent == ourElement) {
       MozPluginParameter param;
       element->GetAttribute(NS_LITERAL_STRING("name"), param.mName);
       element->GetAttribute(NS_LITERAL_STRING("value"), param.mValue);
 
       param.mName.Trim(" \n\r\t\b", true, true, false);
       param.mValue.Trim(" \n\r\t\b", true, true, false);
 
-      // ignore codebase param if it was already added in the attributes array.
-      if (aIgnoreCodebase && param.mName.EqualsIgnoreCase("codebase")) {
-        continue;
-      }
-
       aParams.AppendElement(param);
     }
   }
 }
 
 nsresult
 nsObjectLoadingContent::BuildParametersArray()
 {
@@ -947,66 +928,47 @@ nsObjectLoadingContent::BuildParametersA
     MozPluginParameter param;
     const nsAttrName* attrName = content->GetAttrNameAt(i);
     nsIAtom* atom = attrName->LocalName();
     content->GetAttr(attrName->NamespaceID(), atom, param.mValue);
     atom->ToString(param.mName);
     mCachedAttributes.AppendElement(param);
   }
 
-  bool isJava = IsJavaMIME(mContentType);
-
-  nsCString codebase;
-  if (isJava) {
-      nsresult rv = mBaseURI->GetSpec(codebase);
-      NS_ENSURE_SUCCESS(rv, rv);
-  }
-
-  nsAutoCString wmodeOverride;
-  Preferences::GetCString("plugins.force.wmode", wmodeOverride);
+  nsAdoptingCString wmodeOverride = Preferences::GetCString("plugins.force.wmode");
   for (uint32_t i = 0; i < mCachedAttributes.Length(); i++) {
     if (!wmodeOverride.IsEmpty() && mCachedAttributes[i].mName.EqualsIgnoreCase("wmode")) {
       CopyASCIItoUTF16(wmodeOverride, mCachedAttributes[i].mValue);
       wmodeOverride.Truncate();
-    } else if (!codebase.IsEmpty() && mCachedAttributes[i].mName.EqualsIgnoreCase("codebase")) {
-      CopyASCIItoUTF16(codebase, mCachedAttributes[i].mValue);
-      codebase.Truncate();
     }
   }
 
   if (!wmodeOverride.IsEmpty()) {
     MozPluginParameter param;
     param.mName = NS_LITERAL_STRING("wmode");
     CopyASCIItoUTF16(wmodeOverride, param.mValue);
     mCachedAttributes.AppendElement(param);
   }
 
-  if (!codebase.IsEmpty()) {
-    MozPluginParameter param;
-    param.mName = NS_LITERAL_STRING("codebase");
-    CopyASCIItoUTF16(codebase, param.mValue);
-    mCachedAttributes.AppendElement(param);
-  }
-
   // Some plugins were never written to understand the "data" attribute of the OBJECT tag.
   // Real and WMP will not play unless they find a "src" attribute, see bug 152334.
   // Nav 4.x would simply replace the "data" with "src". Because some plugins correctly
   // look for "data", lets instead copy the "data" attribute and add another entry
   // to the bottom of the array if there isn't already a "src" specified.
   if (content->IsHTMLElement(nsGkAtoms::object) &&
       !content->HasAttr(kNameSpaceID_None, nsGkAtoms::src)) {
     MozPluginParameter param;
     content->GetAttr(kNameSpaceID_None, nsGkAtoms::data, param.mValue);
     if (!param.mValue.IsEmpty()) {
       param.mName = NS_LITERAL_STRING("SRC");
       mCachedAttributes.AppendElement(param);
     }
   }
 
-  GetNestedParams(mCachedParameters, isJava);
+  GetNestedParams(mCachedParameters);
 
   return NS_OK;
 }
 
 void
 nsObjectLoadingContent::NotifyOwnerDocumentActivityChanged()
 {
   // XXX(johns): We cannot touch plugins or run arbitrary script from this call,
@@ -1382,56 +1344,16 @@ nsObjectLoadingContent::ObjectState() co
         case eFallbackVulnerableNoUpdate:
           return NS_EVENT_STATE_VULNERABLE_NO_UPDATE;
       }
   }
   NS_NOTREACHED("unknown type?");
   return NS_EVENT_STATE_LOADING;
 }
 
-// Returns false if mBaseURI is not acceptable for java applets.
-bool
-nsObjectLoadingContent::CheckJavaCodebase()
-{
-  nsCOMPtr<nsIContent> thisContent =
-    do_QueryInterface(static_cast<nsIImageLoadingContent*>(this));
-  nsCOMPtr<nsIScriptSecurityManager> secMan =
-    nsContentUtils::GetSecurityManager();
-  nsCOMPtr<nsINetUtil> netutil = do_GetNetUtil();
-  NS_ASSERTION(thisContent && secMan && netutil, "expected interfaces");
-
-
-  // Note that mBaseURI is this tag's requested base URI, not the codebase of
-  // the document for security purposes
-  nsresult rv = secMan->CheckLoadURIWithPrincipal(thisContent->NodePrincipal(),
-                                                  mBaseURI, 0);
-  if (NS_FAILED(rv)) {
-    LOG(("OBJLC [%p]: Java codebase check failed", this));
-    return false;
-  }
-
-  nsCOMPtr<nsIURI> principalBaseURI;
-  rv = thisContent->NodePrincipal()->GetURI(getter_AddRefs(principalBaseURI));
-  if (NS_FAILED(rv)) {
-    NS_NOTREACHED("Failed to URI from node principal?");
-    return false;
-  }
-  // We currently allow java's codebase to be non-same-origin, with
-  // the exception of URIs that represent local files
-  if (NS_URIIsLocalFile(mBaseURI) &&
-      nsScriptSecurityManager::GetStrictFileOriginPolicy() &&
-      !NS_RelaxStrictFileOriginPolicy(mBaseURI, principalBaseURI, true)) {
-    LOG(("OBJLC [%p]: Java failed RelaxStrictFileOriginPolicy for file URI",
-         this));
-    return false;
-  }
-
-  return true;
-}
-
 void
 nsObjectLoadingContent::MaybeRewriteYoutubeEmbed(nsIURI* aURI, nsIURI* aBaseURI, nsIURI** aOutURI)
 {
   nsCOMPtr<nsIContent> thisContent =
     do_QueryInterface(static_cast<nsIImageLoadingContent*>(this));
   NS_ASSERTION(thisContent, "Must be an instance of content");
 
   // We're only interested in switching out embed and object tags
@@ -1623,32 +1545,31 @@ nsObjectLoadingContent::CheckProcessPoli
     LOG(("OBJLC [%p]: CheckContentProcessPolicy rejected load", this));
     return false;
   }
 
   return true;
 }
 
 nsObjectLoadingContent::ParameterUpdateFlags
-nsObjectLoadingContent::UpdateObjectParameters(bool aJavaURI)
+nsObjectLoadingContent::UpdateObjectParameters()
 {
   nsCOMPtr<nsIContent> thisContent =
     do_QueryInterface(static_cast<nsIImageLoadingContent*>(this));
   NS_ASSERTION(thisContent, "Must be an instance of content");
 
   uint32_t caps = GetCapabilities();
   LOG(("OBJLC [%p]: Updating object parameters", this));
 
   nsresult rv;
   nsAutoCString newMime;
   nsAutoString typeAttr;
   nsCOMPtr<nsIURI> newURI;
   nsCOMPtr<nsIURI> newBaseURI;
   ObjectType newType;
-  bool isJava = false;
   // Set if this state can't be used to load anything, forces eType_Null
   bool stateInvalid = false;
   // Indicates what parameters changed.
   // eParamChannelChanged - means parameters that affect channel opening
   //                        decisions changed
   // eParamStateChanged -   means anything that affects what content we load
   //                        changed, even if the channel we'd open remains the
   //                        same.
@@ -1657,135 +1578,64 @@ nsObjectLoadingContent::UpdateObjectPara
   // already opened a channel or tried to instantiate content, whereas channel
   // parameter changes require re-opening the channel even if we haven't gotten
   // that far.
   nsObjectLoadingContent::ParameterUpdateFlags retval = eParamNoChange;
 
   ///
   /// Initial MIME Type
   ///
-
-  if (aJavaURI || thisContent->NodeInfo()->Equals(nsGkAtoms::applet)) {
-    Preferences::GetCString(kPrefJavaMIME, newMime);
-    NS_ASSERTION(IsJavaMIME(newMime),
-                 "plugin.mime.java should be recognized as java");
-    isJava = true;
-  } else {
-    nsAutoString rawTypeAttr;
-    thisContent->GetAttr(kNameSpaceID_None, nsGkAtoms::type, rawTypeAttr);
-    if (!rawTypeAttr.IsEmpty()) {
-      typeAttr = rawTypeAttr;
-      CopyUTF16toUTF8(rawTypeAttr, newMime);
-      isJava = IsJavaMIME(newMime);
-    }
-  }
-
-  ///
-  /// classID
-  ///
-
-  if (caps & eSupportClassID) {
-    nsAutoString classIDAttr;
-    thisContent->GetAttr(kNameSpaceID_None, nsGkAtoms::classid, classIDAttr);
-    if (!classIDAttr.IsEmpty()) {
-      // Our classid support is limited to 'java:' ids
-      nsAutoCString javaMIME;
-      Preferences::GetCString(kPrefJavaMIME, javaMIME);
-      NS_ASSERTION(IsJavaMIME(javaMIME),
-                   "plugin.mime.java should be recognized as java");
-      RefPtr<nsPluginHost> pluginHost = nsPluginHost::GetInst();
-      if (StringBeginsWith(classIDAttr, NS_LITERAL_STRING("java:")) &&
-          pluginHost &&
-          pluginHost->HavePluginForType(javaMIME)) {
-        newMime = javaMIME;
-        isJava = true;
-      } else {
-        // XXX(johns): Our de-facto behavior since forever was to refuse to load
-        // Objects who don't have a classid we support, regardless of other type
-        // or uri info leads to a valid plugin.
-        newMime.Truncate();
-        stateInvalid = true;
-      }
-    }
-  }
-
   ///
   /// Codebase
   ///
 
   nsAutoString codebaseStr;
   nsCOMPtr<nsIURI> docBaseURI = thisContent->GetBaseURI();
   bool hasCodebase = thisContent->HasAttr(kNameSpaceID_None, nsGkAtoms::codebase);
-  if (hasCodebase)
+  if (hasCodebase) {
     thisContent->GetAttr(kNameSpaceID_None, nsGkAtoms::codebase, codebaseStr);
-
-
-  // Java wants the codebase attribute even if it occurs in <param> tags
-  if (isJava) {
-    // Find all <param> tags that are nested beneath us, but not beneath another
-    // object/applet tag.
-    nsTArray<MozPluginParameter> params;
-    GetNestedParams(params, false);
-    for (uint32_t i = 0; i < params.Length(); i++) {
-      if (params[i].mName.EqualsIgnoreCase("codebase")) {
-        hasCodebase = true;
-        codebaseStr = params[i].mValue;
-      }
-    }
-  }
-
-  if (isJava && hasCodebase && codebaseStr.IsEmpty()) {
-    // Java treats codebase="" as "/"
-    codebaseStr.Assign('/');
-    // XXX(johns): This doesn't cover the case of "https:" which java would
-    //             interpret as "https:///" but we interpret as this document's
-    //             URI but with a changed scheme.
-  } else if (isJava && !hasCodebase) {
-    // Java expects a directory as the codebase, or else it will construct
-    // relative URIs incorrectly :(
-    codebaseStr.Assign('.');
   }
 
   if (!codebaseStr.IsEmpty()) {
     rv = nsContentUtils::NewURIWithDocumentCharset(getter_AddRefs(newBaseURI),
                                                    codebaseStr,
                                                    thisContent->OwnerDoc(),
                                                    docBaseURI);
     if (NS_SUCCEEDED(rv)) {
       NS_TryToSetImmutable(newBaseURI);
     } else {
       // Malformed URI
       LOG(("OBJLC [%p]: Could not parse plugin's codebase as a URI, "
            "will use document baseURI instead", this));
     }
   }
 
+  nsAutoString rawTypeAttr;
+  thisContent->GetAttr(kNameSpaceID_None, nsGkAtoms::type, rawTypeAttr);
+  if (!rawTypeAttr.IsEmpty()) {
+    typeAttr = rawTypeAttr;
+    CopyUTF16toUTF8(rawTypeAttr, newMime);
+  }
+
   // If we failed to build a valid URI, use the document's base URI
   if (!newBaseURI) {
     newBaseURI = docBaseURI;
   }
 
   ///
   /// URI
   ///
 
   nsAutoString uriStr;
   // Different elements keep this in various locations
-  if (isJava) {
-    // Applet tags and embed/object with explicit java MIMEs have src/data
-    // attributes that are not meant to be parsed as URIs or opened by the
-    // browser -- act as if they are null. (Setting these attributes triggers a
-    // force-load, so tracking the old value to determine if they have changed
-    // is not necessary.)
-  } else if (thisContent->NodeInfo()->Equals(nsGkAtoms::object)) {
+  if (thisContent->NodeInfo()->Equals(nsGkAtoms::object)) {
     thisContent->GetAttr(kNameSpaceID_None, nsGkAtoms::data, uriStr);
   } else if (thisContent->NodeInfo()->Equals(nsGkAtoms::embed)) {
     thisContent->GetAttr(kNameSpaceID_None, nsGkAtoms::src, uriStr);
   } else {
-    // Applet tags should always have a java MIME type at this point
     NS_NOTREACHED("Unrecognized plugin-loading tag");
   }
 
   mRewrittenYoutubeEmbed = false;
   // Note that the baseURI changing could affect the newURI, even if uriStr did
   // not change.
   if (!uriStr.IsEmpty()) {
     rv = nsContentUtils::NewURIWithDocumentCharset(getter_AddRefs(newURI),
@@ -1810,19 +1660,16 @@ nsObjectLoadingContent::UpdateObjectPara
   }
 
   // For eAllowPluginSkipChannel tags, if we have a non-plugin type, but can get
   // a plugin type from the extension, prefer that to falling back to a channel.
   if (!IsPluginType(GetTypeOfContent(newMime, mSkipFakePlugins)) && newURI &&
       (caps & eAllowPluginSkipChannel) &&
       IsPluginEnabledByExtension(newURI, newMime)) {
     LOG(("OBJLC [%p]: Using extension as type hint (%s)", this, newMime.get()));
-    if (!isJava && IsJavaMIME(newMime)) {
-      return UpdateObjectParameters(true);
-    }
   }
 
   ///
   /// Check if the original (pre-channel) content-type or URI changed, and
   /// record mOriginal{ContentType,URI}
   ///
 
   if ((mOriginalContentType != newMime) || !URIEquals(mOriginalURI, newURI)) {
@@ -1926,25 +1773,16 @@ nsObjectLoadingContent::UpdateObjectPara
       // it couldn't find a way to handle application/octet-stream
       nsAutoCString parsedMime, dummy;
       NS_ParseResponseContentType(newMime, parsedMime, dummy);
       if (!parsedMime.IsEmpty()) {
         mChannel->SetContentType(parsedMime);
       }
     } else {
       newMime = channelType;
-      if (IsJavaMIME(newMime)) {
-        // Java does not load with a channel, and being java retroactively
-        // changes how we may have interpreted the codebase to construct this
-        // URI above.  Because the behavior here is more or less undefined, play
-        // it safe and reject the load.
-        LOG(("OBJLC [%p]: Refusing to load with channel with java MIME",
-             this));
-        stateInvalid = true;
-      }
     }
   } else if (newChannel) {
     LOG(("OBJLC [%p]: We failed to open a channel, marking invalid", this));
     stateInvalid = true;
   }
 
   ///
   /// Determine final type
@@ -2006,22 +1844,16 @@ nsObjectLoadingContent::UpdateObjectPara
 
   if (newType != mType) {
     retval = (ParameterUpdateFlags)(retval | eParamStateChanged);
     LOG(("OBJLC [%p]: Type changed from %u -> %u", this, mType, newType));
     mType = newType;
   }
 
   if (!URIEquals(mBaseURI, newBaseURI)) {
-    if (isJava) {
-      // Java bases its class loading on the base URI, so we consider the state
-      // to have changed if this changes. If the object is using a relative URI,
-      // mURI will have changed below regardless
-      retval = (ParameterUpdateFlags)(retval | eParamStateChanged);
-    }
     LOG(("OBJLC [%p]: Object effective baseURI changed", this));
     mBaseURI = newBaseURI;
   }
 
   if (!URIEquals(newURI, mURI)) {
     retval = (ParameterUpdateFlags)(retval | eParamStateChanged);
     LOG(("OBJLC [%p]: Object effective URI changed", this));
     mURI = newURI;
@@ -2206,19 +2038,16 @@ nsObjectLoadingContent::LoadObject(bool 
   }
 
   //
   // Security checks
   //
 
   if (mType != eType_Null) {
     bool allowLoad = true;
-    if (IsJavaMIME(mContentType)) {
-      allowLoad = CheckJavaCodebase();
-    }
     int16_t contentPolicy = nsIContentPolicy::ACCEPT;
     // If mChannelLoaded is set we presumably already passed load policy
     // If mType == eType_Loading then we call OpenChannel() which internally
     // creates a new channel and calls asyncOpen2() on that channel which
     // then enforces content policy checks.
     if (allowLoad && mURI && !mChannelLoaded && mType != eType_Loading) {
       allowLoad = CheckLoadPolicy(&contentPolicy);
     }
@@ -3106,36 +2935,34 @@ nsObjectLoadingContent::LoadFallback(Fal
   // child embeds as we find them in the upcoming loop.
   mType = eType_Null;
 
   bool thisIsObject = thisContent->IsHTMLElement(nsGkAtoms::object);
 
   // Do a depth-first traverse of node tree with the current element as root,
   // looking for <embed> or <object> elements that might now need to load.
   nsTArray<nsINodeList*> childNodes;
-  if ((thisContent->IsHTMLElement(nsGkAtoms::object) ||
-       thisContent->IsHTMLElement(nsGkAtoms::applet)) &&
+  if (thisContent->IsHTMLElement(nsGkAtoms::object) &&
       (aType == eFallbackUnsupported ||
        aType == eFallbackDisabled ||
        aType == eFallbackBlocklisted ||
        aType == eFallbackAlternate))
   {
     for (nsIContent* child = thisContent->GetFirstChild(); child; ) {
       // When we advance to our next child, we don't want to traverse subtrees
       // under descendant <object> and <embed> elements; those will handle
       // those subtrees themselves if they end up falling back.
       bool skipChildDescendants = false;
       if (aType != eFallbackAlternate &&
           !child->IsHTMLElement(nsGkAtoms::param) &&
           nsStyleUtil::IsSignificantChild(child, true, false)) {
         aType = eFallbackAlternate;
       }
       if (thisIsObject) {
-        if (child->IsHTMLElement(nsGkAtoms::embed)) {
-          HTMLSharedObjectElement* embed = static_cast<HTMLSharedObjectElement*>(child);
+        if (auto embed = HTMLEmbedElement::FromContent(child)) {
           embed->StartObjectLoad(true, true);
           skipChildDescendants = true;
         } else if (auto object = HTMLObjectElement::FromContent(child)) {
           object->StartObjectLoad(true, true);
           skipChildDescendants = true;
         }
       }
 
@@ -3938,21 +3765,16 @@ nsObjectLoadingContent::MaybeFireErrorEv
   }
 }
 
 bool
 nsObjectLoadingContent::BlockEmbedOrObjectContentLoading()
 {
   nsCOMPtr<nsIContent> thisContent =
     do_QueryInterface(static_cast<nsIImageLoadingContent*>(this));
-  if (!thisContent->IsHTMLElement(nsGkAtoms::embed) &&
-      !thisContent->IsHTMLElement(nsGkAtoms::object)) {
-    // Doesn't apply to other elements (i.e. <applet>)
-    return false;
-  }
 
   // Traverse up the node tree to see if we have any ancestors that may block us
   // from loading
   for (nsIContent* parent = thisContent->GetParent();
        parent;
        parent = parent->GetParent()) {
     if (parent->IsAnyOfHTMLElements(nsGkAtoms::video, nsGkAtoms::audio)) {
       return true;
--- a/dom/base/nsObjectLoadingContent.h
+++ b/dom/base/nsObjectLoadingContent.h
@@ -2,17 +2,17 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
 /*
  * A base class implementing nsIObjectLoadingContent for use by
  * various content nodes that want to provide plugin/document/image
- * loading functionality (eg <embed>, <object>, <applet>, etc).
+ * loading functionality (eg <embed>, <object>, etc).
  */
 
 #ifndef NSOBJECTLOADINGCONTENT_H_
 #define NSOBJECTLOADINGCONTENT_H_
 
 #include "mozilla/Attributes.h"
 #include "mozilla/dom/BindingDeclarations.h"
 #include "nsImageLoadingContent.h"
@@ -257,18 +257,18 @@ class nsObjectLoadingContent : public ns
 
     void PresetOpenerWindow(mozIDOMWindowProxy* aOpenerWindow, mozilla::ErrorResult& aRv);
 
   protected:
     /**
      * Begins loading the object when called
      *
      * Attributes of |this| QI'd to nsIContent will be inspected, depending on
-     * the node type. This function currently assumes it is a <applet>,
-     * <object>, or <embed> tag.
+     * the node type. This function currently assumes it is a <object> or
+     * <embed> tag.
      *
      * The instantiated plugin depends on:
      * - The URI (<embed src>, <object data>)
      * - The type 'hint' (type attribute)
      * - The mime type returned by opening the URI
      * - Enabled plugins claiming the ultimate mime type
      * - The capabilities returned by GetCapabilities
      * - The classid attribute, if eSupportClassID is among the capabilities
@@ -296,17 +296,18 @@ class nsObjectLoadingContent : public ns
                         bool aForceLoad = false);
 
     enum Capabilities {
       eSupportImages       = 1u << 0, // Images are supported (imgILoader)
       eSupportPlugins      = 1u << 1, // Plugins are supported (nsIPluginHost)
       eSupportDocuments    = 1u << 2, // Documents are supported
                                         // (nsIDocumentLoaderFactory)
                                         // This flag always includes SVG
-      eSupportClassID      = 1u << 3, // The classid attribute is supported
+      eSupportClassID      = 1u << 3, // The classid attribute is supported. No
+                                      // longer used.
 
       // If possible to get a *plugin* type from the type attribute *or* file
       // extension, we can use that type and begin loading the plugin before
       // opening a channel.
       // A side effect of this is if the channel fails, the plugin is still
       // running.
       eAllowPluginSkipChannel  = 1u << 4
     };
@@ -384,22 +385,18 @@ class nsObjectLoadingContent : public ns
      * This is an internal helper function and should not be used directly for
      * passing parameters to the plugin instance.
      *
      * See GetPluginParameters and GetPluginAttributes, which also handle
      * quirk-overrides.
      *
      * @param aParameters     The array containing pairs of name/value strings
      *                        from nested <param> objects.
-     * @param aIgnoreCodebase Flag for ignoring the "codebase" param when
-     *                        building the array. This is useful when loading
-     *                        java.
      */
-    void GetNestedParams(nsTArray<mozilla::dom::MozPluginParameter>& aParameters,
-                         bool aIgnoreCodebase);
+    void GetNestedParams(nsTArray<mozilla::dom::MozPluginParameter>& aParameters);
 
     MOZ_MUST_USE nsresult BuildParametersArray();
 
     /**
      * Loads fallback content with the specified FallbackType
      *
      * @param aType   FallbackType value for type of fallback we're loading
      * @param aNotify Send notifications and events. If false, caller is
@@ -420,34 +417,30 @@ class nsObjectLoadingContent : public ns
      * Introspects the object and sets the following member variables:
      * - mOriginalContentType : This is the type attribute on the element
      * - mOriginalURI         : The src or data attribute on the element
      * - mURI                 : The final URI, considering mChannel if
      *                          mChannelLoaded is set
      * - mContentType         : The final content type, considering mChannel if
      *                          mChannelLoaded is set
      * - mBaseURI             : The object's base URI, which may be set by the
-     *                          object (codebase attribute)
+     *                          object
      * - mType                : The type the object is determined to be based
      *                          on the above
      *
      * NOTE The class assumes that mType is the currently loaded type at various
      *      points, so the caller of this function must take the appropriate
      *      actions to ensure this
      *
      * NOTE This function does not perform security checks, only determining the
      *      requested type and parameters of the object.
      *
-     * @param aJavaURI Specify that the URI will be consumed by java, which
-     *                 changes codebase parsing and URI construction. Used
-     *                 internally.
-     *
      * @return Returns a bitmask of ParameterUpdateFlags values
      */
-    ParameterUpdateFlags UpdateObjectParameters(bool aJavaURI = false);
+    ParameterUpdateFlags UpdateObjectParameters();
 
     /**
      * Queue a CheckPluginStopEvent and track it in mPendingCheckPluginStopEvent
      */
     void QueueCheckPluginStopEvent();
 
     void NotifyContentObjectWrapper();
 
@@ -496,21 +489,16 @@ class nsObjectLoadingContent : public ns
     /**
      * This method tells the final answer on whether this object's fallback
      * content should be used instead of the original plugin content.
      *
      * @param aIsPluginClickToPlay Whether this object instance is CTP.
      */
     bool PreferFallback(bool aIsPluginClickToPlay);
 
-    /*
-     * Helper to check if mBaseURI can be used by java as a codebase
-     */
-    bool CheckJavaCodebase();
-
     /**
      * Helper to check if our current URI passes policy
      *
      * @param aContentPolicy [out] The result of the content policy decision
      *
      * @return true if call succeeded and NS_CP_ACCEPTED(*aContentPolicy)
      */
     bool CheckLoadPolicy(int16_t *aContentPolicy);
@@ -667,22 +655,21 @@ class nsObjectLoadingContent : public ns
     // false, has not yet reached OnStartRequest
     nsCOMPtr<nsIChannel>        mChannel;
 
     // The URI of the current content.
     // May change as we open channels and encounter redirects - does not imply
     // a loaded type
     nsCOMPtr<nsIURI>            mURI;
 
-    // The original URI obtained from inspecting the element (codebase, and
-    // src/data). May differ from mURI due to redirects
+    // The original URI obtained from inspecting the element. May differ from
+    // mURI due to redirects
     nsCOMPtr<nsIURI>            mOriginalURI;
 
-    // The baseURI used for constructing mURI, and used by some plugins (java)
-    // as a root for other resource requests.
+    // The baseURI used for constructing mURI.
     nsCOMPtr<nsIURI>            mBaseURI;
 
 
 
     // Type of the currently-loaded content.
     ObjectType                  mType           : 8;
     // The type of fallback content we're showing (see ObjectState())
     FallbackType                mFallbackType : 8;
--- a/dom/base/nsSandboxFlags.h
+++ b/dom/base/nsSandboxFlags.h
@@ -37,19 +37,18 @@ const unsigned long SANDBOXED_AUXILIARY_
 /**
  * This flag prevents content from navigating their top-level browsing
  * context.
  */
 const unsigned long SANDBOXED_TOPLEVEL_NAVIGATION = 0x4;
 
 /**
  * This flag prevents content from instantiating plugins, whether using the
- * embed element, the object element, the applet element, or through
- * navigation of a nested browsing context, unless those plugins can be
- * secured.
+ * embed element, the object element, or through navigation of a nested browsing
+ * context, unless those plugins can be secured.
  */
 const unsigned long SANDBOXED_PLUGINS = 0x8;
 
 /**
  * This flag forces content into a unique origin, thus preventing it from
  * accessing other content from the same origin.
  * This flag also prevents script from reading from or writing to the
  * document.cookie IDL attribute, and blocks access to localStorage.
--- a/dom/base/nsXHTMLContentSerializer.cpp
+++ b/dom/base/nsXHTMLContentSerializer.cpp
@@ -294,17 +294,17 @@ nsXHTMLContentSerializer::SerializeAttri
 
       isJS = IsJavaScript(aContent, attrName, namespaceID, valueStr);
 
       if (namespaceID == kNameSpaceID_None &&
           ((attrName == nsGkAtoms::href) ||
           (attrName == nsGkAtoms::src))) {
         // Make all links absolute when converting only the selection:
         if (mFlags & nsIDocumentEncoder::OutputAbsoluteLinks) {
-          // Would be nice to handle OBJECT and APPLET tags,
+          // Would be nice to handle OBJECT tags,
           // but that gets more complicated since we have to
           // search the tag list for CODEBASE as well.
           // For now, just leave them relative.
           nsCOMPtr<nsIURI> uri = aContent->GetBaseURI();
           if (uri) {
             nsAutoString absURI;
             rv = NS_MakeAbsoluteURI(absURI, valueStr, uri);
             if (NS_SUCCEEDED(rv)) {
--- a/dom/base/test/mochitest.ini
+++ b/dom/base/test/mochitest.ini
@@ -257,17 +257,16 @@ support-files =
 [test_anchor_area_referrer_invalid.html]
 [test_anchor_area_referrer_rel.html]
 [test_anonymousContent_api.html]
 [test_anonymousContent_append_after_reflow.html]
 [test_anonymousContent_canvas.html]
 [test_anonymousContent_insert.html]
 [test_anonymousContent_manipulate_content.html]
 [test_anonymousContent_style_csp.html]
-[test_applet_alternate_content.html]
 [test_appname_override.html]
 [test_async_setTimeout_stack.html]
 [test_async_setTimeout_stack_across_globals.html]
 [test_audioWindowUtils.html]
 [test_audioNotification.html]
 tags = audiochannel
 [test_audioNotificationSilent_audioFile.html]
 tags = audiochannel
deleted file mode 100644
--- a/dom/base/test/test_applet_alternate_content.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=1200602
--->
-<head>
-  <meta charset="utf-8">
-  <title>Test for Bug 1200602</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SpecialPowers.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1200602">Mozilla Bug 1200602</a>
-<pre id="test">
-<script type="application/javascript">
-
-function test() {
-  "use strict";
-
-  const objLC = SpecialPowers.Ci.nsIObjectLoadingContent;
-  let obj = document.createElement("applet");
-  obj.appendChild(document.createTextNode("alternate content"));
-  document.body.appendChild(obj);
-
-  obj instanceof objLC;
-  obj = SpecialPowers.wrap(obj);
-
-  // We expect this tag to simply go to alternate content, not get a
-  // pluginProblem binding or fire any events.
-  ok(obj.displayedType == objLC.TYPE_NULL, "expected null type");
-  ok(obj.pluginFallbackType == objLC.PLUGIN_ALTERNATE,
-     "expected alternate fallback mode");
-}
-
-// Test all non-plugin types these tags can load to make sure none of them
-// trigger plugin-specific fallbacks when loaded with no URI
-test();
-</script>
-</pre>
-</body>
-</html>
--- a/dom/bindings/BindingUtils.cpp
+++ b/dom/bindings/BindingUtils.cpp
@@ -40,20 +40,19 @@
 #include "mozilla/dom/ScriptSettings.h"
 #include "mozilla/dom/CustomElementRegistry.h"
 #include "mozilla/dom/DOMError.h"
 #include "mozilla/dom/DOMErrorBinding.h"
 #include "mozilla/dom/DOMException.h"
 #include "mozilla/dom/ElementBinding.h"
 #include "mozilla/dom/HTMLObjectElement.h"
 #include "mozilla/dom/HTMLObjectElementBinding.h"
-#include "mozilla/dom/HTMLSharedObjectElement.h"
+#include "mozilla/dom/HTMLEmbedElement.h"
 #include "mozilla/dom/HTMLElementBinding.h"
 #include "mozilla/dom/HTMLEmbedElementBinding.h"
-#include "mozilla/dom/HTMLAppletElementBinding.h"
 #include "mozilla/dom/Promise.h"
 #include "mozilla/dom/ResolveSystemBinding.h"
 #include "mozilla/dom/WebIDLGlobalNameHash.h"
 #include "mozilla/dom/WorkerPrivate.h"
 #include "mozilla/dom/WorkerScope.h"
 #include "mozilla/dom/XrayExpandoClass.h"
 #include "mozilla/jsipc/CrossProcessObjectWrappers.h"
 #include "nsDOMClassInfo.h"
@@ -2305,24 +2304,19 @@ ReparentWrapper(JSContext* aCx, JS::Hand
       MOZ_CRASH();
     }
   }
 
   JS::Rooted<JSObject*> maybeObjLC(aCx, aObj);
   nsObjectLoadingContent* htmlobject;
   nsresult rv = UNWRAP_OBJECT(HTMLObjectElement, &maybeObjLC, htmlobject);
   if (NS_FAILED(rv)) {
-    rv = UnwrapObject<prototypes::id::HTMLEmbedElement,
-                      HTMLSharedObjectElement>(&maybeObjLC, htmlobject);
+    rv = UNWRAP_OBJECT(HTMLEmbedElement, &maybeObjLC, htmlobject);
     if (NS_FAILED(rv)) {
-      rv = UnwrapObject<prototypes::id::HTMLAppletElement,
-                        HTMLSharedObjectElement>(&maybeObjLC, htmlobject);
-      if (NS_FAILED(rv)) {
-        htmlobject = nullptr;
-      }
+      htmlobject = nullptr;
     }
   }
   if (htmlobject) {
     htmlobject->SetupProtoChain(aCx, aObj);
   }
 
   // Now we can just return the wrapper
   return NS_OK;
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -392,20 +392,16 @@ DOMInterfaces = {
     'nativeType': 'mozilla::devtools::HeapSnapshot'
 },
 
 'History': {
     'headerFile': 'nsHistory.h',
     'nativeType': 'nsHistory'
 },
 
-'HTMLAppletElement': {
-    'nativeType': 'mozilla::dom::HTMLSharedObjectElement'
-},
-
 'HTMLBaseElement': {
     'nativeType': 'mozilla::dom::HTMLSharedElement'
 },
 
 'HTMLCollection': {
     'nativeType': 'nsIHTMLCollection',
     # nsContentList.h pulls in nsIHTMLCollection.h
     'headerFile': 'nsContentList.h',
@@ -423,20 +419,16 @@ DOMInterfaces = {
     'nativeType': 'nsHTMLDocument',
     'implicitJSContext': [ 'open', 'write', 'writeln' ]
 },
 
 'HTMLElement': {
     'nativeType': 'nsGenericHTMLElement',
 },
 
-'HTMLEmbedElement': {
-    'nativeType': 'mozilla::dom::HTMLSharedObjectElement'
-},
-
 'HTMLHeadElement': {
     'nativeType': 'mozilla::dom::HTMLSharedElement'
 },
 
 'HTMLHtmlElement': {
     'nativeType': 'mozilla::dom::HTMLSharedElement'
 },
 
--- a/dom/bindings/Configuration.py
+++ b/dom/bindings/Configuration.py
@@ -707,18 +707,17 @@ class Descriptor(DescriptorProvider):
         resolveOwnProperty and enumerateOwnProperties hooks.  But for
         the special case of plugin-loading elements, we do NOT want
         those, because we don't want to instantiate plug-ins simply
         due to chrome touching them and that's all those hooks do on
         those elements.  So we special-case those here.
         """
         return (self.interface.getExtendedAttribute("NeedResolve") and
                 self.interface.identifier.name not in ["HTMLObjectElement",
-                                                       "HTMLEmbedElement",
-                                                       "HTMLAppletElement"])
+                                                       "HTMLEmbedElement"])
     def needsXrayNamedDeleterHook(self):
         return self.operations["NamedDeleter"] is not None
 
     def needsSpecialGenericOps(self):
         """
         Returns true if this descriptor requires generic ops other than
         GenericBindingMethod/GenericBindingGetter/GenericBindingSetter.
 
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -1566,18 +1566,17 @@ EventStateManager::FireContextClick()
     }
     else if (mGestureDownContent->IsHTMLElement()) {
       nsCOMPtr<nsIFormControl> formCtrl(do_QueryInterface(mGestureDownContent));
 
       if (formCtrl) {
         allowedToDispatch = formCtrl->IsTextOrNumberControl(/*aExcludePassword*/ false) ||
                             formCtrl->ControlType() == NS_FORM_INPUT_FILE;
       }
-      else if (mGestureDownContent->IsAnyOfHTMLElements(nsGkAtoms::applet,
-                                                        nsGkAtoms::embed,
+      else if (mGestureDownContent->IsAnyOfHTMLElements(nsGkAtoms::embed,
                                                         nsGkAtoms::object,
                                                         nsGkAtoms::label)) {
         allowedToDispatch = false;
       }
     }
 
     if (allowedToDispatch) {
       // init the event while mCurrentTarget is still good
--- a/dom/html/HTMLAllCollection.cpp
+++ b/dom/html/HTMLAllCollection.cpp
@@ -65,17 +65,16 @@ HTMLAllCollection::Collection()
   }
   return mCollection;
 }
 
 static bool
 IsAllNamedElement(nsIContent* aContent)
 {
   return aContent->IsAnyOfHTMLElements(nsGkAtoms::a,
-                                       nsGkAtoms::applet,
                                        nsGkAtoms::button,
                                        nsGkAtoms::embed,
                                        nsGkAtoms::form,
                                        nsGkAtoms::iframe,
                                        nsGkAtoms::img,
                                        nsGkAtoms::input,
                                        nsGkAtoms::map,
                                        nsGkAtoms::meta,
rename from dom/html/HTMLSharedObjectElement.cpp
rename to dom/html/HTMLEmbedElement.cpp
--- a/dom/html/HTMLSharedObjectElement.cpp
+++ b/dom/html/HTMLEmbedElement.cpp
@@ -1,281 +1,238 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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 "mozilla/EventStates.h"
-#include "mozilla/dom/HTMLSharedObjectElement.h"
+#include "mozilla/dom/HTMLEmbedElement.h"
 #include "mozilla/dom/HTMLEmbedElementBinding.h"
-#include "mozilla/dom/HTMLAppletElementBinding.h"
 #include "mozilla/dom/ElementInlines.h"
 
 #include "nsIDocument.h"
 #include "nsIPluginDocument.h"
 #include "nsIDOMDocument.h"
 #include "nsThreadUtils.h"
 #include "nsIScriptError.h"
 #include "nsIWidget.h"
 #include "nsContentUtils.h"
 #ifdef XP_MACOSX
 #include "mozilla/EventDispatcher.h"
 #include "mozilla/dom/Event.h"
 #endif
 #include "mozilla/dom/HTMLObjectElement.h"
 
 
-NS_IMPL_NS_NEW_HTML_ELEMENT_CHECK_PARSER(SharedObject)
+NS_IMPL_NS_NEW_HTML_ELEMENT_CHECK_PARSER(Embed)
 
 namespace mozilla {
 namespace dom {
 
-HTMLSharedObjectElement::HTMLSharedObjectElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
-                                                 FromParser aFromParser)
-  : nsGenericHTMLElement(aNodeInfo),
-    mIsDoneAddingChildren(mNodeInfo->Equals(nsGkAtoms::embed) || !aFromParser)
+HTMLEmbedElement::HTMLEmbedElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
+                                   FromParser aFromParser)
+  : nsGenericHTMLElement(aNodeInfo)
 {
   RegisterActivityObserver();
   SetIsNetworkCreated(aFromParser == FROM_PARSER_NETWORK);
 
   // By default we're in the loading state
   AddStatesSilently(NS_EVENT_STATE_LOADING);
 }
 
-HTMLSharedObjectElement::~HTMLSharedObjectElement()
+HTMLEmbedElement::~HTMLEmbedElement()
 {
 #ifdef XP_MACOSX
   HTMLObjectElement::OnFocusBlurPlugin(this, false);
 #endif
   UnregisterActivityObserver();
   DestroyImageLoadingContent();
 }
 
-bool
-HTMLSharedObjectElement::IsDoneAddingChildren()
-{
-  return mIsDoneAddingChildren;
-}
-
-void
-HTMLSharedObjectElement::DoneAddingChildren(bool aHaveNotified)
-{
-  if (!mIsDoneAddingChildren) {
-    mIsDoneAddingChildren = true;
+NS_IMPL_CYCLE_COLLECTION_CLASS(HTMLEmbedElement)
 
-    // If we're already in a document, we need to trigger the load
-    // Otherwise, BindToTree takes care of that.
-    if (IsInComposedDoc()) {
-      StartObjectLoad(aHaveNotified, false);
-    }
-  }
-}
-
-NS_IMPL_CYCLE_COLLECTION_CLASS(HTMLSharedObjectElement)
-
-NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(HTMLSharedObjectElement,
+NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(HTMLEmbedElement,
                                                   nsGenericHTMLElement)
-  nsObjectLoadingContent::Traverse(tmp, cb);
+nsObjectLoadingContent::Traverse(tmp, cb);
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
-NS_IMPL_ADDREF_INHERITED(HTMLSharedObjectElement, Element)
-NS_IMPL_RELEASE_INHERITED(HTMLSharedObjectElement, Element)
+NS_IMPL_ADDREF_INHERITED(HTMLEmbedElement, Element)
+NS_IMPL_RELEASE_INHERITED(HTMLEmbedElement, Element)
 
-NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLSharedObjectElement)
-  NS_INTERFACE_TABLE_INHERITED(HTMLSharedObjectElement,
-                               nsIRequestObserver,
-                               nsIStreamListener,
-                               nsIFrameLoaderOwner,
-                               nsIObjectLoadingContent,
-                               imgINotificationObserver,
-                               nsIImageLoadingContent,
-                               imgIOnloadBlocker,
-                               nsIChannelEventSink)
-  NS_INTERFACE_TABLE_TO_MAP_SEGUE
-  NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLAppletElement, applet)
-  NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLEmbedElement, embed)
+NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLEmbedElement)
+NS_INTERFACE_TABLE_INHERITED(HTMLEmbedElement,
+                             nsIRequestObserver,
+                             nsIStreamListener,
+                             nsIFrameLoaderOwner,
+                             nsIObjectLoadingContent,
+                             imgINotificationObserver,
+                             nsIImageLoadingContent,
+                             imgIOnloadBlocker,
+                             nsIChannelEventSink)
+NS_INTERFACE_TABLE_TO_MAP_SEGUE
+  NS_INTERFACE_MAP_ENTRY(nsIDOMHTMLEmbedElement)
 NS_INTERFACE_MAP_END_INHERITING(nsGenericHTMLElement)
 
-NS_IMPL_ELEMENT_CLONE(HTMLSharedObjectElement)
+NS_IMPL_ELEMENT_CLONE(HTMLEmbedElement)
 
 #ifdef XP_MACOSX
 
 NS_IMETHODIMP
-HTMLSharedObjectElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
+HTMLEmbedElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
 {
   HTMLObjectElement::HandleFocusBlurPlugin(this, aVisitor.mEvent);
   return NS_OK;
 }
 
 #endif // #ifdef XP_MACOSX
 
 void
-HTMLSharedObjectElement::AsyncEventRunning(AsyncEventDispatcher* aEvent)
+HTMLEmbedElement::AsyncEventRunning(AsyncEventDispatcher* aEvent)
 {
   nsImageLoadingContent::AsyncEventRunning(aEvent);
 }
 
 nsresult
-HTMLSharedObjectElement::BindToTree(nsIDocument *aDocument,
-                                    nsIContent *aParent,
-                                    nsIContent *aBindingParent,
-                                    bool aCompileEventHandlers)
+HTMLEmbedElement::BindToTree(nsIDocument *aDocument,
+                             nsIContent *aParent,
+                             nsIContent *aBindingParent,
+                             bool aCompileEventHandlers)
 {
   nsresult rv = nsGenericHTMLElement::BindToTree(aDocument, aParent,
                                                  aBindingParent,
                                                  aCompileEventHandlers);
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = nsObjectLoadingContent::BindToTree(aDocument, aParent,
                                           aBindingParent,
                                           aCompileEventHandlers);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Don't kick off load from being bound to a plugin document - the plugin
   // document will call nsObjectLoadingContent::InitializeFromChannel() for the
   // initial load.
   nsCOMPtr<nsIPluginDocument> pluginDoc = do_QueryInterface(aDocument);
 
-  // If we already have all the children, start the load.
-  if (mIsDoneAddingChildren && !pluginDoc) {
-    void (HTMLSharedObjectElement::*start)() =
-      &HTMLSharedObjectElement::StartObjectLoad;
+  if (!pluginDoc) {
+    void (HTMLEmbedElement::*start)() = &HTMLEmbedElement::StartObjectLoad;
     nsContentUtils::AddScriptRunner(NewRunnableMethod(
-      "dom::HTMLSharedObjectElement::BindToTree", this, start));
+                                      "dom::HTMLEmbedElement::BindToTree", this, start));
   }
 
   return NS_OK;
 }
 
 void
-HTMLSharedObjectElement::UnbindFromTree(bool aDeep,
-                                        bool aNullParent)
+HTMLEmbedElement::UnbindFromTree(bool aDeep,
+                                 bool aNullParent)
 {
 #ifdef XP_MACOSX
   // When a page is reloaded (when an nsIDocument's content is removed), the
   // focused element isn't necessarily sent an eBlur event. See
   // nsFocusManager::ContentRemoved(). This means that a widget may think it
   // still contains a focused plugin when it doesn't -- which in turn can
   // disable text input in the browser window. See bug 1137229.
   HTMLObjectElement::OnFocusBlurPlugin(this, false);
 #endif
   nsObjectLoadingContent::UnbindFromTree(aDeep, aNullParent);
   nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
 }
 
 nsresult
-HTMLSharedObjectElement::AfterSetAttr(int32_t aNamespaceID, nsIAtom* aName,
-                                      const nsAttrValue* aValue,
-                                      const nsAttrValue* aOldValue,
-                                      bool aNotify)
+HTMLEmbedElement::AfterSetAttr(int32_t aNamespaceID, nsIAtom* aName,
+                               const nsAttrValue* aValue,
+                               const nsAttrValue* aOldValue,
+                               bool aNotify)
 {
   if (aValue) {
     nsresult rv = AfterMaybeChangeAttr(aNamespaceID, aName, aNotify);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   return nsGenericHTMLElement::AfterSetAttr(aNamespaceID, aName, aValue,
                                             aOldValue, aNotify);
 }
 
 nsresult
-HTMLSharedObjectElement::OnAttrSetButNotChanged(int32_t aNamespaceID,
-                                                nsIAtom* aName,
-                                                const nsAttrValueOrString& aValue,
-                                                bool aNotify)
+HTMLEmbedElement::OnAttrSetButNotChanged(int32_t aNamespaceID,
+                                         nsIAtom* aName,
+                                         const nsAttrValueOrString& aValue,
+                                         bool aNotify)
 {
   nsresult rv = AfterMaybeChangeAttr(aNamespaceID, aName, aNotify);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return nsGenericHTMLElement::OnAttrSetButNotChanged(aNamespaceID, aName,
                                                       aValue, aNotify);
 }
 
 nsresult
-HTMLSharedObjectElement::AfterMaybeChangeAttr(int32_t aNamespaceID,
-                                              nsIAtom* aName,
-                                              bool aNotify)
+HTMLEmbedElement::AfterMaybeChangeAttr(int32_t aNamespaceID,
+                                       nsIAtom* aName,
+                                       bool aNotify)
 {
   if (aNamespaceID == kNameSpaceID_None) {
-    if (aName == URIAttrName()) {
+    if (aName == nsGkAtoms::src) {
       // If aNotify is false, we are coming from the parser or some such place;
       // we'll get bound after all the attributes have been set, so we'll do the
-      // object load from BindToTree/DoneAddingChildren.
+      // object load from BindToTree.
       // Skip the LoadObject call in that case.
       // We also don't want to start loading the object when we're not yet in
       // a document, just in case that the caller wants to set additional
       // attributes before inserting the node into the document.
-      if (aNotify && IsInComposedDoc() && mIsDoneAddingChildren &&
+      if (aNotify && IsInComposedDoc() &&
           !BlockEmbedOrObjectContentLoading()) {
         nsresult rv = LoadObject(aNotify, true);
         NS_ENSURE_SUCCESS(rv, rv);
       }
     }
   }
 
   return NS_OK;
 }
 
 bool
-HTMLSharedObjectElement::IsHTMLFocusable(bool aWithMouse,
-                                         bool *aIsFocusable,
-                                         int32_t *aTabIndex)
+HTMLEmbedElement::IsHTMLFocusable(bool aWithMouse,
+                                  bool *aIsFocusable,
+                                  int32_t *aTabIndex)
 {
-  if (mNodeInfo->Equals(nsGkAtoms::embed) || Type() == eType_Plugin) {
-    // Has plugin content: let the plugin decide what to do in terms of
-    // internal focus from mouse clicks
-    if (aTabIndex) {
-      *aTabIndex = TabIndex();
-    }
-
-    *aIsFocusable = true;
-
-    // Let the plugin decide, so override.
-    return true;
+  // Has plugin content: let the plugin decide what to do in terms of
+  // internal focus from mouse clicks
+  if (aTabIndex) {
+    *aTabIndex = TabIndex();
   }
 
-  return nsGenericHTMLElement::IsHTMLFocusable(aWithMouse, aIsFocusable, aTabIndex);
+  *aIsFocusable = true;
+
+  // Let the plugin decide, so override.
+  return true;
 }
 
 nsIContent::IMEState
-HTMLSharedObjectElement::GetDesiredIMEState()
+HTMLEmbedElement::GetDesiredIMEState()
 {
   if (Type() == eType_Plugin) {
     return IMEState(IMEState::PLUGIN);
   }
 
   return nsGenericHTMLElement::GetDesiredIMEState();
 }
 
-NS_IMPL_STRING_ATTR(HTMLSharedObjectElement, Align, align)
-NS_IMPL_STRING_ATTR(HTMLSharedObjectElement, Alt, alt)
-NS_IMPL_STRING_ATTR(HTMLSharedObjectElement, Archive, archive)
-NS_IMPL_STRING_ATTR(HTMLSharedObjectElement, Code, code)
-NS_IMPL_URI_ATTR(HTMLSharedObjectElement, CodeBase, codebase)
-NS_IMPL_STRING_ATTR(HTMLSharedObjectElement, Height, height)
-NS_IMPL_INT_ATTR(HTMLSharedObjectElement, Hspace, hspace)
-NS_IMPL_STRING_ATTR(HTMLSharedObjectElement, Name, name)
-NS_IMPL_URI_ATTR_WITH_BASE(HTMLSharedObjectElement, Object, object, codebase)
-NS_IMPL_URI_ATTR(HTMLSharedObjectElement, Src, src)
-NS_IMPL_STRING_ATTR(HTMLSharedObjectElement, Type, type)
-NS_IMPL_INT_ATTR(HTMLSharedObjectElement, Vspace, vspace)
-NS_IMPL_STRING_ATTR(HTMLSharedObjectElement, Width, width)
-
 int32_t
-HTMLSharedObjectElement::TabIndexDefault()
+HTMLEmbedElement::TabIndexDefault()
 {
   return -1;
 }
 
 bool
-HTMLSharedObjectElement::ParseAttribute(int32_t aNamespaceID,
-                                        nsIAtom *aAttribute,
-                                        const nsAString &aValue,
-                                        nsAttrValue &aResult)
+HTMLEmbedElement::ParseAttribute(int32_t aNamespaceID,
+                                 nsIAtom *aAttribute,
+                                 const nsAString &aValue,
+                                 nsAttrValue &aResult)
 {
   if (aNamespaceID == kNameSpaceID_None) {
     if (aAttribute == nsGkAtoms::align) {
       return ParseAlignValue(aValue, aResult);
     }
     if (ParseImageAttribute(aAttribute, aValue, aResult)) {
       return true;
     }
@@ -299,123 +256,110 @@ static void
 MapAttributesIntoRuleExceptHidden(const nsMappedAttributes *aAttributes,
                                   GenericSpecifiedValues* aData)
 {
   MapAttributesIntoRuleBase(aAttributes, aData);
   nsGenericHTMLElement::MapCommonAttributesIntoExceptHidden(aAttributes, aData);
 }
 
 void
-HTMLSharedObjectElement::MapAttributesIntoRule(const nsMappedAttributes *aAttributes,
-                                               GenericSpecifiedValues* aData)
+HTMLEmbedElement::MapAttributesIntoRule(const nsMappedAttributes *aAttributes,
+                                        GenericSpecifiedValues* aData)
 {
   MapAttributesIntoRuleBase(aAttributes, aData);
   nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
 }
 
 NS_IMETHODIMP_(bool)
-HTMLSharedObjectElement::IsAttributeMapped(const nsIAtom *aAttribute) const
+HTMLEmbedElement::IsAttributeMapped(const nsIAtom *aAttribute) const
 {
   static const MappedAttributeEntry* const map[] = {
     sCommonAttributeMap,
     sImageMarginSizeAttributeMap,
     sImageBorderAttributeMap,
     sImageAlignAttributeMap,
   };
 
   return FindAttributeDependence(aAttribute, map);
 }
 
 
 nsMapRuleToAttributesFunc
-HTMLSharedObjectElement::GetAttributeMappingFunction() const
+HTMLEmbedElement::GetAttributeMappingFunction() const
 {
-  if (mNodeInfo->Equals(nsGkAtoms::embed)) {
-    return &MapAttributesIntoRuleExceptHidden;
-  }
-
-  return &MapAttributesIntoRule;
+  return &MapAttributesIntoRuleExceptHidden;
 }
 
 void
-HTMLSharedObjectElement::StartObjectLoad(bool aNotify, bool aForceLoad)
+HTMLEmbedElement::StartObjectLoad(bool aNotify, bool aForceLoad)
 {
   // BindToTree can call us asynchronously, and we may be removed from the tree
   // in the interim
   if (!IsInComposedDoc() || !OwnerDoc()->IsActive() ||
       BlockEmbedOrObjectContentLoading()) {
     return;
   }
 
   LoadObject(aNotify, aForceLoad);
   SetIsNetworkCreated(false);
 }
 
 EventStates
-HTMLSharedObjectElement::IntrinsicState() const
+HTMLEmbedElement::IntrinsicState() const
 {
   return nsGenericHTMLElement::IntrinsicState() | ObjectState();
 }
 
 uint32_t
-HTMLSharedObjectElement::GetCapabilities() const
+HTMLEmbedElement::GetCapabilities() const
 {
-  uint32_t capabilities = eSupportPlugins | eAllowPluginSkipChannel;
-  if (mNodeInfo->Equals(nsGkAtoms::embed)) {
-    capabilities |= eSupportImages | eSupportDocuments;
-  }
-
-  return capabilities;
+  return eSupportPlugins | eAllowPluginSkipChannel | eSupportImages | eSupportDocuments;
 }
 
 void
-HTMLSharedObjectElement::DestroyContent()
+HTMLEmbedElement::DestroyContent()
 {
   nsObjectLoadingContent::DestroyContent();
   nsGenericHTMLElement::DestroyContent();
 }
 
 nsresult
-HTMLSharedObjectElement::CopyInnerTo(Element* aDest, bool aPreallocateChildren)
+HTMLEmbedElement::CopyInnerTo(Element* aDest, bool aPreallocateChildren)
 {
   nsresult rv = nsGenericHTMLElement::CopyInnerTo(aDest, aPreallocateChildren);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (aDest->OwnerDoc()->IsStaticDocument()) {
-    CreateStaticClone(static_cast<HTMLSharedObjectElement*>(aDest));
+    CreateStaticClone(static_cast<HTMLEmbedElement*>(aDest));
   }
 
   return rv;
 }
 
 JSObject*
-HTMLSharedObjectElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
+HTMLEmbedElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
 {
   JSObject* obj;
-  if (mNodeInfo->Equals(nsGkAtoms::applet)) {
-    obj = HTMLAppletElementBinding::Wrap(aCx, this, aGivenProto);
-  } else {
-    MOZ_ASSERT(mNodeInfo->Equals(nsGkAtoms::embed));
-    obj = HTMLEmbedElementBinding::Wrap(aCx, this, aGivenProto);
-  }
+  obj = HTMLEmbedElementBinding::Wrap(aCx, this, aGivenProto);
+
   if (!obj) {
     return nullptr;
   }
   JS::Rooted<JSObject*> rootedObj(aCx, obj);
   SetupProtoChain(aCx, rootedObj);
   return rootedObj;
 }
 
 nsContentPolicyType
-HTMLSharedObjectElement::GetContentPolicyType() const
+HTMLEmbedElement::GetContentPolicyType() const
 {
-  if (mNodeInfo->Equals(nsGkAtoms::applet)) {
-    // We use TYPE_INTERNAL_OBJECT for applet too, since it is not exposed
-    // through RequestContext yet.
-    return nsIContentPolicy::TYPE_INTERNAL_OBJECT;
-  } else {
-    MOZ_ASSERT(mNodeInfo->Equals(nsGkAtoms::embed));
-    return nsIContentPolicy::TYPE_INTERNAL_EMBED;
-  }
+  return nsIContentPolicy::TYPE_INTERNAL_EMBED;
 }
 
+NS_IMPL_STRING_ATTR(HTMLEmbedElement, Align, align)
+NS_IMPL_STRING_ATTR(HTMLEmbedElement, Width, width)
+NS_IMPL_STRING_ATTR(HTMLEmbedElement, Height, height)
+NS_IMPL_STRING_ATTR(HTMLEmbedElement, Name, name)
+NS_IMPL_URI_ATTR(HTMLEmbedElement, Src, src)
+NS_IMPL_STRING_ATTR(HTMLEmbedElement, Type, type)
+
 } // namespace dom
 } // namespace mozilla
rename from dom/html/HTMLSharedObjectElement.h
rename to dom/html/HTMLEmbedElement.h
--- a/dom/html/HTMLSharedObjectElement.h
+++ b/dom/html/HTMLEmbedElement.h
@@ -1,198 +1,127 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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_dom_HTMLSharedObjectElement_h
-#define mozilla_dom_HTMLSharedObjectElement_h
+#ifndef mozilla_dom_HTMLEmbedElement_h
+#define mozilla_dom_HTMLEmbedElement_h
 
 #include "mozilla/Attributes.h"
 #include "nsGenericHTMLElement.h"
 #include "nsObjectLoadingContent.h"
 #include "nsGkAtoms.h"
 #include "nsError.h"
-#include "nsIDOMHTMLAppletElement.h"
 #include "nsIDOMHTMLEmbedElement.h"
 
 namespace mozilla {
 namespace dom {
 
-class HTMLSharedObjectElement final : public nsGenericHTMLElement
-                                    , public nsObjectLoadingContent
-                                    , public nsIDOMHTMLAppletElement
-                                    , public nsIDOMHTMLEmbedElement
+class HTMLEmbedElement final : public nsGenericHTMLElement
+                             , public nsObjectLoadingContent
+                             , public nsIDOMHTMLEmbedElement
 {
 public:
-  explicit HTMLSharedObjectElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
-                                   mozilla::dom::FromParser aFromParser = mozilla::dom::NOT_FROM_PARSER);
+  explicit HTMLEmbedElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
+                            mozilla::dom::FromParser aFromParser = mozilla::dom::NOT_FROM_PARSER);
 
+  NS_DECL_NSIDOMHTMLEMBEDELEMENT
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
-
+  NS_IMPL_FROMCONTENT_HTML_WITH_TAG(HTMLEmbedElement, embed)
   virtual int32_t TabIndexDefault() override;
 
 #ifdef XP_MACOSX
   // nsIDOMEventTarget
   NS_IMETHOD PostHandleEvent(EventChainPostVisitor& aVisitor) override;
 #endif
 
-  // nsIDOMHTMLAppletElement
-  NS_DECL_NSIDOMHTMLAPPLETELEMENT
-
-  // Can't use macro for nsIDOMHTMLEmbedElement because it has conflicts with
-  // NS_DECL_NSIDOMHTMLAPPLETELEMENT.
-
   // EventTarget
   virtual void AsyncEventRunning(AsyncEventDispatcher* aEvent) override;
 
-  // nsIDOMHTMLEmbedElement
-  NS_IMETHOD GetSrc(nsAString &aSrc) override;
-  NS_IMETHOD SetSrc(const nsAString &aSrc) override;
-  NS_IMETHOD GetType(nsAString &aType) override;
-  NS_IMETHOD SetType(const nsAString &aType) override;
-
   virtual nsresult BindToTree(nsIDocument *aDocument, nsIContent *aParent,
                               nsIContent *aBindingParent,
                               bool aCompileEventHandlers) override;
   virtual void UnbindFromTree(bool aDeep = true,
                               bool aNullParent = true) override;
 
   virtual bool IsHTMLFocusable(bool aWithMouse, bool *aIsFocusable, int32_t *aTabIndex) override;
   virtual IMEState GetDesiredIMEState() override;
 
-  virtual void DoneAddingChildren(bool aHaveNotified) override;
-  virtual bool IsDoneAddingChildren() override;
-
   virtual bool ParseAttribute(int32_t aNamespaceID,
-                                nsIAtom *aAttribute,
-                                const nsAString &aValue,
-                                nsAttrValue &aResult) override;
+                              nsIAtom *aAttribute,
+                              const nsAString &aValue,
+                              nsAttrValue &aResult) override;
   virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const override;
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom *aAttribute) const override;
   virtual EventStates IntrinsicState() const override;
   virtual void DestroyContent() override;
 
   // nsObjectLoadingContent
   virtual uint32_t GetCapabilities() const override;
 
   virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult,
                          bool aPreallocateChildren) const override;
 
   nsresult CopyInnerTo(Element* aDest, bool aPreallocateChildren);
 
   void StartObjectLoad() { StartObjectLoad(true, false); }
 
-  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED_NO_UNLINK(HTMLSharedObjectElement,
+  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED_NO_UNLINK(HTMLEmbedElement,
                                                      nsGenericHTMLElement)
 
-  // WebIDL API for <applet>
+  // WebIDL <embed> api
   void GetAlign(DOMString& aValue)
   {
     GetHTMLAttr(nsGkAtoms::align, aValue);
   }
   void SetAlign(const nsAString& aValue, ErrorResult& aRv)
   {
     SetHTMLAttr(nsGkAtoms::align, aValue, aRv);
   }
-  void GetAlt(DOMString& aValue)
-  {
-    GetHTMLAttr(nsGkAtoms::alt, aValue);
-  }
-  void SetAlt(const nsAString& aValue, ErrorResult& aRv)
-  {
-    SetHTMLAttr(nsGkAtoms::alt, aValue, aRv);
-  }
-  void GetArchive(DOMString& aValue)
-  {
-    GetHTMLAttr(nsGkAtoms::archive, aValue);
-  }
-  void SetArchive(const nsAString& aValue, ErrorResult& aRv)
-  {
-    SetHTMLAttr(nsGkAtoms::archive, aValue, aRv);
-  }
-  void GetCode(DOMString& aValue)
-  {
-    GetHTMLAttr(nsGkAtoms::code, aValue);
-  }
-  void SetCode(const nsAString& aValue, ErrorResult& aRv)
-  {
-    SetHTMLAttr(nsGkAtoms::code, aValue, aRv);
-  }
-  // XPCOM GetCodebase is ok; note that it's a URI attribute
-  void SetCodeBase(const nsAString& aValue, ErrorResult& aRv)
-  {
-    SetHTMLAttr(nsGkAtoms::codebase, aValue, aRv);
-  }
   void GetHeight(DOMString& aValue)
   {
     GetHTMLAttr(nsGkAtoms::height, aValue);
   }
   void SetHeight(const nsAString& aValue, ErrorResult& aRv)
   {
     SetHTMLAttr(nsGkAtoms::height, aValue, aRv);
   }
-  uint32_t Hspace()
-  {
-    return GetUnsignedIntAttr(nsGkAtoms::hspace, 0);
-  }
-  void SetHspace(uint32_t aValue, ErrorResult& aRv)
-  {
-    SetUnsignedIntAttr(nsGkAtoms::hspace, aValue, 0, aRv);
-  }
   void GetName(DOMString& aValue)
   {
     GetHTMLAttr(nsGkAtoms::name, aValue);
   }
   void SetName(const nsAString& aValue, ErrorResult& aRv)
   {
     SetHTMLAttr(nsGkAtoms::name, aValue, aRv);
   }
-  // XPCOM GetObject is ok; note that it's a URI attribute with a weird base URI
-  void SetObject(const nsAString& aValue, ErrorResult& aRv)
-  {
-    SetHTMLAttr(nsGkAtoms::object, aValue, aRv);
-  }
-  uint32_t Vspace()
-  {
-    return GetUnsignedIntAttr(nsGkAtoms::vspace, 0);
-  }
-  void SetVspace(uint32_t aValue, ErrorResult& aRv)
-  {
-    SetUnsignedIntAttr(nsGkAtoms::vspace, aValue, 0, aRv);
-  }
   void GetWidth(DOMString& aValue)
   {
     GetHTMLAttr(nsGkAtoms::width, aValue);
   }
   void SetWidth(const nsAString& aValue, ErrorResult& aRv)
   {
     SetHTMLAttr(nsGkAtoms::width, aValue, aRv);
   }
-
   // WebIDL <embed> api
   // XPCOM GetSrc is ok; note that it's a URI attribute
   void SetSrc(const nsAString& aValue, ErrorResult& aRv)
   {
     SetHTMLAttr(nsGkAtoms::src, aValue, aRv);
   }
   void GetType(DOMString& aValue)
   {
     GetHTMLAttr(nsGkAtoms::type, aValue);
   }
   void SetType(const nsAString& aValue, ErrorResult& aRv)
   {
     SetHTMLAttr(nsGkAtoms::type, aValue, aRv);
   }
-  // width covered by <applet>
-  // height covered by <applet>
-  // align covered by <applet>
-  // name covered by <applet>
   nsIDocument*
   GetSVGDocument(nsIPrincipal& aSubjectPrincipal)
   {
     return GetContentDocument(aSubjectPrincipal);
   }
 
   /**
    * Calls LoadObject with the correct arguments to start the plugin load.
@@ -207,31 +136,20 @@ protected:
                                 const nsAttrValue* aValue,
                                 const nsAttrValue* aOldValue,
                                 bool aNotify) override;
   virtual nsresult OnAttrSetButNotChanged(int32_t aNamespaceID, nsIAtom* aName,
                                           const nsAttrValueOrString& aValue,
                                           bool aNotify) override;
 
 private:
-  virtual ~HTMLSharedObjectElement();
-
-  nsIAtom *URIAttrName() const
-  {
-    return mNodeInfo->Equals(nsGkAtoms::applet) ?
-           nsGkAtoms::code :
-           nsGkAtoms::src;
-  }
+  ~HTMLEmbedElement();
 
   nsContentPolicyType GetContentPolicyType() const override;
 
-  // mIsDoneAddingChildren is only really used for <applet>.  This boolean is
-  // always true for <embed>, per the documentation in nsIContent.h.
-  bool mIsDoneAddingChildren;
-
   virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
                                     GenericSpecifiedValues* aGenericData);
 
   /**
    * This function is called by AfterSetAttr and OnAttrSetButNotChanged.
    * It will not be called if the value is being unset.
@@ -242,9 +160,9 @@ private:
    */
   nsresult AfterMaybeChangeAttr(int32_t aNamespaceID, nsIAtom* aName,
                                 bool aNotify);
 };
 
 } // namespace dom
 } // namespace mozilla
 
-#endif // mozilla_dom_HTMLSharedObjectElement_h
+#endif // mozilla_dom_HTMLEmbedElement_h
--- a/dom/html/HTMLObjectElement.cpp
+++ b/dom/html/HTMLObjectElement.cpp
@@ -555,17 +555,17 @@ EventStates
 HTMLObjectElement::IntrinsicState() const
 {
   return nsGenericHTMLFormElement::IntrinsicState() | ObjectState();
 }
 
 uint32_t
 HTMLObjectElement::GetCapabilities() const
 {
-  return nsObjectLoadingContent::GetCapabilities() | eSupportClassID;
+  return nsObjectLoadingContent::GetCapabilities();
 }
 
 void
 HTMLObjectElement::DestroyContent()
 {
   nsObjectLoadingContent::DestroyContent();
   nsGenericHTMLFormElement::DestroyContent();
 }
--- a/dom/html/moz.build
+++ b/dom/html/moz.build
@@ -55,16 +55,17 @@ EXPORTS.mozilla.dom += [
     'HTMLButtonElement.h',
     'HTMLCanvasElement.h',
     'HTMLContentElement.h',
     'HTMLDataElement.h',
     'HTMLDataListElement.h',
     'HTMLDetailsElement.h',
     'HTMLDialogElement.h',
     'HTMLDivElement.h',
+    'HTMLEmbedElement.h',
     'HTMLFieldSetElement.h',
     'HTMLFontElement.h',
     'HTMLFormControlsCollection.h',
     'HTMLFormElement.h',
     'HTMLFormSubmission.h',
     'HTMLFrameElement.h',
     'HTMLFrameSetElement.h',
     'HTMLHeadingElement.h',
@@ -92,17 +93,16 @@ EXPORTS.mozilla.dom += [
     'HTMLPictureElement.h',
     'HTMLPreElement.h',
     'HTMLProgressElement.h',
     'HTMLScriptElement.h',
     'HTMLSelectElement.h',
     'HTMLShadowElement.h',
     'HTMLSharedElement.h',
     'HTMLSharedListElement.h',
-    'HTMLSharedObjectElement.h',
     'HTMLSourceElement.h',
     'HTMLSpanElement.h',
     'HTMLStyleElement.h',
     'HTMLSummaryElement.h',
     'HTMLTableCaptionElement.h',
     'HTMLTableCellElement.h',
     'HTMLTableColElement.h',
     'HTMLTableElement.h',
@@ -135,16 +135,17 @@ UNIFIED_SOURCES += [
     'HTMLCanvasElement.cpp',
     'HTMLContentElement.cpp',
     'HTMLDataElement.cpp',
     'HTMLDataListElement.cpp',
     'HTMLDetailsElement.cpp',
     'HTMLDialogElement.cpp',
     'HTMLDivElement.cpp',
     'HTMLElement.cpp',
+    'HTMLEmbedElement.cpp',
     'HTMLFieldSetElement.cpp',
     'HTMLFontElement.cpp',
     'HTMLFormControlsCollection.cpp',
     'HTMLFormElement.cpp',
     'HTMLFormSubmission.cpp',
     'HTMLFrameElement.cpp',
     'HTMLFrameSetElement.cpp',
     'HTMLHeadingElement.cpp',
@@ -172,17 +173,16 @@ UNIFIED_SOURCES += [
     'HTMLPictureElement.cpp',
     'HTMLPreElement.cpp',
     'HTMLProgressElement.cpp',
     'HTMLScriptElement.cpp',
     'HTMLSelectElement.cpp',
     'HTMLShadowElement.cpp',
     'HTMLSharedElement.cpp',
     'HTMLSharedListElement.cpp',
-    'HTMLSharedObjectElement.cpp',
     'HTMLSourceElement.cpp',
     'HTMLSpanElement.cpp',
     'HTMLStyleElement.cpp',
     'HTMLSummaryElement.cpp',
     'HTMLTableCaptionElement.cpp',
     'HTMLTableCellElement.cpp',
     'HTMLTableColElement.cpp',
     'HTMLTableElement.cpp',
--- a/dom/html/nsGenericHTMLElement.h
+++ b/dom/html/nsGenericHTMLElement.h
@@ -691,31 +691,29 @@ public:
 
   static bool TouchEventsEnabled(JSContext* /* unused */, JSObject* /* unused */);
 
   static inline bool
   CanHaveName(nsIAtom* aTag)
   {
     return aTag == nsGkAtoms::img ||
            aTag == nsGkAtoms::form ||
-           aTag == nsGkAtoms::applet ||
            aTag == nsGkAtoms::embed ||
            aTag == nsGkAtoms::object;
   }
   static inline bool
   ShouldExposeNameAsHTMLDocumentProperty(Element* aElement)
   {
     return aElement->IsHTMLElement() &&
            CanHaveName(aElement->NodeInfo()->NameAtom());
   }
   static inline bool
   ShouldExposeIdAsHTMLDocumentProperty(Element* aElement)
   {
-    if (aElement->IsAnyOfHTMLElements(nsGkAtoms::applet,
-                                      nsGkAtoms::embed,
+    if (aElement->IsAnyOfHTMLElements(nsGkAtoms::embed,
                                       nsGkAtoms::object)) {
       return true;
     }
 
     // Per spec, <img> is exposed by id only if it also has a nonempty
     // name (which doesn't have to match the id or anything).
     // HasName() is true precisely when name is nonempty.
     return aElement->IsHTMLElement(nsGkAtoms::img) && aElement->HasName();
@@ -1514,32 +1512,32 @@ NS_NewHTML##_elementName##Element(alread
 // Here, we expand 'NS_DECLARE_NS_NEW_HTML_ELEMENT()' by hand.
 // (Calling the macro directly (with no args) produces compiler warnings.)
 nsGenericHTMLElement*
 NS_NewHTMLElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
                   mozilla::dom::FromParser aFromParser = mozilla::dom::NOT_FROM_PARSER);
 
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Shared)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(SharedList)
-NS_DECLARE_NS_NEW_HTML_ELEMENT(SharedObject)
 
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Anchor)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Area)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Audio)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(BR)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Body)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Button)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Canvas)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Content)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Mod)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Data)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(DataList)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Details)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Dialog)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Div)
+NS_DECLARE_NS_NEW_HTML_ELEMENT(Embed)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(FieldSet)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Font)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Form)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Frame)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(FrameSet)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(HR)
 NS_DECLARE_NS_NEW_HTML_ELEMENT_AS_SHARED(Head)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Heading)
--- a/dom/html/nsHTMLDocument.cpp
+++ b/dom/html/nsHTMLDocument.cpp
@@ -1182,17 +1182,17 @@ nsHTMLDocument::GetApplets(nsIDOMHTMLCol
   NS_ADDREF(*aApplets = Applets());
   return NS_OK;
 }
 
 nsIHTMLCollection*
 nsHTMLDocument::Applets()
 {
   if (!mApplets) {
-    mApplets = new nsContentList(this, kNameSpaceID_XHTML, nsGkAtoms::applet, nsGkAtoms::applet);
+    mApplets = new nsEmptyContentList(this);
   }
   return mApplets;
 }
 
 bool
 nsHTMLDocument::MatchLinks(Element* aElement, int32_t aNamespaceID,
                            nsIAtom* aAtom, void* aData)
 {
--- a/dom/html/nsHTMLDocument.h
+++ b/dom/html/nsHTMLDocument.h
@@ -304,17 +304,17 @@ protected:
   /**
    * Like IsEditingOn(), but will flush as needed first.
    */
   bool IsEditingOnAfterFlush();
 
   void *GenerateParserKey(void);
 
   RefPtr<nsContentList> mImages;
-  RefPtr<nsContentList> mApplets;
+  RefPtr<nsEmptyContentList> mApplets;
   RefPtr<nsContentList> mEmbeds;
   RefPtr<nsContentList> mLinks;
   RefPtr<nsContentList> mAnchors;
   RefPtr<nsContentList> mScripts;
   RefPtr<nsContentList> mForms;
   RefPtr<nsContentList> mFormControls;
 
   RefPtr<mozilla::dom::HTMLAllCollection> mAll;
--- a/dom/html/test/mochitest.ini
+++ b/dom/html/test/mochitest.ini
@@ -189,17 +189,16 @@ support-files =
   script_fakepath.js
   object_bug287465_o1.html
   object_bug287465_o2.html
   object_bug556645.html
   file.webm
 
 [test_a_text.html]
 [test_anchor_href_cache_invalidation.html]
-[test_applet_attributes_reflection.html]
 [test_base_attributes_reflection.html]
 [test_bug100533.html]
 [test_bug109445.html]
 [test_bug109445.xhtml]
 [test_bug1297.html]
 [test_bug1366.html]
 [test_bug1400.html]
 [test_bug143220.html]
@@ -607,8 +606,9 @@ skip-if = os == "android" # up/down arro
 [test_bug1310865.html]
 [test_bug1315146.html]
 [test_fakepath.html]
 [test_script_module.html]
 support-files =
   file_script_module.html
   file_script_nomodule.html
 [test_getElementsByName_after_mutation.html]
+[test_bug1279218.html]
\ No newline at end of file
deleted file mode 100644
--- a/dom/html/test/test_applet_attributes_reflection.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <title>Test for HTMLAppletElement attributes reflection</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="application/javascript" src="reflect.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<p id="display"></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-<script type="application/javascript">
-
-/** Test for HTMLAppletElement attributes reflection **/
-
-// .align (String)
-reflectString({
-  element: document.createElement("applet"),
-  attribute: "align",
-});
-
-// .alt (String)
-reflectString({
-  element: document.createElement("applet"),
-  attribute: "alt",
-});
-
-// .archive (String)
-reflectString({
-  element: document.createElement("applet"),
-  attribute: "archive",
-});
-
-// .code (String)
-reflectString({
-  element: document.createElement("applet"),
-  attribute: "code",
-});
-
-// .codeBase (URL)
-reflectURL({
-  element: document.createElement("applet"),
-  attribute: "codeBase",
-});
-
-// .height (String)
-reflectString({
-  element: document.createElement("applet"),
-  attribute: "height",
-});
-
-// .hspace (unsigned int)
-reflectUnsignedInt({
-  element: document.createElement("applet"),
-  attribute: "hspace",
-});
-
-// .name (String)
-reflectString({
-  element: document.createElement("applet"),
-  attribute: "name",
-});
-
-// .object (URL)
-reflectURL({
-  element: document.createElement("applet"),
-  attribute: "object",
-});
-
-// .vspace (unsigned int)
-reflectUnsignedInt({
-  element: document.createElement("applet"),
-  attribute: "vspace",
-});
-
-// .width (String)
-reflectString({
-  element: document.createElement("applet"),
-  attribute: "width",
-});
-</script>
-</pre>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/dom/html/test/test_bug1279218.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML>
+<html>
+  <head>
+    <title>Test for Bug 1279218</title>
+    <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+    <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+    <script type="text/javascript">
+     function load() {
+       let applets = document.applets;
+       is(applets.length, 0, "Applet list length should be 0, even with applet tag in body");
+       SimpleTest.finish();
+     }
+
+     window.onload=load;
+
+     SimpleTest.waitForExplicitFinish();
+    </script>
+  </head>
+  <body>
+    <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1279218">Mozilla Bug 1279218</a>
+    <applet id="applet-test"></applet>
+  </body>
+</html>
--- a/dom/html/test/test_bug389797.html
+++ b/dom/html/test/test_bug389797.html
@@ -74,17 +74,16 @@ var objectIfaces2 = [];
 for (var iface of objectIfaces) {
   objectIfaces2.push(iface);
 }
 objectIfaces2.push("nsIImageLoadingContent");
 
 /* List copy/pasted from nsHTMLTagList.h, with the second field modified to the
    correct classinfo (instead of the impl class) in the following cases:
 
-   applet
    base
    blockquote
    dir
    dl
    embed
    menu
    ol
    param
@@ -94,17 +93,16 @@ objectIfaces2.push("nsIImageLoadingConte
    head
    html
  */
 
 HTML_TAG("a", "Anchor");
 HTML_TAG("abbr", "");
 HTML_TAG("acronym", "");
 HTML_TAG("address", "");
-HTML_TAG("applet", "Applet", [], objectIfaces);
 HTML_TAG("area", "Area");
 HTML_TAG("article", "");
 HTML_TAG("aside", "");
 HTML_TAG("b", "");
 HTML_TAG("base", "Base");
 HTML_TAG("bdo", "");
 HTML_TAG("bgsound", "Unknown");
 HTML_TAG("big", "");
--- a/dom/html/test/test_bug579079.html
+++ b/dom/html/test/test_bug579079.html
@@ -17,26 +17,23 @@ https://bugzilla.mozilla.org/show_bug.cg
   <embed name="embed1"></embed>
   <object name="object1"></object>
 </div>
 
 <pre id="test">
 <script class="testbody" type="text/javascript">
 var img = document.img1;
 var form = document.form1;
-var applet = document.applet1;
 var embed = document.embed1;
 var object = document.object1;
 $("foo").innerHTML = $("foo").innerHTML;
 isnot(document.img1, img);
 ok(document.img1 instanceof HTMLImageElement);
 isnot(document.form1, form);
 ok(document.form1 instanceof HTMLFormElement);
-isnot(document.applet1, applet);
-ok(document.applet1 instanceof HTMLAppletElement);
 isnot(document.embed1, embed);
 ok(document.embed1 instanceof HTMLEmbedElement);
 isnot(document.object1, object);
 ok(document.object1 instanceof HTMLObjectElement);
 </script>
 </pre>
 </body>
 </html>
--- a/dom/html/test/test_documentAll.html
+++ b/dom/html/test/test_documentAll.html
@@ -105,29 +105,29 @@ ok(testArraysSame(document.all, allElems
 length = document.all.length;
 expectedLength = length + p.getElementsByTagName("*").length + 1;
 p.appendChild(p.cloneNode(true));
 ok(testArraysSame(document.all, allElems), "arrays still same");
 is(document.all.length, expectedLength, "grew correctly");
 
 // Check which elements the 'name' attribute works on
 var elementNames =
-  ['applet','abbr','acronym','address','area','a','b','base',
+  ['abbr','acronym','address','area','a','b','base',
    'bgsound','big','blockquote','br','canvas','center','cite','code',
    'col','colgroup','dd','del','dfn','dir','div','dir','dl','dt','em','embed',
    'fieldset','font','form','frame','frameset','head','i','iframe','img',
    'input','ins','isindex','kbd','keygen','label','li','legend','link','menu',
    'multicol','noscript','noframes','object','spacer','table','td','td','th',
    'thead','tfoot','tr','textarea','select','option','spacer','param',
    'marquee','hr','title','hx','tt','u','ul','var','wbr','sub','sup','cite',
    'code','q','nobr','ol','p','pre','s','samp','small','body','html','map',
    'bdo','legend','listing','style','script','tbody','caption','meta',
    'optgroup','button','span','strike','strong','td'].sort();
 var hasName =
-  ['applet','a','embed','form','iframe','img','input','object','textarea',
+  ['a','embed','form','iframe','img','input','object','textarea',
    'select','map','meta','button','frame','frameset'].sort();
 
 elementNames.forEach(function (name) {
   nameval = 'namefor' + name;
 
   e = document.createElement(name);
   p.appendChild(e);
   e.setAttribute('name', nameval);
--- a/dom/interfaces/html/moz.build
+++ b/dom/interfaces/html/moz.build
@@ -4,17 +4,16 @@
 # 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/.
 
 with Files("**"):
     BUG_COMPONENT = ("Core", "DOM")
 
 XPIDL_SOURCES += [
     'nsIDOMHTMLAnchorElement.idl',
-    'nsIDOMHTMLAppletElement.idl',
     'nsIDOMHTMLAreaElement.idl',
     'nsIDOMHTMLBaseElement.idl',
     'nsIDOMHTMLBodyElement.idl',
     'nsIDOMHTMLButtonElement.idl',
     'nsIDOMHTMLCanvasElement.idl',
     'nsIDOMHTMLCollection.idl',
     'nsIDOMHTMLDirectoryElement.idl',
     'nsIDOMHTMLDocument.idl',
deleted file mode 100644
--- a/dom/interfaces/html/nsIDOMHTMLAppletElement.idl
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- Mode: IDL; 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 "nsIDOMHTMLElement.idl"
-
-/**
- * The nsIDOMHTMLAppletElement interface is the interface to a [X]HTML
- * applet element.
- *
- * This interface is trying to follow the DOM Level 2 HTML specification:
- * http://www.w3.org/TR/DOM-Level-2-HTML/
- *
- * with changes from the work-in-progress WHATWG HTML specification:
- * http://www.whatwg.org/specs/web-apps/current-work/
- */
-
-[uuid(0b7d12c9-4cd3-47db-99c6-0b5ff910446c)]
-interface nsIDOMHTMLAppletElement : nsISupports
-{
-           attribute DOMString        align;
-           attribute DOMString        alt;
-           attribute DOMString        archive;
-           attribute DOMString        code;
-           attribute DOMString        codeBase;
-           attribute DOMString        height;
-  // Modified in DOM Level 2:
-           attribute long             hspace;
-           attribute DOMString        name;
-  // Modified in DOM Level 2:
-           attribute DOMString        object;
-  // Modified in DOM Level 2:
-           attribute long             vspace;
-           attribute DOMString        width;
-};
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -387,17 +387,16 @@ MediaDecoder::MediaDecoder(MediaDecoderI
   , INIT_MIRROR(mStateMachineDuration, NullableTimeUnit())
   , INIT_MIRROR(mPlaybackPosition, 0)
   , INIT_MIRROR(mIsAudioDataAudible, false)
   , INIT_CANONICAL(mVolume, aInit.mVolume)
   , INIT_CANONICAL(mPreservesPitch, aInit.mPreservesPitch)
   , INIT_CANONICAL(mLooping, aInit.mLooping)
   , INIT_CANONICAL(mExplicitDuration, Maybe<double>())
   , INIT_CANONICAL(mPlayState, PLAY_STATE_LOADING)
-  , INIT_CANONICAL(mNextState, PLAY_STATE_PAUSED)
   , INIT_CANONICAL(mLogicallySeeking, false)
   , INIT_CANONICAL(mSameOriginMedia, false)
   , INIT_CANONICAL(mMediaPrincipalHandle, PRINCIPAL_HANDLE_NONE)
   , INIT_CANONICAL(mPlaybackBytesPerSecond, 0.0)
   , INIT_CANONICAL(mPlaybackRateReliable, true)
   , INIT_CANONICAL(mDecoderPosition, 0)
   , mVideoDecodingOberver(new BackgroundVideoDecodingPermissionObserver(this))
   , mIsBackgroundVideoDecodingAllowed(false)
--- a/dom/media/MediaDecoder.h
+++ b/dom/media/MediaDecoder.h
@@ -730,20 +730,18 @@ protected:
   Canonical<Maybe<double>> mExplicitDuration;
 
   // Set to one of the valid play states.
   // This can only be changed on the main thread while holding the decoder
   // monitor. Thus, it can be safely read while holding the decoder monitor
   // OR on the main thread.
   Canonical<PlayState> mPlayState;
 
-  // This can only be changed on the main thread while holding the decoder
-  // monitor. Thus, it can be safely read while holding the decoder monitor
-  // OR on the main thread.
-  Canonical<PlayState> mNextState;
+  // This can only be changed on the main thread.
+  PlayState mNextState = PLAY_STATE_PAUSED;
 
   // True if the decoder is seeking.
   Canonical<bool> mLogicallySeeking;
 
   // True if the media is same-origin with the element. Data can only be
   // passed to MediaStreams when this is true.
   Canonical<bool> mSameOriginMedia;
 
@@ -783,17 +781,16 @@ public:
   {
     return &mLooping;
   }
   AbstractCanonical<Maybe<double>>* CanonicalExplicitDuration()
   {
     return &mExplicitDuration;
   }
   AbstractCanonical<PlayState>* CanonicalPlayState() { return &mPlayState; }
-  AbstractCanonical<PlayState>* CanonicalNextPlayState() { return &mNextState; }
   AbstractCanonical<bool>* CanonicalLogicallySeeking()
   {
     return &mLogicallySeeking;
   }
   AbstractCanonical<bool>* CanonicalSameOriginMedia()
   {
     return &mSameOriginMedia;
   }
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -2668,17 +2668,16 @@ ShutdownState::Enter()
   master->mVideoQueueListener.Disconnect();
   master->mMetadataManager.Disconnect();
   master->mOnMediaNotSeekable.Disconnect();
 
   // Disconnect canonicals and mirrors before shutting down our task queue.
   master->mBuffered.DisconnectIfConnected();
   master->mExplicitDuration.DisconnectIfConnected();
   master->mPlayState.DisconnectIfConnected();
-  master->mNextPlayState.DisconnectIfConnected();
   master->mVolume.DisconnectIfConnected();
   master->mPreservesPitch.DisconnectIfConnected();
   master->mLooping.DisconnectIfConnected();
   master->mSameOriginMedia.DisconnectIfConnected();
   master->mMediaPrincipalHandle.DisconnectIfConnected();
   master->mPlaybackBytesPerSecond.DisconnectIfConnected();
   master->mPlaybackRateReliable.DisconnectIfConnected();
   master->mDecoderPosition.DisconnectIfConnected();
@@ -2730,17 +2729,16 @@ MediaDecoderStateMachine::MediaDecoderSt
   mVideoDecodeSuspendTimer(mTaskQueue),
   mOutputStreamManager(new OutputStreamManager()),
   mResource(aDecoder->GetResource()),
   mVideoDecodeMode(VideoDecodeMode::Normal),
   mIsMSE(aDecoder->IsMSE()),
   INIT_MIRROR(mBuffered, TimeIntervals()),
   INIT_MIRROR(mExplicitDuration, Maybe<double>()),
   INIT_MIRROR(mPlayState, MediaDecoder::PLAY_STATE_LOADING),
-  INIT_MIRROR(mNextPlayState, MediaDecoder::PLAY_STATE_PAUSED),
   INIT_MIRROR(mVolume, 1.0),
   INIT_MIRROR(mPreservesPitch, true),
   INIT_MIRROR(mLooping, false),
   INIT_MIRROR(mSameOriginMedia, false),
   INIT_MIRROR(mMediaPrincipalHandle, PRINCIPAL_HANDLE_NONE),
   INIT_MIRROR(mPlaybackBytesPerSecond, 0.0),
   INIT_MIRROR(mPlaybackRateReliable, true),
   INIT_MIRROR(mDecoderPosition, 0),
@@ -2777,17 +2775,16 @@ void
 MediaDecoderStateMachine::InitializationTask(MediaDecoder* aDecoder)
 {
   MOZ_ASSERT(OnTaskQueue());
 
   // Connect mirrors.
   mBuffered.Connect(mReader->CanonicalBuffered());
   mExplicitDuration.Connect(aDecoder->CanonicalExplicitDuration());
   mPlayState.Connect(aDecoder->CanonicalPlayState());
-  mNextPlayState.Connect(aDecoder->CanonicalNextPlayState());
   mVolume.Connect(aDecoder->CanonicalVolume());
   mPreservesPitch.Connect(aDecoder->CanonicalPreservesPitch());
   mLooping.Connect(aDecoder->CanonicalLooping());
   mSameOriginMedia.Connect(aDecoder->CanonicalSameOriginMedia());
   mMediaPrincipalHandle.Connect(aDecoder->CanonicalMediaPrincipalHandle());
   mPlaybackBytesPerSecond.Connect(aDecoder->CanonicalPlaybackBytesPerSecond());
   mPlaybackRateReliable.Connect(aDecoder->CanonicalPlaybackRateReliable());
   mDecoderPosition.Connect(aDecoder->CanonicalDecoderPosition());
--- a/dom/media/MediaDecoderStateMachine.h
+++ b/dom/media/MediaDecoderStateMachine.h
@@ -525,28 +525,16 @@ private:
 
   // FrameID which increments every time a frame is pushed to our queue.
   FrameID mCurrentFrameID;
 
   // The highest timestamp that our position has reached. Monotonically
   // increasing.
   Watchable<media::TimeUnit> mObservedDuration;
 
-  // Returns true if we're logically playing, that is, if the Play() has
-  // been called and Pause() has not or we have not yet reached the end
-  // of media. This is irrespective of the seeking state; if the owner
-  // calls Play() and then Seek(), we still count as logically playing.
-  // The decoder monitor must be held.
-  bool IsLogicallyPlaying()
-  {
-    MOZ_ASSERT(OnTaskQueue());
-    return mPlayState == MediaDecoder::PLAY_STATE_PLAYING
-           || mNextPlayState == MediaDecoder::PLAY_STATE_PLAYING;
-  }
-
   // Media Fragment end time.
   media::TimeUnit mFragmentEndTime = media::TimeUnit::Invalid();
 
   // The media sink resource.  Used on the state machine thread.
   RefPtr<media::MediaSink> mMediaSink;
 
   const RefPtr<ReaderProxy> mReader;
 
@@ -680,19 +668,18 @@ private:
 
 private:
   // The buffered range. Mirrored from the decoder thread.
   Mirror<media::TimeIntervals> mBuffered;
 
   // The duration explicitly set by JS, mirrored from the main thread.
   Mirror<Maybe<double>> mExplicitDuration;
 
-  // The current play state and next play state, mirrored from the main thread.
+  // The current play state, mirrored from the main thread.
   Mirror<MediaDecoder::PlayState> mPlayState;
-  Mirror<MediaDecoder::PlayState> mNextPlayState;
 
   // Volume of playback. 0.0 = muted. 1.0 = full volume.
   Mirror<double> mVolume;
 
   // Pitch preservation for the playback rate.
   Mirror<bool> mPreservesPitch;
 
   // Whether to seek back to the start of the media resource
--- a/dom/media/MediaManager.cpp
+++ b/dom/media/MediaManager.cpp
@@ -525,16 +525,18 @@ public:
       RemoveAll();
     }
 
     return true;
   }
 
   void StopSharing();
 
+  void StopRawID(const nsString& removedDeviceID);
+
   /**
    * Called by one of our SourceListeners when one of its tracks has stopped.
    * Schedules an event for the next stable state to update chrome.
    */
   void NotifySourceTrackStopped();
 
   /**
    * Called in stable state to send a notification to update chrome.
@@ -1723,16 +1725,18 @@ MediaManager::EnumerateRawDevices(uint64
 
     RefPtr<MediaEngine> fakeBackend, realBackend;
     if (fakeCams || fakeMics) {
       fakeBackend = new MediaEngineDefault();
     }
     if ((!fakeCams && hasVideo) || (!fakeMics && hasAudio)) {
       RefPtr<MediaManager> manager = MediaManager_GetInstance();
       realBackend = manager->GetBackend(aWindowId);
+      // We need to listen to this event even JS didn't listen to it.
+      realBackend->AddDeviceChangeCallback(manager);
     }
 
     auto result = MakeUnique<SourceSet>();
 
     if (hasVideo) {
       nsTArray<RefPtr<VideoDevice>> videos;
       GetSources(fakeCams? fakeBackend : realBackend, aVideoType,
                  &MediaEngine::EnumerateVideoDevices, videos,
@@ -2034,29 +2038,78 @@ MediaManager::NotifyRecordingStatusChang
   return NS_OK;
 }
 
 int MediaManager::AddDeviceChangeCallback(DeviceChangeCallback* aCallback)
 {
   bool fakeDeviceChangeEventOn = mPrefs.mFakeDeviceChangeEventOn;
   MediaManager::PostTask(NewTaskFrom([fakeDeviceChangeEventOn]() {
     RefPtr<MediaManager> manager = MediaManager_GetInstance();
-    manager->GetBackend(0)->AddDeviceChangeCallback(manager);
     if (fakeDeviceChangeEventOn)
       manager->GetBackend(0)->SetFakeDeviceChangeEvents();
   }));
 
   return DeviceChangeCallback::AddDeviceChangeCallback(aCallback);
 }
 
+static void
+StopRawIDCallback(MediaManager *aThis,
+                   uint64_t aWindowID,
+                   GetUserMediaWindowListener *aListener,
+                   void *aData)
+{
+  if (!aListener || !aData) {
+    return;
+  }
+
+  nsString* removedDeviceID = static_cast<nsString*>(aData);
+  aListener->StopRawID(*removedDeviceID);
+}
+
+
 void MediaManager::OnDeviceChange() {
   RefPtr<MediaManager> self(this);
-  NS_DispatchToMainThread(media::NewRunnableFrom([self,this]() mutable {
+  NS_DispatchToMainThread(media::NewRunnableFrom([self]() mutable {
     MOZ_ASSERT(NS_IsMainThread());
-    DeviceChangeCallback::OnDeviceChange();
+    self->DeviceChangeCallback::OnDeviceChange();
+
+    // On some Windows machine, if we call EnumertaeRawDevices immediately after receiving
+    // devicechange event, sometimes we would get outdated devices list.
+    PR_Sleep(PR_MillisecondsToInterval(100));
+    RefPtr<PledgeSourceSet> p = self->EnumerateRawDevices(0, MediaSourceEnum::Camera, MediaSourceEnum::Microphone, false);
+    p->Then([self](SourceSet*& aDevices) mutable {
+      UniquePtr<SourceSet> devices(aDevices);
+      nsTArray<nsString> deviceIDs;
+
+      for (auto& device : *devices) {
+        nsString id;
+        device->GetId(id);
+        id.ReplaceSubstring(NS_LITERAL_STRING("default: "), NS_LITERAL_STRING(""));
+        if (!deviceIDs.Contains(id)) {
+          deviceIDs.AppendElement(id);
+        }
+      }
+
+      for (auto& id : self->mDeviceIDs) {
+        if (!deviceIDs.Contains(id)) {
+          // Stop the coresponding SourceListener
+          nsGlobalWindow::WindowByIdTable* windowsById = nsGlobalWindow::GetWindowsTable();
+          if (windowsById) {
+            for (auto iter = windowsById->Iter(); !iter.Done(); iter.Next()) {
+              nsGlobalWindow* window = iter.Data();
+              if (window->IsInnerWindow()) {
+                self->IterateWindowListeners(window->AsInner(), StopRawIDCallback, &id);
+              }
+            }
+          }
+        }
+      }
+
+      self->mDeviceIDs = deviceIDs;
+    }, [](MediaStreamError*& reason) {});
     return NS_OK;
   }));
 }
 
 nsresult MediaManager::GenerateUUID(nsAString& aResult)
 {
   nsresult rv;
   nsCOMPtr<nsIUUIDGenerator> uuidgen =
@@ -2647,24 +2700,44 @@ MediaManager::EnumerateDevicesImpl(uint6
   RefPtr<Pledge<nsCString>> p = media::GetPrincipalKey(principalInfo, persist);
   p->Then([id, aWindowId, aVideoType, aAudioType,
            aFake](const nsCString& aOriginKey) mutable {
     MOZ_ASSERT(NS_IsMainThread());
     RefPtr<MediaManager> mgr = MediaManager_GetInstance();
 
     RefPtr<PledgeSourceSet> p = mgr->EnumerateRawDevices(aWindowId, aVideoType,
                                                          aAudioType, aFake);
-    p->Then([id, aWindowId, aOriginKey](SourceSet*& aDevices) mutable {
+    p->Then([id,
+             aWindowId,
+             aOriginKey,
+             aFake,
+             aVideoType,
+             aAudioType](SourceSet*& aDevices) mutable {
       UniquePtr<SourceSet> devices(aDevices); // secondary result
 
       // Only run if window is still on our active list.
       RefPtr<MediaManager> mgr = MediaManager_GetInstance();
       if (!mgr) {
         return NS_OK;
       }
+
+      if (aVideoType == MediaSourceEnum::Camera &&
+          aAudioType == MediaSourceEnum::Microphone &&
+          !aFake) {
+        mgr->mDeviceIDs.Clear();
+        for (auto& device : *devices) {
+          nsString id;
+          device->GetId(id);
+          id.ReplaceSubstring(NS_LITERAL_STRING("default: "), NS_LITERAL_STRING(""));
+          if (!mgr->mDeviceIDs.Contains(id)) {
+            mgr->mDeviceIDs.AppendElement(id);
+          }
+        }
+      }
+
       RefPtr<PledgeSourceSet> p = mgr->mOutstandingPledges.Remove(id);
       if (!p || !mgr->IsWindowStillActive(aWindowId)) {
         return NS_OK;
       }
       MediaManager_AnonymizeDevices(*devices, aOriginKey);
       p->Resolve(devices.release());
       return NS_OK;
     });
@@ -2982,16 +3055,17 @@ MediaManager::Shutdown()
     prefs->RemoveObserver("media.navigator.audio.full_duplex", this);
   }
 
   // Close off any remaining active windows.
   GetActiveWindows()->Clear();
   mActiveCallbacks.Clear();
   mCallIds.Clear();
   mPendingGUMRequest.Clear();
+  mDeviceIDs.Clear();
 #ifdef MOZ_WEBRTC
   StopWebRtcLog();
 #endif
 
   // Because mMediaThread is not an nsThread, we must dispatch to it so it can
   // clean up BackgroundChild. Continue stopping thread once this is done.
 
   class ShutdownTask : public Runnable
@@ -3973,16 +4047,39 @@ GetUserMediaWindowListener::StopSharing(
   MOZ_ASSERT(NS_IsMainThread(), "Only call on main thread");
 
   for (auto& source : mActiveListeners) {
     source->StopSharing();
   }
 }
 
 void
+GetUserMediaWindowListener::StopRawID(const nsString& removedDeviceID)
+{
+  MOZ_ASSERT(NS_IsMainThread(), "Only call on main thread");
+
+  for (auto& source : mActiveListeners) {
+    if (source->GetAudioDevice()) {
+      nsString id;
+      source->GetAudioDevice()->GetRawId(id);
+      if (removedDeviceID.Equals(id)) {
+        source->Stop();
+      }
+    }
+    if (source->GetVideoDevice()) {
+      nsString id;
+      source->GetVideoDevice()->GetRawId(id);
+      if (removedDeviceID.Equals(id)) {
+        source->Stop();
+      }
+    }
+  }
+}
+
+void
 GetUserMediaWindowListener::NotifySourceTrackStopped()
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   // We wait until stable state before notifying chrome so chrome only does one
   // update if more tracks are stopped in this event loop.
 
   if (mChromeNotificationTaskPosted) {
--- a/dom/media/MediaManager.h
+++ b/dom/media/MediaManager.h
@@ -329,16 +329,17 @@ private:
   // ONLY accessed from MediaManagerThread
   RefPtr<MediaEngine> mBackend;
 
   static StaticRefPtr<MediaManager> sSingleton;
 
   media::CoatCheck<PledgeSourceSet> mOutstandingPledges;
   media::CoatCheck<PledgeChar> mOutstandingCharPledges;
   media::CoatCheck<PledgeVoid> mOutstandingVoidPledges;
+  nsTArray<nsString> mDeviceIDs;
 public:
   media::CoatCheck<media::Pledge<nsCString>> mGetPrincipalKeyPledges;
   RefPtr<media::Parent<media::NonE10s>> mNonE10sParent;
 };
 
 } // namespace mozilla
 
 #endif // MOZILLA_MEDIAMANAGER_H
--- a/dom/media/hls/HLSDemuxer.cpp
+++ b/dom/media/hls/HLSDemuxer.cpp
@@ -248,24 +248,24 @@ HLSDemuxer::OnTaskQueue() const
 {
   return mTaskQueue->IsCurrentThreadIn();
 }
 
 HLSDemuxer::~HLSDemuxer()
 {
   HLS_DEBUG("HLSDemuxer", "~HLSDemuxer()");
   mCallbackSupport->Detach();
-  if (mJavaCallbacks) {
-    HLSDemuxerCallbacksSupport::DisposeNative(mJavaCallbacks);
-    mJavaCallbacks = nullptr;
-  }
   if (mHLSDemuxerWrapper) {
     mHLSDemuxerWrapper->Destroy();
     mHLSDemuxerWrapper = nullptr;
   }
+  if (mJavaCallbacks) {
+      HLSDemuxerCallbacksSupport::DisposeNative(mJavaCallbacks);
+      mJavaCallbacks = nullptr;
+  }
   mInitPromise.RejectIfExists(NS_ERROR_DOM_MEDIA_CANCELED, __func__);
 }
 
 HLSTrackDemuxer::HLSTrackDemuxer(HLSDemuxer* aParent,
                                  TrackInfo::TrackType aType,
                                  UniquePtr<TrackInfo> aTrackInfo)
   : mParent(aParent)
   , mType(aType)
--- a/dom/media/hls/HLSResource.cpp
+++ b/dom/media/hls/HLSResource.cpp
@@ -95,19 +95,19 @@ void HLSResource::Resume()
 
 HLSResource::~HLSResource()
 {
   HLS_DEBUG("HLSResource", "~HLSResource()");
   if (mCallbackSupport) {
     mCallbackSupport->Detach();
     mCallbackSupport = nullptr;
   }
-  if (mJavaCallbacks) {
-    HLSResourceCallbacksSupport::DisposeNative(mJavaCallbacks);
-    mJavaCallbacks = nullptr;
-  }
   if (mHLSResourceWrapper) {
     mHLSResourceWrapper->Destroy();
     mHLSResourceWrapper = nullptr;
   }
+  if (mJavaCallbacks) {
+      HLSResourceCallbacksSupport::DisposeNative(mJavaCallbacks);
+      mJavaCallbacks = nullptr;
+  }
 }
 
 } // namespace mozilla
--- a/dom/media/mediasource/ContainerParser.cpp
+++ b/dom/media/mediasource/ContainerParser.cpp
@@ -474,17 +474,17 @@ private:
       mp4_demuxer::AtomType initAtom("moov");
       mp4_demuxer::AtomType mediaAtom("moof");
 
       // Valid top-level boxes defined in ISO/IEC 14496-12 (Table 1)
       static const mp4_demuxer::AtomType validBoxes[] = {
         "ftyp", "moov", // init segment
         "pdin", "free", "sidx", // optional prior moov box
         "styp", "moof", "mdat", // media segment
-        "mfra", "skip", "meta", "meco", "ssix", "prft" // others.
+        "mfra", "skip", "meta", "meco", "ssix", "prft", // others.
         "pssh", // optional with encrypted EME, though ignored.
         "emsg", // ISO23009-1:2014 Section 5.10.3.3
         "bloc", "uuid" // boxes accepted by chrome.
       };
 
       while (reader.Remaining() >= 8) {
         uint64_t size = reader.ReadU32();
         const uint8_t* typec = reader.Peek(4);
--- a/dom/media/test/manifest.js
+++ b/dom/media/test/manifest.js
@@ -1689,17 +1689,18 @@ function MediaTestManager() {
     this.handlers[token] = handler;
 
     var onTimeout = () => {
       this.hasTimeout = true;
       ok(false, `${token} timed out!`);
       this.finished(token);
     };
     // Default timeout to 180s for each test.
-    this.timers[token] = setTimeout(onTimeout, 180000);
+    // Call SimpleTest._originalSetTimeout() to bypass the flaky timeout checker.
+    this.timers[token] = SimpleTest._originalSetTimeout.call(window, onTimeout, 180000);
 
     is(this.numTestsRunning, this.tokens.length,
        "[started " + token + " t=" + elapsedTime(this.startTime) + "] Length of array should match number of running tests");
   }
 
   // Registers that the test corresponding to 'token' has finished. Call when
   // you've finished your test. If all tests are complete this will finish the
   // run, otherwise it may start up the next run. It's ok to call multiple times
--- a/dom/plugins/base/nsIPluginInstanceOwner.idl
+++ b/dom/plugins/base/nsIPluginInstanceOwner.idl
@@ -12,18 +12,17 @@ interface nsIDocument;
 %{C++
 #include "npapi.h"
 #include "mozilla/EventForwards.h"
 class nsNPAPIPluginInstance;
 
 enum nsPluginTagType {
   nsPluginTagType_Unknown,
   nsPluginTagType_Embed,
-  nsPluginTagType_Object,
-  nsPluginTagType_Applet
+  nsPluginTagType_Object
 };
 %}
 
 [ptr] native nsNPAPIPluginInstancePtr(nsNPAPIPluginInstance);
 
 // Do not make this interface scriptable, because the virtual functions in C++
 // blocks will make script call the wrong functions.
 [uuid(7d65452e-c167-4cba-a0e3-ddc61bdde8c3)]
--- a/dom/plugins/base/nsNPAPIPlugin.cpp
+++ b/dom/plugins/base/nsNPAPIPlugin.cpp
@@ -1085,28 +1085,16 @@ NPObject*
 void
 _releaseobject(NPObject* npobj)
 {
   // If nothing is passed, just return, even if we're on the wrong thread.
   if (!npobj) {
     return;
   }
 
-  // THIS IS A KNOWN LEAK. SEE BUG 1221448.
-  // If releaseobject is called off the main thread and we have a valid pointer,
-  // we at least know it was created on the main thread (see _createobject
-  // implementation). However, forwarding the deletion back to the main thread
-  // without careful checking could cause bad memory management races. So, for
-  // now, we leak by warning and then just returning early. But it should fix
-  // java 7 crashes.
-  if (!NS_IsMainThread()) {
-    NPN_PLUGIN_LOG(PLUGIN_LOG_ALWAYS,("NPN_releaseobject called from the wrong thread\n"));
-    return;
-  }
-
   int32_t refCnt = PR_ATOMIC_DECREMENT((int32_t*)&npobj->referenceCount);
   NS_LOG_RELEASE(npobj, refCnt, "BrowserNPObject");
 
   if (refCnt == 0) {
     nsNPObjWrapper::OnDestroy(npobj);
 
     NPN_PLUGIN_LOG(PLUGIN_LOG_NOISY,
                    ("Deleting NPObject %p, refcount hit 0\n", npobj));
@@ -1287,98 +1275,16 @@ bool
 
   NPN_PLUGIN_LOG(PLUGIN_LOG_NOISY,
                  ("NPN_GetProperty(npp %p, npobj %p, property %p) called\n",
                   npp, npobj, property));
 
   if (!npobj->_class->getProperty(npobj, property, result))
     return false;
 
-  // If a Java plugin tries to get the document.URL or document.documentURI
-  // property from us, don't pass back a value that Java won't be able to
-  // understand -- one that will make the URL(String) constructor throw a
-  // MalformedURL exception.  Passing such a value causes Java Plugin2 to
-  // crash (to throw a RuntimeException in Plugin2Manager.getDocumentBase()).
-  // Also don't pass back a value that Java is likely to mishandle.
-
-  nsNPAPIPluginInstance* inst = (nsNPAPIPluginInstance*) npp->ndata;
-  if (!inst)
-    return false;
-  nsNPAPIPlugin* plugin = inst->GetPlugin();
-  if (!plugin)
-    return false;
-  RefPtr<nsPluginHost> host = nsPluginHost::GetInst();
-  nsPluginTag* pluginTag = host->TagForPlugin(plugin);
-  if (!pluginTag->mIsJavaPlugin)
-    return true;
-
-  if (!NPVARIANT_IS_STRING(*result))
-    return true;
-
-  NPUTF8* propertyName = _utf8fromidentifier(property);
-  if (!propertyName)
-    return true;
-  bool notURL =
-    (PL_strcasecmp(propertyName, "URL") &&
-     PL_strcasecmp(propertyName, "documentURI"));
-  _memfree(propertyName);
-  if (notURL)
-    return true;
-
-  NPObject* window_obj = _getwindowobject(npp);
-  if (!window_obj)
-    return true;
-
-  NPVariant doc_v;
-  NPObject* document_obj = nullptr;
-  NPIdentifier doc_id = _getstringidentifier("document");
-  bool ok = npobj->_class->getProperty(window_obj, doc_id, &doc_v);
-  _releaseobject(window_obj);
-  if (ok) {
-    if (NPVARIANT_IS_OBJECT(doc_v)) {
-      document_obj = NPVARIANT_TO_OBJECT(doc_v);
-    } else {
-      _releasevariantvalue(&doc_v);
-      return true;
-    }
-  } else {
-    return true;
-  }
-  _releaseobject(document_obj);
-  if (document_obj != npobj)
-    return true;
-
-  NPString urlnp = NPVARIANT_TO_STRING(*result);
-  nsXPIDLCString url;
-  url.Assign(urlnp.UTF8Characters, urlnp.UTF8Length);
-
-  bool javaCompatible = false;
-  if (NS_FAILED(NS_CheckIsJavaCompatibleURLString(url, &javaCompatible)))
-    javaCompatible = false;
-  if (javaCompatible)
-    return true;
-
-  // If Java won't be able to interpret the original value of document.URL or
-  // document.documentURI, or is likely to mishandle it, pass back something
-  // that Java will understand but won't be able to use to access the network,
-  // and for which same-origin checks will always fail.
-
-  if (inst->mFakeURL.IsVoid()) {
-    // Abort (do an error return) if NS_MakeRandomInvalidURLString() fails.
-    if (NS_FAILED(NS_MakeRandomInvalidURLString(inst->mFakeURL))) {
-      _releasevariantvalue(result);
-      return false;
-    }
-  }
-
-  _releasevariantvalue(result);
-  char* fakeurl = (char *) _memalloc(inst->mFakeURL.Length() + 1);
-  strcpy(fakeurl, inst->mFakeURL);
-  STRINGZ_TO_NPVARIANT(fakeurl, *result);
-
   return true;
 }
 
 bool
 _setproperty(NPP npp, NPObject* npobj, NPIdentifier property,
              const NPVariant *value)
 {
   if (!NS_IsMainThread()) {
--- a/dom/plugins/base/nsNPAPIPluginInstance.cpp
+++ b/dom/plugins/base/nsNPAPIPluginInstance.cpp
@@ -136,17 +136,16 @@ nsNPAPIPluginInstance::nsNPAPIPluginInst
   , mMIMEType(nullptr)
   , mOwner(nullptr)
 #ifdef XP_MACOSX
   , mCurrentPluginEvent(nullptr)
 #endif
 #ifdef MOZ_WIDGET_ANDROID
   , mOnScreen(true)
 #endif
-  , mHaveJavaC2PJSObjectQuirk(false)
   , mCachedParamLength(0)
   , mCachedParamNames(nullptr)
   , mCachedParamValues(nullptr)
   , mMuted(false)
 {
   mNPP.pdata = nullptr;
   mNPP.ndata = this;
 
@@ -413,18 +412,16 @@ nsNPAPIPluginInstance::Start()
     pos++;
   }
 
   const char*   mimetype;
   NPError       error = NPERR_GENERIC_ERROR;
 
   GetMIMEType(&mimetype);
 
-  CheckJavaC2PJSObjectQuirk(quirkParamLength, mCachedParamNames, mCachedParamValues);
-
   bool oldVal = mInPluginInitCall;
   mInPluginInitCall = true;
 
   // Need this on the stack before calling NPP_New otherwise some callbacks that
   // the plugin may make could fail (NPN_HasProperty, for example).
   NPPAutoPusher autopush(&mNPP);
 
   if (!mPlugin)
@@ -459,24 +456,18 @@ nsNPAPIPluginInstance::Start()
 
 nsresult nsNPAPIPluginInstance::SetWindow(NPWindow* window)
 {
   // NPAPI plugins don't want a SetWindow(nullptr).
   if (!window || RUNNING != mRunning)
     return NS_OK;
 
 #if MOZ_WIDGET_GTK
-  // bug 108347, flash plugin on linux doesn't like window->width <=
-  // 0, but Java needs wants this call.
-  if (window && window->type == NPWindowTypeWindow &&
-      (window->width <= 0 || window->height <= 0) &&
-      (nsPluginHost::GetSpecialType(nsDependentCString(mMIMEType)) !=
-       nsPluginHost::eSpecialType_Java)) {
-    return NS_OK;
-  }
+  // bug 108347, flash plugin on linux doesn't like window->width <= 0
+  return NS_OK;
 #endif
 
   if (!mPlugin || !mPlugin->GetLibrary())
     return NS_ERROR_FAILURE;
 
   NPPluginFuncs* pluginFunctions = mPlugin->PluginFuncs();
 
   if (pluginFunctions->setwindow) {
@@ -1039,20 +1030,16 @@ nsNPAPIPluginInstance::CSSZoomFactorChan
   NS_TRY_SAFE_CALL_RETURN(error, (*pluginFunctions->setvalue)(&mNPP, NPNVCSSZoomFactor, &value), this,
                           NS_PLUGIN_CALL_UNSAFE_TO_REENTER_GECKO);
   return (error == NPERR_NO_ERROR) ? NS_OK : NS_ERROR_FAILURE;
 }
 
 nsresult
 nsNPAPIPluginInstance::GetJSObject(JSContext *cx, JSObject** outObject)
 {
-  if (mHaveJavaC2PJSObjectQuirk) {
-    return NS_ERROR_FAILURE;
-  }
-
   NPObject *npobj = nullptr;
   nsresult rv = GetValueFromPlugin(NPPVpluginScriptableNPObject, &npobj);
   if (NS_FAILED(rv) || !npobj)
     return NS_ERROR_FAILURE;
 
   *outObject = nsNPObjWrapper::GetNewOrUsed(&mNPP, cx, npobj);
 
   _releaseobject(npobj);
@@ -1594,106 +1581,16 @@ nsNPAPIPluginInstance::FinalizeAsyncSurf
 void
 nsNPAPIPluginInstance::SetCurrentAsyncSurface(NPAsyncSurface *surface, NPRect *changed)
 {
   if (mOwner) {
     mOwner->SetCurrentAsyncSurface(surface, changed);
   }
 }
 
-static bool
-GetJavaVersionFromMimetype(nsPluginTag* pluginTag, nsCString& version)
-{
-  for (uint32_t i = 0; i < pluginTag->MimeTypes().Length(); ++i) {
-    nsCString type = pluginTag->MimeTypes()[i];
-    nsAutoCString jpi("application/x-java-applet;jpi-version=");
-
-    int32_t idx = type.Find(jpi, false, 0, -1);
-    if (idx != 0) {
-      continue;
-    }
-
-    type.Cut(0, jpi.Length());
-    if (type.IsEmpty()) {
-      continue;
-    }
-
-    type.ReplaceChar('_', '.');
-    version = type;
-    return true;
-  }
-
-  return false;
-}
-
-void
-nsNPAPIPluginInstance::CheckJavaC2PJSObjectQuirk(uint16_t paramCount,
-                                                 const char* const* paramNames,
-                                                 const char* const* paramValues)
-{
-  if (!mMIMEType || !mPlugin) {
-    return;
-  }
-
-  nsPluginTagType tagtype;
-  nsresult rv = GetTagType(&tagtype);
-  if (NS_FAILED(rv) ||
-      (tagtype != nsPluginTagType_Applet)) {
-    return;
-  }
-
-  RefPtr<nsPluginHost> pluginHost = nsPluginHost::GetInst();
-  if (!pluginHost) {
-    return;
-  }
-
-  nsPluginTag* pluginTag = pluginHost->TagForPlugin(mPlugin);
-  if (!pluginTag ||
-      !pluginTag->mIsJavaPlugin) {
-    return;
-  }
-
-  // check the params for "code" being present and non-empty
-  bool haveCodeParam = false;
-  bool isCodeParamEmpty = true;
-
-  for (uint16_t i = paramCount; i > 0; --i) {
-    if (PL_strcasecmp(paramNames[i - 1], "code") == 0) {
-      haveCodeParam = true;
-      if (strlen(paramValues[i - 1]) > 0) {
-        isCodeParamEmpty = false;
-      }
-      break;
-    }
-  }
-
-  // Due to the Java version being specified inconsistently across platforms
-  // check the version via the mimetype for choosing specific Java versions
-  nsCString javaVersion;
-  if (!GetJavaVersionFromMimetype(pluginTag, javaVersion)) {
-    return;
-  }
-
-  mozilla::Version version(javaVersion.get());
-
-  if (version >= "1.7.0.4") {
-    return;
-  }
-
-  if (!haveCodeParam && version >= "1.6.0.34" && version < "1.7") {
-    return;
-  }
-
-  if (haveCodeParam && !isCodeParamEmpty) {
-    return;
-  }
-
-  mHaveJavaC2PJSObjectQuirk = true;
-}
-
 double
 nsNPAPIPluginInstance::GetContentsScaleFactor()
 {
   double scaleFactor = 1.0;
   if (mOwner) {
     mOwner->GetContentsScaleFactor(&scaleFactor);
   }
   return scaleFactor;
--- a/dom/plugins/base/nsNPAPIPluginInstance.h
+++ b/dom/plugins/base/nsNPAPIPluginInstance.h
@@ -329,21 +329,16 @@ public:
   }
 
 protected:
 
   virtual ~nsNPAPIPluginInstance();
 
   nsresult GetTagType(nsPluginTagType *result);
 
-  // check if this is a Java applet and affected by bug 750480
-  void CheckJavaC2PJSObjectQuirk(uint16_t paramCount,
-                                 const char* const* names,
-                                 const char* const* values);
-
   nsresult CreateAudioChannelAgentIfNeeded();
 
   // The structure used to communicate between the plugin instance and
   // the browser.
   NPP_t mNPP;
 
   NPDrawingModel mDrawingModel;
 
@@ -414,19 +409,16 @@ private:
 #ifdef MOZ_WIDGET_ANDROID
   mozilla::java::GeckoSurface::LocalRef CreateSurface();
   std::map<void*, VideoInfo*> mVideos;
   bool mOnScreen;
 
   nsIntSize mCurrentSize;
 #endif
 
-  // is this instance Java and affected by bug 750480?
-  bool mHaveJavaC2PJSObjectQuirk;
-
   static uint32_t gInUnsafePluginCalls;
 
   // The arrays can only be released when the plugin instance is destroyed,
   // because the plugin, in in-process mode, might keep a reference to them.
   uint32_t mCachedParamLength;
   char **mCachedParamNames;
   char **mCachedParamValues;
 
--- a/dom/plugins/base/nsPluginHost.cpp
+++ b/dom/plugins/base/nsPluginHost.cpp
@@ -134,17 +134,16 @@ using mozilla::dom::FakePluginMimeEntry;
 
 // this is the name of the directory which will be created
 // to cache temporary files.
 #define kPluginTmpDirName NS_LITERAL_CSTRING("plugtmp")
 
 static const char *kPrefWhitelist = "plugin.allowed_types";
 static const char *kPrefLoadInParentPrefix = "plugin.load_in_parent_process.";
 static const char *kPrefDisableFullPage = "plugin.disable_full_page_plugin_for_types";
-static const char *kPrefJavaMIME = "plugin.java.mime";
 
 // How long we wait before unloading an idle plugin process.
 // Defaults to 30 seconds.
 static const char *kPrefUnloadPluginTimeoutSecs = "dom.ipc.plugins.unloadTimeoutSecs";
 static const uint32_t kDefaultPluginUnloadingTimeout = 30;
 
 static const char *kPluginRegistryVersion = "0.18";
 
@@ -741,17 +740,16 @@ nsPluginHost::InstantiatePluginInstance(
   nsPluginTagType tagType;
   rv = instanceOwner->GetTagType(&tagType);
   if (NS_FAILED(rv)) {
     instanceOwner->Destroy();
     return rv;
   }
 
   if (tagType != nsPluginTagType_Embed &&
-      tagType != nsPluginTagType_Applet &&
       tagType != nsPluginTagType_Object) {
     instanceOwner->Destroy();
     return NS_ERROR_FAILURE;
   }
 
   rv = SetUpPluginInstance(aMimeType, aURL, instanceOwner);
   if (NS_FAILED(rv)) {
     instanceOwner->Destroy();
@@ -1811,31 +1809,16 @@ nsPluginHost::GetSpecialType(const nsACS
   }
 
   if (aMIMEType.LowerCaseEqualsASCII("application/x-shockwave-flash") ||
       aMIMEType.LowerCaseEqualsASCII("application/futuresplash") ||
       aMIMEType.LowerCaseEqualsASCII("application/x-shockwave-flash-test")) {
     return eSpecialType_Flash;
   }
 
-  // Java registers variants of its MIME with parameters, e.g.
-  // application/x-java-vm;version=1.3
-  const nsACString &noParam = Substring(aMIMEType, 0, aMIMEType.FindChar(';'));
-
-  // The java mime pref may well not be one of these,
-  // e.g. application/x-java-test used in the test suite
-  nsAutoCString javaMIME;
-  Preferences::GetCString(kPrefJavaMIME, javaMIME);
-  if ((!javaMIME.IsEmpty() && noParam.LowerCaseEqualsASCII(javaMIME.get())) ||
-      noParam.LowerCaseEqualsASCII("application/x-java-vm") ||
-      noParam.LowerCaseEqualsASCII("application/x-java-applet") ||
-      noParam.LowerCaseEqualsASCII("application/x-java-bean")) {
-    return eSpecialType_Java;
-  }
-
   return eSpecialType_None;
 }
 
 // Check whether or not a tag is a live, valid tag, and that it's loaded.
 bool
 nsPluginHost::IsLiveTag(nsIPluginTag* aPluginTag)
 {
   nsCOMPtr<nsIInternalPluginTag> internalTag(do_QueryInterface(aPluginTag));
@@ -1990,18 +1973,17 @@ ShouldAddPlugin(const nsPluginInfo& info
          !strcmp(info.fMimeTypeArray[i], "application/x-shockwave-flash-test"))) {
       return true;
     }
     if (flashOnly) {
       continue;
     }
     if (info.fMimeTypeArray[i] &&
         (!strcmp(info.fMimeTypeArray[i], "application/x-test") ||
-         !strcmp(info.fMimeTypeArray[i], "application/x-Second-Test") ||
-         !strcmp(info.fMimeTypeArray[i], "application/x-java-test"))) {
+         !strcmp(info.fMimeTypeArray[i], "application/x-Second-Test"))) {
       return true;
     }
   }
 #ifdef PLUGIN_LOGGING
   PLUGIN_LOG(PLUGIN_LOG_NORMAL,
              ("ShouldAddPlugin : Ignoring non-flash plugin library %s\n", aPluginTag->FileName().get()));
 #endif // PLUGIN_LOGGING
   return false;
@@ -2375,17 +2357,16 @@ nsPluginHost::SetPluginsInContent(uint32
                                                tag.name().get(),
                                                tag.description().get(),
                                                tag.filename().get(),
                                                "", // aFullPath
                                                tag.version().get(),
                                                nsTArray<nsCString>(tag.mimeTypes()),
                                                nsTArray<nsCString>(tag.mimeDescriptions()),
                                                nsTArray<nsCString>(tag.extensions()),
-                                               tag.isJavaPlugin(),
                                                tag.isFlashPlugin(),
                                                tag.supportsAsyncRender(),
                                                tag.lastModifiedTime(),
                                                tag.isFromExtension(),
                                                tag.sandboxLevel(),
                                                tag.blocklistState());
       AddPluginTag(pluginTag);
     }
@@ -2621,17 +2602,16 @@ nsPluginHost::SendPluginsToContent()
     }
 
     pluginTags.AppendElement(PluginTag(tag->mId,
                                        tag->Name(),
                                        tag->Description(),
                                        tag->MimeTypes(),
                                        tag->MimeDescriptions(),
                                        tag->Extensions(),
-                                       tag->mIsJavaPlugin,
                                        tag->mIsFlashPlugin,
                                        tag->mSupportsAsyncRender,
                                        tag->FileName(),
                                        tag->Version(),
                                        tag->mLastModifiedTime,
                                        tag->IsFromExtension(),
                                        tag->mSandboxLevel,
                                        blocklistState));
@@ -3959,18 +3939,17 @@ nsPluginHost::CanUsePluginForMIMEType(co
   // We only support flash as a plugin, so if the mime types don't match for
   // those, exit before we start loading plugins.
   //
   // XXX: Remove test/java cases when bug 1351885 lands.
   if (nsPluginHost::GetSpecialType(aMIMEType) == nsPluginHost::eSpecialType_Flash ||
       MimeTypeIsAllowedForFakePlugin(NS_ConvertUTF8toUTF16(aMIMEType)) ||
       aMIMEType.LowerCaseEqualsLiteral("application/x-test") ||
       aMIMEType.LowerCaseEqualsLiteral("application/x-second-test") ||
-      aMIMEType.LowerCaseEqualsLiteral("application/x-third-test") ||
-      aMIMEType.LowerCaseEqualsLiteral("application/x-java-test")) {
+      aMIMEType.LowerCaseEqualsLiteral("application/x-third-test")) {
     return true;
   }
 
   return false;
 }
 
 // Runnable that does an async destroy of a plugin.
 
--- a/dom/plugins/base/nsPluginHost.h
+++ b/dom/plugins/base/nsPluginHost.h
@@ -201,20 +201,17 @@ public:
   CanUsePluginForMIMEType(const nsACString& aMIMEType);
 
   // checks whether aType is a type we recognize for potential special handling
   enum SpecialType {
     eSpecialType_None,
     // Needed to whitelist for async init support
     eSpecialType_Test,
     // Informs some decisions about OOP and quirks
-    eSpecialType_Flash,
-    // Binds to the <applet> tag, has various special
-    // rules around opening channels, codebase, ...
-    eSpecialType_Java
+    eSpecialType_Flash
   };
   static SpecialType GetSpecialType(const nsACString & aMIMEType);
 
   static nsresult PostPluginUnloadEvent(PRLibrary* aLibrary);
 
   void PluginCrashed(nsNPAPIPlugin* plugin,
                      const nsAString& pluginDumpID,
                      const nsAString& browserDumpID);
--- a/dom/plugins/base/nsPluginInstanceOwner.cpp
+++ b/dom/plugins/base/nsPluginInstanceOwner.cpp
@@ -32,17 +32,16 @@ using mozilla::DefaultXDisplay;
 #include "nsIDocShellTreeItem.h"
 #include "nsIWebBrowserChrome.h"
 #include "nsLayoutUtils.h"
 #include "nsIPluginWidget.h"
 #include "nsViewManager.h"
 #include "nsIDocShellTreeOwner.h"
 #include "nsIDOMHTMLObjectElement.h"
 #include "nsIAppShell.h"
-#include "nsIDOMHTMLAppletElement.h"
 #include "nsIObjectLoadingContent.h"
 #include "nsObjectLoadingContent.h"
 #include "nsAttrName.h"
 #include "nsIFocusManager.h"
 #include "nsFocusManager.h"
 #include "nsIDOMDragEvent.h"
 #include "nsIScriptSecurityManager.h"
 #include "nsIScrollableFrame.h"
@@ -1300,19 +1299,17 @@ void nsPluginInstanceOwner::SetCurrentAs
 
 NS_IMETHODIMP nsPluginInstanceOwner::GetTagType(nsPluginTagType *result)
 {
   NS_ENSURE_ARG_POINTER(result);
 
   *result = nsPluginTagType_Unknown;
 
   nsCOMPtr<nsIContent> content = do_QueryReferent(mContent);
-  if (content->IsHTMLElement(nsGkAtoms::applet))
-    *result = nsPluginTagType_Applet;
-  else if (content->IsHTMLElement(nsGkAtoms::embed))
+  if (content->IsHTMLElement(nsGkAtoms::embed))
     *result = nsPluginTagType_Embed;
   else if (content->IsHTMLElement(nsGkAtoms::object))
     *result = nsPluginTagType_Object;
 
   return NS_OK;
 }
 
 void nsPluginInstanceOwner::GetParameters(nsTArray<MozPluginParameter>& parameters)
--- a/dom/plugins/base/nsPluginInstanceOwner.h
+++ b/dom/plugins/base/nsPluginInstanceOwner.h
@@ -74,17 +74,17 @@ public:
 
   NPError InitAsyncSurface(NPSize *size, NPImageFormat format,
                            void *initData, NPAsyncSurface *surface) override;
   NPError FinalizeAsyncSurface(NPAsyncSurface *surface) override;
   void SetCurrentAsyncSurface(NPAsyncSurface *surface, NPRect *changed) override;
 
   /**
    * Get the type of the HTML tag that was used ot instantiate this
-   * plugin.  Currently supported tags are EMBED, OBJECT and APPLET.
+   * plugin.  Currently supported tags are EMBED or OBJECT.
    */
   NS_IMETHOD GetTagType(nsPluginTagType *aResult);
 
   void GetParameters(nsTArray<mozilla::dom::MozPluginParameter>& parameters);
   void GetAttributes(nsTArray<mozilla::dom::MozPluginParameter>& attributes);
 
   /**
    * Returns the DOM element corresponding to the tag which references
--- a/dom/plugins/base/nsPluginTags.cpp
+++ b/dom/plugins/base/nsPluginTags.cpp
@@ -225,17 +225,16 @@ nsPluginTag::nsPluginTag(nsPluginInfo* a
                          int64_t aLastModifiedTime,
                          bool fromExtension)
   : nsIInternalPluginTag(aPluginInfo->fName, aPluginInfo->fDescription,
                          aPluginInfo->fFileName, aPluginInfo->fVersion),
     mId(sNextId++),
     mContentProcessRunningCount(0),
     mHadLocalInstance(false),
     mLibrary(nullptr),
-    mIsJavaPlugin(false),
     mIsFlashPlugin(false),
     mSupportsAsyncRender(false),
     mFullPath(aPluginInfo->fFullPath),
     mLastModifiedTime(aLastModifiedTime),
     mSandboxLevel(0),
     mCachedBlocklistState(nsIBlocklistService::STATE_NOT_BLOCKED),
     mCachedBlocklistStateValid(false),
     mIsFromExtension(fromExtension)
@@ -261,17 +260,16 @@ nsPluginTag::nsPluginTag(const char* aNa
                          int64_t aLastModifiedTime,
                          bool fromExtension,
                          bool aArgsAreUTF8)
   : nsIInternalPluginTag(aName, aDescription, aFileName, aVersion),
     mId(sNextId++),
     mContentProcessRunningCount(0),
     mHadLocalInstance(false),
     mLibrary(nullptr),
-    mIsJavaPlugin(false),
     mIsFlashPlugin(false),
     mSupportsAsyncRender(false),
     mFullPath(aFullPath),
     mLastModifiedTime(aLastModifiedTime),
     mSandboxLevel(0),
     mCachedBlocklistState(nsIBlocklistService::STATE_NOT_BLOCKED),
     mCachedBlocklistStateValid(false),
     mIsFromExtension(fromExtension)
@@ -288,29 +286,27 @@ nsPluginTag::nsPluginTag(uint32_t aId,
                          const char* aName,
                          const char* aDescription,
                          const char* aFileName,
                          const char* aFullPath,
                          const char* aVersion,
                          nsTArray<nsCString> aMimeTypes,
                          nsTArray<nsCString> aMimeDescriptions,
                          nsTArray<nsCString> aExtensions,
-                         bool aIsJavaPlugin,
                          bool aIsFlashPlugin,
                          bool aSupportsAsyncRender,
                          int64_t aLastModifiedTime,
                          bool aFromExtension,
                          int32_t aSandboxLevel,
                          uint16_t aBlocklistState)
   : nsIInternalPluginTag(aName, aDescription, aFileName, aVersion, aMimeTypes,
                          aMimeDescriptions, aExtensions),
     mId(aId),
     mContentProcessRunningCount(0),
     mLibrary(nullptr),
-    mIsJavaPlugin(aIsJavaPlugin),
     mIsFlashPlugin(aIsFlashPlugin),
     mSupportsAsyncRender(aSupportsAsyncRender),
     mLastModifiedTime(aLastModifiedTime),
     mSandboxLevel(aSandboxLevel),
     mNiceFileName(),
     mCachedBlocklistState(aBlocklistState),
     mCachedBlocklistStateValid(true),
     mIsFromExtension(aFromExtension)
@@ -345,19 +341,16 @@ void nsPluginTag::InitMime(const char* c
     ToLowerCase(mimeType);
 
     if (!nsPluginHost::IsTypeWhitelisted(mimeType.get())) {
       continue;
     }
 
     // Look for certain special plugins.
     switch (nsPluginHost::GetSpecialType(mimeType)) {
-      case nsPluginHost::eSpecialType_Java:
-        mIsJavaPlugin = true;
-        break;
       case nsPluginHost::eSpecialType_Flash:
         // VLC sometimes claims to implement the Flash MIME type, and we want
         // to allow users to control that separately from Adobe Flash.
         if (Name().EqualsLiteral("Shockwave Flash")) {
           mIsFlashPlugin = true;
         }
         break;
       case nsPluginHost::eSpecialType_Test:
@@ -683,21 +676,16 @@ nsPluginTag::GetNiceFileName()
     return mNiceFileName;
   }
 
   if (mIsFlashPlugin) {
     mNiceFileName.AssignLiteral("flash");
     return mNiceFileName;
   }
 
-  if (mIsJavaPlugin) {
-    mNiceFileName.AssignLiteral("java");
-    return mNiceFileName;
-  }
-
   mNiceFileName = MakeNiceFileName(mFileName);
   return mNiceFileName;
 }
 
 NS_IMETHODIMP
 nsPluginTag::GetNiceName(nsACString & aResult)
 {
   aResult = GetNiceFileName();
--- a/dom/plugins/base/nsPluginTags.h
+++ b/dom/plugins/base/nsPluginTags.h
@@ -125,17 +125,16 @@ public:
               const char* aName,
               const char* aDescription,
               const char* aFileName,
               const char* aFullPath,
               const char* aVersion,
               nsTArray<nsCString> aMimeTypes,
               nsTArray<nsCString> aMimeDescriptions,
               nsTArray<nsCString> aExtensions,
-              bool aIsJavaPlugin,
               bool aIsFlashPlugin,
               bool aSupportsAsyncRender,
               int64_t aLastModifiedTime,
               bool aFromExtension,
               int32_t aSandboxLevel,
               uint16_t aBlocklistState);
 
   void TryUnloadPlugin(bool inShutdown);
@@ -163,17 +162,16 @@ public:
   // Number of PluginModuleParents living in all content processes.
   size_t        mContentProcessRunningCount;
 
   // True if we've ever created an instance of this plugin in the current process.
   bool          mHadLocalInstance;
 
   PRLibrary     *mLibrary;
   RefPtr<nsNPAPIPlugin> mPlugin;
-  bool          mIsJavaPlugin;
   bool          mIsFlashPlugin;
   bool          mSupportsAsyncRender;
   nsCString     mFullPath; // UTF-8
   int64_t       mLastModifiedTime;
   nsCOMPtr<nsITimer> mUnloadTimer;
   int32_t       mSandboxLevel;
 
   void          InvalidateBlocklistState();
--- a/dom/plugins/ipc/PluginTypes.ipdlh
+++ b/dom/plugins/ipc/PluginTypes.ipdlh
@@ -11,17 +11,16 @@ namespace plugins {
 struct PluginTag
 {
   uint32_t id;
   nsCString name;
   nsCString description;
   nsCString[] mimeTypes;
   nsCString[] mimeDescriptions;
   nsCString[] extensions;
-  bool isJavaPlugin;
   bool isFlashPlugin;
   bool supportsAsyncRender; // flash specific
   nsCString filename;
   nsCString version;
   int64_t lastModifiedTime;
   bool isFromExtension;
   int32_t sandboxLevel;
   uint16_t blocklistState;
deleted file mode 100644
--- a/dom/plugins/test/mochitest/file_bug738396.html
+++ /dev/null
@@ -1,87 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <title>Helper for test_bug738396.html</title>
-  <meta charset="utf-8">
-</head>
-<body>
-  <!-- Test that the plugin sees "good" in each of these cases -->
-  <div id="codebasevis">
-    <applet codebase="good" codebase="bad" ></applet>
-
-    <applet codebase="bad">
-      <param name="codebase" value="good">
-    </applet>
-
-    <applet codebase="bad">
-      <param name="codebase" value="stillbad">
-      <param name="codebase" value="good">
-    </applet>
-
-    <applet>
-      <param name="codebase" value="good">
-    </applet>
-
-    <object type="application/x-java-test" codebase="good" codebase="bad"></object>
-
-    <object type="application/x-java-test" codebase="bad">
-      <param name="codebase" value="good">
-    </object>
-
-    <object type="application/x-java-test" codebase="bad">
-      <param name="codebase" value="stillbad">
-      <param name="codebase" value="good">
-    </object>
-
-    <object type="application/x-java-test">
-      <param name="codebase" value="good">
-    </object>
-
-    <embed type="application/x-java-test" codebase="good" codebase="bad">
-  </div>
-  <div id="blockedcodebase">
-    <!-- Test that none of these are allowed to load -->
-    <applet codebase="file:///" codebase="notused"></applet>
-
-    <applet codebase="notused">
-      <param name="codebase" value="file:///">
-    </applet>
-
-    <applet codebase="notused">
-      <param name="codebase" value="notused">
-      <param name="codebase" value="file:///">
-    </applet>
-
-    <applet>
-      <param name="codebase" value="file:///">
-    </applet>
-
-    <object type="application/x-java-test" codebase="file:///" codebase="notused"></object>
-
-    <object type="application/x-java-test" codebase="notused">
-      <param name="codebase" value="file:///">
-    </object>
-
-    <object type="application/x-java-test" codebase="notused">
-      <param name="codebase" value="notused">
-      <param name="codebase" value="file:///">
-    </object>
-
-    <object type="application/x-java-test">
-      <param name="codebase" value="file:///">
-    </object>
-
-    <embed type="application/x-java-test" codebase="file:///" codebase="notused">
-  </div>
-  <div id="nocodebase">
-    <applet></applet>
-    <object type="application/x-java-test"></object>
-    <embed type="application/x-java-test">
-  </div>
-  <div id="emptycodebase">
-    <applet codebase=""></applet>
-    <object type="application/x-java-test" codebase=""></object>
-    <embed type="application/x-java-test" codebase="">
-  </div>
-</body>
-</html>
--- a/dom/plugins/test/mochitest/mochitest.ini
+++ b/dom/plugins/test/mochitest/mochitest.ini
@@ -4,17 +4,16 @@ support-files =
   307-xo-redirect.sjs
   crashing_subpage.html
   1028200-subpageA.html
   1028200-subpageA1.html
   1028200-subpageB.html
   1028200-subpageB1.html
   1028200-subpageC.html
   file_authident.js
-  file_bug738396.html
   file_bug771202.html
   file_bug863792.html
   file_bug1245545.js
   large-pic.jpg
   loremipsum.txt
   loremipsum.xtest
   loremipsum.xtest^headers^
   loremipsum_file.txt
@@ -42,17 +41,16 @@ skip-if = !crashreporter
 skip-if = !crashreporter
 [test_bug1028200-6.html]
 skip-if = !crashreporter
 [test_bug1028200-7.html]
 skip-if = !crashreporter
 [test_bug532208.html]
 [test_bug539565-1.html]
 [test_bug539565-2.html]
-[test_bug738396.html]
 [test_bug771202.html]
 [test_bug777098.html]
 [test_bug784131.html]
 [test_bug813906.html]
 [test_bug827160.html]
 skip-if = toolkit == 'android' # needs plugin support
 [test_bug852315.html]
 [test_bug854082.html]
deleted file mode 100644
--- a/dom/plugins/test/mochitest/test_bug738396.html
+++ /dev/null
@@ -1,88 +0,0 @@
-<!doctype html>
-<html>
-<head>
-  <title>Test for Bug 738396</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="text/javascript" src="plugin-utils.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-
-  <meta http-equiv="content-type" content="text/html; charset=utf-8">
-</head>
-<body>
-  <script type="text/javascript">
-    setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED,
-                              "Java Test Plug-in");
-
-    SpecialPowers.pushPrefEnv({ "set": [
-                                ['plugin.java.mime', 'application/x-java-test']
-                              ] }, loadFrame);
-    SimpleTest.waitForExplicitFinish();
-
-    function loadFrame() {
-      var iframe = document.createElement("iframe");
-      iframe.src = "./file_bug738396.html";
-      iframe.addEventListener("load", function() {
-        runTest(iframe.contentDocument);
-      });
-      document.body.appendChild(iframe);
-    }
-
-    function runTest(doc) {
-      // Check that the canonicalized version of the codebase 'good' was passed
-      // to the plugin in all cases
-      var a = doc.createElement('a');
-      a.href = "good";
-      var goodCodebase = a.href;
-      var codebasevis = doc.getElementById("codebasevis")
-        .querySelectorAll("applet, object, embed");
-      for (var elem of codebasevis) {
-        var codebase = null;
-        try {
-          codebase = elem.getJavaCodebase();
-        } catch (e) {}
-        is(codebase, goodCodebase,
-           "Check that the test plugin sees the proper codebase");
-      }
-      // Check that none of the applets in blockedcodebase were allowed to spawn
-      var blockedcodebase = doc.getElementById("blockedcodebase")
-        .querySelectorAll("applet, object, embed");
-      for (var elem of blockedcodebase) {
-        var spawned = false;
-        try {
-          elem.getObjectValue();
-          spawned = true;
-        } catch (e) {}
-        ok(!spawned, "Plugin should not be allowed to spawn");
-      }
-
-      // With no codebase, the codebase should resolve to "."
-      a.href = ".";
-      goodCodebase = a.href;
-      var nocodebase = doc.getElementById("nocodebase")
-        .querySelectorAll("applet, object, embed");
-      for (var elem of nocodebase) {
-        var codebase = null;
-        try {
-          codebase = elem.getJavaCodebase();
-        } catch (e) {}
-        is(codebase, goodCodebase, "Codebase should resolve to '.'");
-      }
-
-      // With empty codebase, the codebase should resolve to "/"
-      a.href = "/";
-      goodCodebase = a.href;
-      var nocodebase = doc.getElementById("emptycodebase")
-        .querySelectorAll("applet, object, embed");
-      for (var elem of nocodebase) {
-        var codebase = null;
-        try {
-          codebase = elem.getJavaCodebase();
-        } catch (e) {}
-        is(codebase, goodCodebase, "Codebase should resolve to '/'");
-      }
-
-      SimpleTest.finish();
-    }
-</script>
-</body>
-</html>
--- a/dom/plugins/test/mochitest/test_secondPlugin.html
+++ b/dom/plugins/test/mochitest/test_secondPlugin.html
@@ -9,17 +9,17 @@
 
   <body onload="run()">
     <script class="testbody" type="application/javascript">
       "use strict";
 
       SimpleTest.waitForExplicitFinish();
       setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
       setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_DISABLED, "Second Test Plug-in");
-      setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Java Test Plug-in");
+      setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Shockwave Flash");
 
       function findPlugin(pluginName) {
           for (var i = 0; i < navigator.plugins.length; i++) {
             var plugin = navigator.plugins[i];
             if (plugin.name === pluginName) {
               return plugin;
             }
           }
@@ -43,31 +43,31 @@
         pluginElement = document.getElementById("disabledPlugin");
         is(typeof pluginElement.identifierToStringTest, "undefined", "Should NOT be able to call a function on a disabled plugin");
 
         pluginElement = document.getElementById("clickToPlayPlugin");
         is(typeof pluginElement.identifierToStringTest, "undefined", "Should NOT be able to call a function on a click-to-play plugin");
 
         ok(navigator.plugins["Test Plug-in"], "Should have queried a plugin named 'Test Plug-in'");
         ok(!navigator.plugins["Second Test Plug-in"], "Should NOT have queried a disabled plugin named 'Second Test Plug-in'");
-        ok(navigator.plugins["Java Test Plug-in"], "Should have queried a click-to-play plugin named 'Java Test Plug-in'");
+        ok(navigator.plugins["Shockwave Flash"], "Should have queried a click-to-play plugin named 'Shockwave Flash'");
 
         ok(findPlugin("Test Plug-in"), "Should have found a plugin named 'Test Plug-in'");
         ok(!findPlugin("Second Test Plug-in"), "Should NOT found a disabled plugin named 'Second Test Plug-in'");
-        ok(findPlugin("Java Test Plug-in"), "Should have found a click-to-play plugin named 'Java Test Plug-in'");
+        ok(findPlugin("Shockwave Flash"), "Should have found a click-to-play plugin named 'Shockwave Flash'");
 
         ok(navigator.mimeTypes["application/x-test"], "Should have queried a MIME type named 'application/x-test'");
         ok(!navigator.mimeTypes["application/x-second-test"], "Should NOT have queried a disabled type named 'application/x-second-test'");
-        ok(navigator.mimeTypes["application/x-java-test"], "Should have queried a click-to-play MIME type named 'application/x-java-test'");
+        ok(navigator.mimeTypes["application/x-shockwave-flash-test"], "Should have queried a click-to-play MIME type named 'application/x-shockwave-flash-test'");
 
         ok(findMimeType("application/x-test"), "Should have found a MIME type named 'application/x-test'");
         ok(!findMimeType("application/x-second-test"), "Should NOT have found a disabled MIME type named 'application/x-second-test'");
-        ok(findMimeType("application/x-java-test"), "Should have found a click-to-play MIME type named 'application/x-java-test'");
+        ok(findMimeType("application/x-shockwave-flash-test"), "Should have found a click-to-play MIME type named 'application/x-shockwave-flash-test'");
 
         SimpleTest.finish();
       }
     </script>
 
     <object id="plugin" type="application/x-test" width=200 height=200></object>
     <object id="disabledPlugin" type="application/x-second-test" width=200 height=200></object>
-    <object id="clickToPlayPlugin" type="application/x-java-test" width=200 height=200></object>
+    <object id="clickToPlayPlugin" type="application/x-shockwave-flash-test" width=200 height=200></object>
   </body>
 </html>
deleted file mode 100644
--- a/dom/plugins/test/testplugin/javaplugin/Info.plist
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleExecutable</key>
-	<string>libnptestjava.dylib</string>
-	<key>CFBundleIdentifier</key>
-	<string>org.mozilla.JavaTestPlugin</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundlePackageType</key>
-	<string>BRPL</string>
-	<key>CFBundleShortVersionString</key>
-	<string>1.0.0.0</string>
-	<key>CFBundleSignature</key>
-	<string>JAVATEST</string>
-	<key>CFBundleVersion</key>
-	<string>1.0.0.0</string>
-	<key>WebPluginName</key>
-	<string>Java Test Plug-in</string>
-	<key>WebPluginDescription</key>
-	<string>Dummy Java plug-in for testing purposes.</string>
-	<key>WebPluginMIMETypes</key>
-	<dict>
-		<key>application/x-java-test</key>
-		<dict>
-			<key>WebPluginExtensions</key>
-			<array>
-				<string>tstjava</string>
-			</array>
-			<key>WebPluginTypeDescription</key>
-			<string>Dummy java type</string>
-		</dict>
-	</dict>
-</dict>
-</plist>
deleted file mode 100644
--- a/dom/plugins/test/testplugin/javaplugin/moz.build
+++ /dev/null
@@ -1,11 +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/.
-
-SharedLibrary('nptestjava')
-
-relative_path = 'javaplugin'
-cocoa_name = 'JavaTest'
-include('../testplugin.mozbuild')
deleted file mode 100644
--- a/dom/plugins/test/testplugin/javaplugin/nptest.def
+++ /dev/null
@@ -1,7 +0,0 @@
-LIBRARY   NPJAVATEST
-
-EXPORTS
-  NP_GetEntryPoints     @1
-  NP_Initialize         @2
-  NP_Shutdown           @3
-  NP_GetMIMEDescription @4
deleted file mode 100644
--- a/dom/plugins/test/testplugin/javaplugin/nptest.rc
+++ /dev/null
@@ -1,42 +0,0 @@
-#include<winver.h>
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION    1,0,0,0
- PRODUCTVERSION 1,0,0,0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS VOS__WINDOWS32
- FILETYPE VFT_DLL
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "040904e4"
-        BEGIN
-            VALUE "CompanyName", "mozilla.org"
-            VALUE "FileDescription", L"Dummy Java plug-in for testing purposes."
-            VALUE "FileExtents", "tstjava"
-            VALUE "FileOpenName", "Dummy java test type"
-            VALUE "FileVersion", "1.0"
-            VALUE "InternalName", "nptestjava"
-            VALUE "MIMEType", "application/x-java-test"
-            VALUE "OriginalFilename", "nptestjava.dll"
-            VALUE "ProductName", "Java Test Plug-in"
-            VALUE "ProductVersion", "1.0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x409, 1252
-    END
-END
deleted file mode 100644
--- a/dom/plugins/test/testplugin/javaplugin/nptest_name.cpp
+++ /dev/null
@@ -1,7 +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/. */
-
-const char *sPluginName = "Java Test Plug-in";
-const char *sPluginDescription = "Dummy Java plug-in for testing purposes.";
-const char *sMimeDescription = "application/x-java-test:tstjava:Dummy java type";
--- a/dom/plugins/test/testplugin/moz.build
+++ b/dom/plugins/test/testplugin/moz.build
@@ -1,13 +1,13 @@
 # -*- 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/.
 
-DIRS += ['secondplugin', 'javaplugin', 'thirdplugin', 'flashplugin']
+DIRS += ['secondplugin', 'thirdplugin', 'flashplugin']
 
 SharedLibrary('nptest')
 
 relative_path = '.'
 cocoa_name = 'Test'
 include('testplugin.mozbuild')
deleted file mode 100644
--- a/dom/security/test/csp/file_shouldprocess.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-  <head>
-    <title>Helper for Test Bug 908933</title>
-    <meta charset="utf-8">
-  </head>
-  <body>
-	<object type="application/x-java-test" codebase="test1"></object>
-
-	<object classid="java:test2" codebase="./test2"></object>
-
-	<object data="test3" classid="java:test3" codebase="./test3"></object>
-
-	<applet codebase="test4"></applet>
-
-	<embed src="test5.class" codebase="test5" type="application/x-java-test">
-
-	<embed type="application/x-java-test" codebase="test6">
-
-	<embed src="test7.class">
-
-	<embed src="test8.class" codebase="test8">
-
-  </body>
-</html>
--- a/dom/security/test/csp/mochitest.ini
+++ b/dom/security/test/csp/mochitest.ini
@@ -80,17 +80,16 @@ support-files =
   file_bug1229639.html
   file_bug1229639.html^headers^
   file_bug1312272.html
   file_bug1312272.js
   file_bug1312272.html^headers^
   file_policyuri_regression_from_multipolicy.html
   file_policyuri_regression_from_multipolicy.html^headers^
   file_policyuri_regression_from_multipolicy_policy
-  file_shouldprocess.html
   file_nonce_source.html
   file_nonce_source.html^headers^
   file_bug941404.html
   file_bug941404_xhr.html
   file_bug941404_xhr.html^headers^
   file_hash_source.html
   file_dual_header_testserver.sjs
   file_hash_source.html^headers^
@@ -269,19 +268,16 @@ skip-if = toolkit == 'android'
 [test_upgrade_insecure_referrer.html]
 skip-if = toolkit == 'android'
 [test_upgrade_insecure_cors.html]
 skip-if = toolkit == 'android'
 [test_report_for_import.html]
 [test_blocked_uri_in_reports.html]
 [test_service_worker.html]
 [test_child-src_worker.html]
-[test_shouldprocess.html]
-# Fennec platform does not support Java applet plugin
-skip-if = toolkit == 'android' #investigate in bug 1250814
 [test_child-src_worker_data.html]
 [test_child-src_worker-redirect.html]
 [test_child-src_iframe.html]
 [test_meta_element.html]
 [test_meta_header_dual.html]
 [test_docwrite_meta.html]
 [test_multipartchannel.html]
 [test_fontloader.html]
deleted file mode 100644
--- a/dom/security/test/csp/test_shouldprocess.html
+++ /dev/null
@@ -1,98 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=908933
--->
-<head>
-  <title>Test Bug 908933</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-  <meta http-equiv="content-type" content="text/html; charset=utf-8">
-</head>
-<body>
-<script class="testbody" type="text/javascript">
-
-/*
- * Description of the test:
- * We load variations of 'objects' and make sure all the
- * resource loads are correctly blocked by CSP.
- * For all the testing we use a CSP with "object-src 'none'"
- * so that all the loads are either blocked by
- * shouldProcess or shouldLoad.
- */
-
-const POLICY = "default-src http://mochi.test:8888; object-src 'none'";
-const TESTFILE = "tests/dom/security/test/csp/file_shouldprocess.html";
-
-SimpleTest.waitForExplicitFinish();
-
-var tests = [
-  // Note that the files listed below don't actually exist.
-  // Since loading of them should be blocked by shouldProcess, we don't
-  // really need these files.
-
-  // blocked by shouldProcess
-  "http://mochi.test:8888/tests/dom/security/test/csp/test1",
-  "http://mochi.test:8888/tests/dom/security/test/csp/test2",
-  "http://mochi.test:8888/tests/dom/security/test/csp/test3",
-  "http://mochi.test:8888/tests/dom/security/test/csp/test4",
-  "http://mochi.test:8888/tests/dom/security/test/csp/test5",
-  "http://mochi.test:8888/tests/dom/security/test/csp/test6",
-  // blocked by shouldLoad
-  "http://mochi.test:8888/tests/dom/security/test/csp/test7.class",
-  "http://mochi.test:8888/tests/dom/security/test/csp/test8.class",
-];
-
-function checkResults(aURI) {
-  var index = tests.indexOf(aURI);
-  if (index > -1) {
-    tests.splice(index, 1);
-    ok(true, "ShouldLoad or ShouldProcess blocks TYPE_OBJECT with uri: " + aURI + "!");
-  }
-  else {
-    ok(false, "ShouldLoad or ShouldProcess incorreclty blocks TYPE_OBJECT with uri: " + aURI + "!");
-  }
-  if (tests.length == 0) {
-    window.examiner.remove();
-    SimpleTest.finish();
-  }
-}
-
-// used to watch that shouldProcess blocks TYPE_OBJECT
-function examiner() {
-  SpecialPowers.addObserver(this, "csp-on-violate-policy");
-}
-examiner.prototype  = {
-  observe: function(subject, topic, data) {
-    if (topic === "csp-on-violate-policy") {
-      var asciiSpec =
-        SpecialPowers.getPrivilegedProps(SpecialPowers.do_QueryInterface(subject, "nsIURI"), "asciiSpec");
-      checkResults(asciiSpec);
-    }
-  },
-  remove: function() {
-    SpecialPowers.removeObserver(this, "csp-on-violate-policy");
-  }
-}
-window.examiner = new examiner();
-
-function loadFrame() {
-  var src = "file_testserver.sjs";
-  // append the file that should be served
-  src += "?file=" + escape(TESTFILE);
-  // append the CSP that should be used to serve the file
-  src += "&csp=" + escape(POLICY);
-
-  var iframe = document.createElement("iframe");
-  iframe.src = src;
-  document.body.appendChild(iframe);
-}
-
-SpecialPowers.pushPrefEnv(
-  { "set": [['plugin.java.mime', 'application/x-java-test']] },
-  loadFrame);
-
-</script>
-</pre>
-</body>
-</html>
--- a/dom/tests/browser/browser_bug396843.js
+++ b/dom/tests/browser/browser_bug396843.js
@@ -10,17 +10,17 @@ function testInDocument(doc, documentID)
         allNodes.push(doc.createElement(name));
     }
 
     /* List copy/pasted from nsHTMLTagList.h */
     HTML_TAG("a", "Anchor")
     HTML_TAG("abbr", "Span")
     HTML_TAG("acronym", "Span")
     HTML_TAG("address", "Span")
-    HTML_TAG("applet", "SharedObject")
+    HTML_TAG("applet", "Unknown")
     HTML_TAG("area", "Area")
     HTML_TAG("b", "Span")
     HTML_TAG("base", "Shared")
     HTML_TAG("basefont", "Span")
     HTML_TAG("bdo", "Span")
     HTML_TAG("bgsound", "Span")
     HTML_TAG("big", "Span")
     HTML_TAG("blockquote", "Shared")
@@ -37,17 +37,17 @@ function testInDocument(doc, documentID)
     HTML_TAG("dd", "Span")
     HTML_TAG("del", "Mod")
     HTML_TAG("dfn", "Span")
     HTML_TAG("dir", "Shared")
     HTML_TAG("div", "Div")
     HTML_TAG("dl", "SharedList")
     HTML_TAG("dt", "Span")
     HTML_TAG("em", "Span")
-    HTML_TAG("embed", "SharedObject")
+    HTML_TAG("embed", "Embed")
     HTML_TAG("fieldset", "FieldSet")
     HTML_TAG("font", "Font")
     HTML_TAG("form", "Form")
     HTML_TAG("frame", "Frame")
     HTML_TAG("frameset", "FrameSet")
     HTML_TAG("h1", "Heading")
     HTML_TAG("h2", "Heading")
     HTML_TAG("h3", "Heading")
--- a/dom/tests/mochitest/bugs/test_bug396843.html
+++ b/dom/tests/mochitest/bugs/test_bug396843.html
@@ -30,17 +30,17 @@ function HTML_TAG(name) {
   allNodes.push(document.createElement(name));
 }
 
 /* List copy/pasted from nsHTMLTagList.h */
 HTML_TAG("a", "Anchor")
 HTML_TAG("abbr", "Span")
 HTML_TAG("acronym", "Span")
 HTML_TAG("address", "Span")
-HTML_TAG("applet", "SharedObject")
+HTML_TAG("applet", "Unknown")
 HTML_TAG("area", "Area")
 HTML_TAG("b", "Span")
 HTML_TAG("base", "Shared")
 HTML_TAG("basefont", "Span")
 HTML_TAG("bdo", "Span")
 HTML_TAG("bgsound", "Unknown")
 HTML_TAG("big", "Span")
 HTML_TAG("blockquote", "Shared")
@@ -57,17 +57,17 @@ HTML_TAG("colgroup", "TableCol")
 HTML_TAG("dd", "Span")
 HTML_TAG("del", "Mod")
 HTML_TAG("dfn", "Span")
 HTML_TAG("dir", "Shared")
 HTML_TAG("div", "Div")
 HTML_TAG("dl", "SharedList")
 HTML_TAG("dt", "Span")
 HTML_TAG("em", "Span")
-HTML_TAG("embed", "SharedObject")
+HTML_TAG("embed", "Embed")
 HTML_TAG("fieldset", "FieldSet")
 HTML_TAG("font", "Font")
 HTML_TAG("form", "Form")
 HTML_TAG("frame", "Frame")
 HTML_TAG("frameset", "FrameSet")
 HTML_TAG("h1", "Heading")
 HTML_TAG("h2", "Heading")
 HTML_TAG("h3", "Heading")
--- a/dom/tests/mochitest/dom-level2-html/mochitest.ini
+++ b/dom/tests/mochitest/dom-level2-html/mochitest.ini
@@ -202,43 +202,31 @@ support-files =
   files/ulist.xml
   files/w3c_main.png
   files/xhtml-lat1.ent
   files/xhtml-special.ent
   files/xhtml-symbol.ent
   files/xhtml1-frameset.dtd
   files/xhtml1-strict.dtd
   files/xhtml1-transitional.dtd
-  files/applets/org/w3c/domts/DOMTSApplet.class
 
 [test_HTMLAnchorElement01.html]
 [test_HTMLAnchorElement02.html]
 [test_HTMLAnchorElement03.html]
 [test_HTMLAnchorElement04.html]
 [test_HTMLAnchorElement05.html]
 [test_HTMLAnchorElement06.html]
 [test_HTMLAnchorElement07.html]
 [test_HTMLAnchorElement08.html]
 [test_HTMLAnchorElement09.html]
 [test_HTMLAnchorElement10.html]
 [test_HTMLAnchorElement11.html]
 [test_HTMLAnchorElement12.html]
 [test_HTMLAnchorElement13.html]
 [test_HTMLAnchorElement14.html]
-[test_HTMLAppletElement01.html]
-[test_HTMLAppletElement02.html]
-[test_HTMLAppletElement03.html]
-[test_HTMLAppletElement04.html]
-[test_HTMLAppletElement05.html]
-[test_HTMLAppletElement06.html]
-[test_HTMLAppletElement07.html]
-[test_HTMLAppletElement08.html]
-[test_HTMLAppletElement09.html]
-[test_HTMLAppletElement10.html]
-[test_HTMLAppletElement11.html]
 [test_HTMLAreaElement01.html]
 [test_HTMLAreaElement02.html]
 [test_HTMLAreaElement03.html]
 [test_HTMLAreaElement04.html]
 [test_HTMLAreaElement05.html]
 [test_HTMLAreaElement06.html]
 [test_HTMLAreaElement07.html]
 [test_HTMLAreaElement08.html]
@@ -275,17 +263,16 @@ support-files =
 [test_HTMLDivElement01.html]
 [test_HTMLDlistElement01.html]
 [test_HTMLDocument01.html]
 [test_HTMLDocument02.html]
 [test_HTMLDocument03.html]
 [test_HTMLDocument04.html]
 [test_HTMLDocument05.html]
 [test_HTMLDocument07.html]
-[test_HTMLDocument08.html]
 [test_HTMLDocument09.html]
 [test_HTMLDocument10.html]
 [test_HTMLDocument11.html]
 [test_HTMLDocument12.html]
 [test_HTMLDocument13.html]
 [test_HTMLDocument14.html]
 [test_HTMLDocument15.html]
 [test_HTMLDocument16.html]
deleted file mode 100644
--- a/dom/tests/mochitest/dom-level2-html/test_HTMLAppletElement01.html
+++ /dev/null
@@ -1,137 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
-<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAppletElement01</title>
-<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
-<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
-<script src="DOMTestCase.js" type="text/javascript"></script>
-<script type="text/javascript">
-// expose test function names
-function exposeTestFunctionNames()
-{
-return ['HTMLAppletElement01'];
-}
-
-var docsLoaded = -1000000;
-var builder = null;
-
-//
-//   This function is called by the testing framework before
-//      running the test suite.
-//
-//   If there are no configuration exceptions, asynchronous
-//        document loading is started.  Otherwise, the status
-//        is set to complete and the exception is immediately
-//        raised when entering the body of the test.
-//
-function setUpPage() {
-   setUpPageStatus = 'running';
-   try {
-     //
-     //   creates test document builder, may throw exception
-     //
-     builder = createConfiguredBuilder();
-
-      docsLoaded = 0;
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      docsLoaded += preload(docRef, "doc", "applet");
-        
-       if (docsLoaded == 1) {
-          setUpPage = 'complete';
-       }
-    } catch(ex) {
-    	catchInitializationError(builder, ex);
-        setUpPage = 'complete';
-    }
-}
-
-
-
-//
-//   This method is called on the completion of 
-//      each asychronous load started in setUpTests.
-//
-//   When every synchronous loaded document has completed,
-//      the page status is changed which allows the
-//      body of the test to be executed.
-function loadComplete() {
-    if (++docsLoaded == 1) {
-        setUpPageStatus = 'complete';
-        runJSUnitTests();
-        SimpleTest.finish();
-    }
-}
-
-
-/**
-* 
-    The align attribute specifies the alignment of the object(Vertically
-    or Horizontally) with respect to its surrounding text.
-
-    Retrieve the align attribute and examine its value.  
-
-* @author NIST
-* @author Mary Brady
-* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8049912
-*/
-function HTMLAppletElement01() {
-   var success;
-    if(checkInitialization(builder, "HTMLAppletElement01") != null) return;
-    var nodeList;
-      var testNode;
-      var valign;
-      var doc;
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      doc = load(docRef, "doc", "applet");
-      nodeList = doc.getElementsByTagName("applet");
-      assertSize("Asize",1,nodeList);
-testNode = nodeList.item(0);
-      valign = testNode.align;
-
-      assertEquals("alignLink","bottom".toLowerCase(),valign.toLowerCase());
-       
-}
-
-</script>
-</head>
-<body>
-<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAppletElement01</h2>
-<p>&lt;test name='HTMLAppletElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAppletElement01&lt;/title&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
-    The align attribute specifies the alignment of the object(Vertically
-    or Horizontally) with respect to its surrounding text.
-
-    Retrieve the align attribute and examine its value.  
-&lt;/description&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8049912">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8049912</a>'/&gt;
-<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='applet' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"applet"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLAppletElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"bottom"' <a id="alignLink">id='alignLink'</a> ignoreCase='true'/&gt;<br>&lt;/test&gt;<br>
-</p>
-<p>
-			Copyright (c) 2001-2004 World Wide Web Consortium,
-			(Massachusetts Institute of Technology, Institut National de
-			Recherche en Informatique et en Automatique, Keio University). All
-			Rights Reserved. This program is distributed under the W3C's Software
-			Intellectual Property License. This program is distributed in the
-			hope that it will be useful, but WITHOUT ANY WARRANTY; without even
-			the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-			PURPOSE.
-			</p>
-<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a> 
- for more details.</p>
-<iframe name="doc" src="files/applet.html"></iframe>
-<br>
-</body>
-</html>
deleted file mode 100644
--- a/dom/tests/mochitest/dom-level2-html/test_HTMLAppletElement02.html
+++ /dev/null
@@ -1,137 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
-<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAppletElement02</title>
-<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
-<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
-<script src="DOMTestCase.js" type="text/javascript"></script>
-<script type="text/javascript">
-// expose test function names
-function exposeTestFunctionNames()
-{
-return ['HTMLAppletElement02'];
-}
-
-var docsLoaded = -1000000;
-var builder = null;
-
-//
-//   This function is called by the testing framework before
-//      running the test suite.
-//
-//   If there are no configuration exceptions, asynchronous
-//        document loading is started.  Otherwise, the status
-//        is set to complete and the exception is immediately
-//        raised when entering the body of the test.
-//
-function setUpPage() {
-   setUpPageStatus = 'running';
-   try {
-     //
-     //   creates test document builder, may throw exception
-     //
-     builder = createConfiguredBuilder();
-
-      docsLoaded = 0;
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      docsLoaded += preload(docRef, "doc", "applet");
-        
-       if (docsLoaded == 1) {
-          setUpPage = 'complete';
-       }
-    } catch(ex) {
-    	catchInitializationError(builder, ex);
-        setUpPage = 'complete';
-    }
-}
-
-
-
-//
-//   This method is called on the completion of 
-//      each asychronous load started in setUpTests.
-//
-//   When every synchronous loaded document has completed,
-//      the page status is changed which allows the
-//      body of the test to be executed.
-function loadComplete() {
-    if (++docsLoaded == 1) {
-        setUpPageStatus = 'complete';
-        runJSUnitTests();
-        SimpleTest.finish();
-    }
-}
-
-
-/**
-* 
-    The alt attribute specifies the alternate text for user agents not 
-    rendering the normal context of this element.
-
-    Retrieve the alt attribute and examine its value.  
-
-* @author NIST
-* @author Mary Brady
-* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58610064
-*/
-function HTMLAppletElement02() {
-   var success;
-    if(checkInitialization(builder, "HTMLAppletElement02") != null) return;
-    var nodeList;
-      var testNode;
-      var valt;
-      var doc;
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      doc = load(docRef, "doc", "applet");
-      nodeList = doc.getElementsByTagName("applet");
-      assertSize("Asize",1,nodeList);
-testNode = nodeList.item(0);
-      valt = testNode.alt;
-
-      assertEquals("altLink","Applet Number 1",valt);
-       
-}
-
-</script>
-</head>
-<body>
-<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAppletElement02</h2>
-<p>&lt;test name='HTMLAppletElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAppletElement02&lt;/title&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
-    The alt attribute specifies the alternate text for user agents not 
-    rendering the normal context of this element.
-
-    Retrieve the alt attribute and examine its value.  
-&lt;/description&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58610064">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58610064</a>'/&gt;
-<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valt' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='applet' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"applet"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;alt interface='HTMLAppletElement' obj='testNode' var='valt'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valt' expected='"Applet Number 1"' <a id="altLink">id='altLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
-</p>
-<p>
-			Copyright (c) 2001-2004 World Wide Web Consortium,
-			(Massachusetts Institute of Technology, Institut National de
-			Recherche en Informatique et en Automatique, Keio University). All
-			Rights Reserved. This program is distributed under the W3C's Software
-			Intellectual Property License. This program is distributed in the
-			hope that it will be useful, but WITHOUT ANY WARRANTY; without even
-			the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-			PURPOSE.
-			</p>
-<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a> 
- for more details.</p>
-<iframe name="doc" src="files/applet.html"></iframe>
-<br>
-</body>
-</html>
deleted file mode 100644
--- a/dom/tests/mochitest/dom-level2-html/test_HTMLAppletElement03.html
+++ /dev/null
@@ -1,135 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
-<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAppletElement03</title>
-<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
-<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
-<script src="DOMTestCase.js" type="text/javascript"></script>
-<script type="text/javascript">
-// expose test function names
-function exposeTestFunctionNames()
-{
-return ['HTMLAppletElement03'];
-}
-
-var docsLoaded = -1000000;
-var builder = null;
-
-//
-//   This function is called by the testing framework before
-//      running the test suite.
-//
-//   If there are no configuration exceptions, asynchronous
-//        document loading is started.  Otherwise, the status
-//        is set to complete and the exception is immediately
-//        raised when entering the body of the test.
-//
-function setUpPage() {
-   setUpPageStatus = 'running';
-   try {
-     //
-     //   creates test document builder, may throw exception
-     //
-     builder = createConfiguredBuilder();
-
-      docsLoaded = 0;
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      docsLoaded += preload(docRef, "doc", "applet");
-        
-       if (docsLoaded == 1) {
-          setUpPage = 'complete';
-       }
-    } catch(ex) {
-    	catchInitializationError(builder, ex);
-        setUpPage = 'complete';
-    }
-}
-
-
-
-//
-//   This method is called on the completion of 
-//      each asychronous load started in setUpTests.
-//
-//   When every synchronous loaded document has completed,
-//      the page status is changed which allows the
-//      body of the test to be executed.
-function loadComplete() {
-    if (++docsLoaded == 1) {
-        setUpPageStatus = 'complete';
-        runJSUnitTests();
-        SimpleTest.finish();
-    }
-}
-
-
-/**
-* 
-    The archive attribute specifies a comma-seperated archive list. 
-
-    Retrieve the archive attribute and examine its value.  
-
-* @author NIST
-* @author Mary Brady
-* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14476360
-*/
-function HTMLAppletElement03() {
-   var success;
-    if(checkInitialization(builder, "HTMLAppletElement03") != null) return;
-    var nodeList;
-      var testNode;
-      var varchive;
-      var doc;
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      doc = load(docRef, "doc", "applet");
-      nodeList = doc.getElementsByTagName("applet");
-      assertSize("Asize",1,nodeList);
-testNode = nodeList.item(0);
-      varchive = testNode.archive;
-
-      assertEquals("archiveLink","",varchive);
-       
-}
-
-</script>
-</head>
-<body>
-<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAppletElement03</h2>
-<p>&lt;test name='HTMLAppletElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAppletElement03&lt;/title&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
-    The archive attribute specifies a comma-seperated archive list. 
-
-    Retrieve the archive attribute and examine its value.  
-&lt;/description&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14476360">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14476360</a>'/&gt;
-<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='varchive' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='applet' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"applet"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;archive interface='HTMLAppletElement' obj='testNode' var='varchive'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='varchive' expected='""' <a id="archiveLink">id='archiveLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
-</p>
-<p>
-			Copyright (c) 2001-2004 World Wide Web Consortium,
-			(Massachusetts Institute of Technology, Institut National de
-			Recherche en Informatique et en Automatique, Keio University). All
-			Rights Reserved. This program is distributed under the W3C's Software
-			Intellectual Property License. This program is distributed in the
-			hope that it will be useful, but WITHOUT ANY WARRANTY; without even
-			the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-			PURPOSE.
-			</p>
-<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a> 
- for more details.</p>
-<iframe name="doc" src="files/applet.html"></iframe>
-<br>
-</body>
-</html>
deleted file mode 100644
--- a/dom/tests/mochitest/dom-level2-html/test_HTMLAppletElement04.html
+++ /dev/null
@@ -1,135 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
-<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAppletElement04</title>
-<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
-<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
-<script src="DOMTestCase.js" type="text/javascript"></script>
-<script type="text/javascript">
-// expose test function names
-function exposeTestFunctionNames()
-{
-return ['HTMLAppletElement04'];
-}
-
-var docsLoaded = -1000000;
-var builder = null;
-
-//
-//   This function is called by the testing framework before
-//      running the test suite.
-//
-//   If there are no configuration exceptions, asynchronous
-//        document loading is started.  Otherwise, the status
-//        is set to complete and the exception is immediately
-//        raised when entering the body of the test.
-//
-function setUpPage() {
-   setUpPageStatus = 'running';
-   try {
-     //
-     //   creates test document builder, may throw exception
-     //
-     builder = createConfiguredBuilder();
-
-      docsLoaded = 0;
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      docsLoaded += preload(docRef, "doc", "applet");
-        
-       if (docsLoaded == 1) {
-          setUpPage = 'complete';
-       }
-    } catch(ex) {
-    	catchInitializationError(builder, ex);
-        setUpPage = 'complete';
-    }
-}
-
-
-
-//
-//   This method is called on the completion of 
-//      each asychronous load started in setUpTests.
-//
-//   When every synchronous loaded document has completed,
-//      the page status is changed which allows the
-//      body of the test to be executed.
-function loadComplete() {
-    if (++docsLoaded == 1) {
-        setUpPageStatus = 'complete';
-        runJSUnitTests();
-        SimpleTest.finish();
-    }
-}
-
-
-/**
-* 
-    The code attribute specifies the applet class file.
-
-    Retrieve the code attribute and examine its value.  
-
-* @author NIST
-* @author Mary Brady
-* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-61509645
-*/
-function HTMLAppletElement04() {
-   var success;
-    if(checkInitialization(builder, "HTMLAppletElement04") != null) return;
-    var nodeList;
-      var testNode;
-      var vcode;
-      var doc;
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      doc = load(docRef, "doc", "applet");
-      nodeList = doc.getElementsByTagName("applet");
-      assertSize("Asize",1,nodeList);
-testNode = nodeList.item(0);
-      vcode = testNode.code;
-
-      assertEquals("codeLink","org/w3c/domts/DOMTSApplet.class",vcode);
-       
-}
-
-</script>
-</head>
-<body>
-<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAppletElement04</h2>
-<p>&lt;test name='HTMLAppletElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAppletElement04&lt;/title&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
-    The code attribute specifies the applet class file.
-
-    Retrieve the code attribute and examine its value.  
-&lt;/description&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-61509645">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-61509645</a>'/&gt;
-<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcode' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='applet' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"applet"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;code interface='HTMLAppletElement' obj='testNode' var='vcode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcode' expected='"org/w3c/domts/DOMTSApplet.class"' <a id="codeLink">id='codeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
-</p>
-<p>
-			Copyright (c) 2001-2004 World Wide Web Consortium,
-			(Massachusetts Institute of Technology, Institut National de
-			Recherche en Informatique et en Automatique, Keio University). All
-			Rights Reserved. This program is distributed under the W3C's Software
-			Intellectual Property License. This program is distributed in the
-			hope that it will be useful, but WITHOUT ANY WARRANTY; without even
-			the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-			PURPOSE.
-			</p>
-<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a> 
- for more details.</p>
-<iframe name="doc" src="files/applet.html"></iframe>
-<br>
-</body>
-</html>
deleted file mode 100644
--- a/dom/tests/mochitest/dom-level2-html/test_HTMLAppletElement05.html
+++ /dev/null
@@ -1,136 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
-<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAppletElement05</title>
-<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
-<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
-<script src="DOMTestCase.js" type="text/javascript"></script>
-<script type="text/javascript">
-// expose test function names
-function exposeTestFunctionNames()
-{
-return ['HTMLAppletElement05'];
-}
-
-var docsLoaded = -1000000;
-var builder = null;
-
-//
-//   This function is called by the testing framework before
-//      running the test suite.
-//
-//   If there are no configuration exceptions, asynchronous
-//        document loading is started.  Otherwise, the status
-//        is set to complete and the exception is immediately
-//        raised when entering the body of the test.
-//
-function setUpPage() {
-   setUpPageStatus = 'running';
-   try {
-     //
-     //   creates test document builder, may throw exception
-     //
-     builder = createConfiguredBuilder();
-
-      docsLoaded = 0;
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      docsLoaded += preload(docRef, "doc", "applet");
-        
-       if (docsLoaded == 1) {
-          setUpPage = 'complete';
-       }
-    } catch(ex) {
-    	catchInitializationError(builder, ex);
-        setUpPage = 'complete';
-    }
-}
-
-
-
-//
-//   This method is called on the completion of 
-//      each asychronous load started in setUpTests.
-//
-//   When every synchronous loaded document has completed,
-//      the page status is changed which allows the
-//      body of the test to be executed.
-function loadComplete() {
-    if (++docsLoaded == 1) {
-        setUpPageStatus = 'complete';
-        runJSUnitTests();
-        SimpleTest.finish();
-    }
-}
-
-
-/**
-* 
-    The codeBase attribute specifies an optional base URI for the applet.
-
-    Retrieve the codeBase attribute and examine its value.  
-
-* @author NIST
-* @author Mary Brady
-* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6581160
-*/
-function HTMLAppletElement05() {
-   var success;
-    if(checkInitialization(builder, "HTMLAppletElement05") != null) return;
-    var nodeList;
-      var testNode;
-      var vcodebase;
-      var doc;
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      doc = load(docRef, "doc", "applet");
-      nodeList = doc.getElementsByTagName("applet");
-      assertSize("Asize",1,nodeList);
-testNode = nodeList.item(0);
-      vcodebase = testNode.codeBase;
-      // mozilla returns full URI here
-      // assertEquals("codebase","applets",vcodebase);
-      todo_is(vcodebase,"applets","codebase");
-       
-}
-
-</script>
-</head>
-<body>
-<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAppletElement05</h2>
-<p>&lt;test name='HTMLAppletElement05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAppletElement05&lt;/title&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
-    The codeBase attribute specifies an optional base URI for the applet.
-
-    Retrieve the codeBase attribute and examine its value.  
-&lt;/description&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6581160">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6581160</a>'/&gt;
-<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcodebase' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='applet' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"applet"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;codeBase interface='HTMLAppletElement' obj='testNode' var='vcodebase'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcodebase' expected='"applets"' <a id="codebase">id='codebase'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
-</p>
-<p>
-			Copyright (c) 2001-2004 World Wide Web Consortium,
-			(Massachusetts Institute of Technology, Institut National de
-			Recherche en Informatique et en Automatique, Keio University). All
-			Rights Reserved. This program is distributed under the W3C's Software
-			Intellectual Property License. This program is distributed in the
-			hope that it will be useful, but WITHOUT ANY WARRANTY; without even
-			the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-			PURPOSE.
-			</p>
-<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a> 
- for more details.</p>
-<iframe name="doc" src="files/applet.html"></iframe>
-<br>
-</body>
-</html>
deleted file mode 100644
--- a/dom/tests/mochitest/dom-level2-html/test_HTMLAppletElement06.html
+++ /dev/null
@@ -1,135 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
-<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAppletElement06</title>
-<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
-<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
-<script src="DOMTestCase.js" type="text/javascript"></script>
-<script type="text/javascript">
-// expose test function names
-function exposeTestFunctionNames()
-{
-return ['HTMLAppletElement06'];
-}
-
-var docsLoaded = -1000000;
-var builder = null;
-
-//
-//   This function is called by the testing framework before
-//      running the test suite.
-//
-//   If there are no configuration exceptions, asynchronous
-//        document loading is started.  Otherwise, the status
-//        is set to complete and the exception is immediately
-//        raised when entering the body of the test.
-//
-function setUpPage() {
-   setUpPageStatus = 'running';
-   try {
-     //
-     //   creates test document builder, may throw exception
-     //
-     builder = createConfiguredBuilder();
-
-      docsLoaded = 0;
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      docsLoaded += preload(docRef, "doc", "applet");
-        
-       if (docsLoaded == 1) {
-          setUpPage = 'complete';
-       }
-    } catch(ex) {
-    	catchInitializationError(builder, ex);
-        setUpPage = 'complete';
-    }
-}
-
-
-
-//
-//   This method is called on the completion of 
-//      each asychronous load started in setUpTests.
-//
-//   When every synchronous loaded document has completed,
-//      the page status is changed which allows the
-//      body of the test to be executed.
-function loadComplete() {
-    if (++docsLoaded == 1) {
-        setUpPageStatus = 'complete';
-        runJSUnitTests();
-        SimpleTest.finish();
-    }
-}
-
-
-/**
-* 
-    The height attribute overrides the height. 
-
-    Retrieve the height attribute and examine its value.  
-
-* @author NIST
-* @author Mary Brady
-* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-90184867
-*/
-function HTMLAppletElement06() {
-   var success;
-    if(checkInitialization(builder, "HTMLAppletElement06") != null) return;
-    var nodeList;
-      var testNode;
-      var vheight;
-      var doc;
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      doc = load(docRef, "doc", "applet");
-      nodeList = doc.getElementsByTagName("applet");
-      assertSize("Asize",1,nodeList);
-testNode = nodeList.item(0);
-      vheight = testNode.height;
-
-      assertEquals("heightLink","306",vheight);
-       
-}
-
-</script>
-</head>
-<body>
-<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAppletElement06</h2>
-<p>&lt;test name='HTMLAppletElement06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAppletElement06&lt;/title&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
-    The height attribute overrides the height. 
-
-    Retrieve the height attribute and examine its value.  
-&lt;/description&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-90184867">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-90184867</a>'/&gt;
-<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vheight' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='applet' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"applet"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;height interface='HTMLAppletElement' obj='testNode' var='vheight'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vheight' expected='"306"' <a id="heightLink">id='heightLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
-</p>
-<p>
-			Copyright (c) 2001-2004 World Wide Web Consortium,
-			(Massachusetts Institute of Technology, Institut National de
-			Recherche en Informatique et en Automatique, Keio University). All
-			Rights Reserved. This program is distributed under the W3C's Software
-			Intellectual Property License. This program is distributed in the
-			hope that it will be useful, but WITHOUT ANY WARRANTY; without even
-			the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-			PURPOSE.
-			</p>
-<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a> 
- for more details.</p>
-<iframe name="doc" src="files/applet.html"></iframe>
-<br>
-</body>
-</html>
deleted file mode 100644
--- a/dom/tests/mochitest/dom-level2-html/test_HTMLAppletElement07.html
+++ /dev/null
@@ -1,137 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
-<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAppletElement07</title>
-<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
-<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
-<script src="DOMTestCase.js" type="text/javascript"></script>
-<script type="text/javascript">
-// expose test function names
-function exposeTestFunctionNames()
-{
-return ['HTMLAppletElement07'];
-}
-
-var docsLoaded = -1000000;
-var builder = null;
-
-//
-//   This function is called by the testing framework before
-//      running the test suite.
-//
-//   If there are no configuration exceptions, asynchronous
-//        document loading is started.  Otherwise, the status
-//        is set to complete and the exception is immediately
-//        raised when entering the body of the test.
-//
-function setUpPage() {
-   setUpPageStatus = 'running';
-   try {
-     //
-     //   creates test document builder, may throw exception
-     //
-     builder = createConfiguredBuilder();
-
-      docsLoaded = 0;
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      docsLoaded += preload(docRef, "doc", "applet");
-        
-       if (docsLoaded == 1) {
-          setUpPage = 'complete';
-       }
-    } catch(ex) {
-    	catchInitializationError(builder, ex);
-        setUpPage = 'complete';
-    }
-}
-
-
-
-//
-//   This method is called on the completion of 
-//      each asychronous load started in setUpTests.
-//
-//   When every synchronous loaded document has completed,
-//      the page status is changed which allows the
-//      body of the test to be executed.
-function loadComplete() {
-    if (++docsLoaded == 1) {
-        setUpPageStatus = 'complete';
-        runJSUnitTests();
-        SimpleTest.finish();
-    }
-}
-
-
-/**
-* 
-    The hspace attribute specifies the horizontal space to the left
-    and right of this image, applet, or object. 
-
-    Retrieve the hspace attribute and examine it's value.  
-
-* @author NIST
-* @author Mary Brady
-* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-1567197
-*/
-function HTMLAppletElement07() {
-   var success;
-    if(checkInitialization(builder, "HTMLAppletElement07") != null) return;
-    var nodeList;
-      var testNode;
-      var vhspace;
-      var doc;
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      doc = load(docRef, "doc", "applet");
-      nodeList = doc.getElementsByTagName("applet");
-      assertSize("Asize",1,nodeList);
-testNode = nodeList.item(0);
-      vhspace = testNode.hspace;
-
-      assertEquals("hspaceLink",0,vhspace);
-       
-}
-
-</script>
-</head>
-<body>
-<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAppletElement07</h2>
-<p>&lt;test name='HTMLAppletElement07' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAppletElement07&lt;/title&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
-    The hspace attribute specifies the horizontal space to the left
-    and right of this image, applet, or object. 
-
-    Retrieve the hspace attribute and examine it's value.  
-&lt;/description&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2001-12-03&lt;/date&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-1567197">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-1567197</a>'/&gt;
-<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vhspace' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='applet' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"applet"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;hspace interface='HTMLAppletElement' obj='testNode' var='vhspace'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vhspace' expected='0' <a id="hspaceLink">id='hspaceLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
-</p>
-<p>
-			Copyright (c) 2001-2004 World Wide Web Consortium,
-			(Massachusetts Institute of Technology, Institut National de
-			Recherche en Informatique et en Automatique, Keio University). All
-			Rights Reserved. This program is distributed under the W3C's Software
-			Intellectual Property License. This program is distributed in the
-			hope that it will be useful, but WITHOUT ANY WARRANTY; without even
-			the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-			PURPOSE.
-			</p>
-<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a> 
- for more details.</p>
-<iframe name="doc" src="files/applet.html"></iframe>
-<br>
-</body>
-</html>
deleted file mode 100644
--- a/dom/tests/mochitest/dom-level2-html/test_HTMLAppletElement08.html
+++ /dev/null
@@ -1,135 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
-<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAppletElement08</title>
-<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
-<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
-<script src="DOMTestCase.js" type="text/javascript"></script>
-<script type="text/javascript">
-// expose test function names
-function exposeTestFunctionNames()
-{
-return ['HTMLAppletElement08'];
-}
-
-var docsLoaded = -1000000;
-var builder = null;
-
-//
-//   This function is called by the testing framework before
-//      running the test suite.
-//
-//   If there are no configuration exceptions, asynchronous
-//        document loading is started.  Otherwise, the status
-//        is set to complete and the exception is immediately
-//        raised when entering the body of the test.
-//
-function setUpPage() {
-   setUpPageStatus = 'running';
-   try {
-     //
-     //   creates test document builder, may throw exception
-     //
-     builder = createConfiguredBuilder();
-
-      docsLoaded = 0;
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      docsLoaded += preload(docRef, "doc", "applet");
-        
-       if (docsLoaded == 1) {
-          setUpPage = 'complete';
-       }
-    } catch(ex) {
-    	catchInitializationError(builder, ex);
-        setUpPage = 'complete';
-    }
-}
-
-
-
-//
-//   This method is called on the completion of 
-//      each asychronous load started in setUpTests.
-//
-//   When every synchronous loaded document has completed,
-//      the page status is changed which allows the
-//      body of the test to be executed.
-function loadComplete() {
-    if (++docsLoaded == 1) {
-        setUpPageStatus = 'complete';
-        runJSUnitTests();
-        SimpleTest.finish();
-    }
-}
-
-
-/**
-* 
-    The name attribute specifies the name of the applet. 
-
-    Retrieve the name attribute and examine its value.  
-
-* @author NIST
-* @author Mary Brady
-* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39843695
-*/
-function HTMLAppletElement08() {
-   var success;
-    if(checkInitialization(builder, "HTMLAppletElement08") != null) return;
-    var nodeList;
-      var testNode;
-      var vname;
-      var doc;
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      doc = load(docRef, "doc", "applet");
-      nodeList = doc.getElementsByTagName("applet");
-      assertSize("Asize",1,nodeList);
-testNode = nodeList.item(0);
-      vname = testNode.name;
-
-      assertEquals("nameLink","applet1",vname);
-       
-}
-
-</script>
-</head>
-<body>
-<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAppletElement08</h2>
-<p>&lt;test name='HTMLAppletElement08' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAppletElement08&lt;/title&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
-    The name attribute specifies the name of the applet. 
-
-    Retrieve the name attribute and examine its value.  
-&lt;/description&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39843695">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39843695</a>'/&gt;
-<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='applet' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"applet"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;name interface='HTMLAppletElement' obj='testNode' var='vname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vname' expected='"applet1"' <a id="nameLink">id='nameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
-</p>
-<p>
-			Copyright (c) 2001-2004 World Wide Web Consortium,
-			(Massachusetts Institute of Technology, Institut National de
-			Recherche en Informatique et en Automatique, Keio University). All
-			Rights Reserved. This program is distributed under the W3C's Software
-			Intellectual Property License. This program is distributed in the
-			hope that it will be useful, but WITHOUT ANY WARRANTY; without even
-			the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-			PURPOSE.
-			</p>
-<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a> 
- for more details.</p>
-<iframe name="doc" src="files/applet.html"></iframe>
-<br>
-</body>
-</html>
deleted file mode 100644
--- a/dom/tests/mochitest/dom-level2-html/test_HTMLAppletElement09.html
+++ /dev/null
@@ -1,137 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
-<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAppletElement09</title>
-<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
-<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
-<script src="DOMTestCase.js" type="text/javascript"></script>
-<script type="text/javascript">
-// expose test function names
-function exposeTestFunctionNames()
-{
-return ['HTMLAppletElement09'];
-}
-
-var docsLoaded = -1000000;
-var builder = null;
-
-//
-//   This function is called by the testing framework before
-//      running the test suite.
-//
-//   If there are no configuration exceptions, asynchronous
-//        document loading is started.  Otherwise, the status
-//        is set to complete and the exception is immediately
-//        raised when entering the body of the test.
-//
-function setUpPage() {
-   setUpPageStatus = 'running';
-   try {
-     //
-     //   creates test document builder, may throw exception
-     //
-     builder = createConfiguredBuilder();
-
-      docsLoaded = 0;
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      docsLoaded += preload(docRef, "doc", "applet");
-        
-       if (docsLoaded == 1) {
-          setUpPage = 'complete';
-       }
-    } catch(ex) {
-    	catchInitializationError(builder, ex);
-        setUpPage = 'complete';
-    }
-}
-
-
-
-//
-//   This method is called on the completion of 
-//      each asychronous load started in setUpTests.
-//
-//   When every synchronous loaded document has completed,
-//      the page status is changed which allows the
-//      body of the test to be executed.
-function loadComplete() {
-    if (++docsLoaded == 1) {
-        setUpPageStatus = 'complete';
-        runJSUnitTests();
-        SimpleTest.finish();
-    }
-}
-
-
-/**
-* 
-    The vspace attribute specifies the vertical space above and below
-    this image, applet or object.
-
-    Retrieve the vspace attribute and examine it's value.  
-
-* @author NIST
-* @author Mary Brady
-* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-22637173
-*/
-function HTMLAppletElement09() {
-   var success;
-    if(checkInitialization(builder, "HTMLAppletElement09") != null) return;
-    var nodeList;
-      var testNode;
-      var vvspace;
-      var doc;
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      doc = load(docRef, "doc", "applet");
-      nodeList = doc.getElementsByTagName("applet");
-      assertSize("Asize",1,nodeList);
-testNode = nodeList.item(0);
-      vvspace = testNode.vspace;
-
-      assertEquals("vspaceLink",0,vvspace);
-       
-}
-
-</script>
-</head>
-<body>
-<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAppletElement09</h2>
-<p>&lt;test name='HTMLAppletElement09' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAppletElement09&lt;/title&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
-    The vspace attribute specifies the vertical space above and below
-    this image, applet or object.
-
-    Retrieve the vspace attribute and examine it's value.  
-&lt;/description&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2001-12-03&lt;/date&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-22637173">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-22637173</a>'/&gt;
-<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvspace' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='applet' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"applet"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;vspace interface='HTMLAppletElement' obj='testNode' var='vvspace'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvspace' expected='0' <a id="vspaceLink">id='vspaceLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
-</p>
-<p>
-			Copyright (c) 2001-2004 World Wide Web Consortium,
-			(Massachusetts Institute of Technology, Institut National de
-			Recherche en Informatique et en Automatique, Keio University). All
-			Rights Reserved. This program is distributed under the W3C's Software
-			Intellectual Property License. This program is distributed in the
-			hope that it will be useful, but WITHOUT ANY WARRANTY; without even
-			the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-			PURPOSE.
-			</p>
-<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a> 
- for more details.</p>
-<iframe name="doc" src="files/applet.html"></iframe>
-<br>
-</body>
-</html>
deleted file mode 100644
--- a/dom/tests/mochitest/dom-level2-html/test_HTMLAppletElement10.html
+++ /dev/null
@@ -1,135 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
-<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAppletElement10</title>
-<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
-<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
-<script src="DOMTestCase.js" type="text/javascript"></script>
-<script type="text/javascript">
-// expose test function names
-function exposeTestFunctionNames()
-{
-return ['HTMLAppletElement10'];
-}
-
-var docsLoaded = -1000000;
-var builder = null;
-
-//
-//   This function is called by the testing framework before
-//      running the test suite.
-//
-//   If there are no configuration exceptions, asynchronous
-//        document loading is started.  Otherwise, the status
-//        is set to complete and the exception is immediately
-//        raised when entering the body of the test.
-//
-function setUpPage() {
-   setUpPageStatus = 'running';
-   try {
-     //
-     //   creates test document builder, may throw exception
-     //
-     builder = createConfiguredBuilder();
-
-      docsLoaded = 0;
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      docsLoaded += preload(docRef, "doc", "applet");
-        
-       if (docsLoaded == 1) {
-          setUpPage = 'complete';
-       }
-    } catch(ex) {
-    	catchInitializationError(builder, ex);
-        setUpPage = 'complete';
-    }
-}
-
-
-
-//
-//   This method is called on the completion of 
-//      each asychronous load started in setUpTests.
-//
-//   When every synchronous loaded document has completed,
-//      the page status is changed which allows the
-//      body of the test to be executed.
-function loadComplete() {
-    if (++docsLoaded == 1) {
-        setUpPageStatus = 'complete';
-        runJSUnitTests();
-        SimpleTest.finish();
-    }
-}
-
-
-/**
-* 
-    The width attribute overrides the regular width. 
-
-    Retrieve the width attribute and examine its value.  
-
-* @author NIST
-* @author Mary Brady
-* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-16526327
-*/
-function HTMLAppletElement10() {
-   var success;
-    if(checkInitialization(builder, "HTMLAppletElement10") != null) return;
-    var nodeList;
-      var testNode;
-      var vwidth;
-      var doc;
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      doc = load(docRef, "doc", "applet");
-      nodeList = doc.getElementsByTagName("applet");
-      assertSize("Asize",1,nodeList);
-testNode = nodeList.item(0);
-      vwidth = testNode.width;
-
-      assertEquals("widthLink","301",vwidth);
-       
-}
-
-</script>
-</head>
-<body>
-<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAppletElement10</h2>
-<p>&lt;test name='HTMLAppletElement10' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAppletElement10&lt;/title&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
-    The width attribute overrides the regular width. 
-
-    Retrieve the width attribute and examine its value.  
-&lt;/description&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-16526327">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-16526327</a>'/&gt;
-<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vwidth' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='applet' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"applet"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;width interface='HTMLAppletElement' obj='testNode' var='vwidth'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vwidth' expected='"301"' <a id="widthLink">id='widthLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
-</p>
-<p>
-			Copyright (c) 2001-2004 World Wide Web Consortium,
-			(Massachusetts Institute of Technology, Institut National de
-			Recherche en Informatique et en Automatique, Keio University). All
-			Rights Reserved. This program is distributed under the W3C's Software
-			Intellectual Property License. This program is distributed in the
-			hope that it will be useful, but WITHOUT ANY WARRANTY; without even
-			the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-			PURPOSE.
-			</p>
-<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a> 
- for more details.</p>
-<iframe name="doc" src="files/applet.html"></iframe>
-<br>
-</body>
-</html>
deleted file mode 100644
--- a/dom/tests/mochitest/dom-level2-html/test_HTMLAppletElement11.html
+++ /dev/null
@@ -1,138 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
-<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAppletElement11</title>
-<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
-<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
-<script src="DOMTestCase.js" type="text/javascript"></script>
-<script type="text/javascript">
-// expose test function names
-function exposeTestFunctionNames()
-{
-return ['HTMLAppletElement11'];
-}
-
-var docsLoaded = -1000000;
-var builder = null;
-
-//
-//   This function is called by the testing framework before
-//      running the test suite.
-//
-//   If there are no configuration exceptions, asynchronous
-//        document loading is started.  Otherwise, the status
-//        is set to complete and the exception is immediately
-//        raised when entering the body of the test.
-//
-function setUpPage() {
-   setUpPageStatus = 'running';
-   try {
-     //
-     //   creates test document builder, may throw exception
-     //
-     builder = createConfiguredBuilder();
-
-      docsLoaded = 0;
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      docsLoaded += preload(docRef, "doc", "applet2");
-        
-       if (docsLoaded == 1) {
-          setUpPage = 'complete';
-       }
-    } catch(ex) {
-    	catchInitializationError(builder, ex);
-        setUpPage = 'complete';
-    }
-}
-
-
-
-//
-//   This method is called on the completion of 
-//      each asychronous load started in setUpTests.
-//
-//   When every synchronous loaded document has completed,
-//      the page status is changed which allows the
-//      body of the test to be executed.
-function loadComplete() {
-    if (++docsLoaded == 1) {
-        setUpPageStatus = 'complete';
-        runJSUnitTests();
-        SimpleTest.finish();
-    }
-}
-
-
-/**
-* 
-    The object attribute specifies the serialized applet file.
-
-    Retrieve the object attribute and examine its value.  
-
-* @author NIST
-* @author Rick Rivello
-* @author Curt Arnold
-* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93681523
-*/
-function HTMLAppletElement11() {
-   var success;
-    if(checkInitialization(builder, "HTMLAppletElement11") != null) return;
-    var nodeList;
-      var testNode;
-      var vobject;
-      var doc;
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      doc = load(docRef, "doc", "applet2");
-      nodeList = doc.getElementsByTagName("applet");
-      assertSize("Asize",1,nodeList);
-testNode = nodeList.item(0);
-      vobject = testNode.object;
-      // mozilla returns full uri here
-      // asertEquals("object","DOMTSApplet.dat",vobject);
-      todo_is(vobject, "DOMTSApplet.dat", "object");
-       
-}
-
-</script>
-</head>
-<body>
-<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAppletElement11</h2>
-<p>&lt;test name='HTMLAppletElement11' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAppletElement11&lt;/title&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
-    The object attribute specifies the serialized applet file.
-
-    Retrieve the object attribute and examine its value.  
-&lt;/description&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Curt Arnold&lt;/contributor&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-07-19&lt;/date&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93681523">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93681523</a>'/&gt;
-<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vobject' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='applet2' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"applet"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;object interface='HTMLAppletElement' obj='testNode' var='vobject'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vobject' expected='"DOMTSApplet.dat"' <a id="object">id='object'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
-</p>
-<p>
-			Copyright (c) 2001-2004 World Wide Web Consortium,
-			(Massachusetts Institute of Technology, Institut National de
-			Recherche en Informatique et en Automatique, Keio University). All
-			Rights Reserved. This program is distributed under the W3C's Software
-			Intellectual Property License. This program is distributed in the
-			hope that it will be useful, but WITHOUT ANY WARRANTY; without even
-			the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-			PURPOSE.
-			</p>
-<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a> 
- for more details.</p>
-<iframe name="doc" src="files/applet2.html"></iframe>
-<br>
-</body>
-</html>
deleted file mode 100644
--- a/dom/tests/mochitest/dom-level2-html/test_HTMLDocument08.html
+++ /dev/null
@@ -1,137 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
-<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument08</title>
-<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
-<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
-<script src="DOMTestCase.js" type="text/javascript"></script>
-<script type="text/javascript">
-// expose test function names
-function exposeTestFunctionNames()
-{
-return ['HTMLDocument08'];
-}
-
-var docsLoaded = -1000000;
-var builder = null;
-
-//
-//   This function is called by the testing framework before
-//      running the test suite.
-//
-//   If there are no configuration exceptions, asynchronous
-//        document loading is started.  Otherwise, the status
-//        is set to complete and the exception is immediately
-//        raised when entering the body of the test.
-//
-function setUpPage() {
-   setUpPageStatus = 'running';
-   try {
-     //
-     //   creates test document builder, may throw exception
-     //
-     builder = createConfiguredBuilder();
-
-      docsLoaded = 0;
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      docsLoaded += preload(docRef, "doc", "document-with-applet");
-        
-       if (docsLoaded == 1) {
-          setUpPage = 'complete';
-       }
-    } catch(ex) {
-    	catchInitializationError(builder, ex);
-        setUpPage = 'complete';
-    }
-}
-
-
-
-//
-//   This method is called on the completion of 
-//      each asychronous load started in setUpTests.
-//
-//   When every synchronous loaded document has completed,
-//      the page status is changed which allows the
-//      body of the test to be executed.
-function loadComplete() {
-    if (++docsLoaded == 1) {
-        setUpPageStatus = 'complete';
-        runJSUnitTests();
-        SimpleTest.finish();
-    }
-}
-
-
-/**
-* 
-    The applets attribute returns a collection of all OBJECT elements that 
-    include applets abd APPLET elements in a document.
-
-    Retrieve the applets attribute from the document and examine its value.
-
-* @author NIST
-* @author Rick Rivello
-* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-85113862
-*/
-function HTMLDocument08() {
-   var success;
-    if(checkInitialization(builder, "HTMLDocument08") != null) return;
-    var nodeList;
-      var testNode;
-      var vapplets;
-      var vlength;
-      var doc;
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      doc = load(docRef, "doc", "document-with-applet");
-      vapplets = doc.applets;
-
-      vlength = vapplets.length;
-
-      assertEquals("length",2,vlength);
-       
-}
-
-</script>
-</head>
-<body>
-<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument08</h2>
-<p>&lt;test name='HTMLDocument08' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLDocument08&lt;/title&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
-    The applets attribute returns a collection of all OBJECT elements that 
-    include applets abd APPLET elements in a document.
-
-    Retrieve the applets attribute from the document and examine its value.
-&lt;/description&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-04-30&lt;/date&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-85113862">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-85113862</a>'/&gt;
-<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vapplets' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlength' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='document' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;applets interface='HTMLDocument' obj='doc' var='vapplets'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='vapplets' var='vlength'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlength' expected='4' <a id="length">id='length'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
-</p>
-<p>
-			Copyright (c) 2001-2004 World Wide Web Consortium,
-			(Massachusetts Institute of Technology, Institut National de
-			Recherche en Informatique et en Automatique, Keio University). All
-			Rights Reserved. This program is distributed under the W3C's Software
-			Intellectual Property License. This program is distributed in the
-			hope that it will be useful, but WITHOUT ANY WARRANTY; without even
-			the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-			PURPOSE.
-			</p>
-<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a> 
- for more details.</p>
-<iframe name="doc" src="files/document-with-applet.html"></iframe>
-<br>
-</body>
-</html>
--- a/dom/tests/mochitest/general/test_interfaces.js
+++ b/dom/tests/mochitest/general/test_interfaces.js
@@ -392,18 +392,16 @@ var interfaceNamesInGlobalScope =
     "Headers",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "History",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "HTMLAllCollection",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "HTMLAnchorElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
-    "HTMLAppletElement",
-// IMPORTANT: Do not change this list without review from a DOM peer!
     "HTMLAreaElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "HTMLAudioElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "HTMLBaseElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "HTMLBodyElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
--- a/dom/webbrowserpersist/WebBrowserPersistLocalDocument.cpp
+++ b/dom/webbrowserpersist/WebBrowserPersistLocalDocument.cpp
@@ -3,30 +3,28 @@
  * 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 "WebBrowserPersistLocalDocument.h"
 #include "WebBrowserPersistDocumentParent.h"
 
 #include "mozilla/dom/HTMLInputElement.h"
 #include "mozilla/dom/HTMLSharedElement.h"
-#include "mozilla/dom/HTMLSharedObjectElement.h"
 #include "mozilla/dom/TabParent.h"
 #include "nsComponentManagerUtils.h"
 #include "nsContentUtils.h"
 #include "nsContentCID.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsFrameLoader.h"
 #include "nsIComponentRegistrar.h"
 #include "nsIContent.h"
 #include "nsIDOMAttr.h"
 #include "nsIDOMComment.h"
 #include "nsIDOMDocument.h"
 #include "nsIDOMHTMLAnchorElement.h"
-#include "nsIDOMHTMLAppletElement.h"
 #include "nsIDOMHTMLAreaElement.h"
 #include "nsIDOMHTMLBaseElement.h"
 #include "nsIDOMHTMLCollection.h"
 #include "nsIDOMHTMLDocument.h"
 #include "nsIDOMHTMLEmbedElement.h"
 #include "nsIDOMHTMLFrameElement.h"
 #include "nsIDOMHTMLIFrameElement.h"
 #include "nsIDOMHTMLImageElement.h"
@@ -536,52 +534,16 @@ ResourceReader::OnWalkDOMNode(nsIDOMNode
         return OnWalkAttribute(aNode, "src");
     }
 
     nsCOMPtr<nsIDOMHTMLObjectElement> nodeAsObject = do_QueryInterface(aNode);
     if (nodeAsObject) {
         return OnWalkAttribute(aNode, "data");
     }
 
-    nsCOMPtr<nsIDOMHTMLAppletElement> nodeAsApplet = do_QueryInterface(aNode);
-    if (nodeAsApplet) {
-        // For an applet, relative URIs are resolved relative to the
-        // codebase (which is resolved relative to the base URI).
-        nsCOMPtr<nsIURI> oldBase = mCurrentBaseURI;
-        nsAutoString codebase;
-        rv = nodeAsApplet->GetCodeBase(codebase);
-        NS_ENSURE_SUCCESS(rv, rv);
-        if (!codebase.IsEmpty()) {
-            nsCOMPtr<nsIURI> baseURI;
-            rv = NS_NewURI(getter_AddRefs(baseURI), codebase,
-                           mParent->GetCharacterSet(), mCurrentBaseURI);
-            NS_ENSURE_SUCCESS(rv, rv);
-            if (baseURI) {
-                mCurrentBaseURI = baseURI;
-                // Must restore this before returning (or ENSURE'ing).
-            }
-        }
-
-        // We only store 'code' locally if there is no 'archive',
-        // otherwise we assume the archive file(s) contains it (bug 430283).
-        nsAutoCString archiveAttr;
-        rv = ExtractAttribute(aNode, "archive", "", archiveAttr);
-        if (NS_SUCCEEDED(rv)) {
-            if (!archiveAttr.IsEmpty()) {
-                rv = OnWalkURI(archiveAttr);
-            } else {
-                rv = OnWalkAttribute(aNode, "core");
-            }
-        }
-
-        // restore the base URI we really want to have
-        mCurrentBaseURI = oldBase;
-        return rv;
-    }
-
     nsCOMPtr<nsIDOMHTMLLinkElement> nodeAsLink = do_QueryInterface(aNode);
     if (nodeAsLink) {
         // Test if the link has a rel value indicating it to be a stylesheet
         nsAutoString linkRel;
         if (NS_SUCCEEDED(nodeAsLink->GetRel(linkRel)) && !linkRel.IsEmpty()) {
             nsReadingIterator<char16_t> start;
             nsReadingIterator<char16_t> end;
             nsReadingIterator<char16_t> current;
@@ -1111,48 +1073,16 @@ PersistNodeFixup::FixupNode(nsIDOMNode *
     if (nodeAsObject) {
         rv = GetNodeToFixup(aNodeIn, aNodeOut);
         if (NS_SUCCEEDED(rv) && *aNodeOut) {
             FixupAttribute(*aNodeOut, "data");
         }
         return rv;
     }
 
-    nsCOMPtr<nsIDOMHTMLAppletElement> nodeAsApplet = do_QueryInterface(aNodeIn);
-    if (nodeAsApplet) {
-        rv = GetNodeToFixup(aNodeIn, aNodeOut);
-        if (NS_SUCCEEDED(rv) && *aNodeOut) {
-            nsCOMPtr<nsIDOMHTMLAppletElement> newApplet =
-                do_QueryInterface(*aNodeOut);
-            // For an applet, relative URIs are resolved relative to the
-            // codebase (which is resolved relative to the base URI).
-            nsCOMPtr<nsIURI> oldBase = mCurrentBaseURI;
-            nsAutoString codebase;
-            nodeAsApplet->GetCodeBase(codebase);
-            if (!codebase.IsEmpty()) {
-                nsCOMPtr<nsIURI> baseURI;
-                NS_NewURI(getter_AddRefs(baseURI), codebase,
-                          mParent->GetCharacterSet(), mCurrentBaseURI);
-                if (baseURI) {
-                    mCurrentBaseURI = baseURI;
-                }
-            }
-            // Unset the codebase too, since we'll correctly relativize the
-            // code and archive paths.
-            IgnoredErrorResult ignored;
-            static_cast<dom::HTMLSharedObjectElement*>(newApplet.get())->
-              RemoveAttribute(NS_LITERAL_STRING("codebase"), ignored);
-            FixupAttribute(*aNodeOut, "code");
-            FixupAttribute(*aNodeOut, "archive");
-            // restore the base URI we really want to have
-            mCurrentBaseURI = oldBase;
-        }
-        return rv;
-    }
-
     nsCOMPtr<nsIDOMHTMLLinkElement> nodeAsLink = do_QueryInterface(aNodeIn);
     if (nodeAsLink) {
         rv = GetNodeToFixup(aNodeIn, aNodeOut);
         if (NS_SUCCEEDED(rv) && *aNodeOut) {
             // First see if the link represents linked content
             rv = FixupAttribute(*aNodeOut, "href");
             if (NS_FAILED(rv)) {
                 // Perhaps this link is actually an anchor to related content
--- a/dom/webbrowserpersist/nsWebBrowserPersist.cpp
+++ b/dom/webbrowserpersist/nsWebBrowserPersist.cpp
@@ -56,17 +56,16 @@
 #include "nsIWebBrowserPersistable.h"
 #include "nsWebBrowserPersist.h"
 #include "WebBrowserPersistLocalDocument.h"
 
 #include "nsIContent.h"
 #include "nsIMIMEInfo.h"
 #include "mozilla/dom/HTMLInputElement.h"
 #include "mozilla/dom/HTMLSharedElement.h"
-#include "mozilla/dom/HTMLSharedObjectElement.h"
 #include "mozilla/Printf.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 // Buffer file writes in 32kb chunks
 #define BUFFERED_OUTPUT_SIZE (1024 * 32)
 
deleted file mode 100644
--- a/dom/webidl/HTMLAppletElement.webidl
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- Mode: IDL; 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/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-applet-element
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
-
-// http://www.whatwg.org/specs/web-apps/current-work/#the-applet-element
-[NeedResolve, UnsafeInPrerendering]
-interface HTMLAppletElement : HTMLElement {
-  [Pure, SetterThrows]
-           attribute DOMString align;
-  [Pure, SetterThrows]
-           attribute DOMString alt;
-  [Pure, SetterThrows]
-           attribute DOMString archive;
-  [Pure, SetterThrows]
-           attribute DOMString code;
-  [Pure, SetterThrows]
-           attribute DOMString codeBase;
-  [Pure, SetterThrows]
-           attribute DOMString height;
-  [Pure, SetterThrows]
-           attribute unsigned long hspace;
-  [Pure, SetterThrows]
-           attribute DOMString name;
-  [Pure, SetterThrows]
-           attribute DOMString _object;
-  [Pure, SetterThrows]
-           attribute unsigned long vspace;
-  [Pure, SetterThrows]
-           attribute DOMString width;
-};
-
-HTMLAppletElement implements MozImageLoadingContent;
-HTMLAppletElement implements MozFrameLoaderOwner;
-HTMLAppletElement implements MozObjectLoadingContent;
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -549,17 +549,16 @@ WEBIDL_FILES = [
     'GeometryUtils.webidl',
     'GetUserMediaRequest.webidl',
     'Grid.webidl',
     'Headers.webidl',
     'HeapSnapshot.webidl',
     'History.webidl',
     'HTMLAllCollection.webidl',
     'HTMLAnchorElement.webidl',
-    'HTMLAppletElement.webidl',
     'HTMLAreaElement.webidl',
     'HTMLAudioElement.webidl',
     'HTMLBaseElement.webidl',
     'HTMLBodyElement.webidl',
     'HTMLBRElement.webidl',
     'HTMLButtonElement.webidl',
     'HTMLCanvasElement.webidl',
     'HTMLCollection.webidl',
--- a/dom/xml/nsXMLContentSink.cpp
+++ b/dom/xml/nsXMLContentSink.cpp
@@ -533,18 +533,17 @@ nsXMLContentSink::CloseElement(nsIConten
 
   // Some HTML nodes need DoneAddingChildren() called to initialize
   // properly (eg form state restoration).
   if ((nodeInfo->NamespaceID() == kNameSpaceID_XHTML &&
        (nodeInfo->NameAtom() == nsGkAtoms::select ||
         nodeInfo->NameAtom() == nsGkAtoms::textarea ||
         nodeInfo->NameAtom() == nsGkAtoms::video ||
         nodeInfo->NameAtom() == nsGkAtoms::audio ||
-        nodeInfo->NameAtom() == nsGkAtoms::object ||
-        nodeInfo->NameAtom() == nsGkAtoms::applet))
+        nodeInfo->NameAtom() == nsGkAtoms::object))
       || nodeInfo->NameAtom() == nsGkAtoms::title
       ) {
     aContent->DoneAddingChildren(HaveNotifiedForCurrentContent());
   }
 
   if (IsMonolithicContainer(nodeInfo)) {
     mInMonolithicContainer--;
   }
@@ -1555,18 +1554,17 @@ nsXMLContentSink::UpdateChildCounts()
 }
 
 bool
 nsXMLContentSink::IsMonolithicContainer(mozilla::dom::NodeInfo* aNodeInfo)
 {
   return ((aNodeInfo->NamespaceID() == kNameSpaceID_XHTML &&
           (aNodeInfo->NameAtom() == nsGkAtoms::tr ||
            aNodeInfo->NameAtom() == nsGkAtoms::select ||
-           aNodeInfo->NameAtom() == nsGkAtoms::object ||
-           aNodeInfo->NameAtom() == nsGkAtoms::applet)) ||
+           aNodeInfo->NameAtom() == nsGkAtoms::object)) ||
           (aNodeInfo->NamespaceID() == kNameSpaceID_MathML &&
           (aNodeInfo->NameAtom() == nsGkAtoms::math))
           );
 }
 
 void
 nsXMLContentSink::ContinueInterruptedParsingIfEnabled()
 {
--- a/dom/xslt/xslt/txMozillaXMLOutput.cpp
+++ b/dom/xslt/xslt/txMozillaXMLOutput.cpp
@@ -283,17 +283,16 @@ txMozillaXMLOutput::endElement()
         if (element->IsHTMLElement()) {
             rv = endHTMLElement(element);
             NS_ENSURE_SUCCESS(rv, rv);
         }
 
         // Handle elements that are different when parser-created
         if (element->IsAnyOfHTMLElements(nsGkAtoms::title,
                                          nsGkAtoms::object,
-                                         nsGkAtoms::applet,
                                          nsGkAtoms::select,
                                          nsGkAtoms::textarea) ||
             element->IsSVGElement(nsGkAtoms::title)) {
             element->DoneAddingChildren(true);
         } else if (element->IsSVGElement(nsGkAtoms::script) ||
                    element->IsHTMLElement(nsGkAtoms::script)) {
             nsCOMPtr<nsIScriptElement> sele = do_QueryInterface(element);
             if (sele) {
--- a/editor/libeditor/HTMLAnonymousNodeEditor.cpp
+++ b/editor/libeditor/HTMLAnonymousNodeEditor.cpp
@@ -322,20 +322,23 @@ HTMLEditor::DeleteRefToAnonymousNode(nsI
         docObserver->EndUpdate(document, UPDATE_CONTENT_MODEL);
       }
     }
   }
 
   // Remove reference from the parent element.
   auto nac = static_cast<mozilla::ManualNAC*>(
       parentContent->GetProperty(nsGkAtoms::manualNACProperty));
-  MOZ_ASSERT(nac);
-  nac->RemoveElement(aContent);
-  if (nac->IsEmpty()) {
-    parentContent->DeleteProperty(nsGkAtoms::manualNACProperty);
+  // nsIDocument::AdoptNode might remove all properties before destroying
+  // editor.  So we have to consider that NAC could be already removed.
+  if (nac) {
+    nac->RemoveElement(aContent);
+    if (nac->IsEmpty()) {
+      parentContent->DeleteProperty(nsGkAtoms::manualNACProperty);
+    }
   }
 
   aContent->UnbindFromTree();
 }
 
 // The following method is mostly called by a selection listener. When a
 // selection change is notified, the method is called to check if resizing
 // handles, a grabber and/or inline table editing UI need to be displayed
--- a/editor/libeditor/HTMLEditUtils.cpp
+++ b/editor/libeditor/HTMLEditUtils.cpp
@@ -589,16 +589,20 @@ struct ElementInfo final
 #endif
 
 static const ElementInfo kElements[eHTMLTag_userdefined] = {
   ELEM(a, true, false, GROUP_SPECIAL, GROUP_INLINE_ELEMENT),
   ELEM(abbr, true, true, GROUP_PHRASE, GROUP_INLINE_ELEMENT),
   ELEM(acronym, true, true, GROUP_PHRASE, GROUP_INLINE_ELEMENT),
   ELEM(address, true, true, GROUP_BLOCK,
        GROUP_INLINE_ELEMENT | GROUP_P),
+  // While applet is no longer a valid tag, removing it here breaks the editor
+  // (compiles, but causes many tests to fail in odd ways). This list is tracked
+  // against the main HTML Tag list, so any changes will require more than just
+  // removing entries.
   ELEM(applet, true, true, GROUP_SPECIAL | GROUP_BLOCK,
        GROUP_FLOW_ELEMENT | GROUP_OBJECT_CONTENT),
   ELEM(area, false, false, GROUP_MAP_CONTENT, GROUP_NONE),
   ELEM(article, true, true, GROUP_BLOCK, GROUP_FLOW_ELEMENT),
   ELEM(aside, true, true, GROUP_BLOCK, GROUP_FLOW_ELEMENT),
   ELEM(audio, false, false, GROUP_NONE, GROUP_NONE),
   ELEM(b, true, true, GROUP_FONTSTYLE, GROUP_INLINE_ELEMENT),
   ELEM(base, false, false, GROUP_HEAD_CONTENT, GROUP_NONE),
new file mode 100644
--- /dev/null
+++ b/editor/libeditor/crashtests/1383755.html
@@ -0,0 +1,26 @@
+<html>
+  <head>
+    <script type="application/javascript">
+      let table = document.createElement('table');
+      document.documentElement.appendChild(table);
+      let tr = document.createElement('tr');
+      table.appendChild(tr);
+      let input = document.createElement('input');
+      document.documentElement.appendChild(input);
+
+      let img = document.createElement('img');
+      input.appendChild(img);
+      img.contentEditable = 'true'
+      tr.appendChild(img);
+      img.offsetParent;
+
+      // Since table's cell is selected by the following, it will show
+      // object resizer that is anonymous element.
+      window.getSelection().selectAllChildren(tr);
+      // Document.adoptNode will remove anonymous element of object resizer
+      // and it shouldn't cause crash
+      document.implementation.createDocument('', '').adoptNode(table);
+    </script>
+  </head>
+</html>
+
--- a/editor/libeditor/crashtests/crashtests.list
+++ b/editor/libeditor/crashtests/crashtests.list
@@ -73,8 +73,9 @@ load 1317704.html
 load 1317718.html
 load 1324505.html
 needs-focus load 1343918.html
 load 1345015.html
 load 1348851.html
 load 1350772.html
 load 1366176.html
 load 1375131.html
+load 1383755.html
--- a/editor/libeditor/tests/mochitest.ini
+++ b/editor/libeditor/tests/mochitest.ini
@@ -161,21 +161,27 @@ subsuite = clipboard
 [test_bug767684.html]
 [test_bug772796.html]
 skip-if = toolkit == 'android' # bug 1309431
 [test_bug773262.html]
 [test_bug780035.html]
 [test_bug787432.html]
 [test_bug790475.html]
 [test_bug795418.html]
+subsuite = clipboard
 [test_bug795418-2.html]
+subsuite = clipboard
 [test_bug795418-3.html]
+subsuite = clipboard
 [test_bug795418-4.html]
+subsuite = clipboard
 [test_bug795418-5.html]
+subsuite = clipboard
 [test_bug795418-6.html]
+subsuite = clipboard
 [test_bug795785.html]
 [test_bug796839.html]
 [test_bug830600.html]
 subsuite = clipboard
 skip-if = e10s
 [test_bug832025.html]
 [test_bug850043.html]
 [test_bug857487.html]
--- a/gfx/2d/DrawTargetSkia.cpp
+++ b/gfx/2d/DrawTargetSkia.cpp
@@ -1438,28 +1438,39 @@ DrawTargetSkia::DrawGlyphs(ScaledFont* a
   }
 #endif
   default:
     break;
   }
 
   paint.mPaint.setSubpixelText(useSubpixelText);
 
-  std::vector<uint16_t> indices;
-  std::vector<SkPoint> offsets;
-  indices.resize(aBuffer.mNumGlyphs);
-  offsets.resize(aBuffer.mNumGlyphs);
+  const uint32_t heapSize = 64;
+  uint16_t indicesOnStack[heapSize];
+  SkPoint offsetsOnStack[heapSize];
+  std::vector<uint16_t> indicesOnHeap;
+  std::vector<SkPoint> offsetsOnHeap;
+  uint16_t* indices = indicesOnStack;
+  SkPoint* offsets = offsetsOnStack;
+  if (aBuffer.mNumGlyphs > heapSize) {
+    // Heap allocation/ deallocation is slow, use it only if we need a
+    // bigger(>heapSize) buffer.
+    indicesOnHeap.resize(aBuffer.mNumGlyphs);
+    offsetsOnHeap.resize(aBuffer.mNumGlyphs);
+    indices = (uint16_t*)&indicesOnHeap.front();
+    offsets = (SkPoint*)&offsetsOnHeap.front();
+  }
 
   for (unsigned int i = 0; i < aBuffer.mNumGlyphs; i++) {
     indices[i] = aBuffer.mGlyphs[i].mIndex;
     offsets[i].fX = SkFloatToScalar(aBuffer.mGlyphs[i].mPosition.x);
     offsets[i].fY = SkFloatToScalar(aBuffer.mGlyphs[i].mPosition.y);
   }
 
-  mCanvas->drawPosText(&indices.front(), aBuffer.mNumGlyphs*2, &offsets.front(), paint.mPaint);
+  mCanvas->drawPosText(indices, aBuffer.mNumGlyphs*2, offsets, paint.mPaint);
 }
 
 void
 DrawTargetSkia::FillGlyphs(ScaledFont* aFont,
                            const GlyphBuffer& aBuffer,
                            const Pattern& aPattern,
                            const DrawOptions& aOptions,
                            const GlyphRenderingOptions* aRenderingOptions)
--- a/gfx/2d/Path.cpp
+++ b/gfx/2d/Path.cpp
@@ -253,32 +253,40 @@ FlattenBezierCurveSegment(const BezierCo
    * The basic premise is that for a small t the third order term in the
    * equation of a cubic bezier curve is insignificantly small. This can
    * then be approximated by a quadratic equation for which the maximum
    * difference from a linear approximation can be much more easily determined.
    */
   BezierControlPoints currentCP = aControlPoints;
 
   double t = 0;
+  double currentTolerance = aTolerance;
   while (t < 1.0) {
     PointD cp21 = currentCP.mCP2 - currentCP.mCP1;
     PointD cp31 = currentCP.mCP3 - currentCP.mCP1;
 
     /* To remove divisions and check for divide-by-zero, this is optimized from:
      * Float s3 = (cp31.x * cp21.y - cp31.y * cp21.x) / hypotf(cp21.x, cp21.y);
      * t = 2 * Float(sqrt(aTolerance / (3. * std::abs(s3))));
      */
     double cp21x31 = cp31.x * cp21.y - cp31.y * cp21.x;
     double h = hypot(cp21.x, cp21.y);
     if (cp21x31 * h == 0) {
       break;
     }
 
     double s3inv = h / cp21x31;
-    t = 2 * sqrt(aTolerance * std::abs(s3inv) / 3.);
+    t = 2 * sqrt(currentTolerance * std::abs(s3inv) / 3.);
+    currentTolerance *= 1 + aTolerance;
+    // Increase tolerance every iteration to prevent this loop from executing
+    // too many times. This approximates the length of large curves more
+    // roughly. In practice, aTolerance is the constant kFlatteningTolerance
+    // which has value 0.0001. With this value, it takes 6,932 splits to double
+    // currentTolerance (to 0.0002) and 23,028 splits to increase
+    // currentTolerance by an order of magnitude (to 0.001).
     if (t >= 1.0) {
       break;
     }
 
     SplitBezier(currentCP, nullptr, &currentCP, t);
 
     aSink->LineTo(currentCP.mCP1.ToPoint());
   }
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -3700,17 +3700,16 @@ nsCSSFrameConstructor::FindHTMLData(Elem
     { &nsGkAtoms::br,
       FCDATA_DECL(FCDATA_IS_LINE_PARTICIPANT | FCDATA_IS_LINE_BREAK,
                   NS_NewBRFrame) },
     SIMPLE_TAG_CREATE(wbr, NS_NewWBRFrame),
     SIMPLE_TAG_CHAIN(input, nsCSSFrameConstructor::FindInputData),
     SIMPLE_TAG_CREATE(textarea, NS_NewTextControlFrame),
     COMPLEX_TAG_CREATE(select, &nsCSSFrameConstructor::ConstructSelectFrame),
     SIMPLE_TAG_CHAIN(object, nsCSSFrameConstructor::FindObjectData),
-    SIMPLE_TAG_CHAIN(applet, nsCSSFrameConstructor::FindObjectData),
     SIMPLE_TAG_CHAIN(embed, nsCSSFrameConstructor::FindObjectData),
     COMPLEX_TAG_CREATE(fieldset,
                        &nsCSSFrameConstructor::ConstructFieldSetFrame),
     { &nsGkAtoms::legend,
       FCDATA_DECL(FCDATA_ALLOW_BLOCK_STYLES | FCDATA_MAY_NEED_SCROLLFRAME,
                   NS_NewLegendFrame) },
     SIMPLE_TAG_CREATE(frameset, NS_NewHTMLFramesetFrame),
     SIMPLE_TAG_CREATE(iframe, NS_NewSubDocumentFrame),
@@ -3842,17 +3841,17 @@ nsCSSFrameConstructor::FindObjectData(El
   uint32_t type;
   if (aElement->State().HasAtLeastOneOfStates(NS_EVENT_STATE_BROKEN |
                                               NS_EVENT_STATE_USERDISABLED |
                                               NS_EVENT_STATE_SUPPRESSED)) {
     type = nsIObjectLoadingContent::TYPE_NULL;
   } else {
     nsCOMPtr<nsIObjectLoadingContent> objContent(do_QueryInterface(aElement));
     NS_ASSERTION(objContent,
-                 "applet, embed and object must implement "
+                 "embed and object must implement "
                  "nsIObjectLoadingContent!");
 
     objContent->GetDisplayedType(&type);
   }
 
   static const FrameConstructionDataByInt sObjectData[] = {
     SIMPLE_INT_CREATE(nsIObjectLoadingContent::TYPE_LOADING,
                       NS_NewEmptyFrame),
--- a/layout/build/nsLayoutStatics.cpp
+++ b/layout/build/nsLayoutStatics.cpp
@@ -116,16 +116,17 @@
 #include "mozilla/EventDispatcher.h"
 #include "mozilla/IMEStateManager.h"
 #include "mozilla/dom/HTMLVideoElement.h"
 #include "TouchManager.h"
 #include "MediaDecoder.h"
 #include "MediaPrefs.h"
 #include "mozilla/ServoBindings.h"
 #include "mozilla/StaticPresData.h"
+#include "mozilla/StylePrefs.h"
 #include "mozilla/dom/WebIDLGlobalNameHash.h"
 #include "mozilla/dom/ipc/IPCBlobInputStreamStorage.h"
 #include "mozilla/dom/U2FTokenManager.h"
 
 using namespace mozilla;
 using namespace mozilla::net;
 using namespace mozilla::dom;
 using namespace mozilla::dom::ipc;
@@ -229,17 +230,17 @@ nsLayoutStatics::Initialize()
   }
 
   rv = nsCCUncollectableMarker::Init();
   if (NS_FAILED(rv)) {
     NS_ERROR("Could not initialize nsCCUncollectableMarker");
     return rv;
   }
 
-  nsCSSParser::Startup();
+  StylePrefs::Init();
   nsCSSRuleProcessor::Startup();
 
 #ifdef MOZ_XUL
   rv = nsXULPopupManager::Init();
   if (NS_FAILED(rv)) {
     NS_ERROR("Could not initialize nsXULPopupManager");
     return rv;
   }
--- a/layout/generic/nsPluginFrame.cpp
+++ b/layout/generic/nsPluginFrame.cpp
@@ -374,18 +374,17 @@ nsPluginFrame::PrepForDrawing(nsIWidget 
 #define EMBED_DEF_HEIGHT 200
 
 /* virtual */ nscoord
 nsPluginFrame::GetMinISize(gfxContext *aRenderingContext)
 {
   nscoord result = 0;
 
   if (!IsHidden(false)) {
-    if (mContent->IsAnyOfHTMLElements(nsGkAtoms::applet,
-                                      nsGkAtoms::embed)) {
+    if (mContent->IsHTMLElement(nsGkAtoms::embed)) {
       bool vertical = GetWritingMode().IsVertical();
       result = nsPresContext::CSSPixelsToAppUnits(
         vertical ? EMBED_DEF_HEIGHT : EMBED_DEF_WIDTH);
     }
   }
 
   DISPLAY_MIN_WIDTH(this, result);
   return result;
@@ -436,19 +435,18 @@ nsPluginFrame::GetDesiredSize(nsPresCont
 
   if (IsHidden(false)) {
     return;
   }
 
   aMetrics.Width() = aReflowInput.ComputedWidth();
   aMetrics.Height() = aReflowInput.ComputedHeight();
 
-  // for EMBED and APPLET, default to 240x200 for compatibility
-  if (mContent->IsAnyOfHTMLElements(nsGkAtoms::applet,
-                                    nsGkAtoms::embed)) {
+  // for EMBED, default to 240x200 for compatibility
+  if (mContent->IsHTMLElement(nsGkAtoms::embed)) {
     if (aMetrics.Width() == NS_UNCONSTRAINEDSIZE) {
       aMetrics.Width() = clamped(nsPresContext::CSSPixelsToAppUnits(EMBED_DEF_WIDTH),
                                aReflowInput.ComputedMinWidth(),
                                aReflowInput.ComputedMaxWidth());
     }
     if (aMetrics.Height() == NS_UNCONSTRAINEDSIZE) {
       aMetrics.Height() = clamped(nsPresContext::CSSPixelsToAppUnits(EMBED_DEF_HEIGHT),
                                 aReflowInput.ComputedMinHeight(),
--- a/layout/generic/nsSubDocumentFrame.cpp
+++ b/layout/generic/nsSubDocumentFrame.cpp
@@ -1248,17 +1248,17 @@ nsSubDocumentFrame::EnsureInnerView()
   return mInnerView;
 }
 
 nsIFrame*
 nsSubDocumentFrame::ObtainIntrinsicSizeFrame()
 {
   nsCOMPtr<nsIObjectLoadingContent> olc = do_QueryInterface(GetContent());
   if (olc) {
-    // We are an HTML <object>, <embed> or <applet> (a replaced element).
+    // We are an HTML <object> or <embed> (a replaced element).
 
     // Try to get an nsIFrame for our sub-document's document element
     nsIFrame* subDocRoot = nullptr;
 
     nsCOMPtr<nsIDocShell> docShell;
     GetDocShell(getter_AddRefs(docShell));
     if (docShell) {
       nsCOMPtr<nsIPresShell> presShell = docShell->GetPresShell();
--- a/layout/generic/nsSubDocumentFrame.h
+++ b/layout/generic/nsSubDocumentFrame.h
@@ -148,17 +148,17 @@ protected:
   nscoord GetIntrinsicBSize();
 
   // Show our document viewer. The document viewer is hidden via a script
   // runner, so that we can save and restore the presentation if we're
   // being reframed.
   void ShowViewer();
 
   /* Obtains the frame we should use for intrinsic size information if we are
-   * an HTML <object>, <embed> or <applet> (a replaced element - not <iframe>)
+   * an HTML <object> or <embed>  (a replaced element - not <iframe>)
    * and our sub-document has an intrinsic size. The frame returned is the
    * frame for the document element of the document we're embedding.
    *
    * Called "Obtain*" and not "Get*" because of comment on GetDocShell that
    * says it should be called ObtainDocShell because of its side effects.
    */
   nsIFrame* ObtainIntrinsicSizeFrame();
 
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-visited/transition-on-visited-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+span {
+  color: rgb(128, 0, 128);
+}
+</style>
+</head>
+<body>
+<span>Visited Link</span>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-visited/transition-on-visited.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=1381235
+-->
+<head>
+<title>Test for Bug 1381235</title>
+<style>
+a {
+  text-decoration: none;
+  color: rgb(255, 0, 0);
+  transition: color 1000s steps(2, start);
+}
+</style>
+</head>
+<body onload="runTest()">
+<a id="link" href="visited-page.html">Visited Link</a>
+<script type="application/javascript">
+function runTest() {
+  var a = document.getElementById("link");
+  a.style.color = "rgb(0, 0, 255)";
+}
+</script>
+</body>
+</html>
--- a/layout/style/ServoBindings.cpp
+++ b/layout/style/ServoBindings.cpp
@@ -49,17 +49,16 @@
 
 #include "mozilla/DeclarationBlockInlines.h"
 #include "mozilla/EffectCompositor.h"
 #include "mozilla/EffectSet.h"
 #include "mozilla/EventStates.h"
 #include "mozilla/GeckoStyleContext.h"
 #include "mozilla/Keyframe.h"
 #include "mozilla/Mutex.h"
-#include "mozilla/Preferences.h"
 #include "mozilla/ServoElementSnapshot.h"
 #include "mozilla/ServoRestyleManager.h"
 #include "mozilla/StyleAnimationValue.h"
 #include "mozilla/SystemGroup.h"
 #include "mozilla/ServoMediaList.h"
 #include "mozilla/RWLock.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/ElementInlines.h"
@@ -85,18 +84,16 @@ using namespace mozilla::dom;
   }
 #include "mozilla/ServoArcTypeList.h"
 SERVO_ARC_TYPE(StyleContext, ServoStyleContext)
 #undef SERVO_ARC_TYPE
 
 static Mutex* sServoFontMetricsLock = nullptr;
 static RWLock* sServoLangFontPrefsLock = nullptr;
 
-static bool sFramesTimingFunctionEnabled;
-
 static
 const nsFont*
 ThreadSafeGetDefaultFontHelper(const nsPresContext* aPresContext,
                                nsIAtom* aLanguage, uint8_t aGenericId)
 {
   bool needsCache = false;
   const nsFont* retval;
 
@@ -825,21 +822,16 @@ Gecko_GetPositionInSegment(RawGeckoAnima
   double positionInSegment =
     (aProgress - aSegment->mFromKey) / (aSegment->mToKey - aSegment->mFromKey);
 
   return ComputedTimingFunction::GetPortion(aSegment->mTimingFunction,
                                             positionInSegment,
                                             aBeforeFlag);
 }
 
-bool
-Gecko_IsFramesTimingEnabled() {
-  return sFramesTimingFunctionEnabled;
-}
-
 RawServoAnimationValueBorrowedOrNull
 Gecko_AnimationGetBaseStyle(void* aBaseStyles, nsCSSPropertyID aProperty)
 {
   auto base =
     static_cast<nsRefPtrHashtable<nsUint32HashKey, RawServoAnimationValue>*>
       (aBaseStyles);
   return base->GetWeak(aProperty);
 }
@@ -2413,19 +2405,16 @@ Gecko_XBLBinding_InheritsStyle(RawGeckoX
 void
 InitializeServo()
 {
   URLExtraData::InitDummy();
   Servo_Initialize(URLExtraData::Dummy());
 
   sServoFontMetricsLock = new Mutex("Gecko_GetFontMetrics");
   sServoLangFontPrefsLock = new RWLock("nsPresContext::GetDefaultFont");
-
-  Preferences::AddBoolVarCache(&sFramesTimingFunctionEnabled,
-                               "layout.css.frames-timing.enabled");
 }
 
 void
 ShutdownServo()
 {
   delete sServoFontMetricsLock;
   delete sServoLangFontPrefsLock;
   Servo_Shutdown();
--- a/layout/style/ServoBindings.h
+++ b/layout/style/ServoBindings.h
@@ -259,17 +259,16 @@ nsCSSPropertyID Gecko_ElementTransitions
 RawServoAnimationValueBorrowedOrNull Gecko_ElementTransitions_EndValueAt(
   RawGeckoElementBorrowed aElementOrPseudo,
   size_t aIndex);
 double Gecko_GetProgressFromComputedTiming(RawGeckoComputedTimingBorrowed aComputedTiming);
 double Gecko_GetPositionInSegment(
   RawGeckoAnimationPropertySegmentBorrowed aSegment,
   double aProgress,
   mozilla::ComputedTimingFunction::BeforeFlag aBeforeFlag);
-bool Gecko_IsFramesTimingEnabled();
 // Get servo's AnimationValue for |aProperty| from the cached base style
 // |aBaseStyles|.
 // |aBaseStyles| is nsRefPtrHashtable<nsUint32HashKey, RawServoAnimationValue>.
 // We use void* to avoid exposing nsRefPtrHashtable in FFI.
 RawServoAnimationValueBorrowedOrNull Gecko_AnimationGetBaseStyle(
   void* aBaseStyles,
   nsCSSPropertyID aProperty);
 void Gecko_StyleTransition_SetUnsupportedProperty(
--- a/layout/style/ServoBindings.toml
+++ b/layout/style/ServoBindings.toml
@@ -56,16 +56,17 @@ headers = [
     "mozilla/Keyframe.h",
     "mozilla/ServoElementSnapshot.h",
     "mozilla/ServoElementSnapshotTable.h",
     "mozilla/css/ErrorReporter.h",
     "mozilla/dom/Element.h",
     "mozilla/dom/ChildIterator.h",
     "mozilla/dom/NameSpaceConstants.h",
     "mozilla/LookAndFeel.h",
+    "mozilla/StylePrefs.h",
     "mozilla/ServoBindings.h",
     "mozilla/ServoMediaList.h",
     "mozilla/ServoStyleContext.h",
     "nsCSSCounterStyleRule.h",
     "nsCSSFontFaceRule.h",
     "nsMediaFeatures.h",
     "nsMediaList.h",
     "nsXBLBinding.h",
@@ -131,16 +132,17 @@ whitelist-types = [
     "mozilla::css::SheetParsingMode",
     "mozilla::css::URLMatchingFunction",
     "mozilla::dom::IterationCompositeOperation",
     "mozilla::dom::StyleChildrenIterator",
     "mozilla::HalfCorner",
     "mozilla::MallocSizeOf",
     "mozilla::PropertyStyleAnimationValuePair",
     "mozilla::ServoTraversalFlags",
+    "mozilla::StylePrefs",
     "mozilla::StyleShapeRadius",
     "mozilla::StyleGrid.*",
     "mozilla::UpdateAnimationsTasks",
     "mozilla::LookAndFeel",
     "mozilla::gfx::Float",
     "mozilla::gfx::FontVariation",
     ".*ThreadSafe.*Holder",
     "AnonymousContent",
@@ -281,16 +283,17 @@ opaque-types = [
     "std::atomic",
     "std::atomic___base",
     # We want everything but FontVariation and Float to be opaque but we don't
     # have negative regexes.
     "mozilla::gfx::(.{0,4}|.{6,12}|.{14,}|([^F][^o][^n][^t][^V][^a][^r][^i][^a][^t][^i][^o][^n])|([^F][^l][^o][^a][^t]))",
     "FallibleTArray",
     "mozilla::dom::Sequence",
     "mozilla::dom::Optional",
+    "mozilla::dom::OwningNodeOrString_Value",
     "mozilla::dom::Nullable",
     "RefPtr_Proxy",
     "RefPtr_Proxy_member_function",
     "nsAutoPtr_Proxy",
     "nsAutoPtr_Proxy_member_function",
     "mozilla::detail::PointerType",
     "mozilla::Pair_Base",
     "mozilla::SupportsWeakPtr",
new file mode 100644
--- /dev/null
+++ b/layout/style/StylePrefs.cpp
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ts=8 sts=2 et sw=2 tw=80: */
+/* 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 "mozilla/StylePrefs.h"
+
+#include "mozilla/Preferences.h"
+
+namespace mozilla {
+
+bool StylePrefs::sOpentypeSVGEnabled;
+bool StylePrefs::sWebkitPrefixedAliasesEnabled;
+bool StylePrefs::sWebkitDevicePixelRatioEnabled;
+bool StylePrefs::sMozGradientsEnabled;
+bool StylePrefs::sControlCharVisibility;
+bool StylePrefs::sFramesTimingFunctionEnabled;
+
+/* static */ void
+StylePrefs::Init()
+{
+  Preferences::AddBoolVarCache(&sOpentypeSVGEnabled,
+                               "gfx.font_rendering.opentype_svg.enabled");
+  Preferences::AddBoolVarCache(&sWebkitPrefixedAliasesEnabled,
+                               "layout.css.prefixes.webkit");
+  Preferences::AddBoolVarCache(&sWebkitDevicePixelRatioEnabled,
+                               "layout.css.prefixes.device-pixel-ratio-webkit");
+  Preferences::AddBoolVarCache(&sMozGradientsEnabled,
+                               "layout.css.prefixes.gradients");
+  Preferences::AddBoolVarCache(&sControlCharVisibility,
+                               "layout.css.control-characters.visible");
+  Preferences::AddBoolVarCache(&sFramesTimingFunctionEnabled,
+                               "layout.css.frames-timing.enabled");
+}
+
+} // namespace mozilla
new file mode 100644
--- /dev/null
+++ b/layout/style/StylePrefs.h
@@ -0,0 +1,28 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ts=8 sts=2 et sw=2 tw=80: */
+/* 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/. */
+
+/* A namespace class for style system prefs */
+
+#ifndef mozilla_StylePrefs_h
+#define mozilla_StylePrefs_h
+
+namespace mozilla {
+
+struct StylePrefs
+{
+  static bool sOpentypeSVGEnabled;
+  static bool sWebkitPrefixedAliasesEnabled;
+  static bool sWebkitDevicePixelRatioEnabled;
+  static bool sMozGradientsEnabled;
+  static bool sControlCharVisibility;
+  static bool sFramesTimingFunctionEnabled;
+
+  static void Init();
+};
+
+} // namespace mozilla
+
+#endif // mozilla_StylePrefs_h
--- a/layout/style/moz.build
+++ b/layout/style/moz.build
@@ -126,16 +126,17 @@ EXPORTS.mozilla += [
     'ServoStyleSheet.h',
     'ServoSupportsRule.h',
     'ServoTypes.h',
     'ServoUtils.h',
     'SheetType.h',
     'StyleAnimationValue.h',
     'StyleBackendType.h',
     'StyleComplexColor.h',
+    'StylePrefs.h',
     'StyleSetHandle.h',
     'StyleSetHandleInlines.h',
     'StyleSheet.h',
     'StyleSheetInfo.h',
     'StyleSheetInlines.h',
     'URLExtraData.h',
 ]
 
@@ -261,16 +262,17 @@ UNIFIED_SOURCES += [
     'ServoPageRule.cpp',
     'ServoSpecifiedValues.cpp',
     'ServoStyleContext.cpp',
     'ServoStyleRule.cpp',
     'ServoStyleSet.cpp',
     'ServoStyleSheet.cpp',
     'ServoSupportsRule.cpp',
     'StyleAnimationValue.cpp',
+    'StylePrefs.cpp',
     'StyleRule.cpp',
     'StyleSheet.cpp',
     'URLExtraData.cpp',
 ]
 
 # - nsLayoutStylesheetCache.cpp needs to be built separately because it uses
 # nsExceptionHandler.h, which includes windows.h.
 SOURCES += [
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -54,35 +54,28 @@
 #include "mozilla/Sprintf.h"
 #include "nsContentUtils.h"
 #include "nsAutoPtr.h"
 #include "CSSCalc.h"
 #include "nsMediaFeatures.h"
 #include "nsLayoutUtils.h"
 #include "mozilla/LookAndFeel.h"
 #include "mozilla/Preferences.h"
+#include "mozilla/StylePrefs.h"
 #include "nsRuleData.h"
 #include "mozilla/CSSVariableValues.h"
 #include "mozilla/dom/AnimationEffectReadOnlyBinding.h"
 #include "mozilla/dom/URL.h"
 #include "gfxFontFamilyList.h"
 
 using namespace mozilla;
 using namespace mozilla::css;
 
 typedef nsCSSProps::KTableEntry KTableEntry;
 
-// pref-backed bool values (hooked up in nsCSSParser::Startup)
-static bool sOpentypeSVGEnabled;
-static bool sWebkitPrefixedAliasesEnabled;
-static bool sWebkitDevicePixelRatioEnabled;
-static bool sMozGradientsEnabled;
-static bool sControlCharVisibility;
-static bool sFramesTimingFunctionEnabled;
-
 const uint32_t
 nsCSSProps::kParserVariantTable[eCSSProperty_COUNT_no_shorthands] = {
 #define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, kwtable_, \
                  stylestruct_, stylestructoffset_, animtype_)                 \
   parsevariant_,
 #define CSS_PROP_LIST_INCLUDE_LOGICAL
 #include "nsCSSPropList.h"
 #undef CSS_PROP_LIST_INCLUDE_LOGICAL
@@ -3502,22 +3495,22 @@ CSSParserImpl::ParseMediaQueryExpression
   nsMediaExpression *expr = aQuery->NewExpression();
 
   // case insensitive from CSS - must be lower cased
   nsContentUtils::ASCIIToLower(mToken.mIdent);
   nsDependentString featureString(mToken.mIdent, 0);
   uint8_t satisfiedReqFlags = 0;
 
   // Strip off "-webkit-" prefix from featureString:
-  if (sWebkitPrefixedAliasesEnabled &&
+  if (StylePrefs::sWebkitPrefixedAliasesEnabled &&
       StringBeginsWith(featureString, NS_LITERAL_STRING("-webkit-"))) {
     satisfiedReqFlags |= nsMediaFeature::eHasWebkitPrefix;
     featureString.Rebind(featureString, 8);
   }
-  if (sWebkitDevicePixelRatioEnabled) {
+  if (StylePrefs::sWebkitDevicePixelRatioEnabled) {
     satisfiedReqFlags |= nsMediaFeature::eWebkitDevicePixelRatioPrefEnabled;
   }
 
   // Strip off "min-"/"max-" prefix from featureString:
   if (StringBeginsWith(featureString, NS_LITERAL_STRING("min-"))) {
     expr->mRange = nsMediaExpression::eMin;
     featureString.Rebind(featureString, 4);
   } else if (StringBeginsWith(featureString, NS_LITERAL_STRING("max-"))) {
@@ -7023,17 +7016,17 @@ CSSParserImpl::ParseTreePseudoElement(ns
 #endif
 
 nsCSSKeyword
 CSSParserImpl::LookupKeywordPrefixAware(nsAString& aKeywordStr,
                                         const KTableEntry aKeywordTable[])
 {
   nsCSSKeyword keyword = nsCSSKeywords::LookupKeyword(aKeywordStr);
 
-  if (!sWebkitPrefixedAliasesEnabled) {
+  if (!StylePrefs::sWebkitPrefixedAliasesEnabled) {
     // Not accepting webkit-prefixed keywords -> don't do anything special.
     return keyword;
   }
 
   if (aKeywordTable == nsCSSProps::kDisplayKTable) {
     if ((keyword == eCSSKeyword__webkit_box ||
          keyword == eCSSKeyword__webkit_inline_box)) {
       // Make a note that we're accepting some "-webkit-{inline-}box" styling,
@@ -7048,17 +7041,17 @@ CSSParserImpl::LookupKeywordPrefixAware(
       // If we've seen "display: -webkit-box" (or "-webkit-inline-box") in an
       // earlier declaration and we honored it, then we have to watch out for
       // later "display: -moz-box" (and "-moz-inline-box") declarations; they're
       // likely just a halfhearted attempt at compatibility, and they actually
       // end up stomping on our emulation of the earlier -webkit-box
       // display-value, via the CSS cascade. To prevent this problem, we treat
       // "display: -moz-box" & "-moz-inline-box" as if they were simply a
       // repetition of the webkit equivalent that we already parsed.
-      MOZ_ASSERT(sWebkitPrefixedAliasesEnabled,
+      MOZ_ASSERT(StylePrefs::sWebkitPrefixedAliasesEnabled,
                  "The only way mWebkitBoxUnprefixState can be eHaveUnprefixed "
                  "is if we're supporting webkit-prefixed aliases");
       return (keyword == eCSSKeyword__moz_box) ?
         eCSSKeyword__webkit_box : eCSSKeyword__webkit_inline_box;
     }
   }
 
   return keyword;
@@ -7643,17 +7636,17 @@ CSSParserImpl::ParseVariant(nsCSSValue& 
       if ((aVariantMask & VARIANT_SYSFONT) != 0) {
         if (eCSSKeyword__moz_use_system_font == keyword &&
             !IsParsingCompoundProperty()) {
           aValue.SetSystemFontValue();
           return CSSParseResult::Ok;
         }
       }
       if ((aVariantMask & VARIANT_OPENTYPE_SVG_KEYWORD) != 0) {
-        if (sOpentypeSVGEnabled) {
+        if (StylePrefs::sOpentypeSVGEnabled) {
           aVariantMask |= VARIANT_KEYWORD;
         }
       }
       if ((aVariantMask & VARIANT_KEYWORD) != 0) {
         int32_t value;
         if (nsCSSProps::FindKeyword(keyword, aKeywordTable, value)) {
           aValue.SetIntValue(value, eCSSUnit_Enumerated);
           return CSSParseResult::Ok;
@@ -7721,21 +7714,21 @@ CSSParserImpl::ParseVariant(nsCSSValue& 
     SetValueToURL(aValue, tk->mIdent);
     return CSSParseResult::Ok;
   }
   if ((aVariantMask & VARIANT_GRADIENT) != 0 &&
       eCSSToken_Function == tk->mType) {
     // a generated gradient
     nsDependentString tmp(tk->mIdent, 0);
     uint8_t gradientFlags = 0;
-    if (sMozGradientsEnabled &&
+    if (StylePrefs::sMozGradientsEnabled &&
         StringBeginsWith(tmp, NS_LITERAL_STRING("-moz-"))) {
       tmp.Rebind(tmp, 5);
       gradientFlags |= eGradient_MozLegacy;
-    } else if (sWebkitPrefixedAliasesEnabled &&
+    } else if (StylePrefs::sWebkitPrefixedAliasesEnabled &&
                StringBeginsWith(tmp, NS_LITERAL_STRING("-webkit-"))) {
       tmp.Rebind(tmp, 8);
       gradientFlags |= eGradient_WebkitLegacy;
     }
     if (StringBeginsWith(tmp, NS_LITERAL_STRING("repeating-"))) {
       tmp.Rebind(tmp, 10);
       gradientFlags |= eGradient_Repeating;
     }
@@ -7843,17 +7836,17 @@ CSSParserImpl::ParseVariant(nsCSSValue& 
     }
     if (tk->mIdent.LowerCaseEqualsLiteral("steps")) {
       if (!ParseTransitionStepTimingFunctionValues(aValue)) {
         SkipUntil(')');
         return CSSParseResult::Error;
       }
       return CSSParseResult::Ok;
     }
-    if (sFramesTimingFunctionEnabled &&
+    if (StylePrefs::sFramesTimingFunctionEnabled &&
         tk->mIdent.LowerCaseEqualsLiteral("frames")) {
       if (!ParseTransitionFramesTimingFunctionValues(aValue)) {
         SkipUntil(')');
         return CSSParseResult::Error;
       }
       return CSSParseResult::Ok;
     }
   }
@@ -12211,17 +12204,17 @@ CSSParserImpl::IsFunctionTokenValidForIm
     funcName.LowerCaseEqualsLiteral("repeating-linear-gradient") ||
     funcName.LowerCaseEqualsLiteral("repeating-radial-gradient") ||
     funcName.LowerCaseEqualsLiteral("-moz-linear-gradient") ||
     funcName.LowerCaseEqualsLiteral("-moz-radial-gradient") ||
     funcName.LowerCaseEqualsLiteral("-moz-repeating-linear-gradient") ||
     funcName.LowerCaseEqualsLiteral("-moz-repeating-radial-gradient") ||
     funcName.LowerCaseEqualsLiteral("-moz-image-rect") ||
     funcName.LowerCaseEqualsLiteral("-moz-element") ||
-    (sWebkitPrefixedAliasesEnabled &&
+    (StylePrefs::sWebkitPrefixedAliasesEnabled &&
      (funcName.LowerCaseEqualsLiteral("-webkit-gradient") ||
       funcName.LowerCaseEqualsLiteral("-webkit-linear-gradient") ||
       funcName.LowerCaseEqualsLiteral("-webkit-radial-gradient") ||
       funcName.LowerCaseEqualsLiteral("-webkit-repeating-linear-gradient") ||
       funcName.LowerCaseEqualsLiteral("-webkit-repeating-radial-gradient")));
 }
 
 // Parse one item of the background shorthand property.
@@ -17868,33 +17861,16 @@ CSSParserImpl::IsValueValidForProperty(c
 }
 
 } // namespace
 
 // Recycling of parser implementation objects
 
 static CSSParserImpl* gFreeList = nullptr;
 
-/* static */ void
-nsCSSParser::Startup()
-{
-  Preferences::AddBoolVarCache(&sOpentypeSVGEnabled,
-                               "gfx.font_rendering.opentype_svg.enabled");
-  Preferences::AddBoolVarCache(&sWebkitPrefixedAliasesEnabled,
-                               "layout.css.prefixes.webkit");
-  Preferences::AddBoolVarCache(&sWebkitDevicePixelRatioEnabled,
-                               "layout.css.prefixes.device-pixel-ratio-webkit");
-  Preferences::AddBoolVarCache(&sMozGradientsEnabled,
-                               "layout.css.prefixes.gradients");
-  Preferences::AddBoolVarCache(&sControlCharVisibility,
-                               "layout.css.control-characters.visible");
-  Preferences::AddBoolVarCache(&sFramesTimingFunctionEnabled,
-                               "layout.css.frames-timing.enabled");
-}
-
 nsCSSParser::nsCSSParser(mozilla::css::Loader* aLoader,
                          CSSStyleSheet* aSheet)
 {
   CSSParserImpl *impl = gFreeList;
   if (impl) {
     gFreeList = impl->mNextFree;
     impl->mNextFree = nullptr;
   } else {
@@ -18226,12 +18202,12 @@ nsCSSParser::IsValueValidForProperty(con
   return static_cast<CSSParserImpl*>(mImpl)->
     IsValueValidForProperty(aPropID, aPropValue);
 }
 
 /* static */
 uint8_t
 nsCSSParser::ControlCharVisibilityDefault()
 {
-  return sControlCharVisibility
+  return StylePrefs::sControlCharVisibility
     ? NS_STYLE_CONTROL_CHARACTER_VISIBILITY_VISIBLE
     : NS_STYLE_CONTROL_CHARACTER_VISIBILITY_HIDDEN;
 }
--- a/layout/style/nsCSSParser.h
+++ b/layout/style/nsCSSParser.h
@@ -46,17 +46,16 @@ enum class SupportsParsingSettings {
 // Interface to the css parser.
 
 class MOZ_STACK_CLASS nsCSSParser {
 public:
   explicit nsCSSParser(mozilla::css::Loader* aLoader = nullptr,
                        mozilla::CSSStyleSheet* aSheet = nullptr);
   ~nsCSSParser();
 
-  static void Startup();
   static void Shutdown();
 
 private:
   nsCSSParser(nsCSSParser const&) = delete;
   nsCSSParser& operator=(nsCSSParser const&) = delete;
 
 public:
   /**
--- a/layout/style/test/moz.build
+++ b/layout/style/test/moz.build
@@ -100,16 +100,18 @@ TEST_HARNESS_FILES.testing.mochitest.tes
     '/layout/reftests/css-visited/selector-descendant-2.xhtml',
     '/layout/reftests/css-visited/subject-of-selector-1-ref.html',
     '/layout/reftests/css-visited/subject-of-selector-adj-sibling-1.html',
     '/layout/reftests/css-visited/subject-of-selector-any-sibling-1.html',
     '/layout/reftests/css-visited/subject-of-selector-child-1.html',
     '/layout/reftests/css-visited/subject-of-selector-descendant-1.html',
     '/layout/reftests/css-visited/subject-of-selector-descendant-2-ref.xhtml',
     '/layout/reftests/css-visited/subject-of-selector-descendant-2.xhtml',
+    '/layout/reftests/css-visited/transition-on-visited-ref.html',
+    '/layout/reftests/css-visited/transition-on-visited.html',
     '/layout/reftests/css-visited/visited-inherit-1-ref.html',
     '/layout/reftests/css-visited/visited-inherit-1.html',
     '/layout/reftests/css-visited/visited-page.html',
     '/layout/reftests/css-visited/white-to-transparent-1-ref.html',
     '/layout/reftests/css-visited/white-to-transparent-1.html',
     '/layout/reftests/css-visited/width-1-ref.html',
     '/layout/reftests/css-visited/width-on-link-1.html',
     '/layout/reftests/css-visited/width-on-visited-1.html',
--- a/layout/style/test/stylo-failures.md
+++ b/layout/style/test/stylo-failures.md
@@ -25,19 +25,16 @@ In which
 Any line which doesn't follow the format above would be ignored like comment.
 
 To use this file, you need to add `--failure-pattern-file=stylo-failures.md`
 to mochitest command.
 
 ## Failures
 
 * Media query support:
-  * "layout.css.prefixes.device-pixel-ratio-webkit" support bug 1366956
-    * test_media_queries.html `-device-pixel-ratio` [27]
-    * test_webkit_device_pixel_ratio.html [3]
   * test_media_queries_dynamic_xbl.html: xbl support bug 1382078 [1]
 * Animation support:
   * SMIL Animation
     * test_restyles_in_smil_animation.html [2]
 * Unsupported values
   * SVG-in-OpenType values not supported servo/servo#15211 bug 1338764
     * test_value_storage.html `context-` [7]
     * test_bug798843_pref.html [3]
--- a/layout/style/test/test_visited_reftests.html
+++ b/layout/style/test/test_visited_reftests.html
@@ -81,16 +81,17 @@ var gTests = [
   // FIXME: commented out because dynamic changes on the non-first-line
   // part of the test don't work right when the link becomes visited.
   //"== first-line-1.html first-line-1-ref.html",
   "== white-to-transparent-1.html white-to-transparent-1-ref.html",
   "== link-root-1.xhtml link-root-1-ref.xhtml",
   "== mathml-links.html mathml-links-ref.html",
   "== placeholder-1.html placeholder-1-ref.html",
   "== visited-inherit-1.html visited-inherit-1-ref.html",
+  "== transition-on-visited.html transition-on-visited-ref.html"
 ];
 
 // We record the maximum number of times we had to look at a test before
 // it switched to the passing state (though we assume it's 10 to start
 // rather than 0 so that we have a reasonable default).  Then we make a
 // test "time out" if it takes more than gTimeoutFactor times that
 // amount of time.  This allows us to report a test failure rather than
 // making a test failure just show up as a timeout.
new file mode 100644
--- /dev/null
+++ b/layout/svg/crashtests/1322537-1.html
@@ -0,0 +1,2 @@
+<svg>
+<animateMotion path='M8,0l69,97m45,-17592186044414A71,23 46,0,0 16382,98Q50,10 48,72T21,0Z'/>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/layout/svg/crashtests/1322537-2.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<head>
+  <script>
+    function go() {
+      var path = document.getElementById("myPath");
+      var len = path.getTotalLength();
+      console.log(len);
+    }
+  </script>
+</head>
+<body onload="go()">
+  <svg>
+    <path id="myPath" d="M45,-17592186044414A71,23 46,0,0 16382,98"/>
+  </svg>
+</body>
--- a/layout/svg/crashtests/crashtests.list
+++ b/layout/svg/crashtests/crashtests.list
@@ -193,11 +193,13 @@ load 993443.svg
 load 1016145.svg
 load 1028512.svg
 load 1140080-1.svg
 load 1149542-1.svg
 load 1156581-1.svg
 load 1182496-1.html
 load 1209525-1.svg
 load 1223281-1.svg
+load 1322537-1.html
+load 1322537-2.html
 load 1348564.svg
 load conditional-outer-svg-nondirty-reflow-assert.xhtml
 load extref-test-1.xhtml
--- a/layout/svg/nsSVGOuterSVGFrame.cpp
+++ b/layout/svg/nsSVGOuterSVGFrame.cpp
@@ -925,18 +925,17 @@ nsSVGOuterSVGFrame::IsRootOfReplacedElem
     }
 
     if (window) {
       nsCOMPtr<nsIDOMElement> frameElement = window->GetFrameElement();
       nsCOMPtr<nsIObjectLoadingContent> olc = do_QueryInterface(frameElement);
       nsCOMPtr<nsIDOMHTMLIFrameElement> iframeElement =
         do_QueryInterface(frameElement);
       if (olc || iframeElement) {
-        // Our document is inside an HTML 'object', 'embed', 'applet'
-        // or 'iframe' element
+        // Our document is inside an HTML 'object', 'embed' or 'iframe' element
         if (aEmbeddingFrame) {
           nsCOMPtr<nsIContent> element = do_QueryInterface(frameElement);
           *aEmbeddingFrame = element->GetPrimaryFrame();
           NS_ASSERTION(*aEmbeddingFrame, "Yikes, no embedding frame!");
         }
         return true;
       }
     }
--- a/layout/svg/nsSVGOuterSVGFrame.h
+++ b/layout/svg/nsSVGOuterSVGFrame.h
@@ -166,17 +166,17 @@ public:
 
   nsRegion FindInvalidatedForeignObjectFrameChildren(nsIFrame* aFrame);
 
 protected:
 
   bool mCallingReflowSVG;
 
   /* Returns true if our content is the document element and our document is
-   * embedded in an HTML 'object', 'embed' or 'applet' element. Set
+   * embedded in an HTML 'object' or 'embed' element. Set
    * aEmbeddingFrame to obtain the nsIFrame for the embedding HTML element.
    */
   bool IsRootOfReplacedElementSubDoc(nsIFrame **aEmbeddingFrame = nullptr);
 
   /* Returns true if our content is the document element and our document is
    * being used as an image.
    */
   bool IsRootOfImage();
--- a/mobile/android/components/extensions/ext-browserAction.js
+++ b/mobile/android/components/extensions/ext-browserAction.js
@@ -140,36 +140,43 @@ this.browserAction = class extends Exten
       browserActionMap.delete(extension);
     }
   }
 
   getAPI(context) {
     const {extension} = context;
     const {tabManager} = extension;
 
+    function getTab(tabId) {
+      if (tabId !== null) {
+        return tabTracker.getTab(tabId);
+      }
+      return null;
+    }
+
     return {
       browserAction: {
         onClicked: new EventManager(context, "browserAction.onClicked", fire => {
           let listener = (event, tab) => {
             fire.async(tabManager.convert(tab));
           };
           browserActionMap.get(extension).on("click", listener);
           return () => {
             browserActionMap.get(extension).off("click", listener);
           };
         }).api(),
 
         setTitle: function(details) {
           let {tabId, title} = details;
-          let tab = tabId ? tabTracker.getTab(tabId) : null;
+          let tab = getTab(tabId);
           browserActionMap.get(extension).setProperty(tab, "name", title);
         },
 
         getTitle: function(details) {
           let {tabId} = details;
-          let tab = tabId ? tabTracker.getTab(tabId) : null;
+          let tab = getTab(tabId);
           let title = browserActionMap.get(extension).getProperty(tab, "name");
           return Promise.resolve(title);
         },
       },
     };
   }
 };
--- a/mobile/android/components/extensions/ext-pageAction.js
+++ b/mobile/android/components/extensions/ext-pageAction.js
@@ -232,32 +232,32 @@ this.pageAction = class extends Extensio
           };
           pageActionMap.get(extension).on("click", listener);
           return () => {
             pageActionMap.get(extension).off("click", listener);
           };
         }).api(),
 
         show(tabId) {
-          let tab = tabId ? tabTracker.getTab(tabId) : null;
+          let tab = tabTracker.getTab(tabId);
           return pageActionMap.get(extension).setProperty(tab, "show", true);
         },
 
         hide(tabId) {
-          let tab = tabId ? tabTracker.getTab(tabId) : null;
+          let tab = tabTracker.getTab(tabId);
           pageActionMap.get(extension).setProperty(tab, "show", false);
         },
 
         setPopup(details) {
-          let tab = details.tabId ? tabTracker.getTab(details.tabId) : null;
+          let tab = tabTracker.getTab(details.tabId);
           let url = details.popup && context.uri.resolve(details.popup);
           pageActionMap.get(extension).setProperty(tab, "popup", url);
         },
 
         getPopup(details) {
-          let tab = details.tabId ? tabTracker.getTab(details.tabId) : null;
+          let tab = tabTracker.getTab(details.tabId);
           let popup = pageActionMap.get(extension).getProperty(tab, "popup");
           return Promise.resolve(popup);
         },
       },
     };
   }
 };
--- a/mobile/android/components/extensions/test/mochitest/test_ext_browserAction_getTitle_setTitle.html
+++ b/mobile/android/components/extensions/test/mochitest/test_ext_browserAction_getTitle_setTitle.html
@@ -44,16 +44,28 @@ add_task(async function test_setTitle_an
       // Set the title for the new tab and test that getTitle returns the correct title.
       await browser.browserAction.setTitle({tabId: tab.id, title});
       tabTitle = await browser.browserAction.getTitle({tabId: tab.id});
       browser.test.assertEq(title, tabTitle, "Expected the new tab title to be returned");
 
       return tab;
     }
 
+    // Test on tabId 0
+    // Test that the default title is returned before the title is set for the tab.
+    let tabTitle = await browser.browserAction.getTitle({tabId: 0});
+    browser.test.assertEq("Browser Action", tabTitle,
+                          "Expected the default title to be returned for tabId 0");
+
+    // Set the title for the new tab and test that getTitle returns the correct title.
+    await browser.browserAction.setTitle({tabId: 0, title: "tab 0"});
+    tabTitle = await browser.browserAction.getTitle({tabId: 0});
+    browser.test.assertEq("tab 0", tabTitle,
+                          "Expected the new tab title to be returned for tabId 0");
+
     // Create and test 3 new tabs.
     let tab1 = await createAndTestNewTab("tab 1", "about:blank");
     let tab2 = await createAndTestNewTab("tab 2", "about:blank");
     let tab3 = await createAndTestNewTab("tab 3", "about:blank");
 
     // Test the default title again.
     let title = await browser.browserAction.getTitle({});
     browser.test.assertEq("Browser Action", title, "Expected the default title to be returned");
--- a/modules/libmar/sign/mar_sign.c
+++ b/modules/libmar/sign/mar_sign.c
@@ -90,17 +90,17 @@ NSSSignBegin(const char *certName,
 
   /* Check that the key length is large enough for our requirements */
   if (*signatureLength < XP_MIN_SIGNATURE_LEN_IN_BYTES) {
     fprintf(stderr, "ERROR: Key length must be >= %d bytes\n", 
             XP_MIN_SIGNATURE_LEN_IN_BYTES);
     return -1;
   }
 
-  *ctx = SGN_NewContext (SEC_OID_ISO_SHA1_WITH_RSA_SIGNATURE, *privKey);
+  *ctx = SGN_NewContext(SEC_OID_PKCS1_SHA384_WITH_RSA_ENCRYPTION, *privKey);
   if (!*ctx) {
     fprintf(stderr, "ERROR: Could not create signature context\n");
     return -1;
   }
   
   if (SGN_Begin(*ctx) != SECSuccess) {
     fprintf(stderr, "ERROR: Could not begin signature\n");
     return -1;
@@ -988,18 +988,18 @@ mar_repackage_and_sign(const char *NSSCo
                                "num signatures")) {
     goto failure;
   }
   numSignatures = ntohl(numSignatures);
 
   signaturePlaceholderOffset = ftello(fpDest);
 
   for (k = 0; k < certCount; k++) {
-    /* Write out the signature algorithm ID, Only an ID of 1 is supported */
-    signatureAlgorithmID = htonl(1);
+    /* Write out the signature algorithm ID, Only an ID of 2 is supported */
+    signatureAlgorithmID = htonl(2);
     if (WriteAndUpdateSignatures(fpDest, &signatureAlgorithmID,
                                  sizeof(signatureAlgorithmID),
                                  ctxs, certCount, "num signatures")) {
       goto failure;
     }
     signatureAlgorithmID = ntohl(signatureAlgorithmID);
 
     /* Write out the signature length */
--- a/modules/libmar/src/mar.h
+++ b/modules/libmar/src/mar.h
@@ -103,17 +103,17 @@ int mar_enum_items(MarFile *mar, MarItem
  * @param mar       The MAR file to read.
  * @param item      The MAR item to read.
  * @param offset    The byte offset relative to the start of the item.
  * @param buf       A pointer to a buffer to copy the data into.
  * @param bufsize   The length of the buffer to copy the data into.
  * @return          The number of bytes written or a negative value if an
  *                  error occurs.
  */
-int mar_read(MarFile *mar, const MarItem *item, int offset, char *buf,
+int mar_read(MarFile *mar, const MarItem *item, int offset, uint8_t *buf,
              int bufsize);
 
 /**
  * Create a MAR file from a set of files.
  * @param dest      The path to the file to create.  This path must be
  *                  compatible with fopen.
  * @param numfiles  The number of files to store in the archive.
  * @param files     The list of null-terminated file paths.  Each file
--- a/modules/libmar/src/mar_extract.c
+++ b/modules/libmar/src/mar_extract.c
@@ -32,17 +32,17 @@ static int mar_ensure_parent_dir(const c
 #endif
     *slash = '/';
   }
   return 0;
 }
 
 static int mar_test_callback(MarFile *mar, const MarItem *item, void *unused) {
   FILE *fp;
-  char buf[BLOCKSIZE];
+  uint8_t buf[BLOCKSIZE];
   int fd, len, offset = 0;
 
   if (mar_ensure_parent_dir(item->name))
     return -1;
 
 #ifdef XP_WIN
   fd = _open(item->name, _O_BINARY|_O_CREAT|_O_TRUNC|_O_WRONLY, item->flags);
 #else
--- a/modules/libmar/src/mar_read.c
+++ b/modules/libmar/src/mar_read.c
@@ -511,17 +511,17 @@ int mar_enum_items(MarFile *mar, MarItem
         return rv;
       item = item->next;
     }
   }
 
   return 0;
 }
 
-int mar_read(MarFile *mar, const MarItem *item, int offset, char *buf,
+int mar_read(MarFile *mar, const MarItem *item, int offset, uint8_t *buf,
              int bufsize) {
   int nr;
 
   if (offset == (int) item->length)
     return 0;
   if (offset > (int) item->length)
     return -1;
 
index 43551f1297ae2d953fd9c06f1c320d112308ce0a..d1ed9300dbd081e81fe09c961b1ac11e5b1ab440
GIT binary patch
literal 65536
zc%1Fsc{EjR+W_$G9Gqh~$2?@pl!`Kwd7ep5WQ<4yGKYweF|*85c#KVEN0EvW%1|Md
zA!HV5Ad>i+p7;IUmS;WRAK&_(^{sXN&brsW?|q;9+W+iz{dZj(A!o8f5CnxFq&*0t
z@@<OX5rhQ!IS}lx3F_As{p0#$3!(fzPjx*vj{JoBHU7_GN&bna0ssI20000000000
z00000000000000000000000000000000030dnl0=<t62L<zD4_Wkh~OZdk5OE<-Nx
z+t>sE0000000000000000000000000000000000000000007`$u;}j}n#LlCi=X{*
zPcI1sVM7q4bmu`$Q3f$OQ5tgeAyPC0cE2CD`uA=0mUpoz1Yz20M;!GttoZkDN0X}j
z_!T1<(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QO3MObQdlBu8
-mNtLHXR3faLzIHxET9Vs7w==
\ No newline at end of file
+UtzJoTa2NS5uBfNTCeVVEC6R8Iaad8vq/KNJwlYsn6V+20mp/vBJIXh+hmHSGNEA
+ynpbqD1KLgzPMSsBbF2Azc6eT0frVDdPlKc5FyhpkB9YniOSpt+oWiU8M7UMsVhG
+/+9ClLLXImVeq3oySxGodpMh04sYrzBUR136cdk6mb+dAT3523xKRXZM72+WlQFQ
+G1rfzGTEWWFJCIwDJisauYbQlipvl6mfZttdQ2a7hgVbAJmFbm7nUsYr7t1ezP0A
+Jy1WIrZY4l8OzoL0TZ3aM1bC2vFYxv+SuH6E51MdVt/mLc7JSGzVmqdP0C58xNSz
+zmkfYwj5fWh6jRa6XQAl7Au3jujdVPV22bSdZV05RlypgLQHZmlvi+yRd8OCPJZY
+NLU8K3xZQP4sGr5vePtUqoVslsMtkUh/LUSTAAmFF8qPotxEzMb1LFYokPH37e1R
+8EwZbyp4wXOy7KYx2rB90J+4PoGPYIUe8xERHGDmrCt9G+siFB6OOSQEQEj5XfLw
+MkJSI9K3ldMtzIiDFKikmSpkCyeBFmEQrb6/zgl1qUBcE52yPkrybZdtvwseGrhU
+43ZsKX1/1FSj8MOkXuCFTMLMFRDpXuGvLTNPy1DPA3nsa0XoYFzp8Sg4pjJd4KUL
+mhYiy+v/27LfonFX0ak9+HlANsV96ixf3mrkVz7Tfc4=
\ No newline at end of file
--- a/modules/libmar/tests/unit/data/multiple_signed_pib_mar.sig.2
+++ b/modules/libmar/tests/unit/data/multiple_signed_pib_mar.sig.2
@@ -1,6 +1,11 @@
-sIwBnk2F2t/SLRhq6wJCJn/9SZxr9qhlViT8TEDgUvrfa2Rlnt6y9Xc+WLIwUadQ
-FFWoRf8KEzNIy5JBrtGBV0DsTISsZv+G2KGA1LKwxYgWOMGZcf0tgePHGVYc5jbH
-uy/SLuL761LxQYMRt9j+mkW4ek2gKIAHUTXZ2ouLSDKP87xsnUAWbcn1buTtqMmd
-0XfsSvG0mK7HceXExCo1tZJsmqaDZv1aX4tTBdmJXHuM3tugfw91sCSw01aSJex0
-F+UmpVVh+6j4CE7LRUYXZhLJuuI3xA5ZunvqwblC9i5wz1e13KIHu/OWCTKfpyW1
-se1Ok9MPNciLSdvUGoMSHg==
\ No newline at end of file
+F6F1LmabkmheGolLdYlWkaSnM782EoJnZAiDYOszsetXWltFLCd/SrfKaAABBUJZ
+jPS5EeEAFtNK6INCs/ULujohnQwhiMWwcLm7f5CGEaC7UzKB4tP5ZvnBASTDhAMj
+BipU2798XYyA5+LmWL81S+LZKEhGXdPsIC4GIqlY7hA0DKgsS9hWxC7VfuZb3r8T
+Mp//aOM79+DnPBHJYKBzoDLO/F/GlH0Hr7Gih/nOkiHTvQgZ3PDAxwhGgwLAsRA0
++LmrQ3MlHrLfT9SrPZq3kUtX/JIvYfAaUE8cV941a7cvfVY1RPjznJBk2lYowNys
+GhjoS9OpRBqdMVfY4dHZoCEgc07siDXhTCw4J9tPAjqOdsqwgsuoLhTEcIYeWnR7
+otYnFITcDvRRRkP98SRPjKquemvcYgeyX7vHomN8V+GhTlCn8NF4ModE1Ny7whiu
+V/+dwFH3S3Phg2wo2THfU1igUzZUJ5LhiO486NVa7n3wLZqpAMnsvDujqoL/8tWz
+ZQ5o/RF6XJHA0UKXxt3UiGZHDGuS3I6clZJa1PXgSfEHZyQmQ24bl2fmDURdLUbt
++t//Y5PZTktwjxIELbGYvVXoJYYHW7Jr5PlxvUxqq7WRHwOd9nL4Bs8gqr64I9sB
+8yMnjffnl5ZL53pS6SjIzPgymYNOYN1KpDuNoSBuXN8=
\ No newline at end of file
index 185b2dff4a696f6ec9b7330eeefddd4d57617eac..ea1fd47faa162a14e05e7fc2103c5e440db9475e
GIT binary patch
literal 1189
zc$_n6Vp(X=#MHTfnTe5!iIriwdf+nyUN%mxHjlRNyo`)ItPBQ1h5`nBY|No7%);!x
zl?u+OMI{Du;=G1t2Brok1{Q{9hQ?87T&#MUn3Rx>W@KexZerqR0E%-lH8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UDEMKigcPhjwFnpN17qUks0fRxId8e4P8m2H
-rumgMHGhwx3uagGTTufQSw==
\ No newline at end of file
+Qv7nfMB5+ri3errM8NqkCl7LwWFHu3DXBFAHaw3Rl27hGyZw4xR+oKbQMkwvdrY7
+GxWZ0vBNSI4nte+Ii6XjDQcnzQgqINEZkL5EVMs1re1zA8OzuItxtXWeCoAPGgMg
+uhvPVWxMCUMia1yCWpVKwA9CKfsX+0+5jbSLeMg43q6Zoj+AVanCZZlQiH2nuBPL
+YB9hib9GlK4kjS1EqFmYuA8oDQiWDmWK1ULAmFUy9Ezho4il21rG4FQJYywLTQSr
+8PiSTKVH+8LZAvPNEzhG3UGOVsj85w2TzmLbvSiYFJCMx8NQLHbB+cmt+1ytenaK
+Qt+b2PC5Hs8LczOxTxpzgtAZPQbx2jqCxCeFOZGzY7Gfz4oi4YdqY+d4n854wwIb
+rxX7asiYwhOHoJ5nxKoqN1gsRyshSqYDH9+TwXJPrk1S8i5sIBMQpycr+f+1MPGx
+RsoorG3sKUfC+dXi3QqZEnBc+ULqIOrmW9J3TTUsxNpOkm03NvPQZyeF1wpU4jfz
+W1Hnu7nltdqDX1bdmCChZ3rP+7JJYwfvVtmBseIFGZHVMhqvzvvdlxLn+MeTDiAA
+Zrhi/BNkQstX7Bdqe58adzRAv/O80DH8ErKBqvqh17HXwMmGx6i+EGyNt8DfFLSm
+xEzxnsmFnOaBytzpth4pltEEpioQPS7/CSdRydi/29w=
\ No newline at end of file
--- a/modules/libmar/tests/unit/data/signed_pib_mar.signature.mycert2
+++ b/modules/libmar/tests/unit/data/signed_pib_mar.signature.mycert2
@@ -1,6 +1,11 @@
-Ywj/i+4teNQ9jhAOQsibt4sJTGRHC+8l9T96pCxX+zq4qQio9ysPS+N7g+ODaArA
-pYGD7SsXEKC69PwhS8XeJtPTZ744YwLx0+YApwJg7ZxWji9bqrqS4qfp5o9j8A9q
-g3GLBH4S+xefbOrhgHptWs6ZwBAO6nhxlhviZA7Bp9m6ViUBNmGgTYnMsfhzU4Ol
-7Cmkbah3Hyt2EYUnZ8KJm46eebRvDnJNKX7s6tq/h0o/V8As1v805tgBlsyDwn6R
-6h0S7HqNx8JkIvVsIV2boXmkYYobVb8ssottyHc893ywQMPso1gdBMJYAgRW26wR
-ZEEL62q8zGzt+UB+V8pfNA==
\ No newline at end of file
+i6oFIDMnyZ5CUaYUCg8MEL48puCQdZMH9s2ZoGKzxK4YO6a/2Yhur4jNRfoxgQm3
+2o4qO4gUCjcwZmQHoSmseELJWP+6I929SZ4KUc/bXsIOMlZLcq+YSQSCbmkM/AeV
+NMW4SR8eVtU0BjstZafaWtvCp0nzYXwyDLUUKl006CzylCjGDO2yNC3GGTc6N0cC
+I1nzDOTNYknuHLJLhjJaJEd+c/J5g3BsDXi3Bh7ZtO1OkU/x/jhxbPfK2YsyHpUm
+8/4BKDy6ocV2zrDXuE4ZBPJXsOGshr3kZLAkrhUbGK14EEFx+PtCRLigfWlGIWd1
+ZdYv+0r+JaOdskArdcHCtfBF6IOnQLB1UjD2NsyhMnKPPm7KO26A+ig8DxlTyt4N
+sop0UryhQxHhh/iTkIJlMN1JONr39EG66pI/jo2HwArNL/sfqZ1m9GR+tDKKtMYm
+gFn0nxQiIgquYA2Q3sKdgtcHvQGxxvyKOa3lelykjny/4RCwsfM1S1KwG9TpPHW4
+5VUoztOuIsSpAwdc+gzNfzvqCi0ac0bUF66ksZ2qlKpG0VRq0O9Rdtv9FClbVUWM
+PRlmUuRdXkn6ouCx58dwHoABXr910GdqV5EoNXNyDG/Mnqu0eYSGDRQEjVvh5v+u
+FSbVjBI+ie7oTFeInJ7eWgJ7/XTMtHsCAw+RHN1drFo=
\ No newline at end of file
index 5263496e168d0072991be3733eaf663239c313de..22a998e227544d1c23ce7b90f67fb154099f4c90
GIT binary patch
literal 1193
zc$}@2`#Ti|9L7JStg|C(r$rY^C0&F=si@p_Qkv66Da6p2NjQzJqUofFE?aF;sxi{(
zkjgA6Lt{vb8phaEYU_rjA);r0!rtfozVGkf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
zizvw^hfCygnJZi+kMGIn2d+`Tbqcw`O^W!DVoE6G7C%u&IX_cDB~{#}nmhc$U23T1
z9{2f`I_hcQHyUZ;cbaM85B{W;2R!5vZ9L`)fAKd@dB$^I@RD{q=;R+>(Zy^2rJEjl
lc|#xlg8)nz*c|!0=|Sa+Pe8DDXrz~~ceuBge?X8QZviEzhdKZN
--- a/modules/libmar/tests/unit/head_libmar.js
+++ b/modules/libmar/tests/unit/head_libmar.js
@@ -109,17 +109,17 @@ function createMAR(outMAR, dataDir, file
     f.permissions = 0o664;
   }
 
   // Setup the command line arguments to create the MAR.
   let args = ["-C", dataDir.path, "-H", "\@MAR_CHANNEL_ID\@",
               "-V", "13.0a1", "-c", outMAR.path];
   args = args.concat(files);
 
-  do_print('Running: ' + signmarBin.path);
+  do_print('Running: ' + signmarBin.path + " " + args.join(" "));
   process.init(signmarBin);
   process.run(true, args, args.length);
 
   // Verify signmar returned 0 for success.
   do_check_eq(process.exitValue, 0);
 
   // Verify the out MAR file actually exists.
   do_check_true(outMAR.exists());
@@ -139,15 +139,15 @@ function extractMAR(mar, dataDir) {
 
   // Make sure the signmar binary exists and is an executable.
   do_check_true(signmarBin.exists());
   do_check_true(signmarBin.isExecutable());
 
   // Setup the command line arguments to create the MAR.
   let args = ["-C", dataDir.path, "-x", mar.path];
 
-  do_print('Running: ' + signmarBin.path);
+  do_print('Running: ' + signmarBin.path + " " + args.join(" "));
   process.init(signmarBin);
   process.run(true, args, args.length);
 
   // Verify signmar returned 0 for success.
   do_check_eq(process.exitValue, 0);
 }
--- a/modules/libmar/verify/MacVerifyCrypto.cpp
+++ b/modules/libmar/verify/MacVerifyCrypto.cpp
@@ -151,33 +151,63 @@ CryptoMac_VerifySignature(CryptoX_Signat
   }
 
   CFErrorRef error;
   SecTransformRef verifier =
     SecVerifyTransformCreatePtr((SecKeyRef)*aPublicKey,
                                 signatureData,
                                 &error);
   if (!verifier || error) {
+    if (error) {
+      CFRelease(error);
+    }
     CFRelease(signatureData);
     return CryptoX_Error;
   }
 
   SecTransformSetAttributePtr(verifier,
+                              kSecDigestTypeAttribute,
+                              kSecDigestSHA2,
+                              &error);
+  if (error) {
+    CFRelease(error);
+    CFRelease(signatureData);
+    CFRelease(verifier);
+    return CryptoX_Error;
+  }
+
+  int digestLength = 384;
+  CFNumberRef dLen = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &digestLength);
+  SecTransformSetAttributePtr(verifier,
+                              kSecDigestLengthAttribute,
+                              dLen,
+                              &error);
+  CFRelease(dLen);
+  if (error) {
+    CFRelease(error);
+    CFRelease(signatureData);
+    CFRelease(verifier);
+    return CryptoX_Error;
+  }
+
+  SecTransformSetAttributePtr(verifier,
                               kSecTransformInputAttributeName,
                               (CFDataRef)*aInputData,
                               &error);
   if (error) {
+    CFRelease(error);
     CFRelease(signatureData);
     CFRelease(verifier);
     return CryptoX_Error;
   }
 
   CryptoX_Result result = CryptoX_Error;
   CFTypeRef rv = SecTransformExecutePtr(verifier, &error);
   if (error) {
+    CFRelease(error);
     CFRelease(signatureData);
     CFRelease(verifier);
     return CryptoX_Error;
   }
 
   if (CFGetTypeID(rv) == CFBooleanGetTypeID() &&
       CFBooleanGetValue((CFBooleanRef)rv) == true) {
     result = CryptoX_Success;
--- a/modules/libmar/verify/cryptox.c
+++ b/modules/libmar/verify/cryptox.c
@@ -4,16 +4,17 @@
 
 #ifdef XP_WIN
 #ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN
 #endif
 #endif
 
 #include <stdlib.h>
+#include <stdio.h>
 #include "cryptox.h"
 
 #if defined(MAR_NSS)
 
 /** 
  * Loads the public key for the specified cert name from the NSS store.
  * 
  * @param certData  The DER-encoded X509 certificate to extract the key from.
@@ -60,17 +61,17 @@ NSS_VerifyBegin(VFYContext **ctx,
   if ((SECKEY_PublicKeyStrength(*publicKey) * 8) < 
       XP_MIN_SIGNATURE_LEN_IN_BYTES) {
     fprintf(stderr, "ERROR: Key length must be >= %d bytes\n", 
             XP_MIN_SIGNATURE_LEN_IN_BYTES);
     return CryptoX_Error;
   }
 
   *ctx = VFY_CreateContext(*publicKey, NULL, 
-                           SEC_OID_ISO_SHA1_WITH_RSA_SIGNATURE, NULL);
+                           SEC_OID_PKCS1_SHA384_WITH_RSA_ENCRYPTION, NULL);
   if (*ctx == NULL) {
     return CryptoX_Error;
   }
 
   status = VFY_Begin(*ctx);
   return SECSuccess == status ? CryptoX_Success : CryptoX_Error;
 }
 
@@ -194,33 +195,33 @@ CryptoAPI_LoadPublicKey(HCRYPTPROV provi
   * @param provider Out parameter containing the provider handle.
   * @return CryptoX_Success on success, CryptoX_Error on error.
  */
 CryptoX_Result
 CryptoAPI_InitCryptoContext(HCRYPTPROV *provider)
 {
   if (!CryptAcquireContext(provider, 
                            NULL, 
-                           MS_ENHANCED_PROV, 
-                           PROV_RSA_FULL, 
+                           MS_ENH_RSA_AES_PROV, 
+                           PROV_RSA_AES, 
                            CRYPT_VERIFYCONTEXT)) {
     if (!CryptAcquireContext(provider, 
                              NULL, 
-                             MS_ENHANCED_PROV, 
-                             PROV_RSA_FULL, 
+                             MS_ENH_RSA_AES_PROV, 
+                             PROV_RSA_AES, 
                              CRYPT_NEWKEYSET | CRYPT_VERIFYCONTEXT)) {
       if (!CryptAcquireContext(provider, 
                                NULL, 
                                NULL, 
-                               PROV_RSA_FULL, 
+                               PROV_RSA_AES, 
                                CRYPT_VERIFYCONTEXT)) {
         if (!CryptAcquireContext(provider, 
                                  NULL, 
                                  NULL, 
-                                 PROV_RSA_FULL, 
+                                 PROV_RSA_AES, 
                                  CRYPT_NEWKEYSET | CRYPT_VERIFYCONTEXT)) {
           *provider = CryptoX_InvalidHandleValue;
           return CryptoX_Error;
         }
       }
     }
   }
   return CryptoX_Success;
@@ -237,17 +238,17 @@ CryptoX_Result
 CryptoAPI_VerifyBegin(HCRYPTPROV provider, HCRYPTHASH* hash)
 {
   BOOL result;
   if (!provider || !hash) {
     return CryptoX_Error;
   }
 
   *hash = (HCRYPTHASH)NULL;
-  result = CryptCreateHash(provider, CALG_SHA1,
+  result = CryptCreateHash(provider, CALG_SHA_384,
                            0, 0, hash);
   return result ? CryptoX_Success : CryptoX_Error;
 }
 
 /** 
   * Updates a signature verification hash context
   *
   * @param hash The hash context to udpate
@@ -263,11 +264,8 @@ CryptoAPI_VerifyUpdate(HCRYPTHASH* hash,
     return CryptoX_Error;
   }
 
   result = CryptHashData(*hash, buf, len, 0);
   return result ? CryptoX_Success : CryptoX_Error;
 }
 
 #endif
-
-
-
--- a/modules/libmar/verify/mar_verify.c
+++ b/modules/libmar/verify/mar_verify.c
@@ -269,17 +269,17 @@ mar_extract_and_verify_signatures_fp(FIL
       fprintf(stderr, "ERROR: Could not read extracted signature.\n");
       for (i = 0; i < signatureCount; ++i) {
         free(extractedSignatures[i]);
       }
       return CryptoX_Error;
     }
 
     /* We don't try to verify signatures we don't know about */
-    if (signatureAlgorithmIDs[i] != 1) {
+    if (signatureAlgorithmIDs[i] != 2) {
       fprintf(stderr, "ERROR: Unknown signature algorithm ID.\n");
       for (i = 0; i < signatureCount; ++i) {
         free(extractedSignatures[i]);
       }
       return CryptoX_Error;
     }
   }
 
--- a/modules/xz-embedded/moz.build
+++ b/modules/xz-embedded/moz.build
@@ -28,9 +28,12 @@ if CONFIG['TARGET_CPU'].startswith('arm'
     else:
         DEFINES['XZ_DEC_ARM'] = 1
 elif '86' in CONFIG['TARGET_CPU']:
     # Accept x86, x86_64, i386, i686, etc.
     DEFINES['XZ_DEC_X86'] = 1
 
 DEFINES['XZ_USE_CRC64'] = 1
 
+if CONFIG['OS_ARCH'] == 'WINNT':
+    USE_STATIC_LIBS = True
+
 Library('xz-embedded')
--- a/parser/html/nsHtml5TreeBuilderCppSupplement.h
+++ b/parser/html/nsHtml5TreeBuilderCppSupplement.h
@@ -894,18 +894,19 @@ nsHtml5TreeBuilder::elementPopped(int32_
       treeOp->Init(eTreeOpSvgLoad, aElement);
     }
     return;
   }
   // we now have only HTML
   // Some HTML nodes need DoneAddingChildren() called to initialize
   // properly (e.g. form state restoration).
   // XXX expose ElementName group here and do switch
-  if (aName == nsGkAtoms::object || aName == nsGkAtoms::applet ||
-      aName == nsGkAtoms::select || aName == nsGkAtoms::textarea ||
+  if (aName == nsGkAtoms::object ||
+      aName == nsGkAtoms::select ||
+      aName == nsGkAtoms::textarea ||
       aName == nsGkAtoms::output) {
     if (mBuilder) {
       nsHtml5TreeOperation::DoneAddingChildren(static_cast<nsIContent*>(aElement));
       return;
     }
     nsHtml5TreeOperation* treeOp = mOpQueue.AppendElement();
     NS_ASSERTION(treeOp, "Tree op allocation failed.");
     treeOp->Init(eTreeOpDoneAddingChildren, aElement);
--- a/parser/htmlparser/nsHTMLTagList.h
+++ b/parser/htmlparser/nsHTMLTagList.h
@@ -39,17 +39,17 @@
  ******/
 
 #define HTML_HTMLELEMENT_TAG(_tag) HTML_TAG(_tag, , )
 
 HTML_TAG(a, Anchor, Anchor)
 HTML_HTMLELEMENT_TAG(abbr)
 HTML_HTMLELEMENT_TAG(acronym)
 HTML_HTMLELEMENT_TAG(address)
-HTML_TAG(applet, SharedObject, Applet)
+HTML_TAG(applet, Unknown, Unknown)
 HTML_TAG(area, Area, Area)
 HTML_HTMLELEMENT_TAG(article)
 HTML_HTMLELEMENT_TAG(aside)
 HTML_TAG(audio, Audio, Audio)
 HTML_HTMLELEMENT_TAG(b)
 HTML_TAG(base, Shared, Base)
 HTML_HTMLELEMENT_TAG(basefont)
 HTML_HTMLELEMENT_TAG(bdo)
@@ -74,17 +74,17 @@ HTML_TAG(del, Mod, Mod)
 HTML_TAG(details, Details, Details)
 HTML_HTMLELEMENT_TAG(dfn)
 HTML_TAG(dialog, Dialog, Dialog)
 HTML_TAG(dir, Shared, Directory)
 HTML_TAG(div, Div, Div)
 HTML_TAG(dl, SharedList, DList)
 HTML_HTMLELEMENT_TAG(dt)
 HTML_HTMLELEMENT_TAG(em)
-HTML_TAG(embed, SharedObject, Embed)
+HTML_TAG(embed, Embed, Embed)
 HTML_TAG(fieldset, FieldSet, FieldSet)
 HTML_HTMLELEMENT_TAG(figcaption)
 HTML_HTMLELEMENT_TAG(figure)
 HTML_TAG(font, Font, Font)
 HTML_HTMLELEMENT_TAG(footer)
 HTML_TAG(form, Form, Form)
 HTML_TAG(frame, Frame, Frame)
 HTML_TAG(frameset, FrameSet, FrameSet)
--- a/services/sync/modules/engines/history.js
+++ b/services/sync/modules/engines/history.js
@@ -4,28 +4,32 @@
 
 this.EXPORTED_SYMBOLS = ["HistoryEngine", "HistoryRec"];
 
 var Cc = Components.classes;
 var Ci = Components.interfaces;
 var Cu = Components.utils;
 var Cr = Components.results;
 
-const HISTORY_TTL = 5184000; // 60 days
+const HISTORY_TTL = 5184000; // 60 days in milliseconds
+const THIRTY_DAYS_IN_MS = 2592000000; // 30 days in milliseconds
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://services-common/async.js");
 Cu.import("resource://services-sync/constants.js");
 Cu.import("resource://services-sync/engines.js");
 Cu.import("resource://services-sync/record.js");
 Cu.import("resource://services-sync/util.js");
 
 XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
                                   "resource://gre/modules/PlacesUtils.jsm");
 
+XPCOMUtils.defineLazyModuleGetter(this, "PlacesSyncUtils",
+                                  "resource://gre/modules/PlacesSyncUtils.jsm");
+
 this.HistoryRec = function HistoryRec(collection, id) {
   CryptoWrapper.call(this, collection, id);
 }
 HistoryRec.prototype = {
   __proto__: CryptoWrapper.prototype,
   _logName: "Sync.Record.History",
   ttl: HISTORY_TTL
 };
@@ -66,51 +70,18 @@ HistoryEngine.prototype = {
   },
 
   async pullNewChanges() {
     let modifiedGUIDs = Object.keys(this._tracker.changedIDs);
     if (!modifiedGUIDs.length) {
       return {};
     }
 
-    let db = PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
-                        .DBConnection;
-
-    // Filter out hidden pages and `TRANSITION_FRAMED_LINK` visits. These are
-    // excluded when rendering the history menu, so we use the same constraints
-    // for Sync. We also don't want to sync `TRANSITION_EMBED` visits, but those
-    // aren't stored in the database.
-    for (let startIndex = 0;
-         startIndex < modifiedGUIDs.length;
-         startIndex += SQLITE_MAX_VARIABLE_NUMBER) {
-
-      let chunkLength = Math.min(SQLITE_MAX_VARIABLE_NUMBER,
-                                 modifiedGUIDs.length - startIndex);
-
-      let query = `
-        SELECT DISTINCT p.guid FROM moz_places p
-        JOIN moz_historyvisits v ON p.id = v.place_id
-        WHERE p.guid IN (${new Array(chunkLength).fill("?").join(",")}) AND
-              (p.hidden = 1 OR v.visit_type IN (0,
-                ${PlacesUtils.history.TRANSITION_FRAMED_LINK}))
-      `;
-
-      let statement = db.createAsyncStatement(query);
-      try {
-        for (let i = 0; i < chunkLength; i++) {
-          statement.bindByIndex(i, modifiedGUIDs[startIndex + i]);
-        }
-        let results = Async.querySpinningly(statement, ["guid"]);
-        let guids = results.map(result => result.guid);
-        this._tracker.removeChangedID(...guids);
-      } finally {
-        statement.finalize();
-      }
-    }
-
+    let guidsToRemove = await PlacesSyncUtils.history.determineNonSyncableGuids(modifiedGUIDs);
+    this._tracker.removeChangedID(...guidsToRemove);
     return this._tracker.changedIDs;
   },
 };
 
 function HistoryStore(name, engine) {
   Store.call(this, name, engine);
 
   // Explicitly nullify our references to our cached services so we don't leak
@@ -141,122 +112,69 @@ HistoryStore.prototype = {
     }
 
     this._log.trace("Creating SQL statement: " + query);
     let db = PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
                         .DBConnection;
     return this._stmts[query] = db.createAsyncStatement(query);
   },
 
-  get _setGUIDStm() {
-    return this._getStmt(
-      "UPDATE moz_places " +
-      "SET guid = :guid " +
-      "WHERE url_hash = hash(:page_url) AND url = :page_url");
-  },
-
   // Some helper functions to handle GUIDs
-  setGUID: function setGUID(uri, guid) {
-    uri = uri.spec ? uri.spec : uri;
+  async setGUID(uri, guid) {
 
     if (!guid) {
       guid = Utils.makeGUID();
     }
 
-    let stmt = this._setGUIDStm;
-    stmt.params.guid = guid;
-    stmt.params.page_url = uri;
-    Async.querySpinningly(stmt);
+    try {
+      await PlacesSyncUtils.history.changeGuid(uri, guid);
+    } catch (e) {
+      this._log.error("Error setting GUID ${guid} for URI ${uri}", guid, uri);
+    }
+
     return guid;
   },
 
-  get _guidStm() {
-    return this._getStmt(
-      "SELECT guid " +
-      "FROM moz_places " +
-      "WHERE url_hash = hash(:page_url) AND url = :page_url");
-  },
-  _guidCols: ["guid"],
-
-  GUIDForUri: function GUIDForUri(uri, create) {
-    let stm = this._guidStm;
-    stm.params.page_url = uri.spec ? uri.spec : uri;
+  async GUIDForUri(uri, create) {
 
     // Use the existing GUID if it exists
-    let result = Async.querySpinningly(stm, this._guidCols)[0];
-    if (result && result.guid)
-      return result.guid;
-
-    // Give the uri a GUID if it doesn't have one
-    if (create)
-      return this.setGUID(uri);
-  },
-
-  get _visitStm() {
-    return this._getStmt(`/* do not warn (bug 599936) */
-      SELECT visit_type type, visit_date date
-      FROM moz_historyvisits
-      JOIN moz_places h ON h.id = place_id
-      WHERE url_hash = hash(:url) AND url = :url
-      ORDER BY date DESC LIMIT 20`);
-  },
-  _visitCols: ["date", "type"],
-
-  get _urlStm() {
-    return this._getStmt(
-      "SELECT url, title, frecency " +
-      "FROM moz_places " +
-      "WHERE guid = :guid");
-  },
-  _urlCols: ["url", "title", "frecency"],
+    let guid;
+    try {
+      guid = await PlacesSyncUtils.history.fetchGuidForURL(uri);
+    } catch (e) {
+      this._log.error("Error fetching GUID for URL ${uri}", uri);
+    }
 
-  get _allUrlStm() {
-    // Filter out hidden pages and framed link visits. See `pullNewChanges`
-    // for more info.
-    return this._getStmt(`
-      SELECT DISTINCT p.url
-      FROM moz_places p
-      JOIN moz_historyvisits v ON p.id = v.place_id
-      WHERE p.last_visit_date > :cutoff_date AND
-            p.hidden = 0 AND
-            v.visit_type NOT IN (0,
-              ${PlacesUtils.history.TRANSITION_FRAMED_LINK})
-      ORDER BY frecency DESC
-      LIMIT :max_results`);
-  },
-  _allUrlCols: ["url"],
+    // If the URI has an existing GUID, return it.
+    if (guid) {
+      return guid;
+    }
 
-  // See bug 320831 for why we use SQL here
-  _getVisits: function HistStore__getVisits(uri) {
-    this._visitStm.params.url = uri;
-    return Async.querySpinningly(this._visitStm, this._visitCols);
-  },
+    // If the URI doesn't have a GUID and we were indicated to create one.
+    if (create) {
+      return this.setGUID(uri);
+    }
 
-  // See bug 468732 for why we use SQL here
-  _findURLByGUID: function HistStore__findURLByGUID(guid) {
-    this._urlStm.params.guid = guid;
-    return Async.querySpinningly(this._urlStm, this._urlCols)[0];
+    // If the URI doesn't have a GUID and we didn't create one for it.
+    return null;
   },
 
   async changeItemID(oldID, newID) {
-    this.setGUID(this._findURLByGUID(oldID).url, newID);
+    this.setGUID(await PlacesSyncUtils.history.fetchURLInfoForGuid(oldID).url, newID);
   },
 
-
   async getAllIDs() {
-    // Only get places visited within the last 30 days (30*24*60*60*1000ms)
-    this._allUrlStm.params.cutoff_date = (Date.now() - 2592000000) * 1000;
-    this._allUrlStm.params.max_results = MAX_HISTORY_UPLOAD;
+    let urls = await PlacesSyncUtils.history.getAllURLs({ since: new Date((Date.now() - THIRTY_DAYS_IN_MS)), limit: MAX_HISTORY_UPLOAD });
 
-    let urls = Async.querySpinningly(this._allUrlStm, this._allUrlCols);
-    let self = this;
-    return urls.reduce(function(ids, item) {
-      ids[self.GUIDForUri(item.url, true)] = item.url;
-      return ids;
-    }, {});
+    let urlsByGUID = {};
+    for (let url of urls) {
+      let guid = await this.GUIDForUri(url, true);
+      urlsByGUID[guid] = url;
+    }
+    return urlsByGUID;
   },
 
   async applyIncomingBatch(records) {
     let failed = [];
     let blockers = [];
 
     // Convert incoming records to mozIPlaceInfo objects. Some records can be
     // ignored or handled directly, so we're rewriting the array in-place.
@@ -269,17 +187,17 @@ HistoryStore.prototype = {
         if (record.deleted) {
           let promise = this.remove(record);
           promise = promise.catch(ex => failed.push(record.id));
           blockers.push(promise);
 
           // No further processing needed. Remove it from the list.
           shouldApply = false;
         } else {
-          shouldApply = this._recordToPlaceInfo(record);
+          shouldApply = await this._recordToPlaceInfo(record);
         }
       } catch (ex) {
         if (Async.isShutdownException(ex)) {
           throw ex;
         }
         failed.push(record.id);
         shouldApply = false;
       }
@@ -310,17 +228,17 @@ HistoryStore.prototype = {
 
   /**
    * Converts a Sync history record to a mozIPlaceInfo.
    *
    * Throws if an invalid record is encountered (invalid URI, etc.),
    * returns true if the record is to be applied, false otherwise
    * (no visits to add, etc.),
    */
-  _recordToPlaceInfo: function _recordToPlaceInfo(record) {
+  async _recordToPlaceInfo(record) {
     // Sort out invalid URIs and ones Places just simply doesn't want.
     record.uri = Utils.makeURI(record.histUri);
     if (!record.uri) {
       this._log.warn("Attempted to process invalid URI, skipping.");
       throw new Error("Invalid URI in record");
     }
 
     if (!Utils.checkGUID(record.id)) {
@@ -334,17 +252,23 @@ HistoryStore.prototype = {
                       + record.uri.spec + ": can't add this URI.");
       return false;
     }
 
     // We dupe visits by date and type. So an incoming visit that has
     // the same timestamp and type as a local one won't get applied.
     // To avoid creating new objects, we rewrite the query result so we
     // can simply check for containment below.
-    let curVisits = this._getVisits(record.histUri);
+    let curVisits = [];
+    try {
+      curVisits = await PlacesSyncUtils.history.fetchVisitsForURL(record.histUri);
+    } catch (e) {
+      this._log.error("Error while fetching visits for URL ${record.histUri}", record.histUri);
+    }
+
     let i, k;
     for (i = 0; i < curVisits.length; i++) {
       curVisits[i] = curVisits[i].date + "," + curVisits[i].type;
     }
 
     // Walk through the visits, make sure we have sound data, and eliminate
     // dupes. The latter is done by rewriting the array in-place.
     for (i = 0, k = 0; i < record.visits.length; i++) {
@@ -397,27 +321,32 @@ HistoryStore.prototype = {
     if (removed) {
       this._log.trace("Removed page: " + record.id);
     } else {
       this._log.debug("Page already removed: " + record.id);
     }
   },
 
   async itemExists(id) {
-    return !!this._findURLByGUID(id);
+    return !!(await PlacesSyncUtils.history.fetchURLInfoForGuid(id));
   },
 
   async createRecord(id, collection) {
-    let foo = this._findURLByGUID(id);
+    let foo = await PlacesSyncUtils.history.fetchURLInfoForGuid(id);
     let record = new HistoryRec(collection, id);
     if (foo) {
       record.histUri = foo.url;
       record.title = foo.title;
       record.sortindex = foo.frecency;
-      record.visits = this._getVisits(record.histUri);
+      try {
+        record.visits = await PlacesSyncUtils.history.fetchVisitsForURL(record.histUri);
+      } catch (e) {
+        this._log.error("Error while fetching visits for URL ${record.histUri}", record.histUri);
+        record.visits = [];
+      }
     } else {
       record.deleted = true;
     }
 
     return record;
   },
 
   async wipe() {
--- a/services/sync/tests/unit/test_history_store.js
+++ b/services/sync/tests/unit/test_history_store.js
@@ -132,17 +132,17 @@ add_task(async function test_store_creat
     {id: tbguid,
      histUri: tburi.spec,
      title: "The bird is the word!",
      visits: [{date: TIMESTAMP3,
                type: Ci.nsINavHistoryService.TRANSITION_TYPED}]}
   ]);
   await onVisitObserved;
   try {
-    do_check_attribute_count(Async.promiseSpinningly(store.getAllIDs()), 2);
+    do_check_attribute_count(await store.getAllIDs(), 2);
     let queryres = queryHistoryVisits(tburi);
     do_check_eq(queryres.length, 1);
     do_check_eq(queryres[0].time, TIMESTAMP3);
     do_check_eq(queryres[0].title, "The bird is the word!");
   } catch (ex) {
     PlacesTestUtils.clearHistory();
     do_throw(ex);
   }
--- a/services/sync/tests/unit/test_history_tracker.js
+++ b/services/sync/tests/unit/test_history_tracker.js
@@ -139,17 +139,17 @@ add_task(async function test_start_track
 });
 
 add_task(async function test_track_delete() {
   _("Deletions are tracked.");
 
   // This isn't present because we weren't tracking when it was visited.
   await addVisit("track_delete");
   let uri = Utils.makeURI("http://getfirefox.com/track_delete");
-  let guid = engine._store.GUIDForUri(uri);
+  let guid = await engine._store.GUIDForUri(uri.spec);
   await verifyTrackerEmpty();
 
   await startTracking();
   let visitRemovedPromise = promiseVisit("removed", uri);
   let scorePromise = promiseOneObserver("weave:engine:score:updated");
   await PlacesUtils.history.remove(uri);
   await Promise.all([scorePromise, visitRemovedPromise]);
 
@@ -157,17 +157,17 @@ add_task(async function test_track_delet
   do_check_eq(tracker.score, SCORE_INCREMENT_XLARGE);
 
   await cleanup();
 });
 
 add_task(async function test_dont_track_expiration() {
   _("Expirations are not tracked.");
   let uriToRemove = await addVisit("to_remove");
-  let guidToRemove = engine._store.GUIDForUri(uriToRemove);
+  let guidToRemove = await engine._store.GUIDForUri(uriToRemove.spec);
 
   await resetTracker();
   await verifyTrackerEmpty();
 
   await startTracking();
   let visitRemovedPromise = promiseVisit("removed", uriToRemove);
   let scorePromise = promiseOneObserver("weave:engine:score:updated");
 
@@ -211,29 +211,29 @@ add_task(async function test_stop_tracki
   await cleanup();
 });
 
 add_task(async function test_filter_hidden() {
   await startTracking();
 
   _("Add visit; should be hidden by the redirect");
   let hiddenURI = await addVisit("hidden");
-  let hiddenGUID = engine._store.GUIDForUri(hiddenURI);
+  let hiddenGUID = await engine._store.GUIDForUri(hiddenURI.spec);
   _(`Hidden visit GUID: ${hiddenGUID}`);
 
   _("Add redirect visit; should be tracked");
-  let trackedURI = await addVisit("redirect", hiddenURI,
+  let trackedURI = await addVisit("redirect", hiddenURI.spec,
     PlacesUtils.history.TRANSITION_REDIRECT_PERMANENT);
-  let trackedGUID = engine._store.GUIDForUri(trackedURI);
+  let trackedGUID = await engine._store.GUIDForUri(trackedURI.spec);
   _(`Tracked visit GUID: ${trackedGUID}`);
 
   _("Add visit for framed link; should be ignored");
   let embedURI = await addVisit("framed_link", null,
     PlacesUtils.history.TRANSITION_FRAMED_LINK);
-  let embedGUID = engine._store.GUIDForUri(embedURI);
+  let embedGUID = await engine._store.GUIDForUri(embedURI.spec);
   _(`Framed link visit GUID: ${embedGUID}`);
 
   _("Run Places maintenance to mark redirect visit as hidden");
   await PlacesDBUtils.maintenanceOnIdle();
 
   await verifyTrackedItems([trackedGUID]);
 
   await cleanup();
--- a/servo/components/style/gecko/generated/atom_macro.rs
+++ b/servo/components/style/gecko/generated/atom_macro.rs
@@ -2021,16 +2021,18 @@ cfg_if! {
             #[link_name = "_ZN9nsGkAtoms13onupdatereadyE"]
             pub static nsGkAtoms_onupdateready: *mut nsIAtom;
             #[link_name = "_ZN9nsGkAtoms15onupgradeneededE"]
             pub static nsGkAtoms_onupgradeneeded: *mut nsIAtom;
             #[link_name = "_ZN9nsGkAtoms14onussdreceivedE"]
             pub static nsGkAtoms_onussdreceived: *mut nsIAtom;
             #[link_name = "_ZN9nsGkAtoms15onversionchangeE"]
             pub static nsGkAtoms_onversionchange: *mut nsIAtom;
+            #[link_name = "_ZN9nsGkAtoms18onvisibilitychangeE"]
+            pub static nsGkAtoms_onvisibilitychange: *mut nsIAtom;
             #[link_name = "_ZN9nsGkAtoms13onvoicechangeE"]
             pub static nsGkAtoms_onvoicechange: *mut nsIAtom;
             #[link_name = "_ZN9nsGkAtoms15onvoiceschangedE"]
             pub static nsGkAtoms_onvoiceschanged: *mut nsIAtom;
             #[link_name = "_ZN9nsGkAtoms19onvrdisplayactivateE"]
             pub static nsGkAtoms_onvrdisplayactivate: *mut nsIAtom;
             #[link_name = "_ZN9nsGkAtoms18onvrdisplayconnectE"]
             pub static nsGkAtoms_onvrdisplayconnect: *mut nsIAtom;
@@ -7150,16 +7152,18 @@ cfg_if! {
             #[link_name = "?onupdateready@nsGkAtoms@@2PEAVnsIAtom@@EA"]
             pub static nsGkAtoms_onupdateready: *mut nsIAtom;
             #[link_name = "?onupgradeneeded@nsGkAtoms@@2PEAVnsIAtom@@EA"]
             pub static nsGkAtoms_onupgradeneeded: *mut nsIAtom;
             #[link_name = "?onussdreceived@nsGkAtoms@@2PEAVnsIAtom@@EA"]
             pub static nsGkAtoms_onussdreceived: *mut nsIAtom;
             #[link_name = "?onversionchange@nsGkAtoms@@2PEAVnsIAtom@@EA"]
             pub static nsGkAtoms_onversionchange: *mut nsIAtom;
+            #[link_name = "?onvisibilitychange@nsGkAtoms@@2PEAVnsIAtom@@EA"]
+            pub static nsGkAtoms_onvisibilitychange: *mut nsIAtom;
             #[link_name = "?onvoicechange@nsGkAtoms@@2PEAVnsIAtom@@EA"]
             pub static nsGkAtoms_onvoicechange: *mut nsIAtom;
             #[link_name = "?onvoiceschanged@nsGkAtoms@@2PEAVnsIAtom@@EA"]
             pub static nsGkAtoms_onvoiceschanged: *mut nsIAtom;
             #[link_name = "?onvrdisplayactivate@nsGkAtoms@@2PEAVnsIAtom@@EA"]
             pub static nsGkAtoms_onvrdisplayactivate: *mut nsIAtom;
             #[link_name = "?onvrdisplayconnect@nsGkAtoms@@2PEAVnsIAtom@@EA"]
             pub static nsGkAtoms_onvrdisplayconnect: *mut nsIAtom;
@@ -12279,16 +12283,18 @@ cfg_if! {
             #[link_name = "\x01?onupdateready@nsGkAtoms@@2PAVnsIAtom@@A"]
             pub static nsGkAtoms_onupdateready: *mut nsIAtom;
             #[link_name = "\x01?onupgradeneeded@nsGkAtoms@@2PAVnsIAtom@@A"]
             pub static nsGkAtoms_onupgradeneeded: *mut nsIAtom;
             #[link_name = "\x01?onussdreceived@nsGkAtoms@@2PAVnsIAtom@@A"]
             pub static nsGkAtoms_onussdreceived: *mut nsIAtom;
             #[link_name = "\x01?onversionchange@nsGkAtoms@@2PAVnsIAtom@@A"]
             pub static nsGkAtoms_onversionchange: *mut nsIAtom;
+            #[link_name = "\x01?onvisibilitychange@nsGkAtoms@@2PAVnsIAtom@@A"]
+            pub static nsGkAtoms_onvisibilitychange: *mut nsIAtom;
             #[link_name = "\x01?onvoicechange@nsGkAtoms@@2PAVnsIAtom@@A"]
             pub static nsGkAtoms_onvoicechange: *mut nsIAtom;
             #[link_name = "\x01?onvoiceschanged@nsGkAtoms@@2PAVnsIAtom@@A"]
             pub static nsGkAtoms_onvoiceschanged: *mut nsIAtom;
             #[link_name = "\x01?onvrdisplayactivate@nsGkAtoms@@2PAVnsIAtom@@A"]
             pub static nsGkAtoms_onvrdisplayactivate: *mut nsIAtom;
             #[link_name = "\x01?onvrdisplayconnect@nsGkAtoms@@2PAVnsIAtom@@A"]
             pub static nsGkAtoms_onvrdisplayconnect: *mut nsIAtom;
@@ -17411,16 +17417,18 @@ macro_rules! atom {
 ("onupdateready") =>
   { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_onupdateready as *mut _) } };
 ("onupgradeneeded") =>
   { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_onupgradeneeded as *mut _) } };
 ("onussdreceived") =>
   { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_onussdreceived as *mut _) } };
 ("onversionchange") =>
   { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_onversionchange as *mut _) } };
+("onvisibilitychange") =>
+  { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_onvisibilitychange as *mut _) } };
 ("onvoicechange") =>
   { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_onvoicechange as *mut _) } };
 ("onvoiceschanged") =>
   { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_onvoiceschanged as *mut _) } };
 ("onvrdisplayactivate") =>
   { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_onvrdisplayactivate as *mut _) } };
 ("onvrdisplayconnect") =>
   { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_onvrdisplayconnect as *mut _) } };
--- a/servo/components/style/gecko/generated/bindings.rs
+++ b/servo/components/style/gecko/generated/bindings.rs
@@ -830,19 +830,16 @@ extern "C" {
     pub fn Gecko_GetPositionInSegment(aSegment:
                                           RawGeckoAnimationPropertySegmentBorrowed,
                                       aProgress: f64,
                                       aBeforeFlag:
                                           ComputedTimingFunction_BeforeFlag)
      -> f64;
 }
 extern "C" {
-    pub fn Gecko_IsFramesTimingEnabled() -> bool;
-}
-extern "C" {
     pub fn Gecko_AnimationGetBaseStyle(aBaseStyles:
                                            *mut ::std::os::raw::c_void,
                                        aProperty: nsCSSPropertyID)
      -> RawServoAnimationValueBorrowedOrNull;
 }
 extern "C" {
     pub fn Gecko_StyleTransition_SetUnsupportedProperty(aTransition:
                                                             *mut StyleTransition,
--- a/servo/components/style/gecko/generated/structs_debug.rs
+++ b/servo/components/style/gecko/generated/structs_debug.rs
@@ -1047,18 +1047,16 @@ pub mod root {
         pub struct pair<_T1, _T2> {
             pub first: _T1,
             pub second: _T2,
             pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<_T1>>,
             pub _phantom_1: ::std::marker::PhantomData<::std::cell::UnsafeCell<_T2>>,
         }
         pub type pair_first_type<_T1> = _T1;
         pub type pair_second_type<_T2> = _T2;
-        pub type pair__PCCP = u8;
-        pub type pair__PCCFP = u8;
         #[repr(C)]
         #[derive(Debug, Copy)]
         pub struct input_iterator_tag {
             pub _address: u8,
         }
         #[test]
         fn bindgen_test_layout_input_iterator_tag() {
             assert_eq!(::std::mem::size_of::<input_iterator_tag>() , 1usize ,
@@ -1079,53 +1077,32 @@ pub mod root {
         }
         pub type iterator_iterator_category<_Category> = _Category;
         pub type iterator_value_type<_Tp> = _Tp;
         pub type iterator_difference_type<_Distance> = _Distance;
         pub type iterator_pointer<_Pointer> = _Pointer;
         pub type iterator_reference<_Reference> = _Reference;
         #[repr(C)]
         #[derive(Debug, Copy, Clone)]
-        pub struct __iterator_traits {
-            pub _address: u8,
-        }
-        #[repr(C)]
-        #[derive(Debug, Copy, Clone)]
-        pub struct iterator_traits {
-            pub _address: u8,
-        }
-        #[repr(C)]
-        #[derive(Debug, Copy, Clone)]
-        pub struct reverse_iterator<_Iterator> {
-            pub current: _Iterator,
-            pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<_Iterator>>,
-        }
-        pub type reverse_iterator___traits_type = root::std::iterator_traits;
-        pub type reverse_iterator_iterator_type<_Iterator> = _Iterator;
-        pub type reverse_iterator_difference_type =
-            root::std::reverse_iterator___traits_type;
-        pub type reverse_iterator_pointer =
-            root::std::reverse_iterator___traits_type;
-        pub type reverse_iterator_reference =
-            root::std::reverse_iterator___traits_type;
-        #[repr(C)]
-        #[derive(Debug, Copy, Clone)]
         pub struct atomic {
         }
-        pub mod chrono {
-            #[allow(unused_imports)]
-            use self::super::super::super::root;
+        pub type _Base_bitset__WordT = ::std::os::raw::c_ulong;
+        pub type bitset__Base = u8;
+        pub type bitset__WordT = ::std::os::raw::c_ulong;
+        #[repr(C)]
+        #[derive(Debug)]
+        pub struct bitset_reference {
+            pub _M_wp: *mut root::std::bitset__WordT,
+            pub _M_bpos: usize,
         }
     }
     pub mod __gnu_cxx {
         #[allow(unused_imports)]
         use self::super::super::root;
     }
-    pub type __off_t = ::std::os::raw::c_long;
-    pub type __off64_t = ::std::os::raw::c_long;
     pub mod mozilla {
         #[allow(unused_imports)]
         use self::super::super::root;
         #[repr(C)]
         #[derive(Debug, Copy)]
         pub struct fallible_t {
             pub _address: u8,
         }
@@ -1134,17 +1111,19 @@ pub mod root {
             assert_eq!(::std::mem::size_of::<fallible_t>() , 1usize , concat !
                        ( "Size of: " , stringify ! ( fallible_t ) ));
             assert_eq! (::std::mem::align_of::<fallible_t>() , 1usize , concat
                         ! ( "Alignment of " , stringify ! ( fallible_t ) ));
         }
         impl Clone for fallible_t {
             fn clone(&self) -> Self { *self }
         }
-        /** Convenient aliases. */
+        pub type IntegralConstant_ValueType<T> = T;
+        pub type IntegralConstant_Type = u8;
+        /// Convenient aliases.
         pub type TrueType = u8;
         pub type FalseType = u8;
         pub mod detail {
             #[allow(unused_imports)]
             use self::super::super::super::root;
             #[repr(C)]
             #[derive(Debug, Copy)]
             pub struct nsStringRepr {
@@ -1298,55 +1277,30 @@ pub mod root {
                 SHARED = 4,
                 OWNED = 8,
                 FIXED = 16,
                 LITERAL = 32,
             }
             #[repr(u16)]
             #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
             pub enum StringClassFlags { FIXED = 1, NULL_TERMINATED = 2, }
-            /**
- * LinkedList supports refcounted elements using this adapter class. Clients
- * using LinkedList<RefPtr<T>> will get a data structure that holds a strong
- * reference to T as long as T is in the list.
- */
+            /// LinkedList supports refcounted elements using this adapter class. Clients
+            /// using LinkedList<RefPtr<T>> will get a data structure that holds a strong
+            /// reference to T as long as T is in the list.
             #[repr(C)]
             #[derive(Debug, Copy, Clone)]
             pub struct LinkedListElementTraits {
                 pub _address: u8,
             }
             pub type LinkedListElementTraits_RawType<T> = *mut T;
             pub type LinkedListElementTraits_ConstRawType<T> = *mut T;
             pub type LinkedListElementTraits_ClientType<T> = *mut T;
             pub type LinkedListElementTraits_ConstClientType<T> = *mut T;
             #[repr(C)]
             #[derive(Debug)]
-            pub struct GuardObjectNotifier {
-                pub mStatementDone: *mut bool,
-            }
-            #[test]
-            fn bindgen_test_layout_GuardObjectNotifier() {
-                assert_eq!(::std::mem::size_of::<GuardObjectNotifier>() ,
-                           8usize , concat ! (
-                           "Size of: " , stringify ! ( GuardObjectNotifier )
-                           ));
-                assert_eq! (::std::mem::align_of::<GuardObjectNotifier>() ,
-                            8usize , concat ! (
-                            "Alignment of " , stringify ! (
-                            GuardObjectNotifier ) ));
-                assert_eq! (unsafe {
-                            & ( * ( 0 as * const GuardObjectNotifier ) ) .
-                            mStatementDone as * const _ as usize } , 0usize ,
-                            concat ! (
-                            "Alignment of field: " , stringify ! (
-                            GuardObjectNotifier ) , "::" , stringify ! (
-                            mStatementDone ) ));
-            }
-            #[repr(C)]
-            #[derive(Debug)]
             pub struct GuardObjectNotificationReceiver {
                 pub mStatementDone: bool,
             }
             #[test]
             fn bindgen_test_layout_GuardObjectNotificationReceiver() {
                 assert_eq!(::std::mem::size_of::<GuardObjectNotificationReceiver>()
                            , 1usize , concat ! (
                            "Size of: " , stringify ! (
@@ -1363,41 +1317,18 @@ pub mod root {
                             "Alignment of field: " , stringify ! (
                             GuardObjectNotificationReceiver ) , "::" ,
                             stringify ! ( mStatementDone ) ));
             }
             #[repr(C)]
             #[derive(Debug, Copy, Clone)]
             pub struct WeakReference {
             }
-            #[repr(C)]
-            #[derive(Debug)]
-            pub struct MutexImpl {
-                pub platformData_: [*mut ::std::os::raw::c_void; 5usize],
-            }
-            #[repr(C)]
-            #[derive(Debug, Copy, Clone)]
-            pub struct MutexImpl_PlatformData {
-                _unused: [u8; 0],
-            }
-            #[test]
-            fn bindgen_test_layout_MutexImpl() {
-                assert_eq!(::std::mem::size_of::<MutexImpl>() , 40usize ,
-                           concat ! ( "Size of: " , stringify ! ( MutexImpl )
-                           ));
-                assert_eq! (::std::mem::align_of::<MutexImpl>() , 8usize ,
-                            concat ! (
-                            "Alignment of " , stringify ! ( MutexImpl ) ));
-                assert_eq! (unsafe {
-                            & ( * ( 0 as * const MutexImpl ) ) . platformData_
-                            as * const _ as usize } , 0usize , concat ! (
-                            "Alignment of field: " , stringify ! ( MutexImpl )
-                            , "::" , stringify ! ( platformData_ ) ));
-            }
-        }
+        }
+        pub type Conditional_Type<A> = A;
         #[repr(u32)]
         #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
         pub enum ArenaObjectID {
             eArenaObjectID_DummyBeforeFirstObjectID = 173,
             eArenaObjectID_GeckoStyleContext = 174,
             eArenaObjectID_nsLineBox = 175,
             eArenaObjectID_nsRuleNode = 176,
             eArenaObjectID_DisplayItemData = 177,
@@ -1451,44 +1382,48 @@ pub mod root {
             assert_eq! (::std::mem::align_of::<MallocAllocPolicy>() , 1usize ,
                         concat ! (
                         "Alignment of " , stringify ! ( MallocAllocPolicy )
                         ));
         }
         impl Clone for MallocAllocPolicy {
             fn clone(&self) -> Self { *self }
         }
-        /**
- * A default deletion policy using plain old operator delete.
- *
- * Note that this type can be specialized, but authors should beware of the risk
- * that the specialization may at some point cease to match (either because it
- * gets moved to a different compilation unit or the signature changes). If the
- * non-specialized (|delete|-based) version compiles for that type but does the
- * wrong thing, bad things could happen.
- *
- * This is a non-issue for types which are always incomplete (i.e. opaque handle
- * types), since |delete|-ing such a type will always trigger a compilation
- * error.
- */
+        /// A default deletion policy using plain old operator delete.
+        ///
+        /// Note that this type can be specialized, but authors should beware of the risk
+        /// that the specialization may at some point cease to match (either because it
+        /// gets moved to a different compilation unit or the signature changes). If the
+        /// non-specialized (|delete|-based) version compiles for that type but does the
+        /// wrong thing, bad things could happen.
+        ///
+        /// This is a non-issue for types which are always incomplete (i.e. opaque handle
+        /// types), since |delete|-ing such a type will always trigger a compilation
+        /// error.
         #[repr(C)]
         #[derive(Debug, Copy, Clone)]
         pub struct DefaultDelete {
             pub _address: u8,
         }
         pub type MallocSizeOf =
             ::std::option::Option<unsafe extern "C" fn(p:
                                                            *const ::std::os::raw::c_void)
                                       -> usize>;
         #[repr(C)]
         #[derive(Debug, Copy, Clone)]
         pub struct ReverseIterator<IteratorT> {
             pub mCurrent: IteratorT,
             pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<IteratorT>>,
         }
+        pub type Array_iterator<T> = *mut T;
+        pub type Array_const_iterator<T> = *mut T;
+        pub type Array_reverse_iterator<T> =
+            root::mozilla::ReverseIterator<T>;
+        pub type Array_const_reverse_iterator<T> =
+            root::mozilla::ReverseIterator<T>;
         pub mod css {
             #[allow(unused_imports)]
             use self::super::super::super::root;
             #[repr(C)]
             pub struct ErrorReporter {
                 pub mError: root::nsAutoString,
                 pub mErrorLine: ::nsstring::nsStringRepr,
                 pub mFileName: ::nsstring::nsStringRepr,
@@ -1577,46 +1512,44 @@ pub mod root {
                             & ( * ( 0 as * const ErrorReporter ) ) .
                             mErrorColNumber as * const _ as usize } , 240usize
                             , concat ! (
                             "Alignment of field: " , stringify ! (
                             ErrorReporter ) , "::" , stringify ! (
                             mErrorColNumber ) ));
             }
             #[repr(u8)]
-            /**
- * Enum defining the mode in which a sheet is to be parsed.  This is
- * usually, but not always, the same as the cascade level at which the
- * sheet will apply (see nsStyleSet.h).  Most of the Loader APIs only
- * support loading of author sheets.
- *
- * Author sheets are the normal case: styles embedded in or linked
- * from HTML pages.  They are also the most restricted.
- *
- * User sheets can do anything author sheets can do, and also get
- * access to a few CSS extensions that are not yet suitable for
- * exposure on the public Web, but are very useful for expressing
- * user style overrides, such as @-moz-document rules.
- *
- * XXX: eUserSheetFeatures was added in bug 1035091, but some patches in
- * that bug never landed to use this enum value. Currently, all the features
- * in user sheet are also available in author sheet.
- *
- * Agent sheets have access to all author- and user-sheet features
- * plus more extensions that are necessary for internal use but,
- * again, not yet suitable for exposure on the public Web.  Some of
- * these are outright unsafe to expose; in particular, incorrect
- * styling of anonymous box pseudo-elements can violate layout
- * invariants.
- *
- * Agent sheets that do not use any unsafe rules could use
- * eSafeAgentSheetFeatures when creating the sheet. This enum value allows
- * Servo backend to recognize the sheets as the agent level, but Gecko
- * backend will parse it under _author_ level.
- */
+            /// Enum defining the mode in which a sheet is to be parsed.  This is
+            /// usually, but not always, the same as the cascade level at which the
+            /// sheet will apply (see nsStyleSet.h).  Most of the Loader APIs only
+            /// support loading of author sheets.
+            ///
+            /// Author sheets are the normal case: styles embedded in or linked
+            /// from HTML pages.  They are also the most restricted.
+            ///
+            /// User sheets can do anything author sheets can do, and also get
+            /// access to a few CSS extensions that are not yet suitable for
+            /// exposure on the public Web, but are very useful for expressing
+            /// user style overrides, such as @-moz-document rules.
+            ///
+            /// XXX: eUserSheetFeatures was added in bug 1035091, but some patches in
+            /// that bug never landed to use this enum value. Currently, all the features
+            /// in user sheet are also available in author sheet.
+            ///
+            /// Agent sheets have access to all author- and user-sheet features
+            /// plus more extensions that are necessary for internal use but,
+            /// again, not yet suitable for exposure on the public Web.  Some of
+            /// these are outright unsafe to expose; in particular, incorrect
+            /// styling of anonymous box pseudo-elements can violate layout
+            /// invariants.
+            ///
+            /// Agent sheets that do not use any unsafe rules could use
+            /// eSafeAgentSheetFeatures when creating the sheet. This enum value allows
+            /// Servo backend to recognize the sheets as the agent level, but Gecko
+            /// backend will parse it under _author_ level.
             #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
             pub enum SheetParsingMode {
                 eAuthorSheetFeatures = 0,
                 eUserSheetFeatures = 1,
                 eAgentSheetFeatures = 2,
                 eSafeAgentSheetFeatures = 3,
             }
             #[repr(C)]
@@ -1723,16 +1656,17 @@ pub mod root {
             #[test]
             fn bindgen_test_layout_Rule() {
                 assert_eq!(::std::mem::size_of::<Rule>() , 72usize , concat !
                            ( "Size of: " , stringify ! ( Rule ) ));
                 assert_eq! (::std::mem::align_of::<Rule>() , 8usize , concat !
                             ( "Alignment of " , stringify ! ( Rule ) ));
             }
             #[repr(C)]
+            #[derive(Debug)]
             pub struct Loader {
                 pub mRefCnt: root::nsCycleCollectingAutoRefCnt,
                 pub _mOwningThread: root::nsAutoOwningThread,
                 pub mSheets: root::nsAutoPtr<root::mozilla::css::Loader_Sheets>,
                 pub mParsingDatas: [u64; 10usize],
                 pub mPostedEvents: root::mozilla::css::Loader_LoadDataArray,
                 pub mObservers: [u64; 2usize],
                 pub mDocument: *mut root::nsIDocument,
@@ -2244,19 +2178,17 @@ pub mod root {
                 assert_eq! (unsafe {
                             & ( * ( 0 as * const ComplexColorValue ) ) .
                             _mOwningThread as * const _ as usize } , 32usize ,
                             concat ! (
                             "Alignment of field: " , stringify ! (
                             ComplexColorValue ) , "::" , stringify ! (
                             _mOwningThread ) ));
             }
-            /*********************
- * Style sheet reuse *
- *********************/
+            /// Style sheet reuse *
             #[repr(C)]
             #[derive(Debug)]
             pub struct LoaderReusableStyleSheets {
                 pub mReusableSheets: root::nsTArray<root::RefPtr<root::mozilla::StyleSheet>>,
             }
             #[test]
             fn bindgen_test_layout_LoaderReusableStyleSheets() {
                 assert_eq!(::std::mem::size_of::<LoaderReusableStyleSheets>()
@@ -2275,26 +2207,19 @@ pub mod root {
                             LoaderReusableStyleSheets ) , "::" , stringify ! (
                             mReusableSheets ) ));
             }
             #[repr(C)]
             #[derive(Debug, Copy, Clone)]
             pub struct SheetLoadData {
                 _unused: [u8; 0],
             }
-            #[repr(C)]
-            #[derive(Debug, Copy, Clone)]
-            pub struct ImportRule {
-                _unused: [u8; 0],
-            }
             #[repr(i32)]
-            /**
- * Enum defining the type of URL matching function for a @-moz-document rule
- * condition.
- */
+            /// Enum defining the type of URL matching function for a @-moz-document rule
+            /// condition.
             #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
             pub enum URLMatchingFunction {
                 eURL = 0,
                 eURLPrefix = 1,
                 eDomain = 2,
                 eRegExp = 3,
             }
             #[repr(C)]
@@ -2333,16 +2258,25 @@ pub mod root {
             pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>,
         }
         #[repr(C)]
         #[derive(Debug, Copy, Clone)]
         pub struct StaticRefPtr<T> {
             pub mRawPtr: *mut T,
             pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>,
         }
+        pub type EnumeratedArray_ArrayType = u8;
+        pub type EnumeratedArray_iterator =
+            root::mozilla::EnumeratedArray_ArrayType;
+        pub type EnumeratedArray_const_iterator =
+            root::mozilla::EnumeratedArray_ArrayType;
+        pub type EnumeratedArray_reverse_iterator =
+            root::mozilla::EnumeratedArray_ArrayType;
+        pub type EnumeratedArray_const_reverse_iterator =
+            root::mozilla::EnumeratedArray_ArrayType;
         #[repr(C)]
         #[derive(Debug)]
         pub struct LinkedListElement {
             pub mNext: *mut root::mozilla::LinkedListElement,
             pub mPrev: *mut root::mozilla::LinkedListElement,
             pub mIsSentinel: bool,
         }
         pub type LinkedListElement_Traits =
@@ -2375,97 +2309,25 @@ pub mod root {
             root::mozilla::LinkedList_Traits;
         #[repr(C)]
         #[derive(Debug, Copy, Clone)]
         pub struct LinkedList_Iterator {<