<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[19940] trunk</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/19940">19940</a></dd>
<dt>Author</dt> <dd>antti</dd>
<dt>Date</dt> <dd>2007-03-01 23:59:15 -0800 (Thu, 01 Mar 2007)</dd>
</dl>
<h3>Log Message</h3>
<pre>LayoutTests:
Reviewed by Maciej.
HTTP layout test for http://bugs.webkit.org/show_bug.cgi?id=12690
REGRESSION: can not log in to bank of america with TOT webkit
<rdar://problem/4990044>
also for
http://bugs.webkit.org/show_bug.cgi?id=12604
http://bugs.webkit.org/show_bug.cgi?id=12020
* http/tests/misc/multiple-submit-expected.txt: Added.
* http/tests/misc/multiple-submit.html: Added.
* http/tests/misc/resources/post-echo-and-notify-done.cgi: Added.
WebCore:
Reviewed by Maciej.
Fix http://bugs.webkit.org/show_bug.cgi?id=12690
REGRESSION: can not log in to bank of america with TOT webkit
<rdar://problem/4990044>
and http://bugs.webkit.org/show_bug.cgi?id=12604
REGRESSION: After closing the "Would you like to save password" sheet, the form fails
to submit automatically at http://www.mac.com/WebObjects/HomePage.woa
<rdar://problem/4871752>
and http://bugs.webkit.org/show_bug.cgi?id=12020
REGRESSION: Flickr uploading broken
<rdar://problem/4928662>
Turn protection against multiple forms submission back on. This approach is buggy
but it is way better than not having it at all. Not protecting against this
breaks number of major sites.
* bridge/mac/WebCoreAXObject.mm:
(-[WebCoreAXObject accessibilityPerformAction:]):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::resetMultipleFormSubmissionProtection):
(WebCore::FrameLoader::submitForm):
(WebCore::FrameLoader::receivedMainResourceError):
* loader/FrameLoader.h:
* page/EventHandler.cpp:
(WebCore::EventHandler::keyEvent):
* page/Frame.cpp:
(WebCore::Frame::setView):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::mouseDown):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCorebridgemacWebCoreAXObjectmm">trunk/WebCore/bridge/mac/WebCoreAXObject.mm</a></li>
<li><a href="#trunkWebCoreloaderFrameLoadercpp">trunk/WebCore/loader/FrameLoader.cpp</a></li>
<li><a href="#trunkWebCoreloaderFrameLoaderh">trunk/WebCore/loader/FrameLoader.h</a></li>
<li><a href="#trunkWebCorepageEventHandlercpp">trunk/WebCore/page/EventHandler.cpp</a></li>
<li><a href="#trunkWebCorepageFramecpp">trunk/WebCore/page/Frame.cpp</a></li>
<li><a href="#trunkWebCorepagemacEventHandlerMacmm">trunk/WebCore/page/mac/EventHandlerMac.mm</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestshttptestsmiscmultiplesubmitexpectedtxt">trunk/LayoutTests/http/tests/misc/multiple-submit-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsmiscmultiplesubmithtml">trunk/LayoutTests/http/tests/misc/multiple-submit.html</a></li>
<li><a href="#trunkLayoutTestshttptestsmiscresourcespostechoandnotifydonecgi">trunk/LayoutTests/http/tests/misc/resources/post-echo-and-notify-done.cgi</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (19939 => 19940)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2007-03-02 06:35:37 UTC (rev 19939)
+++ trunk/LayoutTests/ChangeLog        2007-03-02 07:59:15 UTC (rev 19940)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2007-03-01 Antti Koivisto <antti@apple.com>
+
+ Reviewed by Maciej.
+
+ HTTP layout test for http://bugs.webkit.org/show_bug.cgi?id=12690
+ REGRESSION: can not log in to bank of america with TOT webkit
+ <rdar://problem/4990044>
+
+ also for
+ http://bugs.webkit.org/show_bug.cgi?id=12604
+ http://bugs.webkit.org/show_bug.cgi?id=12020
+
+ * http/tests/misc/multiple-submit-expected.txt: Added.
+ * http/tests/misc/multiple-submit.html: Added.
+ * http/tests/misc/resources/post-echo-and-notify-done.cgi: Added.
+
</ins><span class="cx"> 2007-03-01 Kevin McCullough <kmccullough@apple.com>
</span><span class="cx">
</span><span class="cx"> Reviewed by Adam.
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsmiscmultiplesubmitexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/misc/multiple-submit-expected.txt (0 => 19940)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/misc/multiple-submit-expected.txt         (rev 0)
+++ trunk/LayoutTests/http/tests/misc/multiple-submit-expected.txt        2007-03-02 07:59:15 UTC (rev 19940)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+submitted=form2
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsmiscmultiplesubmithtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/misc/multiple-submit.html (0 => 19940)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/misc/multiple-submit.html         (rev 0)
+++ trunk/LayoutTests/http/tests/misc/multiple-submit.html        2007-03-02 07:59:15 UTC (rev 19940)
</span><span class="lines">@@ -0,0 +1,23 @@
</span><ins>+<form name=f action='resources/post-echo-and-notify-done.cgi' method=post>
+<input id=sub type=submit onclick='return clickf();'>
+<input id=val type=hidden name=submitted value='form1'>
+</form>
+
+<form name=f2 action='resources/post-echo-and-notify-done.cgi' method=post>
+<input id=val type=hidden name=submitted value='form2'>
+</form>
+
+<script>
+function clickf()
+{
+ document.f2.submit();
+ return true;
+}
+
+if (window.layoutTestController) {
+ layoutTestController.waitUntilDone();
+ layoutTestController.dumpAsText();
+}
+
+setTimeout(function() { document.getElementById('sub').click(); }, 0);
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsmiscresourcespostechoandnotifydonecgi"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/misc/resources/post-echo-and-notify-done.cgi (0 => 19940)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/misc/resources/post-echo-and-notify-done.cgi         (rev 0)
+++ trunk/LayoutTests/http/tests/misc/resources/post-echo-and-notify-done.cgi        2007-03-02 07:59:15 UTC (rev 19940)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+#!/usr/bin/perl -w
+
+print "Content-type: text/html\n\n";
+
+if ($ENV{'REQUEST_METHOD'} eq "POST") {
+ read(STDIN, $request, $ENV{'CONTENT_LENGTH'})
+ || die "Could not get query\n";
+ print $request;
+ print "<script>if (window.layoutTestController) layoutTestController.notifyDone();</script>";
+} else {
+ print "Wrong method: " . $ENV{'REQUEST_METHOD'} . "\n";
+}
</ins><span class="cx">Property changes on: trunk/LayoutTests/http/tests/misc/resources/post-echo-and-notify-done.cgi
</span><span class="cx">___________________________________________________________________
</span><span class="cx">Name: svn:executable
</span><span class="cx"> + *
</span></span></pre></div>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (19939 => 19940)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2007-03-02 06:35:37 UTC (rev 19939)
+++ trunk/WebCore/ChangeLog        2007-03-02 07:59:15 UTC (rev 19940)
</span><span class="lines">@@ -1,3 +1,38 @@
</span><ins>+2007-03-01 Antti Koivisto <antti@apple.com>
+
+ Reviewed by Maciej.
+
+ Fix http://bugs.webkit.org/show_bug.cgi?id=12690
+ REGRESSION: can not log in to bank of america with TOT webkit
+ <rdar://problem/4990044>
+
+ and http://bugs.webkit.org/show_bug.cgi?id=12604
+ REGRESSION: After closing the "Would you like to save password" sheet, the form fails
+ to submit automatically at http://www.mac.com/WebObjects/HomePage.woa
+ <rdar://problem/4871752>
+
+ and http://bugs.webkit.org/show_bug.cgi?id=12020
+ REGRESSION: Flickr uploading broken
+ <rdar://problem/4928662>
+
+ Turn protection against multiple forms submission back on. This approach is buggy
+ but it is way better than not having it at all. Not protecting against this
+ breaks number of major sites.
+
+ * bridge/mac/WebCoreAXObject.mm:
+ (-[WebCoreAXObject accessibilityPerformAction:]):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::resetMultipleFormSubmissionProtection):
+ (WebCore::FrameLoader::submitForm):
+ (WebCore::FrameLoader::receivedMainResourceError):
+ * loader/FrameLoader.h:
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::keyEvent):
+ * page/Frame.cpp:
+ (WebCore::Frame::setView):
+ * page/mac/EventHandlerMac.mm:
+ (WebCore::EventHandler::mouseDown):
+
</ins><span class="cx"> 2007-03-01 Kevin McCullough <kmccullough@apple.com>
</span><span class="cx">
</span><span class="cx"> Reviewed by Adam.
</span></span></pre></div>
<a id="trunkWebCorebridgemacWebCoreAXObjectmm"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/bridge/mac/WebCoreAXObject.mm (19939 => 19940)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/bridge/mac/WebCoreAXObject.mm        2007-03-02 06:35:37 UTC (rev 19939)
+++ trunk/WebCore/bridge/mac/WebCoreAXObject.mm        2007-03-02 07:59:15 UTC (rev 19940)
</span><span class="lines">@@ -887,10 +887,8 @@
</span><span class="cx"> Element* actionElement = [self actionElement];
</span><span class="cx"> if (!actionElement)
</span><span class="cx"> return;
</span><del>-#ifdef MULTIPLE_FORM_SUBMISSION_PROTECTION
</del><span class="cx"> if (Frame* f = actionElement->document()->frame())
</span><span class="cx"> f->loader()->resetMultipleFormSubmissionProtection();
</span><del>-#endif
</del><span class="cx"> actionElement->accessKeyAction(true);
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkWebCoreloaderFrameLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/loader/FrameLoader.cpp (19939 => 19940)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/loader/FrameLoader.cpp        2007-03-02 06:35:37 UTC (rev 19939)
+++ trunk/WebCore/loader/FrameLoader.cpp        2007-03-02 07:59:15 UTC (rev 19940)
</span><span class="lines">@@ -1464,7 +1464,6 @@
</span><span class="cx"> return true; // If JavaScript is disabled, a user gesture must have initiated the navigation
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#ifdef MULTIPLE_FORM_SUBMISSION_PROTECTION
</del><span class="cx"> void FrameLoader::didNotOpenURL(const KURL& URL)
</span><span class="cx"> {
</span><span class="cx"> if (m_submittedFormURL == URL)
</span><span class="lines">@@ -1475,7 +1474,6 @@
</span><span class="cx"> {
</span><span class="cx"> m_submittedFormURL = KURL();
</span><span class="cx"> }
</span><del>-#endif
</del><span class="cx">
</span><span class="cx"> void FrameLoader::setEncoding(const String& name, bool userChosen)
</span><span class="cx"> {
</span><span class="lines">@@ -2729,7 +2727,6 @@
</span><span class="cx">
</span><span class="cx"> void FrameLoader::submitForm(const FrameLoadRequest& request, Event* event)
</span><span class="cx"> {
</span><del>-#ifdef MULTIPLE_FORM_SUBMISSION_PROTECTION
</del><span class="cx"> // FIXME: We'd like to remove this altogether and fix the multiple form submission issue another way.
</span><span class="cx"> // We do not want to submit more than one form from the same page,
</span><span class="cx"> // nor do we want to submit a single form more than once.
</span><span class="lines">@@ -2746,7 +2743,6 @@
</span><span class="cx"> return;
</span><span class="cx"> m_submittedFormURL = request.resourceRequest().url();
</span><span class="cx"> }
</span><del>-#endif
</del><span class="cx">
</span><span class="cx"> // FIXME: Why do we always pass true for userGesture?
</span><span class="cx"> load(request, true, event, m_formAboutToBeSubmitted.get(), m_formValuesAboutToBeSubmitted);
</span><span class="lines">@@ -3038,10 +3034,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (m_state == FrameStateProvisional) {
</span><del>-#ifdef MULTIPLE_FORM_SUBMISSION_PROTECTION
</del><span class="cx"> KURL failedURL = m_provisionalDocumentLoader->originalRequestCopy().url();
</span><span class="cx"> didNotOpenURL(failedURL);
</span><del>-#endif
</del><ins>+
</ins><span class="cx"> // We might have made a page cache item, but now we're bailing out due to an error before we ever
</span><span class="cx"> // transitioned to the new page (before WebFrameState == commit). The goal here is to restore any state
</span><span class="cx"> // so that the existing view (that wenever got far enough to replace) can continue being used.
</span></span></pre></div>
<a id="trunkWebCoreloaderFrameLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/loader/FrameLoader.h (19939 => 19940)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/loader/FrameLoader.h        2007-03-02 06:35:37 UTC (rev 19939)
+++ trunk/WebCore/loader/FrameLoader.h        2007-03-02 07:59:15 UTC (rev 19940)
</span><span class="lines">@@ -338,10 +338,8 @@
</span><span class="cx">
</span><span class="cx"> bool userGestureHint();
</span><span class="cx">
</span><del>-#ifdef MULTIPLE_FORM_SUBMISSION_PROTECTION
</del><span class="cx"> void resetMultipleFormSubmissionProtection();
</span><span class="cx"> void didNotOpenURL(const KURL&);
</span><del>-#endif
</del><span class="cx">
</span><span class="cx"> void addData(const char* bytes, int length);
</span><span class="cx">
</span><span class="lines">@@ -579,9 +577,7 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<HTMLFormElement> m_formAboutToBeSubmitted;
</span><span class="cx"> HashMap<String, String> m_formValuesAboutToBeSubmitted;
</span><del>-#ifdef MULTIPLE_FORM_SUBMISSION_PROTECTION
</del><span class="cx"> KURL m_submittedFormURL;
</span><del>-#endif
</del><span class="cx">
</span><span class="cx"> Timer<FrameLoader> m_redirectionTimer;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkWebCorepageEventHandlercpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/page/EventHandler.cpp (19939 => 19940)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/page/EventHandler.cpp        2007-03-02 06:35:37 UTC (rev 19939)
+++ trunk/WebCore/page/EventHandler.cpp        2007-03-02 07:59:15 UTC (rev 19940)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> #include "FloatPoint.h"
</span><span class="cx"> #include "FocusController.h"
</span><span class="cx"> #include "Frame.h"
</span><ins>+#include "FrameLoader.h"
</ins><span class="cx"> #include "FrameTree.h"
</span><span class="cx"> #include "FrameView.h"
</span><span class="cx"> #include "HitTestRequest.h"
</span><span class="lines">@@ -1257,10 +1258,8 @@
</span><span class="cx"> if (!node)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>-#ifdef MULTIPLE_FORM_SUBMISSION_PROTECTION
</del><span class="cx"> if (!keyEvent.isKeyUp())
</span><del>- loader()->resetMultipleFormSubmissionProtection();
-#endif
</del><ins>+ m_frame->loader()->resetMultipleFormSubmissionProtection();
</ins><span class="cx">
</span><span class="cx"> result = !node->dispatchKeyEvent(keyEvent);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkWebCorepageFramecpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/page/Frame.cpp (19939 => 19940)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/page/Frame.cpp        2007-03-02 06:35:37 UTC (rev 19939)
+++ trunk/WebCore/page/Frame.cpp        2007-03-02 07:59:15 UTC (rev 19940)
</span><span class="lines">@@ -275,12 +275,10 @@
</span><span class="cx">
</span><span class="cx"> d->m_view = view;
</span><span class="cx">
</span><del>-#ifdef MULTIPLE_FORM_SUBMISSION_PROTECTION
</del><span class="cx"> // Only one form submission is allowed per view of a part.
</span><span class="cx"> // Since this part may be getting reused as a result of being
</span><span class="cx"> // pulled from the back/forward cache, reset this flag.
</span><span class="cx"> loader()->resetMultipleFormSubmissionProtection();
</span><del>-#endif
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> KJSProxy *Frame::scriptProxy()
</span></span></pre></div>
<a id="trunkWebCorepagemacEventHandlerMacmm"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/page/mac/EventHandlerMac.mm (19939 => 19940)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/page/mac/EventHandlerMac.mm        2007-03-02 06:35:37 UTC (rev 19939)
+++ trunk/WebCore/page/mac/EventHandlerMac.mm        2007-03-02 07:59:15 UTC (rev 19940)
</span><span class="lines">@@ -455,9 +455,9 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> BEGIN_BLOCK_OBJC_EXCEPTIONS;
</span><del>-#ifdef MULTIPLE_FORM_SUBMISSION_PROTECTION
</del><ins>+
</ins><span class="cx"> m_frame->loader()->resetMultipleFormSubmissionProtection();
</span><del>-#endif
</del><ins>+
</ins><span class="cx"> m_mouseDownView = nil;
</span><span class="cx"> dragState().m_dragSrc = 0;
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>