Bug 974175 - Stop using grouping separator characters when displaying <input type=number>'s value. r=ehsan, a=sledru
authorJonathan Watt <jwatt@jwatt.org>
Thu, 20 Feb 2014 12:31:05 +0000
changeset 182962 dcc0c762333c37caf43c13443c042e1816b6a9d9
parent 182961 beade305b6f49c064a783cdd5fd8f6d914871b6d
child 182963 9ea122ff54b651babcff501c4e52d9d38e91ba26
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan, sledru
bugs974175
milestone29.0a2
Bug 974175 - Stop using grouping separator characters when displaying <input type=number>'s value. r=ehsan, a=sledru
intl/unicharutil/util/ICUUtils.cpp
--- a/intl/unicharutil/util/ICUUtils.cpp
+++ b/intl/unicharutil/util/ICUUtils.cpp
@@ -11,29 +11,34 @@
 #include "nsIDocument.h"
 #include "nsIToolkitChromeRegistry.h"
 #include "nsStringGlue.h"
 #include "unicode/uloc.h"
 #include "unicode/unum.h"
 
 using namespace mozilla;
 
+/**
+ * This pref just controls whether we format the number with grouping separator
+ * characters when the internal value is set or updated. It does not stop the
+ * user from typing in a number and using grouping separators.
+ */
 static bool gLocaleNumberGroupingEnabled;
 static const char LOCALE_NUMBER_GROUPING_PREF_STR[] = "dom.forms.number.grouping";
 
 static bool
 LocaleNumberGroupingIsEnabled()
 {
   static bool sInitialized = false;
 
   if (!sInitialized) {
     /* check and register ourselves with the pref */
     Preferences::AddBoolVarCache(&gLocaleNumberGroupingEnabled,
                                  LOCALE_NUMBER_GROUPING_PREF_STR,
-                                 true);
+                                 false);
     sInitialized = true;
   }
 
   return gLocaleNumberGroupingEnabled;
 }
 
 void
 ICUUtils::LanguageTagIterForContent::GetNext(nsACString& aBCP47LangTag)