1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 19:47:46 +00:00

LibWeb: Cleanup unecessary uses and includes of HTML::Window

The big global refactor left some stragglers behind for atomicity.

Clean up the rest, and remove a ton of includes of LibWeb/HTML/Window.h
This commit is contained in:
Andrew Kaster 2022-09-30 17:16:16 -06:00 committed by Linus Groh
parent cc164dc1e2
commit 56b381aac0
88 changed files with 76 additions and 169 deletions

View file

@ -91,11 +91,6 @@ KeyboardEvent* KeyboardEvent::create_from_platform_event(JS::Realm& realm, FlySt
return KeyboardEvent::create(realm, event_name, event_init);
}
KeyboardEvent* KeyboardEvent::create_from_platform_event(HTML::Window& window, FlyString const& event_name, KeyCode platform_key, unsigned modifiers, u32 code_point)
{
return create_from_platform_event(window.realm(), event_name, platform_key, modifiers, code_point);
}
bool KeyboardEvent::get_modifier_state(String const& key_arg)
{
if (key_arg == "Alt")

View file

@ -31,7 +31,6 @@ public:
static KeyboardEvent* create(JS::Realm&, FlyString const& event_name, KeyboardEventInit const& event_init = {});
static KeyboardEvent* construct_impl(JS::Realm&, FlyString const& event_name, KeyboardEventInit const& event_init);
static KeyboardEvent* create_from_platform_event(JS::Realm&, FlyString const& event_name, KeyCode, unsigned modifiers, u32 code_point);
static KeyboardEvent* create_from_platform_event(HTML::Window&, FlyString const& event_name, KeyCode, unsigned modifiers, u32 code_point);
virtual ~KeyboardEvent() override;

View file

@ -62,11 +62,6 @@ MouseEvent* MouseEvent::create_from_platform_event(JS::Realm& realm, FlyString c
return MouseEvent::create(realm, event_name, event_init);
}
MouseEvent* MouseEvent::create_from_platform_event(HTML::Window& window, FlyString const& event_name, double offset_x, double offset_y, double client_x, double client_y, unsigned mouse_button)
{
return create_from_platform_event(window.realm(), event_name, offset_x, offset_y, client_x, client_y, mouse_button);
}
void MouseEvent::set_event_characteristics()
{
if (type().is_one_of(EventNames::mousedown, EventNames::mousemove, EventNames::mouseout, EventNames::mouseover, EventNames::mouseup, HTML::EventNames::click)) {

View file

@ -27,7 +27,6 @@ class MouseEvent final : public UIEvent {
public:
static MouseEvent* create(JS::Realm&, FlyString const& event_name, MouseEventInit const& event_init = {});
static MouseEvent* create_from_platform_event(JS::Realm&, FlyString const& event_name, double offset_x, double offset_y, double client_x, double client_y, unsigned mouse_button = 1);
static MouseEvent* create_from_platform_event(HTML::Window&, FlyString const& event_name, double offset_x, double offset_y, double client_x, double client_y, unsigned mouse_button = 1);
virtual ~MouseEvent() override;