summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLFormElementCustom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebCore/bindings/js/JSHTMLFormElementCustom.cpp')
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSHTMLFormElementCustom.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLFormElementCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLFormElementCustom.cpp
index 4e16cc5..8bf543c 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLFormElementCustom.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLFormElementCustom.cpp
@@ -26,8 +26,10 @@
#include "config.h"
#include "JSHTMLFormElement.h"
+#include "Frame.h"
#include "HTMLCollection.h"
#include "HTMLFormElement.h"
+#include "JSDOMWindowCustom.h"
#include "JSNamedNodesCollection.h"
using namespace JSC;
@@ -41,7 +43,7 @@ bool JSHTMLFormElement::canGetItemsForName(ExecState*, HTMLFormElement* form, co
return namedItems.size();
}
-JSValuePtr JSHTMLFormElement::nameGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot)
+JSValue JSHTMLFormElement::nameGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot)
{
HTMLFormElement* form = static_cast<HTMLFormElement*>(static_cast<JSHTMLElement*>(asObject(slot.slotBase()))->impl());
@@ -55,4 +57,13 @@ JSValuePtr JSHTMLFormElement::nameGetter(ExecState* exec, const Identifier& prop
return jsUndefined();
}
+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);
+ return jsUndefined();
+}
+
}