Bug 83872 - Show the format indicator in a date field
Summary: Show the format indicator in a date field
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: 84009 84536
Blocks: 83852 84683
  Show dependency treegraph
 
Reported: 2012-04-13 02:53 PDT by Kent Tamura
Modified: 2012-04-24 01:46 PDT (History)
4 users (show)

See Also:


Attachments
WIP (54.54 KB, patch)
2012-04-13 02:54 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff
Patch (51.91 KB, patch)
2012-04-18 23:16 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff
Patch 2 (12.44 KB, patch)
2012-04-23 02:50 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ec2-cq-02 (5.67 MB, application/zip)
2012-04-23 16:35 PDT, WebKit Review Bot
no flags Details
Patch for landing (15.23 KB, patch)
2012-04-23 20:11 PDT, Kent Tamura
no flags 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-04-13 02:53:06 PDT
Show the format indicator in a date field
Comment 1 Kent Tamura 2012-04-13 02:54:51 PDT
Created attachment 137066 [details]
WIP
Comment 2 Kent Tamura 2012-04-15 23:27:41 PDT
I'll split the patch into multiple.
Comment 3 Kent Tamura 2012-04-18 23:16:45 PDT
Created attachment 137851 [details]
Patch
Comment 4 Hajime Morrita 2012-04-21 08:02:08 PDT
Comment on attachment 137851 [details]
Patch

I hope this to be tested in non-pixel way somehow.
For example, we can access the dumped render treee using Internals.elementRenderTreeAsText(),
which allows us to inspect the render tree programatically.
Or maybe we can simply use add a reftest.
Comment 5 Ryosuke Niwa 2012-04-21 19:07:51 PDT
Comment on attachment 137851 [details]
Patch

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

> Source/WebCore/platform/text/LocalizedDate.h:49
> +// Localized date format string such as "month/day/year".
> +String dateFormatText();

Instead of adding a comment, can we simply name this function localizedDateFormatString?

> Source/WebCore/platform/text/LocalizedDateICU.cpp:138
> +            if (lastChar == 'y' || lastChar == 'Y') {

Can we add a comment saying that these Y, M, d, etc... follow ICU convention?
Or maybe we can define inline helper functions like isICUYearSymbol (We probably prefer the latter approach).

> Source/WebCore/platform/text/LocalizedDateICU.cpp:140
> +                builder.append(text.isEmpty() ? "year" : text);

Maybe we should capitalize these?

> LayoutTests/fast/forms/date/date-appearance.html:21
> +<div><input type="date" value=""></div>

Can we use a ref-test here?
Comment 6 Kent Tamura 2012-04-23 02:50:48 PDT
Created attachment 138315 [details]
Patch 2
Comment 7 Kent Tamura 2012-04-23 02:55:29 PDT
Comment on attachment 137851 [details]
Patch

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

>> Source/WebCore/platform/text/LocalizedDate.h:49
>> +String dateFormatText();
> 
> Instead of adding a comment, can we simply name this function localizedDateFormatString?

ok, I renamed it.

>> Source/WebCore/platform/text/LocalizedDateICU.cpp:138
>> +            if (lastChar == 'y' || lastChar == 'Y') {
> 
> Can we add a comment saying that these Y, M, d, etc... follow ICU convention?
> Or maybe we can define inline helper functions like isICUYearSymbol (We probably prefer the latter approach).

I inroduced isICUFooSymbol functions.

>> Source/WebCore/platform/text/LocalizedDateICU.cpp:140
>> +                builder.append(text.isEmpty() ? "year" : text);
> 
> Maybe we should capitalize these?

Done.

>> LayoutTests/fast/forms/date/date-appearance.html:21
>> +<div><input type="date" value=""></div>
> 
> Can we use a ref-test here?

I made a text test using window.internals.visiblePlaceholder().
Comment 8 Hajime Morrita 2012-04-23 09:57:23 PDT
Comment on attachment 138315 [details]
Patch 2

Looks better now.
Comment 9 WebKit Review Bot 2012-04-23 16:35:22 PDT
Comment on attachment 138315 [details]
Patch 2

Rejecting attachment 138315 [details] from commit-queue.

New failing tests:
fast/forms/date/date-appearance.html
Full output: http://queues.webkit.org/results/12528070
Comment 10 WebKit Review Bot 2012-04-23 16:35:33 PDT
Created attachment 138455 [details]
Archive of layout-test-results from ec2-cq-02

The attached test failures were seen while running run-webkit-tests on the commit-queue.
Bot: ec2-cq-02  Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'>  Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Comment 11 Kent Tamura 2012-04-23 20:11:41 PDT
Created attachment 138491 [details]
Patch for landing
Comment 12 WebKit Review Bot 2012-04-23 22:57:53 PDT
Comment on attachment 138491 [details]
Patch for landing

Clearing flags on attachment: 138491

Committed r114999: <http://trac.webkit.org/changeset/114999>
Comment 13 WebKit Review Bot 2012-04-23 22:58:05 PDT
All reviewed patches have been landed.  Closing bug.