Changeset 145362 in webkit
- Timestamp:
- Mar 11, 2013 7:43:40 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r145356 r145362 1 2013-03-11 Kent Tamura <tkent@chromium.org> 2 3 Inappropriate validation message for required number/date input elements 4 https://bugs.webkit.org/show_bug.cgi?id=111982 5 6 Reviewed by Kentaro Hara. 7 8 * fast/forms/validationMessage-expected.txt: 9 * fast/forms/validationMessage.html: 10 * platform/chromium/fast/forms/validationMessage-expected.txt: 11 1 12 2013-03-11 Christophe Dumez <ch.dumez@sisa.samsung.com> 2 13 -
trunk/LayoutTests/fast/forms/validationMessage-expected.txt
r145212 r145362 10 10 input typeMismatch: type mismatch 11 11 input badInput: type mismatch 12 badInput and valueMissing: 13 PASS numberInput.validationMessage is nonRequiredBadInputMessage 12 14 PASS but.validationMessage is '' 13 15 PASS anoninput.validationMessage is '' -
trunk/LayoutTests/fast/forms/validationMessage.html
r145212 r145362 56 56 document.execCommand("InsertText", false, "abc"); 57 57 debug("input badInput: " + numberInput.validationMessage); 58 var nonRequiredBadInputMessage = numberInput.validationMessage; 59 60 debug("badInput and valueMissing:"); 61 numberInput.required = true; 62 shouldBe("numberInput.validationMessage", "nonRequiredBadInputMessage"); 58 63 59 64 // A button can't be valited and, thus, has a blank validationMessage -
trunk/LayoutTests/platform/chromium/fast/forms/validationMessage-expected.txt
r145212 r145362 10 10 input typeMismatch: type mismatch 11 11 input badInput: Please enter a number. 12 badInput and valueMissing: 13 PASS numberInput.validationMessage is nonRequiredBadInputMessage 12 14 PASS but.validationMessage is '' 13 15 PASS anoninput.validationMessage is '' -
trunk/Source/WebCore/ChangeLog
r145357 r145362 1 2013-03-11 Kent Tamura <tkent@chromium.org> 2 3 Inappropriate validation message for required number/date input elements 4 https://bugs.webkit.org/show_bug.cgi?id=111982 5 6 Reviewed by Kentaro Hara. 7 8 For validation message, badInput messages should take precedence 9 over valueMissing messages because users already filled out the 10 field with a bad value. 11 12 Tests: Update fast/forms/validationMessage.html 13 14 * html/InputType.cpp: 15 (WebCore::InputType::validationMessage): 16 Check badInput first. 17 1 18 2013-03-11 Yury Semikhatsky <yurys@chromium.org> 2 19 -
trunk/Source/WebCore/html/InputType.cpp
r145055 r145362 375 375 376 376 // The order of the following checks is meaningful. e.g. We'd like to show the 377 // valueMissing message even if the control has other validation errors. 377 // badInput message even if the control has other validation errors. 378 if (hasBadInput()) 379 return badInputText(); 380 378 381 if (valueMissing(value)) 379 382 return valueMissingText(); … … 381 384 if (typeMismatch()) 382 385 return typeMismatchText(); 383 384 if (hasBadInput())385 return badInputText();386 386 387 387 if (patternMismatch(value))
Note: See TracChangeset
for help on using the changeset viewer.