[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Thu Apr 8 01:01:56 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 2eab0f317281c171ffee54d3fc04809acfe7ae3c
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 &lt;textarea&gt; 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 &lt;textarea&gt; should now match '123', the default text for the &lt;textarea&gt;.</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