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

3514 Коммитов

Автор SHA1 Сообщение Дата
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
Csoregi Natalia d8c9489b13 Backed out changeset 16d174e7c342 (bug 1583109) for bustage on nsReadableUtils.h. CLOSED TREE 2020-12-16 22:51:26 +02:00
Simon Giesecke 72babae175 Bug 1583109 - Use StringJoin(Append) where easily possible. r=nika
Bug 1583109 introduced new function templates StringJoin and StringJoinAppend.
These are now used to replace several custom loops across the codebase that
implement string-joining algorithms to simplify the code.

Differential Revision: https://phabricator.services.mozilla.com/D98750
2020-12-16 19:38:23 +00:00
Kartik Gautam f7ffcd09fb Bug 1679758 - Remove trailing empty lines r=sylvestre,marionette-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D99595
2020-12-15 10:34:54 +00:00
Dorel Luca 7320ae982a Backed out changeset f3aaf04fce3b (bug 1679758) for Devtool failures in browser_styleeditor_syncAddProperty.js. CLOSED TREE 2020-12-13 16:38:21 +02:00
Kartik Gautam caf549c200 Bug 1679758 - Remove trailing empty lines r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D99595
2020-12-13 13:28:30 +00:00
Emilio Cobos Álvarez 4fd5d13610 Bug 1680721 - Grant a single iframe without user interaction to top windows. r=smaug,johannh
Only for top windows because for nested iframes they could get around
this without being noticed by reloading themselves which is not great.

Differential Revision: https://phabricator.services.mozilla.com/D98775
2020-12-08 10:15:18 +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
Emma Malysz 5dfb6ccc12 Bug 1649620, remove OS.File from HandlerService.js r=barret
Differential Revision: https://phabricator.services.mozilla.com/D98351
2020-12-01 19:49:53 +00:00
Simon Giesecke dd80614fa0 Bug 1678062 - Remove unnecessary includes. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D97467

Depends on D96561
2020-11-23 16:12:02 +00:00
Simon Giesecke d10d03d076 Bug 1676365 - Move SpinEventLoopUntil to separate header. r=#xpcom-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96556

Depends on D96554
2020-11-23 16:10:41 +00:00
Simon Giesecke 0a3ad2063b Bug 1676369 - Avoid including nsIHttpChannel.h from header files. r=#necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96552

Depends on D96551
2020-11-23 16:10:11 +00:00
Simon Giesecke 5bfbb2a572 Bug 1673931 - Avoid including Document.h from header files. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D95046

Depends on D95045
2020-11-23 16:07:43 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Simon Giesecke 8953086494 Bug 1677284 - Move PackingStrategy::Variant implementation to separate header file. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D97075
2020-11-23 15:49:14 +00:00
pbz 35d59c9708 Bug 1672344 - Added telemetry for measuring usage of external protocol navigations by iframes. r=johannh
Differential Revision: https://phabricator.services.mozilla.com/D95158
2020-11-18 15:42:06 +00:00
Butkovits Atila 08cec85294 Backed out changeset 6fe2e921692a (bug 1672344) for build bustages. CLOSED TREE 2020-11-18 11:30:52 +02:00
pbz 9c677a3b1c Bug 1672344 - Added telemetry for measuring usage of external protocol navigations by iframes. r=johannh
Differential Revision: https://phabricator.services.mozilla.com/D95158
2020-11-18 08:52:57 +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 96b1582581 Bug 1674446 - Additional tests for the external protocol handler dialog. r=Gijs
Added two new tests to ensure the external protocol dialogs behave correctly if
ContentDispatchChooser is passed a null principal, or no principal at all.

Differential Revision: https://phabricator.services.mozilla.com/D95747
2020-11-04 18:36:48 +00:00
pbz 55b95a109e Bug 1565574 - Updated and added tests for protocol handler permission. r=Gijs,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D92948
2020-10-29 13:44:14 +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 19bd79c362 Bug 1565574 - Updated and added tests for protocol handler permission. r=Gijs,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D92948
2020-10-27 16:48:07 +00: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
Marco Bonardo fc2ec63b44 Bug 1672238 - Fix test_nullCharFile.xhtml on fission x-origin. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D94784
2020-10-27 10:36:47 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +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
Marco Bonardo 07da59cdfc Bug 1637745 - Test. r=Gijs
Depends on D80345

Differential Revision: https://phabricator.services.mozilla.com/D80346
2020-10-20 09:05:59 +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
Dimi Lee d56e33dd5e Bug 1669731 - P1. Rename STATE_UNBLOCKED_UNSAFE_CONTENT to STATE_UNBLOCKED_TRACKING_CONTENT r=timhuang
unsafe content is for Safe Browsing(phishing, malware, etc), we should use tracking content instead.

Differential Revision: https://phabricator.services.mozilla.com/D93269
2020-10-14 09:16:39 +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
Sylvestre Ledru cad53f4804 Bug 1588458 - Replace dxr links by searchfox in the code/test r=kats,sparky
Differential Revision: https://phabricator.services.mozilla.com/D92792
2020-10-08 14:02:40 +00:00
julianwels 341416588c Bug 1653026 - Added HTTPS-Only Mode upgrade info to browser UI state. r=mattwoodrow,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D86566
2020-10-06 00:34:55 +00:00
Brindusan Cristian 2a9b39efce Backed out 2 changesets (bug 1653026) for mochitest failures at WindowGlobalParent.cpp. CLOSED TREE
Backed out changeset 54c69c99b241 (bug 1653026)
Backed out changeset e70649f78910 (bug 1653026)
2020-10-03 10:49:04 +03:00
julianwels 30a6225652 Bug 1653026 - Added HTTPS-Only Mode upgrade info to browser UI state. r=mattwoodrow,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D86566
2020-10-03 01:22:19 +00:00
Emilio Cobos Álvarez 061fc9d988 Bug 1658571 - Add MainThreadWeakPtr and use it in PreloaderBase::RedirectSink. r=sg,smaug
Per matrix discussion, this is safer to uplift (instead of relying on
the RedirectSink being released on the main thread).

Differential Revision: https://phabricator.services.mozilla.com/D91270
2020-09-24 16:38:35 +00:00
Emilio Cobos Álvarez a88d74d517 Bug 1658571 - Don't create a reference cycle when catching redirects of a preload. r=smaug
PreloaderBase -> RedirectSink -> PreloaderBase is a strong,
non-cycle-collected reference cycle, which in cases where we don't drop
the channel because we never get an NotifyStop notification, it can
cause leaks.

I'm investigating the root cause of the lack of NotifyStop, but this
should fix the leak and is correct anyhow.

Move the class to the cpp file to ease debugging and changes.

Differential Revision: https://phabricator.services.mozilla.com/D91259
2020-09-24 16:01:50 +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
Matt Woodrow 9638778ace Bug 1604447 - Remove channel diversion code. r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D90193
2020-09-18 20:56:54 +00:00
Bogdan Tara 8dede7a88d Backed out changeset 3cb12ccee75a (bug 1604447) for causing build bustage CLOSED TREE 2020-09-18 23:43:46 +03:00
Matt Woodrow d990dadcc7 Bug 1604447 - Remove channel diversion code. r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D90193
2020-09-18 06:56:38 +00:00
Adam Gashlin 0fc9fb531a Bug 1662795 - Use extension to decide whether to offer view internally. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D90006
2020-09-12 18:47:53 +00:00
Barret Rennie f74cb16fd0 Bug 1657188 - Implement rel=preload load time telemetry r=Dexter,emilio,nika
Differential Revision: https://phabricator.services.mozilla.com/D86074
2020-09-14 21:03:52 +00:00
Dimi Lee f3da525903 Bug 1662362 - Record STATE_UNBLOCKED_UNSAFE_CONTENT event to content blocking log when unblock API of URL Classifier is called r=nhnt11,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D88957
2020-09-11 17:48:29 +00:00
Henri Sivonen 76563e652c Bug 1606499 - Abort document on location.reload(). r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D89439
2020-09-10 14:37:16 +00:00
Razvan Maries 90b7948378 Backed out 2 changesets (bug 1663963, bug 1657188) for perma failures on browser_Telemetry_loadTimePreload.js. CLOSED TREE
Backed out changeset 643f16da7b99 (bug 1657188)
Backed out changeset 0c9661a5c8f9 (bug 1663963)
2020-09-10 03:48:48 +03:00
Barret Rennie 423307263a Bug 1657188 - Implement rel=preload load time telemetry r=Dexter,emilio,nika
Differential Revision: https://phabricator.services.mozilla.com/D86074
2020-09-09 21:44:48 +00:00
Nathan Froyd cfb8fb313f Bug 1662251 - stop assigning from NS_Convert* values, mostly; r=sg
This patch was generated by running:

```
perl -p -i \
     -e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF8toUTF16\((.*)\);/\1CopyUTF8toUTF16(\3, \2);/;' \
     -e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF16toUTF8\((.*)\);/\1CopyUTF16toUTF8(\3, \2);/;' \
     $FILE
```

against every .cpp and .h in mozilla-central, and then fixing up the
inevitable errors that happen as a result of matching C++ expressions with
regexes.  The errors fell into three categories:

1. Calling the convert functions with `std::string::c_str()`; these were
   changed to simply pass the string instead, relying on implicit conversion
   to `mozilla::Span`.
2. Calling the convert functions with raw pointers, which is not permitted
   with the copy functions; these were changed to invoke `MakeStringSpan` first.
3. Other miscellaneous errors resulting from over-eager regexes and/or the
   replacement not being type-aware.  These changes were reverted.

Differential Revision: https://phabricator.services.mozilla.com/D88903
2020-09-02 09:54:37 +00:00
pbz b25ea76227 Bug 1661030 - Updated tests for external protocol dialog in TabDialogBox. r=Gijs,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D88425
2020-09-02 14:26:26 +00:00
Gijs Kruitbosch cfd34797bb Bug 1660277 - adjust when we save per-filetype download preferences in the helper app dialog for types handled internally, r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D88695
2020-09-01 02:52:20 +00:00
Toshihito Kikuchi 9b11b259f9 Bug 1654100 - Backed out changeset 6e556d9c0845. r=froydnj
Now that we've concluded no immediate action is needed for slow
ShellExecuteByExplorer, `SHELLEXECUTEBYEXPLORER_DURATION_MS` is
no longer needed.

Differential Revision: https://phabricator.services.mozilla.com/D86143
2020-08-31 18:05:56 +00:00
Matt Woodrow 27bb5a7ac9 Bug 1643204 - Fire pageshow event when we finish loading a Document.open load, if we haven't already fired one for the Document. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D84934
2020-08-27 03:51:22 +00:00
Narcis Beleuzu a502871f99 Backed out changeset da1424ee1d11 (bug 1643204) for wpt failure on reload.window.html CLOSED TREE 2020-08-27 04:56:35 +03:00
Matt Woodrow 5193267988 Bug 1643204 - Fire pageshow event when we finish loading a Document.open load, if we haven't already fired one for the Document. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D84934
2020-08-26 10:11:13 +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
Kershaw Chang 4fdec2e031 Bug 1658532 - Add `REL_PRELOAD_MISS_RATIO` telemetry measuring ratio of used vs unused preloads per "as" type, r=smaug,chutten
Differential Revision: https://phabricator.services.mozilla.com/D86736
2020-08-24 11:24:21 +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 73e4e809df Backed out changeset d7d16d30097d (bug 1659008) for perma failures on browser_download_open_with_internal_handler.js. CLOSED TREE 2020-08-21 01:40:03 +03:00
Emilio Cobos Álvarez 341aec03de Bug 1658551 - Properly sanitize the URI we log to the console. r=heycam
Drive-by, but this is what a bunch of other console messages do.

Depends on D87267

Differential Revision: https://phabricator.services.mozilla.com/D87268
2020-08-20 22:04:36 +00:00
Emilio Cobos Álvarez 44b1932fad Bug 1658551 - Move preload usage timer creation to the common NotifyOpen implementation. r=heycam
Not just the one that takes a channel. This fixes the issue.

Also, as an optimization, avoid creating a timer if we're used already
or we have already one.

Differential Revision: https://phabricator.services.mozilla.com/D87267
2020-08-20 22:01:29 +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 26f3e611e6 Bug 1659008 - do not store user preferences for binary/octet-stream mimetypes, r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D87789
2020-08-20 21:41:47 +00: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 908b40d98b Bug 1659737 - Add pref to control showing radio button for viewable internally types. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D87456
2020-08-18 23:03:12 +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
Frederik Braun 6c85c74f16 Bug 1655716 - Introduce TYPE_INTERNAL_FETCH_PRELOAD and use in HTMLLinkElement::AsValueToContentPolicy() - r=emilio,mayhemer,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D85980
2020-08-11 12:33:14 +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
Simon Giesecke 1e02318b49 Bug 1653335 - Replace MakeSpan uses by constructor calls. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83817
2020-08-07 07:49:47 +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
Simon Giesecke 96f3e7e019 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-04 11:27:07 +00:00
Noemi Erli 381fca9783 Backed out 4 changesets (bug 1654992, bug 1654991) for causing timeous in mask-opacity-1e.html
Backed out changeset 11f0f54c6e0a (bug 1654992)
Backed out changeset a353dd5b3f08 (bug 1654991)
Backed out changeset 6a7964ba549f (bug 1654991)
Backed out changeset cf3bfb91d98c (bug 1654991)
2020-08-03 22:09:36 +03:00
Simon Giesecke 032d2ac9d3 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-03 14:54:18 +00:00
Sebastian Streich 9644a40740 Bug 1558394 - Block downloads in sandboxed iframes r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D67351
2020-07-29 11:50:09 +00:00
Joel Maher 2f2dc70492 Bug 1654553 - fix browser chrome tests to support Object.is instead of ==. r=gbrown,preferences-reviewers,Gijs,rpl
fix browser chrome tests to support Object.is instead of ==

Differential Revision: https://phabricator.services.mozilla.com/D84539
2020-07-27 17:02:35 +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
Toshihito Kikuchi ab3b43d45a Bug 1654100 - Measure the elapsed time of ShellExecuteByExplorer. r=froydnj
This patch adds a new measurement to the histogram about the elapsed time
of `ShellExecuteByExplorer`.  If ShellExecuteByExplorer takes long in
a considerable number of instances, we need to consider fixing bug 1646986.

Differential Revision: https://phabricator.services.mozilla.com/D84407
2020-07-23 19:57:35 +00:00
Emilio Cobos Álvarez ff61891772 Bug 1653011 - Simplify and make WeakPtr<Derived> usable and compact. r=froydnj,sg,geckoview-reviewers,jgilbert,kvark,snorp
Having two classes in the inheritance chain inherit from SupportsWeakPtr
now won't compile, but you can use WeakPtr<Derived> when any base class
inherits from SupportsWeakPtr.

Differential Revision: https://phabricator.services.mozilla.com/D83674
2020-07-23 14:51:46 +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
Cameron McCormack 938328e6b5 Bug 1650409 - Null check preload URL parsing. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D84035
2020-07-18 13:54:22 +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
Simon Giesecke 00997c3c4d Bug 1652007 - Move implementation of UsageTimer to cpp file to avoid dependency on dom/base/Document.h. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D83101
2020-07-15 12:47:41 +00:00
Frederik Braun a7153982e8 Bug 1366973: Rename security flags to not contain DATA anymore r=geckoview-reviewers,ckerschb,snorp
Differential Revision: https://phabricator.services.mozilla.com/D83490
2020-07-15 11:20:45 +00:00
Kris Maglione b6be72f351 Bug 1649554: Part 1 - Move deprecated component registration helpers out of XPCOMUtils. r=mccr8,remote-protocol-reviewers,marionette-reviewers,perftest-reviewers,webcompat-reviewers,whimboo,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D81749
2020-07-10 23:58:30 +00:00
Kris Maglione 9d78661f88 Bug 1649221: Update ChromeUtils.generateQI callers to pass strings. r=mccr8,remote-protocol-reviewers,marionette-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,preferences-reviewers,agi,whimboo,Bebe,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D81594
2020-07-10 23:58:28 +00:00
Nika Layzell 22a65a237e Bug 1650163 - Part 1: Switch native remoteType values to nsCString, r=farre,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82104
2020-07-08 20:15:59 +00:00
Mihai Alexandru Michis 1ba2a3f6f6 Backed out 3 changesets (bug 1650163) for causing bustages in nsContentSecurityManager.cpp
CLOSED TREE

Backed out changeset 51d7c644a1e6 (bug 1650163)
Backed out changeset 3d2b6908447a (bug 1650163)
Backed out changeset 79141707d47b (bug 1650163)
2020-07-08 21:18:44 +03:00
Nika Layzell c850a94434 Bug 1650163 - Part 1: Switch native remoteType values to nsCString, r=farre,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82104
2020-07-08 14:54:48 +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
Narcis Beleuzu 8359f16846 Backed out 7 changesets (bug 1650163, bug 1649477) for bustages on JSActor.cpp . CLOSED TREE
Backed out changeset 4a21afb65254 (bug 1650163)
Backed out changeset c41753a56f5a (bug 1650163)
Backed out changeset 5fb444c35764 (bug 1650163)
Backed out changeset 830aa93d2b0c (bug 1649477)
Backed out changeset eca6e9dce450 (bug 1649477)
Backed out changeset 5b217aa88289 (bug 1649477)
Backed out changeset 8959d02b840f (bug 1649477)
2020-07-08 04:09:27 +03:00
Nika Layzell df351180c3 Bug 1650163 - Part 1: Switch native remoteType values to nsCString, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D82104
2020-07-06 20:30:58 +00:00
Simon Giesecke 9364b353d4 Bug 1648010 - Remove NS_NAMED_LITERAL_CSTRING and NS_NAMED_LITERAL_STRING macros. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80631
2020-07-01 08:42:31 +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
Matt Woodrow 213fab51e4 Bug 1646892 - Allow DocumentChannel process switches into the parent process. r=jya,nika
Differential Revision: https://phabricator.services.mozilla.com/D80327
2020-06-27 04:10:23 +00:00
Matt Woodrow 9e57de431f Bug 1626362 - Don't return a failure from nsDocumentOpenInfo::OnStartRequest if we decide to handle the response with the external helper app and then fail. r=nika
The WPT a-download-click-404.html requires this behaviour for links with the download attribute, and this is also the current behaviour for Content-Disposition: Attachment (see bug 1604308).

This previously worked because the parent process version of nsDocumentOpenInfo failed (with NS_ERROR_FILE_NOT_FOUND), but the error code was discarded and we forwarded the channel to the content process. The content process version then would then return NS_ERROR_WONT_HANDLE_CONTENT since the load requires downloading, but we don't allow that in the content process. This new error code is one that doesn't have an associated error page (unlilke the original error), so was silently discarded.

Differential Revision: https://phabricator.services.mozilla.com/D81014
2020-06-25 22:13:31 +00:00
Frederik Braun 11d9d8e44d Bug 1647605 - add remotetype to nsiparentchannel (and inheritors) r=kershaw
Differential Revision: https://phabricator.services.mozilla.com/D80887
2020-06-25 12:00:52 +00:00
Matt Woodrow 00dc8d3d73 Bug 1646582 - Remove DOM(Inner)WindowID from nsIWebProgress. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D80128
2020-06-24 19:58:15 +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
Dorel Luca 90a64f0da1 Backed out 4 changesets (bug 1646582) for Browser-chrome failures on nsIWebProgress.addProgressListener. CLOSED TREE
Backed out changeset 2111dd0d6dc0 (bug 1646582)
Backed out changeset e6c496c5a4b1 (bug 1646582)
Backed out changeset 49b4ae8c8be0 (bug 1646582)
Backed out changeset 9d42ec89240c (bug 1646582)
2020-06-24 07:50:07 +03:00
Matt Woodrow 21ac707a3b Bug 1646582 - Remove DOM(Inner)WindowID from nsIWebProgress. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D80128
2020-06-24 03:24:21 +00:00
Honza Bambas 3f23870623 Bug 1603542 - Log a warning in the web console when a preloaded resource is not used, r=Harald
Differential Revision: https://phabricator.services.mozilla.com/D76527
2020-06-23 17:18:20 +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
Narcis Beleuzu b894acb874 Backed out 4 changesets (bug 1646582) for mochitest failures on test_ext_tabs_create.html . CLOSED TREE
Backed out changeset ce5cdfc5d7cf (bug 1646582)
Backed out changeset 2ac69a2b6708 (bug 1646582)
Backed out changeset 74d89cb24414 (bug 1646582)
Backed out changeset 7de0ff1af560 (bug 1646582)
2020-06-23 06:30:03 +03:00
Matt Woodrow 79562a2ca1 Bug 1646582 - Remove DOM(Inner)WindowID from nsIWebProgress. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D80128
2020-06-23 01:23:57 +00:00
Emilio Cobos Álvarez abd87a6510 Bug 1646776 - Make sure to fire load rather than error events for preload links that hit the CSS cache. r=mayhemer
When we hit the stylesheet cache for an existing stylesheet in a
different document:

 * There's no existing preload in the PreloadService (because the sheet
   was loaded in another document).

 * We don't create a PreloaderBase (because we don't trigger a load at
   all).

 * And thus we believe the load has just errored, which is wrong...

Fix it by properly passing through the "already complete" status from
PreloadStyle.

Note that there's still another issue, which is that we'd still hit this
broken path if two stylesheets with the same URI are loading in
different documents and the CSS loader coalesces them.

For that, I think we'd have to make SheetLoadData the thing that
actually implements PreloaderBase. This is kind of an obscure case, and
SheetLoadData has a pretty complex lifetime already (keeps alive a whole
lot of stuff), so I'd prefer to do this in a separate bug.

Differential Revision: https://phabricator.services.mozilla.com/D80289
2020-06-22 14:18:19 +00:00
Emilio Cobos Álvarez 6bb08bd490 Bug 1646056 - Use const references as keys instead of raw pointers for PreloadHashKey. r=mayhemer
Feels a bit more natural for the callers this way. This should have no
behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D79831
2020-06-18 14:06:34 +00:00
Emilio Cobos Álvarez 939c7c466b Bug 1642591 - Don't make referrer policy a cache miss for sub-resource {pre,}loads. r=mayhemer,tnikkel
For preload we're already effectively not using it, I think, due to
bug 1642325.

For images, this matches the spec, see earlier comments in this bug and
https://bugzilla.mozilla.org/show_bug.cgi?id=1174921#c17.  I think it
makes sense for other sub-resources to align as well.

Differential Revision: https://phabricator.services.mozilla.com/D79812
2020-06-18 14:06:20 +00:00
Kris Maglione 79760bfbb6 Bug 1642425: Part 3 - Fix nsDocLoader::GetIsTopLevel under Fission. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D77702
2020-06-17 18:01:10 +00:00
Noemi Erli 22b81ffefa Backed out 2 changesets (bug 1603542) for causing assertion failures in Loader.cpp CLOSED TREE
Backed out changeset cc70c96b63e0 (bug 1603542)
Backed out changeset c3dcacdd97c4 (bug 1603542)
2020-06-17 18:37:45 +03:00
Honza Bambas 4570854a4c Bug 1603542 - Log a warning in the web console when a preloaded resource is not used, r=Harald
Differential Revision: https://phabricator.services.mozilla.com/D76527
2020-06-17 14:06:50 +00:00
Emilio Cobos Álvarez 5ce8c5c731 Bug 1646032 - Avoid a silly string copy in PreloadService. r=mayhemer
There's no real need to go through a DOMString here.

Differential Revision: https://phabricator.services.mozilla.com/D79815
2020-06-16 14:07:18 +00:00
Emilio Cobos Álvarez 6ce135fbfc Bug 1646019 - Make PreloadHashKey don't check referrer for equality for style. r=mayhemer
We probably should remove the referrer policy check altogether in
bug 1642591, but the preload code still uses the whole referrer as the
key for css, which the css loader stopped doing in bug 1599160.

So this should be an uncontroversial simplification.

Differential Revision: https://phabricator.services.mozilla.com/D79810
2020-06-16 11:41:18 +00:00
Nika Layzell cde53b3bec Bug 1508306 - Part 1: Migate the Large-Allocation handler to DocumentLoadListener, r=mattwoodrow,necko-reviewers,geckoview-reviewers,agi,valentin
This removes the diagnostic warnings which used to be logged when the
Large-Allocation header was present, but failed to switch into a
Large-Allocation process. Due to the low adoption of the header, this shouldn't
be too large of a problem, but we can look into re-adding the diagnostics if
needed in the future.

The new codepath no longer performs multiple network requests for
Large-Allocation resources, and now relies on the battle-tested
DocumentLoadListener codepath for process switching.

Differential Revision: https://phabricator.services.mozilla.com/D78998
2020-06-15 23:24:07 +00:00
Simon Giesecke 0735ecafd8 Bug 1645382 - Remove unnecessary arguments from NS_OBSERVER_ARRAY_NOTIFY_* macros. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79485
2020-06-15 09:05:00 +00:00
Narcis Beleuzu a8dde16e58 Backed out 10 changesets (bug 1508306, bug 1640019) for bc failures on browser_autoOpen.js . CLOSED TREE
Backed out changeset 8844170ff408 (bug 1508306)
Backed out changeset b750f1d873cf (bug 1508306)
Backed out changeset c7170e76e676 (bug 1640019)
Backed out changeset 5905995e4815 (bug 1640019)
Backed out changeset 7bf86513348e (bug 1640019)
Backed out changeset f7d0605295f7 (bug 1640019)
Backed out changeset 521b4d5a9a89 (bug 1640019)
Backed out changeset 8542edc564bc (bug 1640019)
Backed out changeset 4f6a03152526 (bug 1640019)
Backed out changeset 30d2bf04719b (bug 1640019)
2020-06-12 22:47:50 +03:00
Nika Layzell 47c0aeb539 Bug 1508306 - Part 1: Migate the Large-Allocation handler to DocumentLoadListener, r=mattwoodrow,necko-reviewers,geckoview-reviewers,agi,valentin
This removes the diagnostic warnings which used to be logged when the
Large-Allocation header was present, but failed to switch into a
Large-Allocation process. Due to the low adoption of the header, this shouldn't
be too large of a problem, but we can look into re-adding the diagnostics if
needed in the future.

The new codepath no longer performs multiple network requests for
Large-Allocation resources, and now relies on the battle-tested
DocumentLoadListener codepath for process switching.

Differential Revision: https://phabricator.services.mozilla.com/D78998
2020-06-12 16:52:13 +00:00
Marco Castelluccio 9914bb84fe Bug 1644900 - Remove nsMIMEInfoBase::IsPdf as it's no longer used. r=tkikuchi
Depends on D79191

Differential Revision: https://phabricator.services.mozilla.com/D79275
2020-06-11 14:38:43 +00:00
Marco Castelluccio 1f583acf67 Bug 1644900 - Open Edge in a toolbar-less window when it is selected as a default handler for any type of file. r=jaws,tkikuchi
Differential Revision: https://phabricator.services.mozilla.com/D79191
2020-06-11 14:38:21 +00:00
Honza Bambas 089a846bd0 Bug 1642303 - Keep channel of FetchPreloader even after the load has finished to let preload consumers use that channel early after opening, r=baku
Differential Revision: https://phabricator.services.mozilla.com/D78729
2020-06-10 14:21:56 +00:00
Alexis Beingessner 5ea808f2bd Bug 1642722 - convert the nsURILoader.cpp VarCache prefs to StaticPrefs. r=KrisWright
converts:
  * dom.largeAllocationHeader.enabled
  * general.document_open_conversion_depth_limit

Differential Revision: https://phabricator.services.mozilla.com/D78916
2020-06-09 23:03:55 +00:00
Honza Bambas 8965ac6edc Bug 1642325 - Exclude referrer policy from the preload hash key, r=ckerschb
Depends on D77664

Differential Revision: https://phabricator.services.mozilla.com/D77665
2020-06-08 17:00:37 +00:00
Jared Wein ce7a61e0dc Bug 1643673 - Guard against a null default application. r=tkikuchi
Differential Revision: https://phabricator.services.mozilla.com/D78551
2020-06-05 18:19:12 +00:00
Mark Striemer 3e55277036 Bug 1632277 - Part 1: Launch PDFs in app mode when default r=jaws,tkikuchi
Differential Revision: https://phabricator.services.mozilla.com/D73774
2020-06-03 18:21:32 +00:00
Gijs Kruitbosch 6c6ab1223a Bug 1606797 - restrict opening the 'open external protocol' dialog, r=johannh,fluent-reviewers,flod
This patch adds the following constraints:

- close the dialog when the originating context navigates;
- close the dialog when the originating context closes / goes away;
- do not allow more than 1 dialog at a time;

Differential Revision: https://phabricator.services.mozilla.com/D77029
2020-06-02 17:12:09 +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
Matt Woodrow 7adf95e964 Bug 1620679 - Don't fire load event from within Stop(). r=smaug
This matches what the spec says, and what blink does.

Differential Revision: https://phabricator.services.mozilla.com/D73994
2020-05-30 17:19:54 +00:00
Emilio Cobos Álvarez 2f5607b8d0 Bug 1642221 - Rename SheetLoadData::mLoaderPrincipal to mTriggeringPrincipal. r=jwatt
I'm about to introduce the concept of "Loader principal" (as in "the
principal of the CSS loader"), and SheetLoadData already has an
mLoaderPrincipal.

However SheetLoadData's principal is just the triggering principal (the
principal that initiated the load). So name it that with consistency
with SheetInfo::mTriggeringPrincipal etc.

Differential Revision: https://phabricator.services.mozilla.com/D77613
2020-05-31 17:11:57 +00:00
Jared Wein fd5b93e11e Bug 1640589 - Update the mimeInfo when a download is handled internally. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D77144
2020-05-28 16:48:48 +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
Valentin Gosu 243b953e9d Bug 1586630 - Add check to GetURIDirectory r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D76125
2020-05-27 11:48:07 +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
Matt Woodrow 38ffa87e05 Bug 1640160 - Serialize mRequestContextId with BrowsingContext's IPCInitializer to ensure that we don't try to create a request context with an id of 0. r=nika
This was a bit of pain to track down, because some code was allowing an ID of 0, and creating a request context to match, but other code was treating 0 as invalid.

Differential Revision: https://phabricator.services.mozilla.com/D76652
2020-05-26 21:14:27 +00:00
Butkovits Atila 1d2238af48 Backed out 2 changesets (bug 1620679) for perma Reftest failure. CLOSED TREE
Backed out changeset 8190c67514cc (bug 1620679)
Backed out changeset 4ca2912d7421 (bug 1620679)
2020-05-26 10:58:42 +03:00
Matt Woodrow d347ab0ef5 Bug 1620679 - Don't fire load event from within Stop(). r=smaug
This matches what the spec says, and what blink does.

Differential Revision: https://phabricator.services.mozilla.com/D73994
2020-05-26 03:08:40 +00:00
Honza Bambas 0057c96229 Bug 1637039 - Make synchronous open errors of a fetch preloading channel be notified to link preload tags, r=kershaw
Differential Revision: https://phabricator.services.mozilla.com/D76367
2020-05-25 18:40:07 +00:00
Honza Bambas b10e870a54 Bug 1637039 - Adjust `PreloaderBase::NotifyStart` to read channel tainting also for non-opened preloads, r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D76362
2020-05-25 18:38:36 +00:00
Jared Wein c686b5d561 Bug 1639606 - Downloads that are set to launchWhenSucceeded with an external application should not get handled internally, unless an attempt has already been made to launch externally. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D76243
2020-05-23 16:21:16 +00:00
Mihai Alexandru Michis 9afe3180db Backed out changeset 2708f3e553cb (bug 1639606) for causing xpcshell failures in toolkit/components/downloads
CLOSED TREE
2020-05-23 00:26:32 +03:00
Jared Wein 1b3310643d Bug 1639606 - Downloads that are set to launchWhenSucceeded with an external application should not get handled internally, unless an attempt has already been made to launch externally. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D76243
2020-05-22 17:43:57 +00:00
Bogdan Tara 404a84e0a6 Backed out changeset ee9c7714e513 (bug 1639606) for browser_download_open_with_internal_handler.js failures CLOSED TREE
DONTBUILD
2020-05-22 07:04:45 +03:00
Jared Wein c9919e67e4 Bug 1639606 - Downloads that are set to launchWhenSucceeded with an external application should not get handled internally, unless an attempt has already been made to launch externally. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D76243
2020-05-22 02:09:45 +00:00
Matt Woodrow b7105cc963 Bug 1627533 - Create LoadGroups for docshells using the BrowsingContext's request context id. r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D75885
2020-05-21 03:38:37 +00:00
Emilio Cobos Álvarez c3b7227771 Bug 1639392 - Merge nsIStyleSheetLinkingElement and nsStyleLinkElement, and call it LinkStyle. r=jwatt
Which is the spec term. nsIStyleSheetLinkingElement is even more
confusing since it may not be an element at all (see: processing
instructions).

Differential Revision: https://phabricator.services.mozilla.com/D76071
2020-05-21 03:07:16 +00:00
Noemi Erli 3adaaeb800 Backed out 3 changesets (bug 1627533) for causing assertions in RequestContextService.cpp CLOSED TREE
Backed out changeset 3b35a1852a60 (bug 1627533)
Backed out changeset 70fa5e075269 (bug 1627533)
Backed out changeset 0d1046670534 (bug 1627533)
2020-05-21 04:16:21 +03:00
Matt Woodrow f8b14e22ba Bug 1627533 - Create LoadGroups for docshells using the BrowsingContext's request context id. r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D75885
2020-05-20 23:41:36 +00:00
Jared Wein f5e23e91eb Bug 1638683 - When opening a PDF internally, the new tab should appear adjacent to the opening tab. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D75818
2020-05-20 14:28:04 +00:00
Honza Bambas d88ed92c5f Bug 1618548 - Make `Link: rel=preload` response header work with preload-as-speculative-load, r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D75133
2020-05-18 17:33:57 +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
Honza Bambas 7a64bc8d9b Bug 1618543 - Let `fetch()` use "fetch" preloads, r=baku
Differential Revision: https://phabricator.services.mozilla.com/D74899
2020-05-18 12:18:14 +00:00
Mihai Alexandru Michis 19a4744fcc Backed out 2 changesets (bug 1620679) for causing failures in nsDocShell.cpp
CLOSED TREE

Backed out changeset 2957142243c5 (bug 1620679)
Backed out changeset 60df74b03f34 (bug 1620679)
2020-05-18 14:47:37 +03:00
Matt Woodrow 2f95a6ac80 Bug 1620679 - Don't fire load event from within Stop(). r=smaug
This matches what the spec says, and what blink does.

Differential Revision: https://phabricator.services.mozilla.com/D73994
2020-05-18 07:30:14 +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 f370299b89 Bug 773942 - Add tests that cover the generic PDF description and the 'open with (internal handler)' option of the Unknown Content Type dialog. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D73537
2020-05-16 06:00:03 +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 6db46926a5 Bug 773942 - Add tests that cover the generic PDF description and the 'open with (internal handler)' option of the Unknown Content Type dialog. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D73537
2020-05-16 04:25:18 +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