Commit Graph

613 Commits

Author SHA1 Message Date
Adam Vandolder
fdd2d05bdb Bug 1917369 - Track user interaction state in docshell's active entry. r=dom-core,peterv
Differential Revision: https://phabricator.services.mozilla.com/D221389
2024-09-12 13:12:58 +00:00
Emilio Cobos Álvarez
60ca3ff493 Bug 1914149 - Propagate zoom to new browsing contexts unconditionally. r=nika
Your patch looks good to me. Not sure if there's a non-racy way of
testing the internal full-zoom value here...

But in general, assuming consistent zoom lacking other sources of
information seems like the right thing to do.

I agree that eventually we want to probably move the site-specific zoom
impl into Gecko (if only because Android is also going to want that, see
bug 1547181, where I added a comment).

Co-authored-by: Nika Layzell <nika@thelayzells.com>

Differential Revision: https://phabricator.services.mozilla.com/D220277
2024-09-02 11:28:05 +00:00
Fatih
e3dce50ad3 Bug 1885101: Match screen and window properties with top window for ScreenRect, ScreenAvailRect and WindowOuterSize. r=timhuang,emilio
This patch removes test_iframe.html. We remove it because the newly introduced test covers the tests done in that test. The reason for removing it in the first place is now that screen properties are inherited/spoofed xorigin, we get a 4px difference. The reasosn for 4px difference is the test runner runs tests in an iframe with a 2px border on each side.

Differential Revision: https://phabricator.services.mozilla.com/D215509
2024-08-06 15:31:34 +00:00
Nika Layzell
0c56f81d86 Bug 1834864 - Select BCG more consistently during COOP+COEP process switches, r=smaug,tabbrowser-reviewers,mak
Previously it was possible to bypass specific BCG selection based on
cross-origin isolated status if the site was allowed to load file URIs
using enterprise policies, which could lead to a crash.

This patch changes the behaviour such that BCG selection now happens
correctly. The site will still not be cross-origin isolated due to being
loaded into a file content process.

Differential Revision: https://phabricator.services.mozilla.com/D217007
2024-07-19 14:38:20 +00:00
Henri Sivonen
7d94c50478 Bug 1753352 - Inherit principal into about:blank with query string. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D212093
2024-07-17 16:12:53 +00:00
Nika Layzell
279b50ebe8 Bug 1728331 - Part 4: Make ContentParent KeepAlives explicit with RAII references, r=smaug,dom-worker-reviewers,asuth
This is a fairly significant patch, however it would be difficult to break it
down into smaller patches:

1) The various mechanisms used to manage ContentParent lifecycles have been
   merged together into a common "KeepAlive" system. A process will
   begin shutdown when its keepalive count reaches 0. (though it will
   still wait for all BrowserParents to also be dead before sending the
   actual shutdown message as before).

   This replaces a number of bespoke systems for tracking BrowserParent
   instances in different lifecycle states, remote workers, ongoing
   process switches, and preallocated processes.

2) KeepAlives are now managed automatically by a UniquePtr variant
   (Unique[Threadsafe]ContentParentKeepAlive). This makes the hand-off
   over KeepAlive lifecycles explicit, even for workers.

3) All KeepAlives are now keyed by a BrowserId, which will be 0 for keepalives
   not associated with a specific tab. This allows the new process
   selection logic to count all tabs other than the one being navigated
   when deciding which process to use.

4) The process switching logic now tracks it's KeepAlive with a BrowserId,
   meaning that ongoing process switches are considered when performing
   process selection, even if the BrowserParent hasn't been created yet.

Differential Revision: https://phabricator.services.mozilla.com/D213338
2024-06-24 23:19:28 +00:00
Aron Cseh
b01be1057e Backed out 9 changesets (bug 1901851, bug 1728331) for causing remote worker crashes. a=backout
Backed out changeset 30bbda0eb197 (bug 1728331)
Backed out changeset dabd7d6836c8 (bug 1728331)
Backed out changeset 9e04f49c926e (bug 1728331)
Backed out changeset 779ac735736c (bug 1728331)
Backed out changeset 1d413fe340a0 (bug 1728331)
Backed out changeset 15608efcbeb6 (bug 1901851)
Backed out changeset f711bbec11b2 (bug 1901851)
Backed out changeset 8bb1d267d08f (bug 1901851)
Backed out changeset b29282956a04 (bug 1901851)
2024-06-22 00:52:24 +03:00
Nika Layzell
7547f3f8db Bug 1728331 - Part 4: Make ContentParent KeepAlives explicit with RAII references, r=smaug,dom-worker-reviewers,asuth
This is a fairly significant patch, however it would be difficult to break it
down into smaller patches:

1) The various mechanisms used to manage ContentParent lifecycles have been
   merged together into a common "KeepAlive" system. A process will
   begin shutdown when its keepalive count reaches 0. (though it will
   still wait for all BrowserParents to also be dead before sending the
   actual shutdown message as before).

   This replaces a number of bespoke systems for tracking BrowserParent
   instances in different lifecycle states, remote workers, ongoing
   process switches, and preallocated processes.

2) KeepAlives are now managed automatically by a UniquePtr variant
   (Unique[Threadsafe]ContentParentKeepAlive). This makes the hand-off
   over KeepAlive lifecycles explicit, even for workers.

3) All KeepAlives are now keyed by a BrowserId, which will be 0 for keepalives
   not associated with a specific tab. This allows the new process
   selection logic to count all tabs other than the one being navigated
   when deciding which process to use.

4) The process switching logic now tracks it's KeepAlive with a BrowserId,
   meaning that ongoing process switches are considered when performing
   process selection, even if the BrowserParent hasn't been created yet.

Differential Revision: https://phabricator.services.mozilla.com/D213338
2024-06-20 19:24:51 +00:00
Andreas Farre
0a1a357b83 Bug 1890748 - Move responsibility of FeaturePolicy initialization to nsILoadInfo. r=freddyb,necko-reviewers,jesup,dom-core,sefeng
Differential Revision: https://phabricator.services.mozilla.com/D207140
2024-06-20 13:22:41 +00:00
Cristian Tuns
cd4bca3a0a Backed out 8 changesets (bug 1901851, bug 1728331) for causing bc failures in browser_docshell_type_editor.js CLOSED TREE
Backed out changeset 2cf5cad90099 (bug 1728331)
Backed out changeset d920c2d72d00 (bug 1728331)
Backed out changeset 9e5bd0186aa6 (bug 1728331)
Backed out changeset 45735575df21 (bug 1728331)
Backed out changeset fbafea1663e3 (bug 1901851)
Backed out changeset 30bdf88d3bb7 (bug 1901851)
Backed out changeset 1d994915bd71 (bug 1901851)
Backed out changeset 0b3249432b9c (bug 1901851)
2024-06-19 20:51:53 -04:00
Nika Layzell
14d11f5f70 Bug 1728331 - Part 4: Make ContentParent KeepAlives explicit with RAII references, r=smaug,dom-worker-reviewers,asuth
This is a fairly significant patch, however it would be difficult to break it
down into smaller patches:

1) The various mechanisms used to manage ContentParent lifecycles have been
   merged together into a common "KeepAlive" system. A process will
   begin shutdown when its keepalive count reaches 0. (though it will
   still wait for all BrowserParents to also be dead before sending the
   actual shutdown message as before).

   This replaces a number of bespoke systems for tracking BrowserParent
   instances in different lifecycle states, remote workers, ongoing
   process switches, and preallocated processes.

2) KeepAlives are now managed automatically by a UniquePtr variant
   (Unique[Threadsafe]ContentParentKeepAlive). This makes the hand-off
   over KeepAlive lifecycles explicit, even for workers.

3) All KeepAlives are now keyed by a BrowserId, which will be 0 for keepalives
   not associated with a specific tab. This allows the new process
   selection logic to count all tabs other than the one being navigated
   when deciding which process to use.

4) The process switching logic now tracks it's KeepAlive with a BrowserId,
   meaning that ongoing process switches are considered when performing
   process selection, even if the BrowserParent hasn't been created yet.

Differential Revision: https://phabricator.services.mozilla.com/D213338
2024-06-19 20:14:50 +00:00
Andreas Farre
a7f8faed6a Bug 1886222 - Start reload by calling reload in the parent. r=Gijs,canadahonk,smaug
Differential Revision: https://phabricator.services.mozilla.com/D211519
2024-06-19 05:49:45 +00:00
Andreas Farre
154d4b7619 Bug 1891670 - Expose crossGroupOpener on CanonicalBrowsingContext. r=dom-core,tabbrowser-reviewers,peterv
Differential Revision: https://phabricator.services.mozilla.com/D212677
2024-06-17 14:16:23 +00:00
Nika Layzell
11d3698341 Bug 1681457 - Allow non-auxiliary BrowsingContexts created by script to close themselves, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D211792
2024-06-05 00:06:48 +00:00
Norisz Fay
ed9f22a2fc Backed out changeset 1034029ae9ed (bug 1681457) for causing failures on test_window_close.html CLOSED TREE 2024-06-01 00:10:26 +03:00
Nika Layzell
7025bc892e Bug 1681457 - Allow non-auxiliary BrowsingContexts created by script to close themselves, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D211792
2024-05-31 17:27:15 +00:00
Cristian Tuns
ce526f805f Backed out changeset 9b708a1dc402 (bug 1890748) for causing bc failures in browser_permission_delegate_geo.js CLOSED TREE 2024-05-27 12:25:10 -04:00
Andreas Farre
b66f6322f2 Bug 1890748 - Move responsibility of FeaturePolicy initialization to nsILoadInfo. r=freddyb,necko-reviewers,jesup,dom-core,sefeng
Differential Revision: https://phabricator.services.mozilla.com/D207140
2024-05-27 10:06:58 +00:00
Butkovits Atila
bd73be20f9 Backed out changeset a710fd347db2 (bug 1890748) for causing bustages at Document.cpp. CLOSED TREE 2024-05-24 18:06:30 +03:00
Andreas Farre
bcf940af03 Bug 1890748 - Move responsibility of FeaturePolicy initialization to nsILoadInfo. r=freddyb,necko-reviewers,jesup,dom-core,sefeng
Differential Revision: https://phabricator.services.mozilla.com/D207140
2024-05-24 14:28:47 +00:00
kycn
03568c5097 Bug 1677190 - Introduce SessionStoreFunctions for GeckoView package and move the existing SessionStoreFunctions from toolkit to the browser package. r=geckoview-reviewers,farre,nika,owlish
This change utilizes components.conf to distinguish between the contract implementations of nsISessionStoreFunctions per platform.

Differential Revision: https://phabricator.services.mozilla.com/D206904
2024-04-30 11:17:55 +00:00
Greg Stoll
1a4633232d Bug 1875481 - Part 3: Add content analysis support to printing operations r=handyman,spohl,fluent-reviewers,kpatenio,smaug,emilio
Differential Revision: https://phabricator.services.mozilla.com/D200979
2024-04-10 00:15:47 +00:00
Stanca Serban
4c0f6b30c1 Backed out 3 changesets (bug 1875481) for basicWindowDotPrintTest related junit failures.
Backed out changeset cd024cb2768e (bug 1875481)
Backed out changeset 6b7be15cd017 (bug 1875481)
Backed out changeset d1da53c0673b (bug 1875481)
2024-04-09 05:56:47 +03:00
Greg Stoll
77cb63d2a3 Bug 1875481 - Part 3: Add content analysis support to printing operations r=handyman,spohl,fluent-reviewers,kpatenio,smaug,emilio
Differential Revision: https://phabricator.services.mozilla.com/D200979
2024-04-08 23:53:58 +00:00
Peter Van der Beken
677cd05994 Bug 1875028 - With Fission enabled "onbeforeunload" prompts are automatically accepted for cross-origin navigations. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D204880
2024-03-26 07:42:58 +00:00
Peter Van der Beken
5347761fe1 Bug 1883279 - Check browser.navigation.requireUserInteraction before skipping entries based on user interaction. r=farre
We don't want to start skipping entries just because callers passed in
aRequireUserInteraction, since the feature is not ready and the flag in the
entries might not be correct.

Differential Revision: https://phabricator.services.mozilla.com/D203376
2024-03-13 10:56:33 +00:00
Peter Van der Beken
0cf1288004 Bug 1883278 - Force-enable platform collection code of session store when SHIP is enabled. r=farre,geckoview-reviewers,sessionstore-reviewers
If session history in the parent is enabled then session store only works
correctly if the platform collection code is turned on.

Differential Revision: https://phabricator.services.mozilla.com/D203375
2024-03-13 10:56:33 +00:00
Peter Van der Beken
7e29885b3c Bug 1883278 - Remove browser.sessionstore.collect_session_storage and browser.sessionstore.collect_zoom. r=farre,sessionstore-reviewers
These prefs don't do anything unless browser.sessionstore.platform_collection is
enabled, but we don't need the granularity that they provide. Let's just use
have the one  browser.sessionstore.platform_collection pref control everything.

Differential Revision: https://phabricator.services.mozilla.com/D203374
2024-03-13 10:56:32 +00:00
Emilio Cobos Álvarez
5a714b595c Bug 1875100 - Propagate top level activeness automatically to top descendants. r=nika,tabbrowser-reviewers,mconley,extension-reviewers,robwu,geckoview-reviewers,owlish,kaya
For that, opt in tabbrowser and the shopping sidebar to manual
activeness management.

Differential Revision: https://phabricator.services.mozilla.com/D198942
2024-02-07 10:58:15 +00:00
Cristian Tuns
77579088f3 Backed out changeset ecd780688279 (bug 1875100) for causing mochitest failures in test_suspend_media_by_inactive_docshell.html 2024-02-07 01:25:21 -05:00
Emilio Cobos Álvarez
a6a14d3ed6 Bug 1875100 - Propagate top level activeness automatically to top descendants. r=nika,tabbrowser-reviewers,mconley,extension-reviewers,robwu,geckoview-reviewers,owlish
For that, opt in tabbrowser and the shopping sidebar to manual
activeness management.

Differential Revision: https://phabricator.services.mozilla.com/D198942
2024-02-06 21:47:37 +00:00
Emilio Cobos Álvarez
8350330ee1 Bug 1877242 - Use a FunctionRef in CanonicalBrowsingContext::CallOnAllTopDescendants. r=nika
This should be marginally more efficient, in theory, so do it drive-by.

Differential Revision: https://phabricator.services.mozilla.com/D199902
2024-01-30 23:24:44 +00:00
Emilio Cobos Álvarez
ca8e85e34b Bug 1877242 - Avoid some unnecessary refcounting churn when accessing parent-cross-chrome-boundary. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D199901
2024-01-30 23:24:43 +00:00
Narcis Beleuzu
91035a09fc Backed out changeset f768135b85f2 (bug 1746524) for causing perf regressions 2023-11-30 18:18:17 +02:00
Jonathan Watt
ac04fa217f Bug 1865891 p4. Rename EvictContentViewersOrReplaceEntry to match nsIDocumentViewer's new name. r=emilio
Depends on D194276

Differential Revision: https://phabricator.services.mozilla.com/D194277
2023-11-22 08:08:13 +00:00
Jonathan Watt
901a6e2456 Bug 1865891 p3. Rename EvictOutOfRangeContentViewers to match nsIDocumentViewer's new name. r=emilio
Depends on D194275

Differential Revision: https://phabricator.services.mozilla.com/D194276
2023-11-22 08:08:13 +00:00
Andreas Farre
effdb212f5 Bug 1746524 - Enable browser.tabs.documentchannel.parent-controlled pref. r=smaug
This patch also does some cosmetic changes for when parent controlled
loads should be used, but more importantly introduces the pref
'browser.tabs.documentchannel.speculative-load' with the default value
false.

It turns out that speculatively loading in the parent when a parent
controlled load isn't possible is the cause for performance
regressions.

Differential Revision: https://phabricator.services.mozilla.com/D192489
2023-11-14 14:12:43 +00:00
Cosmin Sabou
a1693f4fd3 Backed out changeset f3e41764fab0 (bug 1746524) for causing gv-junit failures on NavigationDelegateTest. CLOSED TREE 2023-11-09 09:59:58 +02:00
Andreas Farre
28c24dd7e7 Bug 1746524 - Enable browser.tabs.documentchannel.parent-controlled pref. r=smaug
This patch also does some cosmetic changes for when parent controlled
loads should be used, but more importantly introduces the pref
'browser.tabs.documentchannel.speculative-load' with the default value
false.

It turns out that speculatively loading in the parent when a parent
controlled load isn't possible is the cause for performance
regressions.

Differential Revision: https://phabricator.services.mozilla.com/D192489
2023-11-09 07:00:42 +00:00
Natalia Csoregi
92fa554341 Backed out changeset 149e69327bbb (bug 1746524) for causing gv-junit failures on bypassHTTPSOnlyError. CLOSED TREE 2023-11-07 12:13:52 +02:00
Andreas Farre
25543c0dd1 Bug 1746524 - Enable browser.tabs.documentchannel.parent-controlled pref. r=smaug
This patch also does some cosmetic changes for when parent controlled
loads should be used, but more importantly introduces the pref
'browser.tabs.documentchannel.speculative-load' with the default value
false.

It turns out that speculatively loading in the parent when a parent
controlled load isn't possible is the cause for performance
regressions.

Differential Revision: https://phabricator.services.mozilla.com/D192489
2023-11-07 08:32:31 +00:00
Iulian Moraru
065118e74c Backed out changeset e210c2c7d93a (bug 1746524) for causing mass crashes related to DocumentLoadListener. CLOSED TREE 2023-11-02 11:35:09 +02:00
Andreas Farre
8409ee57d4 Bug 1746524 - Enable browser.tabs.documentchannel.parent-controlled pref. r=smaug
This patch also does some cosmetic changes for when parent controlled
loads should be used, but more importantly introduces the pref
'browser.tabs.documentchannel.speculative-load' with the default value
false.

It turns out that speculatively loading in the parent when a parent
controlled load isn't possible is the cause for performance
regressions.

Differential Revision: https://phabricator.services.mozilla.com/D192489
2023-11-02 08:54:18 +00:00
dylan
2c223dc63c Bug 1156659 - Added set offline per tab to BrowsingContext. r=valentin,nika,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D187704
2023-10-04 19:42:57 +00:00
Norisz Fay
6ae0ebd216 Backed out 2 changesets (bug 1156659) for causing dt failures on browser_net_throttle.js CLOSED TREE
Backed out changeset af64e5a0109a (bug 1156659)
Backed out changeset 7e9b86bce76b (bug 1156659)
2023-10-02 16:11:21 +03:00
dylan
b37b5aaba2 Bug 1156659 - Added set offline per tab to BrowsingContext. r=valentin,nika,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D187704
2023-10-02 04:13:43 +00:00
Sandor Molnar
b16754676a Backed out 2 changesets (bug 1156659) for causing multiple dt failures on browser_jsterm_evaluation_context_selector_targets_update/browser_jsterm_file_load_save_keyboard_shortcut/browser_jsterm_focus_reload/etc CLOSED TREE
Backed out changeset 72676017aaf3 (bug 1156659)
Backed out changeset c5e205051938 (bug 1156659)
2023-09-26 19:54:00 +03:00
dylan
4159bac62f Bug 1156659 - Added set offline per tab to BrowsingContext. r=valentin,nika,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D187704
2023-09-26 15:33:34 +00:00
Nika Layzell
57ef1e83ee Bug 1790666 - Propagate session storage across COOP switches without SHIP, r=smaug,asuth
With non-SHIP Desktop we would propagate the session storage across
process switches using session restore, so the internal propagation was
diabled. However, android's session restore has no handling for session
storage, meaning that all session storage is discarded.

This changes the logic to always use the internal propagation, even when
SHIP is disabled.

Differential Revision: https://phabricator.services.mozilla.com/D188647
2023-09-20 20:01:32 +00:00
Peter Van der Beken
9ec5838ef5 Bug 1843968 - Hold some strong references. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D184803
2023-08-01 12:09:36 +00:00