Clear the content of a search input form when 'Escape' is pressed.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Jul 2011 08:10:54 +0000 (08:10 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Jul 2011 08:10:54 +0000 (08:10 +0000)
commitd66dd3717841ef0389e3a341796469d11cbf0edb
treef9685d39be198ba3c0dd867e7f87563079a326d7
parentea5b2f3f7f20d69ab550b2388bb8f1394d52328a
Clear the content of a search input form when 'Escape' is pressed.
https://bugs.webkit.org/show_bug.cgi?id=51897

Source/WebCore:

This change added handleKeydownEvent() to a search input form,
which clears the form and triggers a 'search' event when 'Escape' is pressed.

Patch by Kentaro Hara <haraken@google.com> on 2011-07-15
Reviewed by Kent Tamura.

Test: fast/forms/input-search-press-escape-key.html

* html/SearchInputType.cpp:
(WebCore::SearchInputType::handleKeydownEvent):
* html/SearchInputType.h:

LayoutTests:

The added test checks if the value in a search input form is cleared
and a 'search' event is triggered, when we press 'Escape' key.

Patch by Kentaro Hara <haraken@google.com> on 2011-07-15
Reviewed by Kent Tamura.

* fast/forms/input-search-press-escape-key-expected.txt: Added.
* fast/forms/input-search-press-escape-key.html: Added.

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