Backed out changeset 78406bb70ae5 (bug 571807) for causing test failures (importing non-existent Locale.jsm). a=backout CLOSED TREE DONTBUILD

This commit is contained in:
Jorg K 2017-10-08 16:30:04 +02:00
Родитель 5465f674d9
Коммит 3f9dfa09f4
1 изменённых файлов: 3 добавлений и 10 удалений

Просмотреть файл

@ -7,7 +7,6 @@ var gCalThreadingEnabled;
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/Preferences.jsm");
Components.utils.import("resource://gre/modules/Locale.jsm");
// Usually the backend loader gets loaded via profile-after-change, but in case
// a calendar component hooks in earlier, its very likely it will use calUtils.
@ -628,15 +627,9 @@ var cal = {
// column without scrolling past all the empty values).
return -(seA.length - seB.length) * modifier;
}
// To support alphanumeric sorting.
let locale = Locale.getLocale();
if (modifier == 1) {
return seA.localeCompare(seB, locale,
{ numeric: true, sensitivity: 'base' });
} else {
return seB.localeCompare(seA, locale,
{ numeric: true, sensitivity: 'base' });
}
let collator = cal.createLocaleCollator();
let comparison = collator.compareString(0, seA, seB);
return comparison * modifier;
};
default:
return function(sortEntryA, sortEntryB) {