1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 18:27:36 +00:00

LibWeb: Use WebIDL types where possible instead of C types

This commit is contained in:
Bastiaan van der Plaat 2024-02-26 18:54:36 +01:00 committed by Sam Atkins
parent f1d6693990
commit c41b359ca5
13 changed files with 32 additions and 24 deletions

View file

@ -8,10 +8,11 @@
#include <LibWeb/UIEvents/MouseEvent.h>
#include <LibWeb/UIEvents/UIEvent.h>
#include <LibWeb/WebIDL/Types.h>
namespace Web::UIEvents {
enum class WheelDeltaMode : unsigned long {
enum class WheelDeltaMode : WebIDL::UnsignedLong {
DOM_DELTA_PIXEL = 0,
DOM_DELTA_LINE = 1,
DOM_DELTA_PAGE = 2,
@ -38,7 +39,7 @@ public:
double delta_x() const { return m_delta_x; }
double delta_y() const { return m_delta_y; }
double delta_z() const { return m_delta_z; }
unsigned long delta_mode() const { return to_underlying(m_delta_mode); }
WebIDL::UnsignedLong delta_mode() const { return to_underlying(m_delta_mode); }
private:
WheelEvent(JS::Realm&, FlyString const& event_name, WheelEventInit const& event_init, double page_x, double page_y, double offset_x, double offset_y);