summaryrefslogtreecommitdiffstats
path: root/WebCore/html/SubmitInputType.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/html/SubmitInputType.cpp')
-rw-r--r--WebCore/html/SubmitInputType.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/WebCore/html/SubmitInputType.cpp b/WebCore/html/SubmitInputType.cpp
index 99c808e..2f7d97e 100644
--- a/WebCore/html/SubmitInputType.cpp
+++ b/WebCore/html/SubmitInputType.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "SubmitInputType.h"
+#include "Event.h"
#include "FormDataList.h"
#include "HTMLInputElement.h"
#include <wtf/PassOwnPtr.h>
@@ -60,4 +61,16 @@ bool SubmitInputType::supportsValidation() const
return false;
}
+bool SubmitInputType::handleDOMActivateEvent(Event* event)
+{
+ RefPtr<HTMLInputElement> element = this->element();
+ if (element->disabled() || !element->form())
+ return false;
+ element->setActivatedSubmit(true);
+ element->form()->prepareSubmit(event); // Event handlers can run.
+ element->setActivatedSubmit(false);
+ event->setDefaultHandled();
+ return true;
+}
+
} // namespace WebCore