Do not sanitize user input for input[type=url]
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Oct 2015 17:53:56 +0000 (17:53 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Oct 2015 17:53:56 +0000 (17:53 +0000)
commite9bc07385059e38d748bb66f6dea51edbd259eef
treeb23d5514db0cf7fd4cae1c844755611e98ca4fd0
parent31e4966a8b9fea001b57080a2ca959119d063544
Do not sanitize user input for input[type=url]
https://bugs.webkit.org/show_bug.cgi?id=150346
<rdar://problem/23243240>

Patch by Keith Rollin <krollin@apple.com> on 2015-10-27
Reviewed by Darin Adler.

Source/WebCore:

Do not sanitize user input in text-based input fields that support
the Selection API, in order to not break JavaScript code that expects
element.value to match what's on the screen.

Test: fast/forms/input-user-input-sanitization.html

* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::subtreeHasChanged):

LayoutTests:

Test the sanitization of text-based input fields when the user enters
text.

* fast/forms/input-user-input-sanitization-expected.txt: Added.
* fast/forms/input-user-input-sanitization.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191626 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/forms/input-user-input-sanitization-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/input-user-input-sanitization.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/TextFieldInputType.cpp