Граф коммитов

4185 Коммитов

Автор SHA1 Сообщение Дата
Sebastian Hengst 261dd76eb6 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: ACCqbunIDpp
2017-09-09 11:44:38 +02:00
Zibi Braniecki 3523ff39ae Bug 1394977 - Move L10nRegistry to use async iterators. r=mossop
MozReview-Commit-ID: 5szrQ1UWJ64

--HG--
extra : rebase_source : b72a952128d0b4aed9a142c0e4d4b30b26960f80
2017-09-08 23:19:49 -07:00
Phil Ringnalda 8cb8e27250 Backed out changeset 97dbcd99280d (bug 1394977) for xpcshell failures in test_localization.js
MozReview-Commit-ID: 1ZyUZB7cigl
2017-09-08 22:21:00 -07:00
Kris Maglione 93fb7fb9ac Bug 1398357: Part 1 - Fix removal of LocaleService preference observers. r=gandalf
By the time the LocaleService destructor is called, by definition sInstance
has been cleared and its preference observers have been removed, since both
are strong references. In practice, this doesn't seem to cause trouble, but it
does lead to worrying warnings at shutdown in debug builds, which are annoying
red herrings when debugging other issues.

MozReview-Commit-ID: IalOigr2GWN

--HG--
extra : rebase_source : f86a8e81b91c639dedaca85e5bc3b53d54e01645
extra : histedit_source : 643b76de0d29ca4890ac4dd4175259989a63688e
2017-09-08 17:51:43 -07:00
Zibi Braniecki b45802f003 Bug 1394977 - Move L10nRegistry to use async iterators. r=mossop
MozReview-Commit-ID: I6KuXyoItOQ

--HG--
extra : rebase_source : 97c1ada528e3a1536ea64905023e5fa41311a9a6
2017-08-29 01:06:47 -07:00
Zibi Braniecki 02a6797952 Bug 1397925 - Refresh OSPreferences mSystemLocales when intl.locale.os changes. r=rnewman
MozReview-Commit-ID: oJdWUXwhZw

--HG--
extra : rebase_source : f66fe06990d4d55d39e9a7924c2d6039aa3c6772
2017-09-07 14:53:36 -07:00
Sebastian Hengst 4d0bad92dd merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: Gsw48p934sI
2017-09-02 10:54:44 +02:00
Zibi Braniecki b7a3ab7ad6 Bug 1347799 - Add DOMLocalization module for the new Localization API. r=mossop
MozReview-Commit-ID: Kw0U6I0E94F

--HG--
extra : rebase_source : 7f3ea6507bade3cd9d4afe45960340273cdb6bac
2017-08-25 11:16:30 -07:00
Henri Sivonen 3c8567b60d Bug 1354989 - Avoid pivoting via UTF-16 when loading CSS in the Stylo mode. r=jdm,SimonSapin
MozReview-Commit-ID: Llt29dvB4Io

--HG--
extra : rebase_source : 3ae51dc8beff3fb19e9318a6c7c30c9ab08a5b57
2017-08-29 16:01:42 +03:00
Mats Palmgren 0735644b45 Bug 815077 - Make unicode ETHIOPIC WORDSPACE count as a space character. r=jfkthame
MozReview-Commit-ID: DhUayZurZ00
2017-08-31 19:08:20 +02:00
Makoto Kato 2a3c054c7b Bug 1394661 - Use user locale instead of system locale for font fallback. r=gandalf
Until Firefox 54, font fallback uses user locale.  Example, OS is Windows 10 JA with JA UI, Firefox uses JA font for fallback even if Firefox is US version.

But since we changed some locale code on Firefox 55 development cycle, there were some regressions such as bug 1346674.  So we changed fallback locale to system locale (instead of Firefox UX locale) for font selection by bug 1348259.

It isn't good for old compatibility, so we should use user locale for font fallback like Firefox 54.  Now we can get user locale by OSPreferences::GetRegionalPrefsLocales, use it for font fallback


MozReview-Commit-ID: 7qwDDeU1ZPt

--HG--
extra : rebase_source : 3a307dd239bea516e117961a944b714bc43a993c
2017-08-30 17:33:12 +09:00
Emilio Cobos Álvarez ff0fdb1a67 Bug 1394311: Use lowercase consistently for looking up the language group. r=manishearth
This should be the only callee affected, given
gfxPlatformFontList::GetFontPrefLangFor already uses case-insensitive string
comparison.

This makes it also consistent with the rest of the functions in the file, which
lowercase their inputs as well.

MozReview-Commit-ID: 4fNUBdpayHL

--HG--
extra : rebase_source : d669f5da2a1ed06f6348fc6b86eb379b514ddcf3
2017-08-28 09:06:11 +02:00
Kris Maglione 5395a3712b Bug 1363482: Part 3 - Preload string bundles off-thread during startup. r=erahm
MozReview-Commit-ID: 3Fig5BS9xMz

--HG--
extra : rebase_source : 0eab403521cdb37c86a66f61c0cbcf291b699041
2017-08-31 17:23:08 -07:00
Henri Sivonen 610f9e27b1 Bug 1372230 part 2 - Update encoding_rs to 0.7.0 and encoding_c to 0.8.0. r=emk
MozReview-Commit-ID: DuK9BvVY50z

--HG--
extra : rebase_source : b7ce43f3fd61500e6adf642ea48e6774976d4eff
2017-08-28 12:22:25 +03:00
Henri Sivonen 5bf76fcb7e Bug 1372230 part 1 - Move the code behing mozilla::Encoding::ForName() from encoding_rs to encoding_glue. r=emk
MozReview-Commit-ID: 6cFRuyWoPhR

--HG--
extra : rebase_source : 9f91299d738b26decc3483d4e5af2265a9561566
2017-08-25 12:37:28 +03:00
Zibi Braniecki c5a354a1d6 Bug 1393928 - Expose intl/l10n .jsm APIs explicitly. r=mossop
MozReview-Commit-ID: Z57nlQJnQT

--HG--
extra : rebase_source : 5b6e5e804a14eef7847dfa1aada4588d401a43f6
2017-08-25 12:59:18 -07:00
Makoto Kato dd679562b1 Bug 1391628 - Use fallback locale on nsICollation if locale is invalid. r=emk
Original issue is that Microsoft Dynamics CRM uses invalid lang attribute in <xsl:sort>.

<xsl:sort order="descending"
          select="@displayname[$sortColumnName='displayname'] |
                  @name[$sortColumnName='name'] |
                  exslt:node-set($FriendlyTypeNames)/types/type[@xmlName=current()/@datatype and $sortColumnName='datatype']"
          lang="$languageName"/>

Our XSLT implementation detects "$languageName" as locale name, then use it to nsICollation.

Until Gecko 54 for Windows, even if using invalid locale name for nsICollation, it uses platform locale as fallback.  But from 55, we use same implementation as macOS's to use ICU.  So this issue occurs.  ICU implementation doesn't use fallback locale if it is invalid.

We should use fallback locale if locale is invalid.  Most code for fallback locale such as FallbackEncoding uses application locale, so use it.

MozReview-Commit-ID: EKYkZG7Hnz0

--HG--
extra : rebase_source : fec89c67317d7df041f3b237122fb7e20e32fe1b
2017-08-24 23:13:42 +09:00
Masayuki Nakano 6b9eda1dda Bug 1392181 - part2: HasRTLChars() should check if the character is at least equal or larger than the minimum RTL character, U+0590 r=emk
HasRTLChars() appears in profile of attachment 8848015 after landing the patches
for bug 1391538 because the landing made text in <input> or <textarea> always
treated as non-single byte characters.  Therefore, HasRTLChars() is now called
by nsTextFragment::SetTo() a lot in editors.

HasRTLChar() checks if it's in an RTL character for each character until it
becomes true.  However, if character is less than the minimum RTL character,
U+0590, it works faster at least for Western languages.

MozReview-Commit-ID: 4YecxQWUcmK

--HG--
extra : rebase_source : 172be670795f0e2155d4bd5044ee37f652367734
2017-08-21 18:03:21 +09:00
Nicholas Nethercote 8a72cf2251 Bug 1390428 (part 2, attempt 2) - Remove more nsXPIDLCString local variables. r=erahm.
--HG--
extra : rebase_source : 69d58b0cfb56efc6b03d8e2d7be2ce3c3e6cd843
2017-08-21 20:01:27 +10:00
Simon Lindholm 8b0e1c2942 Bug 1387780 - Optimize string searching in MatchAutoCompleteFunction. r=adw, r=emk 2017-08-20 17:21:00 -04:00
Jonathan Kew bd606d1190 Bug 1390550 - Update to latest libhyphen code from upstream. r=ryanvm 2017-08-17 09:58:29 +01:00
Nicholas Nethercote 025461bde7 Bug 1390428 (part 1) - Remove many nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is only used in ways that nsCStrings can also be used
(i.e. no null checks or implicit conversions to |char*|).

In every case the patch trivially replaces the nsXPIDLCString with an
nsCString. (Also, there are a couple of unused nsXPIDLCString variables that
the patch simply removes.)
2017-08-16 13:58:35 +10:00
Carsten "Tomcat" Book c329d562fb merge mozilla-inbound to mozilla-central a=merge 2017-08-09 11:37:08 +02:00
Nicholas Nethercote d4e19d954a Bug 1388253 - Convert nsTextFormatter:[v]smprintf() use to [v]ssprintf(). r=erahm.
[v]ssprintf() is just a better way of doing things.

--HG--
extra : rebase_source : 25337787b9557f8a7080a67645dba70609a8f646
2017-08-09 10:41:14 +10:00
Zibi Braniecki b69cead005 Bug 1347800 - Add Localization API for Gecko. r=mossop
MozReview-Commit-ID: 5wAde36zMHP

--HG--
extra : rebase_source : 1595b1c69ca2b2839724ed89020bfe22835ca05c
2017-06-02 10:36:56 +02:00
Zibi Braniecki 0c7d3529d7 Bug 1333980 - Introduce L10nRegistry.jsm. r=mossop
This patch introduces a new registry for localization resources to replace
ChromeRegistry. It uses asynchronous I/O and iterators to generate
permutations of possible sources of language resources for use in the new
Localization API.

In the initial form the API handles packages resources and has API for
interacting with the AddonsManager which will report language packs.

MozReview-Commit-ID: LfERDYMROh

--HG--
extra : rebase_source : 68a664c2c59a82b4dfcae66542c315a00ddae565
2017-06-02 10:36:08 +02:00
Zibi Braniecki 489d8a2762 Bug 1347801 - Land Fluent MessageContext (Parser, Resolver, Context). r=mossop
This patch lands the core of the new localization API:
 * Parser for the Fluent syntax called "FTL"
 * Resolver for the Fluent logic
 * MessageContext class which is a central class for storing and operating
   on Fluent messages.

MozReview-Commit-ID: E7nKGsLOCJe

--HG--
extra : rebase_source : 893178263744ef6cf6e64c135d28e10a53b61a19
2017-06-02 10:35:15 +02:00
Wes Kocher cd50c88082 Backed out changeset fdf9ccb0b9ab (bug 1347801) for browser_all_files_referenced.js failures a=backout
MozReview-Commit-ID: EiSV0Jreid4
2017-08-08 14:15:08 -07:00
Wes Kocher a27358fe6a Backed out changeset 3cb5dfb73fa3 (bug 1333980) for browser_all_files_referenced.js failures a=backout
MozReview-Commit-ID: 8dZ1lcv6p9V
2017-08-08 13:52:23 -07:00
Wes Kocher ad5da66d11 Backed out changeset 251857f1fb4b (bug 1347800) for depending on a patch that's getting backed out a=backout
MozReview-Commit-ID: 1IYi6G7gqEL
2017-08-08 13:52:07 -07:00
Zibi Braniecki 2d2811520c Bug 1347800 - Add Localization API for Gecko. r=mossop
MozReview-Commit-ID: 5wAde36zMHP

--HG--
extra : rebase_source : cebd6c7cee576ad23aa2583f7ecaa7aeef2a2279
2017-06-02 10:36:56 +02:00
Zibi Braniecki c41553945d Bug 1333980 - Introduce L10nRegistry.jsm. r=mossop
This patch introduces a new registry for localization resources to replace
ChromeRegistry. It uses asynchronous I/O and iterators to generate
permutations of possible sources of language resources for use in the new
Localization API.

In the initial form the API handles packages resources and has API for
interacting with the AddonsManager which will report language packs.

MozReview-Commit-ID: LfERDYMROh

--HG--
extra : rebase_source : a6e5b790142e5afb1ce750478190e5ad87012f8d
2017-06-02 10:36:08 +02:00
Zibi Braniecki dd3bc12304 Bug 1347801 - Land Fluent MessageContext (Parser, Resolver, Context). r=mossop
This patch lands the core of the new localization API:
 * Parser for the Fluent syntax called "FTL"
 * Resolver for the Fluent logic
 * MessageContext class which is a central class for storing and operating
   on Fluent messages.

MozReview-Commit-ID: E7nKGsLOCJe

--HG--
extra : rebase_source : 9bb4c7b155c8b9bd8923534b69f643a6e85bb8af
2017-06-02 10:35:15 +02:00
Kirk Steuber 260150bd23 Bug 1377377 - Preload string bundles during idle time r=smaug
MozReview-Commit-ID: H0hNHmzBWhO

--HG--
extra : rebase_source : dd83a3d97f5f1245ec4e18dde65b58d610fbfccc
2017-08-04 09:26:04 -07:00
Nicholas Nethercote f941156987 Bug 1386600 - Change nsIStringBundle methods to return |AString| instead of |wstring|. r=emk,sr=dbaron.
This removes about 2/3 of the occurrences of nsXPIDLString in the tree. The
places where nsXPIDLStrings are null-checked are replaced with |rv| checks.

The patch also removes a couple of unused declarations from
nsIStringBundle.idl.

Note that nsStringBundle::GetStringFromNameHelper() was merged into
GetStringFromName(), because they both would have had the same signature.

--HG--
extra : rebase_source : ac40bc31c2a4997f2db0bd5069cc008757a2df6d
2017-08-04 14:40:52 +10:00
Henri Sivonen 41573b4bfd Bug 1048191 - Remove capability to generate entities other than quot, amp, gt, lt and nbsp. r=emk.
MozReview-Commit-ID: CHQQzPHxrus

--HG--
extra : rebase_source : 0fad8c86a374c29ab9f691b53f6495aa8287cb65
2017-08-04 12:37:53 +03:00
Masatoshi Kimura 94ba908683 Bug 1313625 - Remove nsIScriptableDateFormat. r=jfkthame
MozReview-Commit-ID: C9Ek1aQRD2

--HG--
extra : rebase_source : 793cd9be63d652adc00897e071cd5fecde75d293
extra : source : 95baddd007c7c039ebf224c9eea49d50dba212cd
2017-08-03 16:46:55 +09:00
Masatoshi Kimura 49662ba6d1 Bug 1202362 - Remove nsISaveAsCharset & nsSaveAsCharset. r=hsivonen
MozReview-Commit-ID: KbepWLdKQ5E

--HG--
extra : rebase_source : 56d97edbaf933dc981c21ca09a49661fa3a347ef
2017-08-03 16:16:32 +09:00
Zibi Braniecki 086f522fa7 Bug 1356263 - Remove nsLocaleService, nsILocaleService and ns*Locale APIs. r=m_kato
MozReview-Commit-ID: D3N2Lztz5cE

--HG--
extra : rebase_source : c524148b047379ac625eb309e2e7e311c77569ef
2017-08-03 02:33:51 -07:00
Masatoshi Kimura f143125cc2 Bug 1326520 - Rename nsIURI.path to pathQueryRef. r=valentin.gosu
MozReview-Commit-ID: DqJdTGopR9G

--HG--
extra : rebase_source : e8c9eb03468c075b79013b6e0bd8b367229c24cd
2017-07-29 20:50:21 +09:00
Nicholas Nethercote d18fdecf67 Bug 1384834 (part 1) - Remove remaining uses of nsAdoptingString. r=erahm.
--HG--
extra : rebase_source : c81ee11b9d08198a000979760a8e29a01e9498d0
2017-07-28 11:21:45 +10:00
Nicholas Nethercote 72c884bf74 Bug 1384835 (part 3, attempt 2) - Remove the Preferences::Get*CString() variants that return nsAdoptingCString. r=froydnj.
--HG--
extra : rebase_source : d317b25be2ec21d1a60d25da3689e46cdce0b649
2017-07-31 14:28:48 +10:00
Nicholas Nethercote 581214bd8b Bug 1384835 (part 1, attempt 2) - Use nsA[C]String references instead of pointers for outparams of Get*String() pref functions. r=froydnj.
--HG--
extra : rebase_source : fe566945a55c281d8290634a5b55bed19415c839
2017-07-31 10:52:51 +10:00
Zibi Braniecki cc3d3ab8cd Bug 1379905 - Switch mozIntl, datetimebox and DateTimeFormat to use GetRegionalPrefsLocales. r=jfkthame,smaug
MozReview-Commit-ID: IqGbT6ZUfuN

--HG--
rename : dom/tests/mochitest/chrome/test_window_getAppLocales.html => dom/tests/mochitest/chrome/test_window_getRegionalPrefsLocales.html
extra : rebase_source : 3180b337ec33bfc8959d0189c8a53ca2c3306e95
2017-07-14 16:47:23 -07:00
Christoph Kerschbaumer a9630006b9 Bug 1382717 - Convert test test_ncr_fallback.html to comply with new data: URI inheritance model. r=smaug 2017-07-20 18:41:32 +02:00
Zibi Braniecki 64cd7643c9 Bug 1380916 - Introduce OSPreferences::GetRegionalPrefsLocales. r=jfkthame
Introduce a separate API for retrieving locale set from the host environment
used for regional preferences localization.

MozReview-Commit-ID: 3597QstZjS3

--HG--
extra : rebase_source : 2ac30ba2f2c9bd1ed308cfe7be88f6add4f0f5ae
2017-07-13 10:40:40 -07:00
Boris Zbarsky d51238dc20 Bug 1380549. Remove unnecessary strdup in stringbundle code. r=glandium
We just have one allocator around now.
2017-07-17 23:21:31 -04:00
Nicholas Nethercote 72a757ac00 Bug 1381410 (part 5) - Reorder nsStringBundle. r=emk.
This patch moves the destructor after the constructor, puts the
NS_IMPL_ISUPPORTS line in a more sensible spot, and moves the Get*() functions
before the Format*() functions in order to match the order in
nsIStringBundle.idl.

--HG--
extra : rebase_source : 54250432bd084acd628ab1834bd344687a2f961d
2017-07-17 18:37:32 +10:00
Nicholas Nethercote 5ea6cc2798 Bug 1381410 (part 4) - Add missing monitor enter in nsStringBundle::Format*() functions. r=emk.
GetStringFromName() enters mReentrantMonitor(), and the other Get*() functions
go through GetStringFromName(). But none of the Format*() functions enter the
monitor.

This patch moves some repeated code from GetStringFromName() and
FormatStringFromName() into GetStringFromNameHelper(), including the monitor
entry. All the Get*() and Format*() functions now use
GetStringFromNameHelper(), which means they now all enter the monitor.

--HG--
extra : rebase_source : 5d4c1931fb374d7aa10d6851f5ad8c0c774ffa79
2017-07-17 18:36:16 +10:00
Nicholas Nethercote cd092e2d5d Bug 1381410 (part 3) - Simplify nsExtensibleStringBundle::GetStringFromID(). r=emk.
Similar to the previous patch, this patch changes GetStringFromID() to call
GetStringFromName(), but this time in nsExtensibleStringBundle.

--HG--
extra : rebase_source : 38b12f5f0010396b2606969fb0c7baef96debe21
2017-07-17 18:34:31 +10:00