Bug 97300

Summary: [Forms] DateTimeEditElement::layout() should take date time format as a parameter
Product: WebKit Reporter: yosin
Component: FormsAssignee: yosin
Status: RESOLVED FIXED    
Severity: Normal CC: mifenton, tkent, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 97299    
Attachments:
Description Flags
Patch 1
none
Patch 2 none

Description yosin 2012-09-20 23:52:26 PDT
To use DateTimeEditElement other than "time" input type, such as "date", "datetime", "month", or "week", DateTimeEditElement::layout() should take date time format as a parameter instead of calling Localizer::timeFormat().
Comment 1 yosin 2012-09-21 00:07:16 PDT
Created attachment 165059 [details]
Patch 1
Comment 2 yosin 2012-09-21 00:08:53 PDT
Comment on attachment 165059 [details]
Patch 1

Could you review this patch?
Thanks in advance.
Comment 3 Kent Tamura 2012-09-21 01:42:37 PDT
Comment on attachment 165059 [details]
Patch 1

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

> Source/WebCore/html/TimeInputType.cpp:311
> +    bool const hasValue = parseToDateComponents(element()->value(), &date);

We usually put "const" followed by a type name.
  const bool hasValue ...

> Source/WebCore/html/shadow/DateTimeEditElement.cpp:410
> +bool DateTimeEditElement::shouldHaveSecondField(const LayoutParameters& layoutParameters)

This should be a member of LayoutParameters.
Comment 4 yosin 2012-09-21 02:52:31 PDT
Created attachment 165097 [details]
Patch 2
Comment 5 yosin 2012-09-21 02:54:05 PDT
Comment on attachment 165097 [details]
Patch 2

Could you review this patch?
Thanks in advance.

= Changes since the last review =
* Fix position of "const".
* Move shouldHaveSecondField to LayoutParameters.
Comment 6 Kent Tamura 2012-09-21 02:56:15 PDT
Comment on attachment 165097 [details]
Patch 2

ok
Comment 7 yosin 2012-09-21 03:05:44 PDT
Comment on attachment 165097 [details]
Patch 2

Clearing flags on attachment: 165097

Committed r129206: <http://trac.webkit.org/changeset/129206>
Comment 8 yosin 2012-09-21 03:05:49 PDT
All reviewed patches have been landed.  Closing bug.