Bug 83859 - LocalizedDateICU should ignore timezones
Summary: LocalizedDateICU should ignore timezones
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P1 Major
Assignee: Kent Tamura
URL:
Keywords:
Depends on:
Blocks: 83852
  Show dependency treegraph
 
Reported: 2012-04-12 22:16 PDT by Kent Tamura
Modified: 2012-04-12 23:07 PDT (History)
2 users (show)

See Also:


Attachments
Patch (3.42 KB, patch)
2012-04-12 22:20 PDT, Kent Tamura
morrita: review+
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-12 22:16:19 PDT
LocalizedDateICU should ignore timezones
Comment 1 Kent Tamura 2012-04-12 22:20:12 PDT
Created attachment 137038 [details]
Patch
Comment 2 Kent Tamura 2012-04-12 22:26:05 PDT
This is a root cause of fast/forms/date-input-visible-string.html failure.


http://test-results.appspot.com/dashboards/flakiness_dashboard.html#showExpectations=true&tests=fast%2Fforms%2Fdate%2Fdate-input-visible-string
Comment 3 Hajime Morrita 2012-04-12 22:51:46 PDT
Comment on attachment 137038 [details]
Patch

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

Looks good.  Picked a few nits.

> Source/WebCore/platform/text/LocalizedDateICU.cpp:48
> +    const UChar gmtTimezone[3] = {'G', 'M', 'T'};

Don't we need L prefix for each char?

> Source/WebCore/platform/text/LocalizedDateICU.cpp:50
> +    return udat_open(UDAT_NONE, UDAT_SHORT, defaultLanguage().utf8().data(), gmtTimezone, 3, 0, -1, &status);

We could use WTF_ARRAY_LENGTH?
Comment 4 Kent Tamura 2012-04-12 22:53:45 PDT
Thanks.

(In reply to comment #3)
> > Source/WebCore/platform/text/LocalizedDateICU.cpp:48
> > +    const UChar gmtTimezone[3] = {'G', 'M', 'T'};
> 
> Don't we need L prefix for each char?

No.  UChar is not always wchar_t.

> > Source/WebCore/platform/text/LocalizedDateICU.cpp:50
> > +    return udat_open(UDAT_NONE, UDAT_SHORT, defaultLanguage().utf8().data(), gmtTimezone, 3, 0, -1, &status);
> 
> We could use WTF_ARRAY_LENGTH?

Yes.  will do.
Comment 5 Kent Tamura 2012-04-12 23:07:59 PDT
Committed r114085: <http://trac.webkit.org/changeset/114085>