Search events should not fire synchronously for search type input elements with incre...
authorjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 May 2017 19:17:29 +0000 (19:17 +0000)
committerjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 May 2017 19:17:29 +0000 (19:17 +0000)
commitf627a77f344ab33aa54b842a2e5d90bec4410cc5
tree1feac7e3553f932d126325ab62c3e2280f962f25
parent6afacd57a50e6ca61ac10219fbcdbe9e3419e1d3
Search events should not fire synchronously for search type input elements with incremental attribute set
https://bugs.webkit.org/show_bug.cgi?id=171376
<rdar://problem/31863296>

Reviewed by Chris Dumez.

Source/WebCore:

For some reasons, we fire search events immediately for search type input elements with incremental
attribute set only when the length of the input equals to zero. This behaviour should be prevented
as event listeners in the middle might perform unexpectedly.

Test: fast/forms/search/search-incremental-crash.html

* html/SearchInputType.cpp:
(WebCore::SearchInputType::startSearchEventTimer):

LayoutTests:

* fast/forms/search/search-incremental-crash-expected.txt: Added.
* fast/forms/search/search-incremental-crash.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/forms/search/search-incremental-crash-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/search/search-incremental-crash.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/SearchInputType.cpp