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

4165 Коммитов

Автор SHA1 Сообщение Дата
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
Nicholas Nethercote e33bd03721 Bug 1381410 (part 2) - Remove nsStringBundle::GetStringFromIDHelper(). r=emk.
GetStringFromIDHelper() is very similar to GetSringFromNameHelper(). This patch
removes the former, and changes GetStringFromID() to call GetStringFromName(),
similar to how FormatStringFromID() calls FormatStringFromName().

--HG--
extra : rebase_source : ca1d6abffde106d5409b71c8c181fd604fc974ce
2017-07-17 18:32:57 +10:00
Nicholas Nethercote 59910cce0a Bug 1381410 (part 1) - Rename two protected methods in nsStringBundle. r=emk.
nsStringBundle has two public methods GetStringFrom{ID,Name}() and two
very similar helper methods with the same name. It's easy to get confused
between the two -- indeed, it may be the reason for the data race that this bug
is about -- so this patch renames the helper functions by adding a "Helper"
suffix.

--HG--
extra : rebase_source : 75a15e91c50c4b50b2984377980785b64fcf8852
2017-07-17 18:32:16 +10:00
Christoph Kerschbaumer 1fe2489488 Bug 1380752 - Convert tests within intl/ to comply with new data: URI inheritance model. r=smaug 2017-07-14 12:17:41 +02:00
Nicholas Nethercote c86dc10505 Bug 1380227 - Avoid many UTF16toUTF8 and UTF8toUTF16 conversions in nsStringBundle. r=emk.
Most of the names passed to nsIStringBundle::{Get,Format}StringFromUTF8Name
have one of the two following forms:

- a 16-bit C string literal, which is then converted to an 8-bit string in
  order for the lookup to occur;

- an 8-bit C string literal converted to a 16-bit string, which is then
  converted back to an 8-bit string in order for the lookup to occur.

This patch introduces and uses alternative methods that can take an 8-bit C
string literal, which requires changing some signatures in other methods and
functions. It replaces all C++ uses of the old methods.

The patch also changes the existing {Get,Format}StringFromName() methods so
they take an AUTF8String argument for the name instead of a wstring, because
that's nicer for JS code.

Even though there is a method for C++ code and a different one for JS code,
|binaryname| is used so that the existing method names can be used for the
common case in both languages.

The change reduces the number of NS_ConvertUTF8toUTF16 and
NS_ConvertUTF16toUTF8 conversions while running Speedometer v2 from ~270,000 to
~160,000. (Most of these conversions involved the string
"deprecatedReferrerDirective" in nsCSPParser.cpp.)

--HG--
extra : rebase_source : 3bee57a501035f76a81230d95186f8c3f460ff8e
2017-07-12 15:13:37 +10:00
Tom Ritter 26b59ebfb5 Bug 1380083 - Pull in upstream ICU patch that changes '\' to '/' in #include. r=andre,m_kato
Upstream: http://bugs.icu-project.org/trac/changeset/40102

MozReview-Commit-ID: 88aECdijOxr

--HG--
extra : rebase_source : 9695367158b37dfebcd35387f9de56e3b7cc91fe
extra : histedit_source : cdeb402b6da62a5e8da595d976ba1a067fa12b25
2017-07-12 12:34:50 -05:00
Zibi Braniecki 46bd8f3dec Bug 1379420 - Introduce LocaleService::GetRegionalPrefsLocales. r=jfkthame
In scenarios where users use OS in one locale set and the App in another,
users should be able to chose which locale set to follow for regional
preferences. This method should be used over getAppLocales for all cases
where the locales are used to format regional preferences related
items like calendars, dates, units etc.

MozReview-Commit-ID: OOBYIZCKXE

--HG--
extra : rebase_source : be1b96728ff85b6c3e96a2a08db737c3e247cbbc
2017-07-08 13:54:04 -07:00
André Bargull 7be99b0beb Bug 1373763: Extend scope for local variable in uprv_convertToPosix. r=dmajor
--HG--
extra : rebase_source : 7664d67626d00c17e7f2d46277a8dd7605b52eb9
2017-06-29 10:22:07 -07:00
Wes Kocher 19d135c982 Merge m-c to autoland, a=merge
MozReview-Commit-ID: 4R4GFHPiij
2017-07-06 16:19:38 -07:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Jonathan Kew ae5077eec2 Bug 1378683 - Fix incorrectly-written retry loop in nsUnicodeNormalizer. r=sylvestre 2017-07-06 11:33:23 +01:00
Jonathan Kew e0b78e9b57 Bug 1377584 - Update casing (text-transform) test data to Unicode 10.0 repertoire. r=m_kato 2017-07-04 09:19:53 +01:00
Nicholas Nethercote 3e439bb4f8 Bug 1376638 - Minimize uses of prmem.h. r=glandium.
It's silly to use prmem.h within Firefox code given that in our configuration
its functions are just wrappers for malloc() et al. (Indeed, in some places we
mix PR_Malloc() with free(), or malloc() with PR_Free().)

This patch removes all uses, except for the places where we need to use
PR_Free() to free something allocated by another NSPR function; in those cases
I've added a comment explaining which function did the allocation.

--HG--
extra : rebase_source : 0f781bca68b5bf3c4c191e09e277dfc8becffa09
2017-06-30 19:05:41 -07:00
Jonathan Kew 7be1139537 Bug 1376834 - Update data tables to Unicode 10.0 release. r=m_kato 2017-06-30 14:16:02 -07:00
André Bargull f277dc9e4b Bug 1353650 - Part 4: Update to ICU 59. rs=Waldo
--HG--
extra : rebase_source : bb1dcedef639ae3a9ee76521d8f9212831918ce4
2017-04-19 07:00:05 -07:00
André Bargull 1165535aa2 Bug 1353650 - Part 1: Adjust custom ICU patches for ICU 59 update. r=Waldo
--HG--
extra : rebase_source : 50bc963fb87eda50da851f9d903fb71227de13bd
2017-04-19 06:54:47 -07:00
Masatoshi Kimura b515c9c804 Bug 1373984 - Turn nsIDocument::mCharacterSet into mozilla::NotNull<const mozilla::Encoding*>. r=hsivonen
MozReview-Commit-ID: GF0YXDwfA14

--HG--
extra : rebase_source : fdae0046f882d47fb539a7f882364e5c5caafdcd
extra : source : 49249788c0dee331ac2989dc39f0505d965a7bd8
2017-06-18 20:37:50 +09:00
Sebastian Hengst dfc1ad2562 Backed out changeset 7235d05662b0 (bug 1373984) for Android bustage. r=backout on a CLOSED TREE 2017-06-25 18:30:13 +02:00
Masatoshi Kimura 2e04751921 Bug 1373984 - Turn nsIDocument::mCharacterSet into mozilla::NotNull<const mozilla::Encoding*>. r=hsivonen
MozReview-Commit-ID: GF0YXDwfA14

--HG--
extra : rebase_source : a84ab644f52e68676b45f112ff69f868d89f6177
extra : source : 49249788c0dee331ac2989dc39f0505d965a7bd8
2017-06-18 20:37:50 +09:00
Wes Kocher e02435a31e Backed out changeset 77af189b5c49 (bug 1373984) for build bustage in nsHtml5Parser.cpp a=backout CLOSED TREE
MozReview-Commit-ID: 6kBmU71j2To
2017-06-25 05:10:14 -07:00
Masatoshi Kimura 241039fd97 Bug 1373984 - Turn nsIDocument::mCharacterSet into mozilla::NotNull<const mozilla::Encoding*>. r=hsivonen
MozReview-Commit-ID: GF0YXDwfA14

--HG--
extra : rebase_source : 09da1685795583513bf019d61c58230c2c4d298d
extra : source : 49249788c0dee331ac2989dc39f0505d965a7bd8
2017-06-18 20:37:50 +09:00