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

928 Коммитов

Автор SHA1 Сообщение Дата
Gijs Kruitbosch 8002a3c48c Bug 1678255 - prompt for external protocol links whose loads were also triggered externally, instead of looping forever, r=pbz,nika
This passes around the "are we external" bit of load information a bunch,
such that the external protocol handling code has access to it.

In this bug and bug 1667468, I think ideally I would have used a check
if we're the OS default for a given protocol before continuing. However,
this information is currently unavailable on Linux (bug 1599713), and
worse, I believe is likely to remain unavailable in flatpak and other
such restricted environments (cf. bug 1618094 - we aren't able to find
out anything about protocol handlers from the OS).

So instead, we prompt the user if we are about to open a link passed
to us externally. There is a small chance this will be Breaking People's
Workflows, where I don't know whether anyone relies on Firefox happily
passing these URIs along to the relevant application (more convenient
than doing all the registry/API work yourself in scripts!) or anything
like that. To help with that, there's a pref,
`network.protocol-handler.prompt-from-external`, that can be created and
set to false to avoid prompting in this case.

Differential Revision: https://phabricator.services.mozilla.com/D103967
2021-02-22 19:00:10 +00:00
Alexis Beingessner 07f2f659c6 Bug 1686616 - make StringBundle use Components instead of Services. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D105531
2021-02-18 13:26:32 +00:00
Tom Schuster 5d507ef2c6 Bug 1692720 - Don't force extension for office mime types. r=Gijs
I am not conviced that we have all the correct MIME types and extensions here.
It also extremely hard to figure out what the correct information is.
We should drop this.

Differential Revision: https://phabricator.services.mozilla.com/D105358
2021-02-17 11:37:54 +00:00
Noemi Erli e9cf2ebf0d Backed out changeset 89dd5f05ca91 (bug 1678255) for causing assertion failures in BasePrincipal.cpp CLOSED TREE 2021-02-11 06:15:26 +02:00
Gijs Kruitbosch ee25637a13 Bug 1678255 - prompt for external protocol links whose loads were also triggered externally, instead of looping forever, r=pbz,nika
This passes around the "are we external" bit of load information a bunch,
such that the external protocol handling code has access to it.

In this bug and bug 1667468, I think ideally I would have used a check
if we're the OS default for a given protocol before continuing. However,
this information is currently unavailable on Linux (bug 1599713), and
worse, I believe is likely to remain unavailable in flatpak and other
such restricted environments (cf. bug 1618094 - we aren't able to find
out anything about protocol handlers from the OS).

So instead, we prompt the user if we are about to open a link passed
to us externally. There is a small chance this will be Breaking People's
Workflows, where I don't know whether anyone relies on Firefox happily
passing these URIs along to the relevant application (more convenient
than doing all the registry/API work yourself in scripts!) or anything
like that. To help with that, there's a pref,
`network.protocol-handler.prompt-from-external`, that can be created and
set to false to avoid prompting in this case.

Differential Revision: https://phabricator.services.mozilla.com/D103967
2021-02-10 23:49:21 +00:00
Tom Schuster 8e9a86f0c2 Bug 1690529 - List more valid iCalendar file extensions in extraMimeEntries. r=Gijs
Taken from the table on https://en.wikipedia.org/wiki/ICalendar

Differential Revision: https://phabricator.services.mozilla.com/D104310
2021-02-08 11:08:51 +00:00
Tom Schuster 9011e911cf Bug 1690051 - Make browser.download.sanitize_non_media_extensions work and test it. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D103695
2021-02-03 10:55:33 +00:00
Butkovits Atila dfd4e3978e Backed out changeset 0aab2ac0976a (bug 1690051) for causing failures on browser_bug676619.js. CLOSED TREE 2021-02-01 23:39:37 +02:00
Tom Schuster d861d0f45a Bug 1690051 - Make browser.download.sanitize_non_media_extensions work and test it. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D103695
2021-02-01 18:22:23 +00:00
Gijs Kruitbosch b3aec77f8f Bug 1681249 - unbreak subframes navigating ancestor frames to custom protocols, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D101238
2021-01-14 20:17:44 +00:00
Gijs Kruitbosch 99d00629e6 Bug 1684183 - stop replacing file extensions for zip, json and xml files, and add a pref in case further issues appear for the other document types r=evilpie
Differential Revision: https://phabricator.services.mozilla.com/D100801
2021-01-06 19:16:48 +00:00
Sebastian Streich 4e9a38f624 Bug 1676221 - Add UX nits to unblock UI r=ckerschb,Gijs
Show save dialogue
***
Automaticly show Panel On Block
***
Keep Open/Save Dialogue with open panel
***
Keep User choise in downloadsView
***
Add Unblock option to Unblock panel
***
lint
***
add test

Differential Revision: https://phabricator.services.mozilla.com/D96448
2020-12-18 15:30:33 +00:00
Gijs Kruitbosch 8f053bc4d0 Bug 1681924 - add application/zip to extraMimeEntries to help recognize zip files, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D100009
2020-12-18 12:54:40 +00:00
Tom Schuster 7356fb9a6f Bug 1671930 - Add text/csv to extraMimeEntries to help recognize CSV files, r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D100018
2020-12-18 13:26:01 +00:00
Butkovits Atila a5ae3506b7 Backed out changeset 234ae5cb0ff8 (bug 1676221) for causing leaks. CLOSED TREE 2020-12-17 10:54:31 +02:00
Sebastian Streich ac54bcd9d6 Bug 1676221 - Add UX nits to unblock UI r=ckerschb,Gijs
Show save dialogue
***
Automaticly show Panel On Block
***
Keep Open/Save Dialogue with open panel
***
Keep User choise in downloadsView
***
Add Unblock option to Unblock panel
***
lint
***
add test

Differential Revision: https://phabricator.services.mozilla.com/D96448
2020-12-16 22:55:12 +00:00
Bogdan Tara 636095bb54 Bug 1676345 - Fix clang-format issue CLOSED TREE 2020-12-02 21:18:45 +02:00
Gijs Kruitbosch a43aafe52b Bug 1676345 - honour extensions from URLs with query parameters for useless mimetypes to avoid taking the extension from bogus local data, r=mak
This restores extension discovery logic to using the URL for requests where
there's no filename in the Content-Disposition header information, and where
the mimetype gives no indication of the 'correct' extension.

This is a short-term workaround for the larger issue that we should not have
bad local information for these mimetypes - fixing that is bug 1659008, but
requires using the extension to get a better mimetype, which this patch will
also help with.

Differential Revision: https://phabricator.services.mozilla.com/D97824
2020-12-02 17:36:41 +00:00
Gijs Kruitbosch 540b640357 Bug 1652520 - do not overwrite extensions for all filetypes, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D96406
2020-11-10 13:59:39 +00:00
Bogdan Tara 6e923c3f5d Backed out changeset 58d4317c9427 (bug 1652520) for nsExternalHelperAppService bustages CLOSED TREE 2020-11-10 14:41:18 +02:00
Gijs Kruitbosch 166da5cee1 Bug 1652520 - do not overwrite extensions for all filetypes, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D96406
2020-11-10 12:07:30 +00:00
pbz 84589d971b Bug 1565574 - Added permission required to open external protocol handlers. r=Gijs
- Added pref to toggle permission feature
- Updated ContentDispatchChooser to check for permission and  manage a multi dialog flow.

Differential Revision: https://phabricator.services.mozilla.com/D92945
2020-10-29 13:43:46 +00:00
Dorel Luca cfaedde161 Backed out 6 changesets (bug 1565574) as per dev's request. CLOSED TREE
Backed out changeset fbe972f837d9 (bug 1565574)
Backed out changeset 2852c526acd6 (bug 1565574)
Backed out changeset fa731b373f42 (bug 1565574)
Backed out changeset c7ed89a9afc7 (bug 1565574)
Backed out changeset 3e87d1b83069 (bug 1565574)
Backed out changeset 93955bcbaf4b (bug 1565574)
2020-10-29 12:55:28 +02:00
pbz 38c10056ca Bug 1565574 - Added permission required to open external protocol handlers. r=Gijs
- Added pref to toggle permission feature
- Updated ContentDispatchChooser to check for permission and  manage a multi dialog flow.

Differential Revision: https://phabricator.services.mozilla.com/D92945
2020-10-27 16:13:46 +00:00
Gijs Kruitbosch 037a648633 Bug 1667787 - fix saving webp images served with jpeg extensions without content-disposition information, r=mak
This changes two bits of Firefox that, together with the mime service, end up
very confused over webp + jpeg.

1) it changes contentAreaUtils.js' getDefaultExtension that if it gets an image
mimetype as the content type, it should ignore the URL. It doesn't have full channel
info so it can't really do better anyway. This fixes the context menu's "save image as..."
case.
2) it changes the external helper app service to do a few things slightly differently:
a. If we're told not to get an extension out of a URL, really don't. Don't just get the
   filename and then get it from there anyway...
b. If we've got a suggested filename, and a primary extension for the mimetype,
   and the extension on the file is not one of the known extensions for the mimetype,
   replace it with the primary extension.
This fixes the link case.

It also adds tests for both of these mechanisms as well as "save image as."

Differential Revision: https://phabricator.services.mozilla.com/D92306
2020-10-20 20:35:26 +00:00
Csoregi Natalia 6ac6a93c73 Backed out changeset ff2ad4b3e863 (bug 1667787) for failures on test_nullCharFile.xhtml. CLOSED TREE 2020-10-20 19:24:50 +03:00
Gijs Kruitbosch 485b18c13e Bug 1667787 - fix saving webp images served with jpeg extensions without content-disposition information, r=mak
This changes two bits of Firefox that, together with the mime service, end up
very confused over webp + jpeg.

1) it changes contentAreaUtils.js' getDefaultExtension that if it gets an image
mimetype as the content type, it should ignore the URL. It doesn't have full channel
info so it can't really do better anyway. This fixes the context menu's "save image as..."
case.
2) it changes the external helper app service to do a few things slightly differently:
a. If we're told not to get an extension out of a URL, really don't. Don't just get the
   filename and then get it from there anyway...
b. If we've got a suggested filename, and a primary extension for the mimetype,
   and the extension on the file is not one of the known extensions for the mimetype,
   replace it with the primary extension.
This fixes the link case.

It also adds tests for both of these mechanisms as well as "save image as."

Differential Revision: https://phabricator.services.mozilla.com/D92306
2020-10-20 12:05:10 +00:00
Narcis Beleuzu 127dbfe779 Backed out changeset 19f174844357 (bug 1667787) for bc failure on browser_bug676619.js . CLOSED TREE 2020-10-20 00:11:01 +03:00
Gijs Kruitbosch 265eb412ec Bug 1667787 - fix saving webp images served with jpeg extensions without content-disposition information, r=mak
This changes two bits of Firefox that, together with the mime service, end up
very confused over webp + jpeg.

1) it changes contentAreaUtils.js' getDefaultExtension that if it gets an image
mimetype as the content type, it should ignore the URL. It doesn't have full channel
info so it can't really do better anyway. This fixes the context menu's "save image as..."
case.
2) it changes the external helper app service to do a few things slightly differently:
a. If we're told not to get an extension out of a URL, really don't. Don't just get the
   filename and then get it from there anyway...
b. If we've got a suggested filename, and a primary extension for the mimetype,
   and the extension on the file is not one of the known extensions for the mimetype,
   replace it with the primary extension.
This fixes the link case.

It also adds tests for both of these mechanisms as well as "save image as."

Differential Revision: https://phabricator.services.mozilla.com/D92306
2020-10-19 16:14:13 +00:00
Narcis Beleuzu 7b1d9100a2 Backed out changeset fc8c5c66f081 (bug 1667787) for mochitest failure test_invalidCharFileExtension.xhtml . CLOSED TREE 2020-10-13 17:56:47 +03:00
Gijs Kruitbosch 3b1acae8f6 Bug 1667787 - fix saving webp images served with jpeg extensions without content-disposition information, r=mak
This changes two bits of Firefox that, together with the mime service, end up
very confused over webp + jpeg.

1) it changes contentAreaUtils.js' getDefaultExtension that if it gets an image
mimetype as the content type, it should ignore the URL. It doesn't have full channel
info so it can't really do better anyway. This fixes the context menu's "save image as..."
case.
2) it changes the external helper app service to do a few things slightly differently:
a. If we're told not to get an extension out of a URL, really don't. Don't just get the
   filename and then get it from there anyway...
b. If we've got a suggested filename, and a primary extension for the mimetype,
   and the extension on the file is not one of the known extensions for the mimetype,
   replace it with the primary extension.
This fixes the link case.

It also adds tests for both of these mechanisms as well as "save image as."

Differential Revision: https://phabricator.services.mozilla.com/D92306
2020-10-13 14:00:41 +00:00
Simon Giesecke de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Sebastian Streich 2158167f35 Bug 1627944 - Restrict toplevel data uri's to non-doc creating or downloads r=ckerschb,annevk
Differential Revision: https://phabricator.services.mozilla.com/D86836
2020-09-22 16:59:25 +00:00
Tom Schuster 0e1968be4a Bug 1660560 - Hard-code fallback MIME-extension mappings for common Office formats and iCalendar. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D87918
2020-08-24 16:50:48 +00:00
Sebastian Streich 27e2164c57 Bug 1656296 - Pass Blocked Downloads to the DownloadsUI r=ckerschb,Gijs
***

***
Added Better Testing

Differential Revision: https://phabricator.services.mozilla.com/D85439
2020-08-24 15:29:23 +00:00
Gijs Kruitbosch c1e5ec87eb Bug 1571247 - don't default to the jfif extension for image/jpeg files as suggested by the Windows registry, r=agashlin
Differential Revision: https://phabricator.services.mozilla.com/D87371
2020-08-21 15:38:35 +00:00
Razvan Maries 0c5b98d077 Backed out changeset c034b967d740 (bug 1571247) for perma failures on test_DownloadsCommon_getMimeInfo.js. CLOSED TREE 2020-08-21 01:27:47 +03:00
Gijs Kruitbosch 9d13d41b05 Bug 1571247 - don't default to the jfif extension for image/jpeg files as suggested by the Windows registry, r=agashlin
Differential Revision: https://phabricator.services.mozilla.com/D87371
2020-08-20 20:21:05 +00:00
Cosmin Sabou d54210d490 Backed out changeset 4d700219feab (bug 1571247) for xpcshell failures on test_getMIMEInfo_pdf.js. CLOSED TREE 2020-08-20 06:20:21 +03:00
Gijs Kruitbosch 872ba72cf7 Bug 1571247 - don't default to the jfif extension for image/jpeg files as suggested by the Windows registry, r=agashlin
Differential Revision: https://phabricator.services.mozilla.com/D87371
2020-08-20 00:25:18 +00:00
Cosmin Sabou 05ab468b46 Backed out changeset 388c153da388 (bug 1656296) for causing default process leaks. CLOSED TREE 2020-08-19 21:58:03 +03:00
Sebastian Streich b578e23a52 Bug 1656296 - Pass Blocked Downloads to the DownloadsUI r=ckerschb,Gijs
***

***
Added Better Testing

Differential Revision: https://phabricator.services.mozilla.com/D85439
2020-08-19 17:58:57 +00:00
Narcis Beleuzu 0e759593c7 Backed out changeset 1b7eb33c8ec9 (bug 1656296) for bc failure on browser_test_mixed_content_download.js . CLOSED TREE 2020-08-19 16:39:33 +03:00
Sebastian Streich a797186639 Bug 1656296 - Pass Blocked Downloads to the DownloadsUI r=ckerschb,Gijs
***

***
Added Better Testing

Differential Revision: https://phabricator.services.mozilla.com/D85439
2020-08-19 12:45:55 +00:00
Adam Gashlin 29649175ed Bug 1639067 part 2 - Extend "Open with" and overwrite description to all types viewable internally. r=Gijs
Also improve detection of types needing overwrite by using the final extension settled on for the
type.

I didn't fold PDF fully into this part, as it has different conditions for showing the radio button vs.
viewing internally from the downloads list.

Also fix intermittent bug 1641774 (wouldn't run in verify) by saving handler info at the beginning
of browser_download_open_with_internal_handler, instead of at the start of a subtest.

Differential Revision: https://phabricator.services.mozilla.com/D86651
2020-08-18 01:53:08 +00:00
Dorel Luca 806d75bb33 Backed out 4 changesets (bug 1639067) for XPCshell failures in tests/unit/test_getMIMEInfo_pdf.js. CLOSED TREE
Backed out changeset 1e400fafd80b (bug 1639067)
Backed out changeset 7bb3c2ec5c7a (bug 1639067)
Backed out changeset 755fd5771648 (bug 1639067)
Backed out changeset 951e10b7354f (bug 1639067)
2020-08-18 00:18:32 +03:00
Adam Gashlin f37a9d4ca6 Bug 1639067 part 2 - Extend "Open with" and overwrite description to all types viewable internally. r=Gijs
Also improve detection of types needing overwrite by using the final extension settled on for the
type.

I didn't fold PDF fully into this part, as it has different conditions for showing the radio button vs.
viewing internally from the downloads list.

Differential Revision: https://phabricator.services.mozilla.com/D86651
2020-08-17 19:16:49 +00:00
Gijs Kruitbosch 94cbb6f3dc Bug 1655457 - always lowercase file extensions used in the Windows external helper app code, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D85927
2020-08-06 20:09:55 +00:00
Tom Schuster 35b9fd1d77 Bug 1657311 - Hard-code MIME-extension mappings for FLAC and AAC. r=jya,Gijs
Drive-by: Remove the obviously unused macro MAC_TYPE.

Differential Revision: https://phabricator.services.mozilla.com/D85989
2020-08-06 11:41:18 +00:00
owlishDeveloper 1bc152b7de Bug 1654621 - Make nsIExternalHelperAppService::createListener more generic to include mobile r=necko-reviewers,geckoview-reviewers,snorp,mattwoodrow,dragana
Differential Revision: https://phabricator.services.mozilla.com/D84738
2020-07-27 22:39:48 +00:00
Gijs Kruitbosch 6b51f8bd70 Bug 1653541 - always allow webextensions to navigate to external protocol URIs, r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D84179
2020-07-20 21:48:21 +00:00
Marco Bonardo 9717edb569 Bug 1637745. r=Gijs,necko-reviewers,mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D80345
2020-07-17 13:45:58 +00:00
Gijs Kruitbosch d409469275 Bug 1650162 - disjoint external URI loading protection should deal with invisible iframes, r=mattwoodrow
The aim of the code we're modifying here is to block things in one browsingcontext
tree from opening external links in another browsingcontext tree (and causing the
external protocol dialog to show up for that tab/window) -- except if the other
browsingcontext into which something is being loaded is same-origin.

Unfortunately the pre-patch code assumed that it would find currentWindowGlobal
objects for each browsingcontext, and it turns out that's not guaranteed,
especially in the case of hidden iframes, which turn out to be quite commonly
used for external protocol launches.

This patch fixes this by continuing to move towards the root of the browsingcontext
tree even if there's no currentWindowGlobal (though logically speaking, this
should only be necessary for the first iteration of the loop, it seems easier to
just always check this). It also adds a test for this behaviour working.

Differential Revision: https://phabricator.services.mozilla.com/D83015
2020-07-16 08:35:17 +00:00
Cosmin Sabou 765f7688bf Backed out changeset da4b797fcefa (bug 1650162) for bc failures on browser_protocol_ask_dialog.js. CLOSED TREE 2020-07-16 03:52:12 +03:00
Gijs Kruitbosch 7d3d1390b0 Bug 1650162 - disjoint external URI loading protection should deal with invisible iframes, r=mattwoodrow
The aim of the code we're modifying here is to block things in one browsingcontext
tree from opening external links in another browsingcontext tree (and causing the
external protocol dialog to show up for that tab/window) -- except if the other
browsingcontext into which something is being loaded is same-origin.

Unfortunately the pre-patch code assumed that it would find currentWindowGlobal
objects for each browsingcontext, and it turns out that's not guaranteed,
especially in the case of hidden iframes, which turn out to be quite commonly
used for external protocol launches.

This patch fixes this by continuing to move towards the root of the browsingcontext
tree even if there's no currentWindowGlobal (though logically speaking, this
should only be necessary for the first iteration of the loop, it seems easier to
just always check this). It also adds a test for this behaviour working.

Differential Revision: https://phabricator.services.mozilla.com/D83015
2020-07-15 22:14:23 +00:00
Sebastian Streich 8ccf28a8ba Bug 1614969 - Check download with MixedContentBlocker r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D73302
2020-07-08 15:25:43 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Butkovits Atila e6f3141f9a Backed out changeset 2df0c2a2f866 (bug 1614969) for asertion failure on base/LoadInfo.cpp. 2020-06-30 21:47:17 +03:00
Sebastian Streich 5bb89780fa Bug 1614969 - Check download with MixedContentBlocker r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D73302
2020-06-30 16:29:22 +00:00
Razvan Maries c54f50f342 Backed out changeset a10fc7b299ff (bug 1614969) for build bustages on nsContentSecurityUtils.cpp. CLOSED TREE 2020-06-24 13:23:02 +03:00
Sebastian Streich a9516ee4f5 Bug 1614969 - Check download with MixedContentBlocker r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D73302
2020-06-24 09:54:50 +00:00
Butkovits Atila c112069ef0 Backed out changeset 3685f83e0dc0 (bug 1614969) as requested by dev. 2020-06-23 15:22:21 +03:00
Sebastian Streich d8ff61ded5 Bug 1614969 - Check download with MixedContentBlocker r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D73302
2020-06-23 11:30:28 +00:00
Gijs Kruitbosch a64a69eb7d Bug 1606797 - do not allow navigating to external URIs in cross-origin disjoint browsing contexts, r=johannh,smaug
Differential Revision: https://phabricator.services.mozilla.com/D77028
2020-06-01 21:21:32 +00:00
Gijs Kruitbosch 728702a673 Bug 1606797 - pass the triggering principal when opening external URIs, r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D77027
2020-05-27 12:46:34 +00:00
Gijs Kruitbosch f163447d48 Bug 1366645 - overwrite image file extensions when initializing file info, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D75640
2020-05-27 16:30:43 +00:00
Gijs Kruitbosch 865098cc8b Bug 1366645 - check builtin extra entries for mimetype information before falling back to the extension, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D75639
2020-05-28 13:49:34 +00:00
Emilio Cobos Álvarez 54fd961a29 Bug 1641245 - Make string comparators not virtual. r=froydnj,necko-reviewers,geckoview-reviewers,jgilbert,agi,valentin
There's no use case for stateful comparators, so they can be just plain
function pointers.

This is used in some hot places like CSS selector matching.

Differential Revision: https://phabricator.services.mozilla.com/D77084
2020-05-27 18:11:12 +00:00
Dorel Luca 99ddf6cdc5 Backed out 2 changesets (bug 1366645) for Browser-chrome failures in uriloader/exthandler/tests/mochitest/browser_download_open_with_internal_handler.js. CLOSED TREE
Backed out changeset cdfedc4707bd (bug 1366645)
Backed out changeset 666659de5856 (bug 1366645)
2020-05-27 19:25:57 +03:00
Gijs Kruitbosch d4bceb69bb Bug 1366645 - overwrite image file extensions when initializing file info, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D75640
2020-05-27 14:14:26 +00:00
Gijs Kruitbosch d5b5be8f99 Bug 1366645 - check builtin extra entries for mimetype information before falling back to the extension, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D75639
2020-05-22 08:34:17 +00:00
Gijs Kruitbosch 34a6029cd6 Bug 1633270 - don't default to saveToDisk if we are supposed to handle internally, r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D75581
2020-05-16 13:22:01 +00:00
Gijs Kruitbosch 72186b2199 Bug 1638092 - do not require a browsingcontext to call the external protocol service's loadURI method, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D75543
2020-05-17 22:54:30 +00:00
Narcis Beleuzu da3bd17056 Backed out 2 changesets (bug 1633270) for mochitest failure on test_allowContentRetargeting.html
Backed out changeset 77d5aff05a0e (bug 1633270)
Backed out changeset cb53eac110d1 (bug 1633270)
2020-05-16 16:16:57 +03:00
Gijs Kruitbosch 7331d81a95 Bug 1633270 - don't default to saveToDisk if we are supposed to handle internally, r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D75581
2020-05-15 18:20:53 +00:00
Jared Wein 2c619e2a98 Bug 773942 - Create a new init method in nsITransfer that accepts a BrowsingContext and if the download should be handled internally for backwards-compat. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D75186
2020-05-16 06:00:08 +00:00
Jared Wein 9b0a889740 Bug 773942 - Hide the 'Open with Firefox' option if the download is started from the download button in pdf.js. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D72779
2020-05-16 05:59:55 +00:00
Jared Wein 3ab25176e5 Bug 773942 - Use the browsingContext to open the new tab with correct userContextId, private-ness, and ownerTab. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D72778
2020-05-16 05:59:53 +00:00
Jared Wein e2e5ff74a3 Bug 773942 - Use a generic string for the PDF description since it is not necessarily tied to the default handler. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D72777
2020-05-16 05:59:50 +00:00
Jared Wein 3074d7ebb9 Bug 773942 - Open PDFs using pdf.js in a new tab when the Preview option is selected from the Unknown Content Type dialog. r=Gijs
This is currently preffed off behind the "browser.helperApps.showOpenOptionForPdfJS" pref.

Differential Revision: https://phabricator.services.mozilla.com/D72776
2020-05-16 05:59:43 +00:00
Narcis Beleuzu 35b6e759f7 Backed out 9 changesets (bug 773942) for xpcshell failure on test_getMIMEInfo_pdf.js
Backed out changeset 6fb0f25b2f5d (bug 773942)
Backed out changeset 27e9fe03a549 (bug 773942)
Backed out changeset ee0ecad5e90a (bug 773942)
Backed out changeset df062e14287b (bug 773942)
Backed out changeset 7da06239ccfb (bug 773942)
Backed out changeset dfedbeeaec66 (bug 773942)
Backed out changeset 286e1be9dc46 (bug 773942)
Backed out changeset f4df0a553bc0 (bug 773942)
Backed out changeset 97f3b96b6be0 (bug 773942)
2020-05-16 08:37:53 +03:00
Jared Wein 788718620f Bug 773942 - Create a new init method in nsITransfer that accepts a BrowsingContext and if the download should be handled internally for backwards-compat. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D75186
2020-05-16 04:26:12 +00:00
Jared Wein b804d9a64f Bug 773942 - Hide the 'Open with Firefox' option if the download is started from the download button in pdf.js. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D72779
2020-05-16 04:25:06 +00:00
Jared Wein 58822bff64 Bug 773942 - Use the browsingContext to open the new tab with correct userContextId, private-ness, and ownerTab. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D72778
2020-05-16 04:25:03 +00:00
Jared Wein fbedeb01f3 Bug 773942 - Use a generic string for the PDF description since it is not necessarily tied to the default handler. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D72777
2020-05-16 04:24:59 +00:00
Jared Wein 3ace9de33d Bug 773942 - Open PDFs using pdf.js in a new tab when the Preview option is selected from the Unknown Content Type dialog. r=Gijs
This is currently preffed off behind the "browser.helperApps.showOpenOptionForPdfJS" pref.

Differential Revision: https://phabricator.services.mozilla.com/D72776
2020-05-16 04:24:56 +00:00
Razvan Maries 481517ce87 Backed out 2 changesets (bug 1558394) for perma failures on iframe_sandbox_anchor_download_block_downloads.sub.tentative.html. CLOSED TREE
Backed out changeset 79046ff8143b (bug 1558394)
Backed out changeset e13ede3c68d4 (bug 1558394)
2020-05-15 19:18:34 +03:00
Sebastian Streich 6733f1311c Bug 1558394 - Block downloads in sandboxed iframes r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D67351
2020-05-15 14:03:43 +00:00
Bogdan Tara edcb53f163 Backed out 2 changesets (bug 1558394) for nsDocShellLoadState related bustage CLOSED TREE
Backed out changeset 5889105bd089 (bug 1558394)
Backed out changeset 80a0ea17c9f8 (bug 1558394)
2020-05-14 15:17:32 +03:00
Sebastian Streich bb85ae41b1 Bug 1558394 - Block downloads in sandboxed iframes r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D67351
2020-05-14 10:05:55 +00:00
Gijs Kruitbosch 228e52aebe Bug 1196151 - use BrowsingContext for external helper app handling of protocols, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D74434
2020-05-11 13:13:03 +00:00
Gijs Kruitbosch ad6d0f5943 Bug 1633790 - remove unused method arguments in the external helper app service, r=jaws
This also renames `saveToDisk` to the more accurate `promptForSaveDestination`
given that it doesn't actually do the saving itself.

Differential Revision: https://phabricator.services.mozilla.com/D73507
2020-05-06 20:32:09 +00:00
Jon Bauman 2db43533f3 Bug 1625363 - AVIF (AV1 Image File Format): experimental support. r=aosmond,necko-reviewers,valentin
There are many limitations currently, but this prototype should successfully
render most basic AVIF images. Known limitations:

- No support for any derived image items (crop, rotate, etc.)
- No support for alpha planes
- No support for ICC profiles (bug 1634741)
- The primary image item must be an av01 (no grid support)
- HDR images aren't tone-mapped

Differential Revision: https://phabricator.services.mozilla.com/D68498
2020-05-01 22:56:04 +00:00
Razvan Maries 668381a470 Backed out changeset 8cb47e0e268d (bug 1625363) for causing gtest failures at ImageDecoders.AVIFSingleChunk. CLOSED TREE 2020-04-30 08:26:53 +03:00
Jon Bauman 601b2f5365 Bug 1625363 - AVIF (AV1 Image File Format): experimental support. r=aosmond,necko-reviewers,valentin
There are many limitations currently, but this prototype should successfully
render most basic AVIF images. Known limitations:

- No support for any derived image items (crop, rotate, etc.)
- No support for alpha planes
- The primary image item must be an av01 (no grid support)
- HDR images aren't tone-mapped

Differential Revision: https://phabricator.services.mozilla.com/D68498
2020-04-30 01:31:17 +00:00
Bogdan Tara 606f9e2e6c Backed out changeset 9804951497f9 (bug 1625363) for bustages complaining about nsAVIFDecoder.cpp CLOSED TREE 2020-04-29 19:46:12 +03:00
Jon Bauman 1c60246bba Bug 1625363 - AVIF (AV1 Image File Format): experimental support. r=aosmond,necko-reviewers,valentin
There are many limitations currently, but this prototype should successfully
render most basic AVIF images. Known limitations:

- No support for any derived image items (crop, rotate, etc.)
- No support for alpha planes
- The primary image item must be an av01 (no grid support)
- HDR images aren't tone-mapped

Differential Revision: https://phabricator.services.mozilla.com/D68498
2020-04-29 16:30:54 +00:00
Eric Rahm a45bbf7d67 Bug 1626451 - Remove nsAutoPtr usage from uriloader/. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D69122

--HG--
extra : moz-landing-system : lando
2020-04-03 21:05:39 +00:00
sonakshi a6f08454e0 Bug 1622619 - Replace URIParams with nsIURI in PContent.ipdl r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D67729

--HG--
extra : moz-landing-system : lando
2020-03-31 18:47:30 +00:00
Razvan Maries 40412d7928 Backed out changeset 2515c5b5a0d2 (bug 1622619) for build bustages. CLOSED TREE 2020-03-31 17:18:38 +03:00
sonakshi fc4a38cd03 Bug 1622619 - Replace URIParams with nsIURI in PContent.ipdl r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D67729

--HG--
extra : moz-landing-system : lando
2020-03-31 13:38:55 +00:00
Masatoshi Kimura 3df19bc1d4 Bug 1623222 - Remove the charset parameter from nsITextToSubURI::UnEscapeURIForUI. r=hsivonen
Only 3 callers are using a non-UTF-8 charset as the first parameter.
* MediaDocument.cpp: This does not make sense because the "filename" part of
  URLs will always be encoded with UTF-8.
* nsContextMenu.js: This is wrong because "mailto:" URLs don't care about the
  document charset.
* Finder.jsm: This caused bug 1623222.

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

--HG--
extra : moz-landing-system : lando
2020-03-19 10:45:28 +00:00
Marco Bonardo 7d0e827280 Bug 1598216 - Change file extensions with invalid characters to valid file extensions on save. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D65823

--HG--
rename : uriloader/exthandler/tests/mochitest/unsafeBidi_chromeScript.js => uriloader/exthandler/tests/mochitest/HelperAppLauncherDialog_chromeScript.js
extra : moz-landing-system : lando
2020-03-09 16:11:13 +00:00
Matt Woodrow 5eb1e13fa3 Bug 1618057 - Use the target BrowsingContext of the load, rather than the process-top BrowsingContext when initializing DocumentLoadListener. r=nika
This also fixes the Window lookup in nsExternalAppHandler, which was the reason for previously needing the process-top BrowsingContext.

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

--HG--
extra : moz-landing-system : lando
2020-03-05 21:15:50 +00:00
Simon Giesecke b50347f917 Bug 1611415 - Prefer using std::move over forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-13 14:38:48 +00:00
shindli 91aa0518dd Backed out changeset 0c982bc69cb3 (bug 1611415) for causing build bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsCOMPtr CLOSED TREE 2020-02-12 20:13:29 +02:00
Simon Giesecke f604a47fa5 Bug 1611415 - Applied FixItHints from mozilla-non-std-move. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-12 17:24:41 +00:00
Matt Woodrow d70ca2b3dc Bug 1611588 - Handle null BrowsingContext in ExternalHelperAppParent. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D61309

--HG--
extra : moz-landing-system : lando
2020-02-03 18:57:08 +00:00
Gijs Kruitbosch 7e32d47d84 Bug 1605102, r=mak,dimi
Differential Revision: https://phabricator.services.mozilla.com/D58674

--HG--
extra : moz-landing-system : lando
2020-01-22 18:20:23 +00:00
Emma Malysz be8bd71702 Bug 1601110, remove handling and references to vnd.mozilla.xul+xml r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D57567

--HG--
extra : moz-landing-system : lando
2019-12-23 23:02:05 +00:00
Chris Peterson 406763af7f Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj
This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`.

Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because:

* MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds
* but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds.

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

--HG--
extra : moz-landing-system : lando
2019-12-20 07:16:43 +00:00
Gabriele Svelto 5dc21d568c Bug 1600545 - Remove useless inclusions of header files generated from IDL files in modules/, netwerk/, parser/, security/, startupcache/, storage/, toolkit/, tools/, uriloader/, widget/, xpcom/ and xpfe/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:17:57 +00:00
Gijs Kruitbosch c84bf2a64d Bug 1496380 - stop recursion via the external protocol handler if Firefox is either the default OS handler or a configured external handler, r=mossop
This is an initial implementation of this idea that works on mac.
I've added a Windows implementation in another commit in this stack. I'll
look at a Linux one in a follow-up bug. I do not think we need them in the
child process implementation or on Android.

Effectively, this makes nsIHandlerInfo::LaunchWithURI() fall back to asking if
the handler info points to the OS default and that's us, or if it points to
a helper app and that's us. The latter is fairly easy to check, but the former,
more common case, is actually annoying - there don't seem to be APIs on the
external helper app service or the handler service that provide any information
about the app that's currently the default. So despite my belief that these
interfaces have too many methods that all do very similar things, and what we
need is fewer interfaces with fewer methods, I added another one...

For this mac implementation, I'm comparing bundle URLs and added newer API
usage for 10.10 and later to avoid deprecation warnings. I've not changed
the mac shell service as it uses bundle identifiers to check if we're the
default.

Another way of fixing these issues would be to complain about things when we
receive these URIs from external parties and our own config says that we will
just hand them to someone else. I decided not to do so because we end up with
at least one of the following problems:

- if we implement in BrowserContentHandler, that won't help for
  PWAs/Thunderbird
- if we try to implement in the external protocol handler, we'd need to start
  passing load flag information through to lots of checks.
- it wouldn't stop the recursion until we've already done one round of
  it for links that are in webpages, which seems suboptimal (ie, if you
  clicked a mailto: link on a webpage it'd go to the OS with that mailto link
  and only realize something's awry when we've gone back through the OS to us,
  rather than straightaway).

If we wanted to, we could add a fix like that in belt-and-suspenders fashion.

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

--HG--
extra : moz-landing-system : lando
2019-11-26 18:51:04 +00:00
Jean-Yves Avenard 6f3787fd8c Bug 1596665 - P4. Expose some nsDocShell utility methods. r=kmag
And use the new methods where we can.

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

--HG--
extra : moz-landing-system : lando
2019-11-26 01:24:42 +00:00
Sean Feng f8ddb7e6f1 Bug 1580316 - Update signatureInfo to Array of Array of nsIX509Cert(in raw bytes) r=keeler,dimi
The signatureInfo that has been used in ExternalHelperAppService and
ReputationService has been stored Array of nsIX509CertList, which
isn't necessary because only the raw bytes of the certs are required.
This patch intends to remove the usage of nsIX509CertList and store
the raw bytes directly.

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

--HG--
extra : moz-landing-system : lando
2019-11-19 19:51:44 +00:00
Boris Zbarsky f55c390a51 Bug 1597175. Fix nsExternalHelperAppService::DoContent to work with non-docshell content contexts. r=mattwoodrow
Some consumers of this code have an aContentContext implemented in JS.

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

--HG--
extra : moz-landing-system : lando
2019-11-18 06:14:57 +00:00
Tom Schuster a5780f4f42 Bug 1589895 - Add default JavaScript MIME type for .mjs used for ES modules. r=bzbarsky
Seems like this is the recommended MIME type for the JavaScript module system:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#Basic_example_structure

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

--HG--
extra : moz-landing-system : lando
2019-11-13 19:12:02 +00:00
Matt Woodrow fea5e94ae8 Bug 1589270 - Part 3: Convert nsExternalHelperApp to use BrowsingContext instead of nsIInterfaceRequestor. r=bzbarsky
This also converts MaybeCloseWindowHelper, and results in the window close operations being always run in the parent (even without DocumentChannel).

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

--HG--
extra : moz-landing-system : lando
2019-11-08 04:35:05 +00:00
Matt Woodrow aa0bf8a233 Bug 1589270 - Part 2: Remove support for handling the Refresh header while processing a download. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D49527

--HG--
extra : moz-landing-system : lando
2019-11-08 03:01:03 +00:00
Nick Alexander c46ec74815 Bug 1580356 - Remove Fennec (Firefox for Android). r=snorp,mshal
This does many things:

1) stops producing (and consuming) `FennecJNI*` JNI wrappers
2) removes the :app and :thirdparty Gradle projects
3) removes relevant pieces of the Gradle target configuration
4) updates lints
5) purges old configurations

After this commit, the `mobile/android` project/application builds
only GeckoView.

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

--HG--
extra : moz-landing-system : lando
2019-10-04 20:55:11 +00:00
Nika Layzell 4825c16f54 Bug 1570369 - Part 6: Use IPDL refcounted for PExternalHelperApp, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D40258

--HG--
extra : moz-landing-system : lando
2019-08-08 16:46:35 +00:00
Tom Schuster 4d526c3808 Bug 1558915 - Use infallible nsIURI::SchemeIs in uriloader/ r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D40546

--HG--
extra : moz-landing-system : lando
2019-08-05 20:08:21 +00:00
Boris Zbarsky 9de72a3ac6 Bug 1557793 part 2. Stop using [array] in nsIStringBundle. r=Pike
Differential Revision: https://phabricator.services.mozilla.com/D34196

--HG--
extra : moz-landing-system : lando
2019-06-11 15:51:51 +00:00
Ryan Hunt d6509bb237 Bug 1534395 - Rename TabChild to BrowserChild. r=nika
This commit renames TabChild to BrowserChild.

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

--HG--
rename : dom/base/InProcessTabChildMessageManager.cpp => dom/base/InProcessBrowserChildMessageManager.cpp
rename : dom/base/InProcessTabChildMessageManager.h => dom/base/InProcessBrowserChildMessageManager.h
rename : dom/ipc/TabChild.cpp => dom/ipc/BrowserChild.cpp
rename : dom/ipc/TabChild.h => dom/ipc/BrowserChild.h
extra : rebase_source : e7fcfb845a971a2760e73d517e24da18ce2551b5
extra : histedit_source : d1991334ccb107fe56e478865f22fd97b041a317
2019-04-09 17:39:01 -05:00
Ryan Hunt e9e7d608be Bug 1534395 - Rename nsITabChild to nsIBrowserChild. r=nika,mconley
Similarly to nsITabParent, TabChild is exposed to frontend code via nsITabChild. It's not clear what the future of this interface will be, but for now we can just rename it to nsIBrowserChild.

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

--HG--
rename : dom/interfaces/base/nsITabChild.idl => dom/interfaces/base/nsIBrowserChild.idl
extra : rebase_source : a6c42a661e35b19e46c60f6f6a6f3dab64c0a1bc
extra : histedit_source : 1eb475bd840bf37a3f86294685c9b3c250684e79
2019-04-09 18:15:02 -05:00
Haik Aftandilian 77b79862cf Bug 1452278 - Part 1 - Make macOS nsOSHelperAppService::GetFromTypeAndExtension() not call OS MIME API's in content r=bzbarsky,froydnj
Add a new nsExternalHelperAppService derived class named nsOSHelperAppServiceChild to be used for the MIME service, external helper app service, and external protocol service interfaces in child processes. nsOSHelperAppServiceChild overrides some methods used to get MIME and external protocol handler information from the OS and implements these methods by remoting the calls to the parent process.

This is necessary because, on Mac, querying the OS for helper application info from sandboxed content processes is unreliable and has buggy side effects.

For now, only use the new class on Mac.

Android and unix file changes r+ by gcp.
Windows files changes r+ by bobowen.
Sync messages review r+ by nfroyd.

MozReview-Commit-ID: 63BiS6VCxfn

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

--HG--
extra : moz-landing-system : lando
2019-03-27 22:49:33 +00:00
arthur.iakab 7654bfed1e Backed out 2 changesets (bug 1452278) for mingwclang build bustages on win/nsOSHelperAppService.h CLOSED TREE
Backed out changeset f11d78387bd9 (bug 1452278)
Backed out changeset 656f17a2553b (bug 1452278)
2019-03-27 22:03:07 +02:00
Haik Aftandilian b8118af581 Bug 1452278 - Part 1 - Make macOS nsOSHelperAppService::GetFromTypeAndExtension() not call OS MIME API's in content r=bzbarsky,froydnj
Add a new nsExternalHelperAppService derived class named nsOSHelperAppServiceChild to be used for the MIME service, external helper app service, and external protocol service interfaces in child processes. nsOSHelperAppServiceChild overrides some methods used to get MIME and external protocol handler information from the OS and implements these methods by remoting the calls to the parent process.

This is necessary because, on Mac, querying the OS for helper application info from sandboxed content processes is unreliable and has buggy side effects.

For now, only use the new class on Mac.

Android and unix file changes r+ by gcp.
Windows files changes r+ by bobowen.
Sync messages review r+ by nfroyd.

MozReview-Commit-ID: 63BiS6VCxfn

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

--HG--
extra : moz-landing-system : lando
2019-03-27 19:23:32 +00:00
Alex Gaynor e5279ff3f7 Bug 1532727 - replace OptionalURIParams with URIParams? in IPDL; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D22138

--HG--
extra : moz-landing-system : lando
2019-03-06 14:05:50 +00:00
Alex Gaynor dccb3bee8b Bug 1531827 - replace OptionalLoadInfoArgs with LoadInfoArgs? in IPDL; r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D21722

--HG--
extra : moz-landing-system : lando
2019-03-04 06:30:00 +00:00
Jonathan Kingston f6680698bd Bug 1525319 - Removing context from OnDataAvailable r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20881

--HG--
extra : moz-landing-system : lando
2019-02-27 23:42:27 +00:00
Jonathan Kingston c4853316e7 Bug 1525319 - Removing context from OnStopRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20770

--HG--
extra : moz-landing-system : lando
2019-02-27 23:41:31 +00:00
Jonathan Kingston f7e35ae39e Bug 1525319 - Removing context from OnStartRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20769

--HG--
extra : moz-landing-system : lando
2019-02-27 23:41:04 +00:00
Dorel Luca 4a4dcd57fa Backed out 4 changesets (bug 1525319) for Android failures in dom/base/test/test_progress_events_for_gzip_data.html
Backed out changeset b73f033efb41 (bug 1525319)
Backed out changeset 1d318d5c6b98 (bug 1525319)
Backed out changeset 6d73418988d4 (bug 1525319)
Backed out changeset 84ca79bd2dc3 (bug 1525319)
2019-02-25 04:06:11 +02:00
Jonathan Kingston 63ab2bd8aa Bug 1525319 - Removing context from OnDataAvailable r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20881

--HG--
extra : moz-landing-system : lando
2019-02-24 20:27:55 +00:00
Jonathan Kingston 332531fa9c Bug 1525319 - Removing context from OnStopRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20770

--HG--
extra : moz-landing-system : lando
2019-02-24 20:26:59 +00:00
Jonathan Kingston 2441197975 Bug 1525319 - Removing context from OnStartRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20769

--HG--
extra : moz-landing-system : lando
2019-02-24 20:26:16 +00:00
Christoph Kerschbaumer 54df1cb98c Bug 1528677: Remove nullchecks for loadinfo since we have loadinfo on all channels. r=baku 2019-02-20 13:27:25 +01:00
Christoph Kerschbaumer 05ad5a1c28 Bug 1528814: Serialize Loadinfo for PExternalHelperApp. r=mayhemer 2019-02-18 18:11:22 +01:00
Kershaw Chang 3f231d0bbe Bug 1500710 - Add default MIME type definition for .wasm as 'application/wasm' r=bzbarsky
Add {"application/wasm", "wasm"} mapping in extraMimeEntries

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

--HG--
extra : moz-landing-system : lando
2019-02-01 22:16:17 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Andrew McCreight 0437363577 Bug 1495912- Remove more trivial calls to do_QueryInterface r=smaug
MozReview-Commit-ID: 34BAwt3SAJk

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

--HG--
extra : moz-landing-system : lando
2018-10-03 19:52:01 +00:00
Andrew McCreight 837f0af066 Bug 1493737 - Fix many trivial calls to do_QueryInterface r=smaug
If class A is derived from class B, then an instance of class A can be
converted to B via a static cast, so a slower QI is not needed.

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

--HG--
extra : moz-landing-system : lando
2018-10-01 21:38:01 +00: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
Kris Maglione 7aa3564a28 Bug 1477579: Part 3 - Avoid duplicating static strings in category manager entries. r=froydnj
Much like the component manager, many of the strings that we use for category
manager entries are statically allocated. There's no need to duplicate these
strings.

This patch changes the category manager APIs to take nsACStrings rather than
raw pointers, and to pass literal nsCStrings when we know we have a literal
string to begin with. When adding the category entry, it then skips making
copies of any strings with the LITERAL flag.

MozReview-Commit-ID: EJEcYSdNMWs
***
amend-catman

--HG--
extra : source : aa9a8f18e98f930a3d8359565eef02f3f6efc5f9
extra : absorb_source : 81a22ab26ee8017ac43321ff2c987d8096182d37
2018-07-23 17:41:06 -07:00
Brindusan Cristian 91a3707d5f Backed out 3 changesets (bug 1477579) for build bustages on xpcshell\selftest.py and crashtest failures on /components/nsComponentManager.cpp. CLOSED TREE
Backed out changeset aa9a8f18e98f (bug 1477579)
Backed out changeset 5fb0b7746a5d (bug 1477579)
Backed out changeset 8359f8fe4184 (bug 1477579)
2018-07-24 04:55:03 +03:00
Kris Maglione dfd38a6ac3 Bug 1477579: Part 3 - Avoid duplicating static strings in category manager entries. r=froydnj
Much like the component manager, many of the strings that we use for category
manager entries are statically allocated. There's no need to duplicate these
strings.

This patch changes the category manager APIs to take nsACStrings rather than
raw pointers, and to pass literal nsCStrings when we know we have a literal
string to begin with. When adding the category entry, it then skips making
copies of any strings with the LITERAL flag.

MozReview-Commit-ID: EJEcYSdNMWs
***
amend-catman

--HG--
extra : rebase_source : 4f70e7b296ecf3b52a4892c92155c7c163d424d2
2018-07-23 17:41:06 -07:00
Jan Horak cb8d3c752f Bug 1463809 - Don't lookup mimeinfo of application/octet-stream; r=Paolo
Mimeinfo returned for the generic application/octet-stream content
type is usually irrelevant to the file extension, getting mimeinfo
from extension itself is more reliable.

Also prefer file extension over application/octet-stream content tyope
when lookup in extras.

MozReview-Commit-ID: A9Q2NFAwQ7b

--HG--
extra : rebase_source : 4206cbfd898fb12b2415ef751a74d1bdeee26a2d
2018-07-19 15:46:26 +02:00
Mark Banner 601b9aaed9 Bug 1474637 - Make DownloadCore.jsm responsible for adding all downloads to history, rather than sharing with nsExternalHelperAppService. r=paolo
MozReview-Commit-ID: GRzLlDPPsCU

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

--HG--
extra : moz-landing-system : lando
2018-07-13 15:06:56 +00:00