Bug 98727 - Should reject invalid dates constructed with multiple fields UI
Summary: Should reject invalid dates constructed with multiple fields UI
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kent Tamura
URL:
Keywords:
Depends on:
Blocks: 98226
  Show dependency treegraph
 
Reported: 2012-10-09 00:28 PDT by Kent Tamura
Modified: 2012-10-09 18:40 PDT (History)
4 users (show)

See Also:


Attachments
Patch (13.01 KB, patch)
2012-10-09 00:31 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff
Patch 2 (17.29 KB, patch)
2012-10-09 02:43 PDT, Kent Tamura
morrita: review+
tkent: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>