[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:19:28 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 908cf2a7d7c206a5451e8195f342bb63a85c97e7
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jan 13 17:38:40 2003 +0000
Reviewed by Ken.
- fixed 3143781 -- submitting the same form twice doesn't work properly
(example at directory.apple.com)
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::submitForm): Only run the "don't submit the same
form twice" logic when the form is one that affects the frame that the form is in.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index a80901e..6ad4158 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,13 @@
+2003-01-13 Darin Adler <darin at apple.com>
+
+ Reviewed by Ken.
+
+ - fixed 3143781 -- submitting the same form twice doesn't work properly
+ (example at directory.apple.com)
+
+ * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::submitForm): Only run the "don't submit the same
+ form twice" logic when the form is one that affects the frame that the form is in.
+
2003-01-12 Darin Adler <darin at apple.com>
* WebCorePrefix.h: Needed to touch this file since we now have plain C source (expat).
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index a80901e..6ad4158 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,13 @@
+2003-01-13 Darin Adler <darin at apple.com>
+
+ Reviewed by Ken.
+
+ - fixed 3143781 -- submitting the same form twice doesn't work properly
+ (example at directory.apple.com)
+
+ * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::submitForm): Only run the "don't submit the same
+ form twice" logic when the form is one that affects the frame that the form is in.
+
2003-01-12 Darin Adler <darin at apple.com>
* WebCorePrefix.h: Needed to touch this file since we now have plain C source (expat).
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index df0725b..4b657ab 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -183,22 +183,37 @@ void KWQKHTMLPart::openURLRequest(const KURL &url, const URLArgs &args)
void KWQKHTMLPart::submitForm(const KURL &url, const URLArgs &args)
{
- // we do not want to submit more than one form, nor do we want to submit a single form more than once
- // this flag prevents these from happening
- // note that the flag is reset in setView()
- // since this part may get reused if it is pulled from the b/f cache
- if (_formSubmittedFlag) {
- return;
+ WebCoreBridge *target = bridgeForFrameName(args.frameName);
+ KHTMLPart *targetPart = [target part];
+
+ // The form multi-submit logic here is only right when we are submitting a form that affects this frame.
+ // Eventually when we find a better fix we can remove this altogether.
+ bool willReplaceThisFrame = false;
+ for (KHTMLPart *p = this; p; p = p->parentPart()) {
+ if (p == targetPart) {
+ willReplaceThisFrame = true;
+ break;
+ }
+ }
+ if (willReplaceThisFrame) {
+ // We do not want to submit more than one form from the same page,
+ // nor do we want to submit a single form more than once.
+ // This flag prevents these from happening.
+ // Note that the flag is reset in setView()
+ // since this part may get reused if it is pulled from the b/f cache.
+ if (_formSubmittedFlag) {
+ return;
+ }
+ _formSubmittedFlag = true;
}
- _formSubmittedFlag = true;
if (!args.doPost()) {
- [bridgeForFrameName(args.frameName) loadURL:url.url().getNSString() reload:args.reload
+ [target loadURL:url.url().getNSString() reload:args.reload
triggeringEvent:_currentEvent isFormSubmission:YES];
} else {
QString contentType = args.contentType();
ASSERT(contentType.startsWith("Content-Type: "));
- [bridgeForFrameName(args.frameName) postWithURL:url.url().getNSString()
+ [target postWithURL:url.url().getNSString()
data:[NSData dataWithBytes:args.postData.data() length:args.postData.size()]
contentType:contentType.mid(14).getNSString() triggeringEvent:_currentEvent];
}
@@ -272,9 +287,9 @@ void KWQKHTMLPart::setView(KHTMLView *view, bool weOwnIt)
setWidget(view);
_ownsView = weOwnIt;
- // only one form submission is allowed per view of a part
- // since this part may be getting reused as a result of being
- // pulled from the back/forward cache, reset this flag
+ // Only one form submission is allowed per view of a part.
+ // Since this part may be getting reused as a result of being
+ // pulled from the back/forward cache, reset this flag.
_formSubmittedFlag = false;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list