Inappropriate validation message for required number/date input elements
authortkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Mar 2013 14:43:40 +0000 (14:43 +0000)
committertkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Mar 2013 14:43:40 +0000 (14:43 +0000)
commit25e1259c3f18179d5bd67c14f69445fff221cb51
tree3c6fe7147d488a8ae41e535384fbc7161e7d193b
parent4d237dcab8586b4a9a3268ae1510c4d0bc20049d
Inappropriate validation message for required number/date input elements
https://bugs.webkit.org/show_bug.cgi?id=111982

Reviewed by Kentaro Hara.

Source/WebCore:

For validation message, badInput messages should take precedence
over valueMissing messages because users already filled out the
field with a bad value.

Tests: Update fast/forms/validationMessage.html

* html/InputType.cpp:
(WebCore::InputType::validationMessage):
Check badInput first.

LayoutTests:

* fast/forms/validationMessage-expected.txt:
* fast/forms/validationMessage.html:
* platform/chromium/fast/forms/validationMessage-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@145362 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/forms/validationMessage-expected.txt
LayoutTests/fast/forms/validationMessage.html
LayoutTests/platform/chromium/fast/forms/validationMessage-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/html/InputType.cpp