Cloning a textarea does not clone the textarea's value
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Sep 2016 16:32:34 +0000 (16:32 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Sep 2016 16:32:34 +0000 (16:32 +0000)
commit963fd77885eaa60a93e7c672801cf3822865135c
treef27f3f927922d2355965677ca3d682714c3b43f1
parent9542f227e7038aeb46f7d666fa1cd3632b34f303
Cloning a textarea does not clone the textarea's value
https://bugs.webkit.org/show_bug.cgi?id=156637

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Import corresponding W3C web platform test.

* web-platform-tests/html/semantics/forms/the-textarea-element/cloning-steps-expected.txt: Added.
* web-platform-tests/html/semantics/forms/the-textarea-element/cloning-steps.html: Added.
* web-platform-tests/html/semantics/forms/the-textarea-element/w3c-import.log:

Source/WebCore:

Update WebKit so that cloning a textarea element also clones its value.
This matches the HTML specification after:
- https://github.com/whatwg/html/pull/1784

The new behavior also matches Chrome and Edge.

Test: imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/cloning-steps.html

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::copyNonAttributePropertiesFromElement):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::copyNonAttributePropertiesFromElement):
* html/HTMLTextAreaElement.h:

LayoutTests:

Update existing test to reflect behavior change.

* fast/forms/checkValidity-cloneNode-crash-expected.txt:
* fast/forms/checkValidity-cloneNode-crash.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206026 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/forms/checkValidity-cloneNode-crash-expected.txt
LayoutTests/fast/forms/checkValidity-cloneNode-crash.html
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/cloning-steps-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/cloning-steps.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/w3c-import.log
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLTextAreaElement.cpp
Source/WebCore/html/HTMLTextAreaElement.h