LibWeb: Add Web::UIEvents::MouseButton enum, drop dependency on LibGUI

This was the only thing LibWeb needed from LibGUI, and we can just
duplicate the enum in LibWeb and get rid of a bogus dependency.
This commit is contained in:
Andreas Kling
2024-06-02 19:00:42 +02:00
parent 3e46874858
commit 09980af4ea
21 changed files with 86 additions and 67 deletions

View File

@@ -315,7 +315,7 @@ void OutOfProcessWebView::enqueue_native_event(Web::MouseEvent::Type type, GUI::
auto wheel_delta_x = event.wheel_delta_x() * SCROLL_STEP_SIZE;
auto wheel_delta_y = event.wheel_delta_y() * SCROLL_STEP_SIZE;
enqueue_input_event(Web::MouseEvent { type, position, screen_position, event.button(), static_cast<GUI::MouseButton>(event.buttons()), static_cast<KeyModifier>(event.modifiers()), wheel_delta_x, wheel_delta_y, nullptr });
enqueue_input_event(Web::MouseEvent { type, position, screen_position, static_cast<Web::UIEvents::MouseButton>(to_underlying(event.button())), static_cast<Web::UIEvents::MouseButton>(event.buttons()), static_cast<KeyModifier>(event.modifiers()), wheel_delta_x, wheel_delta_y, nullptr });
}
struct KeyData : Web::ChromeInputData {