Bug 1396584 - Remove support for multiple ShadowRoots, r=mrbkap
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Mon, 25 Sep 2017 18:09:26 +0300
changeset 436053 e8d213d3265f8d6cb0401b2c2b127b4b5908baf5
parent 436052 9a941556e9399914d1a5bbd0043bed3ab3807fc5
child 436054 db42206dd4498e112ffad99103b8ceaf0af3a0be
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs1396584
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1396584 - Remove support for multiple ShadowRoots, r=mrbkap
dom/base/ChildIterator.cpp
dom/base/ChildIterator.h
dom/base/DocumentFragment.cpp
dom/base/DocumentFragment.h
dom/base/Element.cpp
dom/base/FragmentOrElement.cpp
dom/base/ShadowRoot.cpp
dom/base/ShadowRoot.h
dom/base/nsContentUtils.cpp
dom/base/nsGkAtomList.h
dom/base/nsNodeUtils.cpp
dom/base/test/test_mutationobservers.html
dom/html/HTMLShadowElement.cpp
dom/html/HTMLShadowElement.h
dom/html/moz.build
dom/html/nsGenericHTMLElement.h
dom/html/nsGenericHTMLFrameElement.cpp
dom/html/nsHTMLContentSink.cpp
dom/tests/mochitest/general/test_interfaces.js
dom/tests/mochitest/webcomponents/mochitest.ini
dom/tests/mochitest/webcomponents/test_dest_insertion_points_shadow.html
dom/tests/mochitest/webcomponents/test_event_dispatch.html
dom/tests/mochitest/webcomponents/test_shadowroot_host.html
dom/tests/mochitest/webcomponents/test_shadowroot_style_multiple_shadow.html
dom/tests/mochitest/webcomponents/test_shadowroot_youngershadowroot.html
dom/webidl/HTMLShadowElement.webidl
dom/webidl/ShadowRoot.webidl
dom/webidl/moz.build
editor/libeditor/HTMLEditUtils.cpp
layout/reftests/css-display/display-contents-shadow-dom-1-ref.html
layout/reftests/css-display/display-contents-shadow-dom-1.html
layout/reftests/webcomponents/adjacent-insertion-points-1-ref.html
layout/reftests/webcomponents/adjacent-insertion-points-1.html
layout/reftests/webcomponents/adjacent-insertion-points-2-ref.html
layout/reftests/webcomponents/adjacent-insertion-points-2.html
layout/reftests/webcomponents/basic-shadow-element-1-ref.html
layout/reftests/webcomponents/basic-shadow-element-1.html
layout/reftests/webcomponents/nested-shadow-element-1-ref.html
layout/reftests/webcomponents/nested-shadow-element-1.html
layout/reftests/webcomponents/reftest.list
parser/html/javasrc/ElementName.java
parser/html/nsHtml5ElementName.cpp
parser/html/nsHtml5ElementName.h
parser/html/nsHtml5StackNode.h
parser/htmlparser/nsElementTable.cpp
parser/htmlparser/nsHTMLTagList.h
--- a/dom/base/ChildIterator.cpp
+++ b/dom/base/ChildIterator.cpp
@@ -3,17 +3,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "ChildIterator.h"
 #include "nsContentUtils.h"
 #include "mozilla/dom/XBLChildrenElement.h"
 #include "mozilla/dom/HTMLContentElement.h"
-#include "mozilla/dom/HTMLShadowElement.h"
 #include "mozilla/dom/ShadowRoot.h"
 #include "nsIAnonymousContentCreator.h"
 #include "nsIFrame.h"
 #include "nsCSSAnonBoxes.h"
 
 namespace mozilla {
 namespace dom {
 
@@ -73,27 +72,16 @@ ExplicitChildIterator::GetNextChild()
     MOZ_ASSERT(!mDefaultChild);
 
     MatchedNodes assignedChildren = GetMatchedNodesForPoint(mChild);
     if (mIndexInInserted < assignedChildren.Length()) {
       return assignedChildren[mIndexInInserted++];
     }
     mIndexInInserted = 0;
     mChild = mChild->GetNextSibling();
-  } else if (mShadowIterator) {
-    // If we're inside of a <shadow> element, look through the
-    // explicit children of the projected ShadowRoot via
-    // the mShadowIterator.
-    nsIContent* nextChild = mShadowIterator->GetNextChild();
-    if (nextChild) {
-      return nextChild;
-    }
-
-    mShadowIterator = nullptr;
-    mChild = mChild->GetNextSibling();
   } else if (mDefaultChild) {
     // If we're already in default content, check if there are more nodes there
     MOZ_ASSERT(mChild);
     MOZ_ASSERT(nsContentUtils::IsContentInsertionPoint(mChild));
 
     mDefaultChild = mDefaultChild->GetNextSibling();
     if (mDefaultChild) {
       return mDefaultChild;
@@ -105,33 +93,17 @@ ExplicitChildIterator::GetNextChild()
     mIsFirst = false;
   } else if (mChild) { // in the middle of the child list
     mChild = mChild->GetNextSibling();
   }
 
   // Iterate until we find a non-insertion point, or an insertion point with
   // content.
   while (mChild) {
-    // If the current child being iterated is a shadow insertion point then
-    // the iterator needs to go into the projected ShadowRoot.
-    if (ShadowRoot::IsShadowInsertionPoint(mChild)) {
-      // Look for the next child in the projected ShadowRoot for the <shadow>
-      // element.
-      HTMLShadowElement* shadowElem = HTMLShadowElement::FromContent(mChild);
-      ShadowRoot* projectedShadow = shadowElem->GetOlderShadowRoot();
-      if (projectedShadow) {
-        mShadowIterator = new ExplicitChildIterator(projectedShadow);
-        nsIContent* nextChild = mShadowIterator->GetNextChild();
-        if (nextChild) {
-          return nextChild;
-        }
-        mShadowIterator = nullptr;
-      }
-      mChild = mChild->GetNextSibling();
-    } else if (nsContentUtils::IsContentInsertionPoint(mChild)) {
+    if (nsContentUtils::IsContentInsertionPoint(mChild)) {
       // If the current child being iterated is a content insertion point
       // then the iterator needs to return the nodes distributed into
       // the content insertion point.
       MatchedNodes assignedChildren = GetMatchedNodesForPoint(mChild);
       if (!assignedChildren.IsEmpty()) {
         // Iterate through elements projected on insertion point.
         mIndexInInserted = 1;
         return assignedChildren[0];
@@ -191,21 +163,19 @@ FlattenedChildIterator::Init(bool aIgnor
 
 bool
 ExplicitChildIterator::Seek(nsIContent* aChildToFind)
 {
   if (aChildToFind->GetParent() == mParent &&
       !aChildToFind->IsRootOfAnonymousSubtree()) {
     // Fast path: just point ourselves to aChildToFind, which is a
     // normal DOM child of ours.
-    MOZ_ASSERT(!ShadowRoot::IsShadowInsertionPoint(aChildToFind));
     MOZ_ASSERT(!nsContentUtils::IsContentInsertionPoint(aChildToFind));
     mChild = aChildToFind;
     mIndexInInserted = 0;
-    mShadowIterator = nullptr;
     mDefaultChild = nullptr;
     mIsFirst = false;
     return true;
   }
 
   // Can we add more fast paths here based on whether the parent of aChildToFind
   // is a shadow insertion point or content insertion point?
 
@@ -216,41 +186,33 @@ ExplicitChildIterator::Seek(nsIContent* 
 nsIContent*
 ExplicitChildIterator::Get() const
 {
   MOZ_ASSERT(!mIsFirst);
 
   if (mIndexInInserted) {
     MatchedNodes assignedChildren = GetMatchedNodesForPoint(mChild);
     return assignedChildren[mIndexInInserted - 1];
-  } else if (mShadowIterator)  {
-    return mShadowIterator->Get();
   }
+
   return mDefaultChild ? mDefaultChild : mChild;
 }
 
 nsIContent*
 ExplicitChildIterator::GetPreviousChild()
 {
   // If we're already in the inserted-children array, look there first
   if (mIndexInInserted) {
     // NB: mIndexInInserted points one past the last returned child so we need
     // to look *two* indices back in order to return the previous child.
     MatchedNodes assignedChildren = GetMatchedNodesForPoint(mChild);
     if (--mIndexInInserted) {
       return assignedChildren[mIndexInInserted - 1];
     }
     mChild = mChild->GetPreviousSibling();
-  } else if (mShadowIterator) {
-    nsIContent* previousChild = mShadowIterator->GetPreviousChild();
-    if (previousChild) {
-      return previousChild;
-    }
-    mShadowIterator = nullptr;
-    mChild = mChild->GetPreviousSibling();
   } else if (mDefaultChild) {
     // If we're already in default content, check if there are more nodes there
     mDefaultChild = mDefaultChild->GetPreviousSibling();
     if (mDefaultChild) {
       return mDefaultChild;
     }
 
     mChild = mChild->GetPreviousSibling();
@@ -260,32 +222,17 @@ ExplicitChildIterator::GetPreviousChild(
     mChild = mChild->GetPreviousSibling();
   } else { // at the end of the child list
     mChild = mParent->GetLastChild();
   }
 
   // Iterate until we find a non-insertion point, or an insertion point with
   // content.
   while (mChild) {
-    if (ShadowRoot::IsShadowInsertionPoint(mChild)) {
-      // If the current child being iterated is a shadow insertion point then
-      // the iterator needs to go into the projected ShadowRoot.
-      HTMLShadowElement* shadowElem = HTMLShadowElement::FromContent(mChild);
-      ShadowRoot* projectedShadow = shadowElem->GetOlderShadowRoot();
-      if (projectedShadow) {
-        // Create a ExplicitChildIterator that begins iterating from the end.
-        mShadowIterator = new ExplicitChildIterator(projectedShadow, false);
-        nsIContent* previousChild = mShadowIterator->GetPreviousChild();
-        if (previousChild) {
-          return previousChild;
-        }
-        mShadowIterator = nullptr;
-      }
-      mChild = mChild->GetPreviousSibling();
-    } else if (nsContentUtils::IsContentInsertionPoint(mChild)) {
+    if (nsContentUtils::IsContentInsertionPoint(mChild)) {
       // If the current child being iterated is a content insertion point
       // then the iterator needs to return the nodes distributed into
       // the content insertion point.
       MatchedNodes assignedChildren = GetMatchedNodesForPoint(mChild);
       if (!assignedChildren.IsEmpty()) {
         mIndexInInserted = assignedChildren.Length();
         return assignedChildren[mIndexInInserted - 1];
       }
--- a/dom/base/ChildIterator.h
+++ b/dom/base/ChildIterator.h
@@ -43,26 +43,22 @@ public:
       mIsFirst(aStartAtBeginning),
       mIndexInInserted(0)
   {
   }
 
   ExplicitChildIterator(const ExplicitChildIterator& aOther)
     : mParent(aOther.mParent), mChild(aOther.mChild),
       mDefaultChild(aOther.mDefaultChild),
-      mShadowIterator(aOther.mShadowIterator ?
-                      new ExplicitChildIterator(*aOther.mShadowIterator) :
-                      nullptr),
       mIsFirst(aOther.mIsFirst),
       mIndexInInserted(aOther.mIndexInInserted) {}
 
   ExplicitChildIterator(ExplicitChildIterator&& aOther)
     : mParent(aOther.mParent), mChild(aOther.mChild),
       mDefaultChild(aOther.mDefaultChild),
-      mShadowIterator(Move(aOther.mShadowIterator)),
       mIsFirst(aOther.mIsFirst),
       mIndexInInserted(aOther.mIndexInInserted) {}
 
   nsIContent* GetNextChild();
 
   // Looks for aChildToFind respecting insertion points until aChildToFind is
   // found.  This version can take shortcuts that the two-argument version
   // can't, so can be faster (and in fact can be O(1) instead of O(N) in many
@@ -111,21 +107,16 @@ protected:
   nsIContent* mChild;
 
   // If non-null, this points to the current default content for the current
   // insertion point that we're iterating (i.e. mChild, which must be an
   // nsXBLChildrenElement or HTMLContentElement). Once this transitions back
   // to null, we continue iterating at mChild's next sibling.
   nsIContent* mDefaultChild;
 
-  // If non-null, this points to an iterator of the explicit children of
-  // the ShadowRoot projected by the current shadow element that we're
-  // iterating.
-  nsAutoPtr<ExplicitChildIterator> mShadowIterator;
-
   // A flag to let us know that we haven't started iterating yet.
   bool mIsFirst;
 
   // If not zero, we're iterating inserted children for an insertion point. This
   // is an index into mChild's inserted children array (mChild must be an
   // nsXBLChildrenElement). The index is one past the "current" child (as
   // opposed to mChild which represents the "current" child).
   uint32_t mIndexInInserted;
--- a/dom/base/DocumentFragment.cpp
+++ b/dom/base/DocumentFragment.cpp
@@ -106,19 +106,17 @@ DocumentFragment::Constructor(const Glob
   if (!window || !window->GetDoc()) {
     aRv.Throw(NS_ERROR_FAILURE);
     return nullptr;
   }
 
   return window->GetDoc()->CreateDocumentFragment();
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED(DocumentFragment,
-                                   FragmentOrElement,
-                                   mHost)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(DocumentFragment, FragmentOrElement, mHost)
 
 // QueryInterface implementation for DocumentFragment
 NS_INTERFACE_MAP_BEGIN(DocumentFragment)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRIES_CYCLE_COLLECTION(DocumentFragment)
   NS_INTERFACE_MAP_ENTRY(nsIContent)
   NS_INTERFACE_MAP_ENTRY(nsINode)
   NS_INTERFACE_MAP_ENTRY(nsIDOMDocumentFragment)
--- a/dom/base/DocumentFragment.h
+++ b/dom/base/DocumentFragment.h
@@ -38,18 +38,17 @@ public:
   using FragmentOrElement::GetFirstChild;
   using nsINode::QuerySelector;
   using nsINode::QuerySelectorAll;
   // Make sure bindings can see our superclass' protected GetElementById method.
   using nsINode::GetElementById;
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
-  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(DocumentFragment,
-                                           FragmentOrElement)
+  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(DocumentFragment, FragmentOrElement)
 
   // interface nsIDOMNode
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
 
   // interface nsIDOMDocumentFragment
   NS_DECL_NSIDOMDOCUMENTFRAGMENT
 
   explicit DocumentFragment(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
@@ -117,25 +116,19 @@ public:
     NS_ASSERTION(false, "Trying to unbind a fragment from a tree");
   }
 
   virtual Element* GetNameSpaceElement() override
   {
     return nullptr;
   }
 
-  Element* GetHost() const
-  {
-    return mHost;
-  }
+  Element* GetHost() const { return mHost; }
 
-  void SetHost(Element* aHost)
-  {
-    mHost = aHost;
-  }
+  void SetHost(Element* aHost) { mHost = aHost; }
 
   static already_AddRefed<DocumentFragment>
   Constructor(const GlobalObject& aGlobal, ErrorResult& aRv);
 
 #ifdef DEBUG
   virtual void List(FILE* out, int32_t aIndent) const override;
   virtual void DumpContent(FILE* out, int32_t aIndent, bool aDumpAll) const override;
 #endif
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -1101,16 +1101,21 @@ Element::RemoveFromIdTable()
       doc->RemoveFromIdTable(this, id);
     }
   }
 }
 
 already_AddRefed<ShadowRoot>
 Element::CreateShadowRoot(ErrorResult& aError)
 {
+  if (GetShadowRoot()) {
+    aError.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
+    return nullptr;
+  }
+
   nsAutoScriptBlocker scriptBlocker;
 
   RefPtr<mozilla::dom::NodeInfo> nodeInfo;
   nodeInfo = mNodeInfo->NodeInfoManager()->GetNodeInfo(
     nsGkAtoms::documentFragmentNodeName, nullptr, kNameSpaceID_None,
     nsIDOMNode::DOCUMENT_FRAGMENT_NODE);
 
   RefPtr<nsXBLDocumentInfo> docInfo = new nsXBLDocumentInfo(OwnerDoc());
@@ -1137,34 +1142,17 @@ Element::CreateShadowRoot(ErrorResult& a
   // Calling SetPrototypeBinding takes ownership of protoBinding.
   docInfo->SetPrototypeBinding(NS_LITERAL_CSTRING("shadowroot"), protoBinding);
 
   RefPtr<ShadowRoot> shadowRoot = new ShadowRoot(this, nodeInfo.forget(),
                                                    protoBinding);
 
   shadowRoot->SetIsComposedDocParticipant(IsInComposedDoc());
 
-  // Replace the old ShadowRoot with the new one and let the old
-  // ShadowRoot know about the younger ShadowRoot because the old
-  // ShadowRoot is projected into the younger ShadowRoot's shadow
-  // insertion point (if it exists).
-  ShadowRoot* olderShadow = GetShadowRoot();
   SetShadowRoot(shadowRoot);
-  if (olderShadow) {
-    olderShadow->SetYoungerShadow(shadowRoot);
-
-    // Unbind children of older shadow root because they
-    // are no longer in the composed tree.
-    for (nsIContent* child = olderShadow->GetFirstChild(); child;
-         child = child->GetNextSibling()) {
-      child->UnbindFromTree(true, false);
-    }
-
-    olderShadow->SetIsComposedDocParticipant(false);
-  }
 
   // xblBinding takes ownership of docInfo.
   RefPtr<nsXBLBinding> xblBinding = new nsXBLBinding(shadowRoot, protoBinding);
   shadowRoot->SetAssociatedBinding(xblBinding);
   xblBinding->SetBoundElement(this);
 
   SetXBLBinding(xblBinding);
   return shadowRoot.forget();
--- a/dom/base/FragmentOrElement.cpp
+++ b/dom/base/FragmentOrElement.cpp
@@ -1042,33 +1042,20 @@ nsIContent::GetEventTargetParent(EventCh
   }
 
   nsIContent* parent = GetParent();
 
   // Web components have a special event chain that need to account
   // for destination insertion points where nodes have been distributed.
   nsTArray<nsIContent*>* destPoints = GetExistingDestInsertionPoints();
   if (destPoints && !destPoints->IsEmpty()) {
-    // Push destination insertion points to aVisitor.mDestInsertionPoints
-    // excluding shadow insertion points.
-    bool didPushNonShadowInsertionPoint = false;
+    // Push destination insertion points to aVisitor.mDestInsertionPoints.
     for (uint32_t i = 0; i < destPoints->Length(); i++) {
       nsIContent* point = destPoints->ElementAt(i);
-      if (!ShadowRoot::IsShadowInsertionPoint(point)) {
-        aVisitor.mDestInsertionPoints.AppendElement(point);
-        didPushNonShadowInsertionPoint = true;
-      }
-    }
-
-    // Next node in the event path is the final destination
-    // (non-shadow) insertion point that was pushed.
-    if (didPushNonShadowInsertionPoint) {
-      parent = aVisitor.mDestInsertionPoints.LastElement();
-      aVisitor.mDestInsertionPoints.SetLength(
-        aVisitor.mDestInsertionPoints.Length() - 1);
+      aVisitor.mDestInsertionPoints.AppendElement(point);
     }
   }
 
   ShadowRoot* thisShadowRoot = ShadowRoot::FromNode(this);
   if (thisShadowRoot) {
     if (!aVisitor.mEvent->mFlags.mComposed) {
       // If we do stop propagation, we still want to propagate
       // the event to chrome (nsPIDOMWindow::GetParentTarget()).
@@ -1082,20 +1069,17 @@ nsIContent::GetEventTargetParent(EventCh
       return NS_OK;
     }
 
     if (!aVisitor.mDestInsertionPoints.IsEmpty()) {
       parent = aVisitor.mDestInsertionPoints.LastElement();
       aVisitor.mDestInsertionPoints.SetLength(
         aVisitor.mDestInsertionPoints.Length() - 1);
     } else {
-      // The pool host for the youngest shadow root is shadow DOM host,
-      // for older shadow roots, it is the shadow insertion point
-      // where the shadow root is projected, nullptr if none exists.
-      parent = thisShadowRoot->GetPoolHost();
+      parent = thisShadowRoot->GetHost();
     }
   }
 
   // Event may need to be retargeted if this is the root of a native
   // anonymous content subtree or event is dispatched somewhere inside XBL.
   if (isAnonForEvents) {
 #ifdef DEBUG
     // If a DOM event is explicitly dispatched using node.dispatchEvent(), then
@@ -2614,13 +2598,12 @@ FragmentOrElement::SetIsElementInStyleSc
 }
 
 void
 FragmentOrElement::SetIsElementInStyleScopeFlagOnShadowTree(bool aInStyleScope)
 {
   NS_ASSERTION(IsElement(), "calling SetIsElementInStyleScopeFlagOnShadowTree "
                             "on a non-Element is useless");
   ShadowRoot* shadowRoot = GetShadowRoot();
-  while (shadowRoot) {
+  if (shadowRoot) {
     shadowRoot->SetIsElementInStyleScopeFlagOnSubtree(aInStyleScope);
-    shadowRoot = shadowRoot->GetOlderShadowRoot();
   }
 }
--- a/dom/base/ShadowRoot.cpp
+++ b/dom/base/ShadowRoot.cpp
@@ -10,99 +10,90 @@
 #include "mozilla/dom/DocumentFragment.h"
 #include "ChildIterator.h"
 #include "nsContentUtils.h"
 #include "nsDOMClassInfoID.h"
 #include "nsIDOMHTMLElement.h"
 #include "nsIStyleSheetLinkingElement.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/HTMLContentElement.h"
-#include "mozilla/dom/HTMLShadowElement.h"
 #include "nsXBLPrototypeBinding.h"
 #include "mozilla/StyleSheet.h"
 #include "mozilla/StyleSheetInlines.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(ShadowRoot)
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(ShadowRoot,
                                                   DocumentFragment)
-  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPoolHost)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mStyleSheetList)
-  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mOlderShadow)
-  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mYoungerShadow)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mAssociatedBinding)
   for (auto iter = tmp->mIdentifierMap.ConstIter(); !iter.Done();
        iter.Next()) {
     iter.Get()->Traverse(&cb);
   }
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
-NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(ShadowRoot,
-                                                DocumentFragment)
-  if (tmp->mPoolHost) {
-    tmp->mPoolHost->RemoveMutationObserver(tmp);
+NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(ShadowRoot)
+  if (tmp->GetHost()) {
+    tmp->GetHost()->RemoveMutationObserver(tmp);
   }
-  NS_IMPL_CYCLE_COLLECTION_UNLINK(mPoolHost)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mStyleSheetList)
-  NS_IMPL_CYCLE_COLLECTION_UNLINK(mOlderShadow)
-  NS_IMPL_CYCLE_COLLECTION_UNLINK(mYoungerShadow)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mAssociatedBinding)
   tmp->mIdentifierMap.Clear();
-NS_IMPL_CYCLE_COLLECTION_UNLINK_END
+NS_IMPL_CYCLE_COLLECTION_UNLINK_END_INHERITED(DocumentFragment)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(ShadowRoot)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIContent)
   NS_INTERFACE_MAP_ENTRY(nsIMutationObserver)
 NS_INTERFACE_MAP_END_INHERITING(DocumentFragment)
 
 NS_IMPL_ADDREF_INHERITED(ShadowRoot, DocumentFragment)
 NS_IMPL_RELEASE_INHERITED(ShadowRoot, DocumentFragment)
 
 ShadowRoot::ShadowRoot(Element* aElement,
                        already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
                        nsXBLPrototypeBinding* aProtoBinding)
-  : DocumentFragment(aNodeInfo), mPoolHost(aElement),
-    mProtoBinding(aProtoBinding), mShadowElement(nullptr),
-    mInsertionPointChanged(false), mIsComposedDocParticipant(false)
+  : DocumentFragment(aNodeInfo)
+  , mProtoBinding(aProtoBinding)
+  , mInsertionPointChanged(false)
+  , mIsComposedDocParticipant(false)
 {
   SetHost(aElement);
 
   // Nodes in a shadow tree should never store a value
   // in the subtree root pointer, nodes in the shadow tree
   // track the subtree root using GetContainingShadow().
   ClearSubtreeRootPointer();
 
   SetFlags(NODE_IS_IN_SHADOW_TREE);
 
   ExtendedDOMSlots()->mBindingParent = aElement;
   ExtendedDOMSlots()->mContainingShadow = this;
 
   // Add the ShadowRoot as a mutation observer on the host to watch
   // for mutations because the insertion points in this ShadowRoot
   // may need to be updated when the host children are modified.
-  mPoolHost->AddMutationObserver(this);
+  GetHost()->AddMutationObserver(this);
 }
 
 ShadowRoot::~ShadowRoot()
 {
-  if (mPoolHost) {
+  if (GetHost()) {
     // mPoolHost may have been unlinked or a new ShadowRoot may have been
     // creating, making this one obsolete.
-    mPoolHost->RemoveMutationObserver(this);
+    GetHost()->RemoveMutationObserver(this);
   }
 
   UnsetFlags(NODE_IS_IN_SHADOW_TREE);
 
   // nsINode destructor expects mSubtreeRoot == this.
   SetSubtreeRootPointer(this);
-
-  SetHost(nullptr);
 }
 
 JSObject*
 ShadowRoot::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
 {
   return mozilla::dom::ShadowRootBinding::Wrap(aCx, this, aGivenProto);
 }
 
@@ -239,25 +230,16 @@ ShadowRoot::AddInsertionPoint(HTMLConten
 
 void
 ShadowRoot::RemoveInsertionPoint(HTMLContentElement* aInsertionPoint)
 {
   mInsertionPoints.RemoveElement(aInsertionPoint);
 }
 
 void
-ShadowRoot::SetYoungerShadow(ShadowRoot* aYoungerShadow)
-{
-  mYoungerShadow = aYoungerShadow;
-  mYoungerShadow->mOlderShadow = this;
-
-  ChangePoolHost(mYoungerShadow->GetShadowElement());
-}
-
-void
 ShadowRoot::RemoveDestInsertionPoint(nsIContent* aInsertionPoint,
                                      nsTArray<nsIContent*>& aDestInsertionPoints)
 {
   // Remove the insertion point from the destination insertion points.
   // Also remove all succeeding insertion points because it is no longer
   // possible for the content to be distributed into deeper node trees.
   int32_t index = aDestInsertionPoints.IndexOf(aInsertionPoint);
 
@@ -295,18 +277,17 @@ ShadowRoot::DistributeSingleNode(nsICont
   }
 
   // Find the index into the insertion point.
   if (insertionPoint) {
     nsCOMArray<nsIContent>& matchedNodes = insertionPoint->MatchedNodes();
     // Find the appropriate position in the matched node list for the
     // newly distributed content.
     bool isIndexFound = false;
-    MOZ_ASSERT(mPoolHost, "Where did the content come from if there is no pool host?");
-    ExplicitChildIterator childIterator(mPoolHost);
+    ExplicitChildIterator childIterator(GetHost());
     for (uint32_t i = 0; i < matchedNodes.Length(); i++) {
       // Seek through the host's explicit children until the inserted content
       // is found or when the current matched node is reached.
       if (childIterator.Seek(aContent, matchedNodes[i])) {
         // aContent was found before the current matched node.
         insertionPoint->InsertMatchedNode(i, aContent);
         isIndexFound = true;
         break;
@@ -316,42 +297,23 @@ ShadowRoot::DistributeSingleNode(nsICont
     if (!isIndexFound) {
       // We have still not found an index in the insertion point,
       // thus it must be at the end.
       MOZ_ASSERT(childIterator.Seek(aContent, nullptr),
                  "Trying to match a node that is not a candidate to be matched");
       insertionPoint->AppendMatchedNode(aContent);
     }
 
-    // Handle the case where the parent of the insertion point is a ShadowRoot
-    // that is projected into the younger ShadowRoot's shadow insertion point.
-    // The node distributed into the insertion point must be reprojected
-    // to the shadow insertion point.
-    if (insertionPoint->GetParent() == this &&
-        mYoungerShadow && mYoungerShadow->GetShadowElement()) {
-      mYoungerShadow->GetShadowElement()->DistributeSingleNode(aContent);
-    }
-
     // Handle the case where the parent of the insertion point has a ShadowRoot.
     // The node distributed into the insertion point must be reprojected to the
     // insertion points of the parent's ShadowRoot.
     ShadowRoot* parentShadow = insertionPoint->GetParent()->GetShadowRoot();
     if (parentShadow) {
       parentShadow->DistributeSingleNode(aContent);
     }
-
-    // Handle the case where the parent of the insertion point is the <shadow>
-    // element. The node distributed into the insertion point must be reprojected
-    // into the older ShadowRoot's insertion points.
-    if (mShadowElement && mShadowElement == insertionPoint->GetParent()) {
-      ShadowRoot* olderShadow = mShadowElement->GetOlderShadowRoot();
-      if (olderShadow) {
-        olderShadow->DistributeSingleNode(aContent);
-      }
-    }
   }
 }
 
 void
 ShadowRoot::RemoveDistributedNode(nsIContent* aContent)
 {
   // Find insertion point containing the content and remove the node.
   for (uint32_t i = 0; i < mInsertionPoints.Length(); i++) {
@@ -363,63 +325,38 @@ ShadowRoot::RemoveDistributedNode(nsICon
         // Removing the matched node will cause fallback content to be
         // used instead. Give up optimization and distribute all nodes.
         DistributeAllNodes();
         return;
       }
 
       mInsertionPoints[i]->RemoveMatchedNode(aContent);
 
-      // Handle the case where the parent of the insertion point is a ShadowRoot
-      // that is projected into the younger ShadowRoot's shadow insertion point.
-      // The removed node needs to be removed from the shadow insertion point.
-      if (mInsertionPoints[i]->GetParent() == this) {
-        if (mYoungerShadow && mYoungerShadow->GetShadowElement()) {
-          mYoungerShadow->GetShadowElement()->RemoveDistributedNode(aContent);
-        }
-      }
-
       // Handle the case where the parent of the insertion point has a ShadowRoot.
       // The removed node needs to be removed from the insertion points of the
       // parent's ShadowRoot.
       ShadowRoot* parentShadow = mInsertionPoints[i]->GetParent()->GetShadowRoot();
       if (parentShadow) {
         parentShadow->RemoveDistributedNode(aContent);
       }
 
-      // Handle the case where the parent of the insertion point is the <shadow>
-      // element. The removed node must be removed from the older ShadowRoot's
-      // insertion points.
-      if (mShadowElement && mShadowElement == mInsertionPoints[i]->GetParent()) {
-        ShadowRoot* olderShadow = mShadowElement->GetOlderShadowRoot();
-        if (olderShadow) {
-          olderShadow->RemoveDistributedNode(aContent);
-        }
-      }
-
       break;
     }
   }
 }
 
 void
 ShadowRoot::DistributeAllNodes()
 {
   // Create node pool.
   nsTArray<nsIContent*> nodePool;
-
-  // Make sure there is a pool host, an older shadow may not have
-  // one if the younger shadow does not have a <shadow> element.
-  if (mPoolHost) {
-    ExplicitChildIterator childIterator(mPoolHost);
-    for (nsIContent* content = childIterator.GetNextChild();
-         content;
-         content = childIterator.GetNextChild()) {
-      nodePool.AppendElement(content);
-    }
+  ExplicitChildIterator childIterator(GetHost());
+  for (nsIContent* content = childIterator.GetNextChild(); content;
+       content = childIterator.GetNextChild()) {
+    nodePool.AppendElement(content);
   }
 
   nsTArray<ShadowRoot*> shadowsToUpdate;
 
   for (uint32_t i = 0; i < mInsertionPoints.Length(); i++) {
     mInsertionPoints[i]->ClearMatchedNodes();
     // Assign matching nodes from node pool.
     for (uint32_t j = 0; j < nodePool.Length(); j++) {
@@ -440,30 +377,16 @@ ShadowRoot::DistributeAllNodes()
     // to the insertion point must be reprojected to the insertion points of the
     // parent's ShadowRoot.
     ShadowRoot* parentShadow = insertionParent->GetShadowRoot();
     if (parentShadow && !shadowsToUpdate.Contains(parentShadow)) {
       shadowsToUpdate.AppendElement(parentShadow);
     }
   }
 
-  // If there is a shadow insertion point in this ShadowRoot, the children
-  // of the shadow insertion point needs to be distributed into the insertion
-  // points of the older ShadowRoot.
-  if (mShadowElement && mOlderShadow) {
-    mOlderShadow->DistributeAllNodes();
-  }
-
-  // If there is a younger ShadowRoot with a shadow insertion point,
-  // then the children of this ShadowRoot needs to be distributed to
-  // the younger ShadowRoot's shadow insertion point.
-  if (mYoungerShadow && mYoungerShadow->GetShadowElement()) {
-    mYoungerShadow->GetShadowElement()->DistributeAllNodes();
-  }
-
   for (uint32_t i = 0; i < shadowsToUpdate.Length(); i++) {
     shadowsToUpdate[i]->DistributeAllNodes();
   }
 }
 
 void
 ShadowRoot::GetInnerHTML(nsAString& aInnerHTML)
 {
@@ -510,81 +433,27 @@ ShadowRoot::StyleSheets()
 {
   if (!mStyleSheetList) {
     mStyleSheetList = new ShadowRootStyleSheetList(this);
   }
 
   return mStyleSheetList;
 }
 
-void
-ShadowRoot::SetShadowElement(HTMLShadowElement* aShadowElement)
-{
-  // If there is already a shadow element point, remove
-  // the projected shadow because it is no longer an insertion
-  // point.
-  if (mShadowElement) {
-    mShadowElement->SetProjectedShadow(nullptr);
-  }
-
-  if (mOlderShadow) {
-    // Nodes for distribution will come from the new shadow element.
-    mOlderShadow->ChangePoolHost(aShadowElement);
-  }
-
-  // Set the new shadow element to project the older ShadowRoot because
-  // it is the current shadow insertion point.
-  mShadowElement = aShadowElement;
-  if (mShadowElement) {
-    mShadowElement->SetProjectedShadow(mOlderShadow);
-  }
-}
-
-void
-ShadowRoot::ChangePoolHost(nsIContent* aNewHost)
-{
-  if (mPoolHost) {
-    mPoolHost->RemoveMutationObserver(this);
-  }
-
-  // Clear the nodes matched to content insertion points
-  // because it is no longer relevant.
-  for (uint32_t i = 0; i < mInsertionPoints.Length(); i++) {
-    mInsertionPoints[i]->ClearMatchedNodes();
-  }
-
-  mPoolHost = aNewHost;
-  if (mPoolHost) {
-    mPoolHost->AddMutationObserver(this);
-  }
-}
-
-bool
-ShadowRoot::IsShadowInsertionPoint(nsIContent* aContent)
-{
-  if (!aContent) {
-    return false;
-  }
-
-  HTMLShadowElement* shadowElem = HTMLShadowElement::FromContent(aContent);
-  return shadowElem && shadowElem->IsInsertionPoint();
-}
-
 /**
  * Returns whether the web components pool population algorithm
  * on the host would contain |aContent|. This function ignores
  * insertion points in the pool, thus should only be used to
  * test nodes that have not yet been distributed.
  */
 bool
 ShadowRoot::IsPooledNode(nsIContent* aContent, nsIContent* aContainer,
                          nsIContent* aHost)
 {
-  if (nsContentUtils::IsContentInsertionPoint(aContent) ||
-      IsShadowInsertionPoint(aContent)) {
+  if (nsContentUtils::IsContentInsertionPoint(aContent)) {
     // Insertion points never end up in the pool.
     return false;
   }
 
   if (aContainer == aHost &&
       nsContentUtils::IsInSameAnonymousTree(aContainer, aContent)) {
     // Children of the host will end up in the pool. We check to ensure
     // that the content is in the same anonymous tree as the container
@@ -607,17 +476,17 @@ ShadowRoot::IsPooledNode(nsIContent* aCo
 void
 ShadowRoot::AttributeChanged(nsIDocument* aDocument,
                              Element* aElement,
                              int32_t aNameSpaceID,
                              nsIAtom* aAttribute,
                              int32_t aModType,
                              const nsAttrValue* aOldValue)
 {
-  if (!IsPooledNode(aElement, aElement->GetParent(), mPoolHost)) {
+  if (!IsPooledNode(aElement, aElement->GetParent(), GetHost())) {
     return;
   }
 
   // Attributes may change insertion point matching, find its new distribution.
   RemoveDistributedNode(aElement);
   DistributeSingleNode(aElement);
 }
 
@@ -640,17 +509,17 @@ ShadowRoot::ContentAppended(nsIDocument*
     // Add insertion point to destination insertion points of fallback content.
     if (nsContentUtils::IsContentInsertionPoint(aContainer)) {
       HTMLContentElement* content = HTMLContentElement::FromContent(aContainer);
       if (content->MatchedNodes().IsEmpty()) {
         currentChild->DestInsertionPoints().AppendElement(aContainer);
       }
     }
 
-    if (IsPooledNode(currentChild, aContainer, mPoolHost)) {
+    if (IsPooledNode(currentChild, aContainer, GetHost())) {
       DistributeSingleNode(currentChild);
     }
 
     currentChild = currentChild->GetNextSibling();
   }
 }
 
 void
@@ -662,17 +531,17 @@ ShadowRoot::ContentInserted(nsIDocument*
   if (mInsertionPointChanged) {
     DistributeAllNodes();
     mInsertionPointChanged = false;
     return;
   }
 
   // Watch for new nodes added to the pool because the node
   // may need to be added to an insertion point.
-  if (IsPooledNode(aChild, aContainer, mPoolHost)) {
+  if (IsPooledNode(aChild, aContainer, GetHost())) {
     // Add insertion point to destination insertion points of fallback content.
     if (nsContentUtils::IsContentInsertionPoint(aContainer)) {
       HTMLContentElement* content = HTMLContentElement::FromContent(aContainer);
       if (content->MatchedNodes().IsEmpty()) {
         aChild->DestInsertionPoints().AppendElement(aContainer);
       }
     }
 
@@ -699,38 +568,29 @@ ShadowRoot::ContentRemoved(nsIDocument* 
     HTMLContentElement* content = HTMLContentElement::FromContent(aContainer);
     if (content->MatchedNodes().IsEmpty()) {
       aChild->DestInsertionPoints().Clear();
     }
   }
 
   // Watch for node that is removed from the pool because
   // it may need to be removed from an insertion point.
-  if (IsPooledNode(aChild, aContainer, mPoolHost)) {
+  if (IsPooledNode(aChild, aContainer, GetHost())) {
     RemoveDistributedNode(aChild);
   }
 }
 
 nsresult
 ShadowRoot::Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult,
                   bool aPreallocateChildren) const
 {
   *aResult = nullptr;
   return NS_ERROR_DOM_DATA_CLONE_ERR;
 }
 
-void
-ShadowRoot::DestroyContent()
-{
-  if (mOlderShadow) {
-    mOlderShadow->DestroyContent();
-  }
-  DocumentFragment::DestroyContent();
-}
-
 NS_IMPL_CYCLE_COLLECTION_INHERITED(ShadowRootStyleSheetList, StyleSheetList,
                                    mShadowRoot)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(ShadowRootStyleSheetList)
 NS_INTERFACE_MAP_END_INHERITING(StyleSheetList)
 
 NS_IMPL_ADDREF_INHERITED(ShadowRootStyleSheetList, StyleSheetList)
 NS_IMPL_RELEASE_INHERITED(ShadowRootStyleSheetList, StyleSheetList)
--- a/dom/base/ShadowRoot.h
+++ b/dom/base/ShadowRoot.h
@@ -20,61 +20,43 @@ class nsIAtom;
 class nsIContent;
 class nsXBLPrototypeBinding;
 
 namespace mozilla {
 namespace dom {
 
 class Element;
 class HTMLContentElement;
-class HTMLShadowElement;
 class ShadowRootStyleSheetList;
 
 class ShadowRoot final : public DocumentFragment,
                          public nsStubMutationObserver
 {
   friend class ShadowRootStyleSheetList;
 public:
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ShadowRoot,
                                            DocumentFragment)
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED
   NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED
   NS_DECL_NSIMUTATIONOBSERVER_CONTENTINSERTED
   NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED
 
-  ShadowRoot(Element* aElement, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
+  ShadowRoot(Element* aElement,
+             already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
              nsXBLPrototypeBinding* aProtoBinding);
 
   void AddToIdTable(Element* aElement, nsIAtom* aId);
   void RemoveFromIdTable(Element* aElement, nsIAtom* aId);
   void InsertSheet(StyleSheet* aSheet, nsIContent* aLinkingContent);
   void RemoveSheet(StyleSheet* aSheet);
   bool ApplyAuthorStyles();
   void SetApplyAuthorStyles(bool aApplyAuthorStyles);
   StyleSheetList* StyleSheets();
-  HTMLShadowElement* GetShadowElement() { return mShadowElement; }
-
-  /**
-   * Sets the current shadow insertion point where the older
-   * ShadowRoot will be projected.
-   */
-  void SetShadowElement(HTMLShadowElement* aShadowElement);
-
-  /**
-   * Change the node that populates the distribution pool with
-   * its children. This is distinct from the ShadowRoot host described
-   * in the specifications. The ShadowRoot host is the element
-   * which created this ShadowRoot and does not change. The pool host
-   * is the same as the ShadowRoot host if this is the youngest
-   * ShadowRoot. If this is an older ShadowRoot, the pool host is
-   * the <shadow> element in the younger ShadowRoot (if it exists).
-   */
-  void ChangePoolHost(nsIContent* aNewHost);
 
   /**
    * Distributes a single explicit child of the pool host to the content
    * insertion points in this ShadowRoot.
    */
   void DistributeSingleNode(nsIContent* aContent);
 
   /**
@@ -87,98 +69,69 @@ public:
    * Distributes all the explicit children of the pool host to the content
    * insertion points in this ShadowRoot.
    */
   void DistributeAllNodes();
 
   void AddInsertionPoint(HTMLContentElement* aInsertionPoint);
   void RemoveInsertionPoint(HTMLContentElement* aInsertionPoint);
 
-  void SetYoungerShadow(ShadowRoot* aYoungerShadow);
-  ShadowRoot* GetYoungerShadowRoot() { return mYoungerShadow; }
   void SetInsertionPointChanged() { mInsertionPointChanged = true; }
 
   void SetAssociatedBinding(nsXBLBinding* aBinding) { mAssociatedBinding = aBinding; }
 
-  nsISupports* GetParentObject() const { return mPoolHost; }
-
-  nsIContent* GetPoolHost() { return mPoolHost; }
-  nsTArray<HTMLShadowElement*>& ShadowDescendants() { return mShadowDescendants; }
-
   JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   static bool IsPooledNode(nsIContent* aChild, nsIContent* aContainer,
                            nsIContent* aHost);
   static ShadowRoot* FromNode(nsINode* aNode);
-  static bool IsShadowInsertionPoint(nsIContent* aContent);
 
   static void RemoveDestInsertionPoint(nsIContent* aInsertionPoint,
                                        nsTArray<nsIContent*>& aDestInsertionPoints);
 
   // WebIDL methods.
   Element* GetElementById(const nsAString& aElementId);
   already_AddRefed<nsContentList>
     GetElementsByTagName(const nsAString& aNamespaceURI);
   already_AddRefed<nsContentList>
     GetElementsByTagNameNS(const nsAString& aNamespaceURI,
                            const nsAString& aLocalName);
   already_AddRefed<nsContentList>
     GetElementsByClassName(const nsAString& aClasses);
   void GetInnerHTML(nsAString& aInnerHTML);
   void SetInnerHTML(const nsAString& aInnerHTML, ErrorResult& aError);
   Element* Host();
-  ShadowRoot* GetOlderShadowRoot() { return mOlderShadow; }
   void StyleSheetChanged();
 
   bool IsComposedDocParticipant() { return mIsComposedDocParticipant; }
   void SetIsComposedDocParticipant(bool aIsComposedDocParticipant)
   {
     mIsComposedDocParticipant = aIsComposedDocParticipant;
   }
 
-  virtual void DestroyContent() override;
 protected:
   virtual ~ShadowRoot();
 
-  // The pool host is the parent of the nodes that will be distributed
-  // into the insertion points in this ShadowRoot. See |ChangeShadowRoot|.
-  nsCOMPtr<nsIContent> mPoolHost;
-
   // An array of content insertion points that are a descendant of the ShadowRoot
   // sorted in tree order. Insertion points are responsible for notifying
   // the ShadowRoot when they are removed or added as a descendant. The insertion
   // points are kept alive by the parent node, thus weak references are held
   // by the array.
   nsTArray<HTMLContentElement*> mInsertionPoints;
 
-  // An array of the <shadow> elements that are descendant of the ShadowRoot
-  // sorted in tree order. Only the first may be a shadow insertion point.
-  nsTArray<HTMLShadowElement*> mShadowDescendants;
-
   nsTHashtable<nsIdentifierMapEntry> mIdentifierMap;
   nsXBLPrototypeBinding* mProtoBinding;
 
   // It is necessary to hold a reference to the associated nsXBLBinding
   // because the binding holds a reference on the nsXBLDocumentInfo that
   // owns |mProtoBinding|.
   RefPtr<nsXBLBinding> mAssociatedBinding;
 
   RefPtr<ShadowRootStyleSheetList> mStyleSheetList;
 
-  // The current shadow insertion point of this ShadowRoot.
-  HTMLShadowElement* mShadowElement;
-
-  // The ShadowRoot that was created by the host element before
-  // this ShadowRoot was created.
-  RefPtr<ShadowRoot> mOlderShadow;
-
-  // The ShadowRoot that was created by the host element after
-  // this ShadowRoot was created.
-  RefPtr<ShadowRoot> mYoungerShadow;
-
   // A boolean that indicates that an insertion point was added or removed
   // from this ShadowRoot and that the nodes need to be redistributed into
   // the insertion points. After this flag is set, nodes will be distributed
   // on the next mutation event.
   bool mInsertionPointChanged;
 
   // Flag to indicate whether the descendants of this shadow root are part of the
   // composed document. Ideally, we would use a node flag on nodes to
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -45,17 +45,16 @@
 #include "mozilla/dom/DOMTypes.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/ElementInlines.h"
 #include "mozilla/dom/FileSystemSecurity.h"
 #include "mozilla/dom/FileBlobImpl.h"
 #include "mozilla/dom/HTMLInputElement.h"
 #include "mozilla/dom/HTMLTemplateElement.h"
 #include "mozilla/dom/HTMLContentElement.h"
-#include "mozilla/dom/HTMLShadowElement.h"
 #include "mozilla/dom/IPCBlobUtils.h"
 #include "mozilla/dom/Promise.h"
 #include "mozilla/dom/ScriptSettings.h"
 #include "mozilla/dom/TabParent.h"
 #include "mozilla/dom/TouchEvent.h"
 #include "mozilla/dom/ShadowRoot.h"
 #include "mozilla/dom/XULCommandEvent.h"
 #include "mozilla/dom/WorkerPrivate.h"
@@ -7562,30 +7561,16 @@ nsContentUtils::HasDistributedChildren(n
   }
 
   if (aContent->GetShadowRoot()) {
     // Children of a shadow root host are distributed
     // to content insertion points in the shadow root.
     return true;
   }
 
-  ShadowRoot* shadow = ShadowRoot::FromNode(aContent);
-  if (shadow) {
-    // Children of a shadow root are distributed to
-    // the shadow insertion point of the younger shadow root.
-    return shadow->GetYoungerShadowRoot();
-  }
-
-  HTMLShadowElement* shadowEl = HTMLShadowElement::FromContent(aContent);
-  if (shadowEl && shadowEl->IsInsertionPoint()) {
-    // Children of a shadow insertion points are distributed
-    // to the insertion points in the older shadow root.
-    return shadowEl->GetOlderShadowRoot();
-  }
-
   HTMLContentElement* contentEl = HTMLContentElement::FromContent(aContent);
   if (contentEl && contentEl->IsInsertionPoint()) {
     // Children of a content insertion point are distributed to the
     // content insertion point if the content insertion point does
     // not match any nodes (fallback content).
     return contentEl->MatchedNodes().IsEmpty();
   }
 
--- a/dom/base/nsGkAtomList.h
+++ b/dom/base/nsGkAtomList.h
@@ -1655,17 +1655,16 @@ GK_ATOM(requiredExtensions, "requiredExt
 GK_ATOM(requiredFeatures, "requiredFeatures")
 GK_ATOM(rotate, "rotate")
 GK_ATOM(rx, "rx")
 GK_ATOM(ry, "ry")
 GK_ATOM(saturate, "saturate")
 GK_ATOM(saturation, "saturation")
 GK_ATOM(set, "set")
 GK_ATOM(seed, "seed")
-GK_ATOM(shadow, "shadow")
 GK_ATOM(shape_rendering, "shape-rendering")
 GK_ATOM(skewX, "skewX")
 GK_ATOM(skewY, "skewY")
 GK_ATOM(slope, "slope")
 GK_ATOM(softLight, "soft-light")
 GK_ATOM(spacing, "spacing")
 GK_ATOM(spacingAndGlyphs, "spacingAndGlyphs")
 GK_ATOM(specularConstant, "specularConstant")
--- a/dom/base/nsNodeUtils.cpp
+++ b/dom/base/nsNodeUtils.cpp
@@ -61,17 +61,17 @@ using mozilla::AutoJSContext;
       /* No need to explicitly notify the first observer first    \
          since that'll happen anyway. */                          \
       NS_OBSERVER_AUTO_ARRAY_NOTIFY_OBSERVERS(                    \
         slots->mMutationObservers, nsIMutationObserver, 1,        \
         func_, params_);                                          \
     }                                                             \
     ShadowRoot* shadow = ShadowRoot::FromNode(node);              \
     if (shadow) {                                                 \
-      node = shadow->GetPoolHost();                               \
+      node = shadow->GetHost();                                   \
     } else {                                                      \
       node = node->GetParentNode();                               \
     }                                                             \
   } while (node);                                                 \
   if (needsEnterLeave) {                                          \
     nsDOMMutationObserver::LeaveMutationHandling();               \
   }                                                               \
   PR_END_MACRO
@@ -89,17 +89,17 @@ using mozilla::AutoJSContext;
       /* No need to explicitly notify the first observer first    \
          since that'll happen anyway. */                          \
       NS_OBSERVER_AUTO_ARRAY_NOTIFY_OBSERVERS_WITH_QI(            \
         slots->mMutationObservers, nsIMutationObserver, 1,        \
         nsIAnimationObserver, func_, params_);                    \
     }                                                             \
     ShadowRoot* shadow = ShadowRoot::FromNode(node);              \
     if (shadow) {                                                 \
-      node = shadow->GetPoolHost();                               \
+      node = shadow->GetHost();                                   \
     } else {                                                      \
       node = node->GetParentNode();                               \
     }                                                             \
   } while (node);                                                 \
   if (needsEnterLeave) {                                          \
     nsDOMMutationObserver::LeaveMutationHandling();               \
   }                                                               \
   PR_END_MACRO
--- a/dom/base/test/test_mutationobservers.html
+++ b/dom/base/test/test_mutationobservers.html
@@ -582,58 +582,32 @@ function testOutsideShadowDOM() {
          "because createShadowRoot is not supported");
     then(testMarquee);
     return;
   }
   var m = new M(function(records, observer) {
     is(records.length, 1);
     is(records[0].type, "attributes", "Should have got attributes");
     observer.disconnect();
-    then(testInsideShadowDOM);
+    then(testMarquee);
   });
   m.observe(div, {
       attributes: true,
       childList: true,
       characterData: true,
       subtree: true
     })
   var sr = div.createShadowRoot();
   sr.innerHTML = "<div" + ">text</" + "div>";
   sr.firstChild.setAttribute("foo", "bar");
   sr.firstChild.firstChild.data = "text2";
   sr.firstChild.appendChild(document.createElement("div"));
   div.setAttribute("foo", "bar");
 }
 
-function testInsideShadowDOM() {
-  var m = new M(function(records, observer) {
-    is(records.length, 4);
-    is(records[0].type, "childList");
-    is(records[1].type, "attributes");
-    is(records[2].type, "characterData");
-    is(records[3].type, "childList");
-    observer.disconnect();
-    then(testMarquee);
-  });
-  var sr = div.createShadowRoot();
-  m.observe(sr, {
-      attributes: true,
-      childList: true,
-      characterData: true,
-      subtree: true
-    });
-
-  sr.innerHTML = "<div" + ">text</" + "div>";
-  sr.firstChild.setAttribute("foo", "bar");
-  sr.firstChild.firstChild.data = "text2";
-  sr.firstChild.appendChild(document.createElement("div"));
-  div.setAttribute("foo", "bar2");
-
-}
-
 function testMarquee() {
   var m = new M(function(records, observer) {
     is(records.length, 1);
     is(records[0].type, "attributes");
     is(records[0].attributeName, "ok");
     is(records[0].oldValue, null);
     observer.disconnect();
     then(testStyleCreate);
deleted file mode 100644
--- a/dom/html/HTMLShadowElement.cpp
+++ /dev/null
@@ -1,373 +0,0 @@
-/* -*- 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/dom/ShadowRoot.h"
-
-#include "ChildIterator.h"
-#include "nsContentUtils.h"
-#include "nsDocument.h"
-#include "mozilla/dom/HTMLShadowElement.h"
-#include "mozilla/dom/HTMLUnknownElement.h"
-#include "mozilla/dom/HTMLShadowElementBinding.h"
-
-// Expand NS_IMPL_NS_NEW_HTML_ELEMENT(Shadow) to add check for web components
-// being enabled.
-nsGenericHTMLElement*
-NS_NewHTMLShadowElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
-                        mozilla::dom::FromParser aFromParser)
-{
-  // When this check is removed, remove the nsDocument.h and
-  // HTMLUnknownElement.h includes.  Also remove nsINode::IsHTMLShadowElement.
-  //
-  // We have to jump through some hoops to be able to produce both NodeInfo* and
-  // already_AddRefed<NodeInfo>& for our callees.
-  RefPtr<mozilla::dom::NodeInfo> nodeInfo(aNodeInfo);
-  if (!nsDocument::IsWebComponentsEnabled(nodeInfo)) {
-    already_AddRefed<mozilla::dom::NodeInfo> nodeInfoArg(nodeInfo.forget());
-    return new mozilla::dom::HTMLUnknownElement(nodeInfoArg);
-  }
-
-  already_AddRefed<mozilla::dom::NodeInfo> nodeInfoArg(nodeInfo.forget());
-  return new mozilla::dom::HTMLShadowElement(nodeInfoArg);
-}
-
-using namespace mozilla::dom;
-
-HTMLShadowElement::HTMLShadowElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
-  : nsGenericHTMLElement(aNodeInfo), mIsInsertionPoint(false)
-{
-}
-
-HTMLShadowElement::~HTMLShadowElement()
-{
-  if (mProjectedShadow) {
-    mProjectedShadow->RemoveMutationObserver(this);
-  }
-}
-
-NS_IMPL_CYCLE_COLLECTION_CLASS(HTMLShadowElement)
-
-NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(HTMLShadowElement,
-                                                  nsGenericHTMLElement)
-  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mProjectedShadow)
-NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(HTMLShadowElement,
-                                                nsGenericHTMLElement)
-  if (tmp->mProjectedShadow) {
-    tmp->mProjectedShadow->RemoveMutationObserver(tmp);
-    tmp->mProjectedShadow = nullptr;
-  }
-NS_IMPL_CYCLE_COLLECTION_UNLINK_END
-
-NS_IMPL_ADDREF_INHERITED(HTMLShadowElement, Element)
-NS_IMPL_RELEASE_INHERITED(HTMLShadowElement, Element)
-
-NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(HTMLShadowElement)
-NS_INTERFACE_MAP_END_INHERITING(nsGenericHTMLElement)
-
-NS_IMPL_ELEMENT_CLONE(HTMLShadowElement)
-
-JSObject*
-HTMLShadowElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
-{
-  return HTMLShadowElementBinding::Wrap(aCx, this, aGivenProto);
-}
-
-void
-HTMLShadowElement::SetProjectedShadow(ShadowRoot* aProjectedShadow)
-{
-  if (mProjectedShadow) {
-    mProjectedShadow->RemoveMutationObserver(this);
-
-    // The currently projected ShadowRoot is going away,
-    // thus the destination insertion points need to be updated.
-    ExplicitChildIterator childIterator(mProjectedShadow);
-    for (nsIContent* content = childIterator.GetNextChild();
-         content;
-         content = childIterator.GetNextChild()) {
-      ShadowRoot::RemoveDestInsertionPoint(this, content->DestInsertionPoints());
-    }
-  }
-
-  mProjectedShadow = aProjectedShadow;
-  if (mProjectedShadow) {
-    // A new ShadowRoot is being projected, thus its explcit
-    // children will be distributed to this shadow insertion point.
-    ExplicitChildIterator childIterator(mProjectedShadow);
-    for (nsIContent* content = childIterator.GetNextChild();
-         content;
-         content = childIterator.GetNextChild()) {
-      content->DestInsertionPoints().AppendElement(this);
-    }
-
-    // Watch for mutations on the projected shadow because
-    // it affects the nodes that are distributed to this shadow
-    // insertion point.
-    mProjectedShadow->AddMutationObserver(this);
-  }
-}
-
-static bool
-IsInFallbackContent(nsIContent* aContent)
-{
-  nsINode* parentNode = aContent->GetParentNode();
-  while (parentNode) {
-    if (parentNode->IsHTMLElement(nsGkAtoms::content)) {
-      return true;
-    }
-    parentNode = parentNode->GetParentNode();
-  }
-
-  return false;
-}
-
-nsresult
-HTMLShadowElement::BindToTree(nsIDocument* aDocument,
-                              nsIContent* aParent,
-                              nsIContent* aBindingParent,
-                              bool aCompileEventHandlers)
-{
-  RefPtr<ShadowRoot> oldContainingShadow = GetContainingShadow();
-
-  nsresult rv = nsGenericHTMLElement::BindToTree(aDocument, aParent,
-                                                 aBindingParent,
-                                                 aCompileEventHandlers);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  ShadowRoot* containingShadow = GetContainingShadow();
-  if (containingShadow && !oldContainingShadow) {
-    // Keep track of all descendant <shadow> elements in tree order so
-    // that when the current shadow insertion point is removed, the next
-    // one can be found quickly.
-    TreeOrderComparator comparator;
-    containingShadow->ShadowDescendants().InsertElementSorted(this, comparator);
-
-    if (containingShadow->ShadowDescendants()[0] != this) {
-      // Only the first <shadow> (in tree order) of a ShadowRoot can be an insertion point.
-      return NS_OK;
-    }
-
-    if (IsInFallbackContent(this)) {
-      // If the first shadow element in tree order is invalid (in fallback content),
-      // the containing ShadowRoot will not have a shadow insertion point.
-      containingShadow->SetShadowElement(nullptr);
-    } else {
-      mIsInsertionPoint = true;
-      containingShadow->SetShadowElement(this);
-    }
-
-    containingShadow->SetInsertionPointChanged();
-  }
-
-  if (mIsInsertionPoint && containingShadow) {
-    // Propagate BindToTree calls to projected shadow root children.
-    ShadowRoot* projectedShadow = containingShadow->GetOlderShadowRoot();
-    if (projectedShadow) {
-      projectedShadow->SetIsComposedDocParticipant(IsInComposedDoc());
-
-      for (nsIContent* child = projectedShadow->GetFirstChild(); child;
-           child = child->GetNextSibling()) {
-        rv = child->BindToTree(nullptr, projectedShadow,
-                               projectedShadow->GetBindingParent(),
-                               aCompileEventHandlers);
-        NS_ENSURE_SUCCESS(rv, rv);
-      }
-    }
-  }
-
-  return NS_OK;
-}
-
-void
-HTMLShadowElement::UnbindFromTree(bool aDeep, bool aNullParent)
-{
-  RefPtr<ShadowRoot> oldContainingShadow = GetContainingShadow();
-
-  if (mIsInsertionPoint && oldContainingShadow) {
-    // Propagate UnbindFromTree call to previous projected shadow
-    // root children.
-    ShadowRoot* projectedShadow = oldContainingShadow->GetOlderShadowRoot();
-    if (projectedShadow) {
-      for (nsIContent* child = projectedShadow->GetFirstChild(); child;
-           child = child->GetNextSibling()) {
-        child->UnbindFromTree(true, false);
-      }
-
-      projectedShadow->SetIsComposedDocParticipant(false);
-    }
-  }
-
-  nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
-
-  if (oldContainingShadow && !GetContainingShadow() && mIsInsertionPoint) {
-    nsTArray<HTMLShadowElement*>& shadowDescendants =
-      oldContainingShadow->ShadowDescendants();
-    shadowDescendants.RemoveElement(this);
-    oldContainingShadow->SetShadowElement(nullptr);
-
-    // Find the next shadow insertion point.
-    if (shadowDescendants.Length() > 0 &&
-        !IsInFallbackContent(shadowDescendants[0])) {
-      oldContainingShadow->SetShadowElement(shadowDescendants[0]);
-    }
-
-    oldContainingShadow->SetInsertionPointChanged();
-
-    mIsInsertionPoint = false;
-  }
-}
-
-void
-HTMLShadowElement::DistributeSingleNode(nsIContent* aContent)
-{
-  if (aContent->DestInsertionPoints().Contains(this)) {
-    // Node has already been distrbuted this this node,
-    // we are done.
-    return;
-  }
-
-  aContent->DestInsertionPoints().AppendElement(this);
-
-  // Handle the case where the shadow element is a child of
-  // a node with a ShadowRoot. The nodes that have been distributed to
-  // this shadow insertion point will need to be reprojected into the
-  // insertion points of the parent's ShadowRoot.
-  ShadowRoot* parentShadowRoot = GetParent()->GetShadowRoot();
-  if (parentShadowRoot) {
-    parentShadowRoot->DistributeSingleNode(aContent);
-    return;
-  }
-
-  // Handle the case where the parent of this shadow element is a ShadowRoot
-  // that is projected into a shadow insertion point in the younger ShadowRoot.
-  ShadowRoot* containingShadow = GetContainingShadow();
-  ShadowRoot* youngerShadow = containingShadow->GetYoungerShadowRoot();
-  if (youngerShadow && GetParent() == containingShadow) {
-    HTMLShadowElement* youngerShadowElement = youngerShadow->GetShadowElement();
-    if (youngerShadowElement) {
-      youngerShadowElement->DistributeSingleNode(aContent);
-    }
-  }
-}
-
-void
-HTMLShadowElement::RemoveDistributedNode(nsIContent* aContent)
-{
-  ShadowRoot::RemoveDestInsertionPoint(this, aContent->DestInsertionPoints());
-
-  // Handle the case where the shadow element is a child of
-  // a node with a ShadowRoot. The nodes that have been distributed to
-  // this shadow insertion point will need to be removed from the
-  // insertion points of the parent's ShadowRoot.
-  ShadowRoot* parentShadowRoot = GetParent()->GetShadowRoot();
-  if (parentShadowRoot) {
-    parentShadowRoot->RemoveDistributedNode(aContent);
-    return;
-  }
-
-  // Handle the case where the parent of this shadow element is a ShadowRoot
-  // that is projected into a shadow insertion point in the younger ShadowRoot.
-  ShadowRoot* containingShadow = GetContainingShadow();
-  ShadowRoot* youngerShadow = containingShadow->GetYoungerShadowRoot();
-  if (youngerShadow && GetParent() == containingShadow) {
-    HTMLShadowElement* youngerShadowElement = youngerShadow->GetShadowElement();
-    if (youngerShadowElement) {
-      youngerShadowElement->RemoveDistributedNode(aContent);
-    }
-  }
-}
-
-void
-HTMLShadowElement::DistributeAllNodes()
-{
-  // All the explicit children of the projected ShadowRoot are distributed
-  // into this shadow insertion point so update the destination insertion
-  // points.
-  ShadowRoot* containingShadow = GetContainingShadow();
-  ShadowRoot* olderShadow = containingShadow->GetOlderShadowRoot();
-  if (olderShadow) {
-    ExplicitChildIterator childIterator(olderShadow);
-    for (nsIContent* content = childIterator.GetNextChild();
-         content;
-         content = childIterator.GetNextChild()) {
-      ShadowRoot::RemoveDestInsertionPoint(this, content->DestInsertionPoints());
-      content->DestInsertionPoints().AppendElement(this);
-    }
-  }
-
-  // Handle the case where the shadow element is a child of
-  // a node with a ShadowRoot. The nodes that have been distributed to
-  // this shadow insertion point will need to be reprojected into the
-  // insertion points of the parent's ShadowRoot.
-  ShadowRoot* parentShadowRoot = GetParent()->GetShadowRoot();
-  if (parentShadowRoot) {
-    parentShadowRoot->DistributeAllNodes();
-    return;
-  }
-
-  // Handle the case where the parent of this shadow element is a ShadowRoot
-  // that is projected into a shadow insertion point in the younger ShadowRoot.
-  ShadowRoot* youngerShadow = containingShadow->GetYoungerShadowRoot();
-  if (youngerShadow && GetParent() == containingShadow) {
-    HTMLShadowElement* youngerShadowElement = youngerShadow->GetShadowElement();
-    if (youngerShadowElement) {
-      youngerShadowElement->DistributeAllNodes();
-    }
-  }
-}
-
-void
-HTMLShadowElement::ContentAppended(nsIDocument* aDocument,
-                                   nsIContent* aContainer,
-                                   nsIContent* aFirstNewContent,
-                                   int32_t aNewIndexInContainer)
-{
-  // Watch for content appended to the projected shadow (the ShadowRoot that
-  // will be rendered in place of this shadow insertion point) because the
-  // nodes may need to be distributed into other insertion points.
-  nsIContent* currentChild = aFirstNewContent;
-  while (currentChild) {
-    if (ShadowRoot::IsPooledNode(currentChild, aContainer, mProjectedShadow)) {
-      DistributeSingleNode(currentChild);
-    }
-    currentChild = currentChild->GetNextSibling();
-  }
-}
-
-void
-HTMLShadowElement::ContentInserted(nsIDocument* aDocument,
-                                   nsIContent* aContainer,
-                                   nsIContent* aChild,
-                                   int32_t aIndexInContainer)
-{
-  // Watch for content appended to the projected shadow (the ShadowRoot that
-  // will be rendered in place of this shadow insertion point) because the
-  // nodes may need to be distributed into other insertion points.
-  if (!ShadowRoot::IsPooledNode(aChild, aContainer, mProjectedShadow)) {
-    return;
-  }
-
-  DistributeSingleNode(aChild);
-}
-
-void
-HTMLShadowElement::ContentRemoved(nsIDocument* aDocument,
-                                  nsIContent* aContainer,
-                                  nsIContent* aChild,
-                                  int32_t aIndexInContainer,
-                                  nsIContent* aPreviousSibling)
-{
-  // Watch for content removed from the projected shadow (the ShadowRoot that
-  // will be rendered in place of this shadow insertion point) because the
-  // nodes may need to be removed from other insertion points.
-  if (!ShadowRoot::IsPooledNode(aChild, aContainer, mProjectedShadow)) {
-    return;
-  }
-
-  RemoveDistributedNode(aChild);
-}
-
deleted file mode 100644
--- a/dom/html/HTMLShadowElement.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- 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_HTMLShadowElement_h__
-#define mozilla_dom_HTMLShadowElement_h__
-
-#include "nsGenericHTMLElement.h"
-
-namespace mozilla {
-namespace dom {
-
-class HTMLShadowElement final : public nsGenericHTMLElement,
-                                public nsStubMutationObserver
-{
-public:
-  explicit HTMLShadowElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
-
-  // nsISupports
-  NS_DECL_ISUPPORTS_INHERITED
-
-  NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED
-  NS_DECL_NSIMUTATIONOBSERVER_CONTENTINSERTED
-  NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED
-
-  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(HTMLShadowElement,
-                                           nsGenericHTMLElement)
-
-  static HTMLShadowElement* FromContent(nsIContent* aContent)
-  {
-    if (aContent->IsHTMLShadowElement()) {
-      return static_cast<HTMLShadowElement*>(aContent);
-    }
-
-    return nullptr;
-  }
-
-  virtual bool IsHTMLShadowElement() const override { return true; }
-
-  virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult,
-                         bool aPreallocateChildren) const override;
-
-  virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
-                              nsIContent* aBindingParent,
-                              bool aCompileEventHandlers) override;
-
-  virtual void UnbindFromTree(bool aDeep = true,
-                              bool aNullParent = true) override;
-
-  bool IsInsertionPoint() { return mIsInsertionPoint; }
-
-  /**
-   * Sets the ShadowRoot that will be rendered in place of
-   * this shadow insertion point.
-   */
-  void SetProjectedShadow(ShadowRoot* aProjectedShadow);
-
-  /**
-   * Distributes a single explicit child of the projected ShadowRoot
-   * to relevant insertion points.
-   */
-  void DistributeSingleNode(nsIContent* aContent);
-
-  /**
-   * Removes a single explicit child of the projected ShadowRoot
-   * from relevant insertion points.
-   */
-  void RemoveDistributedNode(nsIContent* aContent);
-
-  /**
-   * Distributes all the explicit children of the projected ShadowRoot
-   * to the shadow insertion point in the younger ShadowRoot and
-   * the content insertion point of the parent node's ShadowRoot.
-   */
-  void DistributeAllNodes();
-
-  // WebIDL methods.
-  ShadowRoot* GetOlderShadowRoot() { return mProjectedShadow; }
-
-protected:
-  virtual ~HTMLShadowElement();
-
-  virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override;
-
-  // The ShadowRoot that will be rendered in place of this shadow insertion point.
-  RefPtr<ShadowRoot> mProjectedShadow;
-
-  bool mIsInsertionPoint;
-};
-
-} // namespace dom
-} // namespace mozilla
-
-#endif // mozilla_dom_HTMLShadowElement_h__
-
--- a/dom/html/moz.build
+++ b/dom/html/moz.build
@@ -90,17 +90,16 @@ EXPORTS.mozilla.dom += [
     'HTMLOptionsCollection.h',
     'HTMLOutputElement.h',
     'HTMLParagraphElement.h',
     'HTMLPictureElement.h',
     'HTMLPreElement.h',
     'HTMLProgressElement.h',
     'HTMLScriptElement.h',
     'HTMLSelectElement.h',
-    'HTMLShadowElement.h',
     'HTMLSharedElement.h',
     'HTMLSharedListElement.h',
     'HTMLSourceElement.h',
     'HTMLSpanElement.h',
     'HTMLStyleElement.h',
     'HTMLSummaryElement.h',
     'HTMLTableCaptionElement.h',
     'HTMLTableCellElement.h',
@@ -170,17 +169,16 @@ UNIFIED_SOURCES += [
     'HTMLOptionsCollection.cpp',
     'HTMLOutputElement.cpp',
     'HTMLParagraphElement.cpp',
     'HTMLPictureElement.cpp',
     'HTMLPreElement.cpp',
     'HTMLProgressElement.cpp',
     'HTMLScriptElement.cpp',
     'HTMLSelectElement.cpp',
-    'HTMLShadowElement.cpp',
     'HTMLSharedElement.cpp',
     'HTMLSharedListElement.cpp',
     'HTMLSourceElement.cpp',
     'HTMLSpanElement.cpp',
     'HTMLStyleElement.cpp',
     'HTMLSummaryElement.cpp',
     'HTMLTableCaptionElement.cpp',
     'HTMLTableCellElement.cpp',
--- a/dom/html/nsGenericHTMLElement.h
+++ b/dom/html/nsGenericHTMLElement.h
@@ -1576,17 +1576,16 @@ NS_DECLARE_NS_NEW_HTML_ELEMENT(OptGroup)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Option)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Output)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Paragraph)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Picture)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Pre)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Progress)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Script)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Select)
-NS_DECLARE_NS_NEW_HTML_ELEMENT(Shadow)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Source)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Span)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Style)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Summary)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(TableCaption)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(TableCell)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(TableCol)
 NS_DECLARE_NS_NEW_HTML_ELEMENT(Table)
--- a/dom/html/nsGenericHTMLFrameElement.cpp
+++ b/dom/html/nsGenericHTMLFrameElement.cpp
@@ -19,16 +19,17 @@
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIPermissionManager.h"
 #include "nsIPresShell.h"
 #include "nsIScrollable.h"
 #include "nsPresContext.h"
 #include "nsServiceManagerUtils.h"
 #include "nsSubDocumentFrame.h"
 #include "nsXULElement.h"
+#include "nsAttrValueOrString.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(nsGenericHTMLFrameElement)
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(nsGenericHTMLFrameElement,
                                                   nsGenericHTMLElement)
--- a/dom/html/nsHTMLContentSink.cpp
+++ b/dom/html/nsHTMLContentSink.cpp
@@ -25,16 +25,17 @@
 #include "mozilla/dom/NodeInfo.h"
 #include "mozilla/dom/ScriptLoader.h"
 #include "nsIAppShell.h"
 #include "nsCRT.h"
 #include "prtime.h"
 #include "mozilla/Logging.h"
 #include "nsNodeUtils.h"
 #include "nsIContent.h"
+#include "mozilla/dom/CustomElementRegistry.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/Preferences.h"
 
 #include "nsGenericHTMLElement.h"
 
 #include "nsIDOMDocument.h"
 #include "nsIDOMDocumentType.h"
 #include "nsIScriptElement.h"
--- a/dom/tests/mochitest/general/test_interfaces.js
+++ b/dom/tests/mochitest/general/test_interfaces.js
@@ -509,18 +509,16 @@ var interfaceNamesInGlobalScope =
     "HTMLProgressElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "HTMLQuoteElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "HTMLScriptElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "HTMLSelectElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
-    {name: "HTMLShadowElement", stylo: false},
-// IMPORTANT: Do not change this list without review from a DOM peer!
     "HTMLSourceElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "HTMLSpanElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "HTMLStyleElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "HTMLTableCaptionElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
--- a/dom/tests/mochitest/webcomponents/mochitest.ini
+++ b/dom/tests/mochitest/webcomponents/mochitest.ini
@@ -28,18 +28,16 @@ skip-if = true || stylo # disabled - See
 [test_custom_element_upgrade.html]
 support-files =
   test_upgrade_page.html
   upgrade_tests.js
 [test_nested_content_element.html]
 skip-if = stylo # bug 1293844
 [test_dest_insertion_points.html]
 skip-if = stylo # bug 1293844
-[test_dest_insertion_points_shadow.html]
-skip-if = stylo # bug 1293844
 [test_fallback_dest_insertion_points.html]
 skip-if = stylo # bug 1293844
 [test_detached_style.html]
 skip-if = stylo # bug 1293844
 [test_dynamic_content_element_matching.html]
 skip-if = stylo # bug 1293844
 [test_document_adoptnode.html]
 skip-if = stylo # bug 1293844
@@ -48,37 +46,29 @@ skip-if = stylo # bug 1293844
 [test_document_register.html]
 [test_document_register_base_queue.html]
 [test_document_register_lifecycle.html]
 skip-if = true # disabled - See bug 1390396
 [test_document_register_parser.html]
 [test_document_register_stack.html]
 skip-if = true # disabled - See bug 1390396
 [test_document_shared_registry.html]
-[test_event_dispatch.html]
-skip-if = stylo # bug 1293844
 [test_event_retarget.html]
 skip-if = stylo # bug 1293844
 [test_event_stopping.html]
 skip-if = stylo # bug 1293844
 [test_template.html]
 [test_template_xhtml.html]
 [test_template_custom_elements.html]
 [test_shadowroot.html]
 skip-if = stylo # bug 1293844
 [test_shadowroot_inert_element.html]
 skip-if = stylo # bug 1293844
-[test_shadowroot_host.html]
-skip-if = stylo # bug 1293844
 [test_shadowroot_style.html]
 skip-if = stylo # bug 1293844
-[test_shadowroot_style_multiple_shadow.html]
-skip-if = stylo # bug 1293844
 [test_shadowroot_style_order.html]
 skip-if = stylo # bug 1293844
-[test_shadowroot_youngershadowroot.html]
-skip-if = stylo # bug 1293844
 [test_style_fallback_content.html]
 skip-if = stylo # bug 1293844
 [test_unresolved_pseudo_class.html]
 [test_link_prefetch.html]
 [test_bug1269155.html]
 skip-if = stylo # bug 1293844
deleted file mode 100644
--- a/dom/tests/mochitest/webcomponents/test_dest_insertion_points_shadow.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=999999
--->
-<head>
-  <meta charset="utf-8">
-  <title>Test for Bug 999999</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.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=999999">Mozilla Bug 999999</a>
-<p id="display"></p>
-<div id="content">
-<div id="shadowhost"></div>
-</div>
-<pre id="test">
-</pre>
-<script type="application/javascript">
-
-/** Test for Bug 999999 **/
-var host = document.getElementById("shadowhost");
-
-// Test destination insertion points of node distributed to shadow element.
-var olderShadowRoot = host.createShadowRoot();
-var youngerShadowRoot = host.createShadowRoot();
-
-var shadowElem = document.createElement("shadow");
-youngerShadowRoot.appendChild(shadowElem);
-
-var span = document.createElement("span");
-olderShadowRoot.appendChild(span);
-
-is(span.getDestinationInsertionPoints().length, 1, "Child of ShadowRoot should be distributed to shadow insertion point.");
-is(span.getDestinationInsertionPoints()[0], shadowElem, "Shadow element should be in destination insertion point list.");
-
-// Test destination insertion points of node removed from tree.
-olderShadowRoot.removeChild(span);
-is(span.getDestinationInsertionPoints().length, 0, "Node removed from tree should no longer be distributed.");
-
-// Test destination insertion points of fallback content being reprojected into a shadow element.
-var content = document.createElement("content");
-var fallback = document.createElement("span");
-
-content.appendChild(fallback);
-olderShadowRoot.appendChild(content);
-
-is(fallback.getDestinationInsertionPoints().length, 2, "The fallback content should have 2 destination insertion points, the parent content and the shadow element to which it is reprojected.");
-is(fallback.getDestinationInsertionPoints()[0], content, "First destination of the fallback content should be the parent content element.");
-is(fallback.getDestinationInsertionPoints()[1], shadowElem, "Second destination of the fallback content should be the shadow element to which the element is reprojected.");
-
-// Test destination insertion points of fallback content being removed from tree.
-content.removeChild(fallback);
-is(fallback.getDestinationInsertionPoints().length, 0, "The content should no longer be distributed to any nodes because it is no longer fallback content.");
-
-// Test destination insertion points of distributed content after removing shadow insertion point.
-var div = document.createElement("div");
-olderShadowRoot.appendChild(div);
-is(div.getDestinationInsertionPoints().length, 1, "Children in older shadow root should be distributed to shadow insertion point.");
-is(div.getDestinationInsertionPoints()[0], shadowElem, "Destination insertion point should include shadow element.");
-
-youngerShadowRoot.removeChild(shadowElem);
-is(div.getDestinationInsertionPoints().length, 0, "Destination insertion points should be empty after removing shadow element.");
-
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/dom/tests/mochitest/webcomponents/test_event_dispatch.html
+++ /dev/null
@@ -1,458 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=887541
--->
-<head>
-  <title>Test for event model in web components</title>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.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=887541">Bug 887541</a>
-<script>
-
-var els = SpecialPowers.Cc["@mozilla.org/eventlistenerservice;1"]
-            .getService(SpecialPowers.Ci.nsIEventListenerService);
-
-function eventListener(e) {
-  eventChain.push(this);
-}
-
-function isEventChain(actual, expected, msg) {
-  is(actual.length, expected.length, msg);
-  for (var i = 0; i < expected.length; i++) {
-    is(actual[i], expected[i], msg + " at " + i);
-  }
-
-  // Check to make sure the event chain matches what we get back from nsIEventListenerService.getEventTargetChainFor
-  if (0 < actual.length) {
-    var chain = els.getEventTargetChainFor(actual[0], true); // Events should be dispatched on actual[0].
-    for (var i = 0; i < expected.length; i++) {
-      ok(SpecialPowers.compare(chain[i], expected[i]), msg + " at " + i + " for nsIEventListenerService");
-    }
-  }
-}
-
-/*
- * Test 1: Test of event dispatch through a basic ShadowRoot with content a insertion point.
- *
- * <div elemOne> ------ <shadow-root shadowOne>
- *        |                        |
- * <div elemTwo>            <span elemThree>
- *                                 |
- *                         <content elemFour>
- */
-
-var elemOne = document.createElement("div");
-elemOne.addEventListener("custom", eventListener);
-
-var elemTwo = document.createElement("div");
-elemTwo.addEventListener("custom", eventListener);
-
-var elemThree = document.createElement("span");
-elemThree.addEventListener("custom", eventListener);
-
-var elemFour = document.createElement("content");
-elemFour.addEventListener("custom", eventListener);
-
-var shadowOne = elemOne.createShadowRoot();
-shadowOne.addEventListener("custom", eventListener);
-
-elemThree.appendChild(elemFour);
-shadowOne.appendChild(elemThree);
-elemOne.appendChild(elemTwo);
-
-var eventChain = [];
-var customEvent = new CustomEvent("custom", { "bubbles" : true, "composed" : true });
-elemTwo.dispatchEvent(customEvent);
-isEventChain(eventChain, [elemTwo, elemFour, elemThree, shadowOne, elemOne], "Event path for test 1 for event dispatched on elemTwo.");
-
-/*
- * Test 2: Test of event dispatch through a nested ShadowRoots with content insertion points.
- *
- * <div elemFive> --- <shadow-root shadowTwo>
- *       |                       |
- * <div elemOne>          <div elemFour> ----- <shadow-root shadowOne>
- *                               |                        |
- *                       <content elemTwo>           <p elemSix>
- *                                                        |
- *                                               <content elemThree>
- */
-
-elemOne = document.createElement("div");
-elemOne.addEventListener("custom", eventListener);
-
-elemTwo = document.createElement("content");
-elemTwo.addEventListener("custom", eventListener);
-
-elemThree = document.createElement("content");
-elemThree.addEventListener("custom", eventListener);
-
-var elemFour = document.createElement("div");
-elemFour.addEventListener("custom", eventListener);
-
-var elemFive = document.createElement("div");
-elemFive.addEventListener("custom", eventListener);
-
-var elemSix = document.createElement("p");
-elemSix.addEventListener("custom", eventListener);
-
-var shadowOne = elemFour.createShadowRoot();
-shadowOne.addEventListener("custom", eventListener);
-
-var shadowTwo = elemFive.createShadowRoot();
-shadowTwo.addEventListener("custom", eventListener);
-
-elemFive.appendChild(elemOne);
-shadowTwo.appendChild(elemFour);
-elemFour.appendChild(elemTwo);
-shadowOne.appendChild(elemSix);
-elemSix.appendChild(elemThree);
-
-eventChain = [];
-customEvent = new CustomEvent("custom", { "bubbles" : true, "composed" : true });
-elemOne.dispatchEvent(customEvent);
-is(elemOne.getDestinationInsertionPoints().length, 2, "yes");
-isEventChain(eventChain, [elemOne, elemThree, elemSix, shadowOne, elemTwo, elemFour, shadowTwo, elemFive], "Event path for test 2 for event dispatched on elemOne.");
-
-/*
- * Test 3: Test of event dispatch through nested ShadowRoot with content insertion points.
- *
- * <div elemOne> ------- <shadow-root shadowOne>
- *        |                        |
- * <span elemTwo>          <span elemThree> ------------ <shadow-root shadowTwo>
- *                                 |                               |
- *                          <span elemFour>                <content elemSix>
- *                                 |
- *                         <content elemFive>
- */
-
-elemOne = document.createElement("div");
-elemOne.addEventListener("custom", eventListener);
-
-elemTwo = document.createElement("span");
-elemTwo.addEventListener("custom", eventListener);
-
-elemThree = document.createElement("span");
-elemThree.addEventListener("custom", eventListener);
-
-elemFour = document.createElement("span");
-elemFour.addEventListener("custom", eventListener);
-
-elemFive = document.createElement("content");
-elemFive.addEventListener("custom", eventListener);
-
-elemSix = document.createElement("content");
-elemSix.addEventListener("custom", eventListener);
-
-shadowOne = elemOne.createShadowRoot();
-shadowOne.addEventListener("custom", eventListener);
-
-shadowTwo = elemThree.createShadowRoot();
-shadowTwo.addEventListener("custom", eventListener);
-
-elemOne.appendChild(elemTwo);
-shadowOne.appendChild(elemThree);
-elemThree.appendChild(elemFour);
-elemFour.appendChild(elemFive);
-shadowTwo.appendChild(elemSix);
-
-eventChain = [];
-customEvent = new CustomEvent("custom", { "bubbles" : true, "composed" : true });
-elemTwo.dispatchEvent(customEvent);
-isEventChain(eventChain, [elemTwo, elemFive, elemFour, elemSix, shadowTwo, elemThree, shadowOne, elemOne], "Event path for test 3 for event dispatched on elemTwo.");
-
-/*
- * Test 4: Test of event dispatch through host with multiple ShadowRoots with shadow insertion point.
- *
- * <div elemSeven> --- <shadow-root shadowTwo> (younger ShadowRoot)
- *       |         |             |
- * <div elemOne>   |      <div elemSix> -------- <shadow-root shadowOne>
- *                 |             |                         |
- *                 |     <shadow elemFour>         <content elemFive>
- *                 |             |
- *                 |     <content elemTwo>
- *                 |
- *                 --- <shadow-root shadowThree> (older ShadowRoot)
- *                         |                |
- *                         |       <content elemThree>
- *                         |
- *                  <div elemEight>
- */
-
-elemOne = document.createElement("div");
-elemOne.addEventListener("custom", eventListener);
-
-elemTwo = document.createElement("content");
-elemTwo.addEventListener("custom", eventListener);
-
-elemThree = document.createElement("content");
-elemThree.addEventListener("custom", eventListener);
-
-elemFour = document.createElement("shadow");
-elemFour.addEventListener("custom", eventListener);
-
-elemFive = document.createElement("content");
-elemFive.addEventListener("custom", eventListener);
-
-elemSix = document.createElement("div");
-elemSix.addEventListener("custom", eventListener);
-
-var elemSeven = document.createElement("div");
-elemSeven.addEventListener("custom", eventListener);
-
-var elemEight = document.createElement("div");
-elemEight.addEventListener("custom", eventListener);
-
-var shadowThree = elemSeven.createShadowRoot();
-shadowThree.addEventListener("custom", eventListener);
-
-shadowTwo = elemSeven.createShadowRoot();
-shadowTwo.addEventListener("custom", eventListener);
-
-shadowOne = elemSix.createShadowRoot();
-shadowOne.addEventListener("custom", eventListener);
-
-elemSeven.appendChild(elemOne);
-shadowTwo.appendChild(elemSix);
-elemSix.appendChild(elemFour);
-elemFour.appendChild(elemTwo);
-shadowThree.appendChild(elemEight);
-shadowThree.appendChild(elemThree);
-shadowOne.appendChild(elemFive);
-
-eventChain = [];
-customEvent = new CustomEvent("custom", { "bubbles" : true, "composed" : true });
-elemOne.dispatchEvent(customEvent);
-isEventChain(eventChain, [elemOne, elemFive, shadowOne, elemThree, shadowThree, elemTwo, elemFour, elemSix, shadowTwo, elemSeven], "Event path for test 4 for event dispatched on elemOne.");
-
-eventChain = [];
-customEvent = new CustomEvent("custom", { "bubbles" : true, "composed" : true });
-elemEight.dispatchEvent(customEvent);
-isEventChain(eventChain, [elemEight, elemFive, shadowOne, elemSix, shadowTwo, elemSeven], "Event path for test 4 for event dispatched on elemEight.");
-
-/*
- * Test 5: Test of event dispatch through nested shadowroot with insertion points that match specific tags.
- *
- * <div elemOne> --------- <shadow-root shadowOne>
- *    |      |                        |
- *    |  <p elemThree>        <span elemFour> ------------------------ <shadow-root shadowTwo>
- *    |                          |       |                                        |
- * <span elemTwo>                |   <content select="p" elemFive>       <content elemSeven>
- *                               |
- *                       <content select="span" elemSix>
- */
-
-elemOne = document.createElement("div");
-elemOne.addEventListener("custom", eventListener);
-
-elemTwo = document.createElement("span");
-elemTwo.addEventListener("custom", eventListener);
-
-elemThree = document.createElement("p");
-elemThree.addEventListener("custom", eventListener);
-
-elemFour = document.createElement("span");
-elemFour.addEventListener("custom", eventListener);
-
-elemFive = document.createElement("content");
-elemFive.select = "p";
-elemFive.addEventListener("custom", eventListener);
-
-elemSix = document.createElement("content");
-elemSix.select = "span";
-elemSix.addEventListener("custom", eventListener);
-
-elemSeven = document.createElement("content");
-elemSeven.addEventListener("custom", eventListener);
-
-shadowTwo = elemFour.createShadowRoot();
-shadowTwo.addEventListener("custom", eventListener);
-
-shadowOne = elemOne.createShadowRoot();
-shadowOne.addEventListener("custom", eventListener);
-
-elemOne.appendChild(elemTwo);
-elemOne.appendChild(elemThree);
-shadowOne.appendChild(elemFour);
-elemFour.appendChild(elemSix);
-elemFour.appendChild(elemFive);
-shadowTwo.appendChild(elemSeven);
-
-eventChain = [];
-customEvent = new CustomEvent("custom", { "bubbles" : true, "composed" : true });
-elemTwo.dispatchEvent(customEvent);
-isEventChain(eventChain, [elemTwo, elemSeven, shadowTwo, elemSix, elemFour, shadowOne, elemOne], "Event path for test 5 for event dispatched on elemTwo.");
-
-eventChain = [];
-customEvent = new CustomEvent("custom", { "bubbles" : true, "composed" : true });
-elemThree.dispatchEvent(customEvent);
-isEventChain(eventChain, [elemThree, elemSeven, shadowTwo, elemFive, elemFour, shadowOne, elemOne], "Event path for test 5 for event dispatched on elemThree.");
-
-/*
- * Test 6: Test of event dispatch through nested shadowroot with insertion points that match specific tags.
- *
- * <div elemOne> --------- <shadow-root shadowOne>;
- *    |      |                        |
- *    |  <p elemThree>         <span elemFour> ------ <shadow-root shadowTwo>
- *    |                               |                   |            |
- * <span elemTwo>            <content elemFive>           |  <content select="p" elemSeven>
- *                                                        |
- *                                                 <content select="span" elemSix>
- */
-
-elemOne = document.createElement("div");
-elemOne.addEventListener("custom", eventListener);
-
-elemTwo = document.createElement("span");
-elemTwo.addEventListener("custom", eventListener);
-
-elemThree = document.createElement("p");
-elemThree.addEventListener("custom", eventListener);
-
-elemFour = document.createElement("span");
-elemFour.addEventListener("custom", eventListener);
-
-elemFive = document.createElement("content");
-elemFive.addEventListener("custom", eventListener);
-
-elemSix = document.createElement("content");
-elemSix.select = "span";
-elemSix.addEventListener("custom", eventListener);
-
-elemSeven = document.createElement("content");
-elemSeven.select = "p";
-elemSeven.addEventListener("custom", eventListener);
-
-shadowTwo = elemFour.createShadowRoot();
-shadowTwo.addEventListener("custom", eventListener);
-
-shadowOne = elemOne.createShadowRoot();
-shadowOne.addEventListener("custom", eventListener);
-
-elemOne.appendChild(elemTwo);
-elemOne.appendChild(elemThree);
-shadowOne.appendChild(elemFour);
-elemFour.appendChild(elemFive);
-shadowTwo.appendChild(elemSix);
-shadowTwo.appendChild(elemSeven);
-
-eventChain = [];
-customEvent = new CustomEvent("custom", { "bubbles" : true, "composed" : true });
-elemTwo.dispatchEvent(customEvent);
-isEventChain(eventChain, [elemTwo, elemSix, shadowTwo, elemFive, elemFour, shadowOne, elemOne], "Event path for test 6 for event dispatched on elemTwo.");
-
-eventChain = [];
-customEvent = new CustomEvent("custom", { "bubbles" : true, "composed" : true });
-elemThree.dispatchEvent(customEvent);
-isEventChain(eventChain, [elemThree, elemSeven, shadowTwo, elemFive, elemFour, shadowOne, elemOne], "Event path for test 6 for event dispatched on elemThree.");
-
-/*
- * Test 7: Test of event dispatch through nested shadowroot with insertion points that match specific tags.
- *
- * <div elemOne> --------- <shadow-root shadowOne>
- *    |      |                        |
- *    |  <p elemThree>         <span elemFour> ------ <shadow-root shadowTwo>
- *    |                               |                         |
- * <span elemTwo>            <content elemFive>           <span elemEight>
- *                                                           |        |
- *                                                           |   <content select="p" elemSeven>
- *                                                           |
- *                                              <content select="span" elemSix>
- */
-
-elemOne = document.createElement("div");
-elemOne.addEventListener("custom", eventListener);
-
-elemTwo = document.createElement("span");
-elemTwo.addEventListener("custom", eventListener);
-
-elemThree = document.createElement("p");
-elemThree.addEventListener("custom", eventListener);
-
-elemFour = document.createElement("span");
-elemFour.addEventListener("custom", eventListener);
-
-elemFive = document.createElement("content");
-elemFive.addEventListener("custom", eventListener);
-
-elemSix = document.createElement("content");
-elemSix.select = "span";
-elemSix.addEventListener("custom", eventListener);
-
-elemSeven = document.createElement("content");
-elemSeven.select = "p";
-elemSeven.addEventListener("custom", eventListener);
-
-elemEight = document.createElement("span");
-elemEight.addEventListener("custom", eventListener);
-
-shadowTwo = elemFour.createShadowRoot();
-shadowTwo.addEventListener("custom", eventListener);
-
-shadowOne = elemOne.createShadowRoot();
-shadowOne.addEventListener("custom", eventListener);
-
-elemOne.appendChild(elemTwo);
-elemOne.appendChild(elemThree);
-shadowOne.appendChild(elemFour);
-elemFour.appendChild(elemFive);
-shadowTwo.appendChild(elemEight);
-elemEight.appendChild(elemSix);
-elemEight.appendChild(elemSeven);
-
-eventChain = [];
-customEvent = new CustomEvent("custom", { "bubbles" : true, "composed" : true });
-elemTwo.dispatchEvent(customEvent);
-isEventChain(eventChain, [elemTwo, elemSix, elemEight, shadowTwo, elemFive, elemFour, shadowOne, elemOne], "Event path for test 7 for event dispatched on elemTwo.");
-
-eventChain = [];
-customEvent = new CustomEvent("custom", { "bubbles" : true, "composed" : true });
-elemThree.dispatchEvent(customEvent);
-isEventChain(eventChain, [elemThree, elemSeven, elemEight, shadowTwo, elemFive, elemFour, shadowOne, elemOne], "Event path for test 7 for event dispatched on elemThree.");
-
-/*
- * Test 8: Test of event dispatch through host with multiple ShadowRoots with shadow insertion point.
- *
- * <div elemOne> --- <shadow-root shadowOne> (younger ShadowRoot)
- *               |             |
- *               |      <div elemFour>
- *               |             |
- *               |     <shadow elemTwo>
- *               |
- *               --- <shadow-root shadowTwo> (older ShadowRoot)
- *                             |
- *                      <div elemThree>
- */
-
-elemOne = document.createElement("div");
-elemOne.addEventListener("custom", eventListener);
-
-elemTwo = document.createElement("shadow");
-elemTwo.addEventListener("custom", eventListener);
-
-elemThree = document.createElement("div");
-elemThree.addEventListener("custom", eventListener);
-
-elemFour = document.createElement("div");
-elemFour.addEventListener("custom", eventListener);
-
-shadowTwo = elemOne.createShadowRoot();
-shadowTwo.addEventListener("custom", eventListener);
-
-shadowOne = elemOne.createShadowRoot();
-shadowOne.addEventListener("custom", eventListener);
-
-shadowOne.appendChild(elemFour);
-elemFour.appendChild(elemTwo);
-shadowTwo.appendChild(elemThree);
-
-eventChain = [];
-customEvent = new CustomEvent("custom", { "bubbles" : true, "composed" : true });
-elemThree.dispatchEvent(customEvent);
-isEventChain(eventChain, [elemThree, shadowTwo, elemTwo, elemFour, shadowOne, elemOne], "Event path for test 8 for event dispatched on elemThree.");
-
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/dom/tests/mochitest/webcomponents/test_shadowroot_host.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=1083587
--->
-<head>
-  <meta charset="utf-8">
-  <title>Test for Bug 1083587</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.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=1083587">Mozilla Bug 1083587</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-<div id="host"></div>
-</div>
-<pre id="test">
-</pre>
-<script type="application/javascript">
-
-/** Test for Bug 1083587 **/
-var hostInDoc = document.getElementById("host");
-var shadowOne = hostInDoc.createShadowRoot();
-is(shadowOne.host, hostInDoc);
-
-var shadowTwo = hostInDoc.createShadowRoot();
-is(shadowOne.host, hostInDoc);
-is(shadowTwo.host, hostInDoc);
-
-var hostNotInDoc = document.createElement("div");
-var shadowThree = hostNotInDoc.createShadowRoot();
-is(shadowThree.host, hostNotInDoc);
-
-var shadowFour = hostNotInDoc.createShadowRoot();
-is(shadowThree.host, hostNotInDoc);
-is(shadowFour.host, hostNotInDoc);
-
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/dom/tests/mochitest/webcomponents/test_shadowroot_style_multiple_shadow.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=806506
--->
-<head>
-  <title>Test for ShadowRoot styles with multiple ShadowRoot on host.</title>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<div class="tall" id="bodydiv"></div>
-<div id="container"></div>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=806506">Bug 806506</a>
-<script>
-// Create ShadowRoot.
-var container = document.getElementById("container");
-var elem = document.createElement("div");
-container.appendChild(elem); // Put ShadowRoot host in document.
-var firstRoot = elem.createShadowRoot();
-var secondRoot = elem.createShadowRoot();
-var thirdRoot = elem.createShadowRoot();
-
-// A style element that will be appended into the ShadowRoot.
-var firstStyle = document.createElement("style");
-firstRoot.appendChild(firstStyle);
-is(firstRoot.styleSheets.length, 1, "firstStyle should be the only style in firstRoot.");
-is(firstRoot.styleSheets[0].ownerNode, firstStyle, "firstStyle should in the ShadowRoot styleSheets.");
-
-var secondStyle = document.createElement("style");
-secondRoot.appendChild(secondStyle);
-is(secondRoot.styleSheets.length, 1, "secondStyle should be the only style in secondRoot.");
-is(secondRoot.styleSheets[0].ownerNode, secondStyle, "secondStyle should in the ShadowRoot styleSheets.");
-
-var thirdStyle = document.createElement("style");
-thirdRoot.appendChild(thirdStyle);
-is(thirdRoot.styleSheets.length, 1, "thirdStyle should be the only style in thirdRoot.");
-is(thirdRoot.styleSheets[0].ownerNode, thirdStyle, "thirdStyle should in the ShadowRoot styleSheets.");
-
-// Check the stylesheet counts again to make sure that none of the style sheets leaked into the older ShadowRoots.
-is(firstRoot.styleSheets.length, 1, "Adding a stylesheet to a younger ShadowRoot should not affect stylesheets in the older ShadowRoot.");
-is(secondRoot.styleSheets.length, 1, "Adding a stylesheet to a younger ShadowRoot should not affect stylesheets in the older ShadowRoot.");
-
-// Remove styles and make sure they are removed from the correct ShadowRoot.
-firstRoot.removeChild(firstStyle);
-is(firstRoot.styleSheets.length, 0, "firstRoot should no longer have any styles.");
-
-thirdRoot.removeChild(thirdStyle);
-is(thirdRoot.styleSheets.length, 0, "thirdRoot should no longer have any styles.");
-
-secondRoot.removeChild(secondStyle);
-is(secondRoot.styleSheets.length, 0, "secondRoot should no longer have any styles.");
-
-</script>
-</body>
-</html>
-
deleted file mode 100644
--- a/dom/tests/mochitest/webcomponents/test_shadowroot_youngershadowroot.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=1083587
--->
-<head>
-  <meta charset="utf-8">
-  <title>Test for Bug 1083587</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.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=1083587">Mozilla Bug 1083587</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-<div id="host"></div>
-</div>
-<pre id="test">
-</pre>
-<script type="application/javascript">
-
-/** Test for Bug 1083587 **/
-var hostInDoc = document.getElementById("host");
-var shadowOne = hostInDoc.createShadowRoot();
-is(shadowOne.olderShadowRoot, null);
-
-var shadowTwo = hostInDoc.createShadowRoot();
-is(shadowOne.olderShadowRoot, null);
-is(shadowTwo.olderShadowRoot, shadowOne);
-
-var hostNotInDoc = document.createElement("div");
-var shadowThree = hostNotInDoc.createShadowRoot();
-is(shadowThree.olderShadowRoot, null);
-
-var shadowFour = hostNotInDoc.createShadowRoot();
-is(shadowThree.olderShadowRoot, null);
-is(shadowFour.olderShadowRoot, shadowThree);
-
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/dom/webidl/HTMLShadowElement.webidl
+++ /dev/null
@@ -1,19 +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
- * https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html
- *
- * © 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.
- */
-
-[Func="nsDocument::IsWebComponentsEnabled"]
-interface HTMLShadowElement : HTMLElement
-{
-  readonly attribute ShadowRoot? olderShadowRoot;
-};
-
--- a/dom/webidl/ShadowRoot.webidl
+++ b/dom/webidl/ShadowRoot.webidl
@@ -15,13 +15,12 @@ interface ShadowRoot : DocumentFragment
 {
   Element? getElementById(DOMString elementId);
   HTMLCollection getElementsByTagName(DOMString localName);
   HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
   HTMLCollection getElementsByClassName(DOMString classNames);
   [CEReactions, SetterThrows, TreatNullAs=EmptyString]
   attribute DOMString innerHTML;
   readonly attribute Element host;
-  readonly attribute ShadowRoot? olderShadowRoot;
   attribute boolean applyAuthorStyles;
   readonly attribute StyleSheetList styleSheets;
 };
 
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -611,17 +611,16 @@ WEBIDL_FILES = [
     'HTMLParagraphElement.webidl',
     'HTMLParamElement.webidl',
     'HTMLPictureElement.webidl',
     'HTMLPreElement.webidl',
     'HTMLProgressElement.webidl',
     'HTMLQuoteElement.webidl',
     'HTMLScriptElement.webidl',
     'HTMLSelectElement.webidl',
-    'HTMLShadowElement.webidl',
     'HTMLSourceElement.webidl',
     'HTMLSpanElement.webidl',
     'HTMLStyleElement.webidl',
     'HTMLTableCaptionElement.webidl',
     'HTMLTableCellElement.webidl',
     'HTMLTableColElement.webidl',
     'HTMLTableElement.webidl',
     'HTMLTableRowElement.webidl',
--- a/editor/libeditor/HTMLEditUtils.cpp
+++ b/editor/libeditor/HTMLEditUtils.cpp
@@ -715,17 +715,16 @@ static const ElementInfo kElements[eHTML
   ELEM(rtc, true, true, GROUP_PHRASE, GROUP_INLINE_ELEMENT),
   ELEM(ruby, true, true, GROUP_PHRASE, GROUP_INLINE_ELEMENT),
   ELEM(s, true, true, GROUP_FONTSTYLE, GROUP_INLINE_ELEMENT),
   ELEM(samp, true, true, GROUP_PHRASE, GROUP_INLINE_ELEMENT),
   ELEM(script, true, false, GROUP_HEAD_CONTENT | GROUP_SPECIAL,
        GROUP_LEAF),
   ELEM(section, true, true, GROUP_BLOCK, GROUP_FLOW_ELEMENT),
   ELEM(select, true, false, GROUP_FORMCONTROL, GROUP_SELECT_CONTENT),
-  ELEM(shadow, true, false, GROUP_NONE, GROUP_INLINE_ELEMENT),
   ELEM(small, true, true, GROUP_FONTSTYLE, GROUP_INLINE_ELEMENT),
   ELEM(source, false, false, GROUP_PICTURE_CONTENT, GROUP_NONE),
   ELEM(span, true, true, GROUP_SPECIAL, GROUP_INLINE_ELEMENT),
   ELEM(strike, true, true, GROUP_FONTSTYLE, GROUP_INLINE_ELEMENT),
   ELEM(strong, true, true, GROUP_PHRASE, GROUP_INLINE_ELEMENT),
   ELEM(style, true, false, GROUP_HEAD_CONTENT, GROUP_LEAF),
   ELEM(sub, true, true, GROUP_SPECIAL, GROUP_INLINE_ELEMENT),
   ELEM(summary, true, true, GROUP_BLOCK, GROUP_FLOW_ELEMENT),
--- a/layout/reftests/css-display/display-contents-shadow-dom-1-ref.html
+++ b/layout/reftests/css-display/display-contents-shadow-dom-1-ref.html
@@ -40,13 +40,11 @@ span { color:blue; }
     <div><b>One</b><i>Two</i></div>
     <div><b>One</b><i>Two</i></div>
     <div><b>One</b><i>Two</i></div>
     <div><b>One</b><i>Two</i></div>
     <b style="color:blue">One</b><i style="color:blue">Two</i>Three
     <span style="color:green">R</span>
     <div></div>
     <b style="color:green">V</b>
-    <b style="color:green">W</b>
-    <b style="color:green">X</b>
     <!-- <b style="color:green">Y</b> -->
   </body>
 </html>
--- a/layout/reftests/css-display/display-contents-shadow-dom-1.html
+++ b/layout/reftests/css-display/display-contents-shadow-dom-1.html
@@ -46,18 +46,16 @@ div.after::after {content: " Y";}
     <div id="hostO"><i>Two</i><b class="c">One</b></div>
     <div id="hostP"><i class="c">Two</i><b class="c">One</b></div>
     <div id="hostQ" class="c" style="color:blue"><i class="c">Two</i><b class="c">One</b></div>Three
     <span id="hostR"><style scoped>:scope{color:green}</style></span>
     <div id="hostS" class="c"><span class="c">S</span></div>
     <div id="hostT" class="c">T</div>
     <div id="hostU"><span class="c">U</span></div>
     <div id="hostV" class="c" style="color:red"><b class="c" style="color:inherit">V</b></div>
-    <div id="hostW" class="c" style="color:red"><b class="c" style="color:inherit">W</b></div>
-    <span id="hostX" style="color:red"><b class="c" style="color:inherit">X</b></span>
     <!-- TODO(bug 1021572?) <div id="hostY" class="c" style="color:red"><b>Y</b></div> -->
 
    <script>
       function shadow(id) {
         return document.getElementById(id).createShadowRoot();
       }
       function span(s) {
         var e = document.createElement("span");
@@ -101,18 +99,16 @@ div.after::after {content: " Y";}
         shadow("hostK").innerHTML = '<content select=".b"></content>';
         shadow("hostL").innerHTML = '<content select=".b"></content>';
         shadow("hostM").innerHTML = '<content select="b"></content><content select="i"></content>';
         shadow("hostN").innerHTML = '<content select="b"></content><content select="i"></content>';
         shadow("hostO").innerHTML = '<content select="b"></content><content select="i"></content>';
         shadow("hostP").innerHTML = '<content select="b"></content><content select="i"></content>';
         shadow("hostQ").innerHTML = '<content select="b"></content><content select="i"></content>';
         shadow("hostR").innerHTML = '<content select="span"></content>';
-        shadow("hostW").innerHTML = '<z style="color:red"><content select="b"></content></z>';
-        shadow("hostX").innerHTML = '<z style="color:red"><content select="b"></content></z>';
         // TODO(bug 1021572?) shadow("hostY").innerHTML = '<content select="b"><style scoped>:scope{color:green}</style></content>';
       }
 
       function tweak() {
         document.body.offsetHeight;
 
         host1.appendChild(span("1"));
         host2.appendChild(text("2"));
@@ -219,18 +215,16 @@ div.after::after {content: " Y";}
         hostR.appendChild(span("R"));
 
         document.body.offsetHeight;
         setTimeout(function() {
             shadow("hostS");
             shadow("hostT");
             shadow("hostU");
             shadow("hostV").innerHTML = '<z style="color:green"><content select="b"></content></z>';
-            shadow("hostW").innerHTML = '<z style="color:green"><content select="b"></content></z>';
-            shadow("hostX").innerHTML = '<z style="color:green"><content select="b"></content></z>';
 
             document.body.offsetHeight;
             document.documentElement.removeAttribute("class");
           },0);
       }
 
       if (document.body.createShadowRoot) {
         run();
deleted file mode 100644
--- a/layout/reftests/webcomponents/adjacent-insertion-points-1-ref.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<body>
-<div><span>Hello</span><span>World</span></div>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/webcomponents/adjacent-insertion-points-1.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <script>
-    function tweak() {
-      var oldShadowRoot = document.getElementById('outer').createShadowRoot();
-      oldShadowRoot.innerHTML = 'World';
-
-      var youngShadowRoot = document.getElementById('outer').createShadowRoot();
-      youngShadowRoot.innerHTML = 'Hello<content></content><shadow></shadow>';
-    }
-  </script>
-</head>
-<body onload="tweak()">
-<div id="outer"></div>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/webcomponents/adjacent-insertion-points-2-ref.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<body>
-<div><span>Hello</span><span>World</span></div>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/webcomponents/adjacent-insertion-points-2.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <script>
-    function tweak() {
-      var oldShadowRoot = document.getElementById('outer').createShadowRoot();
-      oldShadowRoot.innerHTML = 'Hello';
-
-      var youngShadowRoot = document.getElementById('outer').createShadowRoot();
-      youngShadowRoot.innerHTML = '<shadow></shadow><content></content>World';
-    }
-  </script>
-</head>
-<body onload="tweak()">
-<div id="outer"></div>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/webcomponents/basic-shadow-element-1-ref.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-</head>
-<body>
-<div>
-  <div style="width:100px; height:100px; background-color:green"></div><div style="width:100px; height:100px; background-color:orange">Hello World</div>
-</div>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/webcomponents/basic-shadow-element-1.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <script>
-    function tweak() {
-      var olderShadow = document.getElementById('outer').createShadowRoot();
-      olderShadow.innerHTML = '<div style="width:100px; height:100px; background-color: orange"><content></content></div>';
-
-      var youngerShadow = document.getElementById('outer').createShadowRoot();
-      youngerShadow.innerHTML = '<div style="width:100px; height:100px; background-color: green"></div><shadow>Hello World</shadow>';
-    }
-  </script>
-</head>
-<body onload="tweak()">
-<div id="outer">
-  <div style="width:300px; height:100px; background-color:red;"></div>
-</div>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/webcomponents/nested-shadow-element-1-ref.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-</head>
-<body>
-<div>
-  <div style="background-color: green"><span>Hello</span><span> </span><span>World</span></div>
-</div>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/webcomponents/nested-shadow-element-1.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <script>
-    function tweak() {
-      var olderShadow = document.getElementById('outer').createShadowRoot();
-      olderShadow.innerHTML = '<content></content><span>World</span>';
-
-      var youngerShadow = document.getElementById('outer').createShadowRoot();
-      youngerShadow.innerHTML = '<div id="shadowparent"><shadow id="youngshadow"><span>Hello</span></shadow></div>';
-
-      var shadowParent = youngerShadow.getElementById("shadowparent");
-      var nestedShadow = shadowParent.createShadowRoot();
-      nestedShadow.innerHTML = '<div style="background-color: green"><content></content></div>';
-
-      // Dynamically append a span to the shadow element in the younger ShadowRoot to make sure
-      // it is projected into the nested shadow.
-      var appendedSpan = document.createElement("span");
-      appendedSpan.textContent = ' ';
-      youngerShadow.getElementById("youngshadow").appendChild(appendedSpan);
-    }
-  </script>
-</head>
-<body onload="tweak()">
-<div id="outer">
-  <div style="width:300px; height:100px; background-color:red;"></div>
-</div>
-</body>
-</html>
--- a/layout/reftests/webcomponents/reftest.list
+++ b/layout/reftests/webcomponents/reftest.list
@@ -1,19 +1,15 @@
 pref(dom.webcomponents.enabled,true) fails-if(stylo||styloVsGecko) == cross-tree-selection-1.html cross-tree-selection-1-ref.html
 pref(dom.webcomponents.enabled,true) fails-if(stylo||styloVsGecko) == basic-shadow-1.html basic-shadow-1-ref.html
 pref(dom.webcomponents.enabled,true) fails-if(stylo||styloVsGecko) == basic-shadow-2.html basic-shadow-2-ref.html
 pref(dom.webcomponents.enabled,true) fails-if(stylo||styloVsGecko) == basic-shadow-3.html basic-shadow-3-ref.html
 pref(dom.webcomponents.enabled,true) fails-if(stylo||styloVsGecko) == basic-shadow-4.html basic-shadow-4-ref.html
 pref(dom.webcomponents.enabled,true) fails-if(stylo||styloVsGecko) == basic-insertion-point-1.html basic-insertion-point-1-ref.html
 pref(dom.webcomponents.enabled,true) fails-if(stylo||styloVsGecko) == basic-insertion-point-2.html basic-insertion-point-2-ref.html
-pref(dom.webcomponents.enabled,true) fails-if(stylo||styloVsGecko) == adjacent-insertion-points-1.html adjacent-insertion-points-1-ref.html
-pref(dom.webcomponents.enabled,true) fails-if(stylo||styloVsGecko) == adjacent-insertion-points-2.html adjacent-insertion-points-2-ref.html
 pref(dom.webcomponents.enabled,true) fails-if(stylo||styloVsGecko) == fallback-content-1.html fallback-content-1-ref.html
 pref(dom.webcomponents.enabled,true) fails-if(stylo||styloVsGecko) == remove-insertion-point-1.html remove-insertion-point-1-ref.html
 pref(dom.webcomponents.enabled,true) fails-if(stylo||styloVsGecko) == nested-insertion-point-1.html nested-insertion-point-1-ref.html
-pref(dom.webcomponents.enabled,true) fails-if(stylo||styloVsGecko) == basic-shadow-element-1.html basic-shadow-element-1-ref.html
-pref(dom.webcomponents.enabled,true) fails-if(stylo||styloVsGecko) == nested-shadow-element-1.html nested-shadow-element-1-ref.html
 pref(dom.webcomponents.enabled,true) fails-if(stylo||styloVsGecko) == update-dist-node-descendants-1.html update-dist-node-descendants-1-ref.html
 pref(dom.webcomponents.enabled,true) fails-if(stylo||styloVsGecko) fuzzy-if(Android,2,7) == input-transition-1.html input-transition-1-ref.html
 pref(dom.webcomponents.enabled,true) fails-if(stylo||styloVsGecko) == dynamic-insertion-point-distribution-1.html dynamic-insertion-point-distribution-1-ref.html
 pref(dom.webcomponents.enabled,true) fails-if(stylo||styloVsGecko) == dynamic-insertion-point-distribution-2.html dynamic-insertion-point-distribution-2-ref.html
 pref(dom.webcomponents.enabled,true) fails-if(stylo||styloVsGecko) == remove-append-shadow-host-1.html remove-append-shadow-host-1-ref.html
--- a/parser/html/javasrc/ElementName.java
+++ b/parser/html/javasrc/ElementName.java
@@ -354,17 +354,17 @@ public final class ElementName
 //        return "NS_NewSVGUnknownElement";
 //    }
 //
 //    /**
 //     * @see java.lang.Object#toString()
 //     */
 //    @Override public String toString() {
 //        return "(\"" + name + "\", \"" + camelCaseName + "\", \n// CPP"
-//                + "ONLY: " + htmlCreator(name) + ",\n//CPP" + "ONLY: "
+//                + "ONLY: " + htmlCreator(name) + ",\n// CPP" + "ONLY: "
 //                + svgCreator(camelCaseName) + ", \n" + decomposedFlags() + ")";
 //    }
 //
 //    private String decomposedFlags() {
 //        StringBuilder buf = new StringBuilder("TreeBuilder.");
 //        buf.append(treeBuilderGroupToName());
 //        if ((flags & SPECIAL) != 0) {
 //            buf.append(" | SPECIAL");
@@ -650,1202 +650,1249 @@ public final class ElementName
 //            System.err.println("Missing HTML element: " + entry.getKey());
 //        }
 //        for (Entry<String, String> entry : svgMap.entrySet()) {
 //            System.err.println("Missing SVG element: " + entry.getKey());
 //        }
 //    }
 
     // START GENERATED CODE
-    public static final ElementName BIG = new ElementName("big", "big",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
-
-    public static final ElementName BDO = new ElementName("bdo", "bdo",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName COL = new ElementName("col", "col",
-            // CPPONLY: NS_NewHTMLTableColElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.COL | SPECIAL);
-
-    public static final ElementName DEL = new ElementName("del", "del",
-            // CPPONLY: NS_NewHTMLModElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName DFN = new ElementName("dfn", "dfn",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName DIR = new ElementName("dir", "dir",
-            // CPPONLY: NS_NewHTMLSharedElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY
-                    | SPECIAL);
-
-    public static final ElementName DIV = new ElementName("div", "div",
-            // CPPONLY: NS_NewHTMLDivElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.DIV_OR_BLOCKQUOTE_OR_CENTER_OR_MENU | SPECIAL);
-
-    public static final ElementName IMG = new ElementName("img", "img",
-            // CPPONLY: NS_NewHTMLImageElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.IMG | SPECIAL);
-
-    public static final ElementName INS = new ElementName("ins", "ins",
-            // CPPONLY: NS_NewHTMLModElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName KBD = new ElementName("kbd", "kbd",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName MAP = new ElementName("map", "map",
-            // CPPONLY: NS_NewHTMLMapElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName NAV = new ElementName("nav", "nav",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY
-                    | SPECIAL);
-
-    public static final ElementName PRE = new ElementName("pre", "pre",
-            // CPPONLY: NS_NewHTMLPreElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.PRE_OR_LISTING | SPECIAL);
-
-    public static final ElementName A = new ElementName("a", "a",
-            // CPPONLY: NS_NewHTMLAnchorElement,
-            // CPPONLY: NS_NewSVGAElement,
-            TreeBuilder.A);
-
-    public static final ElementName B = new ElementName("b", "b",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
-
-    public static final ElementName RTC = new ElementName("rtc", "rtc",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.RB_OR_RTC | OPTIONAL_END_TAG);
-
-    public static final ElementName SUB = new ElementName("sub", "sub",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.RUBY_OR_SPAN_OR_SUB_OR_SUP_OR_VAR);
-
-    public static final ElementName SVG = new ElementName("svg", "svg",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGSVGElement,
-            TreeBuilder.SVG);
-
-    public static final ElementName SUP = new ElementName("sup", "sup",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.RUBY_OR_SPAN_OR_SUB_OR_SUP_OR_VAR);
-
-    public static final ElementName SET = new ElementName("set", "set",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGSetElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName USE = new ElementName("use", "use",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGUseElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName VAR = new ElementName("var", "var",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.RUBY_OR_SPAN_OR_SUB_OR_SUP_OR_VAR);
-
-    public static final ElementName G = new ElementName("g", "g",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGGElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName WBR = new ElementName("wbr", "wbr",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.AREA_OR_WBR | SPECIAL);
-
-    public static final ElementName XMP = new ElementName("xmp", "xmp",
-            // CPPONLY: NS_NewHTMLPreElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.XMP | SPECIAL);
-
-    public static final ElementName I = new ElementName("i", "i",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
-
-    public static final ElementName P = new ElementName("p", "p",
-            // CPPONLY: NS_NewHTMLParagraphElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.P | SPECIAL | OPTIONAL_END_TAG);
-
-    public static final ElementName Q = new ElementName("q", "q",
-            // CPPONLY: NS_NewHTMLSharedElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName S = new ElementName("s", "s",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
-
-    public static final ElementName U = new ElementName("u", "u",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
-
-    public static final ElementName H1 = new ElementName("h1", "h1",
-            // CPPONLY: NS_NewHTMLHeadingElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6 | SPECIAL);
-
-    public static final ElementName H2 = new ElementName("h2", "h2",
-            // CPPONLY: NS_NewHTMLHeadingElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6 | SPECIAL);
-
-    public static final ElementName H3 = new ElementName("h3", "h3",
-            // CPPONLY: NS_NewHTMLHeadingElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6 | SPECIAL);
-
-    public static final ElementName H4 = new ElementName("h4", "h4",
-            // CPPONLY: NS_NewHTMLHeadingElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6 | SPECIAL);
-
-    public static final ElementName H5 = new ElementName("h5", "h5",
-            // CPPONLY: NS_NewHTMLHeadingElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6 | SPECIAL);
-
-    public static final ElementName H6 = new ElementName("h6", "h6",
-            // CPPONLY: NS_NewHTMLHeadingElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6 | SPECIAL);
-
-    public static final ElementName AREA = new ElementName("area", "area",
-            // CPPONLY: NS_NewHTMLAreaElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.AREA_OR_WBR | SPECIAL);
-
-    public static final ElementName DATA = new ElementName("data", "data",
-            // CPPONLY: NS_NewHTMLDataElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName FEFUNCA = new ElementName("fefunca",
-            "feFuncA",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGFEFuncAElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName METADATA = new ElementName("metadata",
-            "metadata",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGMetadataElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName META = new ElementName("meta", "meta",
-            // CPPONLY: NS_NewHTMLMetaElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.META | SPECIAL);
-
-    public static final ElementName TEXTAREA = new ElementName("textarea",
-            "textarea",
-            // CPPONLY: NS_NewHTMLTextAreaElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.TEXTAREA | SPECIAL);
-
-    public static final ElementName FEFUNCB = new ElementName("fefuncb",
-            "feFuncB",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGFEFuncBElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName RB = new ElementName("rb", "rb",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.RB_OR_RTC | OPTIONAL_END_TAG);
-
-    public static final ElementName DESC = new ElementName("desc", "desc",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGDescElement,
-            TreeBuilder.FOREIGNOBJECT_OR_DESC | SCOPING_AS_SVG);
-
-    public static final ElementName DD = new ElementName("dd", "dd",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.DD_OR_DT | SPECIAL | OPTIONAL_END_TAG);
-
-    public static final ElementName BGSOUND = new ElementName("bgsound",
-            "bgsound",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.LINK_OR_BASEFONT_OR_BGSOUND | SPECIAL);
-
-    public static final ElementName EMBED = new ElementName("embed", "embed",
-            // CPPONLY: NS_NewHTMLEmbedElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.EMBED | SPECIAL);
-
-    public static final ElementName FEBLEND = new ElementName("feblend",
-            "feBlend",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGFEBlendElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName FEFLOOD = new ElementName("feflood",
-            "feFlood",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGFEFloodElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName HEAD = new ElementName("head", "head",
-            // CPPONLY: NS_NewHTMLSharedElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.HEAD | SPECIAL | OPTIONAL_END_TAG);
-
-    public static final ElementName LEGEND = new ElementName("legend", "legend",
-            // CPPONLY: NS_NewHTMLLegendElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName NOEMBED = new ElementName("noembed",
-            "noembed",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.NOEMBED | SPECIAL);
-
-    public static final ElementName TD = new ElementName("td", "td",
-            // CPPONLY: NS_NewHTMLTableCellElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.TD_OR_TH | SPECIAL | SCOPING | OPTIONAL_END_TAG);
-
-    public static final ElementName THEAD = new ElementName("thead", "thead",
-            // CPPONLY: NS_NewHTMLTableSectionElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.TBODY_OR_THEAD_OR_TFOOT | SPECIAL | FOSTER_PARENTING
-                    | OPTIONAL_END_TAG);
-
-    public static final ElementName ASIDE = new ElementName("aside", "aside",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY
-                    | SPECIAL);
-
-    public static final ElementName ARTICLE = new ElementName("article",
-            "article",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY
-                    | SPECIAL);
-
-    public static final ElementName ANIMATE = new ElementName("animate",
-            "animate",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGAnimateElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName BASE = new ElementName("base", "base",
-            // CPPONLY: NS_NewHTMLSharedElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.BASE | SPECIAL);
-
-    public static final ElementName BLOCKQUOTE = new ElementName("blockquote",
-            "blockquote",
-            // CPPONLY: NS_NewHTMLSharedElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.DIV_OR_BLOCKQUOTE_OR_CENTER_OR_MENU | SPECIAL);
-
-    public static final ElementName CODE = new ElementName("code", "code",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
-
-    public static final ElementName CIRCLE = new ElementName("circle", "circle",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGCircleElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName CITE = new ElementName("cite", "cite",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName ELLIPSE = new ElementName("ellipse",
-            "ellipse",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGEllipseElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName FETURBULENCE = new ElementName(
-            "feturbulence", "feTurbulence",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGFETurbulenceElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName FEMERGENODE = new ElementName("femergenode",
-            "feMergeNode",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGFEMergeNodeElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName FEIMAGE = new ElementName("feimage",
-            "feImage",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGFEImageElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName FEMERGE = new ElementName("femerge",
-            "feMerge",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGFEMergeElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName FETILE = new ElementName("fetile", "feTile",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGFETileElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName FRAME = new ElementName("frame", "frame",
-            // CPPONLY: NS_NewHTMLFrameElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.FRAME | SPECIAL);
-
-    public static final ElementName FIGURE = new ElementName("figure", "figure",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY
-                    | SPECIAL);
-
-    public static final ElementName FECOMPOSITE = new ElementName("fecomposite",
-            "feComposite",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGFECompositeElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName IMAGE = new ElementName("image", "image",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGImageElement,
-            TreeBuilder.IMAGE);
-
-    public static final ElementName IFRAME = new ElementName("iframe", "iframe",
-            // CPPONLY: NS_NewHTMLIFrameElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.IFRAME | SPECIAL);
-
-    public static final ElementName LINE = new ElementName("line", "line",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGLineElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName MARQUEE = new ElementName("marquee",
-            "marquee",
-            // CPPONLY: NS_NewHTMLDivElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.MARQUEE_OR_APPLET | SPECIAL | SCOPING);
-
-    public static final ElementName POLYLINE = new ElementName("polyline",
-            "polyline",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGPolylineElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName PICTURE = new ElementName("picture",
-            "picture",
-            // CPPONLY: NS_NewHTMLPictureElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName SOURCE = new ElementName("source", "source",
-            // CPPONLY: NS_NewHTMLSourceElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.PARAM_OR_SOURCE_OR_TRACK);
-
-    public static final ElementName STRIKE = new ElementName("strike", "strike",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
-
-    public static final ElementName STYLE = new ElementName("style", "style",
-            // CPPONLY: NS_NewHTMLStyleElement,
-            // CPPONLY: NS_NewSVGStyleElement,
-            TreeBuilder.STYLE | SPECIAL);
-
-    public static final ElementName TABLE = new ElementName("table", "table",
-            // CPPONLY: NS_NewHTMLTableElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.TABLE | SPECIAL | FOSTER_PARENTING | SCOPING);
-
-    public static final ElementName TITLE = new ElementName("title", "title",
-            // CPPONLY: NS_NewHTMLTitleElement,
-            // CPPONLY: NS_NewSVGTitleElement,
-            TreeBuilder.TITLE | SPECIAL | SCOPING_AS_SVG);
-
-    public static final ElementName TIME = new ElementName("time", "time",
-            // CPPONLY: NS_NewHTMLTimeElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName TEMPLATE = new ElementName("template",
-            "template",
-            // CPPONLY: NS_NewHTMLTemplateElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.TEMPLATE | SPECIAL | SCOPING);
-
-    public static final ElementName ALTGLYPHDEF = new ElementName("altglyphdef",
-            "altGlyphDef",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName GLYPHREF = new ElementName("glyphref",
-            "glyphRef",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName DIALOG = new ElementName("dialog", "dialog",
-            // CPPONLY: NS_NewHTMLDialogElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY
-                    | SPECIAL);
-
-    public static final ElementName FEFUNCG = new ElementName("fefuncg",
-            "feFuncG",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGFEFuncGElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName FEDIFFUSELIGHTING = new ElementName(
-            "fediffuselighting", "feDiffuseLighting",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGFEDiffuseLightingElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName FESPECULARLIGHTING = new ElementName(
-            "fespecularlighting", "feSpecularLighting",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGFESpecularLightingElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName LISTING = new ElementName("listing",
-            "listing",
-            // CPPONLY: NS_NewHTMLPreElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.PRE_OR_LISTING | SPECIAL);
-
-    public static final ElementName STRONG = new ElementName("strong", "strong",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
-
-    public static final ElementName ALTGLYPH = new ElementName("altglyph",
-            "altGlyph",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName CLIPPATH = new ElementName("clippath",
-            "clipPath",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGClipPathElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName MGLYPH = new ElementName("mglyph", "mglyph",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.MGLYPH_OR_MALIGNMARK);
-
-    public static final ElementName MATH = new ElementName("math", "math",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.MATH);
-
-    public static final ElementName MPATH = new ElementName("mpath", "mpath",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGMPathElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName PATH = new ElementName("path", "path",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGPathElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName TH = new ElementName("th", "th",
-            // CPPONLY: NS_NewHTMLTableCellElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.TD_OR_TH | SPECIAL | SCOPING | OPTIONAL_END_TAG);
-
-    public static final ElementName SWITCH = new ElementName("switch", "switch",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGSwitchElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName TEXTPATH = new ElementName("textpath",
-            "textPath",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGTextPathElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName LI = new ElementName("li", "li",
-            // CPPONLY: NS_NewHTMLLIElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.LI | SPECIAL | OPTIONAL_END_TAG);
-
-    public static final ElementName MI = new ElementName("mi", "mi",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.MI_MO_MN_MS_MTEXT | SCOPING_AS_MATHML);
-
-    public static final ElementName LINK = new ElementName("link", "link",
-            // CPPONLY: NS_NewHTMLLinkElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.LINK_OR_BASEFONT_OR_BGSOUND | SPECIAL);
-
-    public static final ElementName MARK = new ElementName("mark", "mark",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName MALIGNMARK = new ElementName("malignmark",
-            "malignmark",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.MGLYPH_OR_MALIGNMARK);
-
-    public static final ElementName MASK = new ElementName("mask", "mask",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGMaskElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName TRACK = new ElementName("track", "track",
-            // CPPONLY: NS_NewHTMLTrackElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.PARAM_OR_SOURCE_OR_TRACK | SPECIAL);
-
-    public static final ElementName DL = new ElementName("dl", "dl",
-            // CPPONLY: NS_NewHTMLSharedListElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.UL_OR_OL_OR_DL | SPECIAL);
-
-    public static final ElementName HTML = new ElementName("html", "html",
-            // CPPONLY: NS_NewHTMLSharedElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.HTML | SPECIAL | SCOPING | OPTIONAL_END_TAG);
-
-    public static final ElementName OL = new ElementName("ol", "ol",
-            // CPPONLY: NS_NewHTMLSharedListElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.UL_OR_OL_OR_DL | SPECIAL);
-
-    public static final ElementName LABEL = new ElementName("label", "label",
-            // CPPONLY: NS_NewHTMLLabelElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName UL = new ElementName("ul", "ul",
-            // CPPONLY: NS_NewHTMLSharedListElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.UL_OR_OL_OR_DL | SPECIAL);
-
-    public static final ElementName SMALL = new ElementName("small", "small",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
-
-    public static final ElementName SYMBOL = new ElementName("symbol", "symbol",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGSymbolElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName ALTGLYPHITEM = new ElementName(
-            "altglyphitem", "altGlyphItem",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName ANIMATETRANSFORM = new ElementName(
-            "animatetransform", "animateTransform",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGAnimateTransformElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName ACRONYM = new ElementName("acronym",
-            "acronym",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName EM = new ElementName("em", "em",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
-
-    public static final ElementName FORM = new ElementName("form", "form",
-            // CPPONLY: NS_NewHTMLFormElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.FORM | SPECIAL);
-
-    public static final ElementName MENUITEM = new ElementName("menuitem",
-            "menuitem",
-            // CPPONLY: NS_NewHTMLMenuItemElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.MENUITEM);
-
-    public static final ElementName PARAM = new ElementName("param", "param",
-            // CPPONLY: NS_NewHTMLSharedElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.PARAM_OR_SOURCE_OR_TRACK | SPECIAL);
-
-    public static final ElementName ANIMATEMOTION = new ElementName(
-            "animatemotion", "animateMotion",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGAnimateMotionElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName BUTTON = new ElementName("button", "button",
-            // CPPONLY: NS_NewHTMLButtonElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.BUTTON | SPECIAL);
-
-    public static final ElementName CAPTION = new ElementName("caption",
-            "caption",
-            // CPPONLY: NS_NewHTMLTableCaptionElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.CAPTION | SPECIAL | SCOPING);
-
-    public static final ElementName FIGCAPTION = new ElementName("figcaption",
-            "figcaption",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY
-                    | SPECIAL);
-
-    public static final ElementName MN = new ElementName("mn", "mn",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.MI_MO_MN_MS_MTEXT | SCOPING_AS_MATHML);
-
-    public static final ElementName KEYGEN = new ElementName("keygen", "keygen",
-            // CPPONLY: NS_NewHTMLSpanElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.KEYGEN);
-
-    public static final ElementName MAIN = new ElementName("main", "main",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY
-                    | SPECIAL);
-
-    public static final ElementName OPTION = new ElementName("option", "option",
-            // CPPONLY: NS_NewHTMLOptionElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OPTION | OPTIONAL_END_TAG);
-
-    public static final ElementName POLYGON = new ElementName("polygon",
-            "polygon",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGPolygonElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName PATTERN = new ElementName("pattern",
-            "pattern",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGPatternElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName SPAN = new ElementName("span", "span",
-            // CPPONLY: NS_NewHTMLSpanElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.RUBY_OR_SPAN_OR_SUB_OR_SUP_OR_VAR);
-
-    public static final ElementName SECTION = new ElementName("section",
-            "section",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY
-                    | SPECIAL);
-
-    public static final ElementName TSPAN = new ElementName("tspan", "tspan",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGTSpanElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName AUDIO = new ElementName("audio", "audio",
-            // CPPONLY: NS_NewHTMLAudioElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName MO = new ElementName("mo", "mo",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.MI_MO_MN_MS_MTEXT | SCOPING_AS_MATHML);
-
-    public static final ElementName VIDEO = new ElementName("video", "video",
-            // CPPONLY: NS_NewHTMLVideoElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName COLGROUP = new ElementName("colgroup",
-            "colgroup",
-            // CPPONLY: NS_NewHTMLTableColElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.COLGROUP | SPECIAL | OPTIONAL_END_TAG);
-
-    public static final ElementName FEDISPLACEMENTMAP = new ElementName(
-            "fedisplacementmap", "feDisplacementMap",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGFEDisplacementMapElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName HGROUP = new ElementName("hgroup", "hgroup",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY
-                    | SPECIAL);
-
-    public static final ElementName RP = new ElementName("rp", "rp",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.RT_OR_RP | OPTIONAL_END_TAG);
-
-    public static final ElementName OPTGROUP = new ElementName("optgroup",
-            "optgroup",
-            // CPPONLY: NS_NewHTMLOptGroupElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OPTGROUP | OPTIONAL_END_TAG);
-
-    public static final ElementName SAMP = new ElementName("samp", "samp",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName STOP = new ElementName("stop", "stop",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGStopElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName BR = new ElementName("br", "br",
-            // CPPONLY: NS_NewHTMLBRElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.BR | SPECIAL);
-
-    public static final ElementName ABBR = new ElementName("abbr", "abbr",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName ANIMATECOLOR = new ElementName(
-            "animatecolor", "animateColor",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName CENTER = new ElementName("center", "center",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.DIV_OR_BLOCKQUOTE_OR_CENTER_OR_MENU | SPECIAL);
-
-    public static final ElementName HR = new ElementName("hr", "hr",
-            // CPPONLY: NS_NewHTMLHRElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.HR | SPECIAL);
-
-    public static final ElementName FEFUNCR = new ElementName("fefuncr",
-            "feFuncR",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGFEFuncRElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName FECOMPONENTTRANSFER = new ElementName(
-            "fecomponenttransfer", "feComponentTransfer",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGFEComponentTransferElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName FILTER = new ElementName("filter", "filter",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGFilterElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName FOOTER = new ElementName("footer", "footer",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY
-                    | SPECIAL);
-
-    public static final ElementName FEGAUSSIANBLUR = new ElementName(
-            "fegaussianblur", "feGaussianBlur",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGFEGaussianBlurElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName HEADER = new ElementName("header", "header",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY
-                    | SPECIAL);
-
-    public static final ElementName MARKER = new ElementName("marker", "marker",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGMarkerElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName METER = new ElementName("meter", "meter",
-            // CPPONLY: NS_NewHTMLMeterElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName NOBR = new ElementName("nobr", "nobr",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.NOBR);
-
-    public static final ElementName TR = new ElementName("tr", "tr",
-            // CPPONLY: NS_NewHTMLTableRowElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.TR | SPECIAL | FOSTER_PARENTING | OPTIONAL_END_TAG);
-
-    public static final ElementName ADDRESS = new ElementName("address",
-            "address",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY
-                    | SPECIAL);
-
-    public static final ElementName CANVAS = new ElementName("canvas", "canvas",
-            // CPPONLY: NS_NewHTMLCanvasElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName DEFS = new ElementName("defs", "defs",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGDefsElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName DETAILS = new ElementName("details",
-            "details",
-            // CPPONLY: NS_NewHTMLDetailsElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY
-                    | SPECIAL);
-
-    public static final ElementName MS = new ElementName("ms", "ms",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.MI_MO_MN_MS_MTEXT | SCOPING_AS_MATHML);
-
-    public static final ElementName NOFRAMES = new ElementName("noframes",
-            "noframes",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.NOFRAMES | SPECIAL);
-
-    public static final ElementName PROGRESS = new ElementName("progress",
-            "progress",
-            // CPPONLY: NS_NewHTMLProgressElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName DT = new ElementName("dt", "dt",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.DD_OR_DT | SPECIAL | OPTIONAL_END_TAG);
-
-    public static final ElementName APPLET = new ElementName("applet", "applet",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.MARQUEE_OR_APPLET | SPECIAL | SCOPING);
-
-    public static final ElementName BASEFONT = new ElementName("basefont",
-            "basefont",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.LINK_OR_BASEFONT_OR_BGSOUND | SPECIAL);
-
-    public static final ElementName CONTENT = new ElementName("content",
-            "content",
-            // CPPONLY: NS_NewHTMLContentElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName DATALIST = new ElementName("datalist",
-            "datalist",
-            // CPPONLY: NS_NewHTMLDataListElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName FOREIGNOBJECT = new ElementName(
-            "foreignobject", "foreignObject",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGForeignObjectElement,
-            TreeBuilder.FOREIGNOBJECT_OR_DESC | SCOPING_AS_SVG);
-
-    public static final ElementName FIELDSET = new ElementName("fieldset",
-            "fieldset",
-            // CPPONLY: NS_NewHTMLFieldSetElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.FIELDSET | SPECIAL);
-
-    public static final ElementName FRAMESET = new ElementName("frameset",
-            "frameset",
-            // CPPONLY: NS_NewHTMLFrameSetElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.FRAMESET | SPECIAL);
-
-    public static final ElementName FEOFFSET = new ElementName("feoffset",
-            "feOffset",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGFEOffsetElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName FESPOTLIGHT = new ElementName("fespotlight",
-            "feSpotLight",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGFESpotLightElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName FEPOINTLIGHT = new ElementName(
-            "fepointlight", "fePointLight",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGFEPointLightElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName FEDISTANTLIGHT = new ElementName(
-            "fedistantlight", "feDistantLight",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGFEDistantLightElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName FONT = new ElementName("font", "font",
-            // CPPONLY: NS_NewHTMLFontElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.FONT);
-
-    public static final ElementName INPUT = new ElementName("input", "input",
-            // CPPONLY: NS_NewHTMLInputElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.INPUT | SPECIAL);
-
-    public static final ElementName LINEARGRADIENT = new ElementName(
-            "lineargradient", "linearGradient",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGLinearGradientElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName MTEXT = new ElementName("mtext", "mtext",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.MI_MO_MN_MS_MTEXT | SCOPING_AS_MATHML);
-
-    public static final ElementName NOSCRIPT = new ElementName("noscript",
-            "noscript",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.NOSCRIPT | SPECIAL);
-
-    public static final ElementName RT = new ElementName("rt", "rt",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.RT_OR_RP | OPTIONAL_END_TAG);
-
-    public static final ElementName OBJECT = new ElementName("object", "object",
-            // CPPONLY: NS_NewHTMLObjectElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OBJECT | SPECIAL | SCOPING);
-
-    public static final ElementName OUTPUT = new ElementName("output", "output",
-            // CPPONLY: NS_NewHTMLOutputElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OUTPUT);
-
-    public static final ElementName PLAINTEXT = new ElementName("plaintext",
-            "plaintext",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.PLAINTEXT | SPECIAL);
-
-    public static final ElementName TT = new ElementName("tt", "tt",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
-
-    public static final ElementName RECT = new ElementName("rect", "rect",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGRectElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName RADIALGRADIENT = new ElementName(
-            "radialgradient", "radialGradient",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGRadialGradientElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName SELECT = new ElementName("select", "select",
-            // CPPONLY: NS_NewHTMLSelectElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.SELECT | SPECIAL);
-
-    public static final ElementName SCRIPT = new ElementName("script", "script",
-            // CPPONLY: NS_NewHTMLScriptElement,
-            // CPPONLY: NS_NewSVGScriptElement,
-            TreeBuilder.SCRIPT | SPECIAL);
-
-    public static final ElementName TFOOT = new ElementName("tfoot", "tfoot",
-            // CPPONLY: NS_NewHTMLTableSectionElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.TBODY_OR_THEAD_OR_TFOOT | SPECIAL | FOSTER_PARENTING
-                    | OPTIONAL_END_TAG);
-
-    public static final ElementName TEXT = new ElementName("text", "text",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGTextElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName MENU = new ElementName("menu", "menu",
-            // CPPONLY: NS_NewHTMLMenuElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.DIV_OR_BLOCKQUOTE_OR_CENTER_OR_MENU | SPECIAL);
-
-    public static final ElementName FEDROPSHADOW = new ElementName(
-            "fedropshadow", "feDropShadow",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGFEDropShadowElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName SHADOW = new ElementName("shadow", "shadow",
-            // CPPONLY: NS_NewHTMLShadowElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName VIEW = new ElementName("view", "view",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGViewElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName FECOLORMATRIX = new ElementName(
-            "fecolormatrix", "feColorMatrix",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGFEColorMatrixElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName FECONVOLVEMATRIX = new ElementName(
-            "feconvolvematrix", "feConvolveMatrix",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGFEConvolveMatrixElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName BODY = new ElementName("body", "body",
-            // CPPONLY: NS_NewHTMLBodyElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.BODY | SPECIAL | OPTIONAL_END_TAG);
-
-    public static final ElementName FEMORPHOLOGY = new ElementName(
-            "femorphology", "feMorphology",
-            // CPPONLY: NS_NewHTMLUnknownElement,
-            // CPPONLY: NS_NewSVGFEMorphologyElement,
-            TreeBuilder.OTHER);
-
-    public static final ElementName RUBY = new ElementName("ruby", "ruby",
-            // CPPONLY: NS_NewHTMLElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.RUBY_OR_SPAN_OR_SUB_OR_SUP_OR_VAR);
-
-    public static final ElementName SUMMARY = new ElementName("summary",
-            "summary",
-            // CPPONLY: NS_NewHTMLSummaryElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY
-                    | SPECIAL);
-
-    public static final ElementName TBODY = new ElementName("tbody", "tbody",
-            // CPPONLY: NS_NewHTMLTableSectionElement,
-            // CPPONLY: NS_NewSVGUnknownElement,
-            TreeBuilder.TBODY_OR_THEAD_OR_TFOOT | SPECIAL | FOSTER_PARENTING
-                    | OPTIONAL_END_TAG);
-
-    private final static @NoLength ElementName[] ELEMENT_NAMES = { MN, ELLIPSE,
-            FRAMESET, H2, MGLYPH, NOBR, RADIALGRADIENT, RTC, EMBED, STRIKE, OL,
-            OPTGROUP, PROGRESS, MTEXT, VIEW, IMG, WBR, METADATA, ASIDE,
-            FECOMPOSITE, DIALOG, MI, EM, TSPAN, FEFUNCR, DEFS, CONTENT,
-            FEDISTANTLIGHT, OUTPUT, TEXT, FEMORPHOLOGY, DEL, NAV, SET, Q, H6,
-            RB, LEGEND, BLOCKQUOTE, FEMERGE, MARQUEE, TIME, LISTING, TH, MASK,
-            SYMBOL, ANIMATEMOTION, POLYGON, COLGROUP, ABBR, FEGAUSSIANBLUR,
-            ADDRESS, MS, APPLET, FOREIGNOBJECT, FESPOTLIGHT, INPUT, RT, TT,
-            SCRIPT, FEDROPSHADOW, FECONVOLVEMATRIX, SUMMARY, BDO, DIR, KBD, A,
-            SVG, VAR, I, U, H4, DATA, TEXTAREA, DD, FEFLOOD, TD, ANIMATE,
-            CIRCLE, FEMERGENODE, FRAME, IFRAME, PICTURE, TABLE, ALTGLYPHDEF,
-            FEDIFFUSELIGHTING, ALTGLYPH, MPATH, TEXTPATH, MARK, DL, UL,
-            ANIMATETRANSFORM, MENUITEM, CAPTION, MAIN, SPAN, MO, HGROUP, STOP,
-            CENTER, FILTER, MARKER, TR, CANVAS, DETAILS, NOFRAMES, DT, BASEFONT,
-            DATALIST, FIELDSET, FEOFFSET, FEPOINTLIGHT, FONT, LINEARGRADIENT,
-            NOSCRIPT, OBJECT, PLAINTEXT, RECT, SELECT, TFOOT, MENU, SHADOW,
-            FECOLORMATRIX, BODY, RUBY, TBODY, BIG, COL, DFN, DIV, INS, MAP, PRE,
-            B, SUB, SUP, USE, G, XMP, P, S, H1, H3, H5, AREA, FEFUNCA, META,
-            FEFUNCB, DESC, BGSOUND, FEBLEND, HEAD, NOEMBED, THEAD, ARTICLE,
-            BASE, CODE, CITE, FETURBULENCE, FEIMAGE, FETILE, FIGURE, IMAGE,
-            LINE, POLYLINE, SOURCE, STYLE, TITLE, TEMPLATE, GLYPHREF, FEFUNCG,
-            FESPECULARLIGHTING, STRONG, CLIPPATH, MATH, PATH, SWITCH, LI, LINK,
-            MALIGNMARK, TRACK, HTML, LABEL, SMALL, ALTGLYPHITEM, ACRONYM, FORM,
-            PARAM, BUTTON, FIGCAPTION, KEYGEN, OPTION, PATTERN, SECTION, AUDIO,
-            VIDEO, FEDISPLACEMENTMAP, RP, SAMP, BR, ANIMATECOLOR, HR,
-            FECOMPONENTTRANSFER, FOOTER, HEADER, METER, };
-
-    private final static int[] ELEMENT_HASHES = { 1902641154, 1749395095,
-            2001349720, 893386754, 1803876550, 1971938532, 2007781534, 59821379,
-            1732381397, 1756600614, 1870135298, 1939219752, 1990037800,
-            2005324101, 2060065124, 55104723, 62450211, 1686489160, 1747048757,
-            1749932347, 1782357526, 1818755074, 1881669634, 1907959605,
-            1967760215, 1983533124, 1999917383, 2001392798, 2006329158,
-            2008994116, 2085266636, 52485715, 57733651, 60354131, 67633153,
-            960495618, 1703936002, 1736200310, 1747838298, 1749723735,
-            1753362711, 1757157700, 1786534215, 1805647874, 1854245076,
-            1874102998, 1898223949, 1906087319, 1932928296, 1965115924,
-            1968053806, 1982173479, 1986527234, 1998724870, 2001309869,
-            2001392795, 2003183333, 2005925890, 2006974466, 2008340774,
-            2051837468, 2068523856, 2092255447, 51438659, 52488851, 56151587,
-            59244545, 60347747, 61925907, 63438849, 69730305, 926941186,
-            1681770564, 1689922072, 1730150402, 1733076167, 1738539010,
-            1747306711, 1748225318, 1749673195, 1749813541, 1751386406,
-            1755148615, 1757137429, 1763839627, 1783388497, 1797585096,
-            1803929861, 1807599880, 1854228692, 1864368130, 1873281026,
-            1881498736, 1887579800, 1899272519, 1904412884, 1907435316,
-            1919418370, 1935549734, 1941221172, 1966223078, 1967795910,
-            1971461414, 1973420034, 1982935782, 1983633431, 1988763672,
-            1998585858, 1999397992, 2000525512, 2001349704, 2001349736,
-            2001392796, 2001495140, 2004635806, 2005719336, 2006028454,
-            2006896969, 2007601444, 2008125638, 2008851557, 2021937364,
-            2058653206, 2068523853, 2083120164, 2091479332, 2092557349,
-            51434643, 51961587, 52486755, 52490899, 55110883, 57206291,
-            58773795, 59768833, 60345171, 60352339, 61395251, 62390273,
-            62973651, 67108865, 68681729, 876609538, 910163970, 943718402,
-            1679960596, 1682547543, 1686491348, 1699324759, 1715310660,
-            1730965751, 1733054663, 1733890180, 1737099991, 1740181637,
-            1747176599, 1747814436, 1748100148, 1748359220, 1749656156,
-            1749715159, 1749801286, 1749905526, 1751288021, 1752979652,
-            1755076808, 1756474198, 1756625221, 1757146773, 1757268168,
-            1766992520, 1783210839, 1783388498, 1790207270, 1798686984,
-            1803929812, 1805502724, 1806806678, 1818230786, 1853642948,
-            1854228698, 1857653029, 1868312196, 1870268949, 1874053333,
-            1881288348, 1881613047, 1884120164, 1889085973, 1898753862,
-            1900845386, 1903302038, 1905563974, 1906135367, 1907661127,
-            1914900309, 1925844629, 1934172497, 1938817026, 1941178676,
-            1963982850, 1965334268, 1967128578, 1967788867, 1967795958,
-            1968836118, 1971465813, };
-
+public static final ElementName BIG = new ElementName("big", "big", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
+public static final ElementName BDO = new ElementName("bdo", "bdo", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName COL = new ElementName("col", "col", 
+// CPPONLY: NS_NewHTMLTableColElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.COL | SPECIAL);
+public static final ElementName DEL = new ElementName("del", "del", 
+// CPPONLY: NS_NewHTMLModElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName DFN = new ElementName("dfn", "dfn", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName DIR = new ElementName("dir", "dir", 
+// CPPONLY: NS_NewHTMLSharedElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+public static final ElementName DIV = new ElementName("div", "div", 
+// CPPONLY: NS_NewHTMLDivElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.DIV_OR_BLOCKQUOTE_OR_CENTER_OR_MENU | SPECIAL);
+public static final ElementName IMG = new ElementName("img", "img", 
+// CPPONLY: NS_NewHTMLImageElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.IMG | SPECIAL);
+public static final ElementName INS = new ElementName("ins", "ins", 
+// CPPONLY: NS_NewHTMLModElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName KBD = new ElementName("kbd", "kbd", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName MAP = new ElementName("map", "map", 
+// CPPONLY: NS_NewHTMLMapElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName NAV = new ElementName("nav", "nav", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+public static final ElementName PRE = new ElementName("pre", "pre", 
+// CPPONLY: NS_NewHTMLPreElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.PRE_OR_LISTING | SPECIAL);
+public static final ElementName A = new ElementName("a", "a", 
+// CPPONLY: NS_NewHTMLAnchorElement,
+// CPPONLY: NS_NewSVGAElement, 
+TreeBuilder.A);
+public static final ElementName B = new ElementName("b", "b", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
+public static final ElementName RTC = new ElementName("rtc", "rtc", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.RB_OR_RTC | OPTIONAL_END_TAG);
+public static final ElementName SUB = new ElementName("sub", "sub", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.RUBY_OR_SPAN_OR_SUB_OR_SUP_OR_VAR);
+public static final ElementName SVG = new ElementName("svg", "svg", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGSVGElement, 
+TreeBuilder.SVG);
+public static final ElementName SUP = new ElementName("sup", "sup", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.RUBY_OR_SPAN_OR_SUB_OR_SUP_OR_VAR);
+public static final ElementName SET = new ElementName("set", "set", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGSetElement, 
+TreeBuilder.OTHER);
+public static final ElementName USE = new ElementName("use", "use", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGUseElement, 
+TreeBuilder.OTHER);
+public static final ElementName VAR = new ElementName("var", "var", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.RUBY_OR_SPAN_OR_SUB_OR_SUP_OR_VAR);
+public static final ElementName G = new ElementName("g", "g", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGGElement, 
+TreeBuilder.OTHER);
+public static final ElementName WBR = new ElementName("wbr", "wbr", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.AREA_OR_WBR | SPECIAL);
+public static final ElementName XMP = new ElementName("xmp", "xmp", 
+// CPPONLY: NS_NewHTMLPreElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.XMP | SPECIAL);
+public static final ElementName I = new ElementName("i", "i", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
+public static final ElementName P = new ElementName("p", "p", 
+// CPPONLY: NS_NewHTMLParagraphElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.P | SPECIAL | OPTIONAL_END_TAG);
+public static final ElementName Q = new ElementName("q", "q", 
+// CPPONLY: NS_NewHTMLSharedElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName S = new ElementName("s", "s", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
+public static final ElementName U = new ElementName("u", "u", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
+public static final ElementName H1 = new ElementName("h1", "h1", 
+// CPPONLY: NS_NewHTMLHeadingElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6 | SPECIAL);
+public static final ElementName H2 = new ElementName("h2", "h2", 
+// CPPONLY: NS_NewHTMLHeadingElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6 | SPECIAL);
+public static final ElementName H3 = new ElementName("h3", "h3", 
+// CPPONLY: NS_NewHTMLHeadingElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6 | SPECIAL);
+public static final ElementName H4 = new ElementName("h4", "h4", 
+// CPPONLY: NS_NewHTMLHeadingElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6 | SPECIAL);
+public static final ElementName H5 = new ElementName("h5", "h5", 
+// CPPONLY: NS_NewHTMLHeadingElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6 | SPECIAL);
+public static final ElementName H6 = new ElementName("h6", "h6", 
+// CPPONLY: NS_NewHTMLHeadingElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6 | SPECIAL);
+public static final ElementName AREA = new ElementName("area", "area", 
+// CPPONLY: NS_NewHTMLAreaElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.AREA_OR_WBR | SPECIAL);
+public static final ElementName DATA = new ElementName("data", "data", 
+// CPPONLY: NS_NewHTMLDataElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName FEFUNCA = new ElementName("fefunca", "feFuncA", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGFEFuncAElement, 
+TreeBuilder.OTHER);
+public static final ElementName METADATA = new ElementName("metadata", "metadata", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGMetadataElement, 
+TreeBuilder.OTHER);
+public static final ElementName META = new ElementName("meta", "meta", 
+// CPPONLY: NS_NewHTMLMetaElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.META | SPECIAL);
+public static final ElementName TEXTAREA = new ElementName("textarea", "textarea", 
+// CPPONLY: NS_NewHTMLTextAreaElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.TEXTAREA | SPECIAL);
+public static final ElementName FEFUNCB = new ElementName("fefuncb", "feFuncB", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGFEFuncBElement, 
+TreeBuilder.OTHER);
+public static final ElementName RB = new ElementName("rb", "rb", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.RB_OR_RTC | OPTIONAL_END_TAG);
+public static final ElementName DESC = new ElementName("desc", "desc", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGDescElement, 
+TreeBuilder.FOREIGNOBJECT_OR_DESC | SCOPING_AS_SVG);
+public static final ElementName DD = new ElementName("dd", "dd", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.DD_OR_DT | SPECIAL | OPTIONAL_END_TAG);
+public static final ElementName BGSOUND = new ElementName("bgsound", "bgsound", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.LINK_OR_BASEFONT_OR_BGSOUND | SPECIAL);
+public static final ElementName EMBED = new ElementName("embed", "embed", 
+// CPPONLY: NS_NewHTMLEmbedElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.EMBED | SPECIAL);
+public static final ElementName FEBLEND = new ElementName("feblend", "feBlend", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGFEBlendElement, 
+TreeBuilder.OTHER);
+public static final ElementName FEFLOOD = new ElementName("feflood", "feFlood", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGFEFloodElement, 
+TreeBuilder.OTHER);
+public static final ElementName HEAD = new ElementName("head", "head", 
+// CPPONLY: NS_NewHTMLSharedElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.HEAD | SPECIAL | OPTIONAL_END_TAG);
+public static final ElementName LEGEND = new ElementName("legend", "legend", 
+// CPPONLY: NS_NewHTMLLegendElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName NOEMBED = new ElementName("noembed", "noembed", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.NOEMBED | SPECIAL);
+public static final ElementName TD = new ElementName("td", "td", 
+// CPPONLY: NS_NewHTMLTableCellElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.TD_OR_TH | SPECIAL | SCOPING | OPTIONAL_END_TAG);
+public static final ElementName THEAD = new ElementName("thead", "thead", 
+// CPPONLY: NS_NewHTMLTableSectionElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.TBODY_OR_THEAD_OR_TFOOT | SPECIAL | FOSTER_PARENTING | OPTIONAL_END_TAG);
+public static final ElementName ASIDE = new ElementName("aside", "aside", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+public static final ElementName ARTICLE = new ElementName("article", "article", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+public static final ElementName ANIMATE = new ElementName("animate", "animate", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGAnimateElement, 
+TreeBuilder.OTHER);
+public static final ElementName BASE = new ElementName("base", "base", 
+// CPPONLY: NS_NewHTMLSharedElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.BASE | SPECIAL);
+public static final ElementName BLOCKQUOTE = new ElementName("blockquote", "blockquote", 
+// CPPONLY: NS_NewHTMLSharedElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.DIV_OR_BLOCKQUOTE_OR_CENTER_OR_MENU | SPECIAL);
+public static final ElementName CODE = new ElementName("code", "code", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
+public static final ElementName CIRCLE = new ElementName("circle", "circle", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGCircleElement, 
+TreeBuilder.OTHER);
+public static final ElementName CITE = new ElementName("cite", "cite", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName ELLIPSE = new ElementName("ellipse", "ellipse", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGEllipseElement, 
+TreeBuilder.OTHER);
+public static final ElementName FETURBULENCE = new ElementName("feturbulence", "feTurbulence", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGFETurbulenceElement, 
+TreeBuilder.OTHER);
+public static final ElementName FEMERGENODE = new ElementName("femergenode", "feMergeNode", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGFEMergeNodeElement, 
+TreeBuilder.OTHER);
+public static final ElementName FEIMAGE = new ElementName("feimage", "feImage", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGFEImageElement, 
+TreeBuilder.OTHER);
+public static final ElementName FEMERGE = new ElementName("femerge", "feMerge", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGFEMergeElement, 
+TreeBuilder.OTHER);
+public static final ElementName FETILE = new ElementName("fetile", "feTile", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGFETileElement, 
+TreeBuilder.OTHER);
+public static final ElementName FRAME = new ElementName("frame", "frame", 
+// CPPONLY: NS_NewHTMLFrameElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.FRAME | SPECIAL);
+public static final ElementName FIGURE = new ElementName("figure", "figure", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+public static final ElementName FECOMPOSITE = new ElementName("fecomposite", "feComposite", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGFECompositeElement, 
+TreeBuilder.OTHER);
+public static final ElementName IMAGE = new ElementName("image", "image", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGImageElement, 
+TreeBuilder.IMAGE);
+public static final ElementName IFRAME = new ElementName("iframe", "iframe", 
+// CPPONLY: NS_NewHTMLIFrameElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.IFRAME | SPECIAL);
+public static final ElementName LINE = new ElementName("line", "line", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGLineElement, 
+TreeBuilder.OTHER);
+public static final ElementName MARQUEE = new ElementName("marquee", "marquee", 
+// CPPONLY: NS_NewHTMLDivElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.MARQUEE_OR_APPLET | SPECIAL | SCOPING);
+public static final ElementName POLYLINE = new ElementName("polyline", "polyline", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGPolylineElement, 
+TreeBuilder.OTHER);
+public static final ElementName PICTURE = new ElementName("picture", "picture", 
+// CPPONLY: NS_NewHTMLPictureElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName SOURCE = new ElementName("source", "source", 
+// CPPONLY: NS_NewHTMLSourceElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.PARAM_OR_SOURCE_OR_TRACK);
+public static final ElementName STRIKE = new ElementName("strike", "strike", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
+public static final ElementName STYLE = new ElementName("style", "style", 
+// CPPONLY: NS_NewHTMLStyleElement,
+// CPPONLY: NS_NewSVGStyleElement, 
+TreeBuilder.STYLE | SPECIAL);
+public static final ElementName TABLE = new ElementName("table", "table", 
+// CPPONLY: NS_NewHTMLTableElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.TABLE | SPECIAL | FOSTER_PARENTING | SCOPING);
+public static final ElementName TITLE = new ElementName("title", "title", 
+// CPPONLY: NS_NewHTMLTitleElement,
+// CPPONLY: NS_NewSVGTitleElement, 
+TreeBuilder.TITLE | SPECIAL | SCOPING_AS_SVG);
+public static final ElementName TIME = new ElementName("time", "time", 
+// CPPONLY: NS_NewHTMLTimeElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName TEMPLATE = new ElementName("template", "template", 
+// CPPONLY: NS_NewHTMLTemplateElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.TEMPLATE | SPECIAL | SCOPING);
+public static final ElementName ALTGLYPHDEF = new ElementName("altglyphdef", "altGlyphDef", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName GLYPHREF = new ElementName("glyphref", "glyphRef", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName DIALOG = new ElementName("dialog", "dialog", 
+// CPPONLY: NS_NewHTMLDialogElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+public static final ElementName FEFUNCG = new ElementName("fefuncg", "feFuncG", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGFEFuncGElement, 
+TreeBuilder.OTHER);
+public static final ElementName FEDIFFUSELIGHTING = new ElementName("fediffuselighting", "feDiffuseLighting", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGFEDiffuseLightingElement, 
+TreeBuilder.OTHER);
+public static final ElementName FESPECULARLIGHTING = new ElementName("fespecularlighting", "feSpecularLighting", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGFESpecularLightingElement, 
+TreeBuilder.OTHER);
+public static final ElementName LISTING = new ElementName("listing", "listing", 
+// CPPONLY: NS_NewHTMLPreElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.PRE_OR_LISTING | SPECIAL);
+public static final ElementName STRONG = new ElementName("strong", "strong", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
+public static final ElementName ALTGLYPH = new ElementName("altglyph", "altGlyph", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName CLIPPATH = new ElementName("clippath", "clipPath", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGClipPathElement, 
+TreeBuilder.OTHER);
+public static final ElementName MGLYPH = new ElementName("mglyph", "mglyph", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.MGLYPH_OR_MALIGNMARK);
+public static final ElementName MATH = new ElementName("math", "math", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.MATH);
+public static final ElementName MPATH = new ElementName("mpath", "mpath", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGMPathElement, 
+TreeBuilder.OTHER);
+public static final ElementName PATH = new ElementName("path", "path", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGPathElement, 
+TreeBuilder.OTHER);
+public static final ElementName TH = new ElementName("th", "th", 
+// CPPONLY: NS_NewHTMLTableCellElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.TD_OR_TH | SPECIAL | SCOPING | OPTIONAL_END_TAG);
+public static final ElementName SWITCH = new ElementName("switch", "switch", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGSwitchElement, 
+TreeBuilder.OTHER);
+public static final ElementName TEXTPATH = new ElementName("textpath", "textPath", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGTextPathElement, 
+TreeBuilder.OTHER);
+public static final ElementName LI = new ElementName("li", "li", 
+// CPPONLY: NS_NewHTMLLIElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.LI | SPECIAL | OPTIONAL_END_TAG);
+public static final ElementName MI = new ElementName("mi", "mi", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.MI_MO_MN_MS_MTEXT | SCOPING_AS_MATHML);
+public static final ElementName LINK = new ElementName("link", "link", 
+// CPPONLY: NS_NewHTMLLinkElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.LINK_OR_BASEFONT_OR_BGSOUND | SPECIAL);
+public static final ElementName MARK = new ElementName("mark", "mark", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName MALIGNMARK = new ElementName("malignmark", "malignmark", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.MGLYPH_OR_MALIGNMARK);
+public static final ElementName MASK = new ElementName("mask", "mask", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGMaskElement, 
+TreeBuilder.OTHER);
+public static final ElementName TRACK = new ElementName("track", "track", 
+// CPPONLY: NS_NewHTMLTrackElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.PARAM_OR_SOURCE_OR_TRACK | SPECIAL);
+public static final ElementName DL = new ElementName("dl", "dl", 
+// CPPONLY: NS_NewHTMLSharedListElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.UL_OR_OL_OR_DL | SPECIAL);
+public static final ElementName HTML = new ElementName("html", "html", 
+// CPPONLY: NS_NewHTMLSharedElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.HTML | SPECIAL | SCOPING | OPTIONAL_END_TAG);
+public static final ElementName OL = new ElementName("ol", "ol", 
+// CPPONLY: NS_NewHTMLSharedListElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.UL_OR_OL_OR_DL | SPECIAL);
+public static final ElementName LABEL = new ElementName("label", "label", 
+// CPPONLY: NS_NewHTMLLabelElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName UL = new ElementName("ul", "ul", 
+// CPPONLY: NS_NewHTMLSharedListElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.UL_OR_OL_OR_DL | SPECIAL);
+public static final ElementName SMALL = new ElementName("small", "small", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
+public static final ElementName SYMBOL = new ElementName("symbol", "symbol", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGSymbolElement, 
+TreeBuilder.OTHER);
+public static final ElementName ALTGLYPHITEM = new ElementName("altglyphitem", "altGlyphItem", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName ANIMATETRANSFORM = new ElementName("animatetransform", "animateTransform", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGAnimateTransformElement, 
+TreeBuilder.OTHER);
+public static final ElementName ACRONYM = new ElementName("acronym", "acronym", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName EM = new ElementName("em", "em", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
+public static final ElementName FORM = new ElementName("form", "form", 
+// CPPONLY: NS_NewHTMLFormElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.FORM | SPECIAL);
+public static final ElementName MENUITEM = new ElementName("menuitem", "menuitem", 
+// CPPONLY: NS_NewHTMLMenuItemElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.MENUITEM);
+public static final ElementName PARAM = new ElementName("param", "param", 
+// CPPONLY: NS_NewHTMLSharedElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.PARAM_OR_SOURCE_OR_TRACK | SPECIAL);
+public static final ElementName ANIMATEMOTION = new ElementName("animatemotion", "animateMotion", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGAnimateMotionElement, 
+TreeBuilder.OTHER);
+public static final ElementName BUTTON = new ElementName("button", "button", 
+// CPPONLY: NS_NewHTMLButtonElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.BUTTON | SPECIAL);
+public static final ElementName CAPTION = new ElementName("caption", "caption", 
+// CPPONLY: NS_NewHTMLTableCaptionElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.CAPTION | SPECIAL | SCOPING);
+public static final ElementName FIGCAPTION = new ElementName("figcaption", "figcaption", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+public static final ElementName MN = new ElementName("mn", "mn", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.MI_MO_MN_MS_MTEXT | SCOPING_AS_MATHML);
+public static final ElementName KEYGEN = new ElementName("keygen", "keygen", 
+// CPPONLY: NS_NewHTMLSpanElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.KEYGEN);
+public static final ElementName MAIN = new ElementName("main", "main", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+public static final ElementName OPTION = new ElementName("option", "option", 
+// CPPONLY: NS_NewHTMLOptionElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OPTION | OPTIONAL_END_TAG);
+public static final ElementName POLYGON = new ElementName("polygon", "polygon", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGPolygonElement, 
+TreeBuilder.OTHER);
+public static final ElementName PATTERN = new ElementName("pattern", "pattern", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGPatternElement, 
+TreeBuilder.OTHER);
+public static final ElementName SPAN = new ElementName("span", "span", 
+// CPPONLY: NS_NewHTMLSpanElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.RUBY_OR_SPAN_OR_SUB_OR_SUP_OR_VAR);
+public static final ElementName SECTION = new ElementName("section", "section", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+public static final ElementName TSPAN = new ElementName("tspan", "tspan", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGTSpanElement, 
+TreeBuilder.OTHER);
+public static final ElementName AUDIO = new ElementName("audio", "audio", 
+// CPPONLY: NS_NewHTMLAudioElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName MO = new ElementName("mo", "mo", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.MI_MO_MN_MS_MTEXT | SCOPING_AS_MATHML);
+public static final ElementName VIDEO = new ElementName("video", "video", 
+// CPPONLY: NS_NewHTMLVideoElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName COLGROUP = new ElementName("colgroup", "colgroup", 
+// CPPONLY: NS_NewHTMLTableColElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.COLGROUP | SPECIAL | OPTIONAL_END_TAG);
+public static final ElementName FEDISPLACEMENTMAP = new ElementName("fedisplacementmap", "feDisplacementMap", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGFEDisplacementMapElement, 
+TreeBuilder.OTHER);
+public static final ElementName HGROUP = new ElementName("hgroup", "hgroup", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+public static final ElementName RP = new ElementName("rp", "rp", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.RT_OR_RP | OPTIONAL_END_TAG);
+public static final ElementName OPTGROUP = new ElementName("optgroup", "optgroup", 
+// CPPONLY: NS_NewHTMLOptGroupElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OPTGROUP | OPTIONAL_END_TAG);
+public static final ElementName SAMP = new ElementName("samp", "samp", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName STOP = new ElementName("stop", "stop", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGStopElement, 
+TreeBuilder.OTHER);
+public static final ElementName BR = new ElementName("br", "br", 
+// CPPONLY: NS_NewHTMLBRElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.BR | SPECIAL);
+public static final ElementName ABBR = new ElementName("abbr", "abbr", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName ANIMATECOLOR = new ElementName("animatecolor", "animateColor", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName CENTER = new ElementName("center", "center", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.DIV_OR_BLOCKQUOTE_OR_CENTER_OR_MENU | SPECIAL);
+public static final ElementName HR = new ElementName("hr", "hr", 
+// CPPONLY: NS_NewHTMLHRElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.HR | SPECIAL);
+public static final ElementName FEFUNCR = new ElementName("fefuncr", "feFuncR", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGFEFuncRElement, 
+TreeBuilder.OTHER);
+public static final ElementName FECOMPONENTTRANSFER = new ElementName("fecomponenttransfer", "feComponentTransfer", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGFEComponentTransferElement, 
+TreeBuilder.OTHER);
+public static final ElementName FILTER = new ElementName("filter", "filter", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGFilterElement, 
+TreeBuilder.OTHER);
+public static final ElementName FOOTER = new ElementName("footer", "footer", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+public static final ElementName FEGAUSSIANBLUR = new ElementName("fegaussianblur", "feGaussianBlur", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGFEGaussianBlurElement, 
+TreeBuilder.OTHER);
+public static final ElementName HEADER = new ElementName("header", "header", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+public static final ElementName MARKER = new ElementName("marker", "marker", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGMarkerElement, 
+TreeBuilder.OTHER);
+public static final ElementName METER = new ElementName("meter", "meter", 
+// CPPONLY: NS_NewHTMLMeterElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName NOBR = new ElementName("nobr", "nobr", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.NOBR);
+public static final ElementName TR = new ElementName("tr", "tr", 
+// CPPONLY: NS_NewHTMLTableRowElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.TR | SPECIAL | FOSTER_PARENTING | OPTIONAL_END_TAG);
+public static final ElementName ADDRESS = new ElementName("address", "address", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+public static final ElementName CANVAS = new ElementName("canvas", "canvas", 
+// CPPONLY: NS_NewHTMLCanvasElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName DEFS = new ElementName("defs", "defs", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGDefsElement, 
+TreeBuilder.OTHER);
+public static final ElementName DETAILS = new ElementName("details", "details", 
+// CPPONLY: NS_NewHTMLDetailsElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+public static final ElementName MS = new ElementName("ms", "ms", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.MI_MO_MN_MS_MTEXT | SCOPING_AS_MATHML);
+public static final ElementName NOFRAMES = new ElementName("noframes", "noframes", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.NOFRAMES | SPECIAL);
+public static final ElementName PROGRESS = new ElementName("progress", "progress", 
+// CPPONLY: NS_NewHTMLProgressElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName DT = new ElementName("dt", "dt", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.DD_OR_DT | SPECIAL | OPTIONAL_END_TAG);
+public static final ElementName APPLET = new ElementName("applet", "applet", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.MARQUEE_OR_APPLET | SPECIAL | SCOPING);
+public static final ElementName BASEFONT = new ElementName("basefont", "basefont", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.LINK_OR_BASEFONT_OR_BGSOUND | SPECIAL);
+public static final ElementName CONTENT = new ElementName("content", "content", 
+// CPPONLY: NS_NewHTMLContentElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName DATALIST = new ElementName("datalist", "datalist", 
+// CPPONLY: NS_NewHTMLDataListElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OTHER);
+public static final ElementName FOREIGNOBJECT = new ElementName("foreignobject", "foreignObject", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGForeignObjectElement, 
+TreeBuilder.FOREIGNOBJECT_OR_DESC | SCOPING_AS_SVG);
+public static final ElementName FIELDSET = new ElementName("fieldset", "fieldset", 
+// CPPONLY: NS_NewHTMLFieldSetElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.FIELDSET | SPECIAL);
+public static final ElementName FRAMESET = new ElementName("frameset", "frameset", 
+// CPPONLY: NS_NewHTMLFrameSetElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.FRAMESET | SPECIAL);
+public static final ElementName FEOFFSET = new ElementName("feoffset", "feOffset", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGFEOffsetElement, 
+TreeBuilder.OTHER);
+public static final ElementName FESPOTLIGHT = new ElementName("fespotlight", "feSpotLight", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGFESpotLightElement, 
+TreeBuilder.OTHER);
+public static final ElementName FEPOINTLIGHT = new ElementName("fepointlight", "fePointLight", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGFEPointLightElement, 
+TreeBuilder.OTHER);
+public static final ElementName FEDISTANTLIGHT = new ElementName("fedistantlight", "feDistantLight", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGFEDistantLightElement, 
+TreeBuilder.OTHER);
+public static final ElementName FONT = new ElementName("font", "font", 
+// CPPONLY: NS_NewHTMLFontElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.FONT);
+public static final ElementName INPUT = new ElementName("input", "input", 
+// CPPONLY: NS_NewHTMLInputElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.INPUT | SPECIAL);
+public static final ElementName LINEARGRADIENT = new ElementName("lineargradient", "linearGradient", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGLinearGradientElement, 
+TreeBuilder.OTHER);
+public static final ElementName MTEXT = new ElementName("mtext", "mtext", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.MI_MO_MN_MS_MTEXT | SCOPING_AS_MATHML);
+public static final ElementName NOSCRIPT = new ElementName("noscript", "noscript", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.NOSCRIPT | SPECIAL);
+public static final ElementName RT = new ElementName("rt", "rt", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.RT_OR_RP | OPTIONAL_END_TAG);
+public static final ElementName OBJECT = new ElementName("object", "object", 
+// CPPONLY: NS_NewHTMLObjectElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OBJECT | SPECIAL | SCOPING);
+public static final ElementName OUTPUT = new ElementName("output", "output", 
+// CPPONLY: NS_NewHTMLOutputElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.OUTPUT);
+public static final ElementName PLAINTEXT = new ElementName("plaintext", "plaintext", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.PLAINTEXT | SPECIAL);
+public static final ElementName TT = new ElementName("tt", "tt", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
+public static final ElementName RECT = new ElementName("rect", "rect", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGRectElement, 
+TreeBuilder.OTHER);
+public static final ElementName RADIALGRADIENT = new ElementName("radialgradient", "radialGradient", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGRadialGradientElement, 
+TreeBuilder.OTHER);
+public static final ElementName SELECT = new ElementName("select", "select", 
+// CPPONLY: NS_NewHTMLSelectElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.SELECT | SPECIAL);
+public static final ElementName SCRIPT = new ElementName("script", "script", 
+// CPPONLY: NS_NewHTMLScriptElement,
+// CPPONLY: NS_NewSVGScriptElement, 
+TreeBuilder.SCRIPT | SPECIAL);
+public static final ElementName TFOOT = new ElementName("tfoot", "tfoot", 
+// CPPONLY: NS_NewHTMLTableSectionElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.TBODY_OR_THEAD_OR_TFOOT | SPECIAL | FOSTER_PARENTING | OPTIONAL_END_TAG);
+public static final ElementName TEXT = new ElementName("text", "text", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGTextElement, 
+TreeBuilder.OTHER);
+public static final ElementName MENU = new ElementName("menu", "menu", 
+// CPPONLY: NS_NewHTMLMenuElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.DIV_OR_BLOCKQUOTE_OR_CENTER_OR_MENU | SPECIAL);
+public static final ElementName FEDROPSHADOW = new ElementName("fedropshadow", "feDropShadow", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGFEDropShadowElement, 
+TreeBuilder.OTHER);
+public static final ElementName VIEW = new ElementName("view", "view", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGViewElement, 
+TreeBuilder.OTHER);
+public static final ElementName FECOLORMATRIX = new ElementName("fecolormatrix", "feColorMatrix", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGFEColorMatrixElement, 
+TreeBuilder.OTHER);
+public static final ElementName FECONVOLVEMATRIX = new ElementName("feconvolvematrix", "feConvolveMatrix", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGFEConvolveMatrixElement, 
+TreeBuilder.OTHER);
+public static final ElementName BODY = new ElementName("body", "body", 
+// CPPONLY: NS_NewHTMLBodyElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.BODY | SPECIAL | OPTIONAL_END_TAG);
+public static final ElementName FEMORPHOLOGY = new ElementName("femorphology", "feMorphology", 
+// CPPONLY: NS_NewHTMLUnknownElement,
+// CPPONLY: NS_NewSVGFEMorphologyElement, 
+TreeBuilder.OTHER);
+public static final ElementName RUBY = new ElementName("ruby", "ruby", 
+// CPPONLY: NS_NewHTMLElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.RUBY_OR_SPAN_OR_SUB_OR_SUP_OR_VAR);
+public static final ElementName SUMMARY = new ElementName("summary", "summary", 
+// CPPONLY: NS_NewHTMLSummaryElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIALOG_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_MAIN_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
+public static final ElementName TBODY = new ElementName("tbody", "tbody", 
+// CPPONLY: NS_NewHTMLTableSectionElement,
+// CPPONLY: NS_NewSVGUnknownElement, 
+TreeBuilder.TBODY_OR_THEAD_OR_TFOOT | SPECIAL | FOSTER_PARENTING | OPTIONAL_END_TAG);
+private final static @NoLength ElementName[] ELEMENT_NAMES = {
+MN,
+ELLIPSE,
+FIELDSET,
+H2,
+MGLYPH,
+METER,
+RECT,
+RTC,
+EMBED,
+STRIKE,
+OL,
+OPTGROUP,
+NOFRAMES,
+LINEARGRADIENT,
+VIEW,
+IMG,
+WBR,
+METADATA,
+ASIDE,
+FECOMPOSITE,
+DIALOG,
+MI,
+EM,
+TSPAN,
+FEFUNCR,
+CANVAS,
+BASEFONT,
+FEPOINTLIGHT,
+OBJECT,
+TFOOT,
+FEMORPHOLOGY,
+DEL,
+NAV,
+SET,
+Q,
+H6,
+RB,
+LEGEND,
+BLOCKQUOTE,
+FEMERGE,
+MARQUEE,
+TIME,
+LISTING,
+TH,
+MASK,
+SYMBOL,
+ANIMATEMOTION,
+POLYGON,
+COLGROUP,
+ABBR,
+FEGAUSSIANBLUR,
+TR,
+DETAILS,
+DT,
+DATALIST,
+FEOFFSET,
+FONT,
+NOSCRIPT,
+PLAINTEXT,
+SELECT,
+MENU,
+FECONVOLVEMATRIX,
+SUMMARY,
+BDO,
+DIR,
+KBD,
+A,
+SVG,
+VAR,
+I,
+U,
+H4,
+DATA,
+TEXTAREA,
+DD,
+FEFLOOD,
+TD,
+ANIMATE,
+CIRCLE,
+FEMERGENODE,
+FRAME,
+IFRAME,
+PICTURE,
+TABLE,
+ALTGLYPHDEF,
+FEDIFFUSELIGHTING,
+ALTGLYPH,
+MPATH,
+TEXTPATH,
+MARK,
+DL,
+UL,
+ANIMATETRANSFORM,
+MENUITEM,
+CAPTION,
+MAIN,
+SPAN,
+MO,
+HGROUP,
+STOP,
+CENTER,
+FILTER,
+MARKER,
+NOBR,
+ADDRESS,
+DEFS,
+MS,
+PROGRESS,
+APPLET,
+CONTENT,
+FOREIGNOBJECT,
+FRAMESET,
+FESPOTLIGHT,
+FEDISTANTLIGHT,
+INPUT,
+MTEXT,
+RT,
+OUTPUT,
+TT,
+RADIALGRADIENT,
+SCRIPT,
+TEXT,
+FEDROPSHADOW,
+FECOLORMATRIX,
+BODY,
+RUBY,
+TBODY,
+BIG,
+COL,
+DFN,
+DIV,
+INS,
+MAP,
+PRE,
+B,
+SUB,
+SUP,
+USE,
+G,
+XMP,
+P,
+S,
+H1,
+H3,
+H5,
+AREA,
+FEFUNCA,
+META,
+FEFUNCB,
+DESC,
+BGSOUND,
+FEBLEND,
+HEAD,
+NOEMBED,
+THEAD,
+ARTICLE,
+BASE,
+CODE,
+CITE,
+FETURBULENCE,
+FEIMAGE,
+FETILE,
+FIGURE,
+IMAGE,
+LINE,
+POLYLINE,
+SOURCE,
+STYLE,
+TITLE,
+TEMPLATE,
+GLYPHREF,
+FEFUNCG,
+FESPECULARLIGHTING,
+STRONG,
+CLIPPATH,
+MATH,
+PATH,
+SWITCH,
+LI,
+LINK,
+MALIGNMARK,
+TRACK,
+HTML,
+LABEL,
+SMALL,
+ALTGLYPHITEM,
+ACRONYM,
+FORM,
+PARAM,
+BUTTON,
+FIGCAPTION,
+KEYGEN,
+OPTION,
+PATTERN,
+SECTION,
+AUDIO,
+VIDEO,
+FEDISPLACEMENTMAP,
+RP,
+SAMP,
+BR,
+ANIMATECOLOR,
+HR,
+FECOMPONENTTRANSFER,
+FOOTER,
+HEADER,
+};
+private final static int[] ELEMENT_HASHES = {
+1902641154,
+1749395095,
+2001349704,
+893386754,
+1803876550,
+1971465813,
+2007601444,
+59821379,
+1732381397,
+1756600614,
+1870135298,
+1939219752,
+1988763672,
+2004635806,
+2060065124,
+55104723,
+62450211,
+1686489160,
+1747048757,
+1749932347,
+1782357526,
+1818755074,
+1881669634,
+1907959605,
+1967760215,
+1982935782,
+1999397992,
+2001392796,
+2006028454,
+2008851557,
+2085266636,
+52485715,
+57733651,
+60354131,
+67633153,
+960495618,
+1703936002,
+1736200310,
+1747838298,
+1749723735,
+1753362711,
+1757157700,
+1786534215,
+1805647874,
+1854245076,
+1874102998,
+1898223949,
+1906087319,
+1932928296,
+1965115924,
+1968053806,
+1973420034,
+1983633431,
+1998585858,
+2000525512,
+2001349736,
+2001495140,
+2005719336,
+2006896969,
+2008125638,
+2021937364,
+2068523856,
+2092255447,
+51438659,
+52488851,
+56151587,
+59244545,
+60347747,
+61925907,
+63438849,
+69730305,
+926941186,
+1681770564,
+1689922072,
+1730150402,
+1733076167,
+1738539010,
+1747306711,
+1748225318,
+1749673195,
+1749813541,
+1751386406,
+1755148615,
+1757137429,
+1763839627,
+1783388497,
+1797585096,
+1803929861,
+1807599880,
+1854228692,
+1864368130,
+1873281026,
+1881498736,
+1887579800,
+1899272519,
+1904412884,
+1907435316,
+1919418370,
+1935549734,
+1941221172,
+1966223078,
+1967795910,
+1971461414,
+1971938532,
+1982173479,
+1983533124,
+1986527234,
+1990037800,
+1998724870,
+1999917383,
+2001309869,
+2001349720,
+2001392795,
+2001392798,
+2003183333,
+2005324101,
+2005925890,
+2006329158,
+2006974466,
+2007781534,
+2008340774,
+2008994116,
+2051837468,
+2068523853,
+2083120164,
+2091479332,
+2092557349,
+51434643,
+51961587,
+52486755,
+52490899,
+55110883,
+57206291,
+58773795,
+59768833,
+60345171,
+60352339,
+61395251,
+62390273,
+62973651,
+67108865,
+68681729,
+876609538,
+910163970,
+943718402,
+1679960596,
+1682547543,
+1686491348,
+1699324759,
+1715310660,
+1730965751,
+1733054663,
+1733890180,
+1737099991,
+1740181637,
+1747176599,
+1747814436,
+1748100148,
+1748359220,
+1749656156,
+1749715159,
+1749801286,
+1749905526,
+1751288021,
+1752979652,
+1755076808,
+1756474198,
+1756625221,
+1757146773,
+1757268168,
+1766992520,
+1783210839,
+1783388498,
+1790207270,
+1798686984,
+1803929812,
+1805502724,
+1806806678,
+1818230786,
+1853642948,
+1854228698,
+1857653029,
+1868312196,
+1870268949,
+1874053333,
+1881288348,
+1881613047,
+1884120164,
+1889085973,
+1898753862,
+1900845386,
+1903302038,
+1905563974,
+1906135367,
+1907661127,
+1914900309,
+1925844629,
+1934172497,
+1938817026,
+1941178676,
+1963982850,
+1965334268,
+1967128578,
+1967788867,
+1967795958,
+1968836118,
+};
 }
--- a/parser/html/nsHtml5ElementName.cpp
+++ b/parser/html/nsHtml5ElementName.cpp
@@ -279,62 +279,61 @@ nsHtml5ElementName* nsHtml5ElementName::
 nsHtml5ElementName* nsHtml5ElementName::ELT_RECT = nullptr;
 nsHtml5ElementName* nsHtml5ElementName::ELT_RADIALGRADIENT = nullptr;
 nsHtml5ElementName* nsHtml5ElementName::ELT_SELECT = nullptr;
 nsHtml5ElementName* nsHtml5ElementName::ELT_SCRIPT = nullptr;
 nsHtml5ElementName* nsHtml5ElementName::ELT_TFOOT = nullptr;
 nsHtml5ElementName* nsHtml5ElementName::ELT_TEXT = nullptr;
 nsHtml5ElementName* nsHtml5ElementName::ELT_MENU = nullptr;
 nsHtml5ElementName* nsHtml5ElementName::ELT_FEDROPSHADOW = nullptr;
-nsHtml5ElementName* nsHtml5ElementName::ELT_SHADOW = nullptr;
 nsHtml5ElementName* nsHtml5ElementName::ELT_VIEW = nullptr;
 nsHtml5ElementName* nsHtml5ElementName::ELT_FECOLORMATRIX = nullptr;
 nsHtml5ElementName* nsHtml5ElementName::ELT_FECONVOLVEMATRIX = nullptr;
 nsHtml5ElementName* nsHtml5ElementName::ELT_BODY = nullptr;
 nsHtml5ElementName* nsHtml5ElementName::ELT_FEMORPHOLOGY = nullptr;
 nsHtml5ElementName* nsHtml5ElementName::ELT_RUBY = nullptr;
 nsHtml5ElementName* nsHtml5ElementName::ELT_SUMMARY = nullptr;
 nsHtml5ElementName* nsHtml5ElementName::ELT_TBODY = nullptr;
 nsHtml5ElementName** nsHtml5ElementName::ELEMENT_NAMES = 0;
 static int32_t const ELEMENT_HASHES_DATA[] = {
-  1902641154, 1749395095, 2001349720, 893386754,  1803876550, 1971938532,
-  2007781534, 59821379,   1732381397, 1756600614, 1870135298, 1939219752,
-  1990037800, 2005324101, 2060065124, 55104723,   62450211,   1686489160,
+  1902641154, 1749395095, 2001349704, 893386754,  1803876550, 1971465813,
+  2007601444, 59821379,   1732381397, 1756600614, 1870135298, 1939219752,
+  1988763672, 2004635806, 2060065124, 55104723,   62450211,   1686489160,
   1747048757, 1749932347, 1782357526, 1818755074, 1881669634, 1907959605,
-  1967760215, 1983533124, 1999917383, 2001392798, 2006329158, 2008994116,
+  1967760215, 1982935782, 1999397992, 2001392796, 2006028454, 2008851557,
   2085266636, 52485715,   57733651,   60354131,   67633153,   960495618,
   1703936002, 1736200310, 1747838298, 1749723735, 1753362711, 1757157700,
   1786534215, 1805647874, 1854245076, 1874102998, 1898223949, 1906087319,
-  1932928296, 1965115924, 1968053806, 1982173479, 1986527234, 1998724870,
-  2001309869, 2001392795, 2003183333, 2005925890, 2006974466, 2008340774,
-  2051837468, 2068523856, 2092255447, 51438659,   52488851,   56151587,
+  1932928296, 1965115924, 1968053806, 1973420034, 1983633431, 1998585858,
+  2000525512, 2001349736, 2001495140, 2005719336, 2006896969, 2008125638,
+  2021937364, 2068523856, 2092255447, 51438659,   52488851,   56151587,
   59244545,   60347747,   61925907,   63438849,   69730305,   926941186,
   1681770564, 1689922072, 1730150402, 1733076167, 1738539010, 1747306711,
   1748225318, 1749673195, 1749813541, 1751386406, 1755148615, 1757137429,
   1763839627, 1783388497, 1797585096, 1803929861, 1807599880, 1854228692,
   1864368130, 1873281026, 1881498736, 1887579800, 1899272519, 1904412884,
   1907435316, 1919418370, 1935549734, 1941221172, 1966223078, 1967795910,
-  1971461414, 1973420034, 1982935782, 1983633431, 1988763672, 1998585858,
-  1999397992, 2000525512, 2001349704, 2001349736, 2001392796, 2001495140,
-  2004635806, 2005719336, 2006028454, 2006896969, 2007601444, 2008125638,
-  2008851557, 2021937364, 2058653206, 2068523853, 2083120164, 2091479332,
+  1971461414, 1971938532, 1982173479, 1983533124, 1986527234, 1990037800,
+  1998724870, 1999917383, 2001309869, 2001349720, 2001392795, 2001392798,
+  2003183333, 2005324101, 2005925890, 2006329158, 2006974466, 2007781534,
+  2008340774, 2008994116, 2051837468, 2068523853, 2083120164, 2091479332,
   2092557349, 51434643,   51961587,   52486755,   52490899,   55110883,
   57206291,   58773795,   59768833,   60345171,   60352339,   61395251,
   62390273,   62973651,   67108865,   68681729,   876609538,  910163970,
   943718402,  1679960596, 1682547543, 1686491348, 1699324759, 1715310660,
   1730965751, 1733054663, 1733890180, 1737099991, 1740181637, 1747176599,
   1747814436, 1748100148, 1748359220, 1749656156, 1749715159, 1749801286,
   1749905526, 1751288021, 1752979652, 1755076808, 1756474198, 1756625221,
   1757146773, 1757268168, 1766992520, 1783210839, 1783388498, 1790207270,
   1798686984, 1803929812, 1805502724, 1806806678, 1818230786, 1853642948,
   1854228698, 1857653029, 1868312196, 1870268949, 1874053333, 1881288348,
   1881613047, 1884120164, 1889085973, 1898753862, 1900845386, 1903302038,
   1905563974, 1906135367, 1907661127, 1914900309, 1925844629, 1934172497,
   1938817026, 1941178676, 1963982850, 1965334268, 1967128578, 1967788867,
-  1967795958, 1968836118, 1971465813
+  1967795958, 1968836118
 };
 staticJArray<int32_t,int32_t> nsHtml5ElementName::ELEMENT_HASHES = { ELEMENT_HASHES_DATA, MOZ_ARRAY_LENGTH(ELEMENT_HASHES_DATA) };
 void
 nsHtml5ElementName::initializeStatics()
 {
   ELT_ANNOTATION_XML = new nsHtml5ElementName(
     nsGkAtoms::annotation_xml_,
     nsGkAtoms::annotation_xml_,
@@ -1453,21 +1452,16 @@ nsHtml5ElementName::initializeStatics()
     NS_NewHTMLMenuElement,
     NS_NewSVGUnknownElement,
     nsHtml5TreeBuilder::DIV_OR_BLOCKQUOTE_OR_CENTER_OR_MENU | SPECIAL);
   ELT_FEDROPSHADOW = new nsHtml5ElementName(nsGkAtoms::fedropshadow,
                                             nsGkAtoms::feDropShadow,
                                             NS_NewHTMLUnknownElement,
                                             NS_NewSVGFEDropShadowElement,
                                             nsHtml5TreeBuilder::OTHER);
-  ELT_SHADOW = new nsHtml5ElementName(nsGkAtoms::shadow,
-                                      nsGkAtoms::shadow,
-                                      NS_NewHTMLShadowElement,
-                                      NS_NewSVGUnknownElement,
-                                      nsHtml5TreeBuilder::OTHER);
   ELT_VIEW = new nsHtml5ElementName(nsGkAtoms::view,
                                     nsGkAtoms::view,
                                     NS_NewHTMLUnknownElement,
                                     NS_NewSVGViewElement,
                                     nsHtml5TreeBuilder::OTHER);
   ELT_FECOLORMATRIX = new nsHtml5ElementName(nsGkAtoms::fecolormatrix,
                                              nsGkAtoms::feColorMatrix,
                                              NS_NewHTMLUnknownElement,
@@ -1506,47 +1500,47 @@ nsHtml5ElementName::initializeStatics()
       SPECIAL);
   ELT_TBODY =
     new nsHtml5ElementName(nsGkAtoms::tbody,
                            nsGkAtoms::tbody,
                            NS_NewHTMLTableSectionElement,
                            NS_NewSVGUnknownElement,
                            nsHtml5TreeBuilder::TBODY_OR_THEAD_OR_TFOOT |
                              SPECIAL | FOSTER_PARENTING | OPTIONAL_END_TAG);
-  ELEMENT_NAMES = new nsHtml5ElementName*[207];
+  ELEMENT_NAMES = new nsHtml5ElementName*[206];
   ELEMENT_NAMES[0] = ELT_MN;
   ELEMENT_NAMES[1] = ELT_ELLIPSE;
-  ELEMENT_NAMES[2] = ELT_FRAMESET;
+  ELEMENT_NAMES[2] = ELT_FIELDSET;
   ELEMENT_NAMES[3] = ELT_H2;
   ELEMENT_NAMES[4] = ELT_MGLYPH;
-  ELEMENT_NAMES[5] = ELT_NOBR;
-  ELEMENT_NAMES[6] = ELT_RADIALGRADIENT;
+  ELEMENT_NAMES[5] = ELT_METER;
+  ELEMENT_NAMES[6] = ELT_RECT;
   ELEMENT_NAMES[7] = ELT_RTC;
   ELEMENT_NAMES[8] = ELT_EMBED;
   ELEMENT_NAMES[9] = ELT_STRIKE;
   ELEMENT_NAMES[10] = ELT_OL;
   ELEMENT_NAMES[11] = ELT_OPTGROUP;
-  ELEMENT_NAMES[12] = ELT_PROGRESS;
-  ELEMENT_NAMES[13] = ELT_MTEXT;
+  ELEMENT_NAMES[12] = ELT_NOFRAMES;
+  ELEMENT_NAMES[13] = ELT_LINEARGRADIENT;
   ELEMENT_NAMES[14] = ELT_VIEW;
   ELEMENT_NAMES[15] = ELT_IMG;
   ELEMENT_NAMES[16] = ELT_WBR;
   ELEMENT_NAMES[17] = ELT_METADATA;
   ELEMENT_NAMES[18] = ELT_ASIDE;
   ELEMENT_NAMES[19] = ELT_FECOMPOSITE;
   ELEMENT_NAMES[20] = ELT_DIALOG;
   ELEMENT_NAMES[21] = ELT_MI;
   ELEMENT_NAMES[22] = ELT_EM;
   ELEMENT_NAMES[23] = ELT_TSPAN;
   ELEMENT_NAMES[24] = ELT_FEFUNCR;
-  ELEMENT_NAMES[25] = ELT_DEFS;
-  ELEMENT_NAMES[26] = ELT_CONTENT;
-  ELEMENT_NAMES[27] = ELT_FEDISTANTLIGHT;
-  ELEMENT_NAMES[28] = ELT_OUTPUT;
-  ELEMENT_NAMES[29] = ELT_TEXT;
+  ELEMENT_NAMES[25] = ELT_CANVAS;
+  ELEMENT_NAMES[26] = ELT_BASEFONT;
+  ELEMENT_NAMES[27] = ELT_FEPOINTLIGHT;
+  ELEMENT_NAMES[28] = ELT_OBJECT;
+  ELEMENT_NAMES[29] = ELT_TFOOT;
   ELEMENT_NAMES[30] = ELT_FEMORPHOLOGY;
   ELEMENT_NAMES[31] = ELT_DEL;
   ELEMENT_NAMES[32] = ELT_NAV;
   ELEMENT_NAMES[33] = ELT_SET;
   ELEMENT_NAMES[34] = ELT_Q;
   ELEMENT_NAMES[35] = ELT_H6;
   ELEMENT_NAMES[36] = ELT_RB;
   ELEMENT_NAMES[37] = ELT_LEGEND;
@@ -1558,26 +1552,26 @@ nsHtml5ElementName::initializeStatics()
   ELEMENT_NAMES[43] = ELT_TH;
   ELEMENT_NAMES[44] = ELT_MASK;
   ELEMENT_NAMES[45] = ELT_SYMBOL;
   ELEMENT_NAMES[46] = ELT_ANIMATEMOTION;
   ELEMENT_NAMES[47] = ELT_POLYGON;
   ELEMENT_NAMES[48] = ELT_COLGROUP;
   ELEMENT_NAMES[49] = ELT_ABBR;
   ELEMENT_NAMES[50] = ELT_FEGAUSSIANBLUR;
-  ELEMENT_NAMES[51] = ELT_ADDRESS;
-  ELEMENT_NAMES[52] = ELT_MS;
-  ELEMENT_NAMES[53] = ELT_APPLET;
-  ELEMENT_NAMES[54] = ELT_FOREIGNOBJECT;
-  ELEMENT_NAMES[55] = ELT_FESPOTLIGHT;
-  ELEMENT_NAMES[56] = ELT_INPUT;
-  ELEMENT_NAMES[57] = ELT_RT;
-  ELEMENT_NAMES[58] = ELT_TT;
-  ELEMENT_NAMES[59] = ELT_SCRIPT;
-  ELEMENT_NAMES[60] = ELT_FEDROPSHADOW;
+  ELEMENT_NAMES[51] = ELT_TR;
+  ELEMENT_NAMES[52] = ELT_DETAILS;
+  ELEMENT_NAMES[53] = ELT_DT;
+  ELEMENT_NAMES[54] = ELT_DATALIST;
+  ELEMENT_NAMES[55] = ELT_FEOFFSET;
+  ELEMENT_NAMES[56] = ELT_FONT;
+  ELEMENT_NAMES[57] = ELT_NOSCRIPT;
+  ELEMENT_NAMES[58] = ELT_PLAINTEXT;
+  ELEMENT_NAMES[59] = ELT_SELECT;
+  ELEMENT_NAMES[60] = ELT_MENU;
   ELEMENT_NAMES[61] = ELT_FECONVOLVEMATRIX;
   ELEMENT_NAMES[62] = ELT_SUMMARY;
   ELEMENT_NAMES[63] = ELT_BDO;
   ELEMENT_NAMES[64] = ELT_DIR;
   ELEMENT_NAMES[65] = ELT_KBD;
   ELEMENT_NAMES[66] = ELT_A;
   ELEMENT_NAMES[67] = ELT_SVG;
   ELEMENT_NAMES[68] = ELT_VAR;
@@ -1610,36 +1604,36 @@ nsHtml5ElementName::initializeStatics()
   ELEMENT_NAMES[95] = ELT_MAIN;
   ELEMENT_NAMES[96] = ELT_SPAN;
   ELEMENT_NAMES[97] = ELT_MO;
   ELEMENT_NAMES[98] = ELT_HGROUP;
   ELEMENT_NAMES[99] = ELT_STOP;
   ELEMENT_NAMES[100] = ELT_CENTER;
   ELEMENT_NAMES[101] = ELT_FILTER;
   ELEMENT_NAMES[102] = ELT_MARKER;
-  ELEMENT_NAMES[103] = ELT_TR;
-  ELEMENT_NAMES[104] = ELT_CANVAS;
-  ELEMENT_NAMES[105] = ELT_DETAILS;
-  ELEMENT_NAMES[106] = ELT_NOFRAMES;
-  ELEMENT_NAMES[107] = ELT_DT;
-  ELEMENT_NAMES[108] = ELT_BASEFONT;
-  ELEMENT_NAMES[109] = ELT_DATALIST;
-  ELEMENT_NAMES[110] = ELT_FIELDSET;
-  ELEMENT_NAMES[111] = ELT_FEOFFSET;
-  ELEMENT_NAMES[112] = ELT_FEPOINTLIGHT;
-  ELEMENT_NAMES[113] = ELT_FONT;
-  ELEMENT_NAMES[114] = ELT_LINEARGRADIENT;
-  ELEMENT_NAMES[115] = ELT_NOSCRIPT;
-  ELEMENT_NAMES[116] = ELT_OBJECT;
-  ELEMENT_NAMES[117] = ELT_PLAINTEXT;
-  ELEMENT_NAMES[118] = ELT_RECT;
-  ELEMENT_NAMES[119] = ELT_SELECT;
-  ELEMENT_NAMES[120] = ELT_TFOOT;
-  ELEMENT_NAMES[121] = ELT_MENU;
-  ELEMENT_NAMES[122] = ELT_SHADOW;
+  ELEMENT_NAMES[103] = ELT_NOBR;
+  ELEMENT_NAMES[104] = ELT_ADDRESS;
+  ELEMENT_NAMES[105] = ELT_DEFS;
+  ELEMENT_NAMES[106] = ELT_MS;
+  ELEMENT_NAMES[107] = ELT_PROGRESS;
+  ELEMENT_NAMES[108] = ELT_APPLET;
+  ELEMENT_NAMES[109] = ELT_CONTENT;
+  ELEMENT_NAMES[110] = ELT_FOREIGNOBJECT;
+  ELEMENT_NAMES[111] = ELT_FRAMESET;
+  ELEMENT_NAMES[112] = ELT_FESPOTLIGHT;
+  ELEMENT_NAMES[113] = ELT_FEDISTANTLIGHT;
+  ELEMENT_NAMES[114] = ELT_INPUT;
+  ELEMENT_NAMES[115] = ELT_MTEXT;
+  ELEMENT_NAMES[116] = ELT_RT;
+  ELEMENT_NAMES[117] = ELT_OUTPUT;
+  ELEMENT_NAMES[118] = ELT_TT;
+  ELEMENT_NAMES[119] = ELT_RADIALGRADIENT;
+  ELEMENT_NAMES[120] = ELT_SCRIPT;
+  ELEMENT_NAMES[121] = ELT_TEXT;
+  ELEMENT_NAMES[122] = ELT_FEDROPSHADOW;
   ELEMENT_NAMES[123] = ELT_FECOLORMATRIX;
   ELEMENT_NAMES[124] = ELT_BODY;
   ELEMENT_NAMES[125] = ELT_RUBY;
   ELEMENT_NAMES[126] = ELT_TBODY;
   ELEMENT_NAMES[127] = ELT_BIG;
   ELEMENT_NAMES[128] = ELT_COL;
   ELEMENT_NAMES[129] = ELT_DFN;
   ELEMENT_NAMES[130] = ELT_DIV;
@@ -1713,17 +1707,16 @@ nsHtml5ElementName::initializeStatics()
   ELEMENT_NAMES[198] = ELT_RP;
   ELEMENT_NAMES[199] = ELT_SAMP;
   ELEMENT_NAMES[200] = ELT_BR;
   ELEMENT_NAMES[201] = ELT_ANIMATECOLOR;
   ELEMENT_NAMES[202] = ELT_HR;
   ELEMENT_NAMES[203] = ELT_FECOMPONENTTRANSFER;
   ELEMENT_NAMES[204] = ELT_FOOTER;
   ELEMENT_NAMES[205] = ELT_HEADER;
-  ELEMENT_NAMES[206] = ELT_METER;
 }
 
 void
 nsHtml5ElementName::releaseStatics()
 {
   delete ELT_ANNOTATION_XML;
   delete ELT_BIG;
   delete ELT_BDO;
@@ -1918,17 +1911,16 @@ nsHtml5ElementName::releaseStatics()
   delete ELT_RECT;
   delete ELT_RADIALGRADIENT;
   delete ELT_SELECT;
   delete ELT_SCRIPT;
   delete ELT_TFOOT;
   delete ELT_TEXT;
   delete ELT_MENU;
   delete ELT_FEDROPSHADOW;
-  delete ELT_SHADOW;
   delete ELT_VIEW;
   delete ELT_FECOLORMATRIX;
   delete ELT_FECONVOLVEMATRIX;
   delete ELT_BODY;
   delete ELT_FEMORPHOLOGY;
   delete ELT_RUBY;
   delete ELT_SUMMARY;
   delete ELT_TBODY;
--- a/parser/html/nsHtml5ElementName.h
+++ b/parser/html/nsHtml5ElementName.h
@@ -100,57 +100,57 @@ public:
 
   inline int32_t getFlags() { return flags; }
 
   inline int32_t getGroup() { return flags & nsHtml5ElementName::GROUP_MASK; }
 
   inline bool isInterned()
   {
     return !(flags & nsHtml5ElementName::NOT_INTERNED);
-    }
+  }
 
-    inline static int32_t levelOrderBinarySearch(jArray<int32_t, int32_t> data,
-                                                 int32_t key)
-    {
-      int32_t n = data.length;
-      int32_t i = 0;
-      while (i < n) {
-        int32_t val = data[i];
-        if (val < key) {
-          i = 2 * i + 2;
-        } else if (val > key) {
-          i = 2 * i + 1;
-        } else {
-          return i;
-        }
+  inline static int32_t levelOrderBinarySearch(jArray<int32_t, int32_t> data,
+                                               int32_t key)
+  {
+    int32_t n = data.length;
+    int32_t i = 0;
+    while (i < n) {
+      int32_t val = data[i];
+      if (val < key) {
+        i = 2 * i + 2;
+      } else if (val > key) {
+        i = 2 * i + 1;
+      } else {
+        return i;
       }
-      return -1;
     }
+    return -1;
+  }
 
-    inline static nsHtml5ElementName* elementNameByBuffer(
-      char16_t* buf,
-      int32_t offset,
-      int32_t length,
-      nsHtml5AtomTable* interner)
-    {
-      uint32_t hash = nsHtml5ElementName::bufToHash(buf, length);
-      jArray<int32_t, int32_t> hashes;
-      hashes = nsHtml5ElementName::ELEMENT_HASHES;
-      int32_t index = levelOrderBinarySearch(hashes, hash);
-      if (index < 0) {
+  inline static nsHtml5ElementName* elementNameByBuffer(
+    char16_t* buf,
+    int32_t offset,
+    int32_t length,
+    nsHtml5AtomTable* interner)
+  {
+    uint32_t hash = nsHtml5ElementName::bufToHash(buf, length);
+    jArray<int32_t, int32_t> hashes;
+    hashes = nsHtml5ElementName::ELEMENT_HASHES;
+    int32_t index = levelOrderBinarySearch(hashes, hash);
+    if (index < 0) {
+      return nullptr;
+    } else {
+      nsHtml5ElementName* elementName =
+        nsHtml5ElementName::ELEMENT_NAMES[index];
+      nsIAtom* name = elementName->name;
+      if (!nsHtml5Portability::localEqualsBuffer(name, buf, offset, length)) {
         return nullptr;
-      } else {
-        nsHtml5ElementName* elementName =
-          nsHtml5ElementName::ELEMENT_NAMES[index];
-        nsIAtom* name = elementName->name;
-        if (!nsHtml5Portability::localEqualsBuffer(name, buf, offset, length)) {
-          return nullptr;
-        }
-        return elementName;
       }
+      return elementName;
+    }
     }
 
   private:
     inline static uint32_t bufToHash(char16_t* buf, int32_t length)
     {
       uint32_t len = length;
       uint32_t first = buf[0];
       first <<= 19;
@@ -396,17 +396,16 @@ public:
     static nsHtml5ElementName* ELT_RECT;
     static nsHtml5ElementName* ELT_RADIALGRADIENT;
     static nsHtml5ElementName* ELT_SELECT;
     static nsHtml5ElementName* ELT_SCRIPT;
     static nsHtml5ElementName* ELT_TFOOT;
     static nsHtml5ElementName* ELT_TEXT;
     static nsHtml5ElementName* ELT_MENU;
     static nsHtml5ElementName* ELT_FEDROPSHADOW;
-    static nsHtml5ElementName* ELT_SHADOW;
     static nsHtml5ElementName* ELT_VIEW;
     static nsHtml5ElementName* ELT_FECOLORMATRIX;
     static nsHtml5ElementName* ELT_FECONVOLVEMATRIX;
     static nsHtml5ElementName* ELT_BODY;
     static nsHtml5ElementName* ELT_FEMORPHOLOGY;
     static nsHtml5ElementName* ELT_RUBY;
     static nsHtml5ElementName* ELT_SUMMARY;
     static nsHtml5ElementName* ELT_TBODY;
--- a/parser/html/nsHtml5StackNode.h
+++ b/parser/html/nsHtml5StackNode.h
@@ -65,17 +65,16 @@ class nsHtml5StackNode
     nsIAtom* name;
     nsIAtom* popName;
     int32_t ns;
     nsIContentHandle* node;
     nsHtml5HtmlAttributes* attributes;
   private:
     int32_t refcount;
     mozilla::dom::HTMLContentCreatorFunction htmlCreator;
-
   public:
     inline int32_t getFlags()
     {
       return flags;
     }
 
     int32_t getGroup();
     bool isScoping();
--- a/parser/htmlparser/nsElementTable.cpp
+++ b/parser/htmlparser/nsElementTable.cpp
@@ -138,17 +138,16 @@ static const HTMLElement gHTMLElements[]
   ELEM(rt,          ____, true)
   ELEM(rtc,         ____, true)
   ELEM(ruby,        ____, true)
   ELEM(s,           ____, true)
   ELEM(samp,        ____, true)
   ELEM(script,      ____, true)
   ELEM(section,     true, true)
   ELEM(select,      ____, true)
-  ELEM(shadow,      ____, true)
   ELEM(small,       ____, true)
   ELEM(source,      ____, ____)
   ELEM(span,        ____, true)
   ELEM(strike,      ____, true)
   ELEM(strong,      ____, true)
   ELEM(style,       ____, true)
   ELEM(sub,         ____, true)
   ELEM(summary,     true, true)
--- a/parser/htmlparser/nsHTMLTagList.h
+++ b/parser/htmlparser/nsHTMLTagList.h
@@ -149,17 +149,16 @@ HTML_HTMLELEMENT_TAG(rp)
 HTML_HTMLELEMENT_TAG(rt)
 HTML_HTMLELEMENT_TAG(rtc)
 HTML_HTMLELEMENT_TAG(ruby)
 HTML_HTMLELEMENT_TAG(s)
 HTML_HTMLELEMENT_TAG(samp)
 HTML_TAG(script, Script, Script)
 HTML_HTMLELEMENT_TAG(section)
 HTML_TAG(select, Select, Select)
-HTML_TAG(shadow, Shadow, Shadow)
 HTML_HTMLELEMENT_TAG(small)
 HTML_TAG(source, Source, Source)
 HTML_TAG(span, Span, Span)
 HTML_HTMLELEMENT_TAG(strike)
 HTML_HTMLELEMENT_TAG(strong)
 HTML_TAG(style, Style, Style)
 HTML_HTMLELEMENT_TAG(sub)
 HTML_TAG(summary, Summary, )