[CherryPick] 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)
committerjinwoo jeong <jw00.jeong@samsung.com>
Thu, 28 Mar 2013 03:53:07 +0000 (12:53 +0900)
commit8abc72827d38f4f51277d7953d73e46874914820
tree9a9f41178a970d45eb24003af3f262bed37a629b
parent4cd7bd92eb6dab3dcac79af8caf2c65d6e0419e0
[CherryPick] Inappropriate validation message for required number/date input elements

[Title] Inappropriate validation message for required number/date input elements
[Issues] N_SE-28998
[Problem] Input type number not showing any error message in Jquery mobile single page application[Solution] Cherry picked.
[Cherry-Picker] Jinwoo Jeong <jw00.jeong@samsung.com>

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: http://svn.webkit.org/repository/webkit/trunk@145362 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:

LayoutTests/ChangeLog
LayoutTests/fast/forms/validationMessage-expected.txt
LayoutTests/fast/forms/validationMessage.html
LayoutTests/platform/chromium/fast/forms/validationMessage-expected.txt
Source/WebCore/ChangeLog
LayoutTests/ChangeLog
LayoutTests/fast/forms/validationMessage-expected.txt
LayoutTests/fast/forms/validationMessage.html
LayoutTests/platform/chromium/fast/forms/validationMessage-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/InputType.cpp