summaryrefslogtreecommitdiffstats
path: root/WebCore/html/HTMLFormElement.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-02-02 14:57:50 +0000
committerSteve Block <steveblock@google.com>2010-02-04 15:06:55 +0000
commitd0825bca7fe65beaee391d30da42e937db621564 (patch)
tree7461c49eb5844ffd1f35d1ba2c8b7584c1620823 /WebCore/html/HTMLFormElement.cpp
parent3db770bd97c5a59b6c7574ca80a39e5a51c1defd (diff)
downloadexternal_webkit-d0825bca7fe65beaee391d30da42e937db621564.zip
external_webkit-d0825bca7fe65beaee391d30da42e937db621564.tar.gz
external_webkit-d0825bca7fe65beaee391d30da42e937db621564.tar.bz2
Merge webkit.org at r54127 : Initial merge by git
Change-Id: Ib661abb595522f50ea406f72d3a0ce17f7193c82
Diffstat (limited to 'WebCore/html/HTMLFormElement.cpp')
-rw-r--r--WebCore/html/HTMLFormElement.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/WebCore/html/HTMLFormElement.cpp b/WebCore/html/HTMLFormElement.cpp
index ace0f2f..bf25bf6 100644
--- a/WebCore/html/HTMLFormElement.cpp
+++ b/WebCore/html/HTMLFormElement.cpp
@@ -26,6 +26,7 @@
#include "HTMLFormElement.h"
#include "CSSHelper.h"
+#include "Chrome.h"
#include "ChromeClient.h"
#include "Document.h"
#include "Event.h"
@@ -302,7 +303,7 @@ bool HTMLFormElement::prepareSubmit(Event* event)
m_insubmit = false;
if (m_doingsubmit)
- submit(event, true);
+ submit(event, true, false, NotSubmittedByJavaScript);
return m_doingsubmit;
}
@@ -329,7 +330,15 @@ static void transferMailtoPostFormDataToURL(RefPtr<FormData>& data, KURL& url, c
url.setQuery(query);
}
-void HTMLFormElement::submit(Event* event, bool activateSubmitButton, bool lockHistory)
+void HTMLFormElement::submit(Frame* javaScriptActiveFrame)
+{
+ if (javaScriptActiveFrame)
+ submit(0, false, !javaScriptActiveFrame->script()->anyPageIsProcessingUserGesture(), SubmittedByJavaScript);
+ else
+ submit(0, false, false, NotSubmittedByJavaScript);
+}
+
+void HTMLFormElement::submit(Event* event, bool activateSubmitButton, bool lockHistory, FormSubmissionTrigger formSubmissionTrigger)
{
FrameView* view = document()->view();
Frame* frame = document()->frame();
@@ -366,7 +375,7 @@ void HTMLFormElement::submit(Event* event, bool activateSubmitButton, bool lockH
}
}
- RefPtr<FormState> formState = FormState::create(this, formValues, frame);
+ RefPtr<FormState> formState = FormState::create(this, formValues, frame, formSubmissionTrigger);
if (needButtonActivation && firstSuccessfulSubmitButton)
firstSuccessfulSubmitButton->setActivatedSubmit(true);