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/JSHTMLSelectElement.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/JSHTMLSelectElement.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/generated/JSHTMLSelectElement.cpp | 75 |
1 files changed, 67 insertions, 8 deletions
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLSelectElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLSelectElement.cpp index 794d24c..bd66528 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLSelectElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLSelectElement.cpp @@ -95,6 +95,7 @@ public: putDirect(exec->propertyNames().prototype, JSHTMLSelectElementPrototype::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; @@ -111,10 +112,17 @@ bool JSHTMLSelectElementConstructor::getOwnPropertySlot(ExecState* exec, const I return getStaticValueSlot<JSHTMLSelectElementConstructor, DOMObject>(exec, &JSHTMLSelectElementConstructorTable, this, propertyName, slot); } +bool JSHTMLSelectElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return getStaticValueDescriptor<JSHTMLSelectElementConstructor, DOMObject>(exec, &JSHTMLSelectElementConstructorTable, this, propertyName, descriptor); +} + /* Hash table for prototype */ -static const HashTableValue JSHTMLSelectElementPrototypeTableValues[5] = +static const HashTableValue JSHTMLSelectElementPrototypeTableValues[7] = { + { "checkValidity", DontDelete|Function, (intptr_t)jsHTMLSelectElementPrototypeFunctionCheckValidity, (intptr_t)0 }, + { "setCustomValidity", DontDelete|Function, (intptr_t)jsHTMLSelectElementPrototypeFunctionSetCustomValidity, (intptr_t)1 }, { "add", DontDelete|Function, (intptr_t)jsHTMLSelectElementPrototypeFunctionAdd, (intptr_t)2 }, { "remove", DontDelete|Function, (intptr_t)jsHTMLSelectElementPrototypeFunctionRemove, (intptr_t)0 }, { "item", DontDelete|Function, (intptr_t)jsHTMLSelectElementPrototypeFunctionItem, (intptr_t)1 }, @@ -126,7 +134,7 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLSelectElementPrototypeTable = #if ENABLE(PERFECT_HASH_SIZE) { 15, JSHTMLSelectElementPrototypeTableValues, 0 }; #else - { 9, 7, JSHTMLSelectElementPrototypeTableValues, 0 }; + { 16, 15, JSHTMLSelectElementPrototypeTableValues, 0 }; #endif const ClassInfo JSHTMLSelectElementPrototype::s_info = { "HTMLSelectElementPrototype", 0, &JSHTMLSelectElementPrototypeTable, 0 }; @@ -141,6 +149,11 @@ bool JSHTMLSelectElementPrototype::getOwnPropertySlot(ExecState* exec, const Ide return getStaticFunctionSlot<JSObject>(exec, &JSHTMLSelectElementPrototypeTable, this, propertyName, slot); } +bool JSHTMLSelectElementPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return getStaticFunctionDescriptor<JSObject>(exec, &JSHTMLSelectElementPrototypeTable, this, propertyName, descriptor); +} + const ClassInfo JSHTMLSelectElement::s_info = { "HTMLSelectElement", &JSHTMLElement::s_info, &JSHTMLSelectElementTable, 0 }; JSHTMLSelectElement::JSHTMLSelectElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLSelectElement> impl) @@ -169,6 +182,26 @@ bool JSHTMLSelectElement::getOwnPropertySlot(ExecState* exec, const Identifier& return getStaticValueSlot<JSHTMLSelectElement, Base>(exec, &JSHTMLSelectElementTable, this, propertyName, slot); } +bool JSHTMLSelectElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + const HashEntry* entry = JSHTMLSelectElementTable.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<HTMLSelectElement*>(impl())->length()) { + PropertySlot slot; + slot.setCustomIndex(this, index, indexGetter); + descriptor.setDescriptor(slot.getValue(exec, propertyName), DontDelete); + return true; + } + return getStaticValueDescriptor<JSHTMLSelectElement, Base>(exec, &JSHTMLSelectElementTable, this, propertyName, descriptor); +} + bool JSHTMLSelectElement::getOwnPropertySlot(ExecState* exec, unsigned propertyName, PropertySlot& slot) { if (propertyName < static_cast<HTMLSelectElement*>(impl())->length()) { @@ -354,11 +387,11 @@ void setJSHTMLSelectElementSize(ExecState* exec, JSObject* thisObject, JSValue v imp->setSize(value.toInt32(exec)); } -void JSHTMLSelectElement::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) +void JSHTMLSelectElement::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) { for (unsigned i = 0; i < static_cast<HTMLSelectElement*>(impl())->length(); ++i) propertyNames.add(Identifier::from(exec, i)); - Base::getPropertyNames(exec, propertyNames); + Base::getOwnPropertyNames(exec, propertyNames); } JSValue JSHTMLSelectElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) @@ -366,10 +399,36 @@ JSValue JSHTMLSelectElement::getConstructor(ExecState* exec, JSGlobalObject* glo return getDOMConstructor<JSHTMLSelectElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } +JSValue JSC_HOST_CALL jsHTMLSelectElementPrototypeFunctionCheckValidity(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.inherits(&JSHTMLSelectElement::s_info)) + return throwError(exec, TypeError); + JSHTMLSelectElement* castedThisObj = static_cast<JSHTMLSelectElement*>(asObject(thisValue)); + HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThisObj->impl()); + + + JSC::JSValue result = jsBoolean(imp->checkValidity()); + return result; +} + +JSValue JSC_HOST_CALL jsHTMLSelectElementPrototypeFunctionSetCustomValidity(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.inherits(&JSHTMLSelectElement::s_info)) + return throwError(exec, TypeError); + JSHTMLSelectElement* castedThisObj = static_cast<JSHTMLSelectElement*>(asObject(thisValue)); + HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThisObj->impl()); + const UString& error = valueToStringWithUndefinedOrNullCheck(exec, args.at(0)); + + imp->setCustomValidity(error); + return jsUndefined(); +} + JSValue JSC_HOST_CALL jsHTMLSelectElementPrototypeFunctionAdd(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); - if (!thisValue.isObject(&JSHTMLSelectElement::s_info)) + if (!thisValue.inherits(&JSHTMLSelectElement::s_info)) return throwError(exec, TypeError); JSHTMLSelectElement* castedThisObj = static_cast<JSHTMLSelectElement*>(asObject(thisValue)); HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThisObj->impl()); @@ -385,7 +444,7 @@ JSValue JSC_HOST_CALL jsHTMLSelectElementPrototypeFunctionAdd(ExecState* exec, J JSValue JSC_HOST_CALL jsHTMLSelectElementPrototypeFunctionRemove(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); - if (!thisValue.isObject(&JSHTMLSelectElement::s_info)) + if (!thisValue.inherits(&JSHTMLSelectElement::s_info)) return throwError(exec, TypeError); JSHTMLSelectElement* castedThisObj = static_cast<JSHTMLSelectElement*>(asObject(thisValue)); return castedThisObj->remove(exec, args); @@ -394,7 +453,7 @@ JSValue JSC_HOST_CALL jsHTMLSelectElementPrototypeFunctionRemove(ExecState* exec JSValue JSC_HOST_CALL jsHTMLSelectElementPrototypeFunctionItem(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); - if (!thisValue.isObject(&JSHTMLSelectElement::s_info)) + if (!thisValue.inherits(&JSHTMLSelectElement::s_info)) return throwError(exec, TypeError); JSHTMLSelectElement* castedThisObj = static_cast<JSHTMLSelectElement*>(asObject(thisValue)); HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThisObj->impl()); @@ -412,7 +471,7 @@ JSValue JSC_HOST_CALL jsHTMLSelectElementPrototypeFunctionItem(ExecState* exec, JSValue JSC_HOST_CALL jsHTMLSelectElementPrototypeFunctionNamedItem(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); - if (!thisValue.isObject(&JSHTMLSelectElement::s_info)) + if (!thisValue.inherits(&JSHTMLSelectElement::s_info)) return throwError(exec, TypeError); JSHTMLSelectElement* castedThisObj = static_cast<JSHTMLSelectElement*>(asObject(thisValue)); HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThisObj->impl()); |