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

7987 Коммитов

Автор SHA1 Сообщение Дата
Bogdan Tara ebf7802e4a Backed out 2 changesets (bug 369739, bug 1696027) for test_TelemetryEnvironment.js xpcshell failures CLOSED TREE
Backed out changeset 9ea26aff5a9b (bug 369739)
Backed out changeset 395e7278e415 (bug 1696027)
2021-03-10 10:27:02 +02:00
Mark Banner 62144490ad Bug 1696027 - Remove use of nsISearchEngine.addEngineWithDetails from mochitests. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D107624
2021-03-10 07:40:22 +00:00
Henri Sivonen 4a7c55c8ad Bug 1691892 - Reject stale active browsing context setting attempts by action id in content processes. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D107192
2021-03-10 05:36:48 +00:00
Olli Pettay a2d036fda6 Bug 1696923 - [SHIP] Update SaveLayoutStateFlag after page load similarly to in-process session history, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D107479
2021-03-09 18:16:58 +00:00
Nika Layzell 64fd29f182 Bug 1663757 - Part 4: Track current remote URI on CanonicalBrowsingContext, r=annyG,farre
This URI is intended to reflect the currentURI field on the content nsIDocShell,
and is the value used for getters like `window.location.href`. For most
documents, this generally matches the Document URI on WindowGlobalParent, it
does not match in specific cases such as error pages or when performing a
session restore.

The field is kept up-to-date by listening to `OnLocationChange` notifications
from the content process, and is ignored when the BrowsingContext is loaded in
the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D105559
2021-03-09 15:29:41 +00:00
Nika Layzell 3ff4296a89 Bug 1209947 - Part 2: Fire location change events for all subframe navigations, r=smaug,Gijs
The check in this function was added in bug 82236 to avoid an issue in the
mozilla suite where the UI would update to a subframe's URI. This came up
previously in bug 1206879 when we observed we weren't sending OnLocationChange
events when we were expecting, which was causing issues for pushState location
changes. A workaround was added in that bug to avoid the issue for the specific
case of pushState.

This patch removes the redundant check, and reverts the workaround added in that
bug. Unfortunately, we aren't able to fully remove nsISHEntry::GetIsSubframe, as
it is now used by Browser{Parent,Child}::CanCancelContentJS.

Differential Revision: https://phabricator.services.mozilla.com/D105555
2021-03-09 15:29:39 +00:00
Olli Pettay b90bd58381 Bug 1696266, test reloading a page which might otherwise enter bfcache, r=peterv
Depends on D107300

Differential Revision: https://phabricator.services.mozilla.com/D107536
2021-03-09 13:42:43 +00:00
Olli Pettay a46567f045 Bug 1696266, limit the load types which may cause the page to enter bfcache, r=peterv
The change to dom/base/nsFrameLoaderOwner.cpp is to log about the issues but still ensure we don't crash.

I'd prefer to not put error loads to bfcache.

Differential Revision: https://phabricator.services.mozilla.com/D107300
2021-03-09 13:42:43 +00:00
Simon Giesecke bc9766c354 Bug 1634281 - Use nsTHashMap for nsBaseHashtable/nsDataHashtable uses with RefPtr data type. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D105963
2021-03-09 11:39:36 +00:00
Mark Banner 5319c0f444 Bug 1696873 - Apply automatic fixes to enable more ESLint rules on remaining docshell xhtml files. r=smaug
This automatically fixes issues for these rules: dot-notation, object-shorthand and mozilla/no-useless-parameters
The other enabled rules had no issues associated with them, so are enabled without code changes.

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D107424
2021-03-08 13:41:52 +00:00
Mark Banner acb019156a Bug 1696873 - Enable ESLint rule no-undef on remaining docshell xhtml files. r=smaug
Depends on D100450

Differential Revision: https://phabricator.services.mozilla.com/D107423
2021-03-08 13:41:52 +00:00
Sonia Singla c58860a007 Bug 1656293 - Enable ESLint no-unused-vars rules on docshell/test/chrome/*.xhtml files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D100450
2021-03-08 09:20:53 +00:00
Simon Giesecke 7c6ccbe4a8 Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-05 15:29:49 +00:00
Alexandru Michis 8c28934f09 Backed out changeset c6b72f3c76ba (bug 1676361) for causing bustages in nsSocketTransportService2.cpp
CLOSED TREE
2021-03-04 23:26:04 +02:00
Simon Giesecke e41d350c04 Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-04 17:30:48 +00:00
Noemi Erli 11891059f7 Backed out changeset 06452c4c828c (bug 1676361) for causing bustages CLOSED TREE 2021-03-04 19:13:56 +02:00
Simon Giesecke 6c371fcc1c Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-04 16:14:44 +00:00
smolnar 9f8b74a18d Backed out changeset 9062e17fe15c (bug 1676361) on devs request. CLOSED TREE 2021-03-04 16:51:21 +02:00
Simon Giesecke e1330cc8f0 Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-04 14:32:15 +00:00
Jan-Erik Rediger 4a219f294b Bug 1695197 - Remove MOZ_GLEAN constant, introduce MOZ_GLEAN_ANDROID. r=chutten,emilio
We enable compilation of FOG/Glean on _all_ platforms.
We disable Glean initialization and metric recording on Android (GeckoView) by respecting MOZ_GLEAN_ANDROID.
This way GeckoView just works, consumers don't need to think about it (except in tests, these need to be disabled for Android builds).

Stubbing out the metric implementations will happen in the commits after
this one.

Differential Revision: https://phabricator.services.mozilla.com/D106766
2021-03-04 11:15:12 +00:00
Emilio Cobos Álvarez 7508fffd89 Bug 1694927 - Don't allow location APIs to steal focus. r=smaug,hsivonen
The check was a bit too general it seems. Explicitly allow moving focus
for link clicks and window.open(), which are the things we have tests
for and care about moving focus.

Differential Revision: https://phabricator.services.mozilla.com/D107039
2021-03-03 15:44:59 +00:00
Olli Pettay 85323d2cfb Bug 1692208 - Remove unused nsSHistory::mIsRemote, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D104824
2021-03-03 12:28:50 +00:00
Simon Giesecke b5855b89fc Bug 1634281 - Remove unused nsDataHashtable.h includes. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D106007
2021-03-03 08:58:52 +00:00
Olli Pettay 3790a609ef Bug 1689601, sync fields when loading a page from bfcache, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D106737
2021-03-02 12:13:22 +00:00
Olli Pettay 9a5e1b83eb Bug 1689601, hide fission.bfcacheInParent pref access behind a function which checks that also SHIP is enabled, r=peterv,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D106562
2021-03-02 12:13:21 +00:00
Olli Pettay 0d29b12841 Bug 1689601, Rename RemotenessChangeState to RemotenessChangeOptions, r=peterv
This addresses part of the review comment from https://phabricator.services.mozilla.com/D105229

Differential Revision: https://phabricator.services.mozilla.com/D106561
2021-03-02 12:13:21 +00:00
Olli Pettay bba6b348ae Bug 1689601, nested freeze/thaw, r=peterv
Non-SHIP bfcache seems to be rather complicated here, since it needs to explicitly store inner windows and what not.
SHIP should be able to handle this in a simpler way.
It is possible that some ordering needs still tweaking.

Differential Revision: https://phabricator.services.mozilla.com/D105360
2021-03-02 12:13:20 +00:00
Olli Pettay 0d8dbfb17e Bug 1689601, evict frameloaders from bfcache (missing still the time based eviction), r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D105239
2021-03-02 12:13:20 +00:00
Olli Pettay 911d46a8b6 Bug 1689601, try to use bfcache for top level pages, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D105238
2021-03-02 12:13:20 +00:00
Olli Pettay 2835639129 Bug 1689601, make it possible to call Document::CanSavePresentation non-recursively, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D105236
2021-03-02 12:13:19 +00:00
Olli Pettay aa8606dfbc Bug 1689601, store nsFrameLoader in SessionHistoryEntry/SHEntrySharedParentState, r=peterv
EvictOutOfRangeContentViewers call in SetFrameLoader doesn't do anything in this patch, but will
work with some followups.

Differential Revision: https://phabricator.services.mozilla.com/D105235
2021-03-02 12:13:18 +00:00
Olli Pettay b93e317cab Bug 1689601, add assertions to ensure SessionHistoryEntry objects are created only when session history in parent is enabled, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D105234
2021-03-02 12:13:18 +00:00
Olli Pettay 3df3621351 Bug 1689601, pass various states of remoteness change / browsing context swap using a helper struct, r=peterv
The name RemotenessChangeState uses same the convention as the related methods, even though there might
not be a remoteness change happening, only a browsing context switch. But the naming
inconsistency exists there even without any bfcache work.

RemotenessChangeState will be renamed to RemotenessChangeOptions in a followup.

Differential Revision: https://phabricator.services.mozilla.com/D105229
2021-03-02 12:13:16 +00:00
Olli Pettay aead729570 Bug 1689601, set active entry only when session history runs in the parent process, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D105228
2021-03-02 12:13:15 +00:00
Mihai Alexandru Michis 87f481bf9a Backed out 16 changesets (bug 1689601) for causing cpp bustages in nsFrameLoader.
CLOSED TREE

Backed out changeset 6e5523a7210d (bug 1689601)
Backed out changeset 745eaa468c74 (bug 1689601)
Backed out changeset a594bd02b8b6 (bug 1689601)
Backed out changeset 0c5fe977ced6 (bug 1689601)
Backed out changeset 2fca23521891 (bug 1689601)
Backed out changeset 334aeb627855 (bug 1689601)
Backed out changeset 2b2081a15d67 (bug 1689601)
Backed out changeset 307bde43cc96 (bug 1689601)
Backed out changeset 04aadec67ce2 (bug 1689601)
Backed out changeset 701eccb34772 (bug 1689601)
Backed out changeset 278db692aa8b (bug 1689601)
Backed out changeset c261c243a64d (bug 1689601)
Backed out changeset 7e8022e5696a (bug 1689601)
Backed out changeset 6138bfc6c08d (bug 1689601)
Backed out changeset 63295b3a62d0 (bug 1689601)
Backed out changeset 6d02e59ddc51 (bug 1689601)
2021-03-02 13:15:10 +02:00
Olli Pettay 8c1f93e71f Bug 1689601, sync fields when loading a page from bfcache, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D106737
2021-03-02 09:44:14 +00:00
Olli Pettay f09a7f25d5 Bug 1689601, hide fission.bfcacheInParent pref access behind a function which checks that also SHIP is enabled, r=peterv,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D106562
2021-03-02 09:44:14 +00:00
Olli Pettay 42a29f41de Bug 1689601, Rename RemotenessChangeState to RemotenessChangeOptions, r=peterv
This addresses part of the review comment from https://phabricator.services.mozilla.com/D105229

Differential Revision: https://phabricator.services.mozilla.com/D106561
2021-03-02 09:44:13 +00:00
Olli Pettay 9a08f751a4 Bug 1689601, nested freeze/thaw, r=peterv
Non-SHIP bfcache seems to be rather complicated here, since it needs to explicitly store inner windows and what not.
SHIP should be able to handle this in a simpler way.
It is possible that some ordering needs still tweaking.

Differential Revision: https://phabricator.services.mozilla.com/D105360
2021-03-02 09:44:13 +00:00
Olli Pettay 07a607c53d Bug 1689601, evict frameloaders from bfcache (missing still the time based eviction), r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D105239
2021-03-02 09:44:13 +00:00
Olli Pettay 101955fa30 Bug 1689601, try to use bfcache for top level pages, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D105238
2021-03-02 09:44:12 +00:00
Olli Pettay 1eac846424 Bug 1689601, make it possible to call Document::CanSavePresentation non-recursively, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D105236
2021-03-02 09:44:11 +00:00
Olli Pettay 67e5e0bf9b Bug 1689601, store nsFrameLoader in SessionHistoryEntry/SHEntrySharedParentState, r=peterv
EvictOutOfRangeContentViewers call in SetFrameLoader doesn't do anything in this patch, but will
work with some followups.

Differential Revision: https://phabricator.services.mozilla.com/D105235
2021-03-02 09:44:11 +00:00
Olli Pettay 09b5456656 Bug 1689601, add assertions to ensure SessionHistoryEntry objects are created only when session history in parent is enabled, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D105234
2021-03-02 09:44:11 +00:00
Olli Pettay 0b5b9fc66a Bug 1689601, pass various states of remoteness change / browsing context swap using a helper struct, r=peterv
The name RemotenessChangeState uses same the convention as the related methods, even though there might
not be a remoteness change happening, only a browsing context switch. But the naming
inconsistency exists there even without any bfcache work.

RemotenessChangeState will be renamed to RemotenessChangeOptions in a followup.

Differential Revision: https://phabricator.services.mozilla.com/D105229
2021-03-02 09:44:09 +00:00
Olli Pettay 1e9221de68 Bug 1689601, set active entry only when session history runs in the parent process, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D105228
2021-03-02 09:44:08 +00:00
Simon Giesecke b399a8194c Bug 1691913 - Add some convenience methods to LookupResult and EntryHandle. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D105475
2021-03-01 09:59:29 +00:00
Simon Giesecke 9af107a839 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
Simon Giesecke 4f75368dcb Bug 1691913 - Rename nsBaseHashtable::GetOrInsert(With) to LookupOrInsert(With). r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
The functions should be called "Lookup" rather than "Get" because they return
a DataType& (rather than UserDataType).

Differential Revision: https://phabricator.services.mozilla.com/D105472
2021-02-26 09:11:45 +00:00
Gijs Kruitbosch 8002a3c48c Bug 1678255 - prompt for external protocol links whose loads were also triggered externally, instead of looping forever, r=pbz,nika
This passes around the "are we external" bit of load information a bunch,
such that the external protocol handling code has access to it.

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

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

Differential Revision: https://phabricator.services.mozilla.com/D103967
2021-02-22 19:00:10 +00:00
Simon Giesecke 7c931c97c4 Bug 1689218 - Rename nsBaseHashtable::GetAndRemove to Extract. r=necko-reviewers,dragana
First, it should be called "Lookup" rather than "Get" because it returns
DataType (rather than UserDataType), but that would still be confusing,
since as opposed to other Lookup* methods, it does not return a DataType&
(and obviously, it can't). So "Extract" seems to be a better name, cf.
mozilla::Maybe::extract.

Differential Revision: https://phabricator.services.mozilla.com/D105471
2021-02-22 12:07:48 +00:00
Simon Giesecke d2caea36fa Bug 1691894 - Simplify uses of WithEntryHandle that only use OrInsert(With) by using GetOrInsertWith. r=xpcom-reviewers,necko-reviewers,jgilbert,nika
Differential Revision: https://phabricator.services.mozilla.com/D104676
2021-02-22 12:07:46 +00:00
Nika Layzell 25d1d214ab Bug 1691410 - Add support for reverting racy changes in CanSet, r=kmag
In some cases, a content process may think they should be able to make a change
to a synced field, but in the meantime something in the parent process has
changed and the change can no longer be applied. This was the cause of a number
of issues around the in-flight process ID, and can cause issues such as crashes
if the CanSet method was made too strict.

This patch introduces a new possible return type from `CanSet` which allows
requesting a `Revert`. A reverted field change will either be cancelled at the
source (if the CanSet fails in the setting process), or will be cancelled by
sending a new transaction back to the source process reverting the change to
ensure consistency.

In addition, some additional logging is added which made it easier to locate the
underlying bug and verify the correctness of the change.

The current primary use-case for this new feature is the CurrentInnerWindowId
field which can be updated by the previous process' docshell after the parent
process has already performed a switch to a new process. This can lead to the
current WindowContext being inaccurate for a BrowsingContext in some edge cases
as we allow the flawed set due the in-flight process ID matching.

This patch changes the logic to no longer check the in-flight process ID, and
instead revert any changes to the CurrentInnerWindowId field coming from a
process which is not currently active in the BrowsingContext.

No tests were added as it is very timing-sensitive, and difficult to create the
specific scenario, however without these changes my patch for bug 1663757
consistently causes geckoview-junit crashes due to currentWindowGlobal being
incorrect.

Differential Revision: https://phabricator.services.mozilla.com/D105553
2021-02-20 03:55:06 +00:00
Eitan Isaacson 6e8749d0da Bug 1693597 - P2: Rename ProxyAccessible to RemoteAccessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D105671
2021-02-19 23:14:33 +00:00
Kris Maglione b07bf8b037 Bug 1691595: Move evictAllContentViewers test code to SpecialPowers. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D104477
2021-02-18 21:04:12 +00:00
Alexis Beingessner 07f2f659c6 Bug 1686616 - make StringBundle use Components instead of Services. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D105531
2021-02-18 13:26:32 +00:00
Alexis Beingessner 442e2d6fa1 Bug 1686616 - make History use Components instead of Services. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D105524
2021-02-18 13:26:30 +00:00
Sean Feng 93ae22d5b9 Bug 1692350 - Implement a telemetry probe to collect page load data for documents that use lazyload r=emilio,chutten
Differential Revision: https://phabricator.services.mozilla.com/D104912
2021-02-17 22:25:02 +00:00
Mihai Alexandru Michis 8d0efc214f Backed out changeset 6a0dcd8f4e3e (bug 1692350) for causing crashes in WindowContext.
CLOSED TREE
2021-02-17 21:02:59 +02:00
Sean Feng 7917a71b50 Bug 1692350 - Implement a telemetry probe to collect page load data for documents that use lazyload r=emilio,chutten
Differential Revision: https://phabricator.services.mozilla.com/D104912
2021-02-17 17:17:52 +00:00
Anny Gakhokidze 50bc0db905 Bug 1687526 - Change test_scrollRestoration.html to use BroadcastChannel, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D105355
2021-02-16 20:38:10 +00:00
Simon Giesecke 661e25bf09 Bug 1692880 - Make Put accept DataType instead of wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D104850
2021-02-16 15:53:33 +00:00
Andrew McCreight e468f5e83a Bug 1672873 - Use BuildClonedMessageDataForChild to send cloneable data in SessionHistoryInfo. r=peterv
The serialization method for SessionHistoryInfo uses some low-level
functions to pack up some of the clone data, but this method
actually has a PContent actor available, so it can use one of the
nicer BuildClonedMessageDataFor methods to send this, which
should improve support for pushMessage with blobs.

The read method already uses the StealFromClonedMessageDataFor
methods so no changes are required there.

Differential Revision: https://phabricator.services.mozilla.com/D104775
2021-02-15 16:52:26 +00:00
Simon Giesecke ca94ec101e Bug 1691894 - Simplify uses of GetOrInsert where non-default-constructed entries are eventually inserted. r=xpcom-reviewers,necko-reviewers,nika,valentin
Differential Revision: https://phabricator.services.mozilla.com/D104674
2021-02-15 16:37:52 +00:00
smolnar 1afbbe67e1 Backed out 5 changesets (bug 1691894) for causing hazard failures in nsXULPrototypeCache. CLOSED TREE
Backed out changeset 22dc870ee609 (bug 1691894)
Backed out changeset 58c31e9d6ae3 (bug 1691894)
Backed out changeset 7483e84149d8 (bug 1691894)
Backed out changeset f977d6cfa973 (bug 1691894)
Backed out changeset db4503476f34 (bug 1691894)
2021-02-15 16:43:23 +02:00
Simon Giesecke 3c29a68440 Bug 1691894 - Make Put accept DataType instead of wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D104850
2021-02-15 10:04:46 +00:00
Henri Sivonen 8a1eddbeb1 Bug 1690169 - StopDocumentLoad even on STOP_NETWORK. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D104696
2021-02-15 06:02:17 +00:00
Noemi Erli e9cf2ebf0d Backed out changeset 89dd5f05ca91 (bug 1678255) for causing assertion failures in BasePrincipal.cpp CLOSED TREE 2021-02-11 06:15:26 +02:00
Gijs Kruitbosch ee25637a13 Bug 1678255 - prompt for external protocol links whose loads were also triggered externally, instead of looping forever, r=pbz,nika
This passes around the "are we external" bit of load information a bunch,
such that the external protocol handling code has access to it.

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

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

Differential Revision: https://phabricator.services.mozilla.com/D103967
2021-02-10 23:49:21 +00:00
Kris Maglione 0ec4615244 Bug 1662840: Move `overrideDPPX` from nsIContentViewer to BrowsingContext. r=whimboo,remote-protocol-reviewers,mtigley,emilio
Differential Revision: https://phabricator.services.mozilla.com/D104001
2021-02-10 01:30:35 +00:00
Simon Giesecke 183fad585f Bug 1688833 - Migrate LookupForAdd to WithEntryHandle in docshell. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D104200
2021-02-09 18:19:38 +00:00
Edgar Chen 0916876268 Bug 1690747 - Should also check blur is allowed in BrowsingContext::Blur(); r=hsivonen
When binding delegates blur() to BrowsingContext::Blur, the remote side skips
the check given that there is no js on the stack, but we should not skip the
check. This only affects design-mode which allows the focus moving to the root
element.

Differential Revision: https://phabricator.services.mozilla.com/D104008
2021-02-09 14:56:56 +00:00
Emilio Cobos Álvarez d871818995 Bug 1691214 - Take focus from window.open etc even if we're already active but not in the active window. r=hsivonen
With multiple windows, a browsing context being active doesn't guarantee
being in the active window, so we explicitly check for that. We need to
introduce an special case for the initial document because the initial
document in the active window requesting focus breaks focusing the
urlbar on a new window.

Differential Revision: https://phabricator.services.mozilla.com/D104326
2021-02-09 13:03:32 +00:00
Andreea Pavel c546ab6198 Backed out changeset ebb61065ad47 (bug 1690747) for failing mochitests at test_focus_design_mode.html on a CLOSED TREE 2021-02-09 15:11:05 +02:00
Edgar Chen 486af881a2 Bug 1690747 - Should also check blur is allowed in BrowsingContext::Blur(); r=hsivonen
When binding delegates blur() to BrowsingContext::Blur, the remote side skips
the check given that there is no js on the stack, but we should not skip the
check. This only affects design-mode which allows the focus moving to the root
element.

Differential Revision: https://phabricator.services.mozilla.com/D104008
2021-02-09 12:18:15 +00:00
Yura Zenevich c72349ac1a Bug 1689445 - revert EventUtils.sendMouseEvent back to being sync. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D104127
2021-02-09 01:30:08 +00:00
Kershaw Chang 22a60154b9 Bug 1685942 - Only fallback to original conn info when network error happens r=necko-reviewers,valentin,dragana
Differential Revision: https://phabricator.services.mozilla.com/D102703
2021-02-08 11:46:51 +00:00
smolnar 1b7149f584 Backed out changeset d807fa812d8f (bug 1691214) for causing failures in browser_bug1691214. CLOSED TREE 2021-02-08 13:24:16 +02:00
Emilio Cobos Álvarez 2480eacb0b Bug 1691214 - Take focus from window.open etc even if we're already active. r=hsivonen
With multiple windows, being active doesn't guarantee being in the
foreground window.

Differential Revision: https://phabricator.services.mozilla.com/D104326
2021-02-08 08:01:49 +00:00
Mihai Alexandru Michis 6da97a654e Backed out 2 changesets (bug 1689445) for causing bc failures in browser_search.js
Backed out changeset 2b1ec882c4c1 (bug 1689445)
Backed out changeset bcb4ba398ee0 (bug 1689445)
2021-02-06 05:33:02 +02:00
Yura Zenevich d3beb62c1d Bug 1689445 - revert EventUtils.sendMouseEvent back to being sync. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D104127
2021-02-05 21:26:54 +00:00
Nika Layzell 91f9c9c927 Bug 1681529 - Part 1: Add a test for reloading a page with a large postdata payload, r=peterv
Without the other patches in this series, this test fails with both with and
without Fission enabled, for two different reasons.

With Fission disabled, the second reload request appears as empty, due to us
being unable to rewind the postData nsIInputStream. With Fission enabled, the
second reload request causes crashes due to the nsMIMEInputStream's invariant of
requiring a seekable stream is invalidated, causing the nsICloneableInputStream
implementation to misbehave.

Differential Revision: https://phabricator.services.mozilla.com/D101800
2021-02-04 18:12:52 +00:00
Anny Gakhokidze ada178047e Bug 1690696 - Change test_bug660404.html to use BroadcastChannel, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D103963
2021-02-04 18:01:26 +00:00
Emilio Cobos Álvarez a48bca7a4d Bug 1655967 - Clean up touch events override code. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D103756
2021-02-04 06:16:25 +00:00
Anny Gakhokidze ffa59b72d4 Bug 1690628 - Change test_bug1121701.html to use BroadcastChannel, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D103936
2021-02-03 23:29:28 +00:00
Luca Greco e1d14d5183 Bug 1525179 - Use aboutaddons.html at the root of about:addons. r=robwu
- Moved aboutaddons.html at the root of the about:addons page
- renamed aboutaddons.js `initialize` global function to `initializeView` (and renamed `show` and `hide` global functions accordingly)
- Simplify initial load logic a bit more:
  - remove gCategories
  - moved responsability of the CategoriesBox initialization to the `initializationView` function
  - replaced initialization logic based on `gPendingInitializations` and `notifyInitialized` with
    a `promiseInitialized` global resolved when `initializeView` method has been called and its return value resolved
- Fix test helpers and test failures
  - InlineOptionsBrowser: take into account that browser-custom-element does opt-in the delayedConnectedCallback behavior
    and browser.loadURI may throw if called while the document is still loading.

Differential Revision: https://phabricator.services.mozilla.com/D96472
2021-02-03 17:08:14 +00:00
Emilio Cobos Álvarez bfe77f303a Bug 1591120 - Move print and color-scheme simulation to browsingContext. r=ochameau,nika,devtools-backward-compat-reviewers
We keep mMedium in nsPresContext rather than just looking it up in the
browsing context because that's used quite more frequently.

Differential Revision: https://phabricator.services.mozilla.com/D103782
2021-02-03 10:38:09 +00:00
Emilio Cobos Álvarez 635e3580e3 Bug 1655967 - Move serviceWorkersTestingEnabled to BrowsingContext. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D103757
2021-02-03 10:38:43 +00:00
Bogdan Tara abc7c8eeee Backed out 11 changesets (bug 1681529) for talos crashes CLOSED TREE
Backed out changeset c87d0f32d7a6 (bug 1681529)
Backed out changeset b1269f35d525 (bug 1681529)
Backed out changeset 29df8d4c984a (bug 1681529)
Backed out changeset 4def7578ced0 (bug 1681529)
Backed out changeset ce57c5a26c25 (bug 1681529)
Backed out changeset 78b186ec645a (bug 1681529)
Backed out changeset b1d1550a66ca (bug 1681529)
Backed out changeset e8620622208a (bug 1681529)
Backed out changeset 636b1a7c13e4 (bug 1681529)
Backed out changeset a5a8eac68b87 (bug 1681529)
Backed out changeset 968e17db71df (bug 1681529)
2021-02-03 09:29:38 +02:00
Olli Pettay affb60b285 Bug 1683751 - Removing iframes should update history.length r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D100274
2021-02-03 00:02:29 +00:00
Nika Layzell b227119f4b Bug 1681529 - Part 1: Add a test for reloading a page with a large postdata payload, r=peterv
Without the other patches in this series, this test fails with both with and
without Fission enabled, for two different reasons.

With Fission disabled, the second reload request appears as empty, due to us
being unable to rewind the postData nsIInputStream. With Fission enabled, the
second reload request causes crashes due to the nsMIMEInputStream's invariant of
requiring a seekable stream is invalidated, causing the nsICloneableInputStream
implementation to misbehave.

Differential Revision: https://phabricator.services.mozilla.com/D101800
2021-02-02 23:26:16 +00:00
Kris Maglione 8ec2442bf5 Bug 1647519: Reject javascript: requests targeting other content processes. r=nika
Loads targeting cross-process BrowsingContexts are by definition cross-origin,
which should preclude any javascript: loads. While those loads are currently
prevented by principal checks in the final target process, sending IPC
messages for the attempts is unnecessary, and potentially opens a door to
privilege escalation exploits by a compromised content process.

This patch prevents any cross-process load requests from being sent by content
processes, and adds checks in the parent process to kill any (potentially
compromised) content process which attempts to send them.

Differential Revision: https://phabricator.services.mozilla.com/D103529
2021-02-02 22:24:47 +00:00
Brindusan Cristian e87cc6c9b1 Backed out changeset e4cefba9f87e (bug 1647519) for build bustages in BrowsingContext.cpp. CLOSED TREE 2021-02-03 00:08:53 +02:00
Kris Maglione dc41c70e24 Bug 1647519: Reject javascript: requests targeting other content processes. r=nika
Loads targeting cross-process BrowsingContexts are by definition cross-origin,
which should preclude any javascript: loads. While those loads are currently
prevented by principal checks in the final target process, sending IPC
messages for the attempts is unnecessary, and potentially opens a door to
privilege escalation exploits by a compromised content process.

This patch prevents any cross-process load requests from being sent by content
processes, and adds checks in the parent process to kill any (potentially
compromised) content process which attempts to send them.

Differential Revision: https://phabricator.services.mozilla.com/D103529
2021-02-02 21:46:53 +00:00
Mihai Alexandru Michis f2070ec731 Backed out changeset c0ecccf36d56 (bug 1647519) for causing bustages in BrowsingContext.cpp
CLOSED TREE
2021-02-02 22:47:01 +02:00
Kris Maglione e2e8e3c012 Bug 1647519: Reject javascript: requests targeting other content processes. r=nika
Loads targeting cross-process BrowsingContexts are by definition cross-origin,
which should preclude any javascript: loads. While those loads are currently
prevented by principal checks in the final target process, sending IPC
messages for the attempts is unnecessary, and potentially opens a door to
privilege escalation exploits by a compromised content process.

This patch prevents any cross-process load requests from being sent by content
processes, and adds checks in the parent process to kill any (potentially
compromised) content process which attempts to send them.

Differential Revision: https://phabricator.services.mozilla.com/D103529
2021-02-02 20:32:04 +00:00
Brindusan Cristian 1f923f4895 Backed out changeset 0395717ea76d (bug 1647519) for build bustages at BrowsingContext.cpp. CLOSED TREE 2021-02-02 22:07:10 +02:00
Brindusan Cristian cbdb020883 Backed out 11 changesets (bug 1681529) for mochitest failures at test_reload_large_postdata.html. CLOSED TREE
Backed out changeset f1f988155c82 (bug 1681529)
Backed out changeset f0ba367de05e (bug 1681529)
Backed out changeset dbea9952ec79 (bug 1681529)
Backed out changeset 6e185ec2c4a4 (bug 1681529)
Backed out changeset d0b11c08666a (bug 1681529)
Backed out changeset f2515096b378 (bug 1681529)
Backed out changeset ecd8c3b8fdb4 (bug 1681529)
Backed out changeset 7ea2e9cc8bad (bug 1681529)
Backed out changeset dbc85d0bffaf (bug 1681529)
Backed out changeset f0893f544219 (bug 1681529)
Backed out changeset 91979e21aa8e (bug 1681529)
2021-02-02 22:02:59 +02:00
Kris Maglione 403125cd23 Bug 1647519: Reject javascript: requests targeting other content processes. r=nika
Loads targeting cross-process BrowsingContexts are by definition cross-origin,
which should preclude any javascript: loads. While those loads are currently
prevented by principal checks in the final target process, sending IPC
messages for the attempts is unnecessary, and potentially opens a door to
privilege escalation exploits by a compromised content process.

This patch prevents any cross-process load requests from being sent by content
processes, and adds checks in the parent process to kill any (potentially
compromised) content process which attempts to send them.

Differential Revision: https://phabricator.services.mozilla.com/D103529
2021-02-02 19:47:12 +00:00
Kris Maglione 2d56612fcb Bug 1685106: Add some missing IsInProcess() checks to nsDocShell. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D103566
2021-02-01 22:09:01 +00:00