RESOLVED FIXED 102861
Implement ValidityState::badInput
https://bugs.webkit.org/show_bug.cgi?id=102861
Summary Implement ValidityState::badInput
Kent Tamura
Reported 2012-11-20 19:21:55 PST
The WHATWG HTML specification has introduced ValidityState::badInput. We should implement it. http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#dom-validitystate-badinput
Attachments
Patch (45.47 KB, patch)
2012-11-25 22:18 PST, Kent Tamura
no flags
Patch 2 (47.62 KB, patch)
2012-11-25 22:25 PST, Kent Tamura
no flags
Patch 3 (48.37 KB, patch)
2012-11-25 23:08 PST, Kent Tamura
no flags
Patch 4 (49.98 KB, patch)
2012-11-25 23:33 PST, Kent Tamura
no flags
Patch 5 (50.73 KB, patch)
2012-11-26 01:15 PST, Kent Tamura
morrita: review+
Kent Tamura
Comment 1 2012-11-25 22:18:48 PST
Kent Tamura
Comment 2 2012-11-25 22:25:13 PST
Created attachment 175924 [details] Patch 2 Added a missing file
Early Warning System Bot
Comment 3 2012-11-25 22:47:40 PST
Early Warning System Bot
Comment 4 2012-11-25 22:49:04 PST
Kent Tamura
Comment 5 2012-11-25 23:08:50 PST
Created attachment 175931 [details] Patch 3 Qt build fix
EFL EWS Bot
Comment 6 2012-11-25 23:24:51 PST
Kent Tamura
Comment 7 2012-11-25 23:33:44 PST
Created attachment 175933 [details] Patch 4 EFL build fix
Build Bot
Comment 8 2012-11-26 01:05:02 PST
Comment on attachment 175933 [details] Patch 4 Attachment 175933 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/14986501 New failing tests: fast/forms/ValidityState-001.html
Kentaro Hara
Comment 9 2012-11-26 01:08:08 PST
Comment on attachment 175933 [details] Patch 4 View in context: https://bugs.webkit.org/attachment.cgi?id=175933&action=review Looks good. morrita-san: would you take another look? > LayoutTests/fast/forms/number/number-validity-badinput.html:13 > +<p id="description"></p> > +<div id="console"></div> Nit: Remove this. > LayoutTests/fast/forms/number/number-validity-badinput.html:29 > +shouldBeTrue('colorOf(number) != invalidStyleColor'); Nit: Use !==, or ShouldNotBe('colorOf(number)', 'invalidStyleColor') > LayoutTests/fast/forms/number/number-validity-badinput.html:41 > +shouldBeTrue('colorOf(number) != invalidStyleColor'); Ditto. > LayoutTests/fast/forms/resources/multiple-fields-validity-badinput.js:28 > + if (type == 'date' || type== 'datetime' || type == 'datetime-local') { Nit: type == 'datetime'. === would be better.
Kent Tamura
Comment 10 2012-11-26 01:15:17 PST
Created attachment 175940 [details] Patch 5 Addressed reviewer comments. Fix a test failure.
Kent Tamura
Comment 11 2012-11-26 01:16:59 PST
Comment on attachment 175933 [details] Patch 4 View in context: https://bugs.webkit.org/attachment.cgi?id=175933&action=review >> LayoutTests/fast/forms/number/number-validity-badinput.html:13 >> +<div id="console"></div> > > Nit: Remove this. Fixed. FYI: I wanted to minimize the difference from number-unacceptable-style.html. >> LayoutTests/fast/forms/number/number-validity-badinput.html:29 >> +shouldBeTrue('colorOf(number) != invalidStyleColor'); > > Nit: Use !==, or ShouldNotBe('colorOf(number)', 'invalidStyleColor') Fixed. >> LayoutTests/fast/forms/number/number-validity-badinput.html:41 >> +shouldBeTrue('colorOf(number) != invalidStyleColor'); > > Ditto. Fixed. >> LayoutTests/fast/forms/resources/multiple-fields-validity-badinput.js:28 >> + if (type == 'date' || type== 'datetime' || type == 'datetime-local') { > > Nit: type == 'datetime'. === would be better. Fixed.
Hajime Morrita
Comment 12 2012-11-27 00:55:14 PST
Comment on attachment 175940 [details] Patch 5 View in context: https://bugs.webkit.org/attachment.cgi?id=175940&action=review > Source/WebCore/ChangeLog:17 > + interactive validation tells it. Better to use consistent tense. > Source/WebCore/ChangeLog:27 > + will be added later. The bug# might be worth being mentioned here. > Source/WebCore/html/FormAssociatedElement.h:79 > // stepMismatch, tooLong and valueMissing must call willValidate method. Vaguely feel that it's time to fold these into one method which returns bit flags.
Kent Tamura
Comment 13 2012-11-27 01:10:07 PST
Kent Tamura
Comment 14 2012-11-27 01:21:24 PST
Comment on attachment 175940 [details] Patch 5 View in context: https://bugs.webkit.org/attachment.cgi?id=175940&action=review >> Source/WebCore/html/FormAssociatedElement.h:79 >> // stepMismatch, tooLong and valueMissing must call willValidate method. > > Vaguely feel that it's time to fold these into one method which returns bit flags. MO, returning bit flags won't be nice. When JS code gets input.validity.tooLong, we don't need to compute other validation states.
Kent Tamura
Comment 15 2012-11-27 01:22:05 PST
(In reply to comment #14) > MO, returning bit flags won't be nice. When JS code gets input.validity.tooLong, we don't need to compute other validation states. MO -> IMO
Note You need to log in before you can comment on or make changes to this bug.