Bug 98727

Summary: Should reject invalid dates constructed with multiple fields UI
Product: WebKit Reporter: Kent Tamura <tkent>
Component: FormsAssignee: Kent Tamura <tkent>
Status: RESOLVED FIXED    
Severity: Normal CC: dglazkov, mifenton, morrita, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 98226    
Attachments:
Description Flags
Patch
none
Patch 2 morrita: review+, tkent: commit-queue-

Description Kent Tamura 2012-10-09 00:28:31 PDT
In input[type=date] with multiple fields UI, we allow users to set day-of-month value to 1-31 regardless of the month value. So users can construct an invalid date such as "2012-02-31".  We should sanitize such values.
Comment 1 Kent Tamura 2012-10-09 00:31:09 PDT
Created attachment 167701 [details]
Patch
Comment 2 Hajime Morrita 2012-10-09 01:02:05 PDT
Comment on attachment 167701 [details]
Patch

Could you make the test somehow more readable? It's full of boilerplate and it's hard to read these key sequences to see what should happen.
Comment 3 WebKit Review Bot 2012-10-09 01:18:10 PDT
Comment on attachment 167701 [details]
Patch

Attachment 167701 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/14214637

New failing tests:
fast/forms/month-multiple-fields/month-multiple-fields-keyboard-events.html
Comment 4 Kent Tamura 2012-10-09 02:18:33 PDT
(In reply to comment #2)
> (From update of attachment 167701 [details])
> Could you make the test somehow more readable? It's full of boilerplate and it's hard to read these key sequences to see what should happen.

It's hard to improve the test result readability. So I'll add comments to the .html.
Comment 5 Kent Tamura 2012-10-09 02:43:43 PDT
Created attachment 167717 [details]
Patch 2

- Added comments
- Update month-multiple-fields-keybaord-events.html
Comment 6 Hajime Morrita 2012-10-09 18:32:48 PDT
Comment on attachment 167717 [details]
Patch 2

View in context: https://bugs.webkit.org/attachment.cgi?id=167717&action=review

> LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-keyboard-events.html:82
> +keyDown('downArrow'); // -> [09]/29/2012

[08]?
Comment 7 Kent Tamura 2012-10-09 18:35:15 PDT
Comment on attachment 167717 [details]
Patch 2

View in context: https://bugs.webkit.org/attachment.cgi?id=167717&action=review

>> LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-keyboard-events.html:82
>> +keyDown('downArrow'); // -> [09]/29/2012
> 
> [08]?

You're right.
Comment 8 Kent Tamura 2012-10-09 18:40:08 PDT
Committed r130835: <http://trac.webkit.org/changeset/130835>