To implement input type "time" multiple fields UI, we need following functions for Windows: 1. localizedTimeFormatText() 2. localizedShortTimeFormatText() 3. timeAMPMLables()
Created attachment 151411 [details] Patch 1
Created attachment 151413 [details] Patch 1
Comment on attachment 151413 [details] Patch 1 Could you review this patch? Thanks in advance.
Created attachment 151418 [details] Patch 3
Comment on attachment 151418 [details] Patch 3 Could you review this patch? Thanks in advance.
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
Created attachment 151597 [details] Patch 4
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.
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.
(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.
Created attachment 151605 [details] Patch 5
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
Comment on attachment 151605 [details] Patch 5 ok
Comment on attachment 151605 [details] Patch 5 Clearing flags on attachment: 151605 Committed r122303: <http://trac.webkit.org/changeset/122303>
All reviewed patches have been landed. Closing bug.