diff options
Diffstat (limited to 'WebCore/bindings/js/JSHTMLCollectionCustom.cpp')
-rw-r--r-- | WebCore/bindings/js/JSHTMLCollectionCustom.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/WebCore/bindings/js/JSHTMLCollectionCustom.cpp b/WebCore/bindings/js/JSHTMLCollectionCustom.cpp index 3e98194..e9f12bf 100644 --- a/WebCore/bindings/js/JSHTMLCollectionCustom.cpp +++ b/WebCore/bindings/js/JSHTMLCollectionCustom.cpp @@ -35,7 +35,7 @@ using namespace JSC; namespace WebCore { -static JSValue* getNamedItems(ExecState* exec, HTMLCollection* impl, const Identifier& propertyName) +static JSValuePtr getNamedItems(ExecState* exec, HTMLCollection* impl, const Identifier& propertyName) { Vector<RefPtr<Node> > namedItems; impl->namedItems(propertyName, namedItems); @@ -51,7 +51,7 @@ static JSValue* getNamedItems(ExecState* exec, HTMLCollection* impl, const Ident // HTMLCollections are strange objects, they support both get and call, // so that document.forms.item(0) and document.forms(0) both work. -static JSValue* callHTMLCollection(ExecState* exec, JSObject* function, JSValue*, const ArgList& args) +static JSValuePtr callHTMLCollection(ExecState* exec, JSObject* function, JSValuePtr, const ArgList& args) { if (args.size() < 1) return jsUndefined(); @@ -64,7 +64,7 @@ static JSValue* callHTMLCollection(ExecState* exec, JSObject* function, JSValue* if (args.size() == 1) { // Support for document.all(<index>) etc. bool ok; - UString string = args.at(exec, 0)->toString(exec); + UString string = args.at(exec, 0).toString(exec); unsigned index = string.toUInt32(&ok, false); if (ok) return toJS(exec, collection->item(index)); @@ -75,8 +75,8 @@ static JSValue* callHTMLCollection(ExecState* exec, JSObject* function, JSValue* // The second arg, if set, is the index of the item we want bool ok; - UString string = args.at(exec, 0)->toString(exec); - unsigned index = args.at(exec, 1)->toString(exec).toUInt32(&ok, false); + UString string = args.at(exec, 0).toString(exec); + unsigned index = args.at(exec, 1).toString(exec).toUInt32(&ok, false); if (ok) { String pstr = string; Node* node = collection->namedItem(pstr); @@ -99,30 +99,30 @@ CallType JSHTMLCollection::getCallData(CallData& callData) bool JSHTMLCollection::canGetItemsForName(ExecState* exec, HTMLCollection* thisObj, const Identifier& propertyName) { - return !getNamedItems(exec, thisObj, propertyName)->isUndefined(); + return !getNamedItems(exec, thisObj, propertyName).isUndefined(); } -JSValue* JSHTMLCollection::nameGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot) +JSValuePtr JSHTMLCollection::nameGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot) { JSHTMLCollection* thisObj = static_cast<JSHTMLCollection*>(asObject(slot.slotBase())); return getNamedItems(exec, thisObj->impl(), propertyName); } -JSValue* JSHTMLCollection::item(ExecState* exec, const ArgList& args) +JSValuePtr JSHTMLCollection::item(ExecState* exec, const ArgList& args) { bool ok; - uint32_t index = args.at(exec, 0)->toString(exec).toUInt32(&ok, false); + uint32_t index = args.at(exec, 0).toString(exec).toUInt32(&ok, false); if (ok) return toJS(exec, impl()->item(index)); - return getNamedItems(exec, impl(), Identifier(exec, args.at(exec, 0)->toString(exec))); + return getNamedItems(exec, impl(), Identifier(exec, args.at(exec, 0).toString(exec))); } -JSValue* JSHTMLCollection::namedItem(ExecState* exec, const ArgList& args) +JSValuePtr JSHTMLCollection::namedItem(ExecState* exec, const ArgList& args) { - return getNamedItems(exec, impl(), Identifier(exec, args.at(exec, 0)->toString(exec))); + return getNamedItems(exec, impl(), Identifier(exec, args.at(exec, 0).toString(exec))); } -JSValue* toJS(ExecState* exec, HTMLCollection* collection) +JSValuePtr toJS(ExecState* exec, HTMLCollection* collection) { if (!collection) return jsNull(); |