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

797 Коммитов

Автор SHA1 Сообщение Дата
Nicholas Nethercote 9252435548 Bug 1410794 (attempt 2) - Change some |string| occurrences in nsIPrefBranch.idl to |ACString|. r=erahm.
This makes the code nicer. In particular, it removes many getter_Copies()
calls. The patch also converts a lot of nsCStrings to nsAutoCString, which will
avoid heap allocation in the common case.

The patch also renames PREF_CopyCharPref() as PREF_GetCStringPref(), because
it's actually getting a string, not a char, and that matches the existing
GetCString() and GetDefaultCString() methods. Correspondingly, it also renames
PREF_SetCharPref() as PREF_SetCStringPref().

The |aPrefName| arguments in nsIPrefBranch.idl remain as |string| because they
almost always involve passing in C string literals, and passing "foo" is much
nicer than passing NS_LITERAL_CSTRING("foo").

It's worth noting that early versions of this patch used |AUTF8String| instead
of |ACString|. But it turns out that libpref stores prefs internally as Latin1.
And |ACString| is compatible with Latin1 but |AUTF8String| isn't, because
non-ASCII Latin1 strings are not valid UTF-8!

MozReview-Commit-ID: D3f7a1Vl1oE

--HG--
extra : rebase_source : e6e4b15d6d210cfd93686f96400281f02bd1d06b
2017-10-27 10:30:33 +11:00
Mithilan 28220f084a Bug 1403956 - Enable ESLint from chrome/ directory. r=standard8
MozReview-Commit-ID: LHSMjEKeNAe

--HG--
extra : rebase_source : 36c231e48283dc433fee748b8fbf4cf4ab13dd14
2017-10-26 16:56:18 -04:00
Zibi Braniecki 72cc1348b6 Bug 1352343 - Rename LocaleService::On* methods to LocaleService::*. r=jfkthame
MozReview-Commit-ID: LvEW9GcOodb

--HG--
extra : rebase_source : b54931ca7f80c4b7bb88255607ac976d9deb0bb8
2017-10-10 10:39:12 -07:00
Sebastian Hengst 4ae6666726 Backed out changeset 279dc744683e (bug 1352343) 2017-10-10 22:05:03 +02:00
Zibi Braniecki cfe1556078 Bug 1352343 - Rename LocaleService::On* methods to LocaleService::*. r=jfkthame
MozReview-Commit-ID: LvEW9GcOodb

--HG--
extra : rebase_source : dab3af0ef01aeedad9faed4c0999492eef97e684
2017-10-10 10:39:12 -07:00
Jonathan Kew ce97b2d154 Bug 1402860 - Remove ENABLE_INTL_API conditional from nsChromeRegistry. r=smaug 2017-09-25 17:32:34 +01:00
Chris Peterson a0c8081df4 Bug 870698 - Part 4: Replace Equals("") with EqualsLiteral(""). r=erahm
MozReview-Commit-ID: G1GhyvD29WK

--HG--
extra : rebase_source : 115842c37a40041bdca7b4e1ff0a5680b02ced15
extra : source : 90bfff9c01d80086cdc17637f310e898fea295ea
2017-09-06 01:13:45 -07:00
Chung-Sheng Fu 6a8ee766d6 Bug 863246 - Content can only load resource:// URIs declared content-accessible in manifests r=billm,bz
bz:
    caps/nsScriptSecurityManager.cpp

billm:
    browser/extensions/activity-stream/jar.mn
    browser/extensions/onboarding/jar.mn
    chrome/RegistryMessageUtils.h
    chrome/nsChromeRegistry.h
    chrome/nsChromeRegistryChrome.cpp
    chrome/nsChromeRegistryContent.cpp
    netwerk/protocol/res/SubstitutingProtocolHandler.cpp
    netwerk/protocol/res/SubstitutingProtocolHandler.h
    netwerk/protocol/res/nsIResProtocolHandler.idl
    netwerk/protocol/res/nsISubstitutingProtocolHandler.idl
    netwerk/protocol/res/nsResProtocolHandler.cpp
    netwerk/protocol/res/nsResProtocolHandler.h
    xpcom/components/ManifestParser.cpp

MozReview-Commit-ID: 1RXeNn7jdBf

--HG--
extra : rebase_source : 83000448abf58b7956c2eb122604d7ab38ad0f7c
2017-06-08 17:44:09 +08:00
Sebastian Hengst 163be910bb Backed out changeset 05fc8d2d7ca9 (bug 863246) for failing various reftests, e.g. parser/htmlparser/tests/reftest/bug535530-2.html. r=backout on a CLOSED TREE 2017-08-25 16:44:40 +02:00
Chung-Sheng Fu 68b806c637 Bug 863246 - Content can only load resource:// URIs declared content-accessible in manifests r=billm,bz
bz:
    caps/nsScriptSecurityManager.cpp

billm:
    browser/extensions/activity-stream/jar.mn
    browser/extensions/onboarding/jar.mn
    chrome/RegistryMessageUtils.h
    chrome/nsChromeRegistry.h
    chrome/nsChromeRegistryChrome.cpp
    chrome/nsChromeRegistryContent.cpp
    netwerk/protocol/res/SubstitutingProtocolHandler.cpp
    netwerk/protocol/res/SubstitutingProtocolHandler.h
    netwerk/protocol/res/nsIResProtocolHandler.idl
    netwerk/protocol/res/nsISubstitutingProtocolHandler.idl
    netwerk/protocol/res/nsResProtocolHandler.cpp
    netwerk/protocol/res/nsResProtocolHandler.h
    xpcom/components/ManifestParser.cpp

MozReview-Commit-ID: 1RXeNn7jdBf

--HG--
extra : rebase_source : 749673b7a5bb0b50192a57496b2ea7962bf6b2d7
2017-06-08 17:44:09 +08: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
Masatoshi Kimura 8ed4a80a4e Bug 1322874 - Get rid of nsIURI.originCharset. r=valentin.gosu
nsIURI.originCharset had two use cases:
 1) Dealing with the spec-incompliant feature of escapes in the hash
    (reference) part of the URL.
 2) For UI display of non-UTF-8 URLs.

For hash part handling, we use the document charset instead. For pretty
display of query strings on legacy-encoded pages, we no longer care to them
(see bug 817374 comment 18).

Also, the URL Standard has no concept of "origin charset". This patch
removes nsIURI.originCharset for reducing complexity and spec compliance.

MozReview-Commit-ID: 3tHd0VCWSqF

--HG--
extra : rebase_source : b2caa01f75e5dd26078a7679fd7caa319a65af14
2017-08-02 20:43:30 +09: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 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
Andrew McCreight cf00cf911b Bug 1379786, part 2 - Use nsContentUtils::GetSystemPrincipal in various places. r=mrbkap
MozReview-Commit-ID: KPXAqKeX4gI

--HG--
extra : rebase_source : 44fd734e7c5bbaba48bb25b882acc74cf0b81fb5
2017-07-10 14:24:54 -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
Honza Bambas 9e38f7b8fc Bug 1319111 - Expose 'result principal URI' on LoadInfo as a source for NS_GetFinalChannelURI (removes some use of LOAD_REPLACE flag). r=bz, r=mikedeboer
--HG--
extra : rebase_source : c9690f4b8decd39a10da676bd50ec09cb2ad8892
2017-05-30 18:07:59 +02:00
Ryan VanderMeulen 8543438674 Merge inbound to m-c. a=merge 2017-05-25 16:34:16 -04:00
Honza Bambas b852ed009a Backout of 7f28c1084c47 (bug 1319111) for security checks breakage, r=me 2017-05-25 18:16:02 +02:00
Greg Mierzwinski eabeafee3d Bug 1362816 - Prevent test_data_protocol_registration.js and test_no_remote_registration.js from overwriting previously registered factories. r=jmaher
This patch does two things. The first is that it fixes the two tests mentioned in the title by saving a previously registered XULAppInfoFactory, unregistering it, registering the new factory, and then at the end of the test re-registering the factory which was registered before the test started. The second thing this patch does is remove the skipping conditions for these two tests so we can run them on linux64-jsdcov.

MozReview-Commit-ID: 71c1nrYvx1M

--HG--
extra : rebase_source : 818fc5e7fff8ff9985e42835928f26fc13387788
2017-05-22 08:49:18 -04:00
Honza Bambas 2dfe5d94b8 Bug 1319111 - Expose 'result principal URI' on LoadInfo as a source for NS_GetFinalChannelURI (removes some use of LOAD_REPLACE flag). r=bz 2017-05-23 08:09:00 -04:00
Mike Hommey a48a121ef2 Bug 780562 - Remove support for the chrome "platform" flag. r=bsmedberg
Now that the sole use of the flag was removed, remove support for it.

--HG--
extra : rebase_source : 009290ef2938c91b14a2eabe74be6f69ce1dbdf3
2017-04-14 20:48:53 +09:00
Honza Bambas d6d727a69e backout of f9abb9c83452 (bug 1319111) for crashes, r=bz 2017-05-13 13:55:11 +02:00
Wes Kocher 0a1e1fe23b Backed out changeset 95ff98f1c2e5 (bug 1319111) for talos failures a=backout
MozReview-Commit-ID: Gs09moFm5rQ
2017-05-12 18:24:42 -07:00
Honza Bambas 70f62bdec1 backout of f9abb9c83452 (bug 1319111) for crashes, r=bz 2017-05-12 22:13:49 +02:00
Greg Mierzwinski 92afe39265 Bug 1348103 - Fix test_chrome_bookmarks.js error when collecting code coverage on linux64-jsdcov. r=Gijs
This patch first adds an argument to the 'do_get_file(...)' function call in 'test_chrome_bookmarks.js' that simply allows the 'chromefiles' folder to be non-existent if it does not exist. The 'CoverageUtils.jsm' file is then modified so that the import of 'osfile.jsm' does not interfere with any tests. So, it is now imported into the script after the test has completed. Two other tests have unwanted behaviour that cause code coverage collection to fail so they are also skipped through this patch.

MozReview-Commit-ID: H42HN1solkh

--HG--
extra : rebase_source : 82706778961cd5d7dee4f66eb691d8ec62bde365
2017-04-29 10:47:24 -04:00
Andrew McCreight a93d88fa19 Bug 1363542 - Remove unused nsChromeRegistry::ManifestProcessingContext::GetXPConnect() method. r=froydnj
MozReview-Commit-ID: KkhT1vd0adM

--HG--
extra : rebase_source : 0ddf294d163b6a7be5de960bd093bde0fda4e2ec
2017-05-09 14:16:24 -07:00
Andrea Marchesini 667a1e29ae Bug 1363395 - nsGlobalWindow::GetLocation should support to be called on the outer window, r=smaug 2017-05-09 22:41:19 +02:00
Andrea Marchesini a67a0a31e8 Bug 1362003 - nsGlobalWindow::GetLocation doesn't need to receive an ErrorResult param, r=bz
Renaming nsGlobalWindow::GetLocation() to Location().
2017-05-08 15:49:31 +02:00
Zibi Braniecki a34d2cddc8 Bug 1360596 - Test against overriden locale packages for available locales changed. r=jfkthame
In Fennec scenario, the package registration we should be monitoring for is different than "global".
OverrideLocalePackage handles the package overrides and gives us the right package name.

MozReview-Commit-ID: 44Nzd64CTq1

--HG--
extra : rebase_source : 848e98beae2222bce335f37ae87c60994ab6b0f9
2017-05-04 10:38:53 -07:00
Honza Bambas a1b64b4694 Bug 1319111 - Expose URI to make security check against on LoadInfo (no LOAD_REPLACE flag). r=bz 2017-01-27 19:10:01 +01:00
Tom Tromey 99f4608655 Bug 1334278 - change mozilla::Smprintf to return a UniquePtr; r=froydnj
Change mozilla::Smprintf and friends to return a UniquePtr, rather than
relying on manual memory management.  (Though after this patch there are
still a handful of spots needing SmprintfFree.)

MozReview-Commit-ID: COa4nzIX5qa

--HG--
extra : rebase_source : ab4a11b4d2e758099bd0794d5c25d799a7e42680
2017-03-03 08:17:27 -07:00
Zibi Braniecki 7ff88a7209 Bug 1348042 - Refactor LocaleService to operate in server-client mode. r=Ehsan,qdot
LocaleService serves two main functions. It is a central place for all code in the
engine to learn about locales, but it also does the language negotiation and selection.

The former is relevant in all processes, but the latter should only be performed
by the "main" process. In case of current Desktop Firefox, the parent process
is the one performing all the language negotiation, and content processes should
operate in the "client" mode.
In Fennec, there's a Java app on top of Gecko which should work as a "server"
and then all processes, including parent process of Gecko is merely a "client" for that.

This refactor finalizes this duality making it easily configurable to define in
which mode a given LocaleService operates.

The server-client model allows all clients to stay in sync with the server,
but operate transparently for all callers just returning the right values.

In order to initialize LocaleService in the client mode in child process with the
right locales I'm adding the list of app locales to the XPCOMInitData,
and then fire LocaleService::SetAppLocales in the child process initialization.

In order to keep the list up to date, I'm adding intl:app-locales-changed to
the list of observed topics, and when triggered, I send the updated list
to the child process, which updates LocaleService::SetAppLocales with the new
list.

MozReview-Commit-ID: K9X6berF3IO

--HG--
extra : rebase_source : ca5e502d064023fddfd63fe6fe5eccefce8dee52
2017-03-26 07:09:45 +02:00
Xidorn Quan 082e026668 Bug 1345696 part 1 - Lots of fixup for the next patch. r=heycam
The next patch moves nsCSSFontFaceRule into a separate header, which
somehow affects lots of header dependencies. I'm not completely sure
why this happens, though.

MozReview-Commit-ID: KuXbsaX0NUd

--HG--
extra : rebase_source : cef91018964b5488c5031df8aada90aa7fa0ad51
2017-03-28 20:05:12 +11:00
Zibi Braniecki ca25902077 Bug 1347306 - Hand over language negotiation from ChromeRegistry to LocaleService. r=jfkthame
MozReview-Commit-ID: RIPZUHN4LW

--HG--
extra : rebase_source : 3011d3c9f1887c9943d6636ea959bb643644bd3e
2017-03-14 15:28:47 -07:00
Tom Tromey 92ef297c7c Bug 1060419 - make nsChromeRegistry.cpp use Printf.h, r=froydnj
MozReview-Commit-ID: AMewawTLaGl

--HG--
extra : rebase_source : 8f964462ddd4d3c3f00857a0e27b12ce40813fd3
2016-12-09 09:58:57 -10:00
Carsten "Tomcat" Book e95ecef88f merge mozilla-inbound to mozilla-central a=merge 2017-02-03 13:25:24 +01:00
Jonathan Kew 2e0c0497f2 Bug 1312049 - Switch nsChromeRegistry::GetDirectionForLocale to use uloc_isRightToLeft instead of a list of known-rtl locales, and replace the now-obsolete intl.uidirection.* prefs with a single override intl.uidirection for testing purposes. r=gandalf 2017-02-02 22:12:50 +00:00
Zibi Braniecki da241c5563 Bug 1332207 - Introduce mozilla::intl::LocaleService. r=jfkthame
MozReview-Commit-ID: AV1bvCt6tmP

--HG--
extra : rebase_source : 1951fbecf24d991d204c0bf00de3336878886df1
2017-01-25 15:58:14 -08:00
Mark Banner 16e6d381ac Bug 503613 - Remove old 'tail =' lines from xpcshell.ini files; r=gps
MozReview-Commit-ID: 62Hp5ISxowJ

--HG--
extra : rebase_source : daa8efb3409031fea553f4fd0c9d0746e38dc308
extra : histedit_source : b4c23aacf678ba0d0ac9c09191a7c494ead11a08
2017-01-18 10:30:39 +00:00
Florian Quèze fc6379e827 Bug 1329182 - remove trailing newURI null parameters in the rest of the tree, r=jaws. 2017-01-09 20:27:26 +01:00
Joel Maher 70c34fbe84 Bug 1328388 - add BUG_COMPONENT to chrome/* files. r=bsmedberg
MozReview-Commit-ID: H9IhFeOroZE
2017-01-06 11:33:44 -05:00
Wei-Cheng Pan 2351d9ac6c Bug 1323946 - Use MOZ_MUST_USE for netwerk/protocol/res r=valentin
MozReview-Commit-ID: 7tcOml6jKdj

--HG--
extra : rebase_source : 76cae2125b93ad68871408187f04ef02bcc228c6
2016-11-04 18:13:13 +08:00
Sebastian Hengst d925b006c8 Bug 1310297 - Remove test annotations using b2g, mulet or gonk: chrome. r=RyanVM
MozReview-Commit-ID: Axd8PWgm4pl

--HG--
extra : rebase_source : 82e33dd94fc52038f1fb2ea62df68d7a74f1a21f
2016-11-05 11:29:13 +01:00
Sebastian Hengst 9f0251834f Backed out changeset 3198f930b755 (bug 1312049) for frequent timeouts in M(oth) toolkit/content/tests/chrome/test_tooltip.xul on Windows opt and pgo. r=backout a=backout
MozReview-Commit-ID: 9m1YbuXkj
2016-10-29 15:29:01 +02:00
Jonathan Kew 93d9efc143 Bug 1312049 - Switch nsChromeRegistry::GetDirectionForLocale to use uloc_isRightToLeft. r=gandalf 2016-10-28 12:04:07 +01:00
Jonathan Kew e007b6ec83 Bug 1301655 - pt 0 - Add an optional parameter to nsIChromeRegistry.getSelectedLocale to allow callers to request the locale be returned as a valid BCP47 lang tag. r=gandalf 2016-10-28 12:04:06 +01:00
Xidorn Quan 2f49a48a09 Bug 1304302 part 10 - Replace all uses of StyleSheetHandle. r=heycam
This commit is generated by the following commands with some minor
manual adjustment:

find . \( -name '*.h' -or -name '*.cpp' \) -not -path './layout/style/StyleSheet*' -exec sed -i -b \
  -e '/^\(#include\|using\)/s/StyleSheetHandle/StyleSheet/g' \
  -e 's/\(mozilla::\)\?StyleSheetHandle::RefPtr/RefPtr<\1StyleSheet>/g' \
  -e 's/StyleSheetHandle()/nullptr/g' \
  -e 's/->AsStyleSheet()//g' \
  -e 's/StyleSheetHandle/StyleSheet*/g' {} +
sed -i -b 's/sheet->AsVoidPtr()/sheet.get()/' layout/style/Loader.cpp
sed -i -b 's/AsHandle()/this/' layout/style/StyleSheet.cpp

MozReview-Commit-ID: 7abdvlKHukd

--HG--
extra : source : e5682242db07203b5a91810fe1e243c955310588
2016-09-26 22:03:25 +10:00
Nicholas Nethercote 37301e25ad Bug 1297300 - Add missing checks to GetSpec() calls in netwerk/. r=hurley,dragana.
--HG--
extra : rebase_source : 961a82fb6e723688837e5250f57121c14ca958cb
2016-08-26 16:40:57 +10:00
Michael Layzell 36e08437d0 Bug 1018486 - Part 8: Various other changes, r=smaug
MozReview-Commit-ID: B0dsomkWgEk
2016-09-07 10:50:45 -04:00