mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-08 17:47:18 +00:00
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:
committed by
Andrew Kaster
parent
16ab3c5f9d
commit
5154df020b
@@ -896,7 +896,7 @@ void HTMLInputElement::create_text_input_shadow_tree()
|
||||
return JS::js_undefined();
|
||||
},
|
||||
0, "", &realm());
|
||||
auto mouseup_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*mouseup_callback_function, Bindings::host_defined_environment_settings_object(realm()));
|
||||
auto mouseup_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*mouseup_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
|
||||
DOM::AddEventListenerOptions mouseup_listener_options;
|
||||
mouseup_listener_options.once = true;
|
||||
|
||||
@@ -909,7 +909,7 @@ void HTMLInputElement::create_text_input_shadow_tree()
|
||||
return JS::js_undefined();
|
||||
},
|
||||
0, "", &realm());
|
||||
auto step_up_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*up_callback_function, Bindings::host_defined_environment_settings_object(realm()));
|
||||
auto step_up_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*up_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
|
||||
up_button->add_event_listener_without_options(UIEvents::EventNames::mousedown, DOM::IDLEventListener::create(realm(), step_up_callback));
|
||||
up_button->add_event_listener_without_options(UIEvents::EventNames::mouseup, DOM::IDLEventListener::create(realm(), mouseup_callback));
|
||||
|
||||
@@ -931,7 +931,7 @@ void HTMLInputElement::create_text_input_shadow_tree()
|
||||
return JS::js_undefined();
|
||||
},
|
||||
0, "", &realm());
|
||||
auto step_down_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*down_callback_function, Bindings::host_defined_environment_settings_object(realm()));
|
||||
auto step_down_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*down_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
|
||||
down_button->add_event_listener_without_options(UIEvents::EventNames::mousedown, DOM::IDLEventListener::create(realm(), step_down_callback));
|
||||
down_button->add_event_listener_without_options(UIEvents::EventNames::mouseup, DOM::IDLEventListener::create(realm(), mouseup_callback));
|
||||
}
|
||||
@@ -990,7 +990,7 @@ void HTMLInputElement::create_file_input_shadow_tree()
|
||||
};
|
||||
|
||||
auto on_button_click_function = JS::NativeFunction::create(realm, move(on_button_click), 0, "", &realm);
|
||||
auto on_button_click_callback = realm.heap().allocate_without_realm<WebIDL::CallbackType>(on_button_click_function, Bindings::host_defined_environment_settings_object(realm));
|
||||
auto on_button_click_callback = realm.heap().allocate_without_realm<WebIDL::CallbackType>(on_button_click_function, Bindings::principal_host_defined_environment_settings_object(realm));
|
||||
m_file_button->add_event_listener_without_options(UIEvents::EventNames::click, DOM::IDLEventListener::create(realm, on_button_click_callback));
|
||||
|
||||
update_file_input_shadow_tree();
|
||||
@@ -1062,7 +1062,7 @@ void HTMLInputElement::create_range_input_shadow_tree()
|
||||
return JS::js_undefined();
|
||||
},
|
||||
0, "", &realm());
|
||||
auto keydown_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*keydown_callback_function, Bindings::host_defined_environment_settings_object(realm()));
|
||||
auto keydown_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*keydown_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
|
||||
add_event_listener_without_options(UIEvents::EventNames::keydown, DOM::IDLEventListener::create(realm(), keydown_callback));
|
||||
|
||||
auto wheel_callback_function = JS::NativeFunction::create(
|
||||
@@ -1077,7 +1077,7 @@ void HTMLInputElement::create_range_input_shadow_tree()
|
||||
return JS::js_undefined();
|
||||
},
|
||||
0, "", &realm());
|
||||
auto wheel_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*wheel_callback_function, Bindings::host_defined_environment_settings_object(realm()));
|
||||
auto wheel_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*wheel_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
|
||||
add_event_listener_without_options(UIEvents::EventNames::wheel, DOM::IDLEventListener::create(realm(), wheel_callback));
|
||||
|
||||
auto update_slider_by_mouse = [this](JS::VM& vm) {
|
||||
@@ -1100,7 +1100,7 @@ void HTMLInputElement::create_range_input_shadow_tree()
|
||||
return JS::js_undefined();
|
||||
},
|
||||
0, "", &realm());
|
||||
auto mousemove_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*mousemove_callback_function, Bindings::host_defined_environment_settings_object(realm()));
|
||||
auto mousemove_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*mousemove_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
|
||||
auto mousemove_listener = DOM::IDLEventListener::create(realm(), mousemove_callback);
|
||||
auto& window = static_cast<HTML::Window&>(relevant_global_object(*this));
|
||||
window.add_event_listener_without_options(UIEvents::EventNames::mousemove, mousemove_listener);
|
||||
@@ -1112,7 +1112,7 @@ void HTMLInputElement::create_range_input_shadow_tree()
|
||||
return JS::js_undefined();
|
||||
},
|
||||
0, "", &realm());
|
||||
auto mouseup_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*mouseup_callback_function, Bindings::host_defined_environment_settings_object(realm()));
|
||||
auto mouseup_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*mouseup_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
|
||||
DOM::AddEventListenerOptions mouseup_listener_options;
|
||||
mouseup_listener_options.once = true;
|
||||
window.add_event_listener(UIEvents::EventNames::mouseup, DOM::IDLEventListener::create(realm(), mouseup_callback), mouseup_listener_options);
|
||||
@@ -1120,7 +1120,7 @@ void HTMLInputElement::create_range_input_shadow_tree()
|
||||
return JS::js_undefined();
|
||||
},
|
||||
0, "", &realm());
|
||||
auto mousedown_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*mousedown_callback_function, Bindings::host_defined_environment_settings_object(realm()));
|
||||
auto mousedown_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*mousedown_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
|
||||
add_event_listener_without_options(UIEvents::EventNames::mousedown, DOM::IDLEventListener::create(realm(), mousedown_callback));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user