summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/js/JSHTMLFormElementCustom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/js/JSHTMLFormElementCustom.cpp')
-rw-r--r--WebCore/bindings/js/JSHTMLFormElementCustom.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/WebCore/bindings/js/JSHTMLFormElementCustom.cpp b/WebCore/bindings/js/JSHTMLFormElementCustom.cpp
index 8bf543c..ffa2d57 100644
--- a/WebCore/bindings/js/JSHTMLFormElementCustom.cpp
+++ b/WebCore/bindings/js/JSHTMLFormElementCustom.cpp
@@ -45,7 +45,8 @@ bool JSHTMLFormElement::canGetItemsForName(ExecState*, HTMLFormElement* form, co
JSValue JSHTMLFormElement::nameGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot)
{
- HTMLFormElement* form = static_cast<HTMLFormElement*>(static_cast<JSHTMLElement*>(asObject(slot.slotBase()))->impl());
+ JSHTMLElement* jsForm = static_cast<JSHTMLFormElement*>(asObject(slot.slotBase()));
+ HTMLFormElement* form = static_cast<HTMLFormElement*>(jsForm->impl());
Vector<RefPtr<Node> > namedItems;
form->getNamedElements(propertyName, namedItems);
@@ -53,7 +54,7 @@ JSValue JSHTMLFormElement::nameGetter(ExecState* exec, const Identifier& propert
if (namedItems.size() == 1)
return toJS(exec, namedItems[0].get());
if (namedItems.size() > 1)
- return new (exec) JSNamedNodesCollection(exec, namedItems);
+ return new (exec) JSNamedNodesCollection(exec, jsForm->globalObject(), namedItems);
return jsUndefined();
}
@@ -62,7 +63,7 @@ JSValue JSHTMLFormElement::submit(ExecState* exec, const ArgList&)
Frame* activeFrame = asJSDOMWindow(exec->dynamicGlobalObject())->impl()->frame();
if (!activeFrame)
return jsUndefined();
- static_cast<HTMLFormElement*>(impl())->submit(0, false, !activeFrame->script()->anyPageIsProcessingUserGesture(), false);
+ static_cast<HTMLFormElement*>(impl())->submit(0, false, !activeFrame->script()->anyPageIsProcessingUserGesture());
return jsUndefined();
}