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
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
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
Previously this would typically set GRE_HOME to /data/data/org.mozilla.geckoview.test,
even though org.mozilla.geckoview.test is not normally installed when running
xpcshell tests -- a non-existent directory in a privileged location!
The new location, remoteBinDir, is typically /data/local/xpcb, the location of the
xpcshell executable.
Differential Revision: https://phabricator.services.mozilla.com/D74938
This also renames `saveToDisk` to the more accurate `promptForSaveDestination`
given that it doesn't actually do the saving itself.
Differential Revision: https://phabricator.services.mozilla.com/D73507
Raw Cr.ERROR don't get stack information, same as throwing JS literals instead
of `new Error()`s.
This was done automatically with a new eslint rule that will be introduced in
the next commit. One instance of a raw Cr.ERROR was not replaced since it is
used in a test that specifically checks the preservation of raw Cr values in
XPCJS. The rule will be disabled for that instance.
Differential Revision: https://phabricator.services.mozilla.com/D28073
This fixes 1597154 because the lists of URIs here and in nsDocShell now
match.
Note that they don't exactly match, there's an exception for about:newtab
which we'll fix in a follow-up bug.
Differential Revision: https://phabricator.services.mozilla.com/D69136
--HG--
extra : moz-landing-system : lando
Thunderbird has no default handlers so test_check_defaults_get_added does
nothing and test_check_default_modification fails looking for a mailto handler.
Differential Revision: https://phabricator.services.mozilla.com/D62525
--HG--
extra : moz-landing-system : lando
The getDefaultFileName helper function does its own filename parsing using header info
it has previously 'manually' retrieved, so it needs to manually unescape its input.
Meanwhile, NS_GetFilenameFromDisposition is used by webbrowserpersist and for
the title of documents, and so updating that helps ensure better UI as well as
correct filename suggestions when saving from the context menu.
Differential Revision: https://phabricator.services.mozilla.com/D61734
--HG--
rename : accessible/tests/mochitest/moz.png => uriloader/exthandler/tests/mochitest/file_with@@funny_name.png
rename : toolkit/components/mediasniffer/test/unit/data/file.webm => uriloader/exthandler/tests/mochitest/file_with[funny_name.webm
extra : moz-landing-system : lando
We currently fail to offer 'open with' options for application/zip mimetype
.zip files, because out of the box, the Windows registry does not contain
mimetype entries for application/zip. In fact, it contains comparatively
few entries, and right now we bail out with an empty mime info object if
we cannot find the server-provided mimetype in the registry (or cannot
find an associated extension for that mimetype).
Prior to the changes from bug 1597985, we would first try to find a handler
based on the default extension for the mimetype, and used the file extension
if that failed.
The changes in this commit will cause us to fetch the default file extension
for the mimetype, but continue with the provided extension if no mimetype
information is available, restoring functionality in the case where Windows
has no mimetype information.
Differential Revision: https://phabricator.services.mozilla.com/D60139
--HG--
extra : moz-landing-system : lando