[Chromium-win] Refactor date/time format parsing code in LocaleWin
Created attachment 172535 [details] Patch
Comment on attachment 172535 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=172535&action=review > Source/WebCore/platform/text/win/LocaleWin.cpp:242 > + else > + converted.append("EEEE"); 'ddddd' is converted to 'EEEE'. Is it expected? > Source/WebCore/platform/text/win/LocaleWin.cpp:251 > + } else if (ch == 't') > + converted.append('a'); 't' and 'tt' are converted to 'a', which looks ok. 'ttt' is also converted to 'a', is it expected?
Comment on attachment 172535 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=172535&action=review >> Source/WebCore/platform/text/win/LocaleWin.cpp:242 >> + converted.append("EEEE"); > > 'ddddd' is converted to 'EEEE'. Is it expected? Yes. ddddd is invalid according to MSDN, and users can't set arbitrary format in Control Panel. ddddd should not appear unless OS is corrupted, and any behavior would be ok here. >> Source/WebCore/platform/text/win/LocaleWin.cpp:251 >> + converted.append('a'); > > 't' and 'tt' are converted to 'a', which looks ok. 'ttt' is also converted to 'a', is it expected? Ditto.
Comment on attachment 172535 [details] Patch Makes sense. Thanks for the clarification.
Comment on attachment 172535 [details] Patch Clearing flags on attachment: 172535 Committed r133712: <http://trac.webkit.org/changeset/133712>
All reviewed patches have been landed. Closing bug.
Re-opened since this is blocked by bug 101461
(In reply to comment #7) > Re-opened since this is blocked by bug 101461 Oh, XP-only failures. I found my change unveiled a bug in the XP/Vista-only path of LocaleWin::shortTimeFormat, which converts a format twice.
Committed r133842: <http://trac.webkit.org/changeset/133842>