Bug 883889. Call SetIsDOMBinding() in the nsINode constructor, and remove it from all the subclasses. r=peterv
authorBoris Zbarsky <bzbarsky@mit.edu>
Thu, 11 Jul 2013 11:58:29 -0400
changeset 138187 d978ca0315b0b440cc8d5fc85e5c18c335080ecf
parent 138186 88d451420219dae28cbe784defc474425bd32c32
child 138188 a67961a377b890788acbd0a64e482560149f9b7b
push id30854
push userbzbarsky@mozilla.com
push dateThu, 11 Jul 2013 15:59:01 +0000
treeherdermozilla-inbound@d978ca0315b0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspeterv
bugs883889
milestone25.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 883889. Call SetIsDOMBinding() in the nsINode constructor, and remove it from all the subclasses. r=peterv This patch leaves the call in the Attr constructor, because we plan to make Attr not inherit from nsINode.
content/base/public/FragmentOrElement.h
content/base/public/nsINode.h
content/base/src/Comment.h
content/base/src/DocumentFragment.h
content/base/src/DocumentType.cpp
content/base/src/nsTextNode.h
content/html/content/src/HTMLAnchorElement.h
content/html/content/src/HTMLAreaElement.cpp
content/html/content/src/HTMLAudioElement.cpp
content/html/content/src/HTMLBRElement.cpp
content/html/content/src/HTMLBodyElement.h
content/html/content/src/HTMLButtonElement.cpp
content/html/content/src/HTMLCanvasElement.cpp
content/html/content/src/HTMLDataElement.cpp
content/html/content/src/HTMLDataListElement.h
content/html/content/src/HTMLDivElement.h
content/html/content/src/HTMLElement.cpp
content/html/content/src/HTMLFieldSetElement.cpp
content/html/content/src/HTMLFontElement.h
content/html/content/src/HTMLFormElement.cpp
content/html/content/src/HTMLFrameElement.cpp
content/html/content/src/HTMLFrameSetElement.h
content/html/content/src/HTMLHRElement.cpp
content/html/content/src/HTMLHeadingElement.h
content/html/content/src/HTMLIFrameElement.cpp
content/html/content/src/HTMLImageElement.cpp
content/html/content/src/HTMLInputElement.cpp
content/html/content/src/HTMLLIElement.h
content/html/content/src/HTMLLabelElement.h
content/html/content/src/HTMLLegendElement.h
content/html/content/src/HTMLLinkElement.cpp
content/html/content/src/HTMLMapElement.cpp
content/html/content/src/HTMLMenuElement.cpp
content/html/content/src/HTMLMenuItemElement.cpp
content/html/content/src/HTMLMetaElement.cpp
content/html/content/src/HTMLMeterElement.cpp
content/html/content/src/HTMLModElement.cpp
content/html/content/src/HTMLObjectElement.cpp
content/html/content/src/HTMLOptGroupElement.cpp
content/html/content/src/HTMLOptionElement.cpp
content/html/content/src/HTMLOutputElement.cpp
content/html/content/src/HTMLParagraphElement.h
content/html/content/src/HTMLPreElement.h
content/html/content/src/HTMLProgressElement.cpp
content/html/content/src/HTMLScriptElement.cpp
content/html/content/src/HTMLSelectElement.cpp
content/html/content/src/HTMLSharedElement.h
content/html/content/src/HTMLSharedListElement.h
content/html/content/src/HTMLSharedObjectElement.cpp
content/html/content/src/HTMLSourceElement.cpp
content/html/content/src/HTMLSpanElement.h
content/html/content/src/HTMLStyleElement.cpp
content/html/content/src/HTMLTableCaptionElement.h
content/html/content/src/HTMLTableCellElement.h
content/html/content/src/HTMLTableColElement.h
content/html/content/src/HTMLTableElement.cpp
content/html/content/src/HTMLTableRowElement.h
content/html/content/src/HTMLTableSectionElement.h
content/html/content/src/HTMLTemplateElement.cpp
content/html/content/src/HTMLTextAreaElement.cpp
content/html/content/src/HTMLTimeElement.cpp
content/html/content/src/HTMLTitleElement.cpp
content/html/content/src/HTMLTrackElement.cpp
content/html/content/src/HTMLUnknownElement.h
content/html/content/src/HTMLVideoElement.cpp
content/html/document/src/nsHTMLDocument.cpp
content/mathml/content/src/nsMathMLElement.cpp
content/svg/content/src/nsSVGElement.cpp
content/xml/content/src/CDATASection.h
content/xml/content/src/ProcessingInstruction.cpp
content/xml/content/src/nsXMLElement.h
content/xml/document/src/XMLDocument.cpp
content/xul/content/src/nsXULElement.cpp
--- a/content/base/public/FragmentOrElement.h
+++ b/content/base/public/FragmentOrElement.h
@@ -43,17 +43,16 @@ class nsIURI;
  * @see nsIDOMNodeList
  */
 class nsChildContentList MOZ_FINAL : public nsINodeList
 {
 public:
   nsChildContentList(nsINode* aNode)
     : mNode(aNode)
   {
-    SetIsDOMBinding();
   }
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS(nsChildContentList)
 
   // nsWrapperCache
   virtual JSObject* WrapObject(JSContext *cx,
                                JS::Handle<JSObject*> scope) MOZ_OVERRIDE;
--- a/content/base/public/nsINode.h
+++ b/content/base/public/nsINode.h
@@ -317,16 +317,17 @@ public:
     mParent(nullptr),
     mBoolFlags(0),
     mNextSibling(nullptr),
     mPreviousSibling(nullptr),
     mFirstChild(nullptr),
     mSubtreeRoot(this),
     mSlots(nullptr)
   {
+    SetIsDOMBinding();
   }
 
 #ifdef _MSC_VER
 #pragma warning(pop)
 #endif
 #endif
 
   virtual ~nsINode();
--- a/content/base/src/Comment.h
+++ b/content/base/src/Comment.h
@@ -16,17 +16,16 @@ namespace dom {
 class Comment : public nsGenericDOMDataNode,
                 public nsIDOMComment
 {
 private:
   void Init()
   {
     NS_ABORT_IF_FALSE(mNodeInfo->NodeType() == nsIDOMNode::COMMENT_NODE,
                       "Bad NodeType in aNodeInfo");
-    SetIsDOMBinding();
   }
 
 public:
   Comment(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsGenericDOMDataNode(aNodeInfo)
   {
     Init();
   }
--- a/content/base/src/DocumentFragment.h
+++ b/content/base/src/DocumentFragment.h
@@ -29,18 +29,16 @@ class DocumentFragment : public Fragment
 private:
   void Init()
   {
     NS_ABORT_IF_FALSE(mNodeInfo->NodeType() ==
                       nsIDOMNode::DOCUMENT_FRAGMENT_NODE &&
                       mNodeInfo->Equals(nsGkAtoms::documentFragmentNodeName,
                                         kNameSpaceID_None),
                       "Bad NodeType in aNodeInfo");
-
-    SetIsDOMBinding();
   }
 
 public:
   using FragmentOrElement::GetFirstChild;
   using nsINode::QuerySelector;
   using nsINode::QuerySelectorAll;
 
   // nsISupports
--- a/content/base/src/DocumentType.cpp
+++ b/content/base/src/DocumentType.cpp
@@ -69,17 +69,16 @@ DocumentType::DocumentType(already_AddRe
                            const nsAString& aPublicId,
                            const nsAString& aSystemId,
                            const nsAString& aInternalSubset) :
   DocumentTypeForward(aNodeInfo),
   mPublicId(aPublicId),
   mSystemId(aSystemId),
   mInternalSubset(aInternalSubset)
 {
-  SetIsDOMBinding();
   NS_ABORT_IF_FALSE(mNodeInfo->NodeType() == nsIDOMNode::DOCUMENT_TYPE_NODE,
                     "Bad NodeType in aNodeInfo");
 }
 
 DocumentType::~DocumentType()
 {
 }
 
--- a/content/base/src/nsTextNode.h
+++ b/content/base/src/nsTextNode.h
@@ -23,17 +23,16 @@ class nsNodeInfoManager;
 class nsTextNode : public mozilla::dom::Text,
                    public nsIDOMText
 {
 private:
   void Init()
   {
     NS_ABORT_IF_FALSE(mNodeInfo->NodeType() == nsIDOMNode::TEXT_NODE,
                       "Bad NodeType in aNodeInfo");
-    SetIsDOMBinding();
   }
 
 public:
   nsTextNode(already_AddRefed<nsINodeInfo> aNodeInfo)
     : mozilla::dom::Text(aNodeInfo)
   {
     Init();
   }
--- a/content/html/content/src/HTMLAnchorElement.h
+++ b/content/html/content/src/HTMLAnchorElement.h
@@ -24,17 +24,16 @@ class HTMLAnchorElement : public nsGener
 public:
   using Element::GetText;
   using Element::SetText;
 
   HTMLAnchorElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
     , Link(MOZ_THIS_IN_INITIALIZER_LIST())
   {
-    SetIsDOMBinding();
   }
   virtual ~HTMLAnchorElement();
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMNode
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
--- a/content/html/content/src/HTMLAreaElement.cpp
+++ b/content/html/content/src/HTMLAreaElement.cpp
@@ -14,17 +14,16 @@ NS_IMPL_NS_NEW_HTML_ELEMENT(Area)
 
 namespace mozilla {
 namespace dom {
 
 HTMLAreaElement::HTMLAreaElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsGenericHTMLElement(aNodeInfo)
   , Link(MOZ_THIS_IN_INITIALIZER_LIST())
 {
-  SetIsDOMBinding();
 }
 
 HTMLAreaElement::~HTMLAreaElement()
 {
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLAreaElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLAreaElement, Element)
--- a/content/html/content/src/HTMLAudioElement.cpp
+++ b/content/html/content/src/HTMLAudioElement.cpp
@@ -43,17 +43,16 @@ NS_ELEMENT_INTERFACE_MAP_END
 
 NS_IMPL_ELEMENT_CLONE(HTMLAudioElement)
 
 
 HTMLAudioElement::HTMLAudioElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : HTMLMediaElement(aNodeInfo),
     mTimerActivated(false)
 {
-  SetIsDOMBinding();
 }
 
 HTMLAudioElement::~HTMLAudioElement()
 {
 }
 
 
 already_AddRefed<HTMLAudioElement>
--- a/content/html/content/src/HTMLBRElement.cpp
+++ b/content/html/content/src/HTMLBRElement.cpp
@@ -16,17 +16,16 @@
 NS_IMPL_NS_NEW_HTML_ELEMENT(BR)
 
 namespace mozilla {
 namespace dom {
 
 HTMLBRElement::HTMLBRElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsGenericHTMLElement(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 HTMLBRElement::~HTMLBRElement()
 {
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLBRElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLBRElement, Element)
--- a/content/html/content/src/HTMLBodyElement.h
+++ b/content/html/content/src/HTMLBodyElement.h
@@ -38,17 +38,16 @@ class HTMLBodyElement : public nsGeneric
 {
 public:
   using Element::GetText;
   using Element::SetText;
 
   HTMLBodyElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual ~HTMLBodyElement();
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMNode
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
--- a/content/html/content/src/HTMLButtonElement.cpp
+++ b/content/html/content/src/HTMLButtonElement.cpp
@@ -60,18 +60,16 @@ HTMLButtonElement::HTMLButtonElement(alr
     mInInternalActivate(false),
     mInhibitStateRestoration(!!(aFromParser & FROM_PARSER_FRAGMENT))
 {
   // <button> is always barred from constraint validation.
   SetBarredFromConstraintValidation(true);
 
   // Set up our default state: enabled
   AddStatesSilently(NS_EVENT_STATE_ENABLED);
-
-  SetIsDOMBinding();
 }
 
 HTMLButtonElement::~HTMLButtonElement()
 {
 }
 
 // nsISupports
 
--- a/content/html/content/src/HTMLCanvasElement.cpp
+++ b/content/html/content/src/HTMLCanvasElement.cpp
@@ -139,17 +139,16 @@ NS_INTERFACE_MAP_END
 NS_IMPL_CYCLE_COLLECTION_3(HTMLCanvasPrintState, mCanvas, mContext, mCallback)
 
 // ---------------------------------------------------------------------------
 
 HTMLCanvasElement::HTMLCanvasElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsGenericHTMLElement(aNodeInfo),
     mWriteOnly(false)
 {
-  SetIsDOMBinding();
 }
 
 HTMLCanvasElement::~HTMLCanvasElement()
 {
   ResetPrintCallback();
 }
 
 NS_IMPL_CYCLE_COLLECTION_INHERITED_4(HTMLCanvasElement, nsGenericHTMLElement,
--- a/content/html/content/src/HTMLDataElement.cpp
+++ b/content/html/content/src/HTMLDataElement.cpp
@@ -10,17 +10,16 @@
 NS_IMPL_NS_NEW_HTML_ELEMENT(Data)
 
 namespace mozilla {
 namespace dom {
 
 HTMLDataElement::HTMLDataElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsGenericHTMLElement(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 HTMLDataElement::~HTMLDataElement()
 {
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLDataElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLDataElement, Element)
--- a/content/html/content/src/HTMLDataListElement.h
+++ b/content/html/content/src/HTMLDataListElement.h
@@ -15,17 +15,16 @@ namespace dom {
 
 class HTMLDataListElement : public nsGenericHTMLElement,
                             public nsIDOMHTMLDataListElement
 {
 public:
   HTMLDataListElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual ~HTMLDataListElement();
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMNode
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
--- a/content/html/content/src/HTMLDivElement.h
+++ b/content/html/content/src/HTMLDivElement.h
@@ -14,17 +14,16 @@ namespace dom {
 
 class HTMLDivElement MOZ_FINAL : public nsGenericHTMLElement,
                                  public nsIDOMHTMLDivElement
 {
 public:
   HTMLDivElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual ~HTMLDivElement();
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMNode
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
--- a/content/html/content/src/HTMLElement.cpp
+++ b/content/html/content/src/HTMLElement.cpp
@@ -40,17 +40,16 @@ public:
 protected:
   virtual JSObject* WrapNode(JSContext *aCx,
                              JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
 };
 
 HTMLElement::HTMLElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsGenericHTMLElement(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 HTMLElement::~HTMLElement()
 {
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLElement, Element)
--- a/content/html/content/src/HTMLFieldSetElement.cpp
+++ b/content/html/content/src/HTMLFieldSetElement.cpp
@@ -13,18 +13,16 @@ NS_IMPL_NS_NEW_HTML_ELEMENT(FieldSet)
 namespace mozilla {
 namespace dom {
 
 HTMLFieldSetElement::HTMLFieldSetElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsGenericHTMLFormElement(aNodeInfo)
   , mElements(nullptr)
   , mFirstLegend(nullptr)
 {
-  SetIsDOMBinding();
-
   // <fieldset> is always barred from constraint validation.
   SetBarredFromConstraintValidation(true);
 
   // We start out enabled
   AddStatesSilently(NS_EVENT_STATE_ENABLED);
 }
 
 HTMLFieldSetElement::~HTMLFieldSetElement()
--- a/content/html/content/src/HTMLFontElement.h
+++ b/content/html/content/src/HTMLFontElement.h
@@ -14,17 +14,16 @@ namespace dom {
 
 class HTMLFontElement : public nsGenericHTMLElement,
                         public nsIDOMHTMLFontElement
 {
 public:
   HTMLFontElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual ~HTMLFontElement();
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMNode
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
--- a/content/html/content/src/HTMLFormElement.cpp
+++ b/content/html/content/src/HTMLFormElement.cpp
@@ -246,18 +246,16 @@ HTMLFormElement::HTMLFormElement(already
     mDefaultSubmitElement(nullptr),
     mFirstSubmitInElements(nullptr),
     mFirstSubmitNotInElements(nullptr),
     mInvalidElementsCount(0),
     mEverTriedInvalidSubmit(false)
 {
   mImageNameLookupTable.Init(NS_FORM_CONTROL_LIST_HASHTABLE_SIZE);
   mPastNameLookupTable.Init(NS_FORM_CONTROL_LIST_HASHTABLE_SIZE);
-
-  SetIsDOMBinding();
 }
 
 HTMLFormElement::~HTMLFormElement()
 {
   if (mControls) {
     mControls->DropFormReference();
   }
 
--- a/content/html/content/src/HTMLFrameElement.cpp
+++ b/content/html/content/src/HTMLFrameElement.cpp
@@ -13,17 +13,16 @@ NS_IMPL_NS_NEW_HTML_ELEMENT_CHECK_PARSER
 
 namespace mozilla {
 namespace dom {
 
 HTMLFrameElement::HTMLFrameElement(already_AddRefed<nsINodeInfo> aNodeInfo,
                                    FromParser aFromParser)
   : nsGenericHTMLFrameElement(aNodeInfo, aFromParser)
 {
-  SetIsDOMBinding();
 }
 
 HTMLFrameElement::~HTMLFrameElement()
 {
 }
 
 
 NS_IMPL_ADDREF_INHERITED(HTMLFrameElement, Element)
--- a/content/html/content/src/HTMLFrameSetElement.h
+++ b/content/html/content/src/HTMLFrameSetElement.h
@@ -47,17 +47,16 @@ class HTMLFrameSetElement : public nsGen
 {
 public:
   HTMLFrameSetElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo),
       mNumRows(0),
       mNumCols(0),
       mCurrentRowColHint(NS_STYLE_HINT_REFLOW)
   {
-    SetIsDOMBinding();
   }
   virtual ~HTMLFrameSetElement();
 
   NS_IMPL_FROMCONTENT_HTML_WITH_TAG(HTMLFrameSetElement, frameset)
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
--- a/content/html/content/src/HTMLHRElement.cpp
+++ b/content/html/content/src/HTMLHRElement.cpp
@@ -9,17 +9,16 @@
 NS_IMPL_NS_NEW_HTML_ELEMENT(HR)
 
 namespace mozilla {
 namespace dom {
 
 HTMLHRElement::HTMLHRElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsGenericHTMLElement(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 HTMLHRElement::~HTMLHRElement()
 {
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLHRElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLHRElement, Element)
--- a/content/html/content/src/HTMLHeadingElement.h
+++ b/content/html/content/src/HTMLHeadingElement.h
@@ -15,17 +15,16 @@ namespace dom {
 
 class HTMLHeadingElement MOZ_FINAL : public nsGenericHTMLElement,
 				     public nsIDOMHTMLHeadingElement
 {
 public:
   HTMLHeadingElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual ~HTMLHeadingElement();
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMNode
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
--- a/content/html/content/src/HTMLIFrameElement.cpp
+++ b/content/html/content/src/HTMLIFrameElement.cpp
@@ -18,17 +18,16 @@ NS_IMPL_NS_NEW_HTML_ELEMENT_CHECK_PARSER
 
 namespace mozilla {
 namespace dom {
 
 HTMLIFrameElement::HTMLIFrameElement(already_AddRefed<nsINodeInfo> aNodeInfo,
                                      FromParser aFromParser)
   : nsGenericHTMLFrameElement(aNodeInfo, aFromParser)
 {
-  SetIsDOMBinding();
 }
 
 HTMLIFrameElement::~HTMLIFrameElement()
 {
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLIFrameElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLIFrameElement, Element)
--- a/content/html/content/src/HTMLImageElement.cpp
+++ b/content/html/content/src/HTMLImageElement.cpp
@@ -47,17 +47,16 @@ namespace mozilla {
 namespace dom {
 
 HTMLImageElement::HTMLImageElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsGenericHTMLElement(aNodeInfo)
   , mForm(nullptr)
 {
   // We start out broken
   AddStatesSilently(NS_EVENT_STATE_BROKEN);
-  SetIsDOMBinding();
 }
 
 HTMLImageElement::~HTMLImageElement()
 {
   DestroyImageLoadingContent();
 }
 
 
--- a/content/html/content/src/HTMLInputElement.cpp
+++ b/content/html/content/src/HTMLInputElement.cpp
@@ -783,18 +783,16 @@ HTMLInputElement::HTMLInputElement(alrea
   , mCheckedIsToggled(false)
   , mIndeterminate(false)
   , mInhibitRestoration(aFromParser & FROM_PARSER_FRAGMENT)
   , mCanShowValidUI(true)
   , mCanShowInvalidUI(true)
   , mHasRange(false)
   , mIsDraggingRange(false)
 {
-  SetIsDOMBinding();
-
   // We are in a type=text so we now we currenty need a nsTextEditorState.
   mInputData.mState = new nsTextEditorState(this);
 
   if (!gUploadLastDir)
     HTMLInputElement::InitUploadLastDir();
 
   // Set up our default state.  By default we're enabled (since we're
   // a control type that can be disabled but not actually disabled
--- a/content/html/content/src/HTMLLIElement.h
+++ b/content/html/content/src/HTMLLIElement.h
@@ -16,17 +16,16 @@ namespace dom {
 
 class HTMLLIElement : public nsGenericHTMLElement,
                       public nsIDOMHTMLLIElement
 {
 public:
   HTMLLIElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual ~HTMLLIElement();
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMNode
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
--- a/content/html/content/src/HTMLLabelElement.h
+++ b/content/html/content/src/HTMLLabelElement.h
@@ -19,17 +19,16 @@ namespace dom {
 class HTMLLabelElement : public nsGenericHTMLFormElement,
                          public nsIDOMHTMLLabelElement
 {
 public:
   HTMLLabelElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsGenericHTMLFormElement(aNodeInfo),
       mHandlingEvent(false)
   {
-    SetIsDOMBinding();
   }
   virtual ~HTMLLabelElement();
 
   NS_IMPL_FROMCONTENT_HTML_WITH_TAG(HTMLLabelElement, label)
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
--- a/content/html/content/src/HTMLLegendElement.h
+++ b/content/html/content/src/HTMLLegendElement.h
@@ -16,17 +16,16 @@ namespace dom {
 
 class HTMLLegendElement : public nsGenericHTMLElement,
                           public nsIDOMHTMLLegendElement
 {
 public:
   HTMLLegendElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual ~HTMLLegendElement();
 
   NS_IMPL_FROMCONTENT_HTML_WITH_TAG(HTMLLegendElement, legend)
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
--- a/content/html/content/src/HTMLLinkElement.cpp
+++ b/content/html/content/src/HTMLLinkElement.cpp
@@ -29,17 +29,16 @@ NS_IMPL_NS_NEW_HTML_ELEMENT(Link)
 
 namespace mozilla {
 namespace dom {
 
 HTMLLinkElement::HTMLLinkElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsGenericHTMLElement(aNodeInfo)
   , Link(MOZ_THIS_IN_INITIALIZER_LIST())
 {
-  SetIsDOMBinding();
 }
 
 HTMLLinkElement::~HTMLLinkElement()
 {
 }
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(HTMLLinkElement,
                                                   nsGenericHTMLElement)
--- a/content/html/content/src/HTMLMapElement.cpp
+++ b/content/html/content/src/HTMLMapElement.cpp
@@ -13,17 +13,16 @@
 NS_IMPL_NS_NEW_HTML_ELEMENT(Map)
 
 namespace mozilla {
 namespace dom {
 
 HTMLMapElement::HTMLMapElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsGenericHTMLElement(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(HTMLMapElement,
                                                   nsGenericHTMLElement)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mAreas)
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_ADDREF_INHERITED(HTMLMapElement, Element)
--- a/content/html/content/src/HTMLMenuElement.cpp
+++ b/content/html/content/src/HTMLMenuElement.cpp
@@ -39,17 +39,16 @@ enum SeparatorType
   ST_TRUE = 1
 };
 
 
 
 HTMLMenuElement::HTMLMenuElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsGenericHTMLElement(aNodeInfo), mType(MENU_TYPE_LIST)
 {
-  SetIsDOMBinding();
 }
 
 HTMLMenuElement::~HTMLMenuElement()
 {
 }
 
 
 NS_IMPL_ADDREF_INHERITED(HTMLMenuElement, Element)
--- a/content/html/content/src/HTMLMenuItemElement.cpp
+++ b/content/html/content/src/HTMLMenuItemElement.cpp
@@ -156,17 +156,16 @@ HTMLMenuItemElement::HTMLMenuItemElement
   already_AddRefed<nsINodeInfo> aNodeInfo, FromParser aFromParser)
   : nsGenericHTMLElement(aNodeInfo),
     mType(kMenuItemDefaultType->value),
     mParserCreating(false),
     mShouldInitChecked(false),
     mCheckedDirty(false),
     mChecked(false)
 {
-  SetIsDOMBinding();
   mParserCreating = aFromParser;
 }
 
 HTMLMenuItemElement::~HTMLMenuItemElement()
 {
 }
 
 
--- a/content/html/content/src/HTMLMetaElement.cpp
+++ b/content/html/content/src/HTMLMetaElement.cpp
@@ -12,17 +12,16 @@
 NS_IMPL_NS_NEW_HTML_ELEMENT(Meta)
 
 namespace mozilla {
 namespace dom {
 
 HTMLMetaElement::HTMLMetaElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsGenericHTMLElement(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 HTMLMetaElement::~HTMLMetaElement()
 {
 }
 
 
 NS_IMPL_ADDREF_INHERITED(HTMLMetaElement, Element)
--- a/content/html/content/src/HTMLMeterElement.cpp
+++ b/content/html/content/src/HTMLMeterElement.cpp
@@ -14,17 +14,16 @@ namespace dom {
 const double HTMLMeterElement::kDefaultValue =  0.0;
 const double HTMLMeterElement::kDefaultMin   =  0.0;
 const double HTMLMeterElement::kDefaultMax   =  1.0;
 
 
 HTMLMeterElement::HTMLMeterElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsGenericHTMLElement(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 HTMLMeterElement::~HTMLMeterElement()
 {
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLMeterElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLMeterElement, Element)
--- a/content/html/content/src/HTMLModElement.cpp
+++ b/content/html/content/src/HTMLModElement.cpp
@@ -10,17 +10,16 @@
 NS_IMPL_NS_NEW_HTML_ELEMENT(Mod)
 
 namespace mozilla {
 namespace dom {
 
 HTMLModElement::HTMLModElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsGenericHTMLElement(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 HTMLModElement::~HTMLModElement()
 {
 }
 
 
 NS_IMPL_ADDREF_INHERITED(HTMLModElement, Element)
--- a/content/html/content/src/HTMLObjectElement.cpp
+++ b/content/html/content/src/HTMLObjectElement.cpp
@@ -32,18 +32,16 @@ HTMLObjectElement::HTMLObjectElement(alr
   RegisterFreezableElement();
   SetIsNetworkCreated(aFromParser == FROM_PARSER_NETWORK);
 
   // <object> is always barred from constraint validation.
   SetBarredFromConstraintValidation(true);
 
   // By default we're in the loading state
   AddStatesSilently(NS_EVENT_STATE_LOADING);
-
-  SetIsDOMBinding();
 }
 
 HTMLObjectElement::~HTMLObjectElement()
 {
   UnregisterFreezableElement();
   DestroyImageLoadingContent();
 }
 
--- a/content/html/content/src/HTMLOptGroupElement.cpp
+++ b/content/html/content/src/HTMLOptGroupElement.cpp
@@ -23,18 +23,16 @@ namespace dom {
  * The implementation of &lt;optgroup&gt;
  */
 
 
 
 HTMLOptGroupElement::HTMLOptGroupElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsGenericHTMLElement(aNodeInfo)
 {
-  SetIsDOMBinding();
-
   // We start off enabled
   AddStatesSilently(NS_EVENT_STATE_ENABLED);
 }
 
 HTMLOptGroupElement::~HTMLOptGroupElement()
 {
 }
 
--- a/content/html/content/src/HTMLOptionElement.cpp
+++ b/content/html/content/src/HTMLOptionElement.cpp
@@ -38,18 +38,16 @@ namespace mozilla {
 namespace dom {
 
 HTMLOptionElement::HTMLOptionElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsGenericHTMLElement(aNodeInfo),
     mSelectedChanged(false),
     mIsSelected(false),
     mIsInSetDefaultSelected(false)
 {
-  SetIsDOMBinding();
-
   // We start off enabled
   AddStatesSilently(NS_EVENT_STATE_ENABLED);
 }
 
 HTMLOptionElement::~HTMLOptionElement()
 {
 }
 
--- a/content/html/content/src/HTMLOutputElement.cpp
+++ b/content/html/content/src/HTMLOutputElement.cpp
@@ -16,18 +16,16 @@ NS_IMPL_NS_NEW_HTML_ELEMENT(Output)
 
 namespace mozilla {
 namespace dom {
 
 HTMLOutputElement::HTMLOutputElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsGenericHTMLFormElement(aNodeInfo)
   , mValueModeFlag(eModeDefault)
 {
-  SetIsDOMBinding();
-
   AddMutationObserver(this);
 
   // We start out valid and ui-valid (since we have no form).
   AddStatesSilently(NS_EVENT_STATE_VALID | NS_EVENT_STATE_MOZ_UI_VALID);
 }
 
 HTMLOutputElement::~HTMLOutputElement()
 {
--- a/content/html/content/src/HTMLParagraphElement.h
+++ b/content/html/content/src/HTMLParagraphElement.h
@@ -17,17 +17,16 @@ namespace dom {
 
 class HTMLParagraphElement : public nsGenericHTMLElement,
                              public nsIDOMHTMLParagraphElement
 {
 public:
   HTMLParagraphElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual ~HTMLParagraphElement();
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMNode
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
--- a/content/html/content/src/HTMLPreElement.h
+++ b/content/html/content/src/HTMLPreElement.h
@@ -17,17 +17,16 @@ namespace dom {
 
 class HTMLPreElement : public nsGenericHTMLElement,
                        public nsIDOMHTMLPreElement
 {
 public:
   HTMLPreElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual ~HTMLPreElement();
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMNode
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
--- a/content/html/content/src/HTMLProgressElement.cpp
+++ b/content/html/content/src/HTMLProgressElement.cpp
@@ -14,18 +14,16 @@ namespace dom {
 const double HTMLProgressElement::kIndeterminatePosition = -1.0;
 const double HTMLProgressElement::kDefaultValue          =  0.0;
 const double HTMLProgressElement::kDefaultMax            =  1.0;
 
 
 HTMLProgressElement::HTMLProgressElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsGenericHTMLElement(aNodeInfo)
 {
-  SetIsDOMBinding();
-
   // We start out indeterminate
   AddStatesSilently(NS_EVENT_STATE_INDETERMINATE);
 }
 
 HTMLProgressElement::~HTMLProgressElement()
 {
 }
 
--- a/content/html/content/src/HTMLScriptElement.cpp
+++ b/content/html/content/src/HTMLScriptElement.cpp
@@ -34,17 +34,16 @@ HTMLScriptElement::WrapNode(JSContext *a
   return HTMLScriptElementBinding::Wrap(aCx, aScope, this);
 }
 
 HTMLScriptElement::HTMLScriptElement(already_AddRefed<nsINodeInfo> aNodeInfo,
                                      FromParser aFromParser)
   : nsGenericHTMLElement(aNodeInfo)
   , nsScriptElement(aFromParser)
 {
-  SetIsDOMBinding();
   AddMutationObserver(this);
 }
 
 HTMLScriptElement::~HTMLScriptElement()
 {
 }
 
 
--- a/content/html/content/src/HTMLSelectElement.cpp
+++ b/content/html/content/src/HTMLSelectElement.cpp
@@ -119,18 +119,16 @@ HTMLSelectElement::HTMLSelectElement(alr
 {
   // DoneAddingChildren() will be called later if it's from the parser,
   // otherwise it is
 
   // Set up our default state: enabled, optional, and valid.
   AddStatesSilently(NS_EVENT_STATE_ENABLED |
                     NS_EVENT_STATE_OPTIONAL |
                     NS_EVENT_STATE_VALID);
-
-  SetIsDOMBinding();
 }
 
 HTMLSelectElement::~HTMLSelectElement()
 {
   mOptions->DropReference();
 }
 
 // ISupports
--- a/content/html/content/src/HTMLSharedElement.h
+++ b/content/html/content/src/HTMLSharedElement.h
@@ -29,17 +29,16 @@ class HTMLSharedElement : public nsGener
                           public nsIDOMHTMLQuoteElement,
                           public nsIDOMHTMLHeadElement,
                           public nsIDOMHTMLHtmlElement
 {
 public:
   HTMLSharedElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual ~HTMLSharedElement();
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMNode
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
--- a/content/html/content/src/HTMLSharedListElement.h
+++ b/content/html/content/src/HTMLSharedListElement.h
@@ -20,17 +20,16 @@ class HTMLSharedListElement : public nsG
                               public nsIDOMHTMLOListElement,
                               public nsIDOMHTMLDListElement,
                               public nsIDOMHTMLUListElement
 {
 public:
   HTMLSharedListElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual ~HTMLSharedListElement();
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMNode
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
--- a/content/html/content/src/HTMLSharedObjectElement.cpp
+++ b/content/html/content/src/HTMLSharedObjectElement.cpp
@@ -27,18 +27,16 @@ HTMLSharedObjectElement::HTMLSharedObjec
   : nsGenericHTMLElement(aNodeInfo),
     mIsDoneAddingChildren(mNodeInfo->Equals(nsGkAtoms::embed) || !aFromParser)
 {
   RegisterFreezableElement();
   SetIsNetworkCreated(aFromParser == FROM_PARSER_NETWORK);
 
   // By default we're in the loading state
   AddStatesSilently(NS_EVENT_STATE_LOADING);
-
-  SetIsDOMBinding();
 }
 
 void
 HTMLSharedObjectElement::GetItemValueText(nsAString& aValue)
 {
   if (mNodeInfo->Equals(nsGkAtoms::applet)) {
     nsGenericHTMLElement::GetItemValueText(aValue);
   } else {
--- a/content/html/content/src/HTMLSourceElement.cpp
+++ b/content/html/content/src/HTMLSourceElement.cpp
@@ -10,17 +10,16 @@
 NS_IMPL_NS_NEW_HTML_ELEMENT(Source)
 
 namespace mozilla {
 namespace dom {
 
 HTMLSourceElement::HTMLSourceElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsGenericHTMLElement(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 HTMLSourceElement::~HTMLSourceElement()
 {
 }
 
 
 NS_IMPL_ADDREF_INHERITED(HTMLSourceElement, Element)
--- a/content/html/content/src/HTMLSpanElement.h
+++ b/content/html/content/src/HTMLSpanElement.h
@@ -19,17 +19,16 @@ namespace dom {
 
 class HTMLSpanElement : public nsGenericHTMLElement,
                         public nsIDOMHTMLElement
 {
 public:
   HTMLSpanElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual ~HTMLSpanElement();
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMNode
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
--- a/content/html/content/src/HTMLStyleElement.cpp
+++ b/content/html/content/src/HTMLStyleElement.cpp
@@ -20,17 +20,16 @@ NS_IMPL_NS_NEW_HTML_ELEMENT(Style)
 
 namespace mozilla {
 namespace dom {
 
 HTMLStyleElement::HTMLStyleElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsGenericHTMLElement(aNodeInfo)
 {
   AddMutationObserver(this);
-  SetIsDOMBinding();
 }
 
 HTMLStyleElement::~HTMLStyleElement()
 {
 }
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(HTMLStyleElement,
                                                   nsGenericHTMLElement)
--- a/content/html/content/src/HTMLTableCaptionElement.h
+++ b/content/html/content/src/HTMLTableCaptionElement.h
@@ -14,17 +14,16 @@ namespace dom {
 
 class HTMLTableCaptionElement : public nsGenericHTMLElement,
                                 public nsIDOMHTMLTableCaptionElement
 {
 public:
   HTMLTableCaptionElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual ~HTMLTableCaptionElement();
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMNode
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
--- a/content/html/content/src/HTMLTableCellElement.h
+++ b/content/html/content/src/HTMLTableCellElement.h
@@ -18,17 +18,16 @@ class HTMLTableElement;
 
 class HTMLTableCellElement : public nsGenericHTMLElement,
                              public nsIDOMHTMLTableCellElement
 {
 public:
   HTMLTableCellElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual ~HTMLTableCellElement();
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMNode
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
--- a/content/html/content/src/HTMLTableColElement.h
+++ b/content/html/content/src/HTMLTableColElement.h
@@ -14,17 +14,16 @@ namespace dom {
 
 class HTMLTableColElement : public nsGenericHTMLElement,
                             public nsIDOMHTMLTableColElement
 {
 public:
   HTMLTableColElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual ~HTMLTableColElement();
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMNode
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
--- a/content/html/content/src/HTMLTableElement.cpp
+++ b/content/html/content/src/HTMLTableElement.cpp
@@ -292,17 +292,16 @@ TableRowsCollection::ParentDestroyed()
 }
 
 /* --------------------------- HTMLTableElement ---------------------------- */
 
 HTMLTableElement::HTMLTableElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsGenericHTMLElement(aNodeInfo),
     mTableInheritedAttributes(TABLE_ATTRS_DIRTY)
 {
-  SetIsDOMBinding();
 }
 
 HTMLTableElement::~HTMLTableElement()
 {
   if (mRows) {
     mRows->ParentDestroyed();
   }
   ReleaseInheritedAttributes();
--- a/content/html/content/src/HTMLTableRowElement.h
+++ b/content/html/content/src/HTMLTableRowElement.h
@@ -18,17 +18,16 @@ namespace dom {
 
 class HTMLTableRowElement : public nsGenericHTMLElement,
                             public nsIDOMHTMLTableRowElement
 {
 public:
   HTMLTableRowElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
 
   NS_IMPL_FROMCONTENT_HTML_WITH_TAG(HTMLTableRowElement, tr)
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMNode
--- a/content/html/content/src/HTMLTableSectionElement.h
+++ b/content/html/content/src/HTMLTableSectionElement.h
@@ -15,17 +15,16 @@ namespace dom {
 
 class HTMLTableSectionElement : public nsGenericHTMLElement,
                                 public nsIDOMHTMLTableSectionElement
 {
 public:
   HTMLTableSectionElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMNode
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
 
--- a/content/html/content/src/HTMLTemplateElement.cpp
+++ b/content/html/content/src/HTMLTemplateElement.cpp
@@ -28,17 +28,16 @@ NS_NewHTMLTemplateElement(already_AddRef
 }
 
 namespace mozilla {
 namespace dom {
 
 HTMLTemplateElement::HTMLTemplateElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsGenericHTMLElement(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 nsresult
 HTMLTemplateElement::Init()
 {
   nsIDocument* doc = OwnerDoc();
   nsIDocument* contentsOwner = doc;
 
--- a/content/html/content/src/HTMLTextAreaElement.cpp
+++ b/content/html/content/src/HTMLTextAreaElement.cpp
@@ -65,18 +65,16 @@ HTMLTextAreaElement::HTMLTextAreaElement
   // Set up our default state.  By default we're enabled (since we're
   // a control type that can be disabled but not actually disabled
   // right now), optional, and valid.  We are NOT readwrite by default
   // until someone calls UpdateEditableState on us, apparently!  Also
   // by default we don't have to show validity UI and so forth.
   AddStatesSilently(NS_EVENT_STATE_ENABLED |
                     NS_EVENT_STATE_OPTIONAL |
                     NS_EVENT_STATE_VALID);
-
-  SetIsDOMBinding();
 }
 
 
 NS_IMPL_CYCLE_COLLECTION_INHERITED_3(HTMLTextAreaElement, nsGenericHTMLFormElement,
                                      mValidity,
                                      mControllers,
                                      mState)
 
--- a/content/html/content/src/HTMLTimeElement.cpp
+++ b/content/html/content/src/HTMLTimeElement.cpp
@@ -13,17 +13,16 @@
 NS_IMPL_NS_NEW_HTML_ELEMENT(Time)
 
 namespace mozilla {
 namespace dom {
 
 HTMLTimeElement::HTMLTimeElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsGenericHTMLElement(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 HTMLTimeElement::~HTMLTimeElement()
 {
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLTimeElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLTimeElement, Element)
--- a/content/html/content/src/HTMLTitleElement.cpp
+++ b/content/html/content/src/HTMLTitleElement.cpp
@@ -15,17 +15,16 @@
 NS_IMPL_NS_NEW_HTML_ELEMENT(Title)
 
 namespace mozilla {
 namespace dom {
 
 HTMLTitleElement::HTMLTitleElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsGenericHTMLElement(aNodeInfo)
 {
-  SetIsDOMBinding();
   AddMutationObserver(this);
 }
 
 HTMLTitleElement::~HTMLTitleElement()
 {
 }
 
 
--- a/content/html/content/src/HTMLTrackElement.cpp
+++ b/content/html/content/src/HTMLTrackElement.cpp
@@ -67,18 +67,16 @@ HTMLTrackElement::HTMLTrackElement(alrea
   : nsGenericHTMLElement(aNodeInfo)
   , mReadyState(NONE)
 {
 #ifdef PR_LOGGING
   if (!gTrackElementLog) {
     gTrackElementLog = PR_NewLogModule("nsTrackElement");
   }
 #endif
-
-  SetIsDOMBinding();
 }
 
 HTMLTrackElement::~HTMLTrackElement()
 {
 }
 
 NS_IMPL_ELEMENT_CLONE(HTMLTrackElement)
 
--- a/content/html/content/src/HTMLUnknownElement.h
+++ b/content/html/content/src/HTMLUnknownElement.h
@@ -14,17 +14,16 @@ namespace dom {
 
 class HTMLUnknownElement MOZ_FINAL : public nsGenericHTMLElement
                                    , public nsIDOMHTMLUnknownElement
 {
 public:
   HTMLUnknownElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
-    SetIsDOMBinding();
     if (NodeInfo()->Equals(nsGkAtoms::bdi)) {
       SetHasDirAuto();
     }
   }
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
--- a/content/html/content/src/HTMLVideoElement.cpp
+++ b/content/html/content/src/HTMLVideoElement.cpp
@@ -70,17 +70,16 @@ NS_IMETHODIMP HTMLVideoElement::GetVideo
 {
   *aVideoHeight = VideoHeight();
   return NS_OK;
 }
 
 HTMLVideoElement::HTMLVideoElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : HTMLMediaElement(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 HTMLVideoElement::~HTMLVideoElement()
 {
 }
 
 nsresult HTMLVideoElement::GetVideoSize(nsIntSize* size)
 {
--- a/content/html/document/src/nsHTMLDocument.cpp
+++ b/content/html/document/src/nsHTMLDocument.cpp
@@ -192,18 +192,16 @@ nsHTMLDocument::nsHTMLDocument()
   : nsDocument("text/html")
 {
   // NOTE! nsDocument::operator new() zeroes out all members, so don't
   // bother initializing members to 0.
 
   mIsRegularHTML = true;
   mDefaultElementType = kNameSpaceID_XHTML;
   mCompatMode = eCompatibility_NavQuirks;
-
-  SetIsDOMBinding();
 }
 
 nsHTMLDocument::~nsHTMLDocument()
 {
   mAll = nullptr;
 }
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(nsHTMLDocument, nsDocument)
--- a/content/mathml/content/src/nsMathMLElement.cpp
+++ b/content/mathml/content/src/nsMathMLElement.cpp
@@ -76,17 +76,16 @@ ReportParseErrorNoTag(const nsString& aV
                          "AttributeParsingErrorNoTag", argv, 2);
 }
 
 nsMathMLElement::nsMathMLElement(already_AddRefed<nsINodeInfo> aNodeInfo)
 : nsMathMLElementBase(aNodeInfo),
   ALLOW_THIS_IN_INITIALIZER_LIST(Link(this)),
   mIncrementScriptLevel(false)
 {
-  SetIsDOMBinding();
 }
 
 nsresult
 nsMathMLElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
                             nsIContent* aBindingParent,
                             bool aCompileEventHandlers)
 {
   static const char kMathMLStyleSheetURI[] = "resource://gre-resources/mathml.css";
--- a/content/svg/content/src/nsSVGElement.cpp
+++ b/content/svg/content/src/nsSVGElement.cpp
@@ -78,17 +78,16 @@ nsSVGEnumMapping nsSVGElement::sSVGUnitT
   {&nsGkAtoms::userSpaceOnUse, SVG_UNIT_TYPE_USERSPACEONUSE},
   {&nsGkAtoms::objectBoundingBox, SVG_UNIT_TYPE_OBJECTBOUNDINGBOX},
   {nullptr, 0}
 };
 
 nsSVGElement::nsSVGElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsSVGElementBase(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 JSObject*
 nsSVGElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aScope)
 {
   return SVGElementBinding::Wrap(aCx, aScope, this);
 }
 
--- a/content/xml/content/src/CDATASection.h
+++ b/content/xml/content/src/CDATASection.h
@@ -16,17 +16,16 @@ namespace dom {
 class CDATASection : public Text,
                      public nsIDOMCDATASection
 {
 private:
   void Init()
   {
     NS_ABORT_IF_FALSE(mNodeInfo->NodeType() == nsIDOMNode::CDATA_SECTION_NODE,
                       "Bad NodeType in aNodeInfo");
-    SetIsDOMBinding();
   }
 
 public:
   CDATASection(already_AddRefed<nsINodeInfo> aNodeInfo)
     : Text(aNodeInfo)
   {
     Init();
   }
--- a/content/xml/content/src/ProcessingInstruction.cpp
+++ b/content/xml/content/src/ProcessingInstruction.cpp
@@ -50,18 +50,16 @@ ProcessingInstruction::ProcessingInstruc
 {
   NS_ABORT_IF_FALSE(mNodeInfo->NodeType() ==
                       nsIDOMNode::PROCESSING_INSTRUCTION_NODE,
                     "Bad NodeType in aNodeInfo");
 
   SetTextInternal(0, mText.GetLength(),
                   aData.BeginReading(), aData.Length(),
                   false);  // Don't notify (bug 420429).
-
-  SetIsDOMBinding();
 }
 
 ProcessingInstruction::~ProcessingInstruction()
 {
 }
 
 NS_IMPL_ISUPPORTS_INHERITED3(ProcessingInstruction, nsGenericDOMDataNode,
                              nsIDOMNode, nsIDOMCharacterData,
--- a/content/xml/content/src/nsXMLElement.h
+++ b/content/xml/content/src/nsXMLElement.h
@@ -12,17 +12,16 @@
 
 class nsXMLElement : public mozilla::dom::Element,
                      public nsIDOMElement
 {
 public:
   nsXMLElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : mozilla::dom::Element(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMNode
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
 
--- a/content/xml/document/src/XMLDocument.cpp
+++ b/content/xml/document/src/XMLDocument.cpp
@@ -218,18 +218,16 @@ namespace mozilla {
 namespace dom {
 
 XMLDocument::XMLDocument(const char* aContentType)
   : nsDocument(aContentType),
     mAsync(true)
 {
   // NOTE! nsDocument::operator new() zeroes out all members, so don't
   // bother initializing members to 0.
-
-  SetIsDOMBinding();
 }
 
 XMLDocument::~XMLDocument()
 {
   // XXX We rather crash than hang
   mLoopingForSyncLoad = false;
 }
 
--- a/content/xul/content/src/nsXULElement.cpp
+++ b/content/xul/content/src/nsXULElement.cpp
@@ -162,18 +162,16 @@ NS_INTERFACE_MAP_END_AGGREGATED(mElement
 //
 
 nsXULElement::nsXULElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsStyledElement(aNodeInfo),
       mBindingParent(nullptr)
 {
     XUL_PROTOTYPE_ATTRIBUTE_METER(gNumElements);
 
-    SetIsDOMBinding();
-
     // We may be READWRITE by default; check.
     if (IsReadWriteTextElement()) {
         AddStatesSilently(NS_EVENT_STATE_MOZ_READWRITE);
         RemoveStatesSilently(NS_EVENT_STATE_MOZ_READONLY);
     }
 }
 
 nsXULElement::nsXULSlots::nsXULSlots()