Bug 1244328 - Merge the functionality of DOMSettableTokenList into DOMTokenList and make everything that used to refer to DOMSettableTokenList refer to DOMTokenList instead. r=bzbarsky
authorDeepthi Venkitaramanan <deepthivenkitaramanan@gmail.com>
Thu, 11 Feb 2016 17:50:42 -0500
changeset 320400 aac070f65cc757df30b4ba4b904e890195ec59d0
parent 320399 5469639356d344f45cf7e611165eea47c043d88a
child 320401 48364b8680551e127db69864cc3a3dce8a932328
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky
bugs1244328
milestone47.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 1244328 - Merge the functionality of DOMSettableTokenList into DOMTokenList and make everything that used to refer to DOMSettableTokenList refer to DOMTokenList instead. r=bzbarsky
dom/base/Element.cpp
dom/base/Element.h
dom/base/moz.build
dom/base/nsDOMSettableTokenList.cpp
dom/base/nsDOMSettableTokenList.h
dom/base/nsDOMTokenList.cpp
dom/base/nsDOMTokenList.h
dom/base/test/test_bug346485.html
dom/base/test/test_classList.html
dom/bindings/Bindings.conf
dom/html/HTMLIFrameElement.h
dom/html/HTMLLinkElement.h
dom/html/HTMLOutputElement.cpp
dom/html/HTMLOutputElement.h
dom/html/HTMLPropertiesCollection.cpp
dom/html/HTMLTableCellElement.h
dom/html/nsGenericHTMLElement.cpp
dom/html/nsGenericHTMLElement.h
dom/html/test/forms/test_output_element.html
dom/html/test/test_bug845057.html
dom/imptests/html/dom/test_interface-objects.html
dom/imptests/html/dom/test_interfaces.html
dom/interfaces/html/nsIDOMHTMLElement.idl
dom/tests/mochitest/general/test_interfaces.html
dom/webidl/DOMSettableTokenList.webidl
dom/webidl/DOMTokenList.webidl
dom/webidl/Element.webidl
dom/webidl/HTMLAnchorElement.webidl
dom/webidl/HTMLAreaElement.webidl
dom/webidl/HTMLElement.webidl
dom/webidl/HTMLIFrameElement.webidl
dom/webidl/HTMLLinkElement.webidl
dom/webidl/HTMLOutputElement.webidl
dom/webidl/HTMLTableCellElement.webidl
dom/webidl/moz.build
testing/web-platform/tests/dom/interface-objects.html
testing/web-platform/tests/dom/interfaces.html
testing/web-platform/tests/html/dom/interfaces.html
testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_011.htm
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -40,17 +40,16 @@
 #include "nsIDOMEvent.h"
 #include "nsDOMCID.h"
 #include "nsIServiceManager.h"
 #include "nsIDOMCSSStyleDeclaration.h"
 #include "nsDOMCSSAttrDeclaration.h"
 #include "nsNameSpaceManager.h"
 #include "nsContentList.h"
 #include "nsVariant.h"
-#include "nsDOMSettableTokenList.h"
 #include "nsDOMTokenList.h"
 #include "nsXBLPrototypeBinding.h"
 #include "nsError.h"
 #include "nsDOMString.h"
 #include "nsIScriptSecurityManager.h"
 #include "nsIDOMMutationEvent.h"
 #include "mozilla/dom/AnimatableBinding.h"
 #include "mozilla/AnimationComparator.h"
@@ -3061,21 +3060,21 @@ Element::PostHandleEventForLinks(EventCh
 
 void
 Element::GetLinkTarget(nsAString& aTarget)
 {
   aTarget.Truncate();
 }
 
 static void
-nsDOMSettableTokenListPropertyDestructor(void *aObject, nsIAtom *aProperty,
-                                         void *aPropertyValue, void *aData)
+nsDOMTokenListPropertyDestructor(void *aObject, nsIAtom *aProperty,
+                                 void *aPropertyValue, void *aData)
 {
-  nsDOMSettableTokenList* list =
-    static_cast<nsDOMSettableTokenList*>(aPropertyValue);
+  nsDOMTokenList* list =
+    static_cast<nsDOMTokenList*>(aPropertyValue);
   NS_RELEASE(list);
 }
 
 static nsIAtom** sPropertiesToTraverseAndUnlink[] =
   {
     &nsGkAtoms::microdataProperties,
     &nsGkAtoms::itemtype,
     &nsGkAtoms::itemref,
@@ -3087,57 +3086,57 @@ static nsIAtom** sPropertiesToTraverseAn
 
 // static
 nsIAtom***
 Element::HTMLSVGPropertiesToTraverseAndUnlink()
 {
   return sPropertiesToTraverseAndUnlink;
 }
 
-nsDOMSettableTokenList*
+nsDOMTokenList*
 Element::GetTokenList(nsIAtom* aAtom)
 {
 #ifdef DEBUG
   nsIAtom*** props =
     HTMLSVGPropertiesToTraverseAndUnlink();
   bool found = false;
   for (uint32_t i = 0; props[i]; ++i) {
     if (*props[i] == aAtom) {
       found = true;
       break;
     }
   }
   MOZ_ASSERT(found, "Trying to use an unknown tokenlist!");
 #endif
 
-  nsDOMSettableTokenList* list = nullptr;
+  nsDOMTokenList* list = nullptr;
   if (HasProperties()) {
-    list = static_cast<nsDOMSettableTokenList*>(GetProperty(aAtom));
+    list = static_cast<nsDOMTokenList*>(GetProperty(aAtom));
   }
   if (!list) {
-    list = new nsDOMSettableTokenList(this, aAtom);
+    list = new nsDOMTokenList(this, aAtom);
     NS_ADDREF(list);
-    SetProperty(aAtom, list, nsDOMSettableTokenListPropertyDestructor);
+    SetProperty(aAtom, list, nsDOMTokenListPropertyDestructor);
   }
   return list;
 }
 
 void
 Element::GetTokenList(nsIAtom* aAtom, nsIVariant** aResult)
 {
   nsISupports* itemType = GetTokenList(aAtom);
   nsCOMPtr<nsIWritableVariant> out = new nsVariant();
   out->SetAsInterface(NS_GET_IID(nsISupports), itemType);
   out.forget(aResult);
 }
 
 nsresult
 Element::SetTokenList(nsIAtom* aAtom, nsIVariant* aValue)
 {
-  nsDOMSettableTokenList* itemType = GetTokenList(aAtom);
+  nsDOMTokenList* itemType = GetTokenList(aAtom);
   nsAutoString string;
   aValue->GetAsAString(string);
   ErrorResult rv;
   itemType->SetValue(string, rv);
   return rv.StealNSResult();
 }
 
 Element*
--- a/dom/base/Element.h
+++ b/dom/base/Element.h
@@ -39,17 +39,16 @@
 #include "Units.h"
 
 class nsIFrame;
 class nsIDOMMozNamedAttrMap;
 class nsIURI;
 class nsIScrollableFrame;
 class nsAttrValueOrString;
 class nsContentList;
-class nsDOMSettableTokenList;
 class nsDOMTokenList;
 struct nsRect;
 class nsFocusManager;
 class nsGlobalWindow;
 class nsICSSDeclaration;
 class nsISMILAttr;
 class nsDocument;
 
@@ -1293,17 +1292,17 @@ protected:
    *
    * Note: for HTML this gets the value of the 'target' attribute; for XLink
    * this gets the value of the xlink:_moz_target attribute, or failing that,
    * the value of xlink:show, converted to a suitably equivalent named target
    * (e.g. _blank).
    */
   virtual void GetLinkTarget(nsAString& aTarget);
 
-  nsDOMSettableTokenList* GetTokenList(nsIAtom* aAtom);
+  nsDOMTokenList* GetTokenList(nsIAtom* aAtom);
   void GetTokenList(nsIAtom* aAtom, nsIVariant** aResult);
   nsresult SetTokenList(nsIAtom* aAtom, nsIVariant* aValue);
 
 private:
   /**
    * Get this element's client area rect in app units.
    * @return the frame's client area
    */
--- a/dom/base/moz.build
+++ b/dom/base/moz.build
@@ -276,17 +276,16 @@ UNIFIED_SOURCES += [
     'nsDocumentEncoder.cpp',
     'nsDOMAttributeMap.cpp',
     'nsDOMCaretPosition.cpp',
     'nsDOMClassInfo.cpp',
     'nsDOMMutationObserver.cpp',
     'nsDOMNavigationTiming.cpp',
     'nsDOMScriptObjectFactory.cpp',
     'nsDOMSerializer.cpp',
-    'nsDOMSettableTokenList.cpp',
     'nsDOMTokenList.cpp',
     'nsDOMWindowList.cpp',
     'nsFocusManager.cpp',
     'nsFrameLoader.cpp',
     'nsGenConImageContent.cpp',
     'nsGenericDOMDataNode.cpp',
     'nsGkAtoms.cpp',
     'nsGlobalWindowCommands.cpp',
deleted file mode 100644
--- a/dom/base/nsDOMSettableTokenList.cpp
+++ /dev/null
@@ -1,29 +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/. */
-
-/*
- * Implementation of DOMSettableTokenList specified by HTML5.
- */
-
-#include "nsDOMSettableTokenList.h"
-#include "mozilla/dom/DOMSettableTokenListBinding.h"
-#include "mozilla/dom/Element.h"
-
-void
-nsDOMSettableTokenList::SetValue(const nsAString& aValue, mozilla::ErrorResult& rv)
-{
-  if (!mElement) {
-    return;
-  }
-
-  rv = mElement->SetAttr(kNameSpaceID_None, mAttrAtom, aValue, true);
-}
-
-JSObject*
-nsDOMSettableTokenList::WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto)
-{
-  return mozilla::dom::DOMSettableTokenListBinding::Wrap(cx, this, aGivenProto);
-}
deleted file mode 100644
--- a/dom/base/nsDOMSettableTokenList.h
+++ /dev/null
@@ -1,35 +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/. */
-
-/*
- * Implementation of DOMSettableTokenList specified by HTML5.
- */
-
-#ifndef nsDOMSettableTokenList_h___
-#define nsDOMSettableTokenList_h___
-
-#include "nsDOMTokenList.h"
-
-class nsIAtom;
-
-// nsISupports must be on the primary inheritance chain
-// because nsDOMSettableTokenList is traversed by Element.
-class nsDOMSettableTokenList final : public nsDOMTokenList
-{
-public:
-
-  nsDOMSettableTokenList(mozilla::dom::Element* aElement, nsIAtom* aAttrAtom)
-    : nsDOMTokenList(aElement, aAttrAtom) {}
-
-  virtual JSObject* WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
-
-  // WebIDL
-  void GetValue(nsAString& aResult) { Stringify(aResult); }
-  void SetValue(const nsAString& aValue, mozilla::ErrorResult& rv);
-};
-
-#endif // nsDOMSettableTokenList_h___
-
--- a/dom/base/nsDOMTokenList.cpp
+++ b/dom/base/nsDOMTokenList.cpp
@@ -4,17 +4,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /*
  * Implementation of DOMTokenList specified by HTML5.
  */
 
 #include "nsDOMTokenList.h"
-
 #include "nsAttrValue.h"
 #include "nsContentUtils.h"
 #include "nsError.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/DOMTokenListBinding.h"
 #include "mozilla/ErrorResult.h"
 
 using namespace mozilla;
@@ -69,16 +68,26 @@ nsDOMTokenList::IndexedGetter(uint32_t a
   if (attr && aIndex < static_cast<uint32_t>(attr->GetAtomCount())) {
     aFound = true;
     attr->AtomAt(aIndex)->ToString(aResult);
   } else {
     aFound = false;
   }
 }
 
+void
+nsDOMTokenList::SetValue(const nsAString& aValue, mozilla::ErrorResult& rv)
+{
+  if (!mElement) {
+    return;
+  }
+
+  rv = mElement->SetAttr(kNameSpaceID_None, mAttrAtom, aValue, true);
+}
+
 nsresult
 nsDOMTokenList::CheckToken(const nsAString& aStr)
 {
   if (aStr.IsEmpty()) {
     return NS_ERROR_DOM_SYNTAX_ERR;
   }
 
   nsAString::const_iterator iter, end;
--- a/dom/base/nsDOMTokenList.h
+++ b/dom/base/nsDOMTokenList.h
@@ -21,17 +21,17 @@ namespace mozilla {
 class ErrorResult;
 
 } // namespace mozilla
 
 class nsAttrValue;
 class nsIAtom;
 
 // nsISupports must be on the primary inheritance chain
-// because nsDOMSettableTokenList is traversed by Element.
+
 class nsDOMTokenList : public nsISupports,
                        public nsWrapperCache
 {
 protected:
   typedef mozilla::dom::Element Element;
 
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
@@ -61,16 +61,19 @@ public:
   void Add(const nsTArray<nsString>& aTokens,
            mozilla::ErrorResult& aError);
   void Remove(const nsAString& aToken, mozilla::ErrorResult& aError);
   void Remove(const nsTArray<nsString>& aTokens,
               mozilla::ErrorResult& aError);
   bool Toggle(const nsAString& aToken,
               const mozilla::dom::Optional<bool>& force,
               mozilla::ErrorResult& aError);
+  
+  void GetValue(nsAString& aResult) { Stringify(aResult); }
+  void SetValue(const nsAString& aValue, mozilla::ErrorResult& rv);
   void Stringify(nsAString& aResult);
 
 protected:
   virtual ~nsDOMTokenList();
 
   nsresult CheckToken(const nsAString& aStr);
   nsresult CheckTokens(const nsTArray<nsString>& aStr);
   void AddInternal(const nsAttrValue* aAttr,
--- a/dom/base/test/test_bug346485.html
+++ b/dom/base/test/test_bug346485.html
@@ -17,17 +17,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   <output id='o' for='a b'></output>
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 346485 **/
 
 /**
- * This test is testing DOMSettableTokenList used by the output element.
+ * This test is testing DOMTokenList used by the output element.
  */
 
 function checkHtmlFor(htmlFor, list, msg) {
   var length = htmlFor.length;
   is(length, list.length, htmlFor + ": incorrect htmlFor length (" + msg + ")");
   for (var i = 0; i < length; ++i) {
     is(htmlFor[i], list[i], htmlFor + ": wrong element at " + i + " (" + msg + ")");
   }
--- a/dom/base/test/test_classList.html
+++ b/dom/base/test/test_classList.html
@@ -93,25 +93,30 @@ function checkModification(e, funcName, 
     is(gMutationEvents[0].newValue, after, "wrong new value " + contextMsg);
   }
 }
 
 function assignToClassListStrict(e) {
   "use strict";
   try {
     e.classList = "foo";
-    ok(false, "assigning to classList didn't throw");
-  } catch (e) { }
+    ok(true, "assigning to classList didn't throw");
+    e.removeAttribute("class");
+  } catch (e) { 
+    ok(false, "assigning to classList threw");
+  }
 }
 
 function assignToClassList(e) {
   try {
     var expect = e.classList;
     e.classList = "foo";
+    ok(true, "assigning to classList didn't throw");
     is(e.classList, expect, "classList should be unchanged after assignment");
+    e.removeAttribute("class");
   } catch (e) {
     ok(false, "assigning to classList threw");
   }
 }
 
 function testClassList(e) {
 
   // basic tests
@@ -155,18 +160,16 @@ function testClassList(e) {
 
   e.setAttribute("class", "a b c c b a a b c c");
   is(e.classList.length, 10, "wrong classList.length value");
 
   // [Stringifies]
 
   ok(DOMTokenList.prototype.hasOwnProperty("toString"),
      "Should have own toString on DOMTokenList")
-  ok(!DOMSettableTokenList.prototype.hasOwnProperty("toString"),
-     "Should not have own toString on DOMSettableTokenList")
 
   e.removeAttribute("class");
   is(e.classList.toString(), "", "wrong classList.toString() value");
   is(e.classList + "", "", "wrong classList string conversion value");
 
   e.setAttribute("class", "foo");
   is(e.classList.toString(), "foo", "wrong classList.toString() value");
   is(e.classList + "", "foo", "wrong classList string conversion value");
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -432,20 +432,16 @@ DOMInterfaces = {
 'DOMRectReadOnly': {
     'headerFile': 'mozilla/dom/DOMRect.h',
 },
 
 'DOMRequest': {
     'implicitJSContext': [ 'then' ],
 },
 
-'DOMSettableTokenList': {
-    'nativeType': 'nsDOMSettableTokenList',
-},
-
 'DOMStringMap': {
     'nativeType': 'nsDOMStringMap'
 },
 
 'DOMTokenList': {
     'nativeType': 'nsDOMTokenList',
 },
 
--- a/dom/html/HTMLIFrameElement.h
+++ b/dom/html/HTMLIFrameElement.h
@@ -5,17 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_HTMLIFrameElement_h
 #define mozilla_dom_HTMLIFrameElement_h
 
 #include "mozilla/Attributes.h"
 #include "nsGenericHTMLFrameElement.h"
 #include "nsIDOMHTMLIFrameElement.h"
-#include "nsDOMSettableTokenList.h"
+#include "nsDOMTokenList.h"
 
 namespace mozilla {
 namespace dom {
 
 class HTMLIFrameElement final : public nsGenericHTMLFrameElement
                               , public nsIDOMHTMLIFrameElement
 {
 public:
@@ -79,17 +79,17 @@ public:
   void GetName(DOMString& aName)
   {
     GetHTMLAttr(nsGkAtoms::name, aName);
   }
   void SetName(const nsAString& aName, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::name, aName, aError);
   }
-  nsDOMSettableTokenList* Sandbox()
+  nsDOMTokenList* Sandbox()
   {
     return GetTokenList(nsGkAtoms::sandbox);
   }
   bool AllowFullscreen() const
   {
     return GetBoolAttr(nsGkAtoms::allowfullscreen);
   }
   void SetAllowFullscreen(bool aAllow, ErrorResult& aError)
--- a/dom/html/HTMLLinkElement.h
+++ b/dom/html/HTMLLinkElement.h
@@ -114,17 +114,17 @@ public:
   {
     SetHTMLAttr(nsGkAtoms::media, aMedia, aRv);
   }
   // XPCOM GetHreflang is fine.
   void SetHreflang(const nsAString& aHreflang, ErrorResult& aRv)
   {
     SetHTMLAttr(nsGkAtoms::hreflang, aHreflang, aRv);
   }
-  nsDOMSettableTokenList* Sizes()
+  nsDOMTokenList* Sizes()
   {
     return GetTokenList(nsGkAtoms::sizes);
   }
   // XPCOM GetType is fine.
   void SetType(const nsAString& aType, ErrorResult& aRv)
   {
     SetHTMLAttr(nsGkAtoms::type, aType, aRv);
   }
--- a/dom/html/HTMLOutputElement.cpp
+++ b/dom/html/HTMLOutputElement.cpp
@@ -6,17 +6,17 @@
 
 #include "mozilla/dom/HTMLOutputElement.h"
 
 #include "mozAutoDocUpdate.h"
 #include "mozilla/EventStates.h"
 #include "mozilla/dom/HTMLFormElement.h"
 #include "mozilla/dom/HTMLOutputElementBinding.h"
 #include "nsContentUtils.h"
-#include "nsDOMSettableTokenList.h"
+#include "nsDOMTokenList.h"
 #include "nsFormSubmission.h"
 
 NS_IMPL_NS_NEW_HTML_ELEMENT_CHECK_PARSER(Output)
 
 namespace mozilla {
 namespace dom {
 
 HTMLOutputElement::HTMLOutputElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
@@ -161,21 +161,21 @@ void
 HTMLOutputElement::SetDefaultValue(const nsAString& aDefaultValue, ErrorResult& aRv)
 {
   mDefaultValue = aDefaultValue;
   if (mValueModeFlag == eModeDefault) {
     aRv = nsContentUtils::SetNodeTextContent(this, mDefaultValue, true);
   }
 }
 
-nsDOMSettableTokenList*
+nsDOMTokenList*
 HTMLOutputElement::HtmlFor()
 {
   if (!mTokenList) {
-    mTokenList = new nsDOMSettableTokenList(this, nsGkAtoms::_for);
+    mTokenList = new nsDOMTokenList(this, nsGkAtoms::_for);
   }
   return mTokenList;
 }
 
 void HTMLOutputElement::DescendantsChanged()
 {
   if (mIsDoneAddingChildren && mValueModeFlag == eModeDefault) {
     nsContentUtils::GetNodeTextContent(this, true, mDefaultValue);
--- a/dom/html/HTMLOutputElement.h
+++ b/dom/html/HTMLOutputElement.h
@@ -59,17 +59,17 @@ public:
   NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED
 
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(HTMLOutputElement,
                                            nsGenericHTMLFormElement)
 
   virtual JSObject* WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   // WebIDL
-  nsDOMSettableTokenList* HtmlFor();
+  nsDOMTokenList* HtmlFor();
   // nsGenericHTMLFormElement::GetForm is fine.
   void GetName(nsAString& aName)
   {
     GetHTMLAttr(nsGkAtoms::name, aName);
   }
 
   void SetName(const nsAString& aName, ErrorResult& aRv)
   {
@@ -103,15 +103,15 @@ protected:
   enum ValueModeFlag {
     eModeDefault,
     eModeValue
   };
 
   ValueModeFlag                     mValueModeFlag;
   bool                              mIsDoneAddingChildren;
   nsString                          mDefaultValue;
-  RefPtr<nsDOMSettableTokenList>  mTokenList;
+  RefPtr<nsDOMTokenList>  mTokenList;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_HTMLOutputElement_h
--- a/dom/html/HTMLPropertiesCollection.cpp
+++ b/dom/html/HTMLPropertiesCollection.cpp
@@ -4,17 +4,17 @@
  * 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 "HTMLPropertiesCollection.h"
 #include "nsIDocument.h"
 #include "nsContentUtils.h"
 #include "nsGenericHTMLElement.h"
 #include "nsVariant.h"
-#include "nsDOMSettableTokenList.h"
+#include "nsDOMTokenList.h"
 #include "nsAttrValue.h"
 #include "nsWrapperCacheInlines.h"
 #include "mozilla/dom/HTMLPropertiesCollectionBinding.h"
 #include "jsapi.h"
 #include "MainThreadUtils.h"
 #include "mozilla/Assertions.h"
 
 namespace mozilla {
--- a/dom/html/HTMLTableCellElement.h
+++ b/dom/html/HTMLTableCellElement.h
@@ -42,17 +42,17 @@ public:
   uint32_t RowSpan() const
   {
     return GetIntAttr(nsGkAtoms::rowspan, 1);
   }
   void SetRowSpan(uint32_t aRowSpan, ErrorResult& aError)
   {
     SetHTMLIntAttr(nsGkAtoms::rowspan, aRowSpan, aError);
   }
-  //already_AddRefed<nsDOMSettableTokenList> Headers() const;
+  //already_AddRefed<nsDOMTokenList> Headers() const;
   void GetHeaders(DOMString& aHeaders)
   {
     GetHTMLAttr(nsGkAtoms::headers, aHeaders);
   }
   void SetHeaders(const nsAString& aHeaders, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::headers, aHeaders, aError);
   }
--- a/dom/html/nsGenericHTMLElement.cpp
+++ b/dom/html/nsGenericHTMLElement.cpp
@@ -91,17 +91,17 @@
 #include "mozilla/Preferences.h"
 #include "mozilla/dom/FromParser.h"
 #include "mozilla/dom/Link.h"
 #include "mozilla/dom/UndoManager.h"
 #include "mozilla/BloomFilter.h"
 
 #include "HTMLPropertiesCollection.h"
 #include "nsVariant.h"
-#include "nsDOMSettableTokenList.h"
+#include "nsDOMTokenList.h"
 #include "nsThreadUtils.h"
 #include "nsTextFragment.h"
 #include "mozilla/dom/BindingUtils.h"
 #include "mozilla/dom/TouchEvent.h"
 #include "mozilla/ErrorResult.h"
 #include "nsHTMLDocument.h"
 #include "nsGlobalWindow.h"
 #include "mozilla/dom/HTMLBodyElement.h"
--- a/dom/html/nsGenericHTMLElement.h
+++ b/dom/html/nsGenericHTMLElement.h
@@ -15,17 +15,17 @@
 #include "nsGkAtoms.h"
 #include "nsContentCreatorFunctions.h"
 #include "mozilla/ErrorResult.h"
 #include "nsIDOMHTMLMenuElement.h"
 #include "mozilla/dom/DOMRect.h"
 #include "mozilla/dom/ValidityState.h"
 #include "mozilla/dom/ElementInlines.h"
 
-class nsDOMSettableTokenList;
+class nsDOMTokenList;
 class nsIDOMHTMLMenuElement;
 class nsIEditor;
 class nsIFormControlFrame;
 class nsIFrame;
 class nsILayoutHistoryState;
 class nsIURI;
 class nsPresState;
 struct nsSize;
@@ -99,33 +99,33 @@ public:
   bool ItemScope() const
   {
     return GetBoolAttr(nsGkAtoms::itemscope);
   }
   void SetItemScope(bool aItemScope, mozilla::ErrorResult& aError)
   {
     SetHTMLBoolAttr(nsGkAtoms::itemscope, aItemScope, aError);
   }
-  nsDOMSettableTokenList* ItemType()
+  nsDOMTokenList* ItemType()
   {
     return GetTokenList(nsGkAtoms::itemtype);
   }
   void GetItemId(nsString& aItemId)
   {
     GetHTMLURIAttr(nsGkAtoms::itemid, aItemId);
   }
   void SetItemId(const nsAString& aItemID, mozilla::ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::itemid, aItemID, aError);
   }
-  nsDOMSettableTokenList* ItemRef()
+  nsDOMTokenList* ItemRef()
   {
     return GetTokenList(nsGkAtoms::itemref);
   }
-  nsDOMSettableTokenList* ItemProp()
+  nsDOMTokenList* ItemProp()
   {
     return GetTokenList(nsGkAtoms::itemprop);
   }
   mozilla::dom::HTMLPropertiesCollection* Properties();
   void GetItemValue(JSContext* aCx, JSObject* aScope,
                     JS::MutableHandle<JS::Value> aRetval,
                     mozilla::ErrorResult& aError);
   void GetItemValue(JSContext* aCx, JS::MutableHandle<JS::Value> aRetval,
--- a/dom/html/test/forms/test_output_element.html
+++ b/dom/html/test/forms/test_output_element.html
@@ -104,17 +104,17 @@ function checkFormIDLAttribute(element)
     "form IDL attribute is invalid");
 }
 
 function checkHtmlForIDLAttribute(element)
 {
   is(String(element.htmlFor), 'a b',
     "htmlFor IDL attribute should reflect the for content attribute");
 
-  // DOMSettableTokenList is tested in another bug so we just test assignation
+  // DOMTokenList is tested in another bug so we just test assignation
   element.htmlFor.value = 'a b c';
   is(String(element.htmlFor), 'a b c', "htmlFor should have changed");
 }
 
 function submitForm()
 {
   // Setting the values for the submit.
   document.getElementById('o').value = 'foo';
--- a/dom/html/test/test_bug845057.html
+++ b/dom/html/test/test_bug845057.html
@@ -21,18 +21,18 @@ https://bugzilla.mozilla.org/show_bug.cg
       attr = iframe.sandbox;
   // Security enforcement tests for iframe sandbox are in test_iframe_*
 
   function eq(a, b) {
     // check if two attributes are qual modulo permutation
     return ((a+'').split(" ").sort()+'') == ((b+'').split(" ").sort()+'');
   }
 
-  ok(attr instanceof DOMSettableTokenList,
-     "Iframe sandbox attribute is instace of DOMSettableTokenList");
+  ok(attr instanceof DOMTokenList,
+     "Iframe sandbox attribute is instace of DOMTokenList");
   ok(eq(attr, "allow-scripts") &&
      eq(iframe.getAttribute("sandbox"), "allow-scripts"),
      "Stringyfied sandbox attribute is same as that of the DOM element");
 
   ok(attr.contains("allow-scripts") && !attr.contains("allow-same-origin"),
      "Set membership of attribute elements is ok");
 
   attr.add("allow-same-origin");
--- a/dom/imptests/html/dom/test_interface-objects.html
+++ b/dom/imptests/html/dom/test_interface-objects.html
@@ -28,18 +28,17 @@ var interfaces = [
   "Comment",
   "NodeIterator",
   "TreeWalker",
   "NodeFilter",
   "NodeList",
   "HTMLCollection",
   "DOMStringList",
   "DOMTokenList",
-  "DOMSettableTokenList"
-];
+ ];
 test(function() {
   for (var p in window) {
     interfaces.forEach(function(i) {
       assert_not_equals(p, i)
     })
   }
 }, "Interface objects properties should not be Enumerable")
 interfaces.forEach(testInterfaceDeletable);
--- a/dom/imptests/html/dom/test_interfaces.html
+++ b/dom/imptests/html/dom/test_interfaces.html
@@ -244,16 +244,17 @@ interface DocumentType : Node {
 interface Element : Node {
   readonly attribute DOMString? namespaceURI;
   readonly attribute DOMString? prefix;
   readonly attribute DOMString localName;
   readonly attribute DOMString tagName;
 
            attribute DOMString id;
            attribute DOMString className;
+  [PutForwards=value]
   readonly attribute DOMTokenList classList;
 
   readonly attribute Attr[] attributes;
   DOMString? getAttribute(DOMString name);
   DOMString? getAttributeNS(DOMString? namespace, DOMString localName);
   void setAttribute(DOMString name, DOMString value);
   void setAttributeNS(DOMString? namespace, DOMString name, DOMString value);
   void removeAttribute(DOMString name);
@@ -409,20 +410,17 @@ interface HTMLCollection {
 interface DOMTokenList {
   readonly attribute unsigned long length;
   getter DOMString? item(unsigned long index);
   boolean contains(DOMString token);
   void add(DOMString... tokens);
   void remove(DOMString... tokens);
   boolean toggle(DOMString token, optional boolean force);
   stringifier;
-};
-
-interface DOMSettableTokenList : DOMTokenList {
-            attribute DOMString value;
+  attribute DOMString value;
 };
 </script>
 <script>
 "use strict";
 var xmlDoc, detachedRange, element;
 var idlArray;
 setup(function() {
 	xmlDoc = document.implementation.createDocument(null, "", null);
--- a/dom/interfaces/html/nsIDOMHTMLElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLElement.idl
@@ -27,17 +27,17 @@ interface nsIDOMHTMLElement : nsIDOMElem
            attribute DOMString        lang;
            attribute DOMString        dir;
   readonly attribute nsISupports      dataset;
 
            attribute boolean                        itemScope;
            attribute nsIVariant                     itemType;
            attribute DOMString                      itemId;
   readonly attribute nsISupports                    properties;
-  // The following attributes are really nsDOMSettableTokenList, which has
+  // The following attributes are really nsDOMTokenList, which has
   // PutForwards, so we express them as nsIVariants to deal with this.
            attribute nsIVariant                     itemValue;
            attribute nsIVariant                     itemProp;
            attribute nsIVariant                     itemRef;
 
   // user interaction
   /**
    * Indicates that the element is not yet, or is no longer, relevant.
--- a/dom/tests/mochitest/general/test_interfaces.html
+++ b/dom/tests/mochitest/general/test_interfaces.html
@@ -445,18 +445,16 @@ var interfaceNamesInGlobalScope =
     "DOMRect",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "DOMRectList",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "DOMRectReadOnly",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "DOMRequest",
 // IMPORTANT: Do not change this list without review from a DOM peer!
-    "DOMSettableTokenList",
-// IMPORTANT: Do not change this list without review from a DOM peer!
     "DOMStringList",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "DOMStringMap",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "DOMTokenList",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "DOMTransactionEvent",
 // IMPORTANT: Do not change this list without review from a DOM peer!
deleted file mode 100644
--- a/dom/webidl/DOMSettableTokenList.webidl
+++ /dev/null
@@ -1,16 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.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;
-};
--- a/dom/webidl/DOMTokenList.webidl
+++ b/dom/webidl/DOMTokenList.webidl
@@ -16,10 +16,12 @@ interface DOMTokenList {
   [Throws]
   boolean contains(DOMString token);
   [Throws]
   void add(DOMString... tokens);
   [Throws]
   void remove(DOMString... tokens);
   [Throws]
   boolean toggle(DOMString token, optional boolean force);
+  [SetterThrows]
+  attribute DOMString value;
   stringifier DOMString ();
 };
--- a/dom/webidl/Element.webidl
+++ b/dom/webidl/Element.webidl
@@ -25,17 +25,17 @@ interface Element : Node {
   // Not [Constant] because it depends on which document we're in
   [Pure]
   readonly attribute DOMString tagName;
 
   [Pure]
            attribute DOMString id;
   [Pure]
            attribute DOMString className;
-  [Constant]
+  [Constant, PutForwards=value]
   readonly attribute DOMTokenList classList;
 
   [SameObject]
   readonly attribute NamedNodeMap attributes;
   [Pure]
   sequence<DOMString> getAttributeNames();
   [Pure]
   DOMString? getAttribute(DOMString name);
--- a/dom/webidl/HTMLAnchorElement.webidl
+++ b/dom/webidl/HTMLAnchorElement.webidl
@@ -18,16 +18,17 @@ interface HTMLAnchorElement : HTMLElemen
            [SetterThrows]
            attribute DOMString download;
            [SetterThrows]
            attribute DOMString ping;
            [SetterThrows]
            attribute DOMString rel;
            [SetterThrows, Pref="network.http.enablePerElementReferrer"]
            attribute DOMString referrerPolicy;
+           [PutForwards=value]
   readonly attribute DOMTokenList relList;
            [SetterThrows]
            attribute DOMString hreflang;
            [SetterThrows]
            attribute DOMString type;
 
            [SetterThrows]
            attribute DOMString text;
--- a/dom/webidl/HTMLAreaElement.webidl
+++ b/dom/webidl/HTMLAreaElement.webidl
@@ -25,16 +25,17 @@ interface HTMLAreaElement : HTMLElement 
            [SetterThrows]
            attribute DOMString download;
            [SetterThrows]
            attribute DOMString ping;
            [SetterThrows]
            attribute DOMString rel;
            [SetterThrows, Pref="network.http.enablePerElementReferrer"]
            attribute DOMString referrerPolicy;
+           [PutForwards=value]
   readonly attribute DOMTokenList relList;
 };
 
 HTMLAreaElement implements HTMLHyperlinkElementUtils;
 
 // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
 partial interface HTMLAreaElement {
            [SetterThrows]
--- a/dom/webidl/HTMLElement.webidl
+++ b/dom/webidl/HTMLElement.webidl
@@ -23,21 +23,21 @@ interface HTMLElement : Element {
   readonly attribute DOMStringMap dataset;
 
   [GetterThrows, Pure]
            attribute DOMString innerText;
 
   // microdata 
   [SetterThrows, Pure]
            attribute boolean itemScope;
-  [PutForwards=value,Constant] readonly attribute DOMSettableTokenList itemType;
+  [PutForwards=value,Constant] readonly attribute DOMTokenList itemType;
   [SetterThrows, Pure]
            attribute DOMString itemId;
-  [PutForwards=value,Constant] readonly attribute DOMSettableTokenList itemRef;
-  [PutForwards=value,Constant] readonly attribute DOMSettableTokenList itemProp;
+  [PutForwards=value,Constant] readonly attribute DOMTokenList itemRef;
+  [PutForwards=value,Constant] readonly attribute DOMTokenList itemProp;
   [Constant]
   readonly attribute HTMLPropertiesCollection properties;
   [Throws]
            attribute any itemValue;
 
   // user interaction
   [SetterThrows, Pure]
            attribute boolean hidden;
@@ -49,17 +49,17 @@ interface HTMLElement : Element {
   [Throws]
   void blur();
   [SetterThrows, Pure]
            attribute DOMString accessKey;
   [Pure]
   readonly attribute DOMString accessKeyLabel;
   [SetterThrows, Pure]
            attribute boolean draggable;
-  //[PutForwards=value] readonly attribute DOMSettableTokenList dropzone;
+  //[PutForwards=value] readonly attribute DOMTokenList dropzone;
   [SetterThrows, Pure]
            attribute DOMString contentEditable;
   [Pure]
   readonly attribute boolean isContentEditable;
   [Pure]
   readonly attribute HTMLMenuElement? contextMenu;
   //[SetterThrows]
   //         attribute HTMLMenuElement? contextMenu;
--- a/dom/webidl/HTMLIFrameElement.webidl
+++ b/dom/webidl/HTMLIFrameElement.webidl
@@ -13,17 +13,17 @@
 
 interface HTMLIFrameElement : HTMLElement {
   [SetterThrows, Pure]
            attribute DOMString src;
   [SetterThrows, Pure]
            attribute DOMString srcdoc;
   [SetterThrows, Pure]
            attribute DOMString name;
-  [PutForwards=value] readonly attribute DOMSettableTokenList sandbox;
+  [PutForwards=value] readonly attribute DOMTokenList sandbox;
            // attribute boolean seamless;
   [SetterThrows, Pure]
            attribute boolean allowFullscreen;
   [SetterThrows, Pure]
            attribute DOMString width;
   [SetterThrows, Pure]
            attribute DOMString height;
   [SetterThrows, Pure, Pref="network.http.enablePerElementReferrer"]
--- a/dom/webidl/HTMLLinkElement.webidl
+++ b/dom/webidl/HTMLLinkElement.webidl
@@ -16,24 +16,25 @@ interface HTMLLinkElement : HTMLElement 
   [Pure]
            attribute boolean disabled;
   [SetterThrows, Pure]
            attribute DOMString href;
   [SetterThrows, Pure]
            attribute DOMString? crossOrigin;
   [SetterThrows, Pure]
            attribute DOMString rel;
+  [PutForwards=value]
   readonly attribute DOMTokenList relList;
   [SetterThrows, Pure]
            attribute DOMString media;
   [SetterThrows, Pure]
            attribute DOMString hreflang;
   [SetterThrows, Pure]
            attribute DOMString type;
-  [PutForwards=value] readonly attribute DOMSettableTokenList sizes;
+  [PutForwards=value] readonly attribute DOMTokenList sizes;
 };
 HTMLLinkElement implements LinkStyle;
 
 // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
 partial interface HTMLLinkElement {
   [SetterThrows, Pure]
            attribute DOMString charset;
   [SetterThrows, Pure]
--- a/dom/webidl/HTMLOutputElement.webidl
+++ b/dom/webidl/HTMLOutputElement.webidl
@@ -9,17 +9,17 @@
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-output-element
 interface HTMLOutputElement : HTMLElement {
   [PutForwards=value, Constant]
-  readonly attribute DOMSettableTokenList htmlFor;
+  readonly attribute DOMTokenList htmlFor;
   readonly attribute HTMLFormElement? form;
   [SetterThrows, Pure]
            attribute DOMString name;
 
   [Constant]
   readonly attribute DOMString type;
   [SetterThrows, Pure]
            attribute DOMString defaultValue;
--- a/dom/webidl/HTMLTableCellElement.webidl
+++ b/dom/webidl/HTMLTableCellElement.webidl
@@ -11,17 +11,17 @@
  * and create derivative works of this document.
  */
 
 interface HTMLTableCellElement : HTMLElement {
            [SetterThrows]
            attribute unsigned long colSpan;
            [SetterThrows]
            attribute unsigned long rowSpan;
-  //[PutForwards=value] readonly attribute DOMSettableTokenList headers;
+  //[PutForwards=value] readonly attribute DOMTokenList headers;
            [SetterThrows]
            attribute DOMString headers;
   readonly attribute long cellIndex;
 
   // Mozilla-specific extensions
            [SetterThrows]
            attribute DOMString abbr;
            [SetterThrows]
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -130,17 +130,16 @@ WEBIDL_FILES = [
     'DOMMatrix.webidl',
     'DOMMobileMessageError.webidl',
     'DOMParser.webidl',
     'DOMPoint.webidl',
     'DOMQuad.webidl',
     'DOMRect.webidl',
     'DOMRectList.webidl',
     'DOMRequest.webidl',
-    'DOMSettableTokenList.webidl',
     'DOMStringList.webidl',
     'DOMStringMap.webidl',
     'DOMTokenList.webidl',
     'DOMTransaction.webidl',
     'Downloads.webidl',
     'DragEvent.webidl',
     'DummyBinding.webidl',
     'DynamicsCompressorNode.webidl',
--- a/testing/web-platform/tests/dom/interface-objects.html
+++ b/testing/web-platform/tests/dom/interface-objects.html
@@ -27,18 +27,17 @@ var interfaces = [
   "Text",
   "Comment",
   "NodeIterator",
   "TreeWalker",
   "NodeFilter",
   "NodeList",
   "HTMLCollection",
   "DOMTokenList",
-  "DOMSettableTokenList"
-];
+  ];
 test(function() {
   for (var p in window) {
     interfaces.forEach(function(i) {
       assert_not_equals(p, i)
     })
   }
 }, "Interface objects properties should not be Enumerable")
 interfaces.forEach(testInterfaceDeletable);
--- a/testing/web-platform/tests/dom/interfaces.html
+++ b/testing/web-platform/tests/dom/interfaces.html
@@ -278,17 +278,17 @@ interface DocumentType : Node {
 interface Element : Node {
   readonly attribute DOMString? namespaceURI;
   readonly attribute DOMString? prefix;
   readonly attribute DOMString localName;
   readonly attribute DOMString tagName;
 
            attribute DOMString id;
            attribute DOMString className;
-  [SameObject] readonly attribute DOMTokenList classList;
+  [SameObject, PutForwards=value] readonly attribute DOMTokenList classList;
 
   boolean hasAttributes();
   [SameObject] readonly attribute NamedNodeMap attributes;
   DOMString? getAttribute(DOMString name);
   DOMString? getAttributeNS(DOMString? namespace, DOMString localName);
   void setAttribute(DOMString name, DOMString value);
   void setAttributeNS(DOMString? namespace, DOMString name, DOMString value);
   void removeAttribute(DOMString name);
@@ -458,20 +458,16 @@ interface DOMTokenList {
   getter DOMString? item(unsigned long index);
   boolean contains(DOMString token);
   void add(DOMString... tokens);
   void remove(DOMString... tokens);
   boolean toggle(DOMString token, optional boolean force);
   stringifier;
 //  iterable<DOMString>;
 };
-
-interface DOMSettableTokenList : DOMTokenList {
-            attribute DOMString value;
-};
 </script>
 <script>
 "use strict";
 var xmlDoc, detachedRange, element;
 var idlArray;
 setup(function() {
   xmlDoc = document.implementation.createDocument(null, "", null);
   detachedRange = document.createRange();
--- a/testing/web-platform/tests/html/dom/interfaces.html
+++ b/testing/web-platform/tests/html/dom/interfaces.html
@@ -280,17 +280,17 @@ interface DocumentType : Node {
 interface Element : Node {
   readonly attribute DOMString? namespaceURI;
   readonly attribute DOMString? prefix;
   readonly attribute DOMString localName;
   readonly attribute DOMString tagName;
 
            attribute DOMString id;
            attribute DOMString className;
-  [SameObject] readonly attribute DOMTokenList classList;
+  [SameObject, PutForwards=value] readonly attribute DOMTokenList classList;
 
   boolean hasAttributes();
   [SameObject] readonly attribute NamedNodeMap attributes;
   DOMString? getAttribute(DOMString name);
   DOMString? getAttributeNS(DOMString? namespace, DOMString localName);
   void setAttribute(DOMString name, DOMString value);
   void setAttributeNS(DOMString? namespace, DOMString name, DOMString value);
   void removeAttribute(DOMString name);
@@ -457,23 +457,20 @@ callback interface NodeFilter {
 
 interface DOMTokenList {
   readonly attribute unsigned long length;
   getter DOMString? item(unsigned long index);
   boolean contains(DOMString token);
   void add(DOMString... tokens);
   void remove(DOMString... tokens);
   boolean toggle(DOMString token, optional boolean force);
+  attribute DOMString value;
   stringifier;
 //  iterable<DOMString>;
 };
-
-interface DOMSettableTokenList : DOMTokenList {
-            attribute DOMString value;
-};
 </script>
 <!-- UI Events IDLs -->
 <script type=text/plain class=untested>
 [Constructor(DOMString type, optional UIEventInit eventInitDict)]
 interface UIEvent : Event {
     readonly    attribute WindowProxy? view;
     readonly    attribute long         detail;
 };
@@ -993,33 +990,33 @@ interface HTMLElement : Element {
            attribute DOMString title;
            attribute DOMString lang;
            attribute boolean translate;
            attribute DOMString dir;
   readonly attribute DOMStringMap dataset;
 
   // microdata
            attribute boolean itemScope;
-  [PutForwards=value] readonly attribute DOMSettableTokenList itemType;
+  [PutForwards=value] readonly attribute DOMTokenList itemType;
            attribute DOMString itemId;
-  [PutForwards=value] readonly attribute DOMSettableTokenList itemRef;
-  [PutForwards=value] readonly attribute DOMSettableTokenList itemProp;
+  [PutForwards=value] readonly attribute DOMTokenList itemRef;
+  [PutForwards=value] readonly attribute DOMTokenList itemProp;
   readonly attribute HTMLPropertiesCollection properties;
            attribute any itemValue; // acts as DOMString on setting
 
   // user interaction
            attribute boolean hidden;
   void click();
            attribute long tabIndex;
   void focus();
   void blur();
            attribute DOMString accessKey;
   readonly attribute DOMString accessKeyLabel;
            attribute boolean draggable;
-  [PutForwards=value] readonly attribute DOMSettableTokenList dropzone;
+  [PutForwards=value] readonly attribute DOMTokenList dropzone;
            attribute DOMString contentEditable;
   readonly attribute boolean isContentEditable;
            attribute HTMLMenuElement? contextMenu;
            attribute boolean spellcheck;
   void forceSpellCheck();
 
   // command API
   readonly attribute DOMString? commandType;
@@ -1047,21 +1044,22 @@ interface HTMLBaseElement : HTMLElement 
            attribute DOMString href;
            attribute DOMString target;
 };
 
 interface HTMLLinkElement : HTMLElement {
            attribute DOMString href;
            attribute DOMString crossOrigin;
            attribute DOMString rel;
+           [PutForwards=value]
   readonly attribute DOMTokenList relList;
            attribute DOMString media;
            attribute DOMString hreflang;
            attribute DOMString type;
-  [PutForwards=value] readonly attribute DOMSettableTokenList sizes;
+  [PutForwards=value] readonly attribute DOMTokenList sizes;
 
   // also has obsolete members
 };
 HTMLLinkElement implements LinkStyle;
 
 interface HTMLMetaElement : HTMLElement {
            attribute DOMString name;
            attribute DOMString httpEquiv;
@@ -1127,19 +1125,19 @@ interface HTMLDListElement : HTMLElement
 
 interface HTMLDivElement : HTMLElement {
   // also has obsolete members
 };
 
 interface HTMLAnchorElement : HTMLElement {
   attribute DOMString target;
   attribute DOMString download;
-  [PutForwards=value] readonly attribute DOMSettableTokenList ping;
+  [PutForwards=value] readonly attribute DOMTokenList ping;
   attribute DOMString rel;
-  readonly attribute DOMTokenList relList;
+  [PutForwards=value] readonly attribute DOMTokenList relList;
   attribute DOMString hreflang;
   attribute DOMString type;
 
   attribute DOMString text;
 };
 HTMLAnchorElement implements HTMLHyperlinkElementUtils;
 
 interface HTMLDataElement : HTMLElement {
@@ -1187,17 +1185,17 @@ interface HTMLImageElement : HTMLElement
 
   // also has obsolete members
 };
 
 interface HTMLIFrameElement : HTMLElement {
            attribute DOMString src;
            attribute DOMString srcdoc;
            attribute DOMString name;
-  [PutForwards=value] readonly attribute DOMSettableTokenList sandbox;
+  [PutForwards=value] readonly attribute DOMTokenList sandbox;
            attribute boolean seamless;
            attribute boolean allowFullscreen;
            attribute DOMString width;
            attribute DOMString height;
   readonly attribute Document? contentDocument;
   readonly attribute WindowProxy? contentWindow;
 
   // also has obsolete members
@@ -1497,19 +1495,19 @@ interface HTMLMapElement : HTMLElement {
 };
 
 interface HTMLAreaElement : HTMLElement {
   attribute DOMString alt;
   attribute DOMString coords;
   attribute DOMString shape;
   attribute DOMString target;
   attribute DOMString download;
-  [PutForwards=value] readonly attribute DOMSettableTokenList ping;
+  [PutForwards=value] readonly attribute DOMTokenList ping;
   attribute DOMString rel;
-  readonly attribute DOMTokenList relList;
+  [PutForwards=value] readonly attribute DOMTokenList relList;
   // hreflang and type are not reflected
 };
 HTMLAreaElement implements HTMLHyperlinkElementUtils;
 
 interface HTMLTableElement : HTMLElement {
            attribute HTMLTableCaptionElement? caption;
   HTMLElement createCaption();
   void deleteCaption();
@@ -1567,17 +1565,17 @@ interface HTMLTableHeaderCellElement : H
            attribute DOMString abbr;
            attribute DOMString sorted;
   void sort();
 };
 
 interface HTMLTableCellElement : HTMLElement {
            attribute unsigned long colSpan;
            attribute unsigned long rowSpan;
-  [PutForwards=value] readonly attribute DOMSettableTokenList headers;
+  [PutForwards=value] readonly attribute DOMTokenList headers;
   readonly attribute long cellIndex;
 
   // also has obsolete members
 };
 
 [OverrideBuiltins]
 interface HTMLFormElement : HTMLElement {
            attribute DOMString acceptCharset;
@@ -1811,17 +1809,17 @@ interface HTMLKeygenElement : HTMLElemen
   boolean checkValidity();
   boolean reportValidity();
   void setCustomValidity(DOMString error);
 
   readonly attribute NodeList labels;
 };
 
 interface HTMLOutputElement : HTMLElement {
-  [PutForwards=value] readonly attribute DOMSettableTokenList htmlFor;
+  [PutForwards=value] readonly attribute DOMTokenList htmlFor;
   readonly attribute HTMLFormElement? form;
            attribute DOMString name;
 
   readonly attribute DOMString type;
            attribute DOMString defaultValue;
            attribute DOMString value;
 
   readonly attribute boolean willValidate;
--- a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_011.htm
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_011.htm
@@ -1,65 +1,65 @@
 <!DOCTYPE html>
 <html>
 <head>
-    <title>HTML5 Sandbox: iframe sandbox attribute value support DOMSettableTokenList interface.</title>
+    <title>HTML5 Sandbox: iframe sandbox attribute value support DOMTokenList interface.</title>
     <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
     <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
     <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-iframe-element" />
-    <meta name="assert" content="iframe sandbox attribute value support DOMSettableTokenList interface." />
+    <meta name="assert" content="iframe sandbox attribute value support DOMTokenList interface." />
     <script src="/resources/testharness.js"></script>
     <script src="/resources/testharnessreport.js"></script>
 </head>
 <body>
     <div id=log></div>
     <iframe id="iframe1" src="about:blank" sandbox="allow-scripts allow-same-origin allow-forms" style="display : none"></iframe>
     <script type="text/javascript">
     
     test(function() {
         var iframeEle = document.getElementById("iframe1");
         assert_equals(iframeEle.sandbox.length, 3)
-    }, "DOMSettableTokenList length")
+    }, "DOMTokenList length")
     
     test(function() {
         var iframeEle = document.getElementById("iframe1");
         assert_equals(iframeEle.sandbox.item(1),  "allow-same-origin")
-    }, "DOMSettableTokenList item(index)")
+    }, "DOMTokenList item(index)")
     
     test(function() {
         var iframeEle = document.getElementById("iframe1");
         assert_true(iframeEle.sandbox.contains("allow-forms"))
-    }, "DOMSettableTokenList contains(DomString)")
+    }, "DOMTokenList contains(DomString)")
     
     test(function() {
         var iframeEle = document.getElementById("iframe1"); 
         iframeEle.sandbox.add("ALLOW-SANDBOX");
         assert_true(iframeEle.sandbox.contains("ALLOW-SANDBOX"))
-    }, "DOMSettableTokenList add(DomString)")
+    }, "DOMTokenList add(DomString)")
     
     test(function() {
         var iframeEle = document.getElementById("iframe1");
         iframeEle.sandbox.remove("ALLOW-SANDBOX");
         assert_false(iframeEle.sandbox.contains("ALLOW-SANDBOX"))
-    }, "DOMSettableTokenList remove(DomString)")
+    }, "DOMTokenList remove(DomString)")
         
     test(function() {
         var iframeEle = document.getElementById("iframe1");
         iframeEle.sandbox.remove("ALLOW-SANDBOX");
         assert_true( 
             iframeEle.sandbox.toggle("allow-top-navigation") && iframeEle.sandbox.contains("allow-top-navigation") &&
             !iframeEle.sandbox.toggle("allow-top-navigation") && !iframeEle.sandbox.contains("allow-top-navigation")
         )
-    }, "DOMSettableTokenList toggle(DomString) - Returns true if token is now present (it was added); returns false if it is not (it was removed).")
+    }, "DOMTokenList toggle(DomString) - Returns true if token is now present (it was added); returns false if it is not (it was removed).")
 
     test(function() {
         var iframeEle = document.getElementById("iframe1");
         assert_equals(iframeEle.sandbox.value, iframeEle.sandbox.toString())
-    }, "DOMSettableTokenList sandbox.toString()")
+    }, "DOMTokenList sandbox.toString()")
     
     test(function() {
         var iframeEle = document.getElementById("iframe1");
         iframeEle.sandbox.remove("ALLOW-SANDBOX");
         assert_true(iframeEle.sandbox.contains("allow-scripts") != iframeEle.sandbox.contains("Allow-SCRIPTS"))
-    }, "DOMSettableTokenList case sensitivity")
+    }, "DOMTokenList case sensitivity")
     </script>
 </body>
 </html>