Bug 60868 - Initial LocalizedDateICU.cpp implementation
Summary: Initial LocalizedDateICU.cpp implementation
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: 59752
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-15 21:49 PDT by Kent Tamura
Modified: 2012-04-06 03:01 PDT (History)
5 users (show)

See Also:


Attachments
Patch (83.41 KB, patch)
2011-05-15 21:53 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ec2-cr-linux-01 (1.21 MB, application/zip)
2011-05-15 22:24 PDT, WebKit Review Bot
no flags Details
Patch 2 (83.38 KB, patch)
2011-05-15 23:01 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff
Patch 3 (58.87 KB, patch)
2012-04-06 00:05 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 2011-05-15 21:49:21 PDT
LocalizedDateICU.cpp implementation.  Just for type=date.
Comment 1 Kent Tamura 2011-05-15 21:53:46 PDT
Created attachment 93602 [details]
Patch
Comment 2 Joseph Pecoraro 2011-05-15 22:21:21 PDT
Comment on attachment 93602 [details]
Patch

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

Nice! This looks good to me. I'll let a Chromium reviewer r+ since this affects the Chromium port.

> LayoutTests/fast/forms/date-input-visible-strings.html:35
> +    debug(input.type + ": value='" + input.value + "' visible='" + document.getSelection().toString() + "'");

Clever solution to making this a dump as text test. I like it!

> Source/WebCore/ChangeLog:12
> +        * WebCore.gypi: Add LocalizedDateICu.cpp.

Nit (typo): "ICu.cpp" => "ICU.cpp"

> Source/WebCore/platform/text/LocalizedDateICU.cpp:35
> +#include <unicode/datefmt.h> // smpdtfmt.h?

I don't understand this comment. Should it be removed?
Comment 3 WebKit Review Bot 2011-05-15 22:24:46 PDT
Comment on attachment 93602 [details]
Patch

Attachment 93602 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/8695881

New failing tests:
fast/forms/date-input-visible-strings.html
Comment 4 WebKit Review Bot 2011-05-15 22:24:50 PDT
Created attachment 93607 [details]
Archive of layout-test-results from ec2-cr-linux-01

The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: ec2-cr-linux-01  Port: Chromium  Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Comment 5 Kent Tamura 2011-05-15 23:01:54 PDT
Created attachment 93608 [details]
Patch 2
Comment 6 Kent Tamura 2011-05-15 23:03:19 PDT
Comment on attachment 93602 [details]
Patch

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

>> Source/WebCore/ChangeLog:12
>> +        * WebCore.gypi: Add LocalizedDateICu.cpp.
> 
> Nit (typo): "ICu.cpp" => "ICU.cpp"

Fixed.

>> Source/WebCore/platform/text/LocalizedDateICU.cpp:35
>> +#include <unicode/datefmt.h> // smpdtfmt.h?
> 
> I don't understand this comment. Should it be removed?

Oops, it doesn't make sense.  I removed.
Comment 7 Darin Adler 2011-05-16 08:24:43 PDT
Comment on attachment 93608 [details]
Patch 2

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

> Source/WebCore/platform/text/LocalizedDateICU.cpp:35
> +#include <unicode/datefmt.h>

We normally use the C interface to ICU rather than the C++ interface. This is more compatible across versions of ICU. Could you do the same here? I presume the same capabilities exist in the C version.
Comment 8 Alexey Proskuryakov 2011-05-16 10:12:04 PDT
Where does the format come from? Will this test be always failing for me in DRT, because the primary language of my Mac OS X installation is not English?
Comment 9 Kent Tamura 2011-05-17 00:50:14 PDT
(In reply to comment #8)
> Where does the format come from? Will this test be always failing for me in DRT, because the primary language of my Mac OS X installation is not English?

Good point.
The format should come from user's OS settings.
In Chromium project we assume DRT runs on en_US systems.  So platform/chromium/fast/forms/date-input-visible-strings-expected.txt in this patch is acceptable.  But I don't know other ports have such assumptions.

We should have MockLocalizedDate.cpp and use it in DRT?
Comment 10 Kent Tamura 2012-04-06 00:05:24 PDT
Created attachment 135988 [details]
Patch 3

Uses ICU C API
Comment 11 WebKit Review Bot 2012-04-06 03:01:26 PDT
Comment on attachment 135988 [details]
Patch 3

Clearing flags on attachment: 135988

Committed r113422: <http://trac.webkit.org/changeset/113422>
Comment 12 WebKit Review Bot 2012-04-06 03:01:33 PDT
All reviewed patches have been landed.  Closing bug.