[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.18-1-697-g2f78b87
eric at webkit.org
eric at webkit.org
Wed Jan 20 22:20:38 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit c269854c37b2a91435e606394f26fd81128f180b
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jan 12 11:48:02 2010 +0000
2010-01-12 Ben Murdoch <benm at google.com>
Reviewed by Darin Adler.
Form Reset : Press Back Button and Reset , TextareaElemnt is not set to Default Value
https://bugs.webkit.org/show_bug.cgi?id=31539
Added manual test: manual-tests/textarea-reset-default-value.html.
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::restoreFormControlState): set the value, rather than default value of a text area when restoring its state. This allows resetting a form with a textarea to work correctly after its state has been restored.
* manual-tests/resources/textarea-form-back-on-submit.html: Added.
* manual-tests/textarea-reset-default-value.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53132 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 7b0ee33..c8bbb80 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-01-12 Ben Murdoch <benm at google.com>
+
+ Reviewed by Darin Adler.
+
+ Form Reset : Press Back Button and Reset , TextareaElemnt is not set to Default Value
+ https://bugs.webkit.org/show_bug.cgi?id=31539
+
+ Added manual test: manual-tests/textarea-reset-default-value.html.
+
+ * html/HTMLTextAreaElement.cpp:
+ (WebCore::HTMLTextAreaElement::restoreFormControlState): set the value, rather than default value of a text area when restoring its state. This allows resetting a form with a textarea to work correctly after its state has been restored.
+ * manual-tests/resources/textarea-form-back-on-submit.html: Added.
+ * manual-tests/textarea-reset-default-value.html: Added.
+
2010-01-12 Simon Hausmann <simon.hausmann at nokia.com>
Reviewed by Holger Freyther.
diff --git a/WebCore/html/HTMLTextAreaElement.cpp b/WebCore/html/HTMLTextAreaElement.cpp
index 59a7a86..e5a0c1c 100644
--- a/WebCore/html/HTMLTextAreaElement.cpp
+++ b/WebCore/html/HTMLTextAreaElement.cpp
@@ -92,7 +92,7 @@ bool HTMLTextAreaElement::saveFormControlState(String& result) const
void HTMLTextAreaElement::restoreFormControlState(const String& state)
{
- setDefaultValue(state);
+ setValue(state);
}
void HTMLTextAreaElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
diff --git a/WebCore/manual-tests/resources/textarea-form-back-on-submit.html b/WebCore/manual-tests/resources/textarea-form-back-on-submit.html
new file mode 100644
index 0000000..2348e2d
--- /dev/null
+++ b/WebCore/manual-tests/resources/textarea-form-back-on-submit.html
@@ -0,0 +1,16 @@
+<html>
+<head>
+<title>Form with a textarea that goes back on submit</title>
+</head>
+<body>
+<form id="form" method="get" action="data:text/html,<body onload='history.back()'></body>">
+ <p>
+ <textarea name="text" rows="3" cols="10" id="textarea">123</textarea><br />
+ <br />
+ <input type="submit" />
+ <input type="reset" />
+ </p>
+</form>
+
+</body>
+</html>
diff --git a/WebCore/manual-tests/textarea-reset-default-value.html b/WebCore/manual-tests/textarea-reset-default-value.html
new file mode 100644
index 0000000..1c747b6
--- /dev/null
+++ b/WebCore/manual-tests/textarea-reset-default-value.html
@@ -0,0 +1,24 @@
+<html>
+<head>
+<title>Test for https://bugs.webkit.org/show_bug.cgi?id=31539</title>
+
+<!-- Manual test for https://bugs.webkit.org/show_bug.cgi?id=31539.
+ Ensure that the value and defaultValue on a textarea is restored correctly when
+ we restore form state (e.g. by hitting back after submitting a form). -->
+
+</head>
+<body>
+<h2>Manual test for https://bugs.webkit.org/show_bug.cgi?id=31539.</h2>
+<p>To run this test:</p>
+<ul>
+ <li>Change the text in the <textarea> below.</li>
+ <li>Submit the form. The form should navigate back immediately.</li>
+ <li>Note that the value in the text area matches what you entered before submitting the form, this is correct.</li>
+ <li>Now click the reset button for the form.
+ <li>The text in the <textarea> should now match '123', the default text for the <textarea>.</li>
+</ul>
+
+<iframe src="resources/textarea-form-back-on-submit.html" width="800" height="200" id="frame"></iframe>
+
+</body>
+</html>
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list