Bug 98117

Summary: [Chromium-Win] Implement LocaleWin::dateFormat
Product: WebKit Reporter: Kent Tamura <tkent>
Component: PlatformAssignee: Kent Tamura <tkent>
Status: RESOLVED FIXED    
Severity: Normal CC: haraken, morrita, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 98109    
Bug Blocks: 97997    
Attachments:
Description Flags
Patch
none
Patch 2
none
Patch 3 none

Kent Tamura
Reported 2012-10-01 22:53:33 PDT
[Chromium-Win] Implement LocaleWin::dateFormat
Attachments
Patch (5.17 KB, patch)
2012-10-02 01:48 PDT, Kent Tamura
no flags
Patch 2 (5.27 KB, patch)
2012-10-02 01:53 PDT, Kent Tamura
no flags
Patch 3 (9.12 KB, patch)
2012-10-02 03:51 PDT, Kent Tamura
no flags
Kent Tamura
Comment 1 2012-10-02 01:48:49 PDT
Kent Tamura
Comment 2 2012-10-02 01:53:42 PDT
Kentaro Hara
Comment 3 2012-10-02 02:13:22 PDT
Comment on attachment 166644 [details] Patch 2 View in context: https://bugs.webkit.org/attachment.cgi?id=166644&action=review > Source/WebCore/ChangeLog:13 > + No new tests. The function is not used yet. Isn't there any way to add a test? At least I want a manual test. > Source/WebCore/platform/text/LocaleWin.cpp:703 > + for (unsigned i = 0; i < literal.length(); ++i) { > + if (literal[i] == '\'') > + buffer.append("''"); > + else { > + String escaped = literal.substring(i); > + escaped.replace(ASCIILiteral("'"), ASCIILiteral("''")); > + buffer.append("'"); > + buffer.append(escaped); > + buffer.append("'"); > + return; > + } > + } I don't fully understand the behavior: '' => '''''' 'abc' => '''abc''' a'bc' => 'a''bc''' ?
Kent Tamura
Comment 4 2012-10-02 03:51:27 PDT
Created attachment 166657 [details] Patch 3 Add test
Kent Tamura
Comment 5 2012-10-02 03:58:02 PDT
Comment on attachment 166644 [details] Patch 2 View in context: https://bugs.webkit.org/attachment.cgi?id=166644&action=review >> Source/WebCore/ChangeLog:13 >> + No new tests. The function is not used yet. > > Isn't there any way to add a test? At least I want a manual test. I exposed a function of LocaleWin, and added a test to LocaleWinTest.cpp. >> Source/WebCore/platform/text/LocaleWin.cpp:703 >> + } > > I don't fully understand the behavior: > > '' => '''''' > 'abc' => '''abc''' > a'bc' => 'a''bc''' > > ? | '' => '''''' This should be: '' => '''' | 'abc' => '''abc''' | a'bc' => 'a''bc''' Right. - ' is always represented as '' - other letters are always quoted by ' and '. - If a source string starts with ', we need special handling. If the source string was ' and we replaced it with '' then wrap with ' and ', the function would produce '''', which will be recognized as two quotes.
Kentaro Hara
Comment 6 2012-10-02 04:08:14 PDT
Comment on attachment 166657 [details] Patch 3 Looks OK.
WebKit Review Bot
Comment 7 2012-10-02 18:17:04 PDT
Comment on attachment 166657 [details] Patch 3 Clearing flags on attachment: 166657 Committed r130242: <http://trac.webkit.org/changeset/130242>
WebKit Review Bot
Comment 8 2012-10-02 18:17:07 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.