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

7917 Коммитов

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