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

317 Коммитов

Автор SHA1 Сообщение Дата
Olli Pettay 0807bf1f0e Bug 1811822 - nsFrameLoader::LoadContext() may return null, yet the webidl binding doesn't expect that., r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D167534
2023-01-23 16:07:01 +00:00
Olli Pettay e9dd1d0c7b Bug 1803152, destroy nsFrameLoader asynchronously when destroyed from SessionHistoryEntry's/SHEntrySharedParentState's destructor. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D163344
2022-11-29 18:01:14 +00:00
Artur Iunusov af993e2808 Bug 1756575 - Removed unused activateFrameEvent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D156657
2022-09-07 13:12:32 +00:00
Olli Pettay 93acdfad59 Bug 1777574, automate CC zone handling, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D155084
2022-09-07 11:22:51 +00:00
Andreas Farre 4b493b6a30 Bug 1595491 - Part 1: Make <embed> and <object> behave more like <iframe>. r=smaug,emilio
By making image loading in <embed> and <object> behave more like when
an <iframe> loads an image, we can make sure that the synthetic
document generated is process switched if the image is cross
origin. This is done by making image loading in nsObjectLoadingContent
follow the document loading path.

We also make sure that we pass the image size back to the embedder
element to not get stuck with the intrinsic size.

To avoid named targeting being able to target these synthetic
documents, as well as showing up in `Window.frames` and being counted
in `Window.length`, we keep a filtered list of non-synthetic browsing
contexts for that use-case.

This feature is controlled by two prefs:

* browser.opaqueResponseBlocking.syntheticBrowsingContext

  This triggers the creation of synthetic documents for images loaded
  in <object> or embed.

* browser.opaqueResponseBlocking.syntheticBrowsingContext.filter

  This turns on the filtering of synthetic browsing contexts in named
  targeting, `Window.length` and `Window.frames`.

Differential Revision: https://phabricator.services.mozilla.com/D148117
2022-08-16 16:42:58 +00:00
Emilio Cobos Álvarez ef562aae0a Bug 774398 - Hack to make print and viewport media query listeners fire when printing. r=geckoview-reviewers,owlish,dholbert
This still doesn't fire on print settings changes, so it uses the
default page size. Which is probably better than nothing, but...

To make viewport-size media-query listeners work more generally for
printed documents, we would need to re-clone the top document
unconditionally for all print settings changes, which needs front-end
work at least, and is dubious if the page changes dynamically.

Differential Revision: https://phabricator.services.mozilla.com/D150499
2022-08-11 23:11:37 +00:00
Andreas Farre e4c062012a Bug 1739450 - Part 1: Move ownership of session store scroll and form data to platform. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D130389
2022-04-19 15:19:22 +00:00
Edgar Chen 9c83371467 Bug 1749264 - Get rid of {activate,deactivate}RemoteFrame from FrameLoader.webidl; r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135473
2022-01-10 16:11:47 +00:00
Kagami Sascha Rosylight 87ef553bcc Bug 1743439 - Part 1: Mark callers in dom/animation and dom/base as MOZ_CAN_RUN_SCRIPT_BOUNDARY r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D133360
2021-12-09 19:56:08 +00:00
Alexandru Michis 8941bcbb1e Backed out 6 changesets (bug 1743439) for causing bustages in AnimationEventDispatcher.h
CLOSED TREE

Backed out changeset 792c405d4afc (bug 1743439)
Backed out changeset 0376e73c7dce (bug 1743439)
Backed out changeset 23202094bc00 (bug 1743439)
Backed out changeset ba0fa3a8fa0e (bug 1743439)
Backed out changeset 7ad2746ec876 (bug 1743439)
Backed out changeset a919ef50cf33 (bug 1743439)
2021-12-09 19:36:12 +02:00
Kagami Sascha Rosylight d428dbd282 Bug 1743439 - Part 1: Mark callers in dom/animation and dom/base as MOZ_CAN_RUN_SCRIPT_BOUNDARY r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D133360
2021-12-09 17:16:48 +00:00
Nika Layzell aa9b1db7d6 Bug 1650089 - Part 3: Rework DocumentChannel-triggered process switches to support null principals, r=annyG,kmag
This is a large refactoring of the DocumentChannel process switch codepath,
with the end goal of being better able to support future process switch
requirements such as dynamic isolation on android, as well as the immediate
requirement of null principal handling.

The major changes include:
1. The logic is in C++ and has less failure cases, meaning it should be harder
   for us to error out unexpectedly and not process switch.
2. Process selection decisions are more explicit, and tend to rely less on
   state such as the current remoteType when possible. This makes reasoning
   about where a specific load will complete easier.
3. Additional checks are made after a "WebContent" behavior is selected to
   ensure that if an existing document in the same BCG is found, the load will
   finish in the required content process. This should make dynamic checks such
   as Android's logged-in site isolation easier to implement.
4. ProcessIsolation logging is split out from DocumentChannel so that it's
   easier to log just the information related to process selection when
   debugging.
5. Null result principal precursors are considered when performing process
   selection.

Other uses of E10SUtils for process selection have not yet been migrated to the
new design as they have slightly different requirements. This will be done in
follow-up bugs.

Differential Revision: https://phabricator.services.mozilla.com/D120673
2021-08-10 14:31:17 +00:00
Butkovits Atila 22fb2b6793 Backed out 8 changesets (bug 1650089) for causing Xpcshell failures on test_ext_redirects.js. CLOSED TREE
Backed out changeset ee763318d378 (bug 1650089)
Backed out changeset 24d7898ec4bd (bug 1650089)
Backed out changeset bcdd2f5c9840 (bug 1650089)
Backed out changeset 24a5bd7f97dd (bug 1650089)
Backed out changeset 1b8b4e939e82 (bug 1650089)
Backed out changeset a7a4f37a5d72 (bug 1650089)
Backed out changeset 78c012d4b071 (bug 1650089)
Backed out changeset e870508c1ddc (bug 1650089)
2021-08-06 04:35:52 +03:00
Nika Layzell 58c1037005 Bug 1650089 - Part 3: Rework DocumentChannel-triggered process switches to support null principals, r=annyG,kmag
This is a large refactoring of the DocumentChannel process switch codepath,
with the end goal of being better able to support future process switch
requirements such as dynamic isolation on android, as well as the immediate
requirement of null principal handling.

The major changes include:
1. The logic is in C++ and has less failure cases, meaning it should be harder
   for us to error out unexpectedly and not process switch.
2. Process selection decisions are more explicit, and tend to rely less on
   state such as the current remoteType when possible. This makes reasoning
   about where a specific load will complete easier.
3. Additional checks are made after a "WebContent" behavior is selected to
   ensure that if an existing document in the same BCG is found, the load will
   finish in the required content process. This should make dynamic checks such
   as Android's logged-in site isolation easier to implement.
4. ProcessIsolation logging is split out from DocumentChannel so that it's
   easier to log just the information related to process selection when
   debugging.
5. Null result principal precursors are considered when performing process
   selection.

Other uses of E10SUtils for process selection have not yet been migrated to the
new design as they have slightly different requirements. This will be done in
follow-up bugs.

Differential Revision: https://phabricator.services.mozilla.com/D120673
2021-08-06 00:10:57 +00:00
Nika Layzell 68454cb184 Bug 1722378 - Part 4: Use mInitialized to determine whether to expose BrowsingContext from nsFrameLoader, r=smaug
Without this change, the initialized changes cause failures around
crashed tabs, as the `frameLoader.browsingContext` getter returns null
after the tab has crashed due to being unable to start a new remote
browser or docshell using the same browsingContext.

The new behaviour avoids creating duplicate hosts for a given
BrowsingContext by instead returning the existing potentially-discarded
browsingContext in these situations.

Depends on D121689

Differential Revision: https://phabricator.services.mozilla.com/D121891
2021-08-05 22:33:17 +00:00
Nika Layzell bcf6a3ec9a Bug 1722378 - Part 2: Ensure we don't try to initialize a nsFrameLoader multiple times, r=smaug
I'm unsure if this is the cause of our crashes, but there is a chance that we
are somehow attempting to re-initialize a nsFrameLoader after it has been
destroyed, and thus re-connecting to a process which has has an
already-destroyed browser. This adds a flag to prevent initialization from
being attempted multiple times for a nsFrameLoader.

Differential Revision: https://phabricator.services.mozilla.com/D121688
2021-08-05 22:33:16 +00:00
Alexandru Michis 5ca72bfc53 Backed out 7 changesets (bug 1650089) for causing xpcshell failures in test_ext_cookieBehaviors.js
Backed out changeset 336d6eb2fc15 (bug 1650089)
Backed out changeset 283ba29cdbeb (bug 1650089)
Backed out changeset c470e4c65117 (bug 1650089)
Backed out changeset 8fc2f428694d (bug 1650089)
Backed out changeset 37e5185dae14 (bug 1650089)
Backed out changeset a26afdc56d91 (bug 1650089)
Backed out changeset 32e207558b3d (bug 1650089)
2021-08-04 12:32:07 +03:00
Nika Layzell e0fc657cb6 Bug 1650089 - Part 3: Rework DocumentChannel-triggered process switches to support null principals, r=annyG,kmag
This is a large refactoring of the DocumentChannel process switch codepath,
with the end goal of being better able to support future process switch
requirements such as dynamic isolation on android, as well as the immediate
requirement of null principal handling.

The major changes include:
1. The logic is in C++ and has less failure cases, meaning it should be harder
   for us to error out unexpectedly and not process switch.
2. Process selection decisions are more explicit, and tend to rely less on
   state such as the current remoteType when possible. This makes reasoning
   about where a specific load will complete easier.
3. Additional checks are made after a "WebContent" behavior is selected to
   ensure that if an existing document in the same BCG is found, the load will
   finish in the required content process. This should make dynamic checks such
   as Android's logged-in site isolation easier to implement.
4. ProcessIsolation logging is split out from DocumentChannel so that it's
   easier to log just the information related to process selection when
   debugging.
5. Null result principal precursors are considered when performing process
   selection.

Other uses of E10SUtils for process selection have not yet been migrated to the
new design as they have slightly different requirements. This will be done in
follow-up bugs.

Differential Revision: https://phabricator.services.mozilla.com/D120673
2021-08-03 18:17:54 +00:00
Noemi Erli 6cd9318b66 Backed out 7 changesets (bug 1650089) foe causing bustages in ProcessIsolation.cpp
Backed out changeset 4e73beb8872c (bug 1650089)
Backed out changeset 092451e931ce (bug 1650089)
Backed out changeset ca9ba60010c6 (bug 1650089)
Backed out changeset ee61b69ba556 (bug 1650089)
Backed out changeset 091c4efa36a7 (bug 1650089)
Backed out changeset dbdee40ef8a0 (bug 1650089)
Backed out changeset 54d12a4333a0 (bug 1650089)
2021-08-03 20:15:54 +03:00
Nika Layzell 35dca5bd20 Bug 1650089 - Part 3: Rework DocumentChannel-triggered process switches to support null principals, r=annyG,kmag
This is a large refactoring of the DocumentChannel process switch codepath,
with the end goal of being better able to support future process switch
requirements such as dynamic isolation on android, as well as the immediate
requirement of null principal handling.

The major changes include:
1. The logic is in C++ and has less failure cases, meaning it should be harder
   for us to error out unexpectedly and not process switch.
2. Process selection decisions are more explicit, and tend to rely less on
   state such as the current remoteType when possible. This makes reasoning
   about where a specific load will complete easier.
3. Additional checks are made after a "WebContent" behavior is selected to
   ensure that if an existing document in the same BCG is found, the load will
   finish in the required content process. This should make dynamic checks such
   as Android's logged-in site isolation easier to implement.
4. ProcessIsolation logging is split out from DocumentChannel so that it's
   easier to log just the information related to process selection when
   debugging.
5. Null result principal precursors are considered when performing process
   selection.

Other uses of E10SUtils for process selection have not yet been migrated to the
new design as they have slightly different requirements. This will be done in
follow-up bugs.

Differential Revision: https://phabricator.services.mozilla.com/D120673
2021-08-03 15:39:34 +00:00
Kagami Sascha Rosylight 86a6ba4bda Bug 1723050 - Part 2: Replace typedef by using in dom/base/ r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D121294
2021-08-02 14:40:41 +00:00
Emilio Cobos Álvarez 82baca9319 Bug 1722910 - Remove unused FrameLoader.requestNotifyAfterRemotePaint machinery. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D121195
2021-07-30 09:37:20 +00:00
Dorel Luca f8c23e7e7f Backed out 5 changesets (bug 1650089) for Browser-chrome failures in browser/components/originattributes/test/browser/browser_firstPartyIsolation_aboutPages.js. CLOSED TREE
Backed out changeset 26ddad079ad3 (bug 1650089)
Backed out changeset 5ae2b2641484 (bug 1650089)
Backed out changeset c5d267a1907c (bug 1650089)
Backed out changeset d9eeca699dec (bug 1650089)
Backed out changeset 8bb303f6831a (bug 1650089)
2021-07-29 05:53:31 +03:00
Nika Layzell 3072efd270 Bug 1650089 - Part 3: Rework DocumentChannel-triggered process switches to support null principals, r=annyG,kmag
This is a large refactoring of the DocumentChannel process switch codepath,
with the end goal of being better able to support future process switch
requirements such as dynamic isolation on android, as well as the immediate
requirement of null principal handling.

The major changes include:
1. The logic is in C++ and has less failure cases, meaning it should be harder
   for us to error out unexpectedly and not process switch.
2. Process selection decisions are more explicit, and tend to rely less on
   state such as the current remoteType when possible. This makes reasoning
   about where a specific load will complete easier.
3. Additional checks are made after a "WebContent" behavior is selected to
   ensure that if an existing document in the same BCG is found, the load will
   finish in the required content process. This should make dynamic checks such
   as Android's logged-in site isolation easier to implement.
4. ProcessIsolation logging is split out from DocumentChannel so that it's
   easier to log just the information related to process selection when
   debugging.
5. Null result principal precursors are considered when performing process
   selection.

Other uses of E10SUtils for process selection have not yet been migrated to the
new design as they have slightly different requirements. This will be done in
follow-up bugs.

Differential Revision: https://phabricator.services.mozilla.com/D120673
2021-07-29 01:40:20 +00:00
Edgar Chen 47e66cd7d9 Bug 1716762 - Don't allow focus to move to remote iframe which is display: none; r=emilio
Make it behave the same as in-process iframe.

Differential Revision: https://phabricator.services.mozilla.com/D118002
2021-07-07 12:08:18 +00:00
Edgar Chen cc5d17fb0c Bug 1719285 - Make nsFrameLoader::GetExistingDocShell returning nsDocShell; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D119183
2021-07-06 13:30:08 +00:00
Emilio Cobos Álvarez 9db2aa0440 Bug 1699837 - Make sure that remote iframes honor print settings. r=mattwoodrow
This fixes it since we honor the print resolution properly now.

Differential Revision: https://phabricator.services.mozilla.com/D115263
2021-06-13 09:16:53 +00:00
Dorel Luca 71abb3ab93 Backed out changeset 43a82597dade (bug 1699837) for Crashtest in layout/printing/crashtests/1671503.html. CLOSED TREE 2021-06-11 19:48:10 +03:00
Emilio Cobos Álvarez 7af763acbe Bug 1699837 - Make sure that remote iframes honor print settings. r=mattwoodrow
This fixes it since we honor the print resolution properly now.

Differential Revision: https://phabricator.services.mozilla.com/D115263
2021-06-11 13:07:55 +00:00
Kashav Madan 534f0f8a49 Bug 1715264 - Cleanup how Session Store collects SessionHistory, r=farre
This does a few things:

1. Removes the `aImmediately` flag from the RequestSHistoryUpdate path, and
   moves that responsibility to SessionStore
1. Simplifies how and when SessionStore calls SessionHistory.collectFromParent()
1. Attempts to clean-up SessionStore's SHistoryListener (again)

Differential Revision: https://phabricator.services.mozilla.com/D117230
2021-06-10 14:30:59 +00:00
Edgar Chen e3649a9c0c Bug 1714313 - Get rid of FrameLoader::SendCrossProcessMouseEvent; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116707
2021-06-03 13:47:02 +00:00
Kashav Madan 2dafa64364 Bug 1706445 - Handle `isFinal` updates through native code, r=nika
Replaces the `isFinal` bit with a "browser-shutdown-tabstate-updated" observer
notification, which is fired after all frames in the document are flushed.

Differential Revision: https://phabricator.services.mozilla.com/D116146
2021-06-01 20:06:47 +00:00
Emilio Cobos Álvarez d14a43f487 Bug 1705757 - Make printing a single frame choose the right process for the preview frame. r=nika
We were using the top BrowsingContextGroup id in this case, which is
obviously wrong. Also make the API take a BrowsingContext directly,
rather than passing outerwindowids around.

Differential Revision: https://phabricator.services.mozilla.com/D112413
2021-04-17 18:41:11 +00:00
Emilio Cobos Álvarez 9afefdd884 Bug 1705757 - Move FrameLoader.print to BrowsingContext.print. r=nika,remote-protocol-reviewers,marionette-reviewers,extension-reviewers,zombie
This makes it trivial to choose the right BrowserParent to print a
browsing context, by removing the OuterWindowID / FrameLoader
indirections.

Differential Revision: https://phabricator.services.mozilla.com/D112412
2021-04-17 18:41:11 +00:00
Andreas Farre f722be009c Bug 1572084 - Part 2: Make Session Store data collection work with fission. r=nika
Instead of collecting data from the entire tree of documents, we
collect data per document. The collected data is sent to the
corresponding parent window context and is applied incrementally to
the tab state cache.

Differential Revision: https://phabricator.services.mozilla.com/D107814
2021-03-26 08:59:33 +00:00
Bogdan Tara 8f9d044d0f Backed out 3 changesets (bug 1572084) for WindowGlobalParent.cpp related failures CLOSED TREE
Backed out changeset d42a68132e7e (bug 1572084)
Backed out changeset 4d5a5ac074e6 (bug 1572084)
Backed out changeset 5aa59e106a42 (bug 1572084)
2021-03-25 18:56:02 +02:00
Andreas Farre 728f061c16 Bug 1572084 - Part 2: Make Session Store data collection work with fission. r=nika
Instead of collecting data from the entire tree of documents, we
collect data per document. The collected data is sent to the
corresponding parent window context and is applied incrementally to
the tab state cache.

Differential Revision: https://phabricator.services.mozilla.com/D107814
2021-03-25 15:36:38 +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 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 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
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 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 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 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
Neil Deakin 2ae4d6a15b Bug 1644911, add access to the childID from the frame crashed event, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D98206
2021-01-21 08:44:51 +00:00
Simon Giesecke f15895390e Bug 1673931 - Avoid including Element.h from header files.
Differential Revision: https://phabricator.services.mozilla.com/D96535

Depends on D96534
2020-11-23 16:08:40 +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 6f7b6986d5 Bug 1673424 - Fix includes around StructuredCloneData.h.
Differential Revision: https://phabricator.services.mozilla.com/D94763

Depends on D94762
2020-11-23 16:07:01 +00:00
Mihai Alexandru Michis 6ad7b7e9dd Backed out 2 changesets (bug 1668940) for causing bc failures.
CLOSED TREE

Backed out changeset c025fad53568 (bug 1668940)
Backed out changeset 9d98bf7b930f (bug 1668940)
2020-10-12 17:00:52 +03:00
Peter Van der Beken 02addaa2d5 Bug 1668940 - Replace nsFrameLoader::mIsTopLevelContent with mPendingBrowsingContext->IsTopContent(). r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D93157
2020-10-12 12:37:52 +00:00