RESOLVED FIXED 92976
Move number localization code in LocaleICU.cpp to new class
https://bugs.webkit.org/show_bug.cgi?id=92976
Summary Move number localization code in LocaleICU.cpp to new class
Kent Tamura
Reported 2012-08-02 04:51:49 PDT
Move number localization code in LocaleICU.cpp to new class
Attachments
Patch (18.50 KB, patch)
2012-08-02 04:55 PDT, Kent Tamura
no flags
Patch 2 (24.17 KB, patch)
2012-08-02 06:08 PDT, Kent Tamura
haraken: review+
Kent Tamura
Comment 1 2012-08-02 04:55:49 PDT
Kentaro Hara
Comment 2 2012-08-02 05:20:58 PDT
Comment on attachment 156041 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=156041&action=review r- due to a wrong copyright. > Source/WebCore/platform/text/NumberLocalizer.cpp:2 > + * Copyright (C) 2011 Google Inc. All rights reserved. 2012 > Source/WebCore/platform/text/NumberLocalizer.h:13 > + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND Please use Google's copyright. > Source/WebCore/platform/text/NumberLocalizer.h:54 > + String m_positivePrefix; > + String m_positiveSuffix; > + String m_negativePrefix; > + String m_negativeSuffix; > + bool m_hasNumberLocalizerData; It looks a bit buggy to set these values one by one in the initialization method of a sub class (i.e. LocaleICU::initializeNumberLocalizerData()). How about implementing NumberLocalizer::initializeNumberLocalizerData(String positivePrefix, String positiveSuffix, ...) that sets all data and flips m_hasNumberLocalizerData? LocaleICU::initializeNumberLocalizerData() can call NumberLocalizer::initializeNumberLocalizerData().
Kent Tamura
Comment 3 2012-08-02 05:25:55 PDT
Comment on attachment 156041 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=156041&action=review >> Source/WebCore/platform/text/NumberLocalizer.cpp:2 >> + * Copyright (C) 2011 Google Inc. All rights reserved. > > 2012 This is the copyright header of the original code. We should not replace it. But we should add 2012 because I added some code. >> Source/WebCore/platform/text/NumberLocalizer.h:13 >> + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND > > Please use Google's copyright. This is our standard copyright header. Please read a recent thread in our internal mail list.
Kentaro Hara
Comment 4 2012-08-02 05:37:47 PDT
Comment on attachment 156041 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=156041&action=review >>> Source/WebCore/platform/text/NumberLocalizer.h:13 >>> + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND >> >> Please use Google's copyright. > > This is our standard copyright header. Please read a recent thread in our internal mail list. Thanks for clarification. Makes sense.
Kent Tamura
Comment 5 2012-08-02 06:08:12 PDT
Kentaro Hara
Comment 6 2012-08-02 06:19:58 PDT
Comment on attachment 156059 [details] Patch 2 View in context: https://bugs.webkit.org/attachment.cgi?id=156059&action=review > Source/WebCore/ChangeLog:11 > + No new tests. This is just a refactoring. This patch is not a trivial refactoring. It would be better to list up a couple of existing tests that cover this change.
Kent Tamura
Comment 7 2012-08-02 08:54:21 PDT
Note You need to log in before you can comment on or make changes to this bug.