Commit Graph

4447 Commits

Author SHA1 Message Date
Zibi Braniecki
83ea94f5ba Bug 1491394 - Update callsites to use new mozILocaleService API. r=jfkthame
Depends on D5924

Differential Revision: https://phabricator.services.mozilla.com/D6339

--HG--
extra : moz-landing-system : lando
2018-09-21 15:30:37 +00:00
Zibi Braniecki
8fdbb6d26b Bug 1491394 - Migrate mozILocaleService to use Array<> interface. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D5924

--HG--
extra : moz-landing-system : lando
2018-09-21 15:30:24 +00:00
Francesco Lodolo (:flod)
701def8dcf Bug 1492118 - Correct reference to intl.regional_prefs.use_os_locales in locale documentation r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D6142

--HG--
extra : moz-landing-system : lando
2018-09-18 16:06:27 +00:00
Francesco Lodolo (:flod)
f8e0411407 Bug 1492052 - Add naming convention for Fluent messages to documentation r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D6124

--HG--
extra : moz-landing-system : lando
2018-09-18 16:06:55 +00:00
Zibi Braniecki
7775d0c9c9 Bug 1491654 - Add lastFallbackLocale at the end of AppLocales. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D5985

--HG--
extra : moz-landing-system : lando
2018-09-18 08:44:47 +00:00
Zibi Braniecki
3a3372304e Bug 1491209 - Do not inject last fallback locale into requested locales. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D5839

--HG--
extra : moz-landing-system : lando
2018-09-14 10:15:40 +00:00
Brindusan Cristian
79316fbec0 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-09-14 12:56:57 +03:00
Jorg K
73b02cccc3 Bug 1490212 - Follow-up: Remove NS_{JA,RU,UK}*DETECTOR_CID defines. r=hsivonen 2018-09-14 01:07:00 +03:00
Brian Grinstead
aaf1aea124 Bug 1490457 - Add test for dynamically inserted localization links after parse;r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D5781

--HG--
extra : moz-landing-system : lando
2018-09-14 00:31:36 +00:00
Jorg K
2ed840c40b Bug 1490212 - Remove the *XPCOMStringDetector classes. r=hsivonen 2018-09-12 10:11:00 +03:00
Zibi Braniecki
164b059344 Bug 1490444 - Localization should register its observers. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D5574

--HG--
extra : moz-landing-system : lando
2018-09-11 23:40:39 +00:00
Ehsan Akhgari
38e3c284c9 Bug 1488659 - Part 2: Remove some dead code and mark the remaining detector classes as final; r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D5393
2018-09-10 07:59:42 -04:00
Ehsan Akhgari
15fb2860c4 Bug 1488659 - Part 1: Remove the XPCOM registrations for character detector classes; r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D5392
2018-09-10 07:59:42 -04:00
Sylvestre Ledru
aa37bde79b Bug 1489454 - Remove all trailing whitespaces (again) r=Ehsan
This also includes moving some files to the regular format.

Differential Revision: https://phabricator.services.mozilla.com/D5249

--HG--
extra : moz-landing-system : lando
2018-09-07 14:47:51 +00:00
Zibi Braniecki
4bf900d584 Bug 1455649 - DocumentL10n, part 4 - Switch Preferences to use DocumentL10n API. r=smaug
--HG--
extra : rebase_source : 969d8ac56c3a033b707fab4508423407386abd35
2018-09-06 18:30:37 -07:00
Zibi Braniecki
e78d123097 Bug 1455649 - DocumentL10n, part 3 - Plug DocumentL10n life cycle into DOM hooks. r=smaug
--HG--
extra : rebase_source : d071878d22b5fd204db8367780ee22be22196773
2018-09-06 18:28:40 -07:00
Zibi Braniecki
431a5526d8 Bug 1455649 - DocumentL10n, part 1 - Add C++ DocumentL10n API. r=smaug
Summary:
DocumentL10n is a DOM C++ API which serves as a bridge between
nsIDocument and mozDOMLocalization APIs.

MozReview-Commit-ID: 8LfOR4Haqlu

Reviewers: smaug

Reviewed By: smaug

Subscribers: mossop, smaug

Bug #: 1455649

Differential Revision: https://phabricator.services.mozilla.com/D2904

--HG--
extra : rebase_source : f57f363532ecc3456fb9ada734bda5b63b5ba511
2018-09-06 18:20:18 -07:00
Zibi Braniecki
2ca5d37f91 Bug 1455649 - DocumentL10n, part 0 - Add eager parameter to mozDOMLocalization::AddResources to trigger I/O early. r=mossop
Reviewers: mossop

Reviewed By: mossop

Bug #: 1455649

Differential Revision: https://phabricator.services.mozilla.com/D5093

--HG--
extra : rebase_source : 82de0c5b28ddedb9f589e47f46b9eafe379a4fa1
2018-09-06 18:19:26 -07:00
Ehsan Akhgari
e85d8f7ebd Bug 1489018 - Remove the XPCOM component registration for nsCollation; r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D5110
2018-09-06 10:07:12 -04:00
Zibi Braniecki
a7959b6272 Bug 1483038 - Optimize L10nRegistry generator to early exit on missing resources. r=mossop
Optimize L10nRegistry generator to early exit on missing resources.

Differential Revision: https://phabricator.services.mozilla.com/D3394

--HG--
extra : moz-landing-system : lando
2018-09-04 16:57:52 +00:00
shindli
72702be2ca Backed out changeset 6cd626758796 (bug 1483038) for ES lint failure in L10nRegistry 2018-09-04 19:45:06 +03:00
Zibi Braniecki
d5b262e43d Bug 1483038 - Optimize L10nRegistry generator to early exit on missing resources. r=mossop
Optimize L10nRegistry generator to early exit on missing resources.

Differential Revision: https://phabricator.services.mozilla.com/D3394

--HG--
extra : moz-landing-system : lando
2018-08-30 18:00:35 +00:00
Ehsan Akhgari
663b908ddf Bug 1488115 - Part 4: Remove nsUTF8ConverterService; r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D4875
2018-09-03 15:21:55 -04:00
Ehsan Akhgari
bdd980ba91 Bug 1488115 - Part 3: Move nsIUTF8ConverterService::ConvertStringToUTF8() to nsMIMEHeaderParamImpl.cpp since that is the only consumer site; r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D4874
2018-09-03 14:58:50 -04:00
Ehsan Akhgari
1a28ba6ef6 Bug 1488115 - Part 1: Remove nsIUTF8ConverterService::ConvertURISpecToUTF8() since it is unused; r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D4872
2018-09-03 14:58:50 -04:00
Henri Sivonen
cbab098175 Bug 1485343 - Avoid locale-dependent C standard library functions in FTP code. r=valentin
MozReview-Commit-ID: CXcluPKLwIv

Differential Revision: https://phabricator.services.mozilla.com/D4315

--HG--
extra : moz-landing-system : lando
2018-08-27 09:11:30 +00:00
Tiberius Oros
2ee9341d01 Merge inbound to mozilla-central. a=merge 2018-08-24 12:43:45 +03:00
Kris Maglione
2dee0aae3c Bug 1484496: Part 4b - Add intrinsic type information to most nsSimpleEnumerators. r=froydnj
This allows JS callers to automatically get the correct types during
interation, without having to explicitly specify them.

Differential Revision: https://phabricator.services.mozilla.com/D3728

--HG--
extra : rebase_source : b708f382d8ea571d199c669bfed5b5a7ca9ffac4
extra : histedit_source : 7df6feb82088c8a5ca45dc28fe4d2b852c177fee
2018-08-18 21:06:32 -07:00
Kris Maglione
65c28aa0ad Bug 1484496: Part 2 - Add common base class for all nsISimpleEnumerator implementations. r=froydnj
In order to allow JS callers to use nsISimpleEnumerator instances with the JS
iteration protocol, we'll need to additional methods to every instance. Since
we currently have a large number of unrelated implementations, it would be
best if they could share the same implementation for the JS portion of the
protocol.

This patch adds a stub nsSimpleEnumerator base class, and updates all existing
implementations to inherit from it. A follow-up will add a new base interface
to this class, and implement the additional functionality required for JS
iteration.

Differential Revision: https://phabricator.services.mozilla.com/D3725

--HG--
extra : rebase_source : ad66d7b266856d5a750c772e4710679fab9434b1
extra : histedit_source : a83ebffbf2f0b191ba7de9007f73def6b9a955b8
2018-08-18 14:22:47 -07:00
Zibi Braniecki
e689296a8d Bug 1465042 - Rename Locale::IsValid to ::IsWellFormed. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D4025

--HG--
extra : moz-landing-system : lando
2018-08-23 18:21:38 +00:00
Henri Sivonen
cca22e608a Bug 1473340 - Use bulk_write() in encoding_glue. r=nika
MozReview-Commit-ID: 7CpUiZFBpEn

Differential Revision: https://phabricator.services.mozilla.com/D3407

--HG--
extra : moz-landing-system : lando
2018-08-20 19:55:10 +00:00
André Bargull
026003522e Bug 1346211 - Part 5: Only remove 'exemplar city' names from ICU time zone names data files. r=Waldo
--HG--
extra : rebase_source : b8d72bac193198875fd8df965849e35c7b04e699
2018-07-24 03:07:14 -07:00
Henri Sivonen
3a52652295 Bug 1349528 - Use encoding_rs for normalizing USVString. r=smaug
MozReview-Commit-ID: 9uG6j8UdfKR

Differential Revision: https://phabricator.services.mozilla.com/D3413

--HG--
extra : moz-landing-system : lando
2018-08-16 10:15:07 +00:00
Thomas Wisniewski
78af5fd2ae Bug 1454590 - Align overrideMIMEType with the XMLHttpRequest Standard. r=hsivonen
MozReview-Commit-ID: 5k34F96jRPX

--HG--
extra : rebase_source : 95944acc3123406dbf490f2fd1837b8decaa3e0b
2018-08-13 16:12:10 -04:00
Henri Sivonen
3edc601325 Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj.
Correctness improvements:

 * UTF errors are handled safely per spec instead of dangerously truncating
   strings.

 * There are fewer converter implementations.

Performance improvements:

 * The old code did exact buffer length math, which meant doing UTF math twice
   on each input string (once for length calculation and another time for
   conversion). Exact length math is more complicated when handling errors
   properly, which the old code didn't do. The new code does UTF math on the
   string content only once (when converting) but risks allocating more than
   once. There are heuristics in place to lower the probability of
   reallocation in cases where the double math avoidance isn't enough of a
   saving to absorb an allocation and memcpy.

 * Previously, in UTF-16 <-> UTF-8 conversions, an ASCII prefix was optimized
   but a single non-ASCII code point pessimized the rest of the string. The
   new code tries to get back on the fast ASCII path.

 * UTF-16 to Latin1 conversion guarantees less about handling of out-of-range
   input to eliminate an operation from the inner loop on x86/x86_64.

 * When assigning to a pre-existing string, the new code tries to reuse the
   old buffer instead of first releasing the old buffer and then allocating a
   new one.

 * When reallocating from the new code, the memcpy covers only the data that
   is part of the logical length of the old string instead of memcpying the
   whole capacity. (For old callers old excess memcpy behavior is preserved
   due to bogus callers. See bug 1472113.)

 * UTF-8 strings in XPConnect that are in the Latin1 range are passed to
   SpiderMonkey as Latin1.

New features:

 * Conversion between UTF-8 and Latin1 is added in order to enable faster
   future interop between Rust code (or otherwise UTF-8-using code) and text
   node and SpiderMonkey code that uses Latin1.

MozReview-Commit-ID: JaJuExfILM9
2018-08-14 14:43:42 +03:00
Paul Bone
a769b94ed4 Bug 1482002 - add nsCaseInsensitiveStringComparator default constructor r=bz
--HG--
extra : rebase_source : 33354a2466e0695350669d309713694ff5b7b6ca
extra : source : 45c85611bd318a4b788ae9884a78af2ebe99e30e
2018-08-09 14:37:30 +10:00
Zibi Braniecki
6ddc6d1828 Bug 1480881 - Upgrade Gecko to Fluent 0.6. r=stas
Upgrade Gecko to Fluent 0.6.

Differential Revision: https://phabricator.services.mozilla.com/D2740

--HG--
extra : moz-landing-system : lando
2018-08-07 00:08:29 +00:00
Zibi Braniecki
16229f69ef Bug 1475903 - Add mozIDOMLocalization API. r=mossop
In order to use DOMLocalization from C++ we need an XPIDL interface.
mozIDOMLocalization exposes the class and functionality allowing DocumentL10n to hook into it.

MozReview-Commit-ID: GPMhw61LPEg

--HG--
extra : rebase_source : 65d6e2b84379e78201f0c8b674630d1f485aaf8c
2018-06-22 13:14:23 -07:00
Zibi Braniecki
a3c93fda4e Bug 1480798 - Set document's directionality in Fluent. r=stas
Set document's directionality in Fluent.

Differential Revision: https://phabricator.services.mozilla.com/D2732

--HG--
extra : moz-landing-system : lando
2018-08-03 21:13:19 +00:00
Coroiu Cristina
83ac803dc6 Backed out changeset c0bf622859f6 (bug 1480798) for chrome failures at intl/l10n/test/dom/test_domloc.xul 2018-08-03 23:55:25 +03:00
Zibi Braniecki
0abff42b51 Bug 1480798 - Set document's directionality in Fluent. r=stas
Set document's directionality in Fluent.

Differential Revision: https://phabricator.services.mozilla.com/D2732

--HG--
extra : moz-landing-system : lando
2018-08-03 17:21:37 +00:00
Cosmin Sabou
0d26acc69a Backed out changeset bfaeacf41b77 (bug 1475903) for causing leaks at nsTArray_base. 2018-08-02 10:39:02 +03:00
Zibi Braniecki
ee6c5d52d3 Bug 1475903 - Add mozIDOMLocalization API. r=mossop
In order to use DOMLocalization from C++ we need an XPIDL interface.
mozIDOMLocalization exposes the class and functionality allowing DocumentL10n to hook into it.

MozReview-Commit-ID: GPMhw61LPEg

--HG--
extra : rebase_source : 65d6e2b84379e78201f0c8b674630d1f485aaf8c
2018-06-22 13:14:23 -07:00
Andreea Pavel
7c754d1621 Backed out changeset fbbb0327f0f1 (bug 1475903) for failing intl/l10n/test/test_mozdomlocalization.js 2018-08-02 06:14:05 +03:00
Zibi Braniecki
0ce3ff104d Bug 1475903 - Add mozIDOMLocalization API. r=mossop
In order to use DOMLocalization from C++ we need an XPIDL interface.
mozIDOMLocalization exposes the class and functionality allowing DocumentL10n to hook into it.

MozReview-Commit-ID: GPMhw61LPEg

--HG--
extra : rebase_source : 62d5909d9db8858c2ad1b4234d6f9b9be8da7efd
2018-06-22 13:14:23 -07:00
Zibi Braniecki
a0c2cfd168 Bug 1479606 - Sync BCP47 language tags between processes, not lang tags. r=jfkthame
Sync BCP47 language tags between processes, not lang tags.

Differential Revision: https://phabricator.services.mozilla.com/D2579

--HG--
extra : moz-landing-system : lando
2018-07-31 21:42:37 +00:00
Axel Hecht
85cca5e505 bug 1478343, update Fluent migration docs, r=stas
The changes affecting the docs include:
Rename of EXTERNAL_ARGUMENT to VARIABLE_REFERENCE
Addition of TERM_REFERENCE

Docs already talk about variable references, too.

MozReview-Commit-ID: KUwPSqJyBn0

--HG--
extra : rebase_source : d1b8b3aa42716ba9884422687c8ae8946805bb1f
2018-07-26 11:17:57 +02:00
Jonathan Kew
98cb122caa Bug 1426827 - Treat Fitzpatrick skin-tone modifiers as cluster extenders when building textruns. r=m_kato 2018-07-25 09:38:10 +01:00
Jonathan Kew
c5cd6a1621 Bug 1477010 - Treat plane-14 tag characters as cluster extenders when building textruns, so that emoji flag sequences behave as single units. r=m_kato 2018-07-25 09:38:07 +01:00
Kris Maglione
43de9e89bf Bug 1473135: Stop using ReentrantMonitor for string bundle mutexes. r=gandalf
MozReview-Commit-ID: HUfb47Eei7P

--HG--
extra : rebase_source : a6edf2f1163b799e9c62eb510d5e52e7a9d014b8
2018-07-20 17:20:00 -07:00