Bug 83859

Summary: LocalizedDateICU should ignore timezones
Product: WebKit Reporter: Kent Tamura <tkent>
Component: FormsAssignee: Kent Tamura <tkent>
Status: RESOLVED FIXED    
Severity: Major CC: haraken, morrita
Priority: P1    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 83852    
Attachments:
Description Flags
Patch morrita: review+

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>