summaryrefslogtreecommitdiffstats
path: root/WebCore/html/FileInputType.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/html/FileInputType.cpp')
-rw-r--r--WebCore/html/FileInputType.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/WebCore/html/FileInputType.cpp b/WebCore/html/FileInputType.cpp
index d98d3b6..e9d0b5e 100644
--- a/WebCore/html/FileInputType.cpp
+++ b/WebCore/html/FileInputType.cpp
@@ -22,6 +22,7 @@
#include "config.h"
#include "FileInputType.h"
+#include "Event.h"
#include "File.h"
#include "FileList.h"
#include "FormDataList.h"
@@ -76,6 +77,15 @@ bool FileInputType::valueMissing(const String& value) const
return value.isEmpty();
}
+bool FileInputType::handleDOMActivateEvent(Event* event)
+{
+ if (element()->disabled() || !element()->renderer())
+ return false;
+ toRenderFileUploadControl(element()->renderer())->click();
+ event->setDefaultHandled();
+ return true;
+}
+
RenderObject* FileInputType::createRenderer(RenderArena* arena, RenderStyle*) const
{
return new (arena) RenderFileUploadControl(element());