[webkit-changes] cvs commit: LayoutTests/fast/forms
form-get-multipart-expected.txt form-get-multipart.html
form-get-multipart2-expected.txt form-get-multipart2.html
form-get-multipart3-expected.txt form-get-multipart3.html
form-post-urlencoded-expected.txt form-post-urlencoded.html
Alexey
ap at opensource.apple.com
Fri Jan 6 07:50:55 PST 2006
ap 06/01/06 07:50:54
Modified: . ChangeLog
khtml/html html_formimpl.cpp
. ChangeLog
Added: fast/forms form-get-multipart-expected.txt
form-get-multipart.html
form-get-multipart2-expected.txt
form-get-multipart2.html
form-get-multipart3-expected.txt
form-get-multipart3.html
form-post-urlencoded-expected.txt
form-post-urlencoded.html
Log:
Reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5291
FORM multipart/form-data with GET method issue
Test cases:
* fast/forms/form-get-multipart.html
* fast/forms/form-get-multipart2.html
* fast/forms/form-get-multipart3.html
* fast/forms/form-post-urlencoded.html
* khtml/html/html_formimpl.cpp:
(DOM::HTMLFormElementImpl::submit):
Reset m_multipart to false if not posting.
(DOM::HTMLFormElementImpl::parseEnctype):
multipart/form-data doesn't imply POST method.
Revision Changes Path
1.94 +19 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -r1.93 -r1.94
--- ChangeLog 6 Jan 2006 14:35:24 -0000 1.93
+++ ChangeLog 6 Jan 2006 15:50:50 -0000 1.94
@@ -1,5 +1,24 @@
2006-01-06 Alexey Proskuryakov <ap at nypop.com>
+ Reviewed by Darin.
+
+ - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5291
+ FORM multipart/form-data with GET method issue
+
+ Test cases:
+ * fast/forms/form-get-multipart.html
+ * fast/forms/form-get-multipart2.html
+ * fast/forms/form-get-multipart3.html
+ * fast/forms/form-post-urlencoded.html
+
+ * khtml/html/html_formimpl.cpp:
+ (DOM::HTMLFormElementImpl::submit):
+ Reset m_multipart to false if not posting.
+ (DOM::HTMLFormElementImpl::parseEnctype):
+ multipart/form-data doesn't imply POST method.
+
+2006-01-06 Alexey Proskuryakov <ap at nypop.com>
+
Reviewed by Eric.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5792
1.221 +4 -1 WebCore/khtml/html/html_formimpl.cpp
Index: html_formimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_formimpl.cpp,v
retrieving revision 1.220
retrieving revision 1.221
diff -u -r1.220 -r1.221
--- html_formimpl.cpp 3 Jan 2006 22:02:28 -0000 1.220
+++ html_formimpl.cpp 6 Jan 2006 15:50:51 -0000 1.221
@@ -5,6 +5,7 @@
* (C) 1999 Antti Koivisto (koivisto at kde.org)
* (C) 2001 Dirk Mueller (mueller at kde.org)
* Copyright (C) 2004, 2005 Apple Computer, Inc.
+ * (C) 2006 Alexey Proskuryakov (ap at nypop.com)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -410,7 +411,6 @@
if(type.contains("multipart", false) || type.contains("form-data", false)) {
m_enctype = "multipart/form-data";
m_multipart = true;
- m_post = true;
} else if (type.contains("text", false) || type.contains("plain", false)) {
m_enctype = "text/plain";
m_multipart = false;
@@ -493,6 +493,9 @@
firstSuccessfulSubmitButton->setActivatedSubmit(true);
}
+ if (!m_post)
+ m_multipart = false;
+
FormData form_data;
if (formData(form_data)) {
if(m_post) {
1.231 +16 -0 LayoutTests/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/LayoutTests/ChangeLog,v
retrieving revision 1.230
retrieving revision 1.231
diff -u -r1.230 -r1.231
--- ChangeLog 6 Jan 2006 14:35:24 -0000 1.230
+++ ChangeLog 6 Jan 2006 15:50:52 -0000 1.231
@@ -1,5 +1,21 @@
2006-01-06 Alexey Proskuryakov <ap at nypop.com>
+ Reviewed by Darin.
+
+ - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=5291
+ FORM multipart/form-data with GET method issue
+
+ * fast/forms/form-get-multipart.html: Added.
+ * fast/forms/form-get-multipart-expected.txt: Added.
+ * fast/forms/form-get-multipart2.html: Added.
+ * fast/forms/form-get-multipart2-expected.txt: Added.
+ * fast/forms/form-get-multipart3.html: Added.
+ * fast/forms/form-get-multipart3-expected.txt: Added.
+ * fast/forms/form-post-urlencoded.html: Added.
+ * fast/forms/form-post-urlencoded-expected.txt: Added.
+
+2006-01-06 Alexey Proskuryakov <ap at nypop.com>
+
Reviewed by Eric.
- test for http://bugzilla.opendarwin.org/show_bug.cgi?id=5792
1.1 LayoutTests/fast/forms/form-get-multipart-expected.txt
Index: form-get-multipart-expected.txt
===================================================================
Success
1.1 LayoutTests/fast/forms/form-get-multipart.html
Index: form-get-multipart.html
===================================================================
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title>Regression test for bug 5291</title>
</head>
<body>
<form enctype="multipart/form-data" method="get" action="?" name=f>
<input type="hidden" name="hidden" value="I am hidden">
<input type="submit" value="press me">
</form>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
if (document.URL.substring(0, 4) == "file") {
if (document.URL.indexOf('?') == -1) {
document.f.submit();
} else {
if (document.URL.substring(document.URL.indexOf('?')+1, document.URL.length) == "hidden=I+am+hidden")
document.write("<p>Success</p>");
else
document.write("<p>Failure</p>");
if (window.layoutTestController)
layoutTestController.notifyDone();
}
} else {
document.write("<p>This test doesn't work directly from bugzilla, please save it to a local file first.</p>");
}
</script>
</body>
</html>
1.1 LayoutTests/fast/forms/form-get-multipart2-expected.txt
Index: form-get-multipart2-expected.txt
===================================================================
Success
1.1 LayoutTests/fast/forms/form-get-multipart2.html
Index: form-get-multipart2.html
===================================================================
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title>Regression test for bug 5291</title>
</head>
<body>
<form method="get" enctype="multipart/form-data" action="?" name=f>
<input type="hidden" name="hidden" value="I am hidden">
<input type="submit" value="press me">
</form>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
if (document.URL.substring(0, 4) == "file") {
if (document.URL.indexOf('?') == -1) {
document.f.submit();
} else {
if (document.URL.substring(document.URL.indexOf('?')+1, document.URL.length) == "hidden=I+am+hidden")
document.write("<p>Success</p>");
else
document.write("<p>Failure</p>");
if (window.layoutTestController)
layoutTestController.notifyDone();
}
} else {
document.write("<p>This test doesn't work directly from bugzilla, please save it to a local file first.</p>");
}
</script>
</body>
</html>
1.1 LayoutTests/fast/forms/form-get-multipart3-expected.txt
Index: form-get-multipart3-expected.txt
===================================================================
Success
1.1 LayoutTests/fast/forms/form-get-multipart3.html
Index: form-get-multipart3.html
===================================================================
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title>Regression test for bug 5291</title>
</head>
<body>
<form enctype="multipart/form-data" action="?" name=f>
<input type="hidden" name="hidden" value="I am hidden">
<input type="submit" value="press me">
</form>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
if (document.URL.substring(0, 4) == "file") {
if (document.URL.indexOf('?') == -1) {
document.f.submit();
} else {
if (document.URL.substring(document.URL.indexOf('?')+1, document.URL.length) == "hidden=I+am+hidden")
document.write("<p>Success</p>");
else
document.write("<p>Failure</p>");
if (window.layoutTestController)
layoutTestController.notifyDone();
}
} else {
document.write("<p>This test doesn't work directly from bugzilla, please save it to a local file first.</p>");
}
</script>
</body>
</html>
1.1 LayoutTests/fast/forms/form-post-urlencoded-expected.txt
Index: form-post-urlencoded-expected.txt
===================================================================
Success
1.1 LayoutTests/fast/forms/form-post-urlencoded.html
Index: form-post-urlencoded.html
===================================================================
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title>Regression test for bug 5291</title>
</head>
<body>
<form method="post" enctype="application/x-www-form-urlencoded" action="?" name=f>
<input type="hidden" name="hidden" value="I am hidden">
<input type="submit" value="press me">
</form>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
if (document.URL.substring(0, 4) == "file") {
if (document.URL.indexOf('?') == -1) {
document.f.submit();
} else {
if (document.URL.substring(document.URL.indexOf('?')+1, document.URL.length) == "")
document.write("<p>Success</p>");
else
document.write("<p>Failure</p>");
if (window.layoutTestController)
layoutTestController.notifyDone();
}
} else {
document.write("<p>This test doesn't work directly from bugzilla, please save it to a local file first.</p>");
}
</script>
</body>
</html>
More information about the webkit-changes
mailing list