Commit Graph

1164 Commits

Author SHA1 Message Date
Sean Feng
1341b819e2 Bug 1863246 - Make the page that enters BFCache not asking the parent process to update the active browsing context r=peterv,dom-core
Currently, when a page enters BFCache, it updates the parent process
for the active BC; however, the page that is about to show will do the
same. These two operations are triggered in different processes with
different active id, they are racy and problematic.

This patch fixes the above issue by not updating the parent process
when a page enters BFCache.

This only applies to BFCacheInParent is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D215818
2024-08-14 19:48:17 +00:00
Emilio Cobos Álvarez
a44b49af0b Bug 1910698 - Add a struct to represent JS caller location and more general warning source location. r=smaug,necko-reviewers,anti-tracking-reviewers,dom-storage-reviewers,pbz,kershaw,janv
Use it liberally across the tree. This could be cleaned up even more in the future.

Differential Revision: https://phabricator.services.mozilla.com/D218114
2024-08-01 17:12:48 +00:00
Kagami Sascha Rosylight
7b701a991d Bug 1908729 - Part 7: Remove DOM_WINDOW_FOO_TOPIC and their Notify functions r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D217593
2024-07-30 13:54:01 +00:00
Tom Schuster
c051081043 Bug 1809713 - Make DataTransfer use Maybe<ClipboardType>. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D214585
2024-07-29 11:52:34 +00:00
Benjamin VanderSloot
5528947587 Bug 1892021, part 5 - Rearchitect IPC for discovery - r=anti-tracking-reviewers,pbz
I'm sorry. This is a big change to recent stuff, and worst of all is a big commit.

Decisions I made while implementing credential discovery backed me into a corner
where I couldn't have the UI actually get rendered. Particularly around where the
IPCs needed to happen and at what point we called into the main process and when
we returned.

The way it works now is that we do ONE IPC for a credentials.get call, doing most of
the work in the main process and only maybe doing one IPC down to the content process
to tell it to navigate.

This is neater and more secure to a compromised content process. However, a lot happens in
this patch.

Differential Revision: https://phabricator.services.mozilla.com/D215009
2024-07-26 16:53:21 +00:00
Butkovits Atila
c75a6ba6c0 Backed out 7 changesets (bug 1892021) for causing failures at browser_credential_chooser.js.
Backed out changeset 7e08bac9cd1b (bug 1892021)
Backed out changeset 1b30ee6c2534 (bug 1892021)
Backed out changeset fc3e3fde4091 (bug 1892021)
Backed out changeset f7de16d771fa (bug 1892021)
Backed out changeset 55eea3c836a3 (bug 1892021)
Backed out changeset e67224c9464b (bug 1892021)
Backed out changeset 388dd1f6025a (bug 1892021)
2024-07-26 00:58:17 +03:00
Benjamin VanderSloot
f7e9d24281 Bug 1892021, part 5 - Rearchitect IPC for discovery - r=anti-tracking-reviewers,pbz
I'm sorry. This is a big change to recent stuff, and worst of all is a big commit.

Decisions I made while implementing credential discovery backed me into a corner
where I couldn't have the UI actually get rendered. Particularly around where the
IPCs needed to happen and at what point we called into the main process and when
we returned.

The way it works now is that we do ONE IPC for a credentials.get call, doing most of
the work in the main process and only maybe doing one IPC down to the content process
to tell it to navigate.

This is neater and more secure to a compromised content process. However, a lot happens in
this patch.

Differential Revision: https://phabricator.services.mozilla.com/D215009
2024-07-25 19:34:13 +00:00
Norisz Fay
3f81fd313a Backed out 7 changesets (bug 1892021) for causing bc failures on browser_credential_chooser.js CLOSED TREE
Backed out changeset 4961e9e4a0a4 (bug 1892021)
Backed out changeset ad9a13b88c4a (bug 1892021)
Backed out changeset 33bb13530242 (bug 1892021)
Backed out changeset e8eca7aca938 (bug 1892021)
Backed out changeset 905fd0102183 (bug 1892021)
Backed out changeset d321b046e3ac (bug 1892021)
Backed out changeset 3f49d83f85ec (bug 1892021)
2024-07-25 20:43:08 +03:00
Benjamin VanderSloot
8df7143252 Bug 1892021, part 5 - Rearchitect IPC for discovery - r=anti-tracking-reviewers,pbz
I'm sorry. This is a big change to recent stuff, and worst of all is a big commit.

Decisions I made while implementing credential discovery backed me into a corner
where I couldn't have the UI actually get rendered. Particularly around where the
IPCs needed to happen and at what point we called into the main process and when
we returned.

The way it works now is that we do ONE IPC for a credentials.get call, doing most of
the work in the main process and only maybe doing one IPC down to the content process
to tell it to navigate.

This is neater and more secure to a compromised content process. However, a lot happens in
this patch.

Differential Revision: https://phabricator.services.mozilla.com/D215009
2024-07-25 15:34:41 +00:00
Tamas Szentpeteri
b4e944db89 Backed out 7 changesets (bug 1892021) for causing mochitest failures related to browser_credential_chooser.js. CLOSED TREE
Backed out changeset b5b5254bf660 (bug 1892021)
Backed out changeset 12d8161339d7 (bug 1892021)
Backed out changeset 5fa9f0cc8969 (bug 1892021)
Backed out changeset f3b48a85a13c (bug 1892021)
Backed out changeset 5d0683eaf762 (bug 1892021)
Backed out changeset 2958972909b1 (bug 1892021)
Backed out changeset 247cf5c06c25 (bug 1892021)
2024-07-25 00:09:50 +03:00
Benjamin VanderSloot
aa64bcf40d Bug 1892021, part 5 - Rearchitect IPC for discovery - r=anti-tracking-reviewers,pbz
I'm sorry. This is a big change to recent stuff, and worst of all is a big commit.

Decisions I made while implementing credential discovery backed me into a corner
where I couldn't have the UI actually get rendered. Particularly around where the
IPCs needed to happen and at what point we called into the main process and when
we returned.

The way it works now is that we do ONE IPC for a credentials.get call, doing most of
the work in the main process and only maybe doing one IPC down to the content process
to tell it to navigate.

This is neater and more secure to a compromised content process. However, a lot happens in
this patch.

Differential Revision: https://phabricator.services.mozilla.com/D215009
2024-07-24 18:31:44 +00:00
Adam Vandolder
2007a1348b Bug 1895254 - Prototype the Navigation API WebIDL. r=farre,dom-core,peterv
Differential Revision: https://phabricator.services.mozilla.com/D210088
2024-07-24 04:56:35 +00:00
Stanca Serban
228aadad49 Backed out changeset c634fecd6270 (bug 1895254) for causing build bustages in Navigation.cpp. 2024-07-24 07:27:32 +03:00
Adam Vandolder
b6218e2851 Bug 1895254 - Prototype the Navigation API WebIDL. r=farre,dom-core,peterv
Differential Revision: https://phabricator.services.mozilla.com/D210088
2024-07-24 03:44:15 +00:00
Stanca Serban
9547df2351 Backed out 7 changesets (bug 1892021) for causing build bustages in credentialChooser.ftl. CLOSED TREE
Backed out changeset 5d306569397d (bug 1892021)
Backed out changeset 5a76de33c183 (bug 1892021)
Backed out changeset 35c606aceb37 (bug 1892021)
Backed out changeset 32d47ef1e1dd (bug 1892021)
Backed out changeset 5e7c91612daa (bug 1892021)
Backed out changeset f3f9691bb850 (bug 1892021)
Backed out changeset e53013b48c21 (bug 1892021)
2024-07-24 00:21:19 +03:00
Benjamin VanderSloot
ccce947316 Bug 1892021, part 5 - Rearchitect IPC for discovery - r=anti-tracking-reviewers,pbz
I'm sorry. This is a big change to recent stuff, and worst of all is a big commit.

Decisions I made while implementing credential discovery backed me into a corner
where I couldn't have the UI actually get rendered. Particularly around where the
IPCs needed to happen and at what point we called into the main process and when
we returned.

The way it works now is that we do ONE IPC for a credentials.get call, doing most of
the work in the main process and only maybe doing one IPC down to the content process
to tell it to navigate.

This is neater and more secure to a compromised content process. However, a lot happens in
this patch.

Differential Revision: https://phabricator.services.mozilla.com/D215009
2024-07-23 18:48:18 +00:00
Andrew Osmond
9a14504cfc Bug 1909462 - Switch requestAnimationFrame handles to be uint32_t per spec. r=webidl,emilio
The current version of the spec indicates that we should be using
uint32_t instead of int32_t for the handles with requestAnimationFrame
and cancelAnimationFrame.

https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#animation-frames

Differential Revision: https://phabricator.services.mozilla.com/D217427
2024-07-23 14:41:11 +00:00
Sandor Molnar
ea3243f101 Backed out changeset 455d12dff44e (bug 1895254) for causing android wpt crashes @ /html/dom/idlharness.https.html CLOSED TREE 2024-07-19 22:47:01 +03:00
Adam Vandolder
5850778c78 Bug 1895254 - Prototype the Navigation API WebIDL. r=farre,dom-core,peterv
Differential Revision: https://phabricator.services.mozilla.com/D210088
2024-07-19 15:16:40 +00:00
Cosmin Sabou
ef5a7d3fda Backed out changeset 1b14354719c0 (bug 1895254) for causing bustages on NavigationTransition. CLOSED TREE 2024-07-19 00:20:49 +03:00
Adam Vandolder
48629bb869 Bug 1895254 - Prototype the Navigation API WebIDL. r=farre,dom-core,peterv
Differential Revision: https://phabricator.services.mozilla.com/D210088
2024-07-18 18:10:40 +00:00
Stanca Serban
bb3aa3a009 Backed out changeset 04ca9845721e (bug 1895254) for causing multiple failures. CLOSED TREE 2024-07-17 23:10:14 +03:00
Adam Vandolder
8ead4811f0 Bug 1895254 - Prototype the Navigation API WebIDL. r=farre,dom-core,peterv
Differential Revision: https://phabricator.services.mozilla.com/D210088
2024-07-17 17:58:27 +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
Emilio Cobos Álvarez
01524a9fc1 Bug 1906965 - Fix a trivial typo in the previous patch.
MANUAL PUSH: Trivial fix CLOSED TREE
2024-07-16 20:59:32 +02:00
Emilio Cobos Álvarez
3306346b8c Bug 1906965 - Negative scroll offsets can be valid in vertical writing-modes or rtl, so we need to flush.
MANUAL PUSH: This fixes some orange tests under css/css-scroll-anchoring
in a CLOSED TREE
2024-07-16 20:09:08 +02:00
Emilio Cobos Álvarez
6c95f3ca00 Bug 1906965 - Don't flush frames on window.scrollTo(0, 0). r=smaug
NewsSite-Nuxt does a scrollTo(0, 0) which seems to get measured and
seems it might be responsible for bug 1850809.

Chrome doesn't flush at all, and it general it shouldn't be needed. If
there's no scrollframe, the default scroll position is 0,0.

Do the same optimization to ScrollBy(0, 0) and co while at it.

Differential Revision: https://phabricator.services.mozilla.com/D216104
2024-07-16 10:34:19 +00:00
Kagami Sascha Rosylight
a81d4a42d8 Bug 1904904 - Add GlobalFreezeObserver r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D215014
2024-07-11 06:00:33 +00:00
Emilio Cobos Álvarez
71bf77b3fe Bug 1904442 - Rename GlobalTeardownObserver::GetOwner to GetOwnerWindow. r=smaug,media-playback-reviewers,dom-storage-reviewers,aosmond,padenot,asuth
Also HasOrHasHadOwner to HasOrHasHadOwnerWindow.

Differential Revision: https://phabricator.services.mozilla.com/D214772
2024-07-01 11:49:59 +00:00
aiunusov
1fb2fba720 Bug 1817981 - Add possibility to mark worker private being in background, r=smaug,asuth
Differential Revision: https://phabricator.services.mozilla.com/D209334
2024-06-27 12:39:47 +00:00
aiunusov
af7cceba76 Bug 1897400 - prepare TimeoutManager for reuse in workers via nsIGlobalObject, r=smaug
- methods IsBackgroundInternal(), IsRunningTimeout(), TimeoutManager() were moved to nsIGlobalObject

Differential Revision: https://phabricator.services.mozilla.com/D211008
2024-06-24 10:29:16 +00:00
Cristian Tuns
72f3d45d9e Backed out changeset f479ecc1133d (bug 1897400) for causing build bustages in TimeoutManager.cpp CLOSED TREE 2024-06-21 10:32:22 -04:00
aiunusov
93fb08c61d Bug 1897400 - prepare TimeoutManager for reuse in workers via nsIGlobalObject, r=smaug
- methods IsBackgroundInternal(), IsRunningTimeout(), TimeoutManager() were moved to nsIGlobalObject

Differential Revision: https://phabricator.services.mozilla.com/D211008
2024-06-21 11:27:32 +00:00
Edgar Chen
f6f9b13961 Bug 1883799 - Rename nsIAsyncGetClipboardData to nsIClipboardDataSnapshot; r=nika
Differential Revision: https://phabricator.services.mozilla.com/D214135
2024-06-20 07:36:40 +00:00
pstanciu
1dd9e24c1d Backed out changeset 08430749c503 (bug 1817981) for causing mochitest failures on test_worker_in_background.html 2024-06-19 03:11:23 +03:00
aiunusov
ba7f0001ff Bug 1817981 - Add possibility to mark worker private being in background, r=smaug,asuth
Differential Revision: https://phabricator.services.mozilla.com/D209334
2024-06-18 21:36:01 +00:00
longsonr
945e70a36f Bug 1903214 - Don't dispatch SMIL events unless there are listeners r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D214010
2024-06-18 13:25:47 +00:00
Stanca Serban
4f6cd29ecf Backed out changeset e1c3d0c745df (bug 1817981) for causing mochitests failures in test_worker_in_background.html. 2024-06-18 07:12:30 +03:00
aiunusov
e3b021f035 Bug 1817981 - Add possibility to mark worker private being in background, r=smaug,asuth
Differential Revision: https://phabricator.services.mozilla.com/D209334
2024-06-17 20:53:36 +00:00
Benjamin VanderSloot
a48911b1d9 Bug 1892017, part 2 - Store a promise on the inner window's global to enable Lightweight FedCM discovery - r=anti-tracking-reviewers,timhuang
This is the content side state to hold the (guaruanteed singular) pending identity credential request that had to call out
to the main process.

Differential Revision: https://phabricator.services.mozilla.com/D212942
2024-06-17 15:43:40 +00:00
Iulian Moraru
ad11b7a7d8 Backed out 7 changesets (bug 1892016, bug 1892017) for causing non-unified build bustages.
Backed out changeset e20baed3e71f (bug 1892017)
Backed out changeset d146d9d85a63 (bug 1892017)
Backed out changeset 7a551acf06fa (bug 1892017)
Backed out changeset 12e0891b0caf (bug 1892016)
Backed out changeset 727bd124c756 (bug 1892017)
Backed out changeset c0824274c054 (bug 1892017)
Backed out changeset 488a043b797b (bug 1892017)
2024-06-14 18:45:35 +03:00
Benjamin VanderSloot
956cbd08c5 Bug 1892017, part 2 - Store a promise on the inner window's global to enable Lightweight FedCM discovery - r=anti-tracking-reviewers,timhuang
This is the content side state to hold the (guaruanteed singular) pending identity credential request that had to call out
to the main process.

Differential Revision: https://phabricator.services.mozilla.com/D212942
2024-06-14 13:15:25 +00:00
Cristian Tuns
3592169d4b Backed out changeset 072c9a687784 (bug 1817981) for causing mochitest failures in test_worker_in_background.html CLOSED TREE 2024-06-13 23:30:43 -04:00
aiunusov
2d09a12c0b Bug 1817981 - Add possibility to mark worker private being in background, r=smaug,asuth
Differential Revision: https://phabricator.services.mozilla.com/D209334
2024-06-13 22:43:23 +00:00
Ting-Yu Lin
9ff564d485 Bug 1896516 Part 7 - Remove PresShell::GetRootScrollFrameAsScrollable(). r=layout-reviewers,emilio
`PresShell::GetRootScrollFrameAsScrollable()` is equivalent to
`PresShell::GetRootScrollContainerFrame()`.

In ScrollContainerFrame.h, `DecideScrollableLayer()` has two versions, one has
four parameters, and the other has five parameters with the fifth parameter
`aDirtyRectHasBeenOverriden` having a default value `nullptr`. When we switch
the caller from `nsIScrollableFrame` to `ScrollContainerFrame`, we need to
remove the default value for the fifth parameter to avoid ambiguity.

Differential Revision: https://phabricator.services.mozilla.com/D211494
2024-05-30 06:32:20 +00:00
Sebastian Hengst
bf4dfe53f8 Backed out 15 changesets (bug 1896516) for causing scrolling crashes on macOS. a=backout
Backed out changeset fd6904338812 (bug 1896516)
Backed out changeset 2977ff81a23e (bug 1896516)
Backed out changeset c8a6b0e526d6 (bug 1896516)
Backed out changeset 3c06f22da72b (bug 1896516)
Backed out changeset f63b0c4335fe (bug 1896516)
Backed out changeset 6f7ab8adfa6e (bug 1896516)
Backed out changeset 997c9249dbed (bug 1896516)
Backed out changeset c964fccd5180 (bug 1896516)
Backed out changeset 7b481b747b7a (bug 1896516)
Backed out changeset 42e1bbe0ecb6 (bug 1896516)
Backed out changeset 717dac08b607 (bug 1896516)
Backed out changeset 2f0817331dbe (bug 1896516)
Backed out changeset b765169a7a8f (bug 1896516)
Backed out changeset a2d37b98273c (bug 1896516)
Backed out changeset ea9ecb543e66 (bug 1896516)
2024-05-29 11:22:52 +02:00
Ting-Yu Lin
5ac7609fac Bug 1896516 Part 7 - Remove PresShell::GetRootScrollFrameAsScrollable(). r=layout-reviewers,emilio
`PresShell::GetRootScrollFrameAsScrollable()` is equivalent to
`PresShell::GetRootScrollContainerFrame()`.

In ScrollContainerFrame.h, `DecideScrollableLayer()` has two versions, one has
four parameters, and the other has five parameters with the fifth parameter
`aDirtyRectHasBeenOverriden` having a default value `nullptr`. When we switch
the caller from `nsIScrollableFrame` to `ScrollContainerFrame`, we need to
remove the default value for the fifth parameter to avoid ambiguity.

Differential Revision: https://phabricator.services.mozilla.com/D211494
2024-05-28 04:46:19 +00:00
Tim Huang
c83ecb0df1 Bug 1885936 - Part 1: Introduce a chrome only function for getting all gamepads. r=cmartin,webidl,emilio
To collect the gamepad information on the user device, we introduce a
chrome only function called RequestAllGamepads to Navigator. The
function will return a promise which resolves when we get all gamepads
info from the parent process.

Note that we cannot rely on The existing navigator.getGamepads()
function because it cannot allow us collecting gamepads info
without the user interacts with the gamepads.

Differential Revision: https://phabricator.services.mozilla.com/D207979
2024-05-15 16:48:58 +00:00
Tamas Szentpeteri
3be78841f1 Backed out 4 changesets (bug 1885936) for causing bpnu bustages related to Gamepad. CLOSED TREE
Backed out changeset 935c80ed4a38 (bug 1885936)
Backed out changeset 6cc4da44b050 (bug 1885936)
Backed out changeset 03205a0f59e6 (bug 1885936)
Backed out changeset 93619e887bb7 (bug 1885936)
2024-05-15 16:58:13 +03:00
Tim Huang
266c083bd9 Bug 1885936 - Part 1: Introduce a chrome only function for getting all gamepads. r=cmartin,webidl,emilio
To collect the gamepad information on the user device, we introduce a
chrome only function called RequestAllGamepads to Navigator. The
function will return a promise which resolves when we get all gamepads
info from the parent process.

Note that we cannot rely on The existing navigator.getGamepads()
function because it cannot allow us collecting gamepads info
without the user interacts with the gamepads.

Differential Revision: https://phabricator.services.mozilla.com/D207979
2024-05-15 11:43:31 +00:00