mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
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:
committed by
Shannon Booth
parent
e2e3c7fcdf
commit
f27bc38aa7
Notes:
github-actions[bot]
2026-04-05 11:59:00 +00:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/f27bc38aa7c Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8753
@@ -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 object’s
|
||||
// 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user