RESOLVED FIXED 78326
Do not reformat strings in <input type=number> on platforms using LocalizedNumberICU
https://bugs.webkit.org/show_bug.cgi?id=78326
Summary Do not reformat strings in <input type=number> on platforms using LocalizedNu...
Kent Tamura
Reported 2012-02-09 21:41:39 PST
Do not reformat strings in <input type=number> on platforms using LocalizedNumberICU. Note that LocalizedNumberICU is used only on Chromium port for now.
Attachments
Patch (20.68 KB, patch)
2012-02-09 22:12 PST, Kent Tamura
no flags
Patch 2 (22.20 KB, patch)
2012-02-09 23:00 PST, Kent Tamura
no flags
Patch 3 (22.23 KB, patch)
2012-02-16 18:13 PST, Kent Tamura
no flags
Patch 4 (23.54 KB, patch)
2012-03-05 22:13 PST, Kent Tamura
morrita: review+
Kent Tamura
Comment 1 2012-02-09 22:12:21 PST
WebKit Review Bot
Comment 2 2012-02-09 22:14:59 PST
Attachment 126452 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebKit/chromium/tests/LocalizedNumberICUTest.cpp:33: You should add a blank line after implementation file's own header. [build/include_order] [4] Source/WebCore/platform/text/LocalizedNumberICU.cpp:33: Found header this file implements after a header this file implements. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4] Source/WebCore/platform/text/LocalizedNumberICU.cpp:213: One line control clauses should not use braces. [whitespace/braces] [4] Total errors found: 3 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Review Bot
Comment 3 2012-02-09 22:44:25 PST
Comment on attachment 126452 [details] Patch Attachment 126452 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/11447568 New failing tests: fast/speech/input-appearance-numberandspeech.html
Kent Tamura
Comment 4 2012-02-09 23:00:03 PST
Created attachment 126459 [details] Patch 2 style errors and test_expectations.txt
Eric Seidel (no email)
Comment 5 2012-02-16 13:39:02 PST
Comment on attachment 126459 [details] Patch 2 View in context: https://bugs.webkit.org/attachment.cgi?id=126459&action=review > Source/WebCore/ChangeLog:8 > + We had buss such as stripping leading zeros, dropping lower digits bugs?
Kent Tamura
Comment 6 2012-02-16 18:13:29 PST
Created attachment 127490 [details] Patch 3 buss
Hajime Morrita
Comment 7 2012-03-05 20:50:53 PST
Comment on attachment 127490 [details] Patch 3 View in context: https://bugs.webkit.org/attachment.cgi?id=127490&action=review > Source/WebCore/platform/text/LocalizedNumberICU.cpp:173 > + if (matches(input, 0, prefix) && matches(input, endIndex - suffix.length(), suffix)) { isn't it possible to underflow |endIndex - suffix.length()|? > Source/WebCore/platform/text/LocalizedNumberICU.cpp:203 > + for (; symbolIndex < DecimalSymbolsSize; ++symbolIndex) { I hope these have named as a functions. > Source/WebCore/platform/text/LocalizedNumberICU.h:62 > + String m_decimalSymbols[12]; nit: Could be m_decimalSymbols[DecimalSymbolsSize] ?
Kent Tamura
Comment 8 2012-03-05 21:45:25 PST
Comment on attachment 127490 [details] Patch 3 View in context: https://bugs.webkit.org/attachment.cgi?id=127490&action=review >> Source/WebCore/platform/text/LocalizedNumberICU.cpp:173 >> + if (matches(input, 0, prefix) && matches(input, endIndex - suffix.length(), suffix)) { > > isn't it possible to underflow |endIndex - suffix.length()|? it's possible. Thank you for pointing out. I'll fix it and two instances below. >> Source/WebCore/platform/text/LocalizedNumberICU.cpp:203 >> + for (; symbolIndex < DecimalSymbolsSize; ++symbolIndex) { > > I hope these have named as a functions. What are 'these' pointing? Do you mean this 'for' loop should be a separated function? >> Source/WebCore/platform/text/LocalizedNumberICU.h:62 >> + String m_decimalSymbols[12]; > > nit: Could be m_decimalSymbols[DecimalSymbolsSize] ? Will fix.
Kent Tamura
Comment 9 2012-03-05 22:13:55 PST
Created attachment 130287 [details] Patch 4 Apply review comments
Hajime Morrita
Comment 10 2012-03-06 00:50:36 PST
Comment on attachment 130287 [details] Patch 4 View in context: https://bugs.webkit.org/attachment.cgi?id=130287&action=review ok. > Source/WebCore/platform/text/LocalizedNumberICU.cpp:142 > +template <class StringType> bool matches(const String& text, unsigned position, const StringType& part) Can be static or ALWAYS_INLINE to save namespace pollution?
Kent Tamura
Comment 11 2012-03-06 01:13:03 PST
Kent Tamura
Comment 12 2012-03-06 01:15:20 PST
Thank you! (In reply to comment #10) > > Source/WebCore/platform/text/LocalizedNumberICU.cpp:142 > > +template <class StringType> bool matches(const String& text, unsigned position, const StringType& part) > > Can be static or ALWAYS_INLINE to save namespace pollution? I added static.
Note You need to log in before you can comment on or make changes to this bug.