Changeset 51985 in webkit
- Timestamp:
- Dec 11, 2009 7:21:55 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r51982 r51985 1 2009-12-11 Benjamin Poulain <benjamin.poulain@nokia.com> 2 3 Reviewed by Darin Adler. 4 5 The values of RuntimeArray are not enumerable 6 https://bugs.webkit.org/show_bug.cgi?id=29005 7 8 The indices of RuntimeArray should be enumerated like for a regular array. 9 10 * platform/mac/fast/dom/wrapper-classes-objc-expected.txt: 11 * platform/mac/fast/dom/wrapper-classes-objc.html: 12 1 13 2009-12-11 Simon Hausmann <hausmann@webkit.org> 2 14 -
trunk/LayoutTests/platform/mac/fast/dom/wrapper-classes-objc-expected.txt
r48715 r51985 193 193 PASS typeof objCObjectOfClass('WebScriptObject') is 'object' 194 194 PASS objCObjectOfClass('NSArray') instanceof Array is true 195 PASS concatenateArray(objCArrayOfString()) is 'onetwothree' 195 196 -
trunk/LayoutTests/platform/mac/fast/dom/wrapper-classes-objc.html
r48715 r51985 33 33 return "only works under DumpRenderTree"; 34 34 return objCController.objectOfClass(name); 35 } 36 37 function objCArrayOfString() 38 { 39 if (!window.objCController) 40 return "only works under DumpRenderTree"; 41 return objCController.arrayOfString(); 42 } 43 44 function concatenateArray(array) 45 { 46 var result = ''; 47 for (i in array) 48 result += array[i]; 49 return result; 35 50 } 36 51 … … 273 288 shouldBeTrue("objCObjectOfClass('NSArray') instanceof Array"); 274 289 290 shouldBe("concatenateArray(objCArrayOfString())", "'onetwothree'"); 291 275 292 // Not yet tested: 276 293 -
trunk/WebCore/ChangeLog
r51983 r51985 1 2009-12-11 Benjamin Poulain <benjamin.poulain@nokia.com> 2 3 Reviewed by Darin Adler. 4 5 The values of RuntimeArray are not enumerable 6 https://bugs.webkit.org/show_bug.cgi?id=29005 7 8 The indices of RuntimeArray should be enumerated like for a regular array. 9 10 * bridge/runtime_array.cpp: 11 (JSC::RuntimeArray::getOwnPropertyNames): 12 * bridge/runtime_array.h: 13 1 14 2009-12-11 Andreas Kling <andreas.kling@nokia.com> 2 15 -
trunk/WebCore/bridge/runtime_array.cpp
r48715 r51985 29 29 #include <runtime/ArrayPrototype.h> 30 30 #include <runtime/Error.h> 31 #include <runtime/PropertyNameArray.h> 31 32 #include "JSDOMBinding.h" 32 33 … … 55 56 RuntimeArray* thisObj = static_cast<RuntimeArray*>(asObject(slot.slotBase())); 56 57 return thisObj->getConcreteArray()->valueAt(exec, slot.index()); 58 } 59 60 void RuntimeArray::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) 61 { 62 unsigned length = getLength(); 63 for (unsigned i = 0; i < length; ++i) 64 propertyNames.add(Identifier::from(exec, i)); 65 66 JSObject::getOwnPropertyNames(exec, propertyNames); 57 67 } 58 68 -
trunk/WebCore/bridge/runtime_array.h
r49835 r51985 35 35 public: 36 36 RuntimeArray(ExecState*, Bindings::Array*); 37 37 38 virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&); 38 39 virtual bool getOwnPropertySlot(ExecState *, const Identifier&, PropertySlot&); 39 40 virtual bool getOwnPropertySlot(ExecState *, unsigned, PropertySlot&); -
trunk/WebKitTools/ChangeLog
r51972 r51985 1 2009-12-11 Benjamin Poulain <benjamin.poulain@nokia.com> 2 3 Reviewed by Darin Adler. 4 5 The values of RuntimeArray are not enumerable 6 https://bugs.webkit.org/show_bug.cgi?id=29005 7 8 * DumpRenderTree/mac/ObjCController.m: 9 (+[ObjCController isSelectorExcludedFromWebScript:]): 10 (+[ObjCController webScriptNameForSelector:]): 11 (-[ObjCController arrayOfString]): 12 1 13 2009-12-10 Eric Seidel <eric@webkit.org> 2 14 -
trunk/WebKitTools/DumpRenderTree/mac/ObjCController.m
r48715 r51985 59 59 || aSelector == @selector(classNameOf:) 60 60 || aSelector == @selector(objectOfClass:) 61 || aSelector == @selector(arrayOfString) 61 62 || aSelector == @selector(identityIsEqual::) 62 63 || aSelector == @selector(longLongRoundTrip:) … … 78 79 if (aSelector == @selector(objectOfClass:)) 79 80 return @"objectOfClass"; 81 if (aSelector == @selector(arrayOfString)) 82 return @"arrayOfString"; 80 83 if (aSelector == @selector(identityIsEqual::)) 81 84 return @"identityIsEqual"; … … 123 126 } 124 127 128 - (NSArray *)arrayOfString 129 { 130 NSString *strings[3]; 131 strings[0] = @"one"; 132 strings[1] = @"two"; 133 strings[2] = @"three"; 134 NSArray *array = [NSArray arrayWithObjects:strings count:3]; 135 return array; 136 } 137 125 138 - (BOOL)identityIsEqual:(WebScriptObject *)a :(WebScriptObject *)b 126 139 {
Note: See TracChangeset
for help on using the changeset viewer.