LibWeb: Rename Bindings::HostDefined to Bindings::PrincipalHostDefined

With the introduction of shadow realms, there will be two different
possible host defined objects. For clarity, rename the existing host
defined object to PrincipalHostDefined.
This commit is contained in:
Shannon Booth 2024-10-26 21:02:28 +13:00 committed by Andrew Kaster
commit 5154df020b
Notes: github-actions[bot] 2024-11-05 18:00:05 +00:00
25 changed files with 81 additions and 89 deletions

View file

@ -124,7 +124,7 @@ WebIDL::ExceptionOr<void> HTMLDialogElement::show_modal()
return JS::js_undefined();
},
0, "", &realm());
auto cancel_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*cancel_callback_function, Bindings::host_defined_environment_settings_object(realm()));
auto cancel_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*cancel_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
m_close_watcher->add_event_listener_without_options(HTML::EventNames::cancel, DOM::IDLEventListener::create(realm(), cancel_callback));
// - closeAction being to close the dialog given this and null.
auto close_callback_function = JS::NativeFunction::create(
@ -134,7 +134,7 @@ WebIDL::ExceptionOr<void> HTMLDialogElement::show_modal()
return JS::js_undefined();
},
0, "", &realm());
auto close_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*close_callback_function, Bindings::host_defined_environment_settings_object(realm()));
auto close_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*close_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
m_close_watcher->add_event_listener_without_options(HTML::EventNames::close, DOM::IDLEventListener::create(realm(), close_callback));
// FIXME: 11. Set this's previously focused element to the focused element.