[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

weinig at apple.com weinig at apple.com
Thu Oct 29 20:50:55 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit 54040b04a4081fc595719793bd3ab6ae2b81cd80
Author: weinig at apple.com <weinig at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 23 21:12:03 2009 +0000

    WebCore: Fix for https://bugs.webkit.org/show_bug.cgi?id=30695
    Drop .tags() support from HTMLCollection
    
    Reviewed by Anders Carlsson.
    
    - Make .tags() only work for HTMLAllCollections in JS. .tags() is still
      available for all HTMLCollection like objects in Objective-C since that
      is API.
    - Auto-generate HTMLAllCollection.
    
    Test: fast/dom/HTMLDocument/document-all.html
    
    * DerivedSources.make:
    * GNUmakefile.am:
    * WebCore.gypi:
    * WebCore.pro:
    * WebCore.vcproj/WebCore.vcproj:
    * WebCore.xcodeproj/project.pbxproj:
    * bindings/js/JSHTMLAllCollection.cpp: Removed.
    * bindings/js/JSHTMLAllCollection.h: Removed.
    * bindings/js/JSHTMLAllCollectionCustom.cpp: Added.
    (WebCore::getNamedItems):
    (WebCore::callHTMLAllCollection):
    (WebCore::JSHTMLAllCollection::getCallData):
    (WebCore::JSHTMLAllCollection::canGetItemsForName):
    (WebCore::JSHTMLAllCollection::nameGetter):
    (WebCore::JSHTMLAllCollection::item):
    (WebCore::JSHTMLAllCollection::namedItem):
    * bindings/js/JSHTMLCollectionCustom.cpp:
    (WebCore::toJS):
    * bindings/js/JSHTMLDocumentCustom.cpp:
    * bindings/scripts/CodeGeneratorJS.pm:
    * dom/Document.cpp:
    (WebCore::Document::all):
    * dom/Document.h:
    * dom/HTMLAllCollection.idl: Removed.
    * html/HTMLAllCollection.cpp: Added.
    (WebCore::HTMLAllCollection::create):
    (WebCore::HTMLAllCollection::HTMLAllCollection):
    (WebCore::HTMLAllCollection::~HTMLAllCollection):
    * html/HTMLAllCollection.h: Added.
    * html/HTMLAllCollection.idl: Added.
    * html/HTMLCollection.h:
    * html/HTMLCollection.idl:
    * html/HTMLDocument.idl:
    * page/DOMWindow.idl:
    
    LayoutTests: Update and add test for https://bugs.webkit.org/show_bug.cgi?id=30695
    Drop .tags() support from HTMLCollection
    
    Reviewed by Anders Carlsson.
    
    * fast/dom/HTMLDocument/document-all-expected.txt: Added.
    * fast/dom/HTMLDocument/document-all.html: Added.
    * fast/dom/HTMLDocument/script-tests: Added.
    * fast/dom/HTMLDocument/script-tests/document-all.js: Added.
    * fast/dom/Window/window-properties-expected.txt:
    * fast/dom/dom-constructors-expected.txt:
    * fast/dom/dom-constructors.html:
    * fast/dom/domListEnumeration-expected.txt:
    * fast/dom/prototype-inheritance-2-expected.txt:
    * fast/dom/prototype-inheritance-expected.txt:
    * fast/dom/script-tests/domListEnumeration.js:
    * fast/dom/undetectable-document-all-expected.txt:
    * fast/js/global-constructors-expected.txt:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49998 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 68f6fdf..a1b1370 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,24 @@
+2009-10-23  Sam Weinig  <sam at webkit.org>
+
+        Reviewed by Anders Carlsson.
+
+        Update and add test for https://bugs.webkit.org/show_bug.cgi?id=30695
+        Drop .tags() support from HTMLCollection
+
+        * fast/dom/HTMLDocument/document-all-expected.txt: Added.
+        * fast/dom/HTMLDocument/document-all.html: Added.
+        * fast/dom/HTMLDocument/script-tests: Added.
+        * fast/dom/HTMLDocument/script-tests/document-all.js: Added.
+        * fast/dom/Window/window-properties-expected.txt:
+        * fast/dom/dom-constructors-expected.txt:
+        * fast/dom/dom-constructors.html:
+        * fast/dom/domListEnumeration-expected.txt:
+        * fast/dom/prototype-inheritance-2-expected.txt:
+        * fast/dom/prototype-inheritance-expected.txt:
+        * fast/dom/script-tests/domListEnumeration.js:
+        * fast/dom/undetectable-document-all-expected.txt:
+        * fast/js/global-constructors-expected.txt:
+
 2009-10-23  Alpha Lam  <hclam at chromium.org>
 
         Reviewed by Eric Carlson.
diff --git a/LayoutTests/fast/dom/HTMLDocument/document-all-expected.txt b/LayoutTests/fast/dom/HTMLDocument/document-all-expected.txt
new file mode 100644
index 0000000..5fb7b10
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLDocument/document-all-expected.txt
@@ -0,0 +1,7 @@
+PASS htmlallcollection.toString() is '[object HTMLAllCollection]'
+PASS typeof htmlallcollection.tags == "function" is true
+PASS htmlallcollection.tags("body").length is 1
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/dom/HTMLDocument/document-all.html b/LayoutTests/fast/dom/HTMLDocument/document-all.html
new file mode 100644
index 0000000..93cba23
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLDocument/document-all.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/document-all.js"></script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/dom/HTMLDocument/script-tests/document-all.js b/LayoutTests/fast/dom/HTMLDocument/script-tests/document-all.js
new file mode 100644
index 0000000..cab3b64
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLDocument/script-tests/document-all.js
@@ -0,0 +1,6 @@
+var htmlallcollection = document.all;
+shouldBe('htmlallcollection.toString()', "'[object HTMLAllCollection]'");
+shouldBeTrue('typeof htmlallcollection.tags == "function"');
+shouldBe('htmlallcollection.tags("body").length', "1");
+
+successfullyParsed = true;
diff --git a/LayoutTests/fast/dom/Window/window-properties-expected.txt b/LayoutTests/fast/dom/Window/window-properties-expected.txt
index 3a0b35a..d41b764 100644
--- a/LayoutTests/fast/dom/Window/window-properties-expected.txt
+++ b/LayoutTests/fast/dom/Window/window-properties-expected.txt
@@ -899,6 +899,11 @@ window.File.prototype [object FilePrototype]
 window.FileList [object FileListConstructor]
 window.FileList.prototype [object FileListPrototype]
 window.FileList.prototype.item [function]
+window.HTMLAllCollection [object HTMLAllCollectionConstructor]
+window.HTMLAllCollection.prototype [object HTMLAllCollectionPrototype]
+window.HTMLAllCollection.prototype.item [function]
+window.HTMLAllCollection.prototype.namedItem [function]
+window.HTMLAllCollection.prototype.tags [function]
 window.HTMLAnchorElement [object HTMLAnchorElementConstructor]
 window.HTMLAnchorElement.prototype [printed above as window.Element.prototype]
 window.HTMLAppletElement [object HTMLAppletElementConstructor]
@@ -925,7 +930,6 @@ window.HTMLCollection [object HTMLCollectionConstructor]
 window.HTMLCollection.prototype [object HTMLCollectionPrototype]
 window.HTMLCollection.prototype.item [function]
 window.HTMLCollection.prototype.namedItem [function]
-window.HTMLCollection.prototype.tags [function]
 window.HTMLDListElement [object HTMLDListElementConstructor]
 window.HTMLDListElement.prototype [printed above as window.Element.prototype]
 window.HTMLDataGridCellElement [object HTMLDataGridCellElementConstructor]
diff --git a/LayoutTests/fast/dom/dom-constructors-expected.txt b/LayoutTests/fast/dom/dom-constructors-expected.txt
index 3815885..083f9f8 100644
--- a/LayoutTests/fast/dom/dom-constructors-expected.txt
+++ b/LayoutTests/fast/dom/dom-constructors-expected.txt
@@ -18,6 +18,7 @@ PASS TryAllocate('Node') is 'exception'
 PASS TryAllocate('Notation') is 'exception'
 PASS TryAllocate('ProcessingInstruction') is 'exception'
 PASS TryAllocate('Text') is 'exception'
+PASS TryAllocate('HTMLAllCollection') is 'exception'
 PASS TryAllocate('HTMLAnchorElement') is 'exception'
 PASS TryAllocate('HTMLAppletElement') is 'exception'
 PASS TryAllocate('HTMLAreaElement') is 'exception'
@@ -136,7 +137,6 @@ PASS TryAllocate('XPathNSResolver') is 'no constructor'
 PASS TryAllocate('EventTarget') is 'no constructor'
 PASS TryAllocate('EventListener') is 'no constructor'
 PASS TryAllocate('NPObject') is 'no constructor'
-PASS TryAllocate('HTMLAllCollection') is 'no constructor'
 PASS TryAllocate('DOMParser') is '[object DOMParser]'
 PASS TryAllocate('DOMParser') is '[object DOMParser]'
 PASS TryAllocate('DOMParser') is '[object DOMParser]'
diff --git a/LayoutTests/fast/dom/dom-constructors.html b/LayoutTests/fast/dom/dom-constructors.html
index f9c23a3..5fc8f80 100644
--- a/LayoutTests/fast/dom/dom-constructors.html
+++ b/LayoutTests/fast/dom/dom-constructors.html
@@ -19,7 +19,7 @@ var objects_exception = [
     'Attr', 'CharacterData', 'CDATASection', 'Comment', 'Document',
     'DocumentFragment', 'DocumentType', 'Element', 'Entity',
     'EntityReference', 'HTMLDocument', 'Node', 'Notation',
-    'ProcessingInstruction', 'Text', 'HTMLAnchorElement',
+    'ProcessingInstruction', 'Text', 'HTMLAllCollection', 'HTMLAnchorElement',
     'HTMLAppletElement', 'HTMLAreaElement', 'HTMLBaseElement',
     'HTMLBaseFontElement', 'HTMLBlockquoteElement', 'HTMLBodyElement',
     'HTMLBRElement', 'HTMLButtonElement', 'HTMLCanvasElement',
@@ -65,8 +65,7 @@ var objects_constructor = [
 // These objects should have no constructor.
 var objects_no_constructor = [
     'EventTargetNode', 'UndetectableHTMLCollection',
-    'XPathNSResolver', 'EventTarget', 'EventListener', 'NPObject',
-    'HTMLAllCollection'
+    'XPathNSResolver', 'EventTarget', 'EventListener', 'NPObject'
 ];
 
 // These objects should have a working constructor, but their constructed
diff --git a/LayoutTests/fast/dom/domListEnumeration-expected.txt b/LayoutTests/fast/dom/domListEnumeration-expected.txt
index 159d697..88d202b 100644
--- a/LayoutTests/fast/dom/domListEnumeration-expected.txt
+++ b/LayoutTests/fast/dom/domListEnumeration-expected.txt
@@ -14,7 +14,7 @@ PASS resultArray[2].i is '2'
 PASS resultArray[2].item is nodeList.item(2)
 
 [object HTMLCollection]
-PASS resultArray.length is 7
+PASS resultArray.length is 6
 PASS resultArray[0].i is '0'
 PASS resultArray[0].item is htmlCollection.item(0)
 PASS resultArray[1].i is '1'
diff --git a/LayoutTests/fast/dom/prototype-inheritance-2-expected.txt b/LayoutTests/fast/dom/prototype-inheritance-2-expected.txt
index 78d8c4b..af9e030 100644
--- a/LayoutTests/fast/dom/prototype-inheritance-2-expected.txt
+++ b/LayoutTests/fast/dom/prototype-inheritance-2-expected.txt
@@ -220,6 +220,7 @@ Never found Entity
 Never found EntityReference
 Never found File
 Never found FileList
+Never found HTMLAllCollection
 Never found HTMLBaseElement
 Never found HTMLBaseFontElement
 Never found HTMLBlockquoteElement
diff --git a/LayoutTests/fast/dom/prototype-inheritance-expected.txt b/LayoutTests/fast/dom/prototype-inheritance-expected.txt
index 0bcd49c..b5db8e4 100644
--- a/LayoutTests/fast/dom/prototype-inheritance-expected.txt
+++ b/LayoutTests/fast/dom/prototype-inheritance-expected.txt
@@ -85,6 +85,8 @@ PASS inner.File.isInner is true
 PASS inner.File.constructor.isInner is true
 PASS inner.FileList.isInner is true
 PASS inner.FileList.constructor.isInner is true
+PASS inner.HTMLAllCollection.isInner is true
+PASS inner.HTMLAllCollection.constructor.isInner is true
 PASS inner.HTMLAnchorElement.isInner is true
 PASS inner.HTMLAnchorElement.constructor.isInner is true
 PASS inner.HTMLAppletElement.isInner is true
diff --git a/LayoutTests/fast/dom/script-tests/domListEnumeration.js b/LayoutTests/fast/dom/script-tests/domListEnumeration.js
index 47cf16f..9055aa9 100644
--- a/LayoutTests/fast/dom/script-tests/domListEnumeration.js
+++ b/LayoutTests/fast/dom/script-tests/domListEnumeration.js
@@ -108,7 +108,7 @@ shouldBe("resultArray[2].item", "nodeList.item(2)");
 // HTMLCollection
 var htmlCollection = document.forms;
 resultArray = iterateList(htmlCollection);
-shouldBe("resultArray.length", "7");
+shouldBe("resultArray.length", "6");
 shouldBe("resultArray[0].i", "'0'");
 shouldBe("resultArray[0].item", "htmlCollection.item(0)");
 shouldBe("resultArray[1].i", "'1'");
diff --git a/LayoutTests/fast/dom/undetectable-document-all-expected.txt b/LayoutTests/fast/dom/undetectable-document-all-expected.txt
index 3bfbb06..937759e 100644
--- a/LayoutTests/fast/dom/undetectable-document-all-expected.txt
+++ b/LayoutTests/fast/dom/undetectable-document-all-expected.txt
@@ -1,4 +1,4 @@
 This tests that document.all should be undetectable, and that it should be possible to set document.all to something else. If this test is successful, the text "SUCCESS" should be shown below.
-document.all: [object HTMLCollection]
+document.all: [object HTMLAllCollection]
 SUCCESS!
 
diff --git a/LayoutTests/fast/js/global-constructors-expected.txt b/LayoutTests/fast/js/global-constructors-expected.txt
index eeb3ade..b6261de 100644
--- a/LayoutTests/fast/js/global-constructors-expected.txt
+++ b/LayoutTests/fast/js/global-constructors-expected.txt
@@ -42,6 +42,7 @@ PASS Event.toString() is '[object EventConstructor]'
 PASS EventException.toString() is '[object EventExceptionConstructor]'
 PASS File.toString() is '[object FileConstructor]'
 PASS FileList.toString() is '[object FileListConstructor]'
+PASS HTMLAllCollection.toString() is '[object HTMLAllCollectionConstructor]'
 PASS HTMLAnchorElement.toString() is '[object HTMLAnchorElementConstructor]'
 PASS HTMLAppletElement.toString() is '[object HTMLAppletElementConstructor]'
 PASS HTMLAreaElement.toString() is '[object HTMLAreaElementConstructor]'
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 9a60c37..ed5b6e4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,52 @@
+2009-10-23  Sam Weinig  <sam at webkit.org>
+
+        Reviewed by Anders Carlsson.
+
+        Fix for https://bugs.webkit.org/show_bug.cgi?id=30695
+        Drop .tags() support from HTMLCollection
+
+        - Make .tags() only work for HTMLAllCollections in JS. .tags() is still
+          available for all HTMLCollection like objects in Objective-C since that
+          is API.
+        - Auto-generate HTMLAllCollection.
+
+        Test: fast/dom/HTMLDocument/document-all.html
+
+        * DerivedSources.make:
+        * GNUmakefile.am:
+        * WebCore.gypi:
+        * WebCore.pro:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/JSHTMLAllCollection.cpp: Removed.
+        * bindings/js/JSHTMLAllCollection.h: Removed.
+        * bindings/js/JSHTMLAllCollectionCustom.cpp: Added.
+        (WebCore::getNamedItems):
+        (WebCore::callHTMLAllCollection):
+        (WebCore::JSHTMLAllCollection::getCallData):
+        (WebCore::JSHTMLAllCollection::canGetItemsForName):
+        (WebCore::JSHTMLAllCollection::nameGetter):
+        (WebCore::JSHTMLAllCollection::item):
+        (WebCore::JSHTMLAllCollection::namedItem):
+        * bindings/js/JSHTMLCollectionCustom.cpp:
+        (WebCore::toJS):
+        * bindings/js/JSHTMLDocumentCustom.cpp:
+        * bindings/scripts/CodeGeneratorJS.pm:
+        * dom/Document.cpp:
+        (WebCore::Document::all):
+        * dom/Document.h:
+        * dom/HTMLAllCollection.idl: Removed.
+        * html/HTMLAllCollection.cpp: Added.
+        (WebCore::HTMLAllCollection::create):
+        (WebCore::HTMLAllCollection::HTMLAllCollection):
+        (WebCore::HTMLAllCollection::~HTMLAllCollection):
+        * html/HTMLAllCollection.h: Added.
+        * html/HTMLAllCollection.idl: Added.
+        * html/HTMLCollection.h:
+        * html/HTMLCollection.idl:
+        * html/HTMLDocument.idl:
+        * page/DOMWindow.idl:
+
 2009-10-23  Pavel Feldman  <pfeldman at chromium.org>
 
         Reviewed by Timothy Hatcher.
diff --git a/WebCore/DerivedSources.make b/WebCore/DerivedSources.make
index 46e6108..fd38707 100644
--- a/WebCore/DerivedSources.make
+++ b/WebCore/DerivedSources.make
@@ -126,6 +126,7 @@ DOM_CLASSES = \
     FileList \
     Geolocation \
     Geoposition \
+    HTMLAllCollection \
     HTMLAnchorElement \
     HTMLAppletElement \
     HTMLAreaElement \
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index ae2f16b..e96a75d 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -169,6 +169,7 @@ IDL_BINDINGS += \
 	WebCore/html/DataGridColumnList.idl \
 	WebCore/html/File.idl \
 	WebCore/html/FileList.idl \
+	WebCore/html/HTMLAllCollection.idl \
 	WebCore/html/HTMLAnchorElement.idl \
 	WebCore/html/HTMLAppletElement.idl \
 	WebCore/html/HTMLAreaElement.idl \
@@ -370,9 +371,8 @@ webcore_sources += \
 	WebCore/bindings/js/JSExceptionBase.cpp \
 	WebCore/bindings/js/JSExceptionBase.h \
 	WebCore/bindings/js/JSGeolocationCustom.cpp \
-	WebCore/bindings/js/JSHTMLAllCollection.cpp \
-	WebCore/bindings/js/JSHTMLAllCollection.h \
-	WebCore/bindings/js/JSHTMLAppletElementCustom.cpp \
+	WebCore/bindings/js/JSHTMLAllCollectionCustom.cpp \
+ 	WebCore/bindings/js/JSHTMLAppletElementCustom.cpp \
 	WebCore/bindings/js/JSHTMLAppletElementCustom.h \
 	WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp \
 	WebCore/bindings/js/JSHTMLCollectionCustom.cpp \
@@ -960,6 +960,8 @@ webcore_sources += \
 	WebCore/html/FileList.h \
 	WebCore/html/FormDataList.cpp \
 	WebCore/html/FormDataList.h \
+	WebCore/html/HTMLAllCollection.cpp \
+	WebCore/html/HTMLAllCollection.h \
 	WebCore/html/HTMLAnchorElement.cpp \
 	WebCore/html/HTMLAnchorElement.h \
 	WebCore/html/HTMLAppletElement.cpp \
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index ffa27a2..2914033 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -51,7 +51,6 @@
             'dom/EventException.idl',
             'dom/EventListener.idl',
             'dom/EventTarget.idl',
-            'dom/HTMLAllCollection.idl',
             'dom/KeyboardEvent.idl',
             'dom/MessageChannel.idl',
             'dom/MessageEvent.idl',
@@ -103,6 +102,7 @@
             'html/DataGridColumnList.idl',
             'html/File.idl',
             'html/FileList.idl',
+            'html/HTMLAllCollection.idl',
             'html/HTMLAnchorElement.idl',
             'html/HTMLAppletElement.idl',
             'html/HTMLAreaElement.idl',
@@ -491,8 +491,7 @@
             'bindings/js/JSGeolocationCustom.cpp',
             'bindings/js/JSHistoryCustom.cpp',
             'bindings/js/JSHistoryCustom.h',
-            'bindings/js/JSHTMLAllCollection.cpp',
-            'bindings/js/JSHTMLAllCollection.h',
+            'bindings/js/JSHTMLAllCollectionCustom.cpp',
             'bindings/js/JSHTMLAppletElementCustom.cpp',
             'bindings/js/JSHTMLAppletElementCustom.h',
             'bindings/js/JSHTMLCanvasElementCustom.cpp',
@@ -1327,6 +1326,8 @@
             'html/FileList.h',
             'html/FormDataList.cpp',
             'html/FormDataList.h',
+            'html/HTMLAllCollection.cpp',
+            'html/HTMLAllCollection.h',
             'html/HTMLAnchorElement.cpp',
             'html/HTMLAnchorElement.h',
             'html/HTMLAppletElement.cpp',
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index d9a7056..b6434b7 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -394,6 +394,7 @@ IDL_BINDINGS += \
     html/DataGridColumnList.idl \
     html/File.idl \
     html/FileList.idl \
+    html/HTMLAllCollection.idl \
     html/HTMLAudioElement.idl \
     html/HTMLAnchorElement.idl \
     html/HTMLAppletElement.idl \
@@ -703,10 +704,10 @@ SOURCES += \
     bindings/js/JSEventTarget.cpp \
     bindings/js/JSExceptionBase.cpp \
     bindings/js/JSGeolocationCustom.cpp \
-    bindings/js/JSHTMLAllCollection.cpp \
     bindings/js/JSHistoryCustom.cpp \
     bindings/js/JSHTMLAppletElementCustom.cpp \
     bindings/js/JSHTMLCanvasElementCustom.cpp \
+    bindings/js/JSHTMLAllCollectionCustom.cpp \
     bindings/js/JSHTMLCollectionCustom.cpp \
     bindings/js/JSHTMLDataGridElementCustom.cpp \
     bindings/js/JSHTMLDocumentCustom.cpp \
@@ -990,6 +991,7 @@ SOURCES += \
     html/File.cpp \
     html/FileList.cpp \
     html/FormDataList.cpp \
+    html/HTMLAllCollection.cpp \
     html/HTMLAnchorElement.cpp \
     html/HTMLAppletElement.cpp \
     html/HTMLAreaElement.cpp \
@@ -1403,7 +1405,6 @@ HEADERS += \
     bindings/js/JSEventSourceConstructor.h \
     bindings/js/JSEventTarget.h \
     bindings/js/JSHistoryCustom.h \
-    bindings/js/JSHTMLAllCollection.h \
     bindings/js/JSHTMLAppletElementCustom.h \
     bindings/js/JSHTMLEmbedElementCustom.h \
     bindings/js/JSHTMLInputElementCustom.h \
@@ -1664,6 +1665,7 @@ HEADERS += \
     html/File.h \
     html/FileList.h \
     html/FormDataList.h \
+    html/HTMLAllCollection.h \
     html/HTMLAnchorElement.h \
     html/HTMLAppletElement.h \
     html/HTMLAreaElement.h \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 4b4642e..7fa05c8 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -4309,6 +4309,62 @@
 				>
 			</File>
 			<File
+				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSHTMLAllCollection.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\JSHTMLAllCollection.h"
+				>
+			</File>
+			<File
 				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSHTMLCollection.cpp"
 				>
 				<FileConfiguration
@@ -30011,6 +30067,14 @@
 				>
 			</File>
 			<File
+				RelativePath="..\html\HTMLAllCollection.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\html\HTMLAllCollection.h"
+				>
+			</File>
+			<File
 				RelativePath="..\html\HTMLCollection.cpp"
 				>
 			</File>
@@ -33858,19 +33922,15 @@
 					>
 				</File>
 				<File
-					RelativePath="..\bindings\js\JSHTMLAllCollection.cpp"
-					>
-				</File>
-				<File
-					RelativePath="..\bindings\js\JSHTMLAllCollection.h"
+					RelativePath="..\bindings\js\JSHTMLAppletElementCustom.cpp"
 					>
 				</File>
 				<File
-					RelativePath="..\bindings\js\JSHTMLAppletElementCustom.cpp"
+					RelativePath="..\bindings\js\JSHTMLCanvasElementCustom.cpp"
 					>
 				</File>
 				<File
-					RelativePath="..\bindings\js\JSHTMLCanvasElementCustom.cpp"
+					RelativePath="..\bindings\js\JSHTMLAllCollectionCustom.cpp"
 					>
 				</File>
 				<File
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index d0bb745..d8fe9a5 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -2208,7 +2208,6 @@
 		934F71420D5A6F4400018D69 /* ResourceError.h in Headers */ = {isa = PBXBuildFile; fileRef = 934F71410D5A6F4400018D69 /* ResourceError.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		934F71440D5A6F5300018D69 /* AuthenticationChallenge.h in Headers */ = {isa = PBXBuildFile; fileRef = 934F71430D5A6F5300018D69 /* AuthenticationChallenge.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		934FE9E50B5CA539003E4A73 /* FileChooser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 934FE9E40B5CA539003E4A73 /* FileChooser.cpp */; };
-		9350E70D0E87500B00189FFF /* JSHTMLAllCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9350E70C0E87500B00189FFF /* JSHTMLAllCollection.cpp */; };
 		9352071909BD3BA500F2038D /* StaticConstructors.h in Headers */ = {isa = PBXBuildFile; fileRef = 9352071709BD3BA500F2038D /* StaticConstructors.h */; };
 		935207BE09BD410A00F2038D /* LocalizedStrings.h in Headers */ = {isa = PBXBuildFile; fileRef = 935207BD09BD410A00F2038D /* LocalizedStrings.h */; };
 		935207C009BD412100F2038D /* LocalizedStringsMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 935207BF09BD412000F2038D /* LocalizedStringsMac.mm */; };
@@ -4249,7 +4248,6 @@
 		BC6D6E2609AF943500F59759 /* ScrollView.h in Headers */ = {isa = PBXBuildFile; fileRef = BC6D6E2509AF943500F59759 /* ScrollView.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		BC6DADEF0A195FDF00E5CD14 /* WebFontCache.h in Headers */ = {isa = PBXBuildFile; fileRef = BC6DADEE0A195FDF00E5CD14 /* WebFontCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		BC6DADFA0A19602B00E5CD14 /* WebFontCache.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC6DADF90A19602B00E5CD14 /* WebFontCache.mm */; };
-		BC6DC7A10C1A4BFA004E2017 /* JSHTMLAllCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = BC6DC7A00C1A4BFA004E2017 /* JSHTMLAllCollection.h */; };
 		BC74DA371013F3F7007987AD /* RGBColor.h in Headers */ = {isa = PBXBuildFile; fileRef = BC74DA351013F3F7007987AD /* RGBColor.h */; };
 		BC74DA381013F3F7007987AD /* RGBColor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC74DA361013F3F7007987AD /* RGBColor.cpp */; };
 		BC74DA481013F468007987AD /* JSRGBColor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC74DA461013F468007987AD /* JSRGBColor.cpp */; };
@@ -4327,6 +4325,11 @@
 		BC94D1540C275C8B006BC617 /* History.h in Headers */ = {isa = PBXBuildFile; fileRef = BC94D1510C275C8B006BC617 /* History.h */; };
 		BC96DB430F3A880E00573CB3 /* RenderBoxModelObject.h in Headers */ = {isa = PBXBuildFile; fileRef = BC96DB420F3A880E00573CB3 /* RenderBoxModelObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		BC96DB460F3A882200573CB3 /* RenderBoxModelObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC96DB450F3A882200573CB3 /* RenderBoxModelObject.cpp */; };
+		BC97E23A109144950010D361 /* HTMLAllCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = BC97E238109144950010D361 /* HTMLAllCollection.h */; };
+		BC97E23B109144950010D361 /* HTMLAllCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC97E239109144950010D361 /* HTMLAllCollection.cpp */; };
+		BC97E412109154FA0010D361 /* JSHTMLAllCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC97E410109154FA0010D361 /* JSHTMLAllCollection.cpp */; };
+		BC97E413109154FA0010D361 /* JSHTMLAllCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = BC97E411109154FA0010D361 /* JSHTMLAllCollection.h */; };
+		BC97E42C10915B060010D361 /* JSHTMLAllCollectionCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC97E42B10915B060010D361 /* JSHTMLAllCollectionCustom.cpp */; };
 		BC98543D0CD3D98B00069BC1 /* JSConsole.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC98543B0CD3D98B00069BC1 /* JSConsole.cpp */; };
 		BC98543E0CD3D98C00069BC1 /* JSConsole.h in Headers */ = {isa = PBXBuildFile; fileRef = BC98543C0CD3D98B00069BC1 /* JSConsole.h */; };
 		BC98A27D0C0C9950004BEBF7 /* JSStyleSheetCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC98A27C0C0C9950004BEBF7 /* JSStyleSheetCustom.cpp */; };
@@ -7450,7 +7453,6 @@
 		934F71410D5A6F4400018D69 /* ResourceError.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ResourceError.h; sourceTree = "<group>"; };
 		934F71430D5A6F5300018D69 /* AuthenticationChallenge.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AuthenticationChallenge.h; sourceTree = "<group>"; };
 		934FE9E40B5CA539003E4A73 /* FileChooser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileChooser.cpp; sourceTree = "<group>"; };
-		9350E70C0E87500B00189FFF /* JSHTMLAllCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLAllCollection.cpp; sourceTree = "<group>"; };
 		9352071709BD3BA500F2038D /* StaticConstructors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StaticConstructors.h; sourceTree = "<group>"; };
 		935207BD09BD410A00F2038D /* LocalizedStrings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalizedStrings.h; sourceTree = "<group>"; };
 		935207BF09BD412000F2038D /* LocalizedStringsMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LocalizedStringsMac.mm; sourceTree = "<group>"; };
@@ -9373,7 +9375,6 @@
 		BC6D6E2509AF943500F59759 /* ScrollView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ScrollView.h; sourceTree = "<group>"; };
 		BC6DADEE0A195FDF00E5CD14 /* WebFontCache.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebFontCache.h; sourceTree = "<group>"; };
 		BC6DADF90A19602B00E5CD14 /* WebFontCache.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WebFontCache.mm; sourceTree = "<group>"; };
-		BC6DC7A00C1A4BFA004E2017 /* JSHTMLAllCollection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSHTMLAllCollection.h; sourceTree = "<group>"; };
 		BC74DA351013F3F7007987AD /* RGBColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RGBColor.h; sourceTree = "<group>"; };
 		BC74DA361013F3F7007987AD /* RGBColor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RGBColor.cpp; sourceTree = "<group>"; };
 		BC74DA461013F468007987AD /* JSRGBColor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRGBColor.cpp; sourceTree = "<group>"; };
@@ -9458,6 +9459,12 @@
 		BC94D1520C275C8B006BC617 /* History.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = History.idl; sourceTree = "<group>"; };
 		BC96DB420F3A880E00573CB3 /* RenderBoxModelObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderBoxModelObject.h; sourceTree = "<group>"; };
 		BC96DB450F3A882200573CB3 /* RenderBoxModelObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderBoxModelObject.cpp; sourceTree = "<group>"; };
+		BC97E238109144950010D361 /* HTMLAllCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLAllCollection.h; sourceTree = "<group>"; };
+		BC97E239109144950010D361 /* HTMLAllCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLAllCollection.cpp; sourceTree = "<group>"; };
+		BC97E23C109146F10010D361 /* HTMLAllCollection.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLAllCollection.idl; sourceTree = "<group>"; };
+		BC97E410109154FA0010D361 /* JSHTMLAllCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLAllCollection.cpp; sourceTree = "<group>"; };
+		BC97E411109154FA0010D361 /* JSHTMLAllCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLAllCollection.h; sourceTree = "<group>"; };
+		BC97E42B10915B060010D361 /* JSHTMLAllCollectionCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLAllCollectionCustom.cpp; sourceTree = "<group>"; };
 		BC98543B0CD3D98B00069BC1 /* JSConsole.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSConsole.cpp; sourceTree = "<group>"; };
 		BC98543C0CD3D98B00069BC1 /* JSConsole.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSConsole.h; sourceTree = "<group>"; };
 		BC98A27C0C0C9950004BEBF7 /* JSStyleSheetCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSStyleSheetCustom.cpp; sourceTree = "<group>"; };
@@ -12495,6 +12502,9 @@
 				A8DF3FC9097FA0FB0052981B /* HTMLCollection.cpp */,
 				A8DF3FC8097FA0FB0052981B /* HTMLCollection.h */,
 				85DF2F690AA3C74300AD64C5 /* HTMLCollection.idl */,
+				BC97E23C109146F10010D361 /* HTMLAllCollection.idl */,
+				BC97E238109144950010D361 /* HTMLAllCollection.h */,
+				BC97E239109144950010D361 /* HTMLAllCollection.cpp */,
 				BC77CDB70FEFF1210070887B /* HTMLDataGridCellElement.cpp */,
 				BC77CDBB0FEFF1420070887B /* HTMLDataGridCellElement.h */,
 				BC77CDA20FEFEB530070887B /* HTMLDataGridCellElement.idl */,
@@ -12798,6 +12808,8 @@
 				BC00F0110E0A189500FD04E3 /* JSFile.h */,
 				BC00F0120E0A189500FD04E3 /* JSFileList.cpp */,
 				BC00F0130E0A189500FD04E3 /* JSFileList.h */,
+				BC97E410109154FA0010D361 /* JSHTMLAllCollection.cpp */,
+				BC97E411109154FA0010D361 /* JSHTMLAllCollection.h */,
 				1A4A2DEB0A1B852A00C807F8 /* JSHTMLAnchorElement.cpp */,
 				1A4A2DEC0A1B852A00C807F8 /* JSHTMLAnchorElement.h */,
 				1A4A2DED0A1B852A00C807F8 /* JSHTMLAppletElement.cpp */,
@@ -14475,6 +14487,7 @@
 				BC348BBD0DB7F531004ABAB9 /* JSXMLHttpRequestCustom.cpp */,
 				BCDFD4910E3056BD009D10AD /* JSXMLHttpRequestUploadCustom.cpp */,
 				BCEFE1E40DCA5F3300739219 /* JSXSLTProcessorCustom.cpp */,
+				BC97E42B10915B060010D361 /* JSHTMLAllCollectionCustom.cpp */,
 			);
 			name = Custom;
 			sourceTree = "<group>";
@@ -14756,8 +14769,6 @@
 				49EECFAA1050938200099FAB /* JSCanvasUnsignedShortArrayConstructor.h */,
 				E0FEF371B77C53EAC1C1FBEE /* JSEventSourceConstructor.cpp */,
 				E0FEF371B67C53EAC1C1FBEE /* JSEventSourceConstructor.h */,
-				9350E70C0E87500B00189FFF /* JSHTMLAllCollection.cpp */,
-				BC6DC7A00C1A4BFA004E2017 /* JSHTMLAllCollection.h */,
 				BC6C49F10D7DBA0500FFA558 /* JSImageConstructor.cpp */,
 				BC6C49F20D7DBA0500FFA558 /* JSImageConstructor.h */,
 				E10743230E7835830033AF24 /* JSMessageChannelConstructor.cpp */,
@@ -16999,7 +17010,6 @@
 				FE80DA640E9C4703000D6F75 /* JSGeolocation.h in Headers */,
 				FE80DA660E9C4703000D6F75 /* JSGeoposition.h in Headers */,
 				BC94D14F0C275C68006BC617 /* JSHistory.h in Headers */,
-				BC6DC7A10C1A4BFA004E2017 /* JSHTMLAllCollection.h in Headers */,
 				1A4A2DF00A1B852A00C807F8 /* JSHTMLAnchorElement.h in Headers */,
 				1A4A2DF20A1B852A00C807F8 /* JSHTMLAppletElement.h in Headers */,
 				1AE2AA1F0A1CDAB400B42B25 /* JSHTMLAreaElement.h in Headers */,
@@ -18063,6 +18073,8 @@
 				3314ACEC10892086000F0E56 /* JSExceptionBase.h in Headers */,
 				973E325710883B7C005BC493 /* ResourceLoadNotifier.h in Headers */,
 				84801955108BAFB300CB2B1F /* FEGaussianBlur.h in Headers */,
+				BC97E23A109144950010D361 /* HTMLAllCollection.h in Headers */,
+				BC97E413109154FA0010D361 /* JSHTMLAllCollection.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -19168,7 +19180,6 @@
 				FE80DA650E9C4703000D6F75 /* JSGeoposition.cpp in Sources */,
 				BC94D14E0C275C68006BC617 /* JSHistory.cpp in Sources */,
 				BCE7B1930D4E86960075A539 /* JSHistoryCustom.cpp in Sources */,
-				9350E70D0E87500B00189FFF /* JSHTMLAllCollection.cpp in Sources */,
 				1A4A2DEF0A1B852A00C807F8 /* JSHTMLAnchorElement.cpp in Sources */,
 				1A4A2DF10A1B852A00C807F8 /* JSHTMLAppletElement.cpp in Sources */,
 				BC4EDEF40C08F3FB007EDD49 /* JSHTMLAppletElementCustom.cpp in Sources */,
@@ -20197,6 +20208,9 @@
 				3314ACEB10892086000F0E56 /* JSExceptionBase.cpp in Sources */,
 				973E325610883B7C005BC493 /* ResourceLoadNotifier.cpp in Sources */,
 				84801954108BAFB300CB2B1F /* FEGaussianBlur.cpp in Sources */,
+				BC97E23B109144950010D361 /* HTMLAllCollection.cpp in Sources */,
+				BC97E412109154FA0010D361 /* JSHTMLAllCollection.cpp in Sources */,
+				BC97E42C10915B060010D361 /* JSHTMLAllCollectionCustom.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/WebCore/bindings/js/JSHTMLAllCollection.cpp b/WebCore/bindings/js/JSHTMLAllCollection.cpp
deleted file mode 100644
index ce2609c..0000000
--- a/WebCore/bindings/js/JSHTMLAllCollection.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2008 Apple 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 COMPUTER, INC. ``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 COMPUTER, INC. OR
- * 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 "JSHTMLAllCollection.h"
-
-using namespace JSC;
-
-namespace WebCore {
-
-const ClassInfo JSHTMLAllCollection::s_info = { "HTMLAllCollection", 0, 0, 0 };
-
-} // namespace WebCore
diff --git a/WebCore/bindings/js/JSHTMLAllCollection.h b/WebCore/bindings/js/JSHTMLAllCollection.h
deleted file mode 100644
index da3a758..0000000
--- a/WebCore/bindings/js/JSHTMLAllCollection.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2007, 2008 Apple 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 COMPUTER, INC. ``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 COMPUTER, INC. OR
- * 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 JSHTMLAllCollection_h
-#define JSHTMLAllCollection_h
-
-#include "HTMLCollection.h"
-#include "JSHTMLCollection.h"
-
-namespace WebCore {
-
-    class HTMLCollection;
-
-    class JSHTMLAllCollection : public JSHTMLCollection {
-    public:
-        JSHTMLAllCollection(NonNullPassRefPtr<JSC::Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLCollection> collection)
-            : JSHTMLCollection(structure, globalObject, collection)
-        {
-        }
-
-        static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue proto) 
-        { 
-            return JSC::Structure::create(proto, JSC::TypeInfo(JSC::ObjectType, StructureFlags)); 
-        }
-
-        static const JSC::ClassInfo s_info;
-    protected:
-        static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::MasqueradesAsUndefined | JSC::OverridesMarkChildren | JSC::OverridesGetPropertyNames | JSHTMLCollection::StructureFlags;
-
-    private:
-        virtual bool toBoolean(JSC::ExecState*) const { return false; }
-    };
-
-} // namespace WebCore
-
-#endif // JSHTMLAllCollection_h
diff --git a/WebCore/bindings/js/JSHTMLAllCollectionCustom.cpp b/WebCore/bindings/js/JSHTMLAllCollectionCustom.cpp
new file mode 100644
index 0000000..636a751
--- /dev/null
+++ b/WebCore/bindings/js/JSHTMLAllCollectionCustom.cpp
@@ -0,0 +1,135 @@
+/*
+ * Copyright (C) 2009 Apple 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. ``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
+ * 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 "JSHTMLAllCollection.h"
+
+#include "AtomicString.h"
+#include "HTMLAllCollection.h"
+#include "JSDOMBinding.h"
+#include "JSHTMLAllCollection.h"
+#include "JSNode.h"
+#include "JSNodeList.h"
+#include "Node.h"
+#include "StaticNodeList.h"
+#include <wtf/Vector.h>
+
+using namespace JSC;
+
+namespace WebCore {
+
+static JSValue getNamedItems(ExecState* exec, JSHTMLAllCollection* collection, const Identifier& propertyName)
+{
+    Vector<RefPtr<Node> > namedItems;
+    collection->impl()->namedItems(propertyName, namedItems);
+
+    if (namedItems.isEmpty())
+        return jsUndefined();
+    if (namedItems.size() == 1)
+        return toJS(exec, collection->globalObject(), namedItems[0].get());
+
+    // FIXME: HTML5 specifies that this should be a DynamicNodeList.
+    // FIXME: HTML5 specifies that non-HTMLOptionsCollection collections should return
+    // the first matching item instead of a NodeList.
+    return toJS(exec, collection->globalObject(), StaticNodeList::adopt(namedItems).get());
+}
+
+// HTMLCollections are strange objects, they support both get and call,
+// so that document.forms.item(0) and document.forms(0) both work.
+static JSValue JSC_HOST_CALL callHTMLAllCollection(ExecState* exec, JSObject* function, JSValue, const ArgList& args)
+{
+    if (args.size() < 1)
+        return jsUndefined();
+
+    // Do not use thisObj here. It can be the JSHTMLDocument, in the document.forms(i) case.
+    JSHTMLAllCollection* jsCollection = static_cast<JSHTMLAllCollection*>(function);
+    HTMLAllCollection* collection = jsCollection->impl();
+
+    // Also, do we need the TypeError test here ?
+
+    if (args.size() == 1) {
+        // Support for document.all(<index>) etc.
+        bool ok;
+        UString string = args.at(0).toString(exec);
+        unsigned index = string.toUInt32(&ok, false);
+        if (ok)
+            return toJS(exec, jsCollection->globalObject(), collection->item(index));
+
+        // Support for document.images('<name>') etc.
+        return getNamedItems(exec, jsCollection, Identifier(exec, string));
+    }
+
+    // The second arg, if set, is the index of the item we want
+    bool ok;
+    UString string = args.at(0).toString(exec);
+    unsigned index = args.at(1).toString(exec).toUInt32(&ok, false);
+    if (ok) {
+        String pstr = string;
+        Node* node = collection->namedItem(pstr);
+        while (node) {
+            if (!index)
+                return toJS(exec, jsCollection->globalObject(), node);
+            node = collection->nextNamedItem(pstr);
+            --index;
+        }
+    }
+
+    return jsUndefined();
+}
+
+CallType JSHTMLAllCollection::getCallData(CallData& callData)
+{
+    callData.native.function = callHTMLAllCollection;
+    return CallTypeHost;
+}
+
+bool JSHTMLAllCollection::canGetItemsForName(ExecState*, HTMLAllCollection* collection, const Identifier& propertyName)
+{
+    Vector<RefPtr<Node> > namedItems;
+    collection->namedItems(propertyName, namedItems);
+    return !namedItems.isEmpty();
+}
+
+JSValue JSHTMLAllCollection::nameGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot)
+{
+    JSHTMLAllCollection* thisObj = static_cast<JSHTMLAllCollection*>(asObject(slot.slotBase()));
+    return getNamedItems(exec, thisObj, propertyName);
+}
+
+JSValue JSHTMLAllCollection::item(ExecState* exec, const ArgList& args)
+{
+    bool ok;
+    uint32_t index = args.at(0).toString(exec).toUInt32(&ok, false);
+    if (ok)
+        return toJS(exec, globalObject(), impl()->item(index));
+    return getNamedItems(exec, this, Identifier(exec, args.at(0).toString(exec)));
+}
+
+JSValue JSHTMLAllCollection::namedItem(ExecState* exec, const ArgList& args)
+{
+    return getNamedItems(exec, this, Identifier(exec, args.at(0).toString(exec)));
+}
+
+} // namespace WebCore
diff --git a/WebCore/bindings/js/JSHTMLCollectionCustom.cpp b/WebCore/bindings/js/JSHTMLCollectionCustom.cpp
index 8ffddf7..dd4ceaa 100644
--- a/WebCore/bindings/js/JSHTMLCollectionCustom.cpp
+++ b/WebCore/bindings/js/JSHTMLCollectionCustom.cpp
@@ -23,6 +23,7 @@
 #include "AtomicString.h"
 #include "HTMLCollection.h"
 #include "HTMLOptionsCollection.h"
+#include "HTMLAllCollection.h"
 #include "JSDOMBinding.h"
 #include "JSHTMLAllCollection.h"
 #include "JSHTMLOptionsCollection.h"
@@ -143,7 +144,6 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, HTMLCollection* c
             wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, HTMLOptionsCollection, collection);
             break;
         case DocAll:
-            typedef HTMLCollection HTMLAllCollection;
             wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, HTMLAllCollection, collection);
             break;
         default:
diff --git a/WebCore/bindings/js/JSHTMLDocumentCustom.cpp b/WebCore/bindings/js/JSHTMLDocumentCustom.cpp
index 0a3be1f..a65ca7c 100644
--- a/WebCore/bindings/js/JSHTMLDocumentCustom.cpp
+++ b/WebCore/bindings/js/JSHTMLDocumentCustom.cpp
@@ -28,6 +28,7 @@
 
 #include "CharacterNames.h"
 #include "Frame.h"
+#include "HTMLAllCollection.h"
 #include "HTMLBodyElement.h"
 #include "HTMLCollection.h"
 #include "HTMLDocument.h"
diff --git a/WebCore/bindings/scripts/CodeGeneratorJS.pm b/WebCore/bindings/scripts/CodeGeneratorJS.pm
index b846d10..d8367ac 100644
--- a/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -292,7 +292,7 @@ sub GenerateGetOwnPropertySlotBody
 
     my @getOwnPropertySlotImpl = ();
 
-    if ($interfaceName eq "NamedNodeMap" or $interfaceName eq "HTMLCollection") {
+    if ($interfaceName eq "NamedNodeMap" or $interfaceName eq "HTMLCollection" or $interfaceName eq "HTMLAllCollection") {
         push(@getOwnPropertySlotImpl, "    ${namespaceMaybe}JSValue proto = prototype();\n");
         push(@getOwnPropertySlotImpl, "    if (proto.isObject() && static_cast<${namespaceMaybe}JSObject*>(asObject(proto))->hasProperty(exec, propertyName))\n");
         push(@getOwnPropertySlotImpl, "        return false;\n\n");
@@ -369,7 +369,7 @@ sub GenerateGetOwnPropertyDescriptorBody
     
     my @getOwnPropertyDescriptorImpl = ();
     
-    if ($interfaceName eq "NamedNodeMap" or $interfaceName eq "HTMLCollection") {
+    if ($interfaceName eq "NamedNodeMap" or $interfaceName eq "HTMLCollection" or $interfaceName eq "HTMLAllCollection") {
         push(@getOwnPropertyDescriptorImpl, "    ${namespaceMaybe}JSValue proto = prototype();\n");
         push(@getOwnPropertyDescriptorImpl, "    if (proto.isObject() && static_cast<${namespaceMaybe}JSObject*>(asObject(proto))->hasProperty(exec, propertyName))\n");
         push(@getOwnPropertyDescriptorImpl, "        return false;\n\n");
@@ -658,6 +658,12 @@ sub GenerateHeader
     # Custom lookupSetter function
     push(@headerContent, "    virtual JSC::JSValue lookupSetter(JSC::ExecState*, const JSC::Identifier& propertyName);\n") if $dataNode->extendedAttributes->{"CustomLookupSetter"};
 
+    # Override toBoolean to return false for objects that want to 'MasqueradesAsUndefined'.
+    if ($dataNode->extendedAttributes->{"MasqueradesAsUndefined"}) {
+        push(@headerContent, "    virtual bool toBoolean(JSC::ExecState*) const { return false; };\n");
+        $structureFlags{"JSC::MasqueradesAsUndefined"} = 1;
+    }
+
     # Constructor object getter
     push(@headerContent, "    static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);\n") if $dataNode->extendedAttributes->{"GenerateConstructor"};
 
@@ -1702,7 +1708,7 @@ sub GenerateImplementation
             push(@implContent, "    return toJS(exec, thisObj->globalObject(), static_cast<$implClassName*>(thisObj->impl())->item(slot.index()));\n");
         }
         push(@implContent, "}\n");
-        if ($interfaceName eq "HTMLCollection") {
+        if ($interfaceName eq "HTMLCollection" or $interfaceName eq "HTMLAllCollection") {
             $implIncludes{"JSNode.h"} = 1;
             $implIncludes{"Node.h"} = 1;
         }
@@ -1713,7 +1719,7 @@ sub GenerateImplementation
         push(@implContent, "{\n");
         push(@implContent, "    return jsNumber(exec, static_cast<$implClassName*>(impl())->item(index));\n");
         push(@implContent, "}\n");
-        if ($interfaceName eq "HTMLCollection") {
+        if ($interfaceName eq "HTMLCollection" or $interfaceName eq "HTMLAllCollection") {
             $implIncludes{"JSNode.h"} = 1;
             $implIncludes{"Node.h"} = 1;
         }
diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp
index 78de69a..4eb44f7 100644
--- a/WebCore/dom/Document.cpp
+++ b/WebCore/dom/Document.cpp
@@ -58,6 +58,7 @@
 #include "FrameLoader.h"
 #include "FrameTree.h"
 #include "FrameView.h"
+#include "HTMLAllCollection.h"
 #include "HTMLAnchorElement.h"
 #include "HTMLBodyElement.h"
 #include "HTMLCanvasElement.h"
@@ -3998,9 +3999,9 @@ PassRefPtr<HTMLCollection> Document::anchors()
     return HTMLCollection::create(this, DocAnchors);
 }
 
-PassRefPtr<HTMLCollection> Document::all()
+PassRefPtr<HTMLAllCollection> Document::all()
 {
-    return HTMLCollection::create(this, DocAll);
+    return HTMLAllCollection::create(this);
 }
 
 PassRefPtr<HTMLCollection> Document::windowNamedItems(const String &name)
diff --git a/WebCore/dom/Document.h b/WebCore/dom/Document.h
index 61eea7b..0632be1 100644
--- a/WebCore/dom/Document.h
+++ b/WebCore/dom/Document.h
@@ -71,6 +71,7 @@ namespace WebCore {
     class HitTestRequest;
     class HTMLCanvasElement;
     class HTMLCollection;
+    class HTMLAllCollection;
     class HTMLDocument;
     class HTMLElement;
     class HTMLFormElement;
@@ -316,12 +317,13 @@ public:
     PassRefPtr<HTMLCollection> links();
     PassRefPtr<HTMLCollection> forms();
     PassRefPtr<HTMLCollection> anchors();
-    PassRefPtr<HTMLCollection> all();
     PassRefPtr<HTMLCollection> objects();
     PassRefPtr<HTMLCollection> scripts();
     PassRefPtr<HTMLCollection> windowNamedItems(const String& name);
     PassRefPtr<HTMLCollection> documentNamedItems(const String& name);
 
+    PassRefPtr<HTMLAllCollection> all();
+
     // Find first anchor with the given name.
     // First searches for an element with the given ID, but if that fails, then looks
     // for an anchor with the given name. ID matching is always case sensitive, but
diff --git a/WebCore/dom/HTMLAllCollection.idl b/WebCore/dom/HTMLAllCollection.idl
deleted file mode 100644
index dee365f..0000000
--- a/WebCore/dom/HTMLAllCollection.idl
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2008, 2009 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:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * 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.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
- * OWNER OR 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 html {
-
-    // This interface is used for undetectable HTMLCollections.
-    // An undetectable HTMLCollection behaves like an HTMLCollection
-    // when used, but the 'typeof' operator returns undefined and
-    // ToBoolean returns false.
-    interface HTMLAllCollection : HTMLCollection {
-    };
-
-}
diff --git a/WebCore/html/HTMLAllCollection.cpp b/WebCore/html/HTMLAllCollection.cpp
new file mode 100644
index 0000000..dbfed28
--- /dev/null
+++ b/WebCore/html/HTMLAllCollection.cpp
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2009 Apple 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. ``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
+ * 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 "HTMLAllCollection.h"
+
+#include "Node.h"
+
+namespace WebCore {
+
+PassRefPtr<HTMLAllCollection> HTMLAllCollection::create(PassRefPtr<Node> base)
+{
+    return adoptRef(new HTMLAllCollection(base));
+}
+
+HTMLAllCollection::HTMLAllCollection(PassRefPtr<Node> base)
+    : HTMLCollection(base, DocAll)
+{
+}
+
+HTMLAllCollection::~HTMLAllCollection()
+{
+}
+
+} // namespace WebCore
diff --git a/WebCore/html/HTMLAllCollection.h b/WebCore/html/HTMLAllCollection.h
new file mode 100644
index 0000000..1dd3ede
--- /dev/null
+++ b/WebCore/html/HTMLAllCollection.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2009 Apple 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. ``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
+ * 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 HTMLAllCollection_h
+#define HTMLAllCollection_h
+
+#include "HTMLCollection.h"
+
+namespace WebCore {
+
+class HTMLAllCollection : public HTMLCollection {
+public:
+    static PassRefPtr<HTMLAllCollection> create(PassRefPtr<Node>);
+    virtual ~HTMLAllCollection();
+
+private:
+    HTMLAllCollection(PassRefPtr<Node>);
+};
+
+} // namespace WebCore
+
+#endif // HTMLAllCollection_h
diff --git a/WebCore/html/HTMLAllCollection.idl b/WebCore/html/HTMLAllCollection.idl
new file mode 100644
index 0000000..1e13c09
--- /dev/null
+++ b/WebCore/html/HTMLAllCollection.idl
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2009 Apple 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. ``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
+ * 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 html {
+
+    interface [
+        GenerateConstructor,
+        HasIndexGetter,
+        HasNameGetter,
+        CustomCall,
+        CustomToJS,
+        MasqueradesAsUndefined
+    ] HTMLAllCollection {
+        readonly attribute unsigned long length;
+        [Custom] Node item(in unsigned long index);
+        [Custom] Node namedItem(in DOMString name);
+
+        // FIXME: This should return an HTMLAllCollection.
+        NodeList tags(in DOMString name);
+    };
+
+}
diff --git a/WebCore/html/HTMLCollection.h b/WebCore/html/HTMLCollection.h
index b04bcbc..eea1777 100644
--- a/WebCore/html/HTMLCollection.h
+++ b/WebCore/html/HTMLCollection.h
@@ -64,6 +64,7 @@ public:
 
 protected:
     HTMLCollection(PassRefPtr<Node> base, CollectionType, CollectionCache*);
+    HTMLCollection(PassRefPtr<Node> base, CollectionType);
 
     CollectionCache* info() const { return m_info; }
     void resetCollectionInfo() const;
@@ -71,8 +72,6 @@ protected:
     mutable bool m_idsDone; // for nextNamedItem()
 
 private:
-    HTMLCollection(PassRefPtr<Node> base, CollectionType);
-
     virtual Element* itemAfter(Element*) const;
     virtual unsigned calcLength() const;
     virtual void updateNameCache() const;
diff --git a/WebCore/html/HTMLCollection.idl b/WebCore/html/HTMLCollection.idl
index 1ba5ec7..45d1127 100644
--- a/WebCore/html/HTMLCollection.idl
+++ b/WebCore/html/HTMLCollection.idl
@@ -34,8 +34,9 @@ module html {
         [Custom] Node item(in unsigned long index);
         [Custom] Node namedItem(in DOMString name);
 
-        // Extensions
+#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
         NodeList tags(in DOMString name);
+#endif
     };
 
 }
diff --git a/WebCore/html/HTMLDocument.idl b/WebCore/html/HTMLDocument.idl
index 3dd7a07..d250741 100644
--- a/WebCore/html/HTMLDocument.idl
+++ b/WebCore/html/HTMLDocument.idl
@@ -39,7 +39,7 @@ module html {
 
 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
         // FIXME: This should eventually be available (if they are wanted) for all languages.
-                 attribute [Custom, Deletable] HTMLCollection all;
+                 attribute [Custom, Deletable] HTMLAllCollection all;
 #endif
 
         void clear();
diff --git a/WebCore/page/DOMWindow.idl b/WebCore/page/DOMWindow.idl
index e86ebc5..5addb83 100644
--- a/WebCore/page/DOMWindow.idl
+++ b/WebCore/page/DOMWindow.idl
@@ -426,6 +426,7 @@ module window {
         attribute HTMLUListElementConstructor HTMLUListElement;
 
         attribute HTMLCollectionConstructor HTMLCollection;
+        attribute HTMLAllCollectionConstructor HTMLAllCollection;
 
         attribute [CustomGetter] HTMLImageElementConstructor Image; // Usable with new operator
         attribute [CustomGetter] HTMLOptionElementConstructor Option; // Usable with new operator

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list