2009-07-12 Nate Chapin <japhet@chromium.org>
authorbfulgham@webkit.org <bfulgham@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Jul 2009 04:07:52 +0000 (04:07 +0000)
committerbfulgham@webkit.org <bfulgham@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Jul 2009 04:07:52 +0000 (04:07 +0000)
        Reviewed by Dimitri Glazkov.

        Upstream UndetectableHTMLCollection.idl as HTMLAllCollection.idl.

        https://bugs.webkit.org/show_bug.cgi?id=27132

        * bindings/scripts/CodeGeneratorV8.pm:
        * bindings/v8/DOMObjectsInclude.h:
        * bindings/v8/DerivedSourcesAllInOne.cpp:
        * bindings/v8/V8DOMWrapper.cpp:
        (WebCore::V8DOMWrapper::getTemplate):
        (WebCore::V8DOMWrapper::instantiateV8Object):
        * bindings/v8/V8Index.cpp:
        * bindings/v8/V8Index.h:
        * dom/HTMLAllCollection.idl: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@45785 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/bindings/scripts/CodeGeneratorV8.pm
WebCore/bindings/v8/DOMObjectsInclude.h
WebCore/bindings/v8/DerivedSourcesAllInOne.cpp
WebCore/bindings/v8/V8DOMWrapper.cpp
WebCore/bindings/v8/V8Index.cpp
WebCore/bindings/v8/V8Index.h
WebCore/dom/HTMLAllCollection.idl [new file with mode: 0644]

index e8f54a9..9fe9b66 100644 (file)
@@ -1,3 +1,21 @@
+2009-07-12  Nate Chapin  <japhet@chromium.org>
+
+        Reviewed by Dimitri Glazkov.
+
+        Upstream UndetectableHTMLCollection.idl as HTMLAllCollection.idl.
+
+        https://bugs.webkit.org/show_bug.cgi?id=27132
+
+        * bindings/scripts/CodeGeneratorV8.pm:
+        * bindings/v8/DOMObjectsInclude.h:
+        * bindings/v8/DerivedSourcesAllInOne.cpp:
+        * bindings/v8/V8DOMWrapper.cpp:
+        (WebCore::V8DOMWrapper::getTemplate):
+        (WebCore::V8DOMWrapper::instantiateV8Object):
+        * bindings/v8/V8Index.cpp:
+        * bindings/v8/V8Index.h:
+        * dom/HTMLAllCollection.idl: Added.
+
 2009-07-12  Joseph Pecoraro  <joepeck02@gmail.com>
 
         Reviewed by Maciej Stachowiak.
index 3bad278..397d656 100644 (file)
@@ -234,7 +234,7 @@ sub AddClassForwardIfNeeded
 sub GetImplementationFileName
 {
     my $iface = shift;
-    return "HTMLCollection.h" if $iface eq "UndetectableHTMLCollection";
+    return "HTMLCollection.h" if $iface eq "HTMLAllCollection";
     return "Event.h" if $iface eq "DOMTimeStamp";
     return "NamedAttrMap.h" if $iface eq "NamedNodeMap";
     return "NameNodeList.h" if $iface eq "NodeList";
@@ -1560,7 +1560,7 @@ sub GenerateFunctionCallString()
 sub GetClassName
 {
     my $type = shift;
-    return "HTMLCollection" if $type eq "UndetectableHTMLCollection";
+    return "HTMLCollection" if $type eq "HTMLAllCollection";
     return $type;
 }
 
index 90deeab..2d5ee6f 100644 (file)
 namespace WebCore {
 
     // A helper class for undetectable document.all
-    class UndetectableHTMLCollection : public HTMLCollection {
+    class HTMLAllCollection : public HTMLCollection {
     };
 
 } // namespace WebCore
index 9bdfc74..849db0e 100644 (file)
@@ -79,6 +79,7 @@
 #include "bindings/V8File.cpp"
 #include "bindings/V8FileList.cpp"
 #include "bindings/V8History.cpp"
+#include "bindings/V8HTMLAllCollection.cpp"
 #include "bindings/V8HTMLAnchorElement.cpp"
 #include "bindings/V8HTMLAppletElement.cpp"
 #include "bindings/V8HTMLAreaElement.cpp"
 #include "bindings/V8TimeRanges.cpp"
 #include "bindings/V8TreeWalker.cpp"
 #include "bindings/V8UIEvent.cpp"
-#include "bindings/V8UndetectableHTMLCollection.cpp"
 #include "bindings/V8WebKitAnimationEvent.cpp"
 #include "bindings/V8WebKitCSSKeyframeRule.cpp"
 #include "bindings/V8WebKitCSSKeyframesRule.cpp"
index cb4e6d3..1614882 100644 (file)
@@ -229,7 +229,7 @@ v8::Persistent<v8::FunctionTemplate> V8DOMWrapper::getTemplate(V8ClassIndex::V8W
     case V8ClassIndex::WEBKITCSSTRANSFORMVALUE:
         setCollectionIndexedGetter<WebKitCSSTransformValue, CSSValue>(descriptor, V8ClassIndex::CSSVALUE);
         break;
-    case V8ClassIndex::UNDETECTABLEHTMLCOLLECTION:
+    case V8ClassIndex::HTMLALLCOLLECTION:
         descriptor->InstanceTemplate()->MarkAsUndetectable(); // fall through
     case V8ClassIndex::HTMLCOLLECTION:
         descriptor->InstanceTemplate()->SetNamedPropertyHandler(USE_NAMED_PROPERTY_GETTER(HTMLCollection));
@@ -684,7 +684,7 @@ v8::Local<v8::Object> V8DOMWrapper::instantiateV8Object(V8Proxy* proxy, V8ClassI
 {
     // Make a special case for document.all
     if (descriptorType == V8ClassIndex::HTMLCOLLECTION && static_cast<HTMLCollection*>(impl)->type() == DocAll)
-        descriptorType = V8ClassIndex::UNDETECTABLEHTMLCOLLECTION;
+        descriptorType = V8ClassIndex::HTMLALLCOLLECTION;
 
     if (!proxy)
         V8Proxy* proxy = V8Proxy::retrieve();
index 7772016..93740b6 100644 (file)
@@ -72,8 +72,8 @@
 #include "V8File.h"
 #include "V8FileList.h"
 #include "V8History.h"
+#include "V8HTMLAllCollection.h"
 #include "V8HTMLCanvasElement.h"
-#include "V8UndetectableHTMLCollection.h"
 #include "V8HTMLCollection.h"
 #include "V8HTMLDocument.h"
 #include "V8HTMLElement.h"
index b238d70..a890ff8 100644 (file)
@@ -308,7 +308,7 @@ typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)();
     V(FILE, File)                                                       \
     V(FILELIST, FileList)                                               \
     V(HISTORY, History)                                                 \
-    V(UNDETECTABLEHTMLCOLLECTION, UndetectableHTMLCollection)           \
+    V(HTMLALLCOLLECTION, HTMLAllCollection)                             \
     V(HTMLCOLLECTION, HTMLCollection)                                   \
     V(HTMLOPTIONSCOLLECTION, HTMLOptionsCollection)                     \
     V(IMAGEDATA, ImageData)                                             \
diff --git a/WebCore/dom/HTMLAllCollection.idl b/WebCore/dom/HTMLAllCollection.idl
new file mode 100644 (file)
index 0000000..dee365f
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * 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 {
+    };
+
+}