Bug 830231 - Remove nsIDOMDOM(Settable)TokenList r=bz
authorDavid Zbarsky <dzbarsky@gmail.com>
Tue, 15 Jan 2013 03:35:59 -0500
changeset 118864 fd642fb004e66423a2a36756012bc4dfc824f9b2
parent 118863 65747e07d9dfb7648e17d83652bec7df93295a7b
child 118865 1b0a240102ee840fe1b6879296926b431e061e1f
push id21323
push userdzbarsky@gmail.com
push dateTue, 15 Jan 2013 08:34:17 +0000
treeherdermozilla-inbound@fd642fb004e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs830231
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 830231 - Remove nsIDOMDOM(Settable)TokenList r=bz
content/base/public/Element.h
content/base/src/Element.cpp
content/base/src/nsDOMSettableTokenList.cpp
content/base/src/nsDOMSettableTokenList.h
content/base/src/nsDOMTokenList.cpp
content/base/src/nsDOMTokenList.h
content/html/content/src/nsGenericHTMLElement.cpp
content/html/content/src/nsHTMLOutputElement.cpp
dom/base/nsDOMClassInfo.cpp
dom/base/nsDOMClassInfoClasses.h
dom/interfaces/base/domstubs.idl
dom/interfaces/core/Makefile.in
dom/interfaces/core/nsIDOMDOMSettableTokenList.idl
dom/interfaces/core/nsIDOMDOMTokenList.idl
dom/interfaces/core/nsIDOMElement.idl
dom/interfaces/html/nsIDOMHTMLOutputElement.idl
dom/webidl/DOMSettableTokenList.webidl
--- a/content/base/public/Element.h
+++ b/content/base/public/Element.h
@@ -39,17 +39,16 @@
 #include "mozilla/Attributes.h"
 #include "nsContentUtils.h"
 #include "nsINodeList.h"
 #include "mozilla/ErrorResult.h"
 #include "nsIScrollableFrame.h"
 #include "nsIDOMAttr.h"
 #include "nsISMILAttr.h"
 #include "nsClientRect.h"
-#include "nsIDOMDOMTokenList.h"
 #include "nsEvent.h"
 
 class nsIDOMEventListener;
 class nsIFrame;
 class nsIDOMNamedNodeMap;
 class nsIDOMCSSStyleDeclaration;
 class nsIURI;
 class nsINodeInfo;
@@ -858,17 +857,17 @@ public:
                          nsIDOMHTMLCollection** aResult);
   nsresult
     GetElementsByTagNameNS(const nsAString& aNamespaceURI,
                            const nsAString& aLocalName,
                            nsIDOMHTMLCollection** aResult);
   nsresult
     GetElementsByClassName(const nsAString& aClassNames,
                            nsIDOMHTMLCollection** aResult);
-  void GetClassList(nsIDOMDOMTokenList** aClassList);
+  void GetClassList(nsISupports** aClassList);
 
   virtual JSObject* WrapObject(JSContext *aCx, JSObject *aScope,
                                bool *aTriedToWrap) MOZ_FINAL;
 
   /**
    * Locate an nsIEditor rooted at this content node, if there is one.
    */
   nsIEditor* GetEditorInternal();
@@ -1258,17 +1257,17 @@ nsresult                                
 
 #define NS_FORWARD_NSIDOMELEMENT_TO_GENERIC                                   \
 typedef mozilla::dom::Element Element;                                        \
 NS_IMETHOD GetTagName(nsAString& aTagName) MOZ_FINAL                          \
 {                                                                             \
   Element::GetTagName(aTagName);                                              \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetClassList(nsIDOMDOMTokenList** aClassList) MOZ_FINAL            \
+NS_IMETHOD GetClassList(nsISupports** aClassList) MOZ_FINAL                   \
 {                                                                             \
   Element::GetClassList(aClassList);                                          \
   return NS_OK;                                                               \
 }                                                                             \
 using Element::GetAttribute;                                                  \
 NS_IMETHOD GetAttribute(const nsAString& name, nsAString& _retval) MOZ_FINAL  \
 {                                                                             \
   nsString attr;                                                              \
--- a/content/base/src/Element.cpp
+++ b/content/base/src/Element.cpp
@@ -459,17 +459,17 @@ Element::GetClassList()
       slots->mClassList = new nsDOMTokenList(this, classAttr);
     }
   }
 
   return slots->mClassList;
 }
 
 void
-Element::GetClassList(nsIDOMDOMTokenList** aClassList)
+Element::GetClassList(nsISupports** aClassList)
 {
   NS_IF_ADDREF(*aClassList = GetClassList());
 }
 
 already_AddRefed<nsIHTMLCollection>
 Element::GetElementsByTagName(const nsAString& aLocalName)
 {
   return NS_GetContentList(this, kNameSpaceID_Unknown, aLocalName);
--- a/content/base/src/nsDOMSettableTokenList.cpp
+++ b/content/base/src/nsDOMSettableTokenList.cpp
@@ -1,56 +1,28 @@
 /* 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/. */
 
 /*
- * Implementation of nsIDOMDOMSettableTokenList specified by HTML5.
+ * Implementation of DOMSettableTokenList specified by HTML5.
  */
 
 #include "nsDOMSettableTokenList.h"
 #include "mozilla/dom/DOMSettableTokenListBinding.h"
 #include "mozilla/dom/Element.h"
 
-
-nsDOMSettableTokenList::nsDOMSettableTokenList(Element *aElement, nsIAtom* aAttrAtom)
-  : nsDOMTokenList(aElement, aAttrAtom)
-{
-}
-
-nsDOMSettableTokenList::~nsDOMSettableTokenList()
-{
-}
-
-DOMCI_DATA(DOMSettableTokenList, nsDOMSettableTokenList)
-
-NS_INTERFACE_TABLE_HEAD(nsDOMSettableTokenList)
-  NS_INTERFACE_TABLE1(nsDOMSettableTokenList,
-                      nsIDOMDOMSettableTokenList)
-  NS_INTERFACE_TABLE_TO_MAP_SEGUE
-  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(DOMSettableTokenList)
-NS_INTERFACE_MAP_END_INHERITING(nsDOMTokenList)
-
-NS_IMPL_ADDREF_INHERITED(nsDOMSettableTokenList, nsDOMTokenList)
-NS_IMPL_RELEASE_INHERITED(nsDOMSettableTokenList, nsDOMTokenList)
-
-NS_IMETHODIMP
-nsDOMSettableTokenList::GetValue(nsAString& aResult)
-{
-  return ToString(aResult);
-}
-
-NS_IMETHODIMP
-nsDOMSettableTokenList::SetValue(const nsAString& aValue)
+void
+nsDOMSettableTokenList::SetValue(const nsAString& aValue, mozilla::ErrorResult& rv)
 {
   if (!mElement) {
-    return NS_OK;
+    return;
   }
 
-  return mElement->SetAttr(kNameSpaceID_None, mAttrAtom, aValue, true);
+  rv = mElement->SetAttr(kNameSpaceID_None, mAttrAtom, aValue, true);
 }
 
 JSObject*
 nsDOMSettableTokenList::WrapObject(JSContext *cx, JSObject *scope,
                                    bool *triedToWrap)
 {
   return mozilla::dom::DOMSettableTokenListBinding::Wrap(cx, scope, this,
                                                          triedToWrap);
--- a/content/base/src/nsDOMSettableTokenList.h
+++ b/content/base/src/nsDOMSettableTokenList.h
@@ -1,43 +1,34 @@
 /* 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/. */
 
 /*
- * Implementation of nsIDOMDOMSettableTokenList specified by HTML5.
+ * Implementation of DOMSettableTokenList specified by HTML5.
  */
 
 #ifndef nsDOMSettableTokenList_h___
 #define nsDOMSettableTokenList_h___
 
-#include "nsIDOMDOMSettableTokenList.h"
 #include "nsDOMTokenList.h"
 
-namespace mozilla {
-namespace dom {
-class Element;
-} // namespace dom
-} // namespace mozilla
-
 class nsIAtom;
 
-// nsISupports must be on the primary inheritance chain 
+// nsISupports must be on the primary inheritance chain
 // because nsDOMSettableTokenList is traversed by Element.
-class nsDOMSettableTokenList : public nsDOMTokenList,
-                               public nsIDOMDOMSettableTokenList
+class nsDOMSettableTokenList MOZ_FINAL : public nsDOMTokenList
 {
 public:
-  NS_DECL_ISUPPORTS_INHERITED
-  NS_DECL_NSIDOMDOMSETTABLETOKENLIST
 
-  NS_FORWARD_NSIDOMDOMTOKENLIST(nsDOMTokenList::);
-
-  nsDOMSettableTokenList(mozilla::dom::Element* aElement, nsIAtom* aAttrAtom);
+  nsDOMSettableTokenList(mozilla::dom::Element* aElement, nsIAtom* aAttrAtom)
+    : nsDOMTokenList(aElement, aAttrAtom) {}
 
   virtual JSObject* WrapObject(JSContext *cx, JSObject *scope,
                                bool *triedToWrap);
 
-  virtual ~nsDOMSettableTokenList();
+  // WebIDL
+  void GetValue(nsAString& aResult) { Stringify(aResult); }
+  void SetValue(const nsAString& aValue, mozilla::ErrorResult& rv);
 };
 
 #endif // nsDOMSettableTokenList_h___
 
--- a/content/base/src/nsDOMTokenList.cpp
+++ b/content/base/src/nsDOMTokenList.cpp
@@ -1,14 +1,14 @@
 /* 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/. */
 
 /*
- * Implementation of nsIDOMDOMTokenList specified by HTML5.
+ * Implementation of DOMTokenList specified by HTML5.
  */
 
 #include "nsDOMTokenList.h"
 
 #include "nsAttrValue.h"
 #include "nsContentUtils.h"
 #include "nsError.h"
 #include "mozilla/dom/Element.h"
@@ -26,24 +26,19 @@ nsDOMTokenList::nsDOMTokenList(Element* 
   // we'll be told to drop our reference
   SetIsDOMBinding();
 }
 
 nsDOMTokenList::~nsDOMTokenList() { }
 
 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(nsDOMTokenList)
 
-DOMCI_DATA(DOMTokenList, nsDOMTokenList)
-
 NS_INTERFACE_TABLE_HEAD(nsDOMTokenList)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
-  NS_INTERFACE_TABLE1(nsDOMTokenList,
-                      nsIDOMDOMTokenList)
   NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(nsDOMTokenList)
-  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(DOMTokenList)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsDOMTokenList)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsDOMTokenList)
 
 void
 nsDOMTokenList::DropReference()
 {
@@ -65,44 +60,29 @@ nsDOMTokenList::Length()
   const nsAttrValue* attr = GetParsedAttr();
   if (!attr) {
     return 0;
   }
 
   return attr->GetAtomCount();
 }
 
-NS_IMETHODIMP
-nsDOMTokenList::GetLength(uint32_t *aLength)
-{
-  *aLength = Length();
-
-  return NS_OK;
-}
-
 void
 nsDOMTokenList::IndexedGetter(uint32_t aIndex, bool& aFound, nsAString& aResult)
 {
   const nsAttrValue* attr = GetParsedAttr();
 
   if (attr && aIndex < static_cast<uint32_t>(attr->GetAtomCount())) {
     aFound = true;
     attr->AtomAt(aIndex)->ToString(aResult);
   } else {
     aFound = false;
   }
 }
 
-NS_IMETHODIMP
-nsDOMTokenList::MozItem(uint32_t aIndex, nsAString& aResult)
-{
-  Item(aIndex, aResult);
-  return NS_OK;
-}
-
 nsresult
 nsDOMTokenList::CheckToken(const nsAString& aStr)
 {
   if (aStr.IsEmpty()) {
     return NS_ERROR_DOM_SYNTAX_ERR;
   }
 
   nsAString::const_iterator iter, end;
@@ -125,24 +105,16 @@ nsDOMTokenList::Contains(const nsAString
   if (aError.Failed()) {
     return false;
   }
 
   const nsAttrValue* attr = GetParsedAttr();
   return attr && attr->Contains(aToken);
 }
 
-NS_IMETHODIMP
-nsDOMTokenList::Contains(const nsAString& aToken, bool* aResult)
-{
-  ErrorResult rv;
-  *aResult = Contains(aToken, rv);
-  return rv.ErrorCode();
-}
-
 void
 nsDOMTokenList::AddInternal(const nsAttrValue* aAttr,
                             const nsAString& aToken)
 {
   if (!mElement) {
     return;
   }
 
@@ -174,24 +146,16 @@ nsDOMTokenList::Add(const nsAString& aTo
 
   if (attr && attr->Contains(aToken)) {
     return;
   }
 
   AddInternal(attr, aToken);
 }
 
-NS_IMETHODIMP
-nsDOMTokenList::Add(const nsAString& aToken)
-{
-  ErrorResult rv;
-  Add(aToken, rv);
-  return rv.ErrorCode();
-}
-
 void
 nsDOMTokenList::RemoveInternal(const nsAttrValue* aAttr,
                                const nsAString& aToken)
 {
   NS_ABORT_IF_FALSE(aAttr, "Need an attribute");
 
   nsAutoString input;
   aAttr->ToString(input);
@@ -260,24 +224,16 @@ nsDOMTokenList::Remove(const nsAString& 
   const nsAttrValue* attr = GetParsedAttr();
   if (!attr || !attr->Contains(aToken)) {
     return;
   }
 
   RemoveInternal(attr, aToken);
 }
 
-NS_IMETHODIMP
-nsDOMTokenList::Remove(const nsAString& aToken)
-{
-  ErrorResult rv;
-  Remove(aToken, rv);
-  return rv.ErrorCode();
-}
-
 bool
 nsDOMTokenList::Toggle(const nsAString& aToken, ErrorResult& aError)
 {
   aError = CheckToken(aToken);
   if (aError.Failed()) {
     return false;
   }
 
@@ -287,40 +243,25 @@ nsDOMTokenList::Toggle(const nsAString& 
     RemoveInternal(attr, aToken);
     return false;
   }
 
   AddInternal(attr, aToken);
   return true;
 }
 
-NS_IMETHODIMP
-nsDOMTokenList::Toggle(const nsAString& aToken, bool* aResult)
-{
-  ErrorResult rv;
-  *aResult = Toggle(aToken, rv);
-  return rv.ErrorCode();
-}
-
 void
 nsDOMTokenList::Stringify(nsAString& aResult)
 {
   if (!mElement) {
     aResult.Truncate();
     return;
   }
 
   mElement->GetAttr(kNameSpaceID_None, mAttrAtom, aResult);
 }
 
-NS_IMETHODIMP
-nsDOMTokenList::ToString(nsAString& aResult)
-{
-  Stringify(aResult);
-  return NS_OK;
-}
-
 JSObject*
 nsDOMTokenList::WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap)
 {
   return DOMTokenListBinding::Wrap(cx, scope, this, triedToWrap);
 }
 
--- a/content/base/src/nsDOMTokenList.h
+++ b/content/base/src/nsDOMTokenList.h
@@ -1,47 +1,45 @@
 /* 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/. */
 
 /*
- * Implementation of nsIDOMDOMTokenList specified by HTML5.
+ * Implementation of DOMTokenList specified by HTML5.
  */
 
 #ifndef nsDOMTokenList_h___
 #define nsDOMTokenList_h___
 
-#include "nsIDOMDOMTokenList.h"
 #include "nsCOMPtr.h"
 #include "nsDOMString.h"
 #include "nsWrapperCache.h"
 
 namespace mozilla {
 class ErrorResult;
 
 namespace dom {
 class Element;
 } // namespace dom
 } // namespace mozilla
 
 class nsAttrValue;
 class nsIAtom;
 
-// nsISupports must be on the primary inheritance chain 
+// nsISupports must be on the primary inheritance chain
 // because nsDOMSettableTokenList is traversed by Element.
-class nsDOMTokenList : public nsIDOMDOMTokenList,
+class nsDOMTokenList : public nsISupports,
                        public nsWrapperCache
 {
 protected:
   typedef mozilla::dom::Element Element;
 
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsDOMTokenList)
-  NS_DECL_NSIDOMDOMTOKENLIST
 
   nsDOMTokenList(Element* aElement, nsIAtom* aAttrAtom);
 
   void DropReference();
 
   virtual JSObject* WrapObject(JSContext *cx, JSObject *scope,
                                bool *triedToWrap);
 
--- a/content/html/content/src/nsGenericHTMLElement.cpp
+++ b/content/html/content/src/nsGenericHTMLElement.cpp
@@ -3267,51 +3267,53 @@ nsGenericHTMLElement::GetTokenList(nsIAt
   nsDOMSettableTokenList* list = NULL;
   if (HasProperties()) {
     list = static_cast<nsDOMSettableTokenList*>(GetProperty(aAtom));
   }
   if (!list) {
     list = new nsDOMSettableTokenList(this, aAtom);
     NS_ADDREF(list);
     SetProperty(aAtom, list, nsDOMSettableTokenListPropertyDestructor);
-  }                       
+  }
   return list;
-}  
+}
 
 void
 nsGenericHTMLElement::GetTokenList(nsIAtom* aAtom, nsIVariant** aResult)
 {
-  nsIDOMDOMSettableTokenList* itemType = GetTokenList(aAtom);
+  nsISupports* itemType = GetTokenList(aAtom);
   nsCOMPtr<nsIWritableVariant> out = new nsVariant();
-  out->SetAsInterface(NS_GET_IID(nsIDOMDOMSettableTokenList), itemType);
+  out->SetAsInterface(NS_GET_IID(nsISupports), itemType);
   out.forget(aResult);
 }
 
 nsresult
 nsGenericHTMLElement::SetTokenList(nsIAtom* aAtom, nsIVariant* aValue)
 {
   nsDOMSettableTokenList* itemType = GetTokenList(aAtom);
   nsAutoString string;
   aValue->GetAsAString(string);
-  return itemType->SetValue(string);
+  ErrorResult rv;
+  itemType->SetValue(string, rv);
+  return rv.ErrorCode();
 }
 
 static void
 HTMLPropertiesCollectionDestructor(void *aObject, nsIAtom *aProperty,
                                    void *aPropertyValue, void *aData)
 {
-  HTMLPropertiesCollection* properties = 
+  HTMLPropertiesCollection* properties =
     static_cast<HTMLPropertiesCollection*>(aPropertyValue);
   NS_IF_RELEASE(properties);
 }
 
 HTMLPropertiesCollection*
 nsGenericHTMLElement::Properties()
 {
-  HTMLPropertiesCollection* properties = 
+  HTMLPropertiesCollection* properties =
     static_cast<HTMLPropertiesCollection*>(GetProperty(nsGkAtoms::microdataProperties));
   if (!properties) {
      properties = new HTMLPropertiesCollection(this);
      NS_ADDREF(properties);
      SetProperty(nsGkAtoms::microdataProperties, properties, HTMLPropertiesCollectionDestructor);
   }
   return properties;
 }
--- a/content/html/content/src/nsHTMLOutputElement.cpp
+++ b/content/html/content/src/nsHTMLOutputElement.cpp
@@ -264,17 +264,17 @@ nsHTMLOutputElement::SetDefaultValue(con
   if (mValueModeFlag == eModeDefault) {
     return nsContentUtils::SetNodeTextContent(this, mDefaultValue, true);
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsHTMLOutputElement::GetHtmlFor(nsIDOMDOMSettableTokenList** aResult)
+nsHTMLOutputElement::GetHtmlFor(nsISupports** aResult)
 {
   if (!mTokenList) {
     mTokenList = new nsDOMSettableTokenList(this, nsGkAtoms::_for);
   }
 
   NS_ADDREF(*aResult = mTokenList);
 
   return NS_OK;
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -102,18 +102,16 @@
 #include "nsClientRect.h"
 
 // DOM core includes
 #include "nsError.h"
 #include "nsIDOMDOMException.h"
 #include "nsIDOMNode.h"
 #include "nsIDOMNamedNodeMap.h"
 #include "nsIDOMDOMStringList.h"
-#include "nsIDOMDOMTokenList.h"
-#include "nsIDOMDOMSettableTokenList.h"
 
 // HTMLFormElement helper includes
 #include "nsIForm.h"
 #include "nsIFormControl.h"
 #include "nsIDOMHTMLFormElement.h"
 #include "nsHTMLDocument.h"
 
 // Constraint Validation API helper includes
@@ -771,20 +769,16 @@ static nsDOMClassInfoData sClassInfoData
 
   // Core classes
   NS_DEFINE_CLASSINFO_DATA(XMLDocument, nsDocumentSH,
                            DOCUMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(DocumentType, nsNodeSH,
                            NODE_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(DOMException, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
-  NS_DEFINE_CLASSINFO_DATA(DOMTokenList, nsDOMGenericSH,
-                           DOM_DEFAULT_SCRIPTABLE_FLAGS)
-  NS_DEFINE_CLASSINFO_DATA(DOMSettableTokenList, nsDOMGenericSH,
-                           DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(DocumentFragment, nsNodeSH, NODE_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(Element, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(Attr, nsAttributeSH,
                            NODE_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(Text, nsNodeSH,
                            NODE_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(Comment, nsNodeSH,
@@ -2363,24 +2357,16 @@ nsDOMClassInfo::Init()
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(DOMException, nsIDOMDOMException)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMDOMException)
     DOM_CLASSINFO_MAP_ENTRY(nsIException)
   DOM_CLASSINFO_MAP_END
 
-  DOM_CLASSINFO_MAP_BEGIN(DOMTokenList, nsIDOMDOMTokenList)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMDOMTokenList)
-  DOM_CLASSINFO_MAP_END
-
-  DOM_CLASSINFO_MAP_BEGIN(DOMSettableTokenList, nsIDOMDOMSettableTokenList)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMDOMSettableTokenList)
-  DOM_CLASSINFO_MAP_END
-
   DOM_CLASSINFO_MAP_BEGIN(DocumentFragment, nsIDOMDocumentFragment)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentFragment)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMNodeSelector)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(Element, nsIDOMElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMElement)
--- a/dom/base/nsDOMClassInfoClasses.h
+++ b/dom/base/nsDOMClassInfoClasses.h
@@ -15,18 +15,16 @@ DOMCI_CLASS(History)
 DOMCI_CLASS(Screen)
 DOMCI_CLASS(DOMPrototype)
 DOMCI_CLASS(DOMConstructor)
 
 // Core classes
 DOMCI_CLASS(XMLDocument)
 DOMCI_CLASS(DocumentType)
 DOMCI_CLASS(DOMException)
-DOMCI_CLASS(DOMTokenList)
-DOMCI_CLASS(DOMSettableTokenList)
 DOMCI_CLASS(DocumentFragment)
 DOMCI_CLASS(Element)
 DOMCI_CLASS(Attr)
 DOMCI_CLASS(Text)
 DOMCI_CLASS(Comment)
 DOMCI_CLASS(CDATASection)
 DOMCI_CLASS(ProcessingInstruction)
 DOMCI_CLASS(NodeList)
--- a/dom/interfaces/base/domstubs.idl
+++ b/dom/interfaces/base/domstubs.idl
@@ -23,17 +23,16 @@ interface nsIDOMDocumentFragment;
 interface nsIDOMDocumentType;
 interface nsIDOMElement;
 interface nsIDOMNamedNodeMap;
 interface nsIDOMNode;
 interface nsIDOMNodeList;
 interface nsIDOMProcessingInstruction;
 interface nsIDOMText;
 interface nsIDOMDOMStringList;
-interface nsIDOMDOMTokenList;
 interface nsIDOMClientRect;
 interface nsIDOMClientRectList;
 
 // Needed for raises() in our IDL
 interface DOMException;
 
 // Style Sheets
 interface nsIDOMStyleSheetList;
--- a/dom/interfaces/core/Makefile.in
+++ b/dom/interfaces/core/Makefile.in
@@ -31,18 +31,16 @@ SDK_XPIDLSRCS =                         
 	nsIDOMText.idl				\
 	$(NULL)
 XPIDLSRCS =                                     \
 	nsIDOMDOMStringList.idl			\
 	nsIDOMXMLDocument.idl			\
 	nsIDOMUserDataHandler.idl		\
 	nsIDOMNSEditableElement.idl		\
 	nsIDOMNodeSelector.idl			\
-	nsIDOMDOMTokenList.idl			\
-	nsIDOMDOMSettableTokenList.idl	\
 	nsIInlineEventHandlers.idl              \
 	$(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 XPIDL_FLAGS += \
   -I$(topsrcdir)/dom/interfaces/base \
   $(NULL)
deleted file mode 100644
--- a/dom/interfaces/core/nsIDOMDOMSettableTokenList.idl
+++ /dev/null
@@ -1,20 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsIDOMDOMTokenList.idl"
-
-/**
- * The DOMSettableTokenList interface is the same as the DOMTokenList interface,
- * except that it allows the underlying string to be directly changed.
- *
- * For more information on this interface please see:
- * http://dev.w3.org/html5/spec/infrastructure.html#domsettabletokenlist
- */
-[scriptable, uuid(cdac274e-6619-4b5f-ba1a-cd1dbfae44b8)]
-interface nsIDOMDOMSettableTokenList : nsIDOMDOMTokenList
-{
-  attribute DOMString value;
-};
-
deleted file mode 100644
--- a/dom/interfaces/core/nsIDOMDOMTokenList.idl
+++ /dev/null
@@ -1,27 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "domstubs.idl"
-
-/**
- * The DOMTokenList interface represents an interface to an underlying string
- * that consists of a set of space-separated tokens.
- *
- * For more information on this interface please see
- * <http://www.whatwg.org/html5/#domtokenlist>
- */
-[scriptable, uuid(c6f1e160-eeeb-404a-98b0-6f1246520b6e)]
-interface nsIDOMDOMTokenList : nsISupports
-{
-  readonly attribute unsigned long length;
-
-  [binaryname(MozItem)] DOMString item(in unsigned long index);
-  boolean            contains([Null(Stringify)] in DOMString token);
-  void               add([Null(Stringify)] in DOMString token);
-  void               remove([Null(Stringify)] in DOMString token);
-  boolean            toggle([Null(Stringify)] in DOMString token);
-
-  DOMString          toString();
-};
--- a/dom/interfaces/core/nsIDOMElement.idl
+++ b/dom/interfaces/core/nsIDOMElement.idl
@@ -8,25 +8,25 @@
 /**
  * The nsIDOMElement interface represents an element in an HTML or 
  * XML document. 
  *
  * For more information on this interface please see 
  * http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#interface-element
  */
 
-[scriptable, uuid(f1465e67-577f-4546-a7a3-bb1293c0dd15)]
+[scriptable, uuid(8f972a47-1f20-4906-b59d-19310349a2c2)]
 interface nsIDOMElement : nsIDOMNode
 {
   readonly attribute DOMString        tagName;
 
   /**
    * Returns a DOMTokenList object reflecting the class attribute.
    */
-  readonly attribute nsIDOMDOMTokenList classList;
+  readonly attribute nsISupports classList;
 
   DOMString          getAttribute(in DOMString name);
   DOMString          getAttributeNS(in DOMString namespaceURI, 
                                     in DOMString localName);
   void               setAttribute(in DOMString name, 
                                   in DOMString value);
   void               setAttributeNS(in DOMString namespaceURI, 
                                     in DOMString qualifiedName, 
--- a/dom/interfaces/html/nsIDOMHTMLOutputElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLOutputElement.idl
@@ -10,23 +10,23 @@
  * <output> element.
  *
  * For more information on this interface, please see
  * http://www.whatwg.org/specs/web-apps/current-work/#the-output-element
  *
  * @status UNDER_DEVELOPMENT
  */
 
-interface nsIDOMDOMSettableTokenList;
 interface nsIDOMValidityState;
 
 [scriptable, uuid(01542000-CD00-4E8A-841C-9BAAD6BA0368)]
 interface nsIDOMHTMLOutputElement : nsIDOMHTMLElement
 {
-  readonly attribute nsIDOMDOMSettableTokenList htmlFor;
+  // DOMSettableTokenList
+  readonly attribute nsISupports                htmlFor;
   readonly attribute nsIDOMHTMLFormElement      form;
            attribute DOMString                  name;
 
   readonly attribute DOMString                  type;
            attribute DOMString                  defaultValue;
            attribute DOMString                  value;
 
   readonly attribute boolean                    willValidate;
--- a/dom/webidl/DOMSettableTokenList.webidl
+++ b/dom/webidl/DOMSettableTokenList.webidl
@@ -6,10 +6,11 @@
  * The origin of this IDL file is
  * http://www.w3.org/TR/2012/WD-dom-20120105/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
 interface DOMSettableTokenList : DOMTokenList {
+            [SetterThrows]
             attribute DOMString value;
 };