Changeset 60967 in webkit
- Timestamp:
- Jun 10, 2010 11:53:20 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r60966 r60967 1 2010-06-09 Kenneth Russell <kbr@google.com> 2 3 Reviewed by Dimitri Glazkov. 4 5 Implement TypedArray BYTES_PER_ELEMENT 6 https://bugs.webkit.org/show_bug.cgi?id=39100 7 8 Implemented BYTES_PER_ELEMENT on all ArrayBufferView subclasses. 9 Required bug fixes to JSC bindings' custom constructors. Updated 10 fast/canvas/webgl/array-unit-tests.html to verify. Ran all WebGL 11 layout tests in Safari and Chromium. 12 13 * fast/canvas/webgl/array-unit-tests.html: 14 1 15 2010-06-10 Eric Seidel <eric@webkit.org> 2 16 -
trunk/LayoutTests/fast/canvas/webgl/array-unit-tests.html
r60902 r60967 174 174 try { 175 175 var len = 10; 176 assertEq('type.BYTES_PER_ELEMENT', elementSizeInBytes, type.BYTES_PER_ELEMENT); 176 177 var array = new type(len); 177 178 assert('array.buffer', array.buffer); 178 assertEq('array.byteOffset', array.byteOffset, 0);179 assertEq('array.length', array.length, len);180 assertEq('array.byteLength', array.byteLength, len * elementSizeInBytes);179 assertEq('array.byteOffset', 0, array.byteOffset); 180 assertEq('array.length', len, array.length); 181 assertEq('array.byteLength', len * elementSizeInBytes, array.byteLength); 181 182 array = new type(array.buffer, elementSizeInBytes, len - 1); 182 183 assert('array.buffer', array.buffer); 183 assertEq('array.byteOffset', array.byteOffset, elementSizeInBytes);184 assertEq('array.length', array.length, len - 1);185 assertEq('array.byteLength', array.byteLength, (len - 1) * elementSizeInBytes);184 assertEq('array.byteOffset', elementSizeInBytes, array.byteOffset); 185 assertEq('array.length', len - 1, array.length); 186 assertEq('array.byteLength', (len - 1) * elementSizeInBytes, array.byteLength); 186 187 pass(); 187 188 } catch (e) { -
trunk/WebCore/ChangeLog
r60966 r60967 1 2010-06-09 Kenneth Russell <kbr@google.com> 2 3 Reviewed by Dimitri Glazkov. 4 5 Implement TypedArray BYTES_PER_ELEMENT 6 https://bugs.webkit.org/show_bug.cgi?id=39100 7 8 Implemented BYTES_PER_ELEMENT on all ArrayBufferView subclasses. 9 Required bug fixes to JSC bindings' custom constructors. Updated 10 fast/canvas/webgl/array-unit-tests.html to verify. Ran all WebGL 11 layout tests in Safari and Chromium. 12 13 * bindings/js/JSFloat32ArrayConstructor.cpp: 14 (WebCore::JSFloat32ArrayConstructor::JSFloat32ArrayConstructor): 15 (WebCore::JSFloat32ArrayConstructor::getOwnPropertySlot): 16 (WebCore::JSFloat32ArrayConstructor::getOwnPropertyDescriptor): 17 * bindings/js/JSFloat32ArrayConstructor.h: 18 (WebCore::JSFloat32ArrayConstructor::createStructure): 19 * bindings/js/JSInt16ArrayConstructor.cpp: 20 (WebCore::JSInt16ArrayConstructor::JSInt16ArrayConstructor): 21 (WebCore::JSInt16ArrayConstructor::getOwnPropertySlot): 22 (WebCore::JSInt16ArrayConstructor::getOwnPropertyDescriptor): 23 * bindings/js/JSInt16ArrayConstructor.h: 24 (WebCore::JSInt16ArrayConstructor::createStructure): 25 * bindings/js/JSInt32ArrayConstructor.cpp: 26 (WebCore::JSInt32ArrayConstructor::JSInt32ArrayConstructor): 27 (WebCore::JSInt32ArrayConstructor::getOwnPropertySlot): 28 (WebCore::JSInt32ArrayConstructor::getOwnPropertyDescriptor): 29 * bindings/js/JSInt32ArrayConstructor.h: 30 (WebCore::JSInt32ArrayConstructor::createStructure): 31 * bindings/js/JSInt8ArrayConstructor.cpp: 32 (WebCore::JSInt8ArrayConstructor::JSInt8ArrayConstructor): 33 (WebCore::JSInt8ArrayConstructor::getOwnPropertySlot): 34 (WebCore::JSInt8ArrayConstructor::getOwnPropertyDescriptor): 35 * bindings/js/JSInt8ArrayConstructor.h: 36 (WebCore::JSInt8ArrayConstructor::createStructure): 37 * bindings/js/JSUint16ArrayConstructor.cpp: 38 (WebCore::JSUint16ArrayConstructor::JSUint16ArrayConstructor): 39 (WebCore::JSUint16ArrayConstructor::getOwnPropertySlot): 40 (WebCore::JSUint16ArrayConstructor::getOwnPropertyDescriptor): 41 * bindings/js/JSUint16ArrayConstructor.h: 42 (WebCore::JSUint16ArrayConstructor::createStructure): 43 * bindings/js/JSUint32ArrayConstructor.cpp: 44 (WebCore::JSUint32ArrayConstructor::JSUint32ArrayConstructor): 45 (WebCore::JSUint32ArrayConstructor::getOwnPropertySlot): 46 (WebCore::JSUint32ArrayConstructor::getOwnPropertyDescriptor): 47 * bindings/js/JSUint32ArrayConstructor.h: 48 (WebCore::JSUint32ArrayConstructor::createStructure): 49 * bindings/js/JSUint8ArrayConstructor.cpp: 50 (WebCore::JSUint8ArrayConstructor::JSUint8ArrayConstructor): 51 (WebCore::JSUint8ArrayConstructor::getOwnPropertySlot): 52 (WebCore::JSUint8ArrayConstructor::getOwnPropertyDescriptor): 53 * bindings/js/JSUint8ArrayConstructor.h: 54 (WebCore::JSUint8ArrayConstructor::createStructure): 55 * html/canvas/Float32Array.idl: 56 * html/canvas/Int16Array.idl: 57 * html/canvas/Int32Array.idl: 58 * html/canvas/Int8Array.idl: 59 * html/canvas/Uint16Array.idl: 60 * html/canvas/Uint32Array.idl: 61 * html/canvas/Uint8Array.idl: 62 1 63 2010-06-10 Eric Seidel <eric@webkit.org> 2 64 -
trunk/WebCore/bindings/js/JSFloat32ArrayConstructor.cpp
r60902 r60967 46 46 : DOMConstructorObject(JSFloat32ArrayConstructor::createStructure(globalObject->objectPrototype()), globalObject) 47 47 { 48 putDirect(exec->propertyNames().prototype, JSFloat32ArrayPrototype::self(exec, globalObject), None); 49 putDirect(exec->propertyNames().length, jsNumber(exec, 2), ReadOnly|DontDelete|DontEnum); 48 putDirect(exec->propertyNames().prototype, JSFloat32ArrayPrototype::self(exec, globalObject), DontDelete | ReadOnly); 49 } 50 51 JSObject* JSFloat32ArrayConstructor::createPrototype(ExecState* exec, JSGlobalObject* globalObject) 52 { 53 return new (exec) JSFloat32ArrayPrototype(globalObject, JSFloat32ArrayPrototype::createStructure(globalObject->objectPrototype())); 54 } 55 56 bool JSFloat32ArrayConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) 57 { 58 return getStaticValueSlot<JSFloat32ArrayConstructor, DOMObject>(exec, JSFloat32ArrayPrototype::s_info.staticPropHashTable, this, propertyName, slot); 59 } 60 61 bool JSFloat32ArrayConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) 62 { 63 return getStaticValueDescriptor<JSFloat32ArrayConstructor, DOMObject>(exec, JSFloat32ArrayPrototype::s_info.staticPropHashTable, this, propertyName, descriptor); 50 64 } 51 65 -
trunk/WebCore/bindings/js/JSFloat32ArrayConstructor.h
r60902 r60967 33 33 34 34 class JSFloat32ArrayConstructor : public DOMConstructorObject { 35 typedef DOMConstructorObject Base; 35 36 public: 36 37 JSFloat32ArrayConstructor(JSC::ExecState*, JSDOMGlobalObject*); 38 static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); 39 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); 40 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&); 37 41 static const JSC::ClassInfo s_info; 42 43 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) 44 { 45 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); 46 } 38 47 39 48 private: 40 49 virtual JSC::ConstructType getConstructData(JSC::ConstructData&); 41 50 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } 51 protected: 52 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags; 42 53 }; 43 54 -
trunk/WebCore/bindings/js/JSInt16ArrayConstructor.cpp
r60708 r60967 47 47 : DOMConstructorObject(JSInt16ArrayConstructor::createStructure(globalObject->objectPrototype()), globalObject) 48 48 { 49 putDirect(exec->propertyNames().prototype, JSInt16ArrayPrototype::self(exec, globalObject), None); 50 putDirect(exec->propertyNames().length, jsNumber(exec, 2), ReadOnly|DontDelete|DontEnum); 49 putDirect(exec->propertyNames().prototype, JSInt16ArrayPrototype::self(exec, globalObject), DontDelete | ReadOnly); 50 } 51 52 JSObject* JSInt16ArrayConstructor::createPrototype(ExecState* exec, JSGlobalObject* globalObject) 53 { 54 return new (exec) JSInt16ArrayPrototype(globalObject, JSInt16ArrayPrototype::createStructure(globalObject->objectPrototype())); 55 } 56 57 bool JSInt16ArrayConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) 58 { 59 return getStaticValueSlot<JSInt16ArrayConstructor, DOMObject>(exec, JSInt16ArrayPrototype::s_info.staticPropHashTable, this, propertyName, slot); 60 } 61 62 bool JSInt16ArrayConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) 63 { 64 return getStaticValueDescriptor<JSInt16ArrayConstructor, DOMObject>(exec, JSInt16ArrayPrototype::s_info.staticPropHashTable, this, propertyName, descriptor); 51 65 } 52 66 -
trunk/WebCore/bindings/js/JSInt16ArrayConstructor.h
r59499 r60967 33 33 34 34 class JSInt16ArrayConstructor : public DOMConstructorObject { 35 typedef DOMConstructorObject Base; 35 36 public: 36 37 JSInt16ArrayConstructor(JSC::ExecState*, JSDOMGlobalObject*); 38 static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); 39 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); 40 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&); 37 41 static const JSC::ClassInfo s_info; 42 43 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) 44 { 45 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); 46 } 38 47 39 48 private: 40 49 virtual JSC::ConstructType getConstructData(JSC::ConstructData&); 41 50 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } 51 protected: 52 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags; 42 53 }; 43 54 -
trunk/WebCore/bindings/js/JSInt32ArrayConstructor.cpp
r60708 r60967 46 46 : DOMConstructorObject(JSInt32ArrayConstructor::createStructure(globalObject->objectPrototype()), globalObject) 47 47 { 48 putDirect(exec->propertyNames().prototype, JSInt32ArrayPrototype::self(exec, globalObject), None); 49 putDirect(exec->propertyNames().length, jsNumber(exec, 2), ReadOnly|DontDelete|DontEnum); 48 putDirect(exec->propertyNames().prototype, JSInt32ArrayPrototype::self(exec, globalObject), DontDelete | ReadOnly); 49 } 50 51 JSObject* JSInt32ArrayConstructor::createPrototype(ExecState* exec, JSGlobalObject* globalObject) 52 { 53 return new (exec) JSInt32ArrayPrototype(globalObject, JSInt32ArrayPrototype::createStructure(globalObject->objectPrototype())); 54 } 55 56 bool JSInt32ArrayConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) 57 { 58 return getStaticValueSlot<JSInt32ArrayConstructor, DOMObject>(exec, JSInt32ArrayPrototype::s_info.staticPropHashTable, this, propertyName, slot); 59 } 60 61 bool JSInt32ArrayConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) 62 { 63 return getStaticValueDescriptor<JSInt32ArrayConstructor, DOMObject>(exec, JSInt32ArrayPrototype::s_info.staticPropHashTable, this, propertyName, descriptor); 50 64 } 51 65 -
trunk/WebCore/bindings/js/JSInt32ArrayConstructor.h
r59499 r60967 33 33 34 34 class JSInt32ArrayConstructor : public DOMConstructorObject { 35 typedef DOMConstructorObject Base; 35 36 public: 36 37 JSInt32ArrayConstructor(JSC::ExecState*, JSDOMGlobalObject*); 38 static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); 39 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); 40 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&); 37 41 static const JSC::ClassInfo s_info; 42 43 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) 44 { 45 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); 46 } 38 47 39 48 private: 40 49 virtual JSC::ConstructType getConstructData(JSC::ConstructData&); 41 50 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } 51 protected: 52 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags; 42 53 }; 43 54 -
trunk/WebCore/bindings/js/JSInt8ArrayConstructor.cpp
r60708 r60967 46 46 : DOMConstructorObject(JSInt8ArrayConstructor::createStructure(globalObject->objectPrototype()), globalObject) 47 47 { 48 putDirect(exec->propertyNames().prototype, JSInt8ArrayPrototype::self(exec, globalObject), None); 49 putDirect(exec->propertyNames().length, jsNumber(exec, 2), ReadOnly|DontDelete|DontEnum); 48 putDirect(exec->propertyNames().prototype, JSInt8ArrayPrototype::self(exec, globalObject), DontDelete | ReadOnly); 49 } 50 51 JSObject* JSInt8ArrayConstructor::createPrototype(ExecState* exec, JSGlobalObject* globalObject) 52 { 53 return new (exec) JSInt8ArrayPrototype(globalObject, JSInt8ArrayPrototype::createStructure(globalObject->objectPrototype())); 54 } 55 56 bool JSInt8ArrayConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) 57 { 58 return getStaticValueSlot<JSInt8ArrayConstructor, DOMObject>(exec, JSInt8ArrayPrototype::s_info.staticPropHashTable, this, propertyName, slot); 59 } 60 61 bool JSInt8ArrayConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) 62 { 63 return getStaticValueDescriptor<JSInt8ArrayConstructor, DOMObject>(exec, JSInt8ArrayPrototype::s_info.staticPropHashTable, this, propertyName, descriptor); 50 64 } 51 65 -
trunk/WebCore/bindings/js/JSInt8ArrayConstructor.h
r59499 r60967 33 33 34 34 class JSInt8ArrayConstructor : public DOMConstructorObject { 35 typedef DOMConstructorObject Base; 35 36 public: 36 37 JSInt8ArrayConstructor(JSC::ExecState*, JSDOMGlobalObject*); 38 static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); 39 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); 40 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&); 37 41 static const JSC::ClassInfo s_info; 42 43 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) 44 { 45 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); 46 } 38 47 39 48 private: 40 49 virtual JSC::ConstructType getConstructData(JSC::ConstructData&); 41 50 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } 51 protected: 52 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags; 42 53 }; 43 54 -
trunk/WebCore/bindings/js/JSUint16ArrayConstructor.cpp
r60708 r60967 46 46 : DOMConstructorObject(JSUint16ArrayConstructor::createStructure(globalObject->objectPrototype()), globalObject) 47 47 { 48 putDirect(exec->propertyNames().prototype, JSUint16ArrayPrototype::self(exec, globalObject), None); 49 putDirect(exec->propertyNames().length, jsNumber(exec, 2), ReadOnly|DontDelete|DontEnum); 48 putDirect(exec->propertyNames().prototype, JSUint16ArrayPrototype::self(exec, globalObject), DontDelete | ReadOnly); 49 } 50 51 JSObject* JSUint16ArrayConstructor::createPrototype(ExecState* exec, JSGlobalObject* globalObject) 52 { 53 return new (exec) JSUint16ArrayPrototype(globalObject, JSUint16ArrayPrototype::createStructure(globalObject->objectPrototype())); 54 } 55 56 bool JSUint16ArrayConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) 57 { 58 return getStaticValueSlot<JSUint16ArrayConstructor, DOMObject>(exec, JSUint16ArrayPrototype::s_info.staticPropHashTable, this, propertyName, slot); 59 } 60 61 bool JSUint16ArrayConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) 62 { 63 return getStaticValueDescriptor<JSUint16ArrayConstructor, DOMObject>(exec, JSUint16ArrayPrototype::s_info.staticPropHashTable, this, propertyName, descriptor); 50 64 } 51 65 -
trunk/WebCore/bindings/js/JSUint16ArrayConstructor.h
r59499 r60967 33 33 34 34 class JSUint16ArrayConstructor : public DOMConstructorObject { 35 typedef DOMConstructorObject Base; 35 36 public: 36 37 JSUint16ArrayConstructor(JSC::ExecState*, JSDOMGlobalObject*); 38 static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); 39 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); 40 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&); 37 41 static const JSC::ClassInfo s_info; 42 43 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) 44 { 45 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); 46 } 38 47 39 48 private: 40 49 virtual JSC::ConstructType getConstructData(JSC::ConstructData&); 41 50 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } 51 protected: 52 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags; 42 53 }; 43 54 -
trunk/WebCore/bindings/js/JSUint32ArrayConstructor.cpp
r60708 r60967 46 46 : DOMConstructorObject(JSUint32ArrayConstructor::createStructure(globalObject->objectPrototype()), globalObject) 47 47 { 48 putDirect(exec->propertyNames().prototype, JSUint32ArrayPrototype::self(exec, globalObject), None); 49 putDirect(exec->propertyNames().length, jsNumber(exec, 2), ReadOnly|DontDelete|DontEnum); 48 putDirect(exec->propertyNames().prototype, JSUint32ArrayPrototype::self(exec, globalObject), DontDelete | ReadOnly); 49 } 50 51 JSObject* JSUint32ArrayConstructor::createPrototype(ExecState* exec, JSGlobalObject* globalObject) 52 { 53 return new (exec) JSUint32ArrayPrototype(globalObject, JSUint32ArrayPrototype::createStructure(globalObject->objectPrototype())); 54 } 55 56 bool JSUint32ArrayConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) 57 { 58 return getStaticValueSlot<JSUint32ArrayConstructor, DOMObject>(exec, JSUint32ArrayPrototype::s_info.staticPropHashTable, this, propertyName, slot); 59 } 60 61 bool JSUint32ArrayConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) 62 { 63 return getStaticValueDescriptor<JSUint32ArrayConstructor, DOMObject>(exec, JSUint32ArrayPrototype::s_info.staticPropHashTable, this, propertyName, descriptor); 50 64 } 51 65 -
trunk/WebCore/bindings/js/JSUint32ArrayConstructor.h
r59499 r60967 33 33 34 34 class JSUint32ArrayConstructor : public DOMConstructorObject { 35 typedef DOMConstructorObject Base; 35 36 public: 36 37 JSUint32ArrayConstructor(JSC::ExecState*, JSDOMGlobalObject*); 38 static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); 39 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); 40 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&); 37 41 static const JSC::ClassInfo s_info; 42 43 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) 44 { 45 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); 46 } 38 47 39 48 private: 40 49 virtual JSC::ConstructType getConstructData(JSC::ConstructData&); 41 50 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } 51 protected: 52 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags; 42 53 }; 43 54 -
trunk/WebCore/bindings/js/JSUint8ArrayConstructor.cpp
r60708 r60967 47 47 : DOMConstructorObject(JSUint8ArrayConstructor::createStructure(globalObject->objectPrototype()), globalObject) 48 48 { 49 putDirect(exec->propertyNames().prototype, JSUint8ArrayPrototype::self(exec, globalObject), None); 50 putDirect(exec->propertyNames().length, jsNumber(exec, 2), ReadOnly|DontDelete|DontEnum); 49 putDirect(exec->propertyNames().prototype, JSUint8ArrayPrototype::self(exec, globalObject), DontDelete | ReadOnly); 50 } 51 52 JSObject* JSUint8ArrayConstructor::createPrototype(ExecState* exec, JSGlobalObject* globalObject) 53 { 54 return new (exec) JSUint8ArrayPrototype(globalObject, JSUint8ArrayPrototype::createStructure(globalObject->objectPrototype())); 55 } 56 57 bool JSUint8ArrayConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) 58 { 59 return getStaticValueSlot<JSUint8ArrayConstructor, DOMObject>(exec, JSUint8ArrayPrototype::s_info.staticPropHashTable, this, propertyName, slot); 60 } 61 62 bool JSUint8ArrayConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) 63 { 64 return getStaticValueDescriptor<JSUint8ArrayConstructor, DOMObject>(exec, JSUint8ArrayPrototype::s_info.staticPropHashTable, this, propertyName, descriptor); 51 65 } 52 66 -
trunk/WebCore/bindings/js/JSUint8ArrayConstructor.h
r59499 r60967 33 33 34 34 class JSUint8ArrayConstructor : public DOMConstructorObject { 35 typedef DOMConstructorObject Base; 35 36 public: 36 37 JSUint8ArrayConstructor(JSC::ExecState*, JSDOMGlobalObject*); 38 static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); 39 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); 40 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&); 37 41 static const JSC::ClassInfo s_info; 42 43 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) 44 { 45 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); 46 } 38 47 39 48 private: 40 49 virtual JSC::ConstructType getConstructData(JSC::ConstructData&); 41 50 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } 51 protected: 52 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags; 42 53 }; 43 54 -
trunk/WebCore/html/canvas/Float32Array.idl
r60902 r60967 34 34 CustomToJS 35 35 ] Float32Array : ArrayBufferView { 36 const unsigned int BYTES_PER_ELEMENT = 4; 37 36 38 // void set(in Float32Array array, [Optional] in unsigned long offset); 37 39 // void set(in sequence<long> array, [Optional] in unsigned long offset); -
trunk/WebCore/html/canvas/Int16Array.idl
r59499 r60967 33 33 CustomToJS 34 34 ] Int16Array : ArrayBufferView { 35 const unsigned int BYTES_PER_ELEMENT = 2; 36 35 37 // void set(in Int16Array array, [Optional] in unsigned long offset); 36 38 // void set(in sequence<long> array, [Optional] in unsigned long offset); -
trunk/WebCore/html/canvas/Int32Array.idl
r59499 r60967 34 34 CustomToJS 35 35 ] Int32Array : ArrayBufferView { 36 const unsigned int BYTES_PER_ELEMENT = 4; 37 36 38 // void set(in Int32Array array, [Optional] in unsigned long offset); 37 39 // void set(in sequence<long> array, [Optional] in unsigned long offset); -
trunk/WebCore/html/canvas/Int8Array.idl
r59499 r60967 34 34 CustomToJS 35 35 ] Int8Array : ArrayBufferView { 36 const unsigned int BYTES_PER_ELEMENT = 1; 37 36 38 // void set(in Int8Array array, [Optional] in unsigned long offset); 37 39 // void set(in sequence<long> array, [Optional] in unsigned long offset); -
trunk/WebCore/html/canvas/Uint16Array.idl
r59499 r60967 34 34 CustomToJS 35 35 ] Uint16Array : ArrayBufferView { 36 const unsigned int BYTES_PER_ELEMENT = 2; 37 36 38 // void set(in Uint16Array array, [Optional] in unsigned long offset); 37 39 // void set(in sequence<long> array, [Optional] in unsigned long offset); -
trunk/WebCore/html/canvas/Uint32Array.idl
r59499 r60967 34 34 CustomToJS 35 35 ] Uint32Array : ArrayBufferView { 36 const unsigned int BYTES_PER_ELEMENT = 4; 37 36 38 // void set(in Uint32Array array, [Optional] in unsigned long offset); 37 39 // void set(in sequence<long> array, [Optional] in unsigned long offset); -
trunk/WebCore/html/canvas/Uint8Array.idl
r59499 r60967 34 34 CustomToJS 35 35 ] Uint8Array : ArrayBufferView { 36 const unsigned int BYTES_PER_ELEMENT = 1; 37 36 38 // void set(in Uint8Array array, [Optional] in unsigned long offset); 37 39 // void set(in sequence<long> array, [Optional] in unsigned long offset);
Note: See TracChangeset
for help on using the changeset viewer.