summaryrefslogtreecommitdiffstats
path: root/WebCore/html/ResetInputType.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/html/ResetInputType.cpp')
-rw-r--r--WebCore/html/ResetInputType.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/WebCore/html/ResetInputType.cpp b/WebCore/html/ResetInputType.cpp
index 1db7592..b911dee 100644
--- a/WebCore/html/ResetInputType.cpp
+++ b/WebCore/html/ResetInputType.cpp
@@ -31,6 +31,8 @@
#include "config.h"
#include "ResetInputType.h"
+#include "Event.h"
+#include "HTMLInputElement.h"
#include <wtf/PassOwnPtr.h>
namespace WebCore {
@@ -50,4 +52,13 @@ bool ResetInputType::supportsValidation() const
return false;
}
+bool ResetInputType::handleDOMActivateEvent(Event* event)
+{
+ if (element()->disabled() || !element()->form())
+ return false;
+ element()->form()->reset();
+ event->setDefaultHandled();
+ return true;
+}
+
} // namespace WebCore