Everywhere: Remove ShadowRealm support

The proposal has not seemed to progress for a while, and there is
a open issue about module imports which breaks HTML integration.
While we could probably make an AD-HOC change to fix that issue,
it is deep enough in the JS engine that I am not particularly
keen on making that change.

Until other browsers begin to make positive signals about shipping
ShadowRealms, let's remove our implementation for now.

There is still some cleanup that can be done with regard to the
HTML integration, but there are a few more items that need to be
untangled there.
This commit is contained in:
Shannon Booth
2026-04-03 14:34:03 +02:00
committed by Shannon Booth
parent e2e3c7fcdf
commit f27bc38aa7
Notes: github-actions[bot] 2026-04-05 11:59:00 +00:00
57 changed files with 54 additions and 1485 deletions

View File

@@ -12,7 +12,6 @@
#include <LibWeb/DOM/Document.h>
#include <LibWeb/HTML/PolicyContainers.h>
#include <LibWeb/HTML/Scripting/Environments.h>
#include <LibWeb/HTML/ShadowRealmGlobalScope.h>
#include <LibWeb/HTML/Window.h>
#include <LibWeb/HTML/WorkerGlobalScope.h>
@@ -49,8 +48,7 @@ GC::Ptr<PolicyList> PolicyList::from_object(JS::Object& object)
// 2. If object is a Window or a WorkerGlobalScope or a WorkletGlobalScope, return environment settings objects
// policy container's CSP list.
// FIXME: File a spec issue to make this look at ShadowRealmGlobalScope to support ShadowRealm.
if (is<HTML::Window>(object) || is<HTML::WorkerGlobalScope>(object) || is<HTML::ShadowRealmGlobalScope>(object)) {
if (is<HTML::Window>(object) || is<HTML::WorkerGlobalScope>(object)) {
auto& settings = HTML::relevant_principal_settings_object(object);
return settings.policy_container()->csp_list;
}