summaryrefslogtreecommitdiffstats
path: root/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2009-09-28 13:49:05 +0100
committerBen Murdoch <benm@google.com>2009-09-28 15:13:58 +0100
commitb3dd806a1bdd3101bd82696ed615e8ffe2091a2e (patch)
tree7dbcd321f15efa44cecf38bbbdef8c57401e006f /WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
parent992afbebfb735ec2dd52b4166c22ab55827d88ed (diff)
downloadexternal_webkit-b3dd806a1bdd3101bd82696ed615e8ffe2091a2e.zip
external_webkit-b3dd806a1bdd3101bd82696ed615e8ffe2091a2e.tar.gz
external_webkit-b3dd806a1bdd3101bd82696ed615e8ffe2091a2e.tar.bz2
Fix the multiple form submission bug. (Bug 2098417).
Change-Id: I4eb188f6b4826f394a08c72c71f920cc212b2653
Diffstat (limited to 'WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp')
-rw-r--r--WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
index 71d5048..c567c66 100644
--- a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
+++ b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
@@ -467,16 +467,21 @@ void FrameLoaderClientAndroid::dispatchDecidePolicyForMIMEType(FramePolicyFuncti
}
void FrameLoaderClientAndroid::dispatchDecidePolicyForNewWindowAction(FramePolicyFunction func,
- const NavigationAction&, const ResourceRequest& request,
+ const NavigationAction& action, const ResourceRequest& request,
PassRefPtr<FormState> formState, const String& frameName) {
ASSERT(m_frame);
ASSERT(func);
if (!func)
return;
+
if (request.isNull()) {
(m_frame->loader()->*func)(PolicyIgnore);
return;
}
+
+ if (action.type() == NavigationTypeFormSubmitted || action.type() == NavigationTypeFormResubmitted)
+ m_frame->loader()->resetMultipleFormSubmissionProtection();
+
// If we get to this point it means that a link has a target that was not
// found by the frame tree. Instead of creating a new frame, return the
// current frame in dispatchCreatePage.
@@ -505,6 +510,12 @@ void FrameLoaderClientAndroid::dispatchDecidePolicyForNavigationAction(FramePoli
(m_frame->loader()->*func)(PolicyIgnore);
return;
}
+
+ // Reset multiple form submission protection. If this is a resubmission, we check with the
+ // user and reset the protection if they choose to resubmit the form (see WebCoreFrameBridge.cpp)
+ if (action.type() == NavigationTypeFormSubmitted)
+ m_frame->loader()->resetMultipleFormSubmissionProtection();
+
if (action.type() == NavigationTypeFormResubmitted) {
m_webFrame->decidePolicyForFormResubmission(func);
return;