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/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);
+    };
+
+}