Bug 97992

Summary: [Forms] Adding DateTimeWeekFieldElement for multiple fields "week" input UI
Product: WebKit Reporter: yosin
Component: FormsAssignee: yosin
Status: RESOLVED FIXED    
Severity: Normal CC: tkent
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 97877    
Attachments:
Description Flags
Patch 1
none
Patch 2
none
Patch 3 none

Description yosin 2012-09-30 22:21:30 PDT
To implement multiple fields "week" input UI, we would like to have DateTimeWeekFieldElement.
Comment 1 yosin 2012-10-01 00:02:58 PDT
Created attachment 166414 [details]
Patch 1
Comment 2 yosin 2012-10-01 00:03:31 PDT
Comment on attachment 166414 [details]
Patch 1

Could you review this patch?
Thanks in advance.
Comment 3 Kent Tamura 2012-10-01 00:38:56 PDT
Comment on attachment 166414 [details]
Patch 1

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

> Source/WebCore/ChangeLog:8
> +        THis patch is a preparation of implementing multiple fields date/time

THis -> This
BTW, this paragraph looks unnecessary.  The next paragraph has enough information.

> Source/WebCore/html/shadow/DateTimeFieldElements.cpp:344
> +    : DateTimeNumericFieldElement(document, fieldOwner, 1, 53, "--")

We had better define a static const variable for "53", or add a static const member to DateComponents.
Comment 4 yosin 2012-10-01 01:50:32 PDT
Created attachment 166427 [details]
Patch 2
Comment 5 yosin 2012-10-01 01:51:34 PDT
Comment on attachment 166427 [details]
Patch 2

Could you review this patch?
Thanks in advance.

= Changes since the last review =
* Add constant DateComponents::maximumWeekOfYearNumber and miniumWeekOfYear.
Comment 6 Kent Tamura 2012-10-01 02:01:32 PDT
Comment on attachment 166427 [details]
Patch 2

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

> Source/WebCore/platform/DateComponents.cpp:48
> +const int DateComponents::minimumWeekOfYearNumber = 1;
> +
> +// HTML5 specification defines maximum week of year is 53.
> +const int DateComponents::maximumWeekOfYearNumber = 53;

IMO, minimumWeekNumber and maximumWeekNumber are better.
DateComponents::maxWeekNumberInYear() and DateComponents::parseWeek() should use them.
Comment 7 yosin 2012-10-01 02:12:37 PDT
Created attachment 166430 [details]
Patch 3
Comment 8 yosin 2012-10-01 02:14:16 PDT
Comment on attachment 166430 [details]
Patch 3

Could you review this patch?
Thanks in advance.

= Changes since the last review =
* Rename maximumWeekOfYearNumber to maximumWeekNumber.
* Rename minimumWeekOfYearNumber to minimumWeekNumber.
* Use maximumWeekNumber in DateComponents::maxWeekNumberInYear()
* Use minimumWeekNumber in parseWeek()
Comment 9 Kent Tamura 2012-10-01 02:16:18 PDT
Comment on attachment 166430 [details]
Patch 3

ok
Comment 10 yosin 2012-10-01 02:18:25 PDT
Comment on attachment 166430 [details]
Patch 3

Clearing flags on attachment: 166430

Committed r130018: <http://trac.webkit.org/changeset/130018>
Comment 11 yosin 2012-10-01 02:18:29 PDT
All reviewed patches have been landed.  Closing bug.