LibWeb: Remove ShadowRealm HTML integration

This commit is contained in:
Shannon Booth
2026-04-03 18:12:46 +02:00
committed by Shannon Booth
parent f27bc38aa7
commit bb0f244667
Notes: github-actions[bot] 2026-04-05 11:58:52 +00:00
71 changed files with 469 additions and 683 deletions

View File

@@ -82,15 +82,13 @@ JS::ThrowCompletionOr<JS::PropertyDescriptor> cross_origin_property_fallback(JS:
}
// 7.2.3.3 IsPlatformObjectSameOrigin ( O ), https://html.spec.whatwg.org/multipage/nav-history-apis.html#isplatformobjectsameorigin-(-o-)
// https://whatpr.org/html/9893/nav-history-apis.html#isplatformobjectsameorigin-(-o-)
bool is_platform_object_same_origin(JS::Object const& object)
{
// 1. Return true if the current principal settings object's origin is same origin-domain with O's relevant settings object's origin, and false otherwise.
return HTML::current_principal_settings_object().origin().is_same_origin_domain(HTML::relevant_settings_object(object).origin());
// 1. Return true if the current settings object's origin is same origin-domain with O's relevant settings object's origin, and false otherwise.
return HTML::current_settings_object().origin().is_same_origin_domain(HTML::relevant_settings_object(object).origin());
}
// 7.2.3.4 CrossOriginGetOwnPropertyHelper ( O, P ), https://html.spec.whatwg.org/multipage/nav-history-apis.html#crossorigingetownpropertyhelper-(-o,-p-)
// https://whatpr.org/html/9893/nav-history-apis.html#crossorigingetownpropertyhelper-(-o,-p-)
Optional<JS::PropertyDescriptor> cross_origin_get_own_property_helper(Variant<HTML::Location*, HTML::Window*> const& object, JS::PropertyKey const& property_key)
{
auto& vm = Bindings::main_thread_vm();
@@ -98,9 +96,9 @@ Optional<JS::PropertyDescriptor> cross_origin_get_own_property_helper(Variant<HT
auto const* object_ptr = object.visit([](auto* o) { return static_cast<JS::Object const*>(o); });
auto const object_const_variant = object.visit([](auto* o) { return Variant<HTML::Location const*, HTML::Window const*> { o }; });
// 1. Let crossOriginKey be a tuple consisting of the current principal settings object, O's relevant settings object, and P.
// 1. Let crossOriginKey be a tuple consisting of the current settings object, O's relevant settings object, and P.
auto cross_origin_key = CrossOriginKey {
.current_principal_settings_object = (FlatPtr)&HTML::current_principal_settings_object(),
.current_settings_object = (FlatPtr)&HTML::current_settings_object(),
.relevant_settings_object = (FlatPtr)&HTML::relevant_settings_object(*object_ptr),
.property_key = property_key,
};