This patch makes sure the Tab Unloading feature does not unload tabs that have
active peer connections not to disrupt browsing experience based on WebRTC peer
connections.
To enable JS code to access the number of active peer connections, this patch
moves `nsPIDOMWindowInner::mTotalActivePeerConnections` to `WindowGlobalParent`.
Differential Revision: https://phabricator.services.mozilla.com/D128761
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.
Differential Revision: https://phabricator.services.mozilla.com/D130009
Currently, we are using the regular principal and inherited regular
principal to create clientSource in nsDocShell. This patch makes the
nsDocshell to use the partitioned principal if needed.
Differential Revision: https://phabricator.services.mozilla.com/D127629
Add BrowsingContext::FieldValues.mIsPopupRequested, and pass "is popup"
value calculated before opening window/tab to BrowsingContext::CreateDetached.
Other code path that is unrelated to content-priv window.open uses the
default value false.
Differential Revision: https://phabricator.services.mozilla.com/D129411
Add BrowsingContext::FieldValues.mIsPopupRequested, and pass "is popup"
value calculated before opening window/tab to BrowsingContext::CreateDetached.
Other code path that is unrelated to content-priv window.open uses the
default value false.
Differential Revision: https://phabricator.services.mozilla.com/D129411
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.
Differential Revision: https://phabricator.services.mozilla.com/D130009
Currently, checking whether an `EventTarget` is `nsINode` (or its concrete
classes) or not requires a QI, but it's expensive and used a lot while we
handle each event. Therefore, it'd be nicer for creating a virtual method,
`EventTarget::IsNode()` and use it for the check.
If trying to convert `EventTarget` to a concrete class, it may require two
virtual method calls. I'm not sure whether it's cheaper than a QI, but at
least, it won't depend on the UUID check order of `QueryInterface()` when
multiple interfaces are implemented.
Differential Revision: https://phabricator.services.mozilla.com/D129781
Brief recap:
Before we have blocking autoplay, we had a feature which will delay media from start if the tab hasn't been visited by users, in order to prevent an unvisited background tab suddenly play sounds, which is annoying and might be unexpected to users.
In this patch:
The attribute we use to check whether we need to delay media is on the outer window, which is not Fission compatible if the top level window and its child windows are on the different process.
If the top level window has been visited, then all its child window should follow the same result. Therefore, we need to move the attribute to the browsing context in order to sync it across different windows.
Differential Revision: https://phabricator.services.mozilla.com/D128126
ran eslint to correct an error
compressed the if statements into 1 if using &&
wrote a test in the test_URIFixup_info.js file
fixed the test
Differential Revision: https://phabricator.services.mozilla.com/D129634
Currently, soft reload uses the `VALIDATE_ALWAYS` flag to not only
force revalidate the top level document, but also subresources.
This causes content to be refetched from the web even if there
are caches that are still valid and can be used.
Chrome already has such behaviour to not revalidate all resources.
Differential Revision: https://phabricator.services.mozilla.com/D122270
Document::GetBrowsingContext uses a WeakPtr<nsIDocShell> so we can't do
that. But we have all the other media emulation data and so on in the
pres context which we can access off the main thread for style, so move the
override code there.
Differential Revision: https://phabricator.services.mozilla.com/D128673
Currently, we are using the regular principal and inherited regular
principal to create clientSource in nsDocShell. This patch makes the
nsDocshell to use the partitioned principal if needed.
Differential Revision: https://phabricator.services.mozilla.com/D127629
Currently, we are using the regular principal and inherited regular
principal to create clientSource in nsDocShell. This patch makes the
nsDocshell to use the partitioned principal if needed.
Differential Revision: https://phabricator.services.mozilla.com/D127629
Currently, we are using the regular principal and inherited regular
principal to create clientSource in nsDocShell. This patch makes the
nsDocshell to use the partitioned principal if needed.
Differential Revision: https://phabricator.services.mozilla.com/D127629