Bug 97300 - [Forms] DateTimeEditElement::layout() should take date time format as a parameter
Summary: [Forms] DateTimeEditElement::layout() should take date time format as a param...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: yosin
URL:
Keywords:
Depends on:
Blocks: 97299
  Show dependency treegraph
 
Reported: 2012-09-20 23:52 PDT by yosin
Modified: 2012-09-21 03:05 PDT (History)
3 users (show)

See Also:


Attachments
Patch 1 (12.12 KB, patch)
2012-09-21 00:07 PDT, yosin
no flags Details | Formatted Diff | Diff
Patch 2 (12.00 KB, patch)
2012-09-21 02:52 PDT, yosin
no flags Details | Formatted Diff | Diff

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