diff options
author | Frans Englich <frans.englich@nokia.com> | 2009-09-23 13:16:51 (GMT) |
---|---|---|
committer | Frans Englich <frans.englich@nokia.com> | 2009-09-23 13:16:51 (GMT) |
commit | 902ceabbca3cd3f3a06180aba64b0f81b3f1dba4 (patch) | |
tree | 64efeee683cd31c2a0f7511fecc3c124c91249fe /src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.cpp | |
parent | 9161598b9cb374889ca6c69831c035c1eaa4d56e (diff) | |
parent | bbcef4e4b596324aeda80e0aa7d313c586454740 (diff) | |
download | Qt-902ceabbca3cd3f3a06180aba64b0f81b3f1dba4.zip Qt-902ceabbca3cd3f3a06180aba64b0f81b3f1dba4.tar.gz Qt-902ceabbca3cd3f3a06180aba64b0f81b3f1dba4.tar.bz2 |
Merge commit 'qt/4.6' into mmfphonon
Conflicts:
demos/embedded/fluidlauncher/config_s60/config.xml
demos/embedded/fluidlauncher/fluidlauncher.pro
src/corelib/io/io.pri
src/gui/kernel/qapplication_s60.cpp
src/gui/kernel/qwidget_s60.cpp
src/s60installs/qt_libs.pro
Diffstat (limited to 'src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.cpp | 53 |
1 files changed, 47 insertions, 6 deletions
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.cpp index de01068..b93fb61 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.cpp @@ -77,6 +77,7 @@ public: putDirect(exec->propertyNames().prototype, JSHTMLCollectionPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); + virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); virtual const ClassInfo* classInfo() const { return &s_info; } static const ClassInfo s_info; @@ -93,6 +94,11 @@ bool JSHTMLCollectionConstructor::getOwnPropertySlot(ExecState* exec, const Iden return getStaticValueSlot<JSHTMLCollectionConstructor, DOMObject>(exec, &JSHTMLCollectionConstructorTable, this, propertyName, slot); } +bool JSHTMLCollectionConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return getStaticValueDescriptor<JSHTMLCollectionConstructor, DOMObject>(exec, &JSHTMLCollectionConstructorTable, this, propertyName, descriptor); +} + /* Hash table for prototype */ static const HashTableValue JSHTMLCollectionPrototypeTableValues[4] = @@ -122,6 +128,11 @@ bool JSHTMLCollectionPrototype::getOwnPropertySlot(ExecState* exec, const Identi return getStaticFunctionSlot<JSObject>(exec, &JSHTMLCollectionPrototypeTable, this, propertyName, slot); } +bool JSHTMLCollectionPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return getStaticFunctionDescriptor<JSObject>(exec, &JSHTMLCollectionPrototypeTable, this, propertyName, descriptor); +} + const ClassInfo JSHTMLCollection::s_info = { "HTMLCollection", 0, &JSHTMLCollectionTable, 0 }; JSHTMLCollection::JSHTMLCollection(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLCollection> impl) @@ -164,6 +175,36 @@ bool JSHTMLCollection::getOwnPropertySlot(ExecState* exec, const Identifier& pro return getStaticValueSlot<JSHTMLCollection, Base>(exec, &JSHTMLCollectionTable, this, propertyName, slot); } +bool JSHTMLCollection::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + JSValue proto = prototype(); + if (proto.isObject() && static_cast<JSObject*>(asObject(proto))->hasProperty(exec, propertyName)) + return false; + + const HashEntry* entry = JSHTMLCollectionTable.entry(exec, propertyName); + if (entry) { + PropertySlot slot; + slot.setCustom(this, entry->propertyGetter()); + descriptor.setDescriptor(slot.getValue(exec, propertyName), entry->attributes()); + return true; + } + bool ok; + unsigned index = propertyName.toUInt32(&ok, false); + if (ok && index < static_cast<HTMLCollection*>(impl())->length()) { + PropertySlot slot; + slot.setCustomIndex(this, index, indexGetter); + descriptor.setDescriptor(slot.getValue(exec, propertyName), DontDelete | ReadOnly); + return true; + } + if (canGetItemsForName(exec, static_cast<HTMLCollection*>(impl()), propertyName)) { + PropertySlot slot; + slot.setCustom(this, nameGetter); + descriptor.setDescriptor(slot.getValue(exec, propertyName), ReadOnly | DontDelete | DontEnum); + return true; + } + return getStaticValueDescriptor<JSHTMLCollection, Base>(exec, &JSHTMLCollectionTable, this, propertyName, descriptor); +} + bool JSHTMLCollection::getOwnPropertySlot(ExecState* exec, unsigned propertyName, PropertySlot& slot) { if (propertyName < static_cast<HTMLCollection*>(impl())->length()) { @@ -186,11 +227,11 @@ JSValue jsHTMLCollectionConstructor(ExecState* exec, const Identifier&, const Pr JSHTMLCollection* domObject = static_cast<JSHTMLCollection*>(asObject(slot.slotBase())); return JSHTMLCollection::getConstructor(exec, domObject->globalObject()); } -void JSHTMLCollection::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) +void JSHTMLCollection::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) { for (unsigned i = 0; i < static_cast<HTMLCollection*>(impl())->length(); ++i) propertyNames.add(Identifier::from(exec, i)); - Base::getPropertyNames(exec, propertyNames); + Base::getOwnPropertyNames(exec, propertyNames); } JSValue JSHTMLCollection::getConstructor(ExecState* exec, JSGlobalObject* globalObject) @@ -201,7 +242,7 @@ JSValue JSHTMLCollection::getConstructor(ExecState* exec, JSGlobalObject* global JSValue JSC_HOST_CALL jsHTMLCollectionPrototypeFunctionItem(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); - if (!thisValue.isObject(&JSHTMLCollection::s_info)) + if (!thisValue.inherits(&JSHTMLCollection::s_info)) return throwError(exec, TypeError); JSHTMLCollection* castedThisObj = static_cast<JSHTMLCollection*>(asObject(thisValue)); return castedThisObj->item(exec, args); @@ -210,7 +251,7 @@ JSValue JSC_HOST_CALL jsHTMLCollectionPrototypeFunctionItem(ExecState* exec, JSO JSValue JSC_HOST_CALL jsHTMLCollectionPrototypeFunctionNamedItem(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); - if (!thisValue.isObject(&JSHTMLCollection::s_info)) + if (!thisValue.inherits(&JSHTMLCollection::s_info)) return throwError(exec, TypeError); JSHTMLCollection* castedThisObj = static_cast<JSHTMLCollection*>(asObject(thisValue)); return castedThisObj->namedItem(exec, args); @@ -219,7 +260,7 @@ JSValue JSC_HOST_CALL jsHTMLCollectionPrototypeFunctionNamedItem(ExecState* exec JSValue JSC_HOST_CALL jsHTMLCollectionPrototypeFunctionTags(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); - if (!thisValue.isObject(&JSHTMLCollection::s_info)) + if (!thisValue.inherits(&JSHTMLCollection::s_info)) return throwError(exec, TypeError); JSHTMLCollection* castedThisObj = static_cast<JSHTMLCollection*>(asObject(thisValue)); HTMLCollection* imp = static_cast<HTMLCollection*>(castedThisObj->impl()); @@ -238,7 +279,7 @@ JSValue JSHTMLCollection::indexGetter(ExecState* exec, const Identifier&, const } HTMLCollection* toHTMLCollection(JSC::JSValue value) { - return value.isObject(&JSHTMLCollection::s_info) ? static_cast<JSHTMLCollection*>(asObject(value))->impl() : 0; + return value.inherits(&JSHTMLCollection::s_info) ? static_cast<JSHTMLCollection*>(asObject(value))->impl() : 0; } } |