Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Unified Diff: src/i18n.cc

Issue 2717613005: [intl] Fix NumberFormat options handling spec compliance issues (Closed)
Patch Set: Remove test262 failure expectation line Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/js/i18n.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/i18n.cc
diff --git a/src/i18n.cc b/src/i18n.cc
index 81a8663d149a3ab57201109394c481e66f52516f..0bebc739412c70b59129884fa707fb6a39213755 100644
--- a/src/i18n.cc
+++ b/src/i18n.cc
@@ -274,23 +274,6 @@ icu::DecimalFormat* CreateICUNumberFormat(
delete number_format;
return NULL;
}
-
- UErrorCode status_digits = U_ZERO_ERROR;
-#if U_ICU_VERSION_MAJOR_NUM >= 59
- uint32_t fraction_digits = ucurr_getDefaultFractionDigits(
- icu::toUCharPtr(currency.getTerminatedBuffer()), &status_digits);
-#else
- uint32_t fraction_digits = ucurr_getDefaultFractionDigits(
- currency.getTerminatedBuffer(), &status_digits);
-#endif
- if (U_SUCCESS(status_digits)) {
- number_format->setMinimumFractionDigits(fraction_digits);
- number_format->setMaximumFractionDigits(fraction_digits);
- } else {
- // Set min & max to default values (previously in i18n.js)
- number_format->setMinimumFractionDigits(0);
- number_format->setMaximumFractionDigits(3);
- }
} else if (style == UNICODE_STRING_SIMPLE("percent")) {
number_format = static_cast<icu::DecimalFormat*>(
icu::NumberFormat::createPercentInstance(icu_locale, status));
« no previous file with comments | « no previous file | src/js/i18n.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698