WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
100471
[Chromium-Win] Support shortTimeFormat
https://bugs.webkit.org/show_bug.cgi?id=100471
Summary
[Chromium-Win] Support shortTimeFormat
Kent Tamura
Reported
2012-10-25 23:59:33 PDT
LocaleWin haven't supported shortTimeFormat(), and it have returned the same format as timeFormat().
Attachments
Patch
(81.08 KB, patch)
2012-10-26 00:08 PDT
,
Kent Tamura
haraken
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Kent Tamura
Comment 1
2012-10-26 00:08:45 PDT
Created
attachment 170835
[details]
Patch
Kent Tamura
Comment 2
2012-10-26 00:21:12 PDT
Comment on
attachment 170835
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=170835&action=review
> Source/WebCore/ChangeLog:14 > + (WebCore::LocaleWin::shortTimeFormat): > + Gets a format by LOCALE_SSHORTTIME. If it fails, remove "<delimiter>ss" > + from the format by LOCALE_STIMEFORMAT.
Note that I verified that this algorithm worked well for all supported locales on Windows XP.
Kentaro Hara
Comment 3
2012-10-26 00:34:00 PDT
Comment on
attachment 170835
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=170835&action=review
> Source/WebCore/platform/text/LocaleWin.cpp:709 > + if (!m_timeFormatWithoutSeconds.isNull())
I'm a bit confused that you're sometimes using isNull() and sometimes isEmpty(). Here m_timeFormatWithoutSeconds can be an Empty string, which is one of valid results, so you are using isNull(), right?
Kent Tamura
Comment 4
2012-10-26 00:40:24 PDT
Comment on
attachment 170835
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=170835&action=review
>> Source/WebCore/platform/text/LocaleWin.cpp:709 >> + if (!m_timeFormatWithoutSeconds.isNull()) > > I'm a bit confused that you're sometimes using isNull() and sometimes isEmpty(). Here m_timeFormatWithoutSeconds can be an Empty string, which is one of valid results, so you are using isNull(), right?
Yeah, isNull is more appropriate than isEmpty in these functions because we'd like to know initialized-or-not. isEmpty also works well in usual cases, but isNull is faster than isEmpty.
Kent Tamura
Comment 5
2012-10-26 00:43:45 PDT
Committed
r132579
: <
http://trac.webkit.org/changeset/132579
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug