[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 15:14:21 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 691d04f12daca2f051f5b48b0b5ac461eff52248
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 29 09:32:14 2010 +0000

    2010-10-29  Kenichi Ishibashi  <bashi at google.com>
    
            Reviewed by Kent Tamura.
    
            [HTML5] Add DOMSettableTokenList
            https://bugs.webkit.org/show_bug.cgi?id=47810
    
            * fast/dom/Window/window-properties-expected.txt: Updated expectations.
            * fast/dom/Window/window-property-descriptors-expected.txt: Updated expectations.
            * fast/dom/prototype-inheritance-2-expected.txt: Updated expectations.
            * fast/dom/prototype-inheritance-expected.txt: Updated expectations.
            * fast/js/global-constructors-expected.txt: Updated expectations.
    2010-10-29  Kenichi Ishibashi  <bashi at google.com>
    
            Reviewed by Kent Tamura.
    
            [HTML5] Add DOMSettableTokenList
            https://bugs.webkit.org/show_bug.cgi?id=47810
    
            Adds DOMSettableTokenList interface to support <output> element.
            The DOMTokenList interface was refactored since its was tightly coupled
            with HTMLElement.classList property.
    
            * Android.derived.jscbindings.mk: Added JSDOMSettableTokenList.h file.
            * Android.derived.v8bindings.mk: Added V8DOMSettableTokenList.h file.
            * Android.jscbindings.mk: Added JSDOMSettableTokenList.cpp file.
            * Android.mk: Added ClassList.cpp file.
            * CMakeLists.txt: Added DOMSettableTokenList.{cpp,idl} and ClassList.cpp files.
            * DerivedSources.cpp: Added JSDOMSettableTokenList.cpp file.
            * DerivedSources.make: Added DOMSettableTokenList entry.
            * GNUmakefile.am: Added JSDOMSettableTokenList.{h,cpp} and ClassList.{h,cpp} files.
            * WebCore.gypi: Added DOMSettableTokenList.{h,cpp,idl}, V8DOMSettableTokenListCustom.cpp and ClassList.{h,cpp} files.
            * WebCore.pri: Added DOMSettableTokenList.idl file.
            * WebCore.pro: Added V8DOMSettableTokenListCustom.cpp, ClassList.{h,cpp} and DOMSettableTokenList.{h,cpp} files.
            * WebCore.vcproj/WebCore.vcproj: Added JSDOMSettableTokenList.{h,cpp}, ClassList.{h,cpp} and DOMSettableTokenList.{h,cpp} files.
            * WebCore.xcodeproj/project.pbxproj: Added ClassList.{h,cpp}, DOMSettabletokenList.{h,cpp} and JSDOMSettableTokenList.{h,cpp}
            * bindings/gobject/GNUmakefile.am: Added WebKitDOMDOMSettableTokenList.{h,cpp} and WebKitDOMDOMSettableTokenListPrivate.cpp files.
            * bindings/scripts/CodeGeneratorJS.pm: Modified IndexGetterReturnsStrings() returns 1 for DOMSettableTokenList.
            * bindings/v8/custom/V8DOMSettableTokenListCustom.cpp: Added.
            (WebCore::V8DOMSettableTokenList::indexedPropertyGetter):
            * dom/Element.cpp: Replaced DOMTokenList to ClassList.
            (WebCore::Element::classList):
            * dom/ElementRareData.h: ditto.
            * dom/SpaceSplitString.cpp: Added add() and remove() functions.
            (WebCore::SpaceSplitStringData::add):
            (WebCore::SpaceSplitStringData::remove):
            (WebCore::SpaceSplitString::add):
            (WebCore::SpaceSplitString::remove):
            * dom/SpaceSplitString.h: Added add() and remove() functions.
            * dom/StyledElement.cpp: Replaced DOMTokenList to ClassList.
            (WebCore::StyledElement::classAttributeChanged):
            * dom/StyledElement.h: ditto.
            * html/ClassList.cpp: Added, mostly from original DOMTokenList.cpp.
            (WebCore::ClassList::ClassList):
            (WebCore::ClassList::ref):
            (WebCore::ClassList::deref):
            (WebCore::ClassList::length):
            (WebCore::ClassList::item):
            (WebCore::ClassList::contains):
            (WebCore::ClassList::containsInternal):
            (WebCore::ClassList::add):
            (WebCore::ClassList::addInternal):
            (WebCore::ClassList::remove):
            (WebCore::ClassList::removeInternal):
            (WebCore::ClassList::toggle):
            (WebCore::ClassList::toString):
            (WebCore::ClassList::reset):
            (WebCore::ClassList::classNames):
            * html/ClassList.h: Added, mostly from original DOMTokenList.h.
            (WebCore::ClassList::create):
            (WebCore::ClassList::element):
            * html/DOMSettableTokenList.cpp: Added.
            (WebCore::DOMSettableTokenList::DOMSettableTokenList):
            (WebCore::DOMSettableTokenList::~DOMSettableTokenList):
            (WebCore::DOMSettableTokenList::item):
            (WebCore::DOMSettableTokenList::contains):
            (WebCore::DOMSettableTokenList::add):
            (WebCore::DOMSettableTokenList::addInternal):
            (WebCore::DOMSettableTokenList::remove):
            (WebCore::DOMSettableTokenList::removeInternal):
            (WebCore::DOMSettableTokenList::toggle):
            (WebCore::DOMSettableTokenList::setValue):
            * html/DOMSettableTokenList.h: Added.
            (WebCore::DOMSettableTokenList::create):
            (WebCore::DOMSettableTokenList::ref):
            (WebCore::DOMSettableTokenList::deref):
            (WebCore::DOMSettableTokenList::length):
            (WebCore::DOMSettableTokenList::toString):
            (WebCore::DOMSettableTokenList::value):
            * html/DOMSettableTokenList.idl: Added.
            * html/DOMTokenList.cpp: Refactored to be an abstract interface for both of ClassList and DOMSettableTokenList.
            (WebCore::DOMTokenList::validateToken): Changed to be a static member function of DOMTokenList.
            (WebCore::DOMTokenList::addToken): Added, mostly from original DOMTokenList::addInternal().
            (WebCore::DOMTokenList::removeToken): Added, mostly from original DOMTokenList::removeInternal().
            * html/DOMTokenList.h: Refactored to be an abstract interface for both of ClassList and DOMSettableTokenList.
            (WebCore::DOMTokenList::~DOMTokenList):
            (WebCore::DOMTokenList::element):
            * page/DOMWindow.cpp: Added an entry for DOMSettableTokenList.
            * page/DOMWindow.idl: ditto.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70854 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 83ac587..bd7de6f 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2010-10-29  Kenichi Ishibashi  <bashi at google.com>
+
+        Reviewed by Kent Tamura.
+
+        [HTML5] Add DOMSettableTokenList
+        https://bugs.webkit.org/show_bug.cgi?id=47810
+
+        * fast/dom/Window/window-properties-expected.txt: Updated expectations.
+        * fast/dom/Window/window-property-descriptors-expected.txt: Updated expectations.
+        * fast/dom/prototype-inheritance-2-expected.txt: Updated expectations.
+        * fast/dom/prototype-inheritance-expected.txt: Updated expectations.
+        * fast/js/global-constructors-expected.txt: Updated expectations.
+
 2010-10-29  Mihai Parparita  <mihaip at chromium.org>
 
         Reviewed by Adam Barth.
diff --git a/LayoutTests/fast/dom/Window/window-properties-expected.txt b/LayoutTests/fast/dom/Window/window-properties-expected.txt
index 8d4a40d..605a3b8 100644
--- a/LayoutTests/fast/dom/Window/window-properties-expected.txt
+++ b/LayoutTests/fast/dom/Window/window-properties-expected.txt
@@ -555,6 +555,14 @@ window.DOMImplementation.prototype.hasFeature [function]
 window.DOMParser [object DOMParserConstructor]
 window.DOMParser.prototype [object DOMParserPrototype]
 window.DOMParser.prototype.parseFromString [function]
+window.DOMSettableTokenList [object DOMSettableTokenListConstructor]
+window.DOMSettableTokenList.prototype [object DOMSettableTokenListPrototype]
+window.DOMSettableTokenList.prototype.add [function]
+window.DOMSettableTokenList.prototype.contains [function]
+window.DOMSettableTokenList.prototype.item [function]
+window.DOMSettableTokenList.prototype.remove [function]
+window.DOMSettableTokenList.prototype.toString [function]
+window.DOMSettableTokenList.prototype.toggle [function]
 window.DOMStringList [object DOMStringListConstructor]
 window.DOMStringList.prototype [object DOMStringListPrototype]
 window.DOMStringList.prototype.contains [function]
diff --git a/LayoutTests/fast/dom/Window/window-property-descriptors-expected.txt b/LayoutTests/fast/dom/Window/window-property-descriptors-expected.txt
index b9de586..8ad9a79 100644
--- a/LayoutTests/fast/dom/Window/window-property-descriptors-expected.txt
+++ b/LayoutTests/fast/dom/Window/window-property-descriptors-expected.txt
@@ -38,6 +38,7 @@ PASS typeof Object.getOwnPropertyDescriptor(window, 'Counter') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'DOMException') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'DOMImplementation') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'DOMParser') is 'object'
+PASS typeof Object.getOwnPropertyDescriptor(window, 'DOMSettableTokenList') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'DOMStringList') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'DOMStringMap') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'DOMTokenList') is 'object'
diff --git a/LayoutTests/fast/dom/prototype-inheritance-2-expected.txt b/LayoutTests/fast/dom/prototype-inheritance-2-expected.txt
index cb33387..6d86608 100644
--- a/LayoutTests/fast/dom/prototype-inheritance-2-expected.txt
+++ b/LayoutTests/fast/dom/prototype-inheritance-2-expected.txt
@@ -226,6 +226,7 @@ Never found CanvasGradient
 Never found CharacterData
 Never found Clipboard
 Never found DOMParser
+Never found DOMSettableTokenList
 Never found DOMStringList
 Never found Document
 Never found DocumentFragment
diff --git a/LayoutTests/fast/dom/prototype-inheritance-expected.txt b/LayoutTests/fast/dom/prototype-inheritance-expected.txt
index fa6476a..53c4339 100644
--- a/LayoutTests/fast/dom/prototype-inheritance-expected.txt
+++ b/LayoutTests/fast/dom/prototype-inheritance-expected.txt
@@ -73,6 +73,8 @@ PASS inner.DOMImplementation.isInner is true
 PASS inner.DOMImplementation.constructor.isInner is true
 PASS inner.DOMParser.isInner is true
 PASS inner.DOMParser.constructor.isInner is true
+PASS inner.DOMSettableTokenList.isInner is true
+PASS inner.DOMSettableTokenList.constructor.isInner is true
 PASS inner.DOMStringList.isInner is true
 PASS inner.DOMStringList.constructor.isInner is true
 PASS inner.DOMStringMap.isInner is true
diff --git a/LayoutTests/fast/js/global-constructors-expected.txt b/LayoutTests/fast/js/global-constructors-expected.txt
index 2143b86..73713be 100644
--- a/LayoutTests/fast/js/global-constructors-expected.txt
+++ b/LayoutTests/fast/js/global-constructors-expected.txt
@@ -36,6 +36,7 @@ PASS Counter.toString() is '[object CounterConstructor]'
 PASS DOMException.toString() is '[object DOMExceptionConstructor]'
 PASS DOMImplementation.toString() is '[object DOMImplementationConstructor]'
 PASS DOMParser.toString() is '[object DOMParserConstructor]'
+PASS DOMSettableTokenList.toString() is '[object DOMSettableTokenListConstructor]'
 PASS DOMStringList.toString() is '[object DOMStringListConstructor]'
 PASS DOMStringMap.toString() is '[object DOMStringMapConstructor]'
 PASS DOMTokenList.toString() is '[object DOMTokenListConstructor]'
diff --git a/WebCore/Android.derived.jscbindings.mk b/WebCore/Android.derived.jscbindings.mk
index a927f11..7a850a3 100644
--- a/WebCore/Android.derived.jscbindings.mk
+++ b/WebCore/Android.derived.jscbindings.mk
@@ -159,6 +159,7 @@ GEN := \
     $(intermediates)/html/JSBlob.h \
     $(intermediates)/html/JSBlobBuilder.h \
     $(intermediates)/html/JSDOMFormData.h \
+    $(intermediates)/html/JSDOMSettableTokenList.h \
     $(intermediates)/html/JSDOMTokenList.h \
     $(intermediates)/html/JSDataGridColumn.h \
     $(intermediates)/html/JSDataGridColumnList.h \
diff --git a/WebCore/Android.derived.v8bindings.mk b/WebCore/Android.derived.v8bindings.mk
index a73157d..4eede4c 100644
--- a/WebCore/Android.derived.v8bindings.mk
+++ b/WebCore/Android.derived.v8bindings.mk
@@ -141,6 +141,7 @@ GEN := \
     $(intermediates)/bindings/V8Blob.h \
     $(intermediates)/bindings/V8BlobBuilder.h \
     $(intermediates)/bindings/V8DOMTokenList.h \
+    $(intermediates)/bindings/V8DOMSettableTokenList.h \
     $(intermediates)/bindings/V8DataGridColumn.h \
     $(intermediates)/bindings/V8DataGridColumnList.h \
     $(intermediates)/bindings/V8File.h \
diff --git a/WebCore/Android.jscbindings.mk b/WebCore/Android.jscbindings.mk
index 3288059..72eb533 100644
--- a/WebCore/Android.jscbindings.mk
+++ b/WebCore/Android.jscbindings.mk
@@ -83,6 +83,7 @@ LOCAL_SRC_FILES += \
 	bindings/js/JSDOMBinding.cpp \
 	bindings/js/JSDOMFormDataCustom.cpp \
 	bindings/js/JSDOMGlobalObject.cpp \
+	bindings/js/JSDOMSettableTokenList.cpp \
 	bindings/js/JSDOMTokenList.cpp \
 	bindings/js/JSDOMWindowBase.cpp \
 	bindings/js/JSDOMWindowCustom.cpp \
diff --git a/WebCore/Android.mk b/WebCore/Android.mk
index e20b2e5..ea0c29e 100644
--- a/WebCore/Android.mk
+++ b/WebCore/Android.mk
@@ -266,10 +266,13 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
 	html/BaseTextInputType.cpp \
 	html/ButtonInputType.cpp \
 	html/CheckboxInputType.cpp \
+	html/ClassList.cpp \
 	html/CollectionCache.cpp \
 	html/parser/CSSPreloadScanner.cpp \
 	html/ColorInputType.cpp \
 	html/DOMFormData.cpp \
+	html/DOMSettableTokenList.cpp \
+	html/DOMTokenList.cpp \
 	html/DateInputType.cpp \
 	html/DateTimeInputType.cpp \
 	html/DateTimeLocalInputType.cpp \
diff --git a/WebCore/CMakeLists.txt b/WebCore/CMakeLists.txt
index 068bd5d..33f25d8 100644
--- a/WebCore/CMakeLists.txt
+++ b/WebCore/CMakeLists.txt
@@ -207,6 +207,7 @@ SET(WebCore_IDL_FILES
     html/DataGridColumn.idl
     html/DataGridColumnList.idl
     html/DOMFormData.idl
+    html/DOMSettableTokenList.idl
     html/DOMTokenList.idl
     html/HTMLAllCollection.idl
     html/HTMLAnchorElement.idl
@@ -956,10 +957,12 @@ SET(WebCore_SOURCES
     html/BaseTextInputType.cpp
     html/ButtonInputType.cpp
     html/CheckboxInputType.cpp
+    html/ClassList.cpp
     html/CollectionCache.cpp
     html/ColorInputType.cpp
     html/DOMDataGridDataSource.cpp
     html/DOMFormData.cpp
+    html/DOMSettableTokenList.cpp
     html/DOMTokenList.cpp
     html/DataGridColumn.cpp
     html/DataGridColumnList.cpp
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 7fcee1c..addeac8 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,91 @@
+2010-10-29  Kenichi Ishibashi  <bashi at google.com>
+
+        Reviewed by Kent Tamura.
+
+        [HTML5] Add DOMSettableTokenList
+        https://bugs.webkit.org/show_bug.cgi?id=47810
+
+        Adds DOMSettableTokenList interface to support <output> element.
+        The DOMTokenList interface was refactored since its was tightly coupled
+        with HTMLElement.classList property.
+
+        * Android.derived.jscbindings.mk: Added JSDOMSettableTokenList.h file.
+        * Android.derived.v8bindings.mk: Added V8DOMSettableTokenList.h file.
+        * Android.jscbindings.mk: Added JSDOMSettableTokenList.cpp file.
+        * Android.mk: Added ClassList.cpp file.
+        * CMakeLists.txt: Added DOMSettableTokenList.{cpp,idl} and ClassList.cpp files.
+        * DerivedSources.cpp: Added JSDOMSettableTokenList.cpp file.
+        * DerivedSources.make: Added DOMSettableTokenList entry.
+        * GNUmakefile.am: Added JSDOMSettableTokenList.{h,cpp} and ClassList.{h,cpp} files.
+        * WebCore.gypi: Added DOMSettableTokenList.{h,cpp,idl}, V8DOMSettableTokenListCustom.cpp and ClassList.{h,cpp} files.
+        * WebCore.pri: Added DOMSettableTokenList.idl file.
+        * WebCore.pro: Added V8DOMSettableTokenListCustom.cpp, ClassList.{h,cpp} and DOMSettableTokenList.{h,cpp} files.
+        * WebCore.vcproj/WebCore.vcproj: Added JSDOMSettableTokenList.{h,cpp}, ClassList.{h,cpp} and DOMSettableTokenList.{h,cpp} files.
+        * WebCore.xcodeproj/project.pbxproj: Added ClassList.{h,cpp}, DOMSettabletokenList.{h,cpp} and JSDOMSettableTokenList.{h,cpp}
+        * bindings/gobject/GNUmakefile.am: Added WebKitDOMDOMSettableTokenList.{h,cpp} and WebKitDOMDOMSettableTokenListPrivate.cpp files.
+        * bindings/scripts/CodeGeneratorJS.pm: Modified IndexGetterReturnsStrings() returns 1 for DOMSettableTokenList.
+        * bindings/v8/custom/V8DOMSettableTokenListCustom.cpp: Added.
+        (WebCore::V8DOMSettableTokenList::indexedPropertyGetter):
+        * dom/Element.cpp: Replaced DOMTokenList to ClassList.
+        (WebCore::Element::classList):
+        * dom/ElementRareData.h: ditto.
+        * dom/SpaceSplitString.cpp: Added add() and remove() functions.
+        (WebCore::SpaceSplitStringData::add):
+        (WebCore::SpaceSplitStringData::remove):
+        (WebCore::SpaceSplitString::add):
+        (WebCore::SpaceSplitString::remove):
+        * dom/SpaceSplitString.h: Added add() and remove() functions.
+        * dom/StyledElement.cpp: Replaced DOMTokenList to ClassList.
+        (WebCore::StyledElement::classAttributeChanged):
+        * dom/StyledElement.h: ditto.
+        * html/ClassList.cpp: Added, mostly from original DOMTokenList.cpp.
+        (WebCore::ClassList::ClassList):
+        (WebCore::ClassList::ref):
+        (WebCore::ClassList::deref):
+        (WebCore::ClassList::length):
+        (WebCore::ClassList::item):
+        (WebCore::ClassList::contains):
+        (WebCore::ClassList::containsInternal):
+        (WebCore::ClassList::add):
+        (WebCore::ClassList::addInternal):
+        (WebCore::ClassList::remove):
+        (WebCore::ClassList::removeInternal):
+        (WebCore::ClassList::toggle):
+        (WebCore::ClassList::toString):
+        (WebCore::ClassList::reset):
+        (WebCore::ClassList::classNames):
+        * html/ClassList.h: Added, mostly from original DOMTokenList.h.
+        (WebCore::ClassList::create):
+        (WebCore::ClassList::element):
+        * html/DOMSettableTokenList.cpp: Added.
+        (WebCore::DOMSettableTokenList::DOMSettableTokenList):
+        (WebCore::DOMSettableTokenList::~DOMSettableTokenList):
+        (WebCore::DOMSettableTokenList::item):
+        (WebCore::DOMSettableTokenList::contains):
+        (WebCore::DOMSettableTokenList::add):
+        (WebCore::DOMSettableTokenList::addInternal):
+        (WebCore::DOMSettableTokenList::remove):
+        (WebCore::DOMSettableTokenList::removeInternal):
+        (WebCore::DOMSettableTokenList::toggle):
+        (WebCore::DOMSettableTokenList::setValue):
+        * html/DOMSettableTokenList.h: Added.
+        (WebCore::DOMSettableTokenList::create):
+        (WebCore::DOMSettableTokenList::ref):
+        (WebCore::DOMSettableTokenList::deref):
+        (WebCore::DOMSettableTokenList::length):
+        (WebCore::DOMSettableTokenList::toString):
+        (WebCore::DOMSettableTokenList::value):
+        * html/DOMSettableTokenList.idl: Added.
+        * html/DOMTokenList.cpp: Refactored to be an abstract interface for both of ClassList and DOMSettableTokenList.
+        (WebCore::DOMTokenList::validateToken): Changed to be a static member function of DOMTokenList.
+        (WebCore::DOMTokenList::addToken): Added, mostly from original DOMTokenList::addInternal().
+        (WebCore::DOMTokenList::removeToken): Added, mostly from original DOMTokenList::removeInternal().
+        * html/DOMTokenList.h: Refactored to be an abstract interface for both of ClassList and DOMSettableTokenList.
+        (WebCore::DOMTokenList::~DOMTokenList):
+        (WebCore::DOMTokenList::element):
+        * page/DOMWindow.cpp: Added an entry for DOMSettableTokenList.
+        * page/DOMWindow.idl: ditto.
+
 2010-10-29  Pavel Feldman  <pfeldman at chromium.org>
 
         Reviewed by Timothy Hatcher.
diff --git a/WebCore/DerivedSources.cpp b/WebCore/DerivedSources.cpp
index 01f5023..80c1304 100644
--- a/WebCore/DerivedSources.cpp
+++ b/WebCore/DerivedSources.cpp
@@ -92,6 +92,7 @@
 #include "JSDOMPlugin.cpp"
 #include "JSDOMPluginArray.cpp"
 #include "JSDOMSelection.cpp"
+#include "JSDOMSettableTokenList.cpp"
 #include "JSDOMStringList.cpp"
 #include "JSDOMStringMap.cpp"
 #include "JSDOMTokenList.cpp"
diff --git a/WebCore/DerivedSources.make b/WebCore/DerivedSources.make
index 342bb7b..4e732de 100644
--- a/WebCore/DerivedSources.make
+++ b/WebCore/DerivedSources.make
@@ -125,6 +125,7 @@ DOM_CLASSES = \
     DOMSelection \
     DOMStringList \
     DOMStringMap \
+    DOMSettableTokenList \
     DOMTokenList \
     DOMWindow \
     Database \
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index ad6f4a2..4e59a0f 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -221,6 +221,8 @@ webcore_built_sources += \
 	DerivedSources/WebCore/JSDOMPlugin.h \
 	DerivedSources/WebCore/JSDOMSelection.cpp \
 	DerivedSources/WebCore/JSDOMSelection.h \
+	DerivedSources/WebCore/JSDOMSettableTokenList.cpp \
+	DerivedSources/WebCore/JSDOMSettableTokenList.h \
 	DerivedSources/WebCore/JSDOMStringList.cpp \
 	DerivedSources/WebCore/JSDOMStringList.h \
 	DerivedSources/WebCore/JSDOMStringMap.cpp \
@@ -1478,10 +1480,14 @@ webcore_sources += \
 	WebCore/html/canvas/CanvasRenderingContext.h \
 	WebCore/html/canvas/CanvasStyle.cpp \
 	WebCore/html/canvas/CanvasStyle.h \
+	WebCore/html/DOMSettableTokenList.cpp \
+	WebCore/html/DOMSettableTokenList.h \
 	WebCore/html/DOMTokenList.cpp \
 	WebCore/html/DOMTokenList.h \
 	WebCore/html/CheckboxInputType.cpp \
 	WebCore/html/CheckboxInputType.h \
+	WebCore/html/ClassList.cpp \
+	WebCore/html/ClassList.h \
 	WebCore/html/CollectionCache.cpp \
 	WebCore/html/CollectionCache.h \
 	WebCore/html/CollectionType.h \
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index ff6693a..81e69f0 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -117,6 +117,7 @@
             'fileapi/Metadata.idl',
             'fileapi/MetadataCallback.idl',
             'html/DOMFormData.idl',
+            'html/DOMSettableTokenList.idl',
             'html/DOMTokenList.idl',
             'html/DataGridColumn.idl',
             'html/DataGridColumnList.idl',
@@ -777,6 +778,7 @@
             'bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp',
             'bindings/v8/custom/V8DocumentLocationCustom.cpp',
             'bindings/v8/custom/V8DOMFormDataCustom.cpp',
+            'bindings/v8/custom/V8DOMSettableTokenListCustom.cpp',
             'bindings/v8/custom/V8DOMStringMapCustom.cpp',
             'bindings/v8/custom/V8DOMTokenListCustom.cpp',
             'bindings/v8/custom/V8DOMWindowCustom.cpp',
@@ -1557,6 +1559,8 @@
             'html/ButtonInputType.h',
             'html/CheckboxInputType.cpp',
             'html/CheckboxInputType.h',
+            'html/ClassList.cpp',
+            'html/ClassList.h',
             'html/CollectionCache.cpp',
             'html/CollectionCache.h',
             'html/CollectionType.h',
@@ -1566,6 +1570,8 @@
             'html/DOMDataGridDataSource.h',
             'html/DOMFormData.cpp',
             'html/DOMFormData.h',
+            'html/DOMSettableTokenList.cpp',
+            'html/DOMSettableTokenList.h',
             'html/DOMTokenList.cpp',
             'html/DOMTokenList.h',
             'html/DataGridColumn.cpp',
diff --git a/WebCore/WebCore.pri b/WebCore/WebCore.pri
index 051f4d9..3b38a45 100644
--- a/WebCore/WebCore.pri
+++ b/WebCore/WebCore.pri
@@ -207,6 +207,7 @@ IDL_BINDINGS += \
     html/DataGridColumn.idl \
     html/DataGridColumnList.idl \
     html/DOMFormData.idl \
+    html/DOMSettableTokenList.idl \
     html/DOMTokenList.idl \
     html/HTMLAllCollection.idl \
     html/HTMLAudioElement.idl \
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 1466ef2..d517974 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -403,6 +403,7 @@ v8 {
         bindings/v8/custom/V8InjectedScriptHostCustom.cpp \
         bindings/v8/custom/V8InspectorFrontendHostCustom.cpp \
         bindings/v8/custom/V8CustomEventListener.cpp \
+        bindings/v8/custom/V8DOMSettableTokenListCustom.cpp \
         bindings/v8/custom/V8DOMStringMapCustom.cpp \
         bindings/v8/custom/V8DOMTokenListCustom.cpp
 
@@ -846,10 +847,12 @@ SOURCES += \
     html/BaseTextInputType.cpp \
     html/ButtonInputType.cpp \
     html/CheckboxInputType.cpp \
+    html/ClassList.cpp \
     html/CollectionCache.cpp \
     html/ColorInputType.cpp \
     html/DOMDataGridDataSource.cpp \
     html/DOMFormData.cpp \
+    html/DOMSettableTokenList.cpp \
     html/DOMTokenList.cpp \
     html/DataGridColumn.cpp \
     html/DataGridColumnList.cpp \
@@ -1752,12 +1755,14 @@ HEADERS += \
     html/canvas/CanvasRenderingContext.h \
     html/canvas/CanvasRenderingContext2D.h \
     html/canvas/CanvasStyle.h \
+    html/ClassList.h \
     html/CollectionCache.h \
     html/DataGridColumn.h \
     html/DataGridColumnList.h \
     html/DateComponents.h \
     html/DOMDataGridDataSource.h \
     html/DOMFormData.h \
+    html/DOMSettableTokenList.h \
     html/DOMTokenList.h \
     html/FormDataList.h \
     html/FTPDirectoryDocument.h \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 3d1f1c9..ba8af5f 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -3960,6 +3960,62 @@
 				>
 			</File>
 			<File
+				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDOMSettableTokenList.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug_Internal|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug_Cairo|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release_Cairo|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug_All|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDOMSettableTokenList.h"
+				>
+			</File>
+			<File
 				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDOMStringList.cpp"
 				>
 				<FileConfiguration
@@ -48476,6 +48532,14 @@
 				>
 			</File>
 			<File
+				RelativePath="..\html\ClassList.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\html\ClassList.h"
+				>
+			</File>
+			<File
 				RelativePath="..\html\CollectionCache.cpp"
 				>
 				<FileConfiguration
@@ -48640,6 +48704,14 @@
 				>
 			</File>
 			<File
+				RelativePath="..\html\DOMSettableTokenList.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\html\DOMSettableTokenList.h"
+				>
+			</File>
+			<File
 				RelativePath="..\html\DOMTokenList.cpp"
 				>
 			</File>
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index b9eae3f..44f1652 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -1122,6 +1122,12 @@
 		49FFBF3F11C93EE3006A7118 /* WebGLLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 49FFBF3D11C93EE3006A7118 /* WebGLLayer.h */; };
 		49FFBF4011C93EE3006A7118 /* WebGLLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 49FFBF3E11C93EE3006A7118 /* WebGLLayer.mm */; };
 		4A8C96EB0BE69032004EEFF0 /* SelectionControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4A8C96EA0BE69032004EEFF0 /* SelectionControllerMac.mm */; };
+		4ACBC0BE12713CBD0094F9B2 /* ClassList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4ACBC0BC12713CBD0094F9B2 /* ClassList.cpp */; };
+		4ACBC0BF12713CBD0094F9B2 /* ClassList.h in Headers */ = {isa = PBXBuildFile; fileRef = 4ACBC0BD12713CBD0094F9B2 /* ClassList.h */; };
+		4ACBC0C312713CCA0094F9B2 /* DOMSettableTokenList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4ACBC0C012713CCA0094F9B2 /* DOMSettableTokenList.cpp */; };
+		4ACBC0C412713CCA0094F9B2 /* DOMSettableTokenList.h in Headers */ = {isa = PBXBuildFile; fileRef = 4ACBC0C112713CCA0094F9B2 /* DOMSettableTokenList.h */; };
+		4ACBC0CA12713D0A0094F9B2 /* JSDOMSettableTokenList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4ACBC0C812713D0A0094F9B2 /* JSDOMSettableTokenList.cpp */; };
+		4ACBC0CB12713D0A0094F9B2 /* JSDOMSettableTokenList.h in Headers */ = {isa = PBXBuildFile; fileRef = 4ACBC0C912713D0A0094F9B2 /* JSDOMSettableTokenList.h */; };
 		4B2708C70AF19EE40065127F /* Pasteboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B2708C50AF19EE40065127F /* Pasteboard.h */; };
 		4B2709830AF2E5E00065127F /* PasteboardMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4B2709810AF2E5E00065127F /* PasteboardMac.mm */; };
 		4B3043C70AE0370300A82647 /* Sound.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B3043C60AE0370300A82647 /* Sound.h */; };
@@ -7203,6 +7209,13 @@
 		49FFBF3D11C93EE3006A7118 /* WebGLLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGLLayer.h; sourceTree = "<group>"; };
 		49FFBF3E11C93EE3006A7118 /* WebGLLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebGLLayer.mm; sourceTree = "<group>"; };
 		4A8C96EA0BE69032004EEFF0 /* SelectionControllerMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = SelectionControllerMac.mm; path = mac/SelectionControllerMac.mm; sourceTree = "<group>"; };
+		4ACBC0BC12713CBD0094F9B2 /* ClassList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ClassList.cpp; sourceTree = "<group>"; };
+		4ACBC0BD12713CBD0094F9B2 /* ClassList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClassList.h; sourceTree = "<group>"; };
+		4ACBC0C012713CCA0094F9B2 /* DOMSettableTokenList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMSettableTokenList.cpp; sourceTree = "<group>"; };
+		4ACBC0C112713CCA0094F9B2 /* DOMSettableTokenList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMSettableTokenList.h; sourceTree = "<group>"; };
+		4ACBC0C212713CCA0094F9B2 /* DOMSettableTokenList.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMSettableTokenList.idl; sourceTree = "<group>"; };
+		4ACBC0C812713D0A0094F9B2 /* JSDOMSettableTokenList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMSettableTokenList.cpp; sourceTree = "<group>"; };
+		4ACBC0C912713D0A0094F9B2 /* JSDOMSettableTokenList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMSettableTokenList.h; sourceTree = "<group>"; };
 		4B2708C50AF19EE40065127F /* Pasteboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Pasteboard.h; sourceTree = "<group>"; };
 		4B2709810AF2E5E00065127F /* PasteboardMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PasteboardMac.mm; sourceTree = "<group>"; };
 		4B3043C60AE0370300A82647 /* Sound.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Sound.h; sourceTree = "<group>"; };
@@ -12979,8 +12992,8 @@
 				2EB4BCD0121F03E300EC4885 /* BlobResourceHandle.cpp */,
 				2EB4BCD1121F03E300EC4885 /* BlobResourceHandle.h */,
 				2EDEF1F2121B0EFC00726DB2 /* BlobStorageData.h */,
-				514C76580CE923A1007EF3CD /* Credential.cpp */,
 				E13F01EA1270E10D00DFBA71 /* CookieStorage.h */,
+				514C76580CE923A1007EF3CD /* Credential.cpp */,
 				514C76590CE923A1007EF3CD /* Credential.h */,
 				51A052321058774F00CC9E95 /* CredentialStorage.cpp */,
 				51A052311058774F00CC9E95 /* CredentialStorage.h */,
@@ -14519,9 +14532,9 @@
 				93309DC6099E64910056E581 /* SplitTextNodeContainingElementCommand.cpp */,
 				93309DC7099E64910056E581 /* SplitTextNodeContainingElementCommand.h */,
 				93309DC8099E64910056E581 /* TextAffinity.h */,
-				93309DC9099E64910056E581 /* TextGranularity.h */,
 				A7DBF8DB1276919C006B6008 /* TextCheckingHelper.cpp */,
 				A7DBF8DC1276919C006B6008 /* TextCheckingHelper.h */,
+				93309DC9099E64910056E581 /* TextGranularity.h */,
 				93309DCC099E64910056E581 /* TextIterator.cpp */,
 				93309DCD099E64910056E581 /* TextIterator.h */,
 				93309DCA099E64910056E581 /* TypingCommand.cpp */,
@@ -14597,6 +14610,8 @@
 				F55B3D7C1251F12D003EF269 /* ButtonInputType.h */,
 				F55B3D7D1251F12D003EF269 /* CheckboxInputType.cpp */,
 				F55B3D7E1251F12D003EF269 /* CheckboxInputType.h */,
+				4ACBC0BC12713CBD0094F9B2 /* ClassList.cpp */,
+				4ACBC0BD12713CBD0094F9B2 /* ClassList.h */,
 				93C441ED0F813A1A00C1A634 /* CollectionCache.cpp */,
 				93C441EE0F813A1A00C1A634 /* CollectionCache.h */,
 				93C441FF0F813AE100C1A634 /* CollectionType.h */,
@@ -14622,6 +14637,9 @@
 				2ED609BA1145B07100C8684E /* DOMFormData.cpp */,
 				2ED609BB1145B07100C8684E /* DOMFormData.h */,
 				2E0888C3114883A900AF4265 /* DOMFormData.idl */,
+				4ACBC0C012713CCA0094F9B2 /* DOMSettableTokenList.cpp */,
+				4ACBC0C112713CCA0094F9B2 /* DOMSettableTokenList.h */,
+				4ACBC0C212713CCA0094F9B2 /* DOMSettableTokenList.idl */,
 				76FC2B0812370DA0006A991A /* DOMTokenList.cpp */,
 				76FC2B0912370DA0006A991A /* DOMTokenList.h */,
 				76FC2B0A12370DA0006A991A /* DOMTokenList.idl */,
@@ -15173,6 +15191,8 @@
 				BC77D1680FF19F550070887B /* JSDataGridColumnList.h */,
 				2E0888D21148848A00AF4265 /* JSDOMFormData.cpp */,
 				2E0888D31148848A00AF4265 /* JSDOMFormData.h */,
+				4ACBC0C812713D0A0094F9B2 /* JSDOMSettableTokenList.cpp */,
+				4ACBC0C912713D0A0094F9B2 /* JSDOMSettableTokenList.h */,
 				7694563A1214D97C0007CBAE /* JSDOMTokenList.cpp */,
 				7694563B1214D97C0007CBAE /* JSDOMTokenList.h */,
 				49EECEF4105070C400099FAB /* JSFloat32Array.cpp */,
@@ -18486,6 +18506,7 @@
 				A81872200977D3C0005826D9 /* ChildNodeList.h in Headers */,
 				14D823520AF92A790004F057 /* Chrome.h in Headers */,
 				14D824080AF93AEB0004F057 /* ChromeClient.h in Headers */,
+				4ACBC0BF12713CBD0094F9B2 /* ClassList.h in Headers */,
 				BC904B770D10998F00680D32 /* ClassNodeList.h in Headers */,
 				BCC0657E0F3CE1B700CD2D87 /* ClientRect.h in Headers */,
 				BCC065810F3CE1B700CD2D87 /* ClientRectList.h in Headers */,
@@ -18624,6 +18645,9 @@
 				93309DE1099E64920056E581 /* DeleteSelectionCommand.h in Headers */,
 				93F1998208245E59001E9ABC /* DeprecatedPtrList.h in Headers */,
 				93F1996D08245E59001E9ABC /* DeprecatedPtrListImpl.h in Headers */,
+				081CDFB8126ECFDB00D215CA /* DeprecatedSVGAnimatedProperty.h in Headers */,
+				081CDFB9126ECFDB00D215CA /* DeprecatedSVGAnimatedPropertyTraits.h in Headers */,
+				081CDFBA126ECFDB00D215CA /* DeprecatedSVGAnimatedTemplate.h in Headers */,
 				31FB1A57120A5D0600DC02A0 /* DeviceMotionClient.h in Headers */,
 				31FB1A59120A5D0600DC02A0 /* DeviceMotionController.h in Headers */,
 				31FB1A5B120A5D0600DC02A0 /* DeviceMotionData.h in Headers */,
@@ -18913,6 +18937,7 @@
 				855D358A0AD707310019AAC7 /* DOMRGBColor.h in Headers */,
 				BCD0FC4F0DBD720B00B2F630 /* DOMRGBColorInternal.h in Headers */,
 				BC5A86850C33676000EEA649 /* DOMSelection.h in Headers */,
+				4ACBC0C412713CCA0094F9B2 /* DOMSettableTokenList.h in Headers */,
 				C544274B11A57E7A0063A749 /* DOMStringList.h in Headers */,
 				BC64640A11D7F304006455B0 /* DOMStringMap.h in Headers */,
 				0FF5025B102BA9010066F39A /* DOMStyleMedia.h in Headers */,
@@ -19477,6 +19502,7 @@
 				2EDF369F122C94C8002F7D4E /* FileException.h in Headers */,
 				F55B3DBE1251F12D003EF269 /* FileInputType.h in Headers */,
 				976D6C86122B8A3D001FD1F7 /* FileList.h in Headers */,
+				4689F1AF1267BAE100E8D380 /* FileMetadata.h in Headers */,
 				976D6C89122B8A3D001FD1F7 /* FileReader.h in Headers */,
 				2EDF369D122C94B4002F7D4E /* FileReaderSync.h in Headers */,
 				2EF1BFEB121C9F4200C27627 /* FileStream.h in Headers */,
@@ -19511,6 +19537,7 @@
 				B2C3DA680D006CD600EF6F26 /* FontFallbackList.h in Headers */,
 				B2C3DA6A0D006CD600EF6F26 /* FontFamily.h in Headers */,
 				A80E6CF30A1989CA007FB8C5 /* FontFamilyValue.h in Headers */,
+				F7A034C4126BF6BE007DC19E /* FontOrientation.h in Headers */,
 				B5320D6B122A24E9002D1440 /* FontPlatformData.h in Headers */,
 				37ACCE420DA2980F0089E602 /* FontRenderingMode.h in Headers */,
 				B2C3DA6B0D006CD600EF6F26 /* FontSelector.h in Headers */,
@@ -19721,6 +19748,7 @@
 				49E911C50EF86D47009D0CAF /* IdentityTransformOperation.h in Headers */,
 				C0C054CD1118C8E400CE2636 /* IDLParser.pm in Headers */,
 				C0C054CE1118C8E400CE2636 /* IDLStructure.pm in Headers */,
+				8AB4BC77126FDB7100DEB727 /* IgnoreDestructiveWriteCountIncrementer.h in Headers */,
 				B27535700B053814002CE64F /* Image.h in Headers */,
 				B2A10B920B3818BD00099AA4 /* ImageBuffer.h in Headers */,
 				BCA979171215D055005C485C /* ImageBufferData.h in Headers */,
@@ -19766,6 +19794,7 @@
 				9F0D6B2F121BFEBA006C0288 /* InspectorProfilerAgent.h in Headers */,
 				41F062010F5F0B6600A07EAC /* InspectorResource.h in Headers */,
 				82AB1776125C826700C5069D /* InspectorResourceAgent.h in Headers */,
+				4FA3B90B125CD12200300BAD /* InspectorState.h in Headers */,
 				7AB0B1C11211A62200A76940 /* InspectorStorageAgent.h in Headers */,
 				82AB1774125C826700C5069D /* InspectorStyleSheet.h in Headers */,
 				754133A8102E00E800075D00 /* InspectorTimelineAgent.h in Headers */,
@@ -19871,6 +19900,7 @@
 				A9D247FF0D757E6900FDF959 /* JSDOMPlugin.h in Headers */,
 				A9D248010D757E6900FDF959 /* JSDOMPluginArray.h in Headers */,
 				BC5A86B60C3367E800EEA649 /* JSDOMSelection.h in Headers */,
+				4ACBC0CB12713D0A0094F9B2 /* JSDOMSettableTokenList.h in Headers */,
 				C5137CF311A58378004ADB99 /* JSDOMStringList.h in Headers */,
 				BC64649811D82349006455B0 /* JSDOMStringMap.h in Headers */,
 				7694563D1214D97C0007CBAE /* JSDOMTokenList.h in Headers */,
@@ -20292,6 +20322,7 @@
 				1A8F6BC60DB55CDC001DB794 /* ManifestParser.h in Headers */,
 				A8C4A84C09D5649D0003AC8D /* MappedAttributeEntry.h in Headers */,
 				93309DF8099E64920056E581 /* markup.h in Headers */,
+				9728C3141268E4390041E89B /* MarkupAccumulator.h in Headers */,
 				FABE72F51059C1EB00D999DD /* MathMLElement.h in Headers */,
 				FABE72F71059C1EB00D999DD /* MathMLInlineContainerElement.h in Headers */,
 				FABE72F91059C1EB00D999DD /* MathMLMathElement.h in Headers */,
@@ -20757,8 +20788,18 @@
 				65653F2E0D9727D200CA9723 /* SVGAltGlyphElement.h in Headers */,
 				B22279770D00BF220071B782 /* SVGAngle.h in Headers */,
 				B222797A0D00BF220071B782 /* SVGAnimateColorElement.h in Headers */,
+				087B84961272CEC800A14417 /* SVGAnimatedAngle.h in Headers */,
+				089021A9126EF5DE0092D5EA /* SVGAnimatedLength.h in Headers */,
+				089021AD126EF5E90092D5EA /* SVGAnimatedLengthList.h in Headers */,
+				088A0E04126EF1DB00978F7A /* SVGAnimatedListPropertyTearOff.h in Headers */,
 				B22279850D00BF220071B782 /* SVGAnimatedPathData.h in Headers */,
 				B22279880D00BF220071B782 /* SVGAnimatedPoints.h in Headers */,
+				088A0E05126EF1DB00978F7A /* SVGAnimatedProperty.h in Headers */,
+				088A0E06126EF1DB00978F7A /* SVGAnimatedPropertyDescription.h in Headers */,
+				088A0E07126EF1DB00978F7A /* SVGAnimatedPropertyMacros.h in Headers */,
+				081CDFBF126ECFE800D215CA /* SVGAnimatedPropertySynchronizer.h in Headers */,
+				088A0E08126EF1DB00978F7A /* SVGAnimatedPropertyTearOff.h in Headers */,
+				08C859C01274575400A5728D /* SVGAnimatedRect.h in Headers */,
 				B22279900D00BF220071B782 /* SVGAnimateElement.h in Headers */,
 				B22279930D00BF220071B782 /* SVGAnimateMotionElement.h in Headers */,
 				B22279950D00BF220071B782 /* SVGAnimateTransformElement.h in Headers */,
@@ -20836,6 +20877,7 @@
 				B2227A390D00BF220071B782 /* SVGLinearGradientElement.h in Headers */,
 				B2227A3C0D00BF220071B782 /* SVGLineElement.h in Headers */,
 				B2227A3E0D00BF220071B782 /* SVGList.h in Headers */,
+				088A0E09126EF1DB00978F7A /* SVGListPropertyTearOff.h in Headers */,
 				B2227A3F0D00BF220071B782 /* SVGListTraits.h in Headers */,
 				B2227A410D00BF220071B782 /* SVGLocatable.h in Headers */,
 				08385FF610F0186000BFE07B /* SVGMarkerData.h in Headers */,
@@ -20881,6 +20923,9 @@
 				B2227A910D00BF220071B782 /* SVGPolygonElement.h in Headers */,
 				B2227A940D00BF220071B782 /* SVGPolylineElement.h in Headers */,
 				B2227A970D00BF220071B782 /* SVGPreserveAspectRatio.h in Headers */,
+				088A0E0A126EF1DB00978F7A /* SVGProperty.h in Headers */,
+				088A0E0B126EF1DB00978F7A /* SVGPropertyTearOff.h in Headers */,
+				088A0E0C126EF1DB00978F7A /* SVGPropertyTraits.h in Headers */,
 				B2227A9A0D00BF220071B782 /* SVGRadialGradientElement.h in Headers */,
 				B2227A9E0D00BF220071B782 /* SVGRectElement.h in Headers */,
 				B2227AA00D00BF220071B782 /* SVGRenderingIntent.h in Headers */,
@@ -21168,29 +21213,6 @@
 				93F199ED08245E59001E9ABC /* XSLTProcessor.h in Headers */,
 				E1BE512E0CF6C512002EA959 /* XSLTUnicodeSort.h in Headers */,
 				97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */,
-				4689F1AF1267BAE100E8D380 /* FileMetadata.h in Headers */,
-				4FA3B90B125CD12200300BAD /* InspectorState.h in Headers */,
-				9728C3141268E4390041E89B /* MarkupAccumulator.h in Headers */,
-				F7A034C4126BF6BE007DC19E /* FontOrientation.h in Headers */,
-				081CDFB8126ECFDB00D215CA /* DeprecatedSVGAnimatedProperty.h in Headers */,
-				081CDFB9126ECFDB00D215CA /* DeprecatedSVGAnimatedPropertyTraits.h in Headers */,
-				081CDFBA126ECFDB00D215CA /* DeprecatedSVGAnimatedTemplate.h in Headers */,
-				081CDFBF126ECFE800D215CA /* SVGAnimatedPropertySynchronizer.h in Headers */,
-				088A0E04126EF1DB00978F7A /* SVGAnimatedListPropertyTearOff.h in Headers */,
-				088A0E05126EF1DB00978F7A /* SVGAnimatedProperty.h in Headers */,
-				088A0E06126EF1DB00978F7A /* SVGAnimatedPropertyDescription.h in Headers */,
-				088A0E07126EF1DB00978F7A /* SVGAnimatedPropertyMacros.h in Headers */,
-				088A0E08126EF1DB00978F7A /* SVGAnimatedPropertyTearOff.h in Headers */,
-				088A0E09126EF1DB00978F7A /* SVGListPropertyTearOff.h in Headers */,
-				088A0E0A126EF1DB00978F7A /* SVGProperty.h in Headers */,
-				088A0E0B126EF1DB00978F7A /* SVGPropertyTearOff.h in Headers */,
-				088A0E0C126EF1DB00978F7A /* SVGPropertyTraits.h in Headers */,
-				089021A9126EF5DE0092D5EA /* SVGAnimatedLength.h in Headers */,
-				089021AD126EF5E90092D5EA /* SVGAnimatedLengthList.h in Headers */,
-				8AB4BC77126FDB7100DEB727 /* IgnoreDestructiveWriteCountIncrementer.h in Headers */,
-				087B84961272CEC800A14417 /* SVGAnimatedAngle.h in Headers */,
-				08C859C01274575400A5728D /* SVGAnimatedRect.h in Headers */,
-				758978ED127090D60076D5A9 /* SpeechInputResult.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -21282,6 +21304,7 @@
 				46F9D5DD0B0D60170028EE36 /* aliasCursor.png in Resources */,
 				46D4F2490AF97E810035385A /* cellCursor.png in Resources */,
 				46D4F24A0AF97E810035385A /* contextMenuCursor.png in Resources */,
+				E13F01EB1270E10D00DFBA71 /* CookieStorage.h in Resources */,
 				4614A1FE0B23A8D600446E1C /* copyCursor.png in Resources */,
 				464EA2730B8A350B00A8E6E3 /* crossHairCursor.png in Resources */,
 				1C14E76C0AD8C81C00B6158B /* deleteButton.tiff in Resources */,
@@ -21313,7 +21336,6 @@
 				85136CA80AED665900F90A3D /* westResizeCursor.png in Resources */,
 				1AB1AE7A0C051FDE00139F4F /* zoomInCursor.png in Resources */,
 				1AB1AE7B0C051FDE00139F4F /* zoomOutCursor.png in Resources */,
-				E13F01EB1270E10D00DFBA71 /* CookieStorage.h in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -21607,6 +21629,7 @@
 				A81872250977D3C0005826D9 /* ChildNodeList.cpp in Sources */,
 				14D8238B0AF92DF60004F057 /* Chrome.cpp in Sources */,
 				ABAF22080C03B1C700B0BCF0 /* ChromeMac.mm in Sources */,
+				4ACBC0BE12713CBD0094F9B2 /* ClassList.cpp in Sources */,
 				BC904B760D10998F00680D32 /* ClassNodeList.cpp in Sources */,
 				BCC0657D0F3CE1B700CD2D87 /* ClientRect.cpp in Sources */,
 				BCC065800F3CE1B700CD2D87 /* ClientRectList.cpp in Sources */,
@@ -21637,6 +21660,7 @@
 				06027CB30B1CC03D00884B2D /* ContextMenuItemMac.mm in Sources */,
 				93B6A0EA0B0BCA8400F5027A /* ContextMenuMac.mm in Sources */,
 				9352087709BD453400F2038D /* CookieJar.mm in Sources */,
+				E13F01F11270E19000DFBA71 /* CookieStorageMac.mm in Sources */,
 				BC5EB9500E82056B00B25965 /* CounterDirectives.cpp in Sources */,
 				9392F1500AD1862300691BD4 /* CounterNode.cpp in Sources */,
 				D0B0556909C6700100307E43 /* CreateLinkCommand.cpp in Sources */,
@@ -21880,6 +21904,7 @@
 				858C38A80AA8F20400B187A4 /* DOMRect.mm in Sources */,
 				BCAEFCAE1016CE4A0040D34E /* DOMRGBColor.mm in Sources */,
 				BC5A86840C33676000EEA649 /* DOMSelection.cpp in Sources */,
+				4ACBC0C312713CCA0094F9B2 /* DOMSettableTokenList.cpp in Sources */,
 				C55610F111A704EB00B82D27 /* DOMStringList.cpp in Sources */,
 				BC64640911D7F304006455B0 /* DOMStringMap.cpp in Sources */,
 				0FF5025C102BA9010066F39A /* DOMStyleMedia.mm in Sources */,
@@ -22344,6 +22369,7 @@
 				B885E8D411E06DD2009FFBF4 /* InspectorApplicationCacheAgent.cpp in Sources */,
 				7A74ECBA101839A600BF939E /* InspectorBackend.cpp in Sources */,
 				4F707A9911EF679400ACDA69 /* InspectorBackendDispatcher.cpp in Sources */,
+				7A1F2B52126C61B20006A7E6 /* InspectorClient.cpp in Sources */,
 				1C81B95B0E97330800266E07 /* InspectorController.cpp in Sources */,
 				82AB1743124B99EC00C5069D /* InspectorCSSAgent.cpp in Sources */,
 				82B6589A1189E47600E052A1 /* InspectorCSSStore.cpp in Sources */,
@@ -22358,6 +22384,7 @@
 				9F0D6B2E121BFEBA006C0288 /* InspectorProfilerAgent.cpp in Sources */,
 				41F062020F5F0B6600A07EAC /* InspectorResource.cpp in Sources */,
 				82AB1775125C826700C5069D /* InspectorResourceAgent.cpp in Sources */,
+				4FA3B90A125CD12200300BAD /* InspectorState.cpp in Sources */,
 				7AB0B1C01211A62200A76940 /* InspectorStorageAgent.cpp in Sources */,
 				82AB1773125C826700C5069D /* InspectorStyleSheet.cpp in Sources */,
 				754133AA102E00F400075D00 /* InspectorTimelineAgent.cpp in Sources */,
@@ -22488,6 +22515,7 @@
 				A9C6E64C0D7465E7006442E9 /* JSDOMPluginArrayCustom.cpp in Sources */,
 				A9C6E64D0D7465E7006442E9 /* JSDOMPluginCustom.cpp in Sources */,
 				BC5A86B50C3367E800EEA649 /* JSDOMSelection.cpp in Sources */,
+				4ACBC0CA12713D0A0094F9B2 /* JSDOMSettableTokenList.cpp in Sources */,
 				C5137CF211A58378004ADB99 /* JSDOMStringList.cpp in Sources */,
 				BC64649711D82349006455B0 /* JSDOMStringMap.cpp in Sources */,
 				BC64649C11D8238C006455B0 /* JSDOMStringMapCustom.cpp in Sources */,
@@ -22951,6 +22979,7 @@
 				1A98956B0AA78F80005EF5EF /* KURLCFNet.cpp in Sources */,
 				6593923A09AE435C002C531F /* KURLMac.mm in Sources */,
 				A456FA2611AD4A830020B420 /* LabelsNodeList.cpp in Sources */,
+				E18772F1126E2629003DD586 /* Language.cpp in Sources */,
 				9352084509BD43B900F2038D /* Language.mm in Sources */,
 				2D9066060BE141D400956998 /* LayoutState.cpp in Sources */,
 				512DD8F40D91E6AF000F89EE /* LegacyWebArchive.cpp in Sources */,
@@ -22975,6 +23004,7 @@
 				93E227E10AF589AD00D48324 /* MainResourceLoader.cpp in Sources */,
 				1A8F6BC50DB55CDC001DB794 /* ManifestParser.cpp in Sources */,
 				93309DF7099E64920056E581 /* markup.cpp in Sources */,
+				9728C3131268E4390041E89B /* MarkupAccumulator.cpp in Sources */,
 				FABE72F41059C1EB00D999DD /* MathMLElement.cpp in Sources */,
 				FABE72FD1059C21100D999DD /* MathMLElementFactory.cpp in Sources */,
 				FABE72F61059C1EB00D999DD /* MathMLInlineContainerElement.cpp in Sources */,
@@ -23310,6 +23340,7 @@
 				626CDE0E1140424C001E5A68 /* SpatialNavigation.cpp in Sources */,
 				7578F90B11DDF26900D933C5 /* SpeechInput.cpp in Sources */,
 				7535BC9412020CFF0037EC45 /* SpeechInputClientMock.cpp in Sources */,
+				758978EC127090D60076D5A9 /* SpeechInputResult.cpp in Sources */,
 				93309E11099E64920056E581 /* SplitElementCommand.cpp in Sources */,
 				93309E13099E64920056E581 /* SplitTextNodeCommand.cpp in Sources */,
 				93309E15099E64920056E581 /* SplitTextNodeContainingElementCommand.cpp in Sources */,
@@ -23742,12 +23773,6 @@
 				93F19B0508245E59001E9ABC /* XSLTProcessorLibxslt.cpp in Sources */,
 				E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */,
 				97DD4D860FDF4D6E00ECF9A4 /* XSSAuditor.cpp in Sources */,
-				4FA3B90A125CD12200300BAD /* InspectorState.cpp in Sources */,
-				9728C3131268E4390041E89B /* MarkupAccumulator.cpp in Sources */,
-				E18772F1126E2629003DD586 /* Language.cpp in Sources */,
-				7A1F2B52126C61B20006A7E6 /* InspectorClient.cpp in Sources */,
-				E13F01F11270E19000DFBA71 /* CookieStorageMac.mm in Sources */,
-				758978EC127090D60076D5A9 /* SpeechInputResult.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/WebCore/bindings/gobject/GNUmakefile.am b/WebCore/bindings/gobject/GNUmakefile.am
index d808e18..338d7f9 100644
--- a/WebCore/bindings/gobject/GNUmakefile.am
+++ b/WebCore/bindings/gobject/GNUmakefile.am
@@ -49,6 +49,8 @@ webkitgtk_gdom_built_sources += \
 	DerivedSources/webkit/WebKitDOMDOMStringListPrivate.h \
 	DerivedSources/webkit/WebKitDOMDOMStringMap.cpp \
 	DerivedSources/webkit/WebKitDOMDOMStringMapPrivate.h \
+	DerivedSources/webkit/WebKitDOMDOMSettableTokenList.cpp \
+	DerivedSources/webkit/WebKitDOMDOMSettableTokenListPrivate.h \
 	DerivedSources/webkit/WebKitDOMDOMTokenList.cpp \
 	DerivedSources/webkit/WebKitDOMDOMTokenListPrivate.h \
 	DerivedSources/webkit/WebKitDOMDOMWindow.cpp \
@@ -263,6 +265,7 @@ webkitgtk_built_h_api += \
 	DerivedSources/webkit/WebKitDOMDocumentFragment.h \
 	DerivedSources/webkit/WebKitDOMDocumentType.h \
 	DerivedSources/webkit/WebKitDOMDOMImplementation.h \
+	DerivedSources/webkit/WebKitDOMDOMSettableTokenList.h \
 	DerivedSources/webkit/WebKitDOMDOMStringList.h \
 	DerivedSources/webkit/WebKitDOMDOMStringMap.h \
 	DerivedSources/webkit/WebKitDOMDOMTokenList.h \
diff --git a/WebCore/bindings/scripts/CodeGeneratorJS.pm b/WebCore/bindings/scripts/CodeGeneratorJS.pm
index 719449a..3ec61a4 100644
--- a/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -231,7 +231,7 @@ sub IndexGetterReturnsStrings
 {
     my $type = shift;
 
-    return 1 if $type eq "CSSStyleDeclaration" or $type eq "MediaList" or $type eq "CSSVariablesDeclaration" or $type eq "DOMStringList" or $type eq "DOMTokenList";
+    return 1 if $type eq "CSSStyleDeclaration" or $type eq "MediaList" or $type eq "CSSVariablesDeclaration" or $type eq "DOMStringList" or $type eq "DOMTokenList" or $type eq "DOMSettableTokenList";
     return 0;
 }
 
diff --git a/WebCore/bindings/v8/custom/V8DOMSettableTokenListCustom.cpp b/WebCore/bindings/v8/custom/V8DOMSettableTokenListCustom.cpp
new file mode 100644
index 0000000..4eeb1e0
--- /dev/null
+++ b/WebCore/bindings/v8/custom/V8DOMSettableTokenListCustom.cpp
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "V8DOMSettableTokenList.h"
+
+#include "DOMSettableTokenList.h"
+
+#include "V8Binding.h"
+#include "V8Proxy.h"
+
+namespace WebCore {
+
+v8::Handle<v8::Value> V8DOMSettableTokenList::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
+{
+    // FIXME: Implement this function.
+    return v8String("");
+}
+
+} // namespace WebCore
diff --git a/WebCore/dom/Element.cpp b/WebCore/dom/Element.cpp
index 4c352c0..4138a16 100644
--- a/WebCore/dom/Element.cpp
+++ b/WebCore/dom/Element.cpp
@@ -31,6 +31,7 @@
 #include "CSSParser.h"
 #include "CSSSelectorList.h"
 #include "CSSStyleSelector.h"
+#include "ClassList.h"
 #include "ClientRect.h"
 #include "ClientRectList.h"
 #include "DOMTokenList.h"
@@ -1615,7 +1616,7 @@ DOMTokenList* Element::classList()
 {
     ElementRareData* data = ensureRareData();
     if (!data->m_classList)
-        data->m_classList = DOMTokenList::create(this);
+        data->m_classList = ClassList::create(this);
     return data->m_classList.get();
 }
 
diff --git a/WebCore/dom/ElementRareData.h b/WebCore/dom/ElementRareData.h
index f1e6334..06bfe0c 100644
--- a/WebCore/dom/ElementRareData.h
+++ b/WebCore/dom/ElementRareData.h
@@ -22,7 +22,7 @@
 #ifndef ElementRareData_h
 #define ElementRareData_h
 
-#include "DOMTokenList.h"
+#include "ClassList.h"
 #include "DatasetDOMStringMap.h"
 #include "Element.h"
 #include "NodeRareData.h"
@@ -43,7 +43,7 @@ public:
     RefPtr<RenderStyle> m_computedStyle;
 
     OwnPtr<DatasetDOMStringMap> m_datasetDOMStringMap;
-    OwnPtr<DOMTokenList> m_classList;
+    OwnPtr<ClassList> m_classList;
 };
 
 inline IntSize defaultMinimumSizeForResizing()
diff --git a/WebCore/dom/SpaceSplitString.cpp b/WebCore/dom/SpaceSplitString.cpp
index 8a2710c..4bd5b1b 100644
--- a/WebCore/dom/SpaceSplitString.cpp
+++ b/WebCore/dom/SpaceSplitString.cpp
@@ -23,6 +23,7 @@
 
 #include "HTMLParserIdioms.h"
 #include <wtf/ASCIICType.h>
+#include <wtf/text/StringBuilder.h>
 
 using namespace WTF;
 
@@ -90,4 +91,37 @@ bool SpaceSplitStringData::containsAll(SpaceSplitStringData& other)
     return true;
 }
 
+void SpaceSplitStringData::add(const AtomicString& string)
+{
+    if (contains(string))
+        return;
+
+    m_vector.append(string);
+}
+
+void SpaceSplitStringData::remove(const AtomicString& string)
+{
+    ensureVector();
+
+    size_t position = 0;
+    while (position < m_vector.size()) {
+        if (m_vector[position] == string)
+            m_vector.remove(position);
+        else
+            ++position;
+    }
+}
+
+void SpaceSplitString::add(const AtomicString& string)
+{
+    if (m_data)
+        m_data->add(string);
+}
+
+void SpaceSplitString::remove(const AtomicString& string)
+{
+    if (m_data)
+        m_data->remove(string);
+}
+
 } // namespace WebCore
diff --git a/WebCore/dom/SpaceSplitString.h b/WebCore/dom/SpaceSplitString.h
index 09ca8d9..826e6bd 100644
--- a/WebCore/dom/SpaceSplitString.h
+++ b/WebCore/dom/SpaceSplitString.h
@@ -48,6 +48,9 @@ namespace WebCore {
 
         bool containsAll(SpaceSplitStringData&);
 
+        void add(const AtomicString&);
+        void remove(const AtomicString&);
+
         size_t size() { ensureVector(); return m_vector.size(); }
         const AtomicString& operator[](size_t i) { ensureVector(); ASSERT(i < size()); return m_vector[i]; }
 
@@ -72,6 +75,8 @@ namespace WebCore {
 
         bool contains(const AtomicString& string) const { return m_data && m_data->contains(string); }
         bool containsAll(const SpaceSplitString& names) const { return !names.m_data || (m_data && m_data->containsAll(*names.m_data)); }
+        void add(const AtomicString&);
+        void remove(const AtomicString&);
 
         size_t size() const { return m_data ? m_data->size() : 0; }
         bool isNull() const { return !m_data; }
diff --git a/WebCore/dom/StyledElement.cpp b/WebCore/dom/StyledElement.cpp
index 12744cb..7384c0b 100644
--- a/WebCore/dom/StyledElement.cpp
+++ b/WebCore/dom/StyledElement.cpp
@@ -25,6 +25,7 @@
 #include "StyledElement.h"
 
 #include "Attribute.h"
+#include "ClassList.h"
 #include "CSSStyleSelector.h"
 #include "CSSStyleSheet.h"
 #include "CSSValueKeywords.h"
@@ -222,7 +223,7 @@ void StyledElement::classAttributeChanged(const AtomicString& newClassString)
     if (hasClass) {
         attributes()->setClass(newClassString);
         if (DOMTokenList* classList = optionalClassList())
-            classList->reset(newClassString);
+            static_cast<ClassList*>(classList)->reset(newClassString);
     } else if (attributeMap())
         attributeMap()->clearClass();
     setNeedsStyleRecalc();
diff --git a/WebCore/dom/StyledElement.h b/WebCore/dom/StyledElement.h
index 4b62388..8040dbf 100644
--- a/WebCore/dom/StyledElement.h
+++ b/WebCore/dom/StyledElement.h
@@ -32,7 +32,6 @@
 namespace WebCore {
 
 class Attribute;
-class ClassList;
 class CSSMappedAttributeDeclaration;
 
 class StyledElement : public Element {
diff --git a/WebCore/html/ClassList.cpp b/WebCore/html/ClassList.cpp
new file mode 100644
index 0000000..578601b
--- /dev/null
+++ b/WebCore/html/ClassList.cpp
@@ -0,0 +1,146 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "ClassList.h"
+
+#include "Element.h"
+#include "HTMLNames.h"
+#include "HTMLParserIdioms.h"
+#include "SpaceSplitString.h"
+#include <wtf/text/StringBuilder.h>
+
+namespace WebCore {
+
+using namespace HTMLNames;
+
+ClassList::ClassList(Element* element)
+    : m_element(element)
+{
+    if (m_element->document()->inQuirksMode())
+        m_classNamesForQuirksMode.set(m_element->fastGetAttribute(classAttr), false);
+}
+
+void ClassList::ref()
+{
+    m_element->ref();
+}
+
+void ClassList::deref()
+{
+    m_element->deref();
+}
+
+unsigned ClassList::length() const
+{
+    return m_element->hasClass() ? classNames().size() : 0;
+}
+
+const AtomicString ClassList::item(unsigned index) const
+{
+    if (index >= length())
+        return AtomicString();
+    return classNames()[index];
+}
+
+bool ClassList::contains(const AtomicString& token, ExceptionCode& ec) const
+{
+    if (!validateToken(token, ec))
+        return false;
+    return containsInternal(token);
+}
+
+bool ClassList::containsInternal(const AtomicString& token) const
+{
+    return m_element->hasClass() && classNames().contains(token);
+}
+
+void ClassList::add(const AtomicString& token, ExceptionCode& ec)
+{
+    if (!validateToken(token, ec))
+        return;
+    addInternal(token);
+}
+
+void ClassList::addInternal(const AtomicString& token)
+{
+    const AtomicString& oldClassName(m_element->fastGetAttribute(classAttr));
+    if (oldClassName.isEmpty())
+        m_element->setAttribute(classAttr, token);
+    else if (!containsInternal(token)) {
+        const AtomicString& newClassName(addToken(oldClassName, token));
+        m_element->setAttribute(classAttr, newClassName);
+    }
+}
+
+void ClassList::remove(const AtomicString& token, ExceptionCode& ec)
+{
+    if (!validateToken(token, ec))
+        return;
+    removeInternal(token);
+}
+
+void ClassList::removeInternal(const AtomicString& token)
+{
+    // Check using contains first since it uses AtomicString comparisons instead
+    // of character by character testing.
+    if (!containsInternal(token))
+        return;
+    const AtomicString& newClassName(removeToken(m_element->fastGetAttribute(classAttr), token));
+    m_element->setAttribute(classAttr, newClassName);
+}
+
+bool ClassList::toggle(const AtomicString& token, ExceptionCode& ec)
+{
+    if (!validateToken(token, ec))
+        return false;
+
+    if (containsInternal(token)) {
+        removeInternal(token);
+        return false;
+    }
+    addInternal(token);
+    return true;
+}
+
+String ClassList::toString() const
+{
+    return m_element->fastGetAttribute(classAttr);
+}
+
+void ClassList::reset(const String& newClassName)
+{
+    if (!m_classNamesForQuirksMode.isNull())
+        m_classNamesForQuirksMode.set(newClassName, false);
+}
+
+const SpaceSplitString& ClassList::classNames() const
+{
+    ASSERT(m_element->hasClass());
+    if (!m_classNamesForQuirksMode.isNull())
+        return m_classNamesForQuirksMode;
+    return m_element->attributeMap()->classNames();
+}
+
+} // namespace WebCore
diff --git a/WebCore/html/ClassList.h b/WebCore/html/ClassList.h
new file mode 100644
index 0000000..93aea60
--- /dev/null
+++ b/WebCore/html/ClassList.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ClassList_h
+#define ClassList_h
+
+#include "DOMTokenList.h"
+#include "ExceptionCode.h"
+#include "SpaceSplitString.h"
+#include <wtf/PassOwnPtr.h>
+
+namespace WebCore {
+
+class Element;
+
+class ClassList : public DOMTokenList {
+public:
+    static PassOwnPtr<ClassList> create(Element* element)
+    {
+        return adoptPtr(new ClassList(element));
+    }
+
+    virtual void ref();
+    virtual void deref();
+
+    virtual unsigned length() const;
+    virtual const AtomicString item(unsigned index) const;
+    virtual bool contains(const AtomicString&, ExceptionCode&) const;
+    virtual void add(const AtomicString&, ExceptionCode&);
+    virtual void remove(const AtomicString&, ExceptionCode&);
+    virtual bool toggle(const AtomicString&, ExceptionCode&);
+    virtual String toString() const;
+
+    virtual Element* element() { return m_element; }
+
+    void reset(const String&);
+
+private:
+    ClassList(Element*);
+
+    void addInternal(const AtomicString&);
+    bool containsInternal(const AtomicString&) const;
+    void removeInternal(const AtomicString&);
+
+    const SpaceSplitString& classNames() const;
+
+    Element* m_element;
+    SpaceSplitString m_classNamesForQuirksMode;
+};
+
+} // namespace WebCore
+
+#endif // ClassList_h
diff --git a/WebCore/html/DOMSettableTokenList.cpp b/WebCore/html/DOMSettableTokenList.cpp
new file mode 100644
index 0000000..2636bd3
--- /dev/null
+++ b/WebCore/html/DOMSettableTokenList.cpp
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "DOMSettableTokenList.h"
+
+namespace WebCore {
+
+DOMSettableTokenList::DOMSettableTokenList()
+    : m_value()
+    , m_tokens()
+{
+}
+
+DOMSettableTokenList::~DOMSettableTokenList()
+{
+}
+
+const AtomicString DOMSettableTokenList::item(unsigned index) const
+{
+    if (index >= length())
+        return AtomicString("");
+    return m_tokens[index];
+}
+
+bool DOMSettableTokenList::contains(const AtomicString& token, ExceptionCode& ec) const
+{
+    if (!validateToken(token, ec))
+        return false;
+    return m_tokens.contains(token);
+}
+
+void DOMSettableTokenList::add(const AtomicString& token, ExceptionCode& ec)
+{
+    if (!validateToken(token, ec) || m_tokens.contains(token))
+        return;
+    addInternal(token);
+}
+
+void DOMSettableTokenList::addInternal(const AtomicString& token)
+{
+    m_value = addToken(m_value, token);
+    m_tokens.add(token);
+}
+
+void DOMSettableTokenList::remove(const AtomicString& token, ExceptionCode& ec)
+{
+    if (!validateToken(token, ec) || !m_tokens.contains(token))
+        return;
+    removeInternal(token);
+}
+
+void DOMSettableTokenList::removeInternal(const AtomicString& token)
+{
+    m_value = removeToken(m_value, token);
+    m_tokens.remove(token);
+}
+
+bool DOMSettableTokenList::toggle(const AtomicString& token, ExceptionCode& ec)
+{
+    if (!validateToken(token, ec))
+        return false;
+    if (m_tokens.contains(token)) {
+        removeInternal(token);
+        return false;
+    }
+    addInternal(token);
+    return true;
+}
+
+void DOMSettableTokenList::setValue(const String& value)
+{
+    m_value = value;
+    m_tokens.set(value, true);
+}
+
+} // namespace WebCore
diff --git a/WebCore/html/DOMSettableTokenList.h b/WebCore/html/DOMSettableTokenList.h
new file mode 100644
index 0000000..2b711b4
--- /dev/null
+++ b/WebCore/html/DOMSettableTokenList.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef DOMSettableTokenList_h
+#define DOMSettableTokenList_h
+
+#include "DOMTokenList.h"
+#include "ExceptionCode.h"
+#include "SpaceSplitString.h"
+#include <wtf/PassOwnPtr.h>
+#include <wtf/RefCounted.h>
+#include <wtf/text/AtomicString.h>
+
+namespace WebCore {
+
+class DOMSettableTokenList : public DOMTokenList, public RefCounted<DOMSettableTokenList> {
+public:
+    static PassRefPtr<DOMSettableTokenList> create()
+    {
+        return adoptRef(new DOMSettableTokenList());
+    }
+    virtual ~DOMSettableTokenList();
+
+    virtual void ref() { RefCounted<DOMSettableTokenList>::ref(); }
+    virtual void deref() { RefCounted<DOMSettableTokenList>::deref(); }
+
+    virtual unsigned length() const { return m_tokens.size(); }
+    virtual const AtomicString item(unsigned index) const;
+    virtual bool contains(const AtomicString&, ExceptionCode&) const;
+    virtual void add(const AtomicString&, ExceptionCode&);
+    virtual void remove(const AtomicString&, ExceptionCode&);
+    virtual bool toggle(const AtomicString&, ExceptionCode&);
+    virtual String toString() const { return value(); }
+
+    String value() const { return m_value; }
+    void setValue(const String&);
+
+private:
+    DOMSettableTokenList();
+
+    void removeInternal(const AtomicString&);
+    void addInternal(const AtomicString&);
+
+    String m_value;
+    SpaceSplitString m_tokens;
+};
+
+} // namespace WebCore
+
+#endif // DOMSettableTokenList_h
diff --git a/WebCore/html/DOMSettableTokenList.idl b/WebCore/html/DOMSettableTokenList.idl
new file mode 100644
index 0000000..6260623
--- /dev/null
+++ b/WebCore/html/DOMSettableTokenList.idl
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module core {
+
+    interface [
+        GenerateConstructor,
+        HasIndexGetter,
+        GenerateToJS
+    ] DOMSettableTokenList : DOMTokenList {
+        attribute DOMString value;
+    };
+
+}
diff --git a/WebCore/html/DOMTokenList.cpp b/WebCore/html/DOMTokenList.cpp
index aa0a74b..3c91f20 100644
--- a/WebCore/html/DOMTokenList.cpp
+++ b/WebCore/html/DOMTokenList.cpp
@@ -25,17 +25,12 @@
 #include "config.h"
 #include "DOMTokenList.h"
 
-#include "Element.h"
-#include "HTMLNames.h"
 #include "HTMLParserIdioms.h"
-#include "SpaceSplitString.h"
 #include <wtf/text/StringBuilder.h>
 
 namespace WebCore {
 
-using namespace HTMLNames;
-
-static bool validateToken(const AtomicString& token, ExceptionCode& ec)
+bool DOMTokenList::validateToken(const AtomicString& token, ExceptionCode& ec)
 {
     if (token.isEmpty()) {
         ec = SYNTAX_ERR;
@@ -53,86 +48,23 @@ static bool validateToken(const AtomicString& token, ExceptionCode& ec)
     return true;
 }
 
-DOMTokenList::DOMTokenList(Element* element)
-    : m_element(element)
-{
-    if (m_element->document()->inQuirksMode())
-        m_classNamesForQuirksMode.set(m_element->fastGetAttribute(classAttr), false);
-}
-
-void DOMTokenList::ref()
-{
-    m_element->ref();
-}
-
-void DOMTokenList::deref()
-{
-    m_element->deref();
-}
-
-unsigned DOMTokenList::length() const
-{
-    return m_element->hasClass() ? classNames().size() : 0;
-}
-
-const AtomicString DOMTokenList::item(unsigned index) const
-{
-    if (index >= length())
-        return AtomicString();
-    return classNames()[index];
-}
-
-bool DOMTokenList::contains(const AtomicString& token, ExceptionCode& ec) const
-{
-    if (!validateToken(token, ec))
-        return false;
-    return containsInternal(token);
-}
-
-bool DOMTokenList::containsInternal(const AtomicString& token) const
+String DOMTokenList::addToken(const AtomicString& input, const AtomicString& token)
 {
-    return m_element->hasClass() && classNames().contains(token);
-}
+    if (input.isEmpty())
+        return token;
 
-void DOMTokenList::add(const AtomicString& token, ExceptionCode& ec)
-{
-    if (!validateToken(token, ec))
-        return;
-    addInternal(token);
+    StringBuilder builder;
+    builder.append(input);
+    if (input[input.length()-1] != ' ')
+        builder.append(' ');
+    builder.append(token);
+    return builder.toString();
 }
 
-void DOMTokenList::addInternal(const AtomicString& token) const
+String DOMTokenList::removeToken(const AtomicString& input, const AtomicString& token)
 {
-    const AtomicString& oldClassName(m_element->fastGetAttribute(classAttr));
-    if (oldClassName.isEmpty())
-        m_element->setAttribute(classAttr, token);
-    else if (!containsInternal(token)) {
-        StringBuilder builder;
-        builder.append(oldClassName);
-        if (oldClassName[oldClassName.length() - 1] != ' ')
-            builder.append(' ');
-        builder.append(token);
-        m_element->setAttribute(classAttr, builder.toString());
-    }
-}
-
-void DOMTokenList::remove(const AtomicString& token, ExceptionCode& ec)
-{
-    if (!validateToken(token, ec))
-        return;
-    removeInternal(token);
-}
-
-void DOMTokenList::removeInternal(const AtomicString& token) const
-{
-    // Check using contains first since it uses AtomicString comparisons instead
-    // of character by character testing.
-    if (!containsInternal(token))
-        return;
-
     // Algorithm defined at http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#remove-a-token-from-a-string
 
-    const AtomicString& input = m_element->fastGetAttribute(classAttr);
     unsigned inputLength = input.length();
     Vector<UChar> output; // 3
     output.reserveCapacity(inputLength);
@@ -170,39 +102,7 @@ void DOMTokenList::removeInternal(const AtomicString& token) const
     }
 
     output.shrinkToFit();
-    m_element->setAttribute(classAttr, String::adopt(output));
-}
-
-bool DOMTokenList::toggle(const AtomicString& token, ExceptionCode& ec)
-{
-    if (!validateToken(token, ec))
-        return false;
-
-    if (containsInternal(token)) {
-        removeInternal(token);
-        return false;
-    }
-    addInternal(token);
-    return true;
-}
-
-String DOMTokenList::toString() const
-{
-    return m_element->fastGetAttribute(classAttr);
-}
-
-void DOMTokenList::reset(const String& newClassName)
-{
-    if (!m_classNamesForQuirksMode.isNull())
-        m_classNamesForQuirksMode.set(newClassName, false);
-}
-
-const SpaceSplitString& DOMTokenList::classNames() const
-{
-    ASSERT(m_element->hasClass());
-    if (!m_classNamesForQuirksMode.isNull())
-        return m_classNamesForQuirksMode;
-    return m_element->attributeMap()->classNames();
+    return String::adopt(output);
 }
 
 } // namespace WebCore
diff --git a/WebCore/html/DOMTokenList.h b/WebCore/html/DOMTokenList.h
index fad69ca..5df2ede 100644
--- a/WebCore/html/DOMTokenList.h
+++ b/WebCore/html/DOMTokenList.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010, Google Inc. All rights reserved.
+ * Copyright (C) 2010 Google Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -26,9 +26,9 @@
 #define DOMTokenList_h
 
 #include "ExceptionCode.h"
-#include "SpaceSplitString.h"
+#include <wtf/text/AtomicString.h>
 #include <wtf/Noncopyable.h>
-#include <wtf/PassOwnPtr.h>
+#include <wtf/Vector.h>
 
 namespace WebCore {
 
@@ -36,37 +36,25 @@ class Element;
 
 class DOMTokenList : public Noncopyable {
 public:
-    static PassOwnPtr<DOMTokenList> create(Element* element)
-    {
-        return adoptPtr(new DOMTokenList(element));
-    }
+    virtual ~DOMTokenList() {};
 
-    void ref();
-    void deref();
+    virtual void ref() = 0;
+    virtual void deref() = 0;
 
-    unsigned length() const;
-    const AtomicString item(unsigned index) const;
-    bool contains(const AtomicString&, ExceptionCode&) const;
-    void add(const AtomicString&, ExceptionCode&);
-    void remove(const AtomicString&, ExceptionCode&);
-    bool toggle(const AtomicString&, ExceptionCode&);
-    String toString() const;
+    virtual unsigned length() const = 0;
+    virtual const AtomicString item(unsigned index) const = 0;
+    virtual bool contains(const AtomicString&, ExceptionCode&) const = 0;
+    virtual void add(const AtomicString&, ExceptionCode&) = 0;
+    virtual void remove(const AtomicString&, ExceptionCode&) = 0;
+    virtual bool toggle(const AtomicString&, ExceptionCode&) = 0;
+    virtual String toString() const = 0;
 
-    void reset(const String&);
+    virtual Element* element() { return 0; }
 
-    Element* element() { return m_element; }
-
-private:
-    DOMTokenList(Element*);
-
-    void addInternal(const AtomicString&) const;
-    bool containsInternal(const AtomicString&) const;
-    void removeInternal(const AtomicString&) const;
-
-    const SpaceSplitString& classNames() const;
-
-    Element* m_element;
-    SpaceSplitString m_classNamesForQuirksMode;
+protected:
+    static bool validateToken(const AtomicString&, ExceptionCode&);
+    static String addToken(const AtomicString&, const AtomicString&);
+    static String removeToken(const AtomicString&, const AtomicString&);
 };
 
 } // namespace WebCore
diff --git a/WebCore/page/DOMWindow.cpp b/WebCore/page/DOMWindow.cpp
index 32fef62..60d9b53 100644
--- a/WebCore/page/DOMWindow.cpp
+++ b/WebCore/page/DOMWindow.cpp
@@ -38,6 +38,7 @@
 #include "DocumentLoader.h"
 #include "DOMApplicationCache.h"
 #include "DOMSelection.h"
+#include "DOMSettableTokenList.h"
 #include "DOMStringList.h"
 #include "DOMTimer.h"
 #include "DOMTokenList.h"
diff --git a/WebCore/page/DOMWindow.idl b/WebCore/page/DOMWindow.idl
index bf573a6..85bd70b 100644
--- a/WebCore/page/DOMWindow.idl
+++ b/WebCore/page/DOMWindow.idl
@@ -380,6 +380,7 @@ module window {
 //        attribute DOMImplementationListConstructor DOMImplementationList;
 //        attribute DOMImplementationSourceConstructor DOMImplementationSource;
         attribute DOMImplementationConstructor DOMImplementation;
+        attribute DOMSettableTokenListConstructor DOMSettableTokenList;
         attribute DOMTokenListConstructor DOMTokenList;
         attribute DocumentFragmentConstructor DocumentFragment;
         attribute DocumentConstructor Document;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list