mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 19:19:30 +00:00
LibGC+Everywhere: Factor out a LibGC from LibJS
Resulting in a massive rename across almost everywhere! Alongside the namespace change, we now have the following names: * JS::NonnullGCPtr -> GC::Ref * JS::GCPtr -> GC::Ptr * JS::HeapFunction -> GC::Function * JS::CellImpl -> GC::Cell * JS::Handle -> GC::Root
This commit is contained in:
parent
ce23efc5f6
commit
f87041bf3a
Notes:
github-actions[bot]
2024-11-15 13:50:17 +00:00
Author: https://github.com/shannonbooth
Commit: f87041bf3a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2345
1722 changed files with 9939 additions and 9906 deletions
|
@ -22,17 +22,17 @@ struct MouseEventInit : public EventModifierInit {
|
|||
double movement_y = 0;
|
||||
i16 button = 0;
|
||||
u16 buttons = 0;
|
||||
JS::GCPtr<DOM::EventTarget> related_target = nullptr;
|
||||
GC::Ptr<DOM::EventTarget> related_target = nullptr;
|
||||
};
|
||||
|
||||
class MouseEvent : public UIEvent {
|
||||
WEB_PLATFORM_OBJECT(MouseEvent, UIEvent);
|
||||
JS_DECLARE_ALLOCATOR(MouseEvent);
|
||||
GC_DECLARE_ALLOCATOR(MouseEvent);
|
||||
|
||||
public:
|
||||
[[nodiscard]] static JS::NonnullGCPtr<MouseEvent> create(JS::Realm&, FlyString const& event_name, MouseEventInit const& = {}, double page_x = 0, double page_y = 0, double offset_x = 0, double offset_y = 0);
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<MouseEvent>> create_from_platform_event(JS::Realm&, FlyString const& event_name, CSSPixelPoint screen, CSSPixelPoint page, CSSPixelPoint client, CSSPixelPoint offset, Optional<CSSPixelPoint> movement, unsigned button, unsigned buttons, unsigned modifiers);
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<MouseEvent>> construct_impl(JS::Realm&, FlyString const& event_name, MouseEventInit const&);
|
||||
[[nodiscard]] static GC::Ref<MouseEvent> create(JS::Realm&, FlyString const& event_name, MouseEventInit const& = {}, double page_x = 0, double page_y = 0, double offset_x = 0, double offset_y = 0);
|
||||
static WebIDL::ExceptionOr<GC::Ref<MouseEvent>> create_from_platform_event(JS::Realm&, FlyString const& event_name, CSSPixelPoint screen, CSSPixelPoint page, CSSPixelPoint client, CSSPixelPoint offset, Optional<CSSPixelPoint> movement, unsigned button, unsigned buttons, unsigned modifiers);
|
||||
static WebIDL::ExceptionOr<GC::Ref<MouseEvent>> construct_impl(JS::Realm&, FlyString const& event_name, MouseEventInit const&);
|
||||
|
||||
virtual ~MouseEvent() override;
|
||||
|
||||
|
@ -71,7 +71,7 @@ public:
|
|||
i16 button() const { return m_button; }
|
||||
u16 buttons() const { return m_buttons; }
|
||||
|
||||
JS::GCPtr<DOM::EventTarget> related_target() const { return m_related_target; }
|
||||
GC::Ptr<DOM::EventTarget> related_target() const { return m_related_target; }
|
||||
|
||||
bool get_modifier_state(String const& key_arg) const;
|
||||
|
||||
|
@ -114,7 +114,7 @@ private:
|
|||
double m_movement_y { 0 };
|
||||
i16 m_button { 0 };
|
||||
u16 m_buttons { 0 };
|
||||
JS::GCPtr<DOM::EventTarget> m_related_target { nullptr };
|
||||
GC::Ptr<DOM::EventTarget> m_related_target { nullptr };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue