WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 90236
[Chromium-Windows] Implement functions for localized time format information
https://bugs.webkit.org/show_bug.cgi?id=90236
Summary
[Chromium-Windows] Implement functions for localized time format information
yosin
Reported
2012-06-28 19:09:13 PDT
To implement input type "time" multiple fields UI, we need following functions for Windows: 1. localizedTimeFormatText() 2. localizedShortTimeFormatText() 3. timeAMPMLables()
Attachments
Patch 1
(15.28 KB, patch)
2012-07-10 00:58 PDT
,
yosin
no flags
Details
Formatted Diff
Diff
Patch 1
(15.28 KB, patch)
2012-07-10 01:00 PDT
,
yosin
no flags
Details
Formatted Diff
Diff
Patch 3
(16.21 KB, patch)
2012-07-10 01:33 PDT
,
yosin
no flags
Details
Formatted Diff
Diff
Patch 4
(16.48 KB, patch)
2012-07-10 22:20 PDT
,
yosin
no flags
Details
Formatted Diff
Diff
Patch 5
(16.22 KB, patch)
2012-07-10 22:53 PDT
,
yosin
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
yosin
Comment 1
2012-07-10 00:58:30 PDT
Created
attachment 151411
[details]
Patch 1
yosin
Comment 2
2012-07-10 01:00:34 PDT
Created
attachment 151413
[details]
Patch 1
yosin
Comment 3
2012-07-10 01:00:58 PDT
Comment on
attachment 151413
[details]
Patch 1 Could you review this patch? Thanks in advance.
yosin
Comment 4
2012-07-10 01:33:15 PDT
Created
attachment 151418
[details]
Patch 3
yosin
Comment 5
2012-07-10 01:33:44 PDT
Comment on
attachment 151418
[details]
Patch 3 Could you review this patch? Thanks in advance.
Kent Tamura
Comment 6
2012-07-10 02:39:10 PDT
Comment on
attachment 151418
[details]
Patch 3 View in context:
https://bugs.webkit.org/attachment.cgi?id=151418&action=review
> Source/WebCore/platform/text/LocaleWin.cpp:624 > +// This class used for converting Windows time pattern format[1] into LDML[2] > +// time format string. > +// [1]
http://msdn.microsoft.com/en-us/library/windows/desktop/dd318148(v=vs.85).aspx
> +// [2] LDML
http://unicode.org/reports/tr35/tr35-6.html#Date_Format_Patterns
> +static String parseWindowsTimeFormat(const String& windowsTimeFormat)
So, the function name should convertWindowsTimeFormatToLDML() or something.
> Source/WebCore/platform/text/LocaleWin.cpp:641 > + } else if (fieldType == lastFieldType) { > + ++counter; > + if (counter == 2 && lastFieldType != DateTimeFormat::FieldTypePeriod) > + builder.append(static_cast<UChar>(lastFieldType)); > + } else { > + builder.append(static_cast<UChar>(lastFieldType)); > + counter = 1; > + } > + lastFieldType = fieldType;
Is this code compilable? lastFieldType is not declared.
> Source/WebCore/platform/text/LocaleWin.cpp:659 > +String LocaleWin::localizedShortTimeFormatText() > +{ > + if (m_shortTimeFormatText.isEmpty()) { > + // Note: LOCALE_SSHORTTIME is available for Windows 7 and later. > + m_shortTimeFormatText = parseWindowsTimeFormat(getLocaleInfoString(LOCALE_SSHORTTIME)); > + if (m_shortTimeFormatText.isEmpty()) > + m_shortTimeFormatText = localizedShortTimeFormatText();
Why calling this function recursively?
> Source/WebKit/chromium/tests/LocaleWinTest.cpp:63 > + en_US = 0x409, > + fr_FR = 0x40C, > + ja_JP = 0x411,
Please follow naming rule for enum.
http://www.webkit.org/coding/coding-style.html#names-enum-members
yosin
Comment 7
2012-07-10 22:20:19 PDT
Created
attachment 151597
[details]
Patch 4
yosin
Comment 8
2012-07-10 22:21:57 PDT
Comment on
attachment 151597
[details]
Patch 4 Could you review this patch? Thanks in advance. = Changes since the last review = * Fixed compilation error * Update enum names in LocaleWinTest.cpp * I uploaded wrong version of the files on Patch 3.
Kent Tamura
Comment 9
2012-07-10 22:42:04 PDT
Comment on
attachment 151597
[details]
Patch 4 View in context:
https://bugs.webkit.org/attachment.cgi?id=151597&action=review
> Source/WebCore/platform/text/LocaleWin.cpp:662 > + // Note: LOCALE_SSHORTTIME is available for Windows 7 and later. > + m_shortTimeFormatText = convertWindowsTimeFormatToLDML(getLocaleInfoString(LOCALE_SSHORTTIME)); > + if (m_shortTimeFormatText.isEmpty()) > + m_shortTimeFormatText = timeFormatText();
So, we always show a second field on Windows XP and Vista, and not show it on Windows 7 even though the HTML code is identical? i don't think such difference is acceptable.
Kent Tamura
Comment 10
2012-07-10 22:43:26 PDT
(In reply to
comment #8
)
> * I uploaded wrong version of the files on Patch 3.
Please always re-review your patch before uploading. Such patch wastes reviewer's time, and you made such mistakes many times.
yosin
Comment 11
2012-07-10 22:53:01 PDT
Created
attachment 151605
[details]
Patch 5
yosin
Comment 12
2012-07-10 22:55:11 PDT
Comment on
attachment 151605
[details]
Patch 5 Could you review this patch? Thanks in advance. = Changes since the last review = * Make LocaleWin::shortTimeFormatText not to use LOCALE_SSHORTTIME * Update LocaleWinTest/shortTimeFormatText
Kent Tamura
Comment 13
2012-07-10 23:50:36 PDT
Comment on
attachment 151605
[details]
Patch 5 ok
yosin
Comment 14
2012-07-10 23:52:35 PDT
Comment on
attachment 151605
[details]
Patch 5 Clearing flags on attachment: 151605 Committed
r122303
: <
http://trac.webkit.org/changeset/122303
>
yosin
Comment 15
2012-07-10 23:52:42 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.
Top of Page
Format For Printing
XML
Clone This Bug