[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Thu Apr 8 00:32:23 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit fc20527cfeb034f8ac14d20bcfff79249d58b804
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 11 15:21:55 2009 +0000

    2009-12-11  Benjamin Poulain  <benjamin.poulain at nokia.com>
    
            Reviewed by Darin Adler.
    
            The values of RuntimeArray are not enumerable
            https://bugs.webkit.org/show_bug.cgi?id=29005
    
            The indices of RuntimeArray should be enumerated like for a regular array.
    
            * platform/mac/fast/dom/wrapper-classes-objc-expected.txt:
            * platform/mac/fast/dom/wrapper-classes-objc.html:
    2009-12-11  Benjamin Poulain  <benjamin.poulain at nokia.com>
    
            Reviewed by Darin Adler.
    
            The values of RuntimeArray are not enumerable
            https://bugs.webkit.org/show_bug.cgi?id=29005
    
            The indices of RuntimeArray should be enumerated like for a regular array.
    
            * bridge/runtime_array.cpp:
            (JSC::RuntimeArray::getOwnPropertyNames):
            * bridge/runtime_array.h:
    2009-12-11  Benjamin Poulain  <benjamin.poulain at nokia.com>
    
            Reviewed by Darin Adler.
    
            The values of RuntimeArray are not enumerable
            https://bugs.webkit.org/show_bug.cgi?id=29005
    
            * DumpRenderTree/mac/ObjCController.m:
            (+[ObjCController isSelectorExcludedFromWebScript:]):
            (+[ObjCController webScriptNameForSelector:]):
            (-[ObjCController arrayOfString]):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51985 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index e19dd9c..ef3246f 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2009-12-11  Benjamin Poulain  <benjamin.poulain at nokia.com>
+
+        Reviewed by Darin Adler.
+
+        The values of RuntimeArray are not enumerable
+        https://bugs.webkit.org/show_bug.cgi?id=29005
+
+        The indices of RuntimeArray should be enumerated like for a regular array.
+
+        * platform/mac/fast/dom/wrapper-classes-objc-expected.txt:
+        * platform/mac/fast/dom/wrapper-classes-objc.html:
+
 2009-12-11  Simon Hausmann  <hausmann at webkit.org>
 
         Reviewed by Antti Koivisto.
diff --git a/LayoutTests/platform/mac/fast/dom/wrapper-classes-objc-expected.txt b/LayoutTests/platform/mac/fast/dom/wrapper-classes-objc-expected.txt
index 103cc6d..7820552 100644
--- a/LayoutTests/platform/mac/fast/dom/wrapper-classes-objc-expected.txt
+++ b/LayoutTests/platform/mac/fast/dom/wrapper-classes-objc-expected.txt
@@ -192,4 +192,5 @@ PASS typeof objCObjectOfClass('NSCFNumber') is 'number'
 PASS typeof objCObjectOfClass('NSCFString') is 'string'
 PASS typeof objCObjectOfClass('WebScriptObject') is 'object'
 PASS objCObjectOfClass('NSArray') instanceof Array is true
+PASS concatenateArray(objCArrayOfString()) is 'onetwothree'
 
diff --git a/LayoutTests/platform/mac/fast/dom/wrapper-classes-objc.html b/LayoutTests/platform/mac/fast/dom/wrapper-classes-objc.html
index c29c26d..0cdb755 100644
--- a/LayoutTests/platform/mac/fast/dom/wrapper-classes-objc.html
+++ b/LayoutTests/platform/mac/fast/dom/wrapper-classes-objc.html
@@ -34,6 +34,21 @@ function objCObjectOfClass(name)
     return objCController.objectOfClass(name);
 }
 
+function objCArrayOfString()
+{
+    if (!window.objCController)
+        return "only works under DumpRenderTree";
+    return objCController.arrayOfString();
+}
+
+function concatenateArray(array)
+{
+    var result = '';
+    for (i in array)
+        result += array[i];
+    return result;
+}
+
 function tagObjCWrapperClass(tagName)
 {
     return objCWrapperClass(document.createElement(tagName));
@@ -272,6 +287,8 @@ function runTest()
     shouldBe("typeof objCObjectOfClass('WebScriptObject')", "'object'");
     shouldBeTrue("objCObjectOfClass('NSArray') instanceof Array");
 
+    shouldBe("concatenateArray(objCArrayOfString())", "'onetwothree'");
+
     // Not yet tested:
 
     // CSSCharsetRule
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 162cbcd..4d07243 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2009-12-11  Benjamin Poulain  <benjamin.poulain at nokia.com>
+
+        Reviewed by Darin Adler.
+
+        The values of RuntimeArray are not enumerable
+        https://bugs.webkit.org/show_bug.cgi?id=29005
+
+        The indices of RuntimeArray should be enumerated like for a regular array.
+
+        * bridge/runtime_array.cpp:
+        (JSC::RuntimeArray::getOwnPropertyNames):
+        * bridge/runtime_array.h:
+
 2009-12-11  Andreas Kling  <andreas.kling at nokia.com>
 
         Reviewed by Simon Hausmann.
diff --git a/WebCore/bridge/runtime_array.cpp b/WebCore/bridge/runtime_array.cpp
index feadb07..cb027bf 100644
--- a/WebCore/bridge/runtime_array.cpp
+++ b/WebCore/bridge/runtime_array.cpp
@@ -28,6 +28,7 @@
 
 #include <runtime/ArrayPrototype.h>
 #include <runtime/Error.h>
+#include <runtime/PropertyNameArray.h>
 #include "JSDOMBinding.h"
 
 using namespace WebCore;
@@ -56,6 +57,15 @@ JSValue RuntimeArray::indexGetter(ExecState* exec, const Identifier&, const Prop
     return thisObj->getConcreteArray()->valueAt(exec, slot.index());
 }
 
+void RuntimeArray::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames)
+{
+    unsigned length = getLength();
+    for (unsigned i = 0; i < length; ++i)
+        propertyNames.add(Identifier::from(exec, i));
+
+    JSObject::getOwnPropertyNames(exec, propertyNames);
+}
+
 bool RuntimeArray::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
 {
     if (propertyName == exec->propertyNames().length) {
diff --git a/WebCore/bridge/runtime_array.h b/WebCore/bridge/runtime_array.h
index 1218b8c..99425ee 100644
--- a/WebCore/bridge/runtime_array.h
+++ b/WebCore/bridge/runtime_array.h
@@ -34,7 +34,8 @@ namespace JSC {
 class RuntimeArray : public JSObject {
 public:
     RuntimeArray(ExecState*, Bindings::Array*);
-    
+
+    virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&);
     virtual bool getOwnPropertySlot(ExecState *, const Identifier&, PropertySlot&);
     virtual bool getOwnPropertySlot(ExecState *, unsigned, PropertySlot&);
     virtual bool getOwnPropertyDescriptor(ExecState *, const Identifier&, PropertyDescriptor&);
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index c55009d..f2d6969 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,15 @@
+2009-12-11  Benjamin Poulain  <benjamin.poulain at nokia.com>
+
+        Reviewed by Darin Adler.
+
+        The values of RuntimeArray are not enumerable
+        https://bugs.webkit.org/show_bug.cgi?id=29005
+
+        * DumpRenderTree/mac/ObjCController.m:
+        (+[ObjCController isSelectorExcludedFromWebScript:]):
+        (+[ObjCController webScriptNameForSelector:]):
+        (-[ObjCController arrayOfString]):
+
 2009-12-10  Eric Seidel  <eric at webkit.org>
 
         No review, just updating unit tests to match recent checkins.
diff --git a/WebKitTools/DumpRenderTree/mac/ObjCController.m b/WebKitTools/DumpRenderTree/mac/ObjCController.m
index e0d663e..d7cc6a0 100644
--- a/WebKitTools/DumpRenderTree/mac/ObjCController.m
+++ b/WebKitTools/DumpRenderTree/mac/ObjCController.m
@@ -58,6 +58,7 @@ static void* runJavaScriptThread(void* arg)
     if (0
             || aSelector == @selector(classNameOf:)
             || aSelector == @selector(objectOfClass:)
+            || aSelector == @selector(arrayOfString)
             || aSelector == @selector(identityIsEqual::)
             || aSelector == @selector(longLongRoundTrip:)
             || aSelector == @selector(unsignedLongLongRoundTrip:)
@@ -77,6 +78,8 @@ static void* runJavaScriptThread(void* arg)
         return @"className";
     if (aSelector == @selector(objectOfClass:))
         return @"objectOfClass";
+    if (aSelector == @selector(arrayOfString))
+        return @"arrayOfString";
     if (aSelector == @selector(identityIsEqual::))
         return @"identityIsEqual";
     if (aSelector == @selector(longLongRoundTrip:))
@@ -122,6 +125,16 @@ static void* runJavaScriptThread(void* arg)
     return nil;
 }
 
+- (NSArray *)arrayOfString
+{
+    NSString *strings[3];
+    strings[0] = @"one";
+    strings[1] = @"two";
+    strings[2] = @"three";
+    NSArray *array = [NSArray arrayWithObjects:strings count:3];
+    return array;
+}
+
 - (BOOL)identityIsEqual:(WebScriptObject *)a :(WebScriptObject *)b
 {
     if ([a isKindOfClass:[NSString class]] && [b isKindOfClass:[NSString class]])

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list