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

3408 Коммитов

Автор SHA1 Сообщение Дата
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