mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 13:36:13 +03:00
LibWeb: Use the WRAPPER_HACK() macro instead of hand-coding wrap()
This macro will soon go away, but let's start by replacing all the hand-coded versions of wrap() with this macro that expands to the same exact thing.
This commit is contained in:
parent
bc74909308
commit
45425de849
Notes:
sideshowbarker
2024-07-17 07:24:06 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/45425de849 Pull-request: https://github.com/SerenityOS/serenity/pull/14816 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/linusg ✅
@ -34,7 +34,4 @@ private:
|
||||
};
|
||||
}
|
||||
|
||||
namespace Web::Bindings {
|
||||
inline JS::Object* wrap(JS::Realm&, Web::CSS::MediaQueryListEvent& object) { return &object; }
|
||||
using MediaQueryListEventWrapper = Web::CSS::MediaQueryListEvent;
|
||||
}
|
||||
WRAPPER_HACK(MediaQueryListEvent, Web::CSS)
|
||||
|
@ -47,7 +47,4 @@ protected:
|
||||
|
||||
}
|
||||
|
||||
namespace Web::Bindings {
|
||||
inline JS::Object* wrap(JS::Realm&, Web::DOM::AbstractRange& object) { return &object; }
|
||||
using AbstractRangeWrapper = Web::DOM::AbstractRange;
|
||||
}
|
||||
WRAPPER_HACK(AbstractRange, Web::DOM)
|
||||
|
@ -42,7 +42,4 @@ private:
|
||||
|
||||
}
|
||||
|
||||
namespace Web::Bindings {
|
||||
inline JS::Object* wrap(JS::Realm&, Web::DOM::CustomEvent& object) { return &object; }
|
||||
using CustomEventWrapper = Web::DOM::CustomEvent;
|
||||
}
|
||||
WRAPPER_HACK(CustomEvent, Web::DOM)
|
||||
|
@ -43,7 +43,4 @@ private:
|
||||
|
||||
}
|
||||
|
||||
namespace Web::Bindings {
|
||||
inline JS::Object* wrap(JS::Realm&, Web::DOM::IDLEventListener& object) { return &object; }
|
||||
using EventListenerWrapper = Web::DOM::IDLEventListener;
|
||||
}
|
||||
WRAPPER_HACK(IDLEventListener, Web::DOM)
|
||||
|
@ -97,7 +97,4 @@ private:
|
||||
|
||||
}
|
||||
|
||||
namespace Web::Bindings {
|
||||
inline JS::Object* wrap(JS::Realm&, Web::DOM::Range& object) { return &object; }
|
||||
using RangeWrapper = Web::DOM::Range;
|
||||
}
|
||||
WRAPPER_HACK(Range, Web::DOM)
|
||||
|
@ -32,7 +32,4 @@ public:
|
||||
|
||||
}
|
||||
|
||||
namespace Web::Bindings {
|
||||
inline JS::Object* wrap(JS::Realm&, Web::DOM::StaticRange& object) { return &object; }
|
||||
using StaticRangeWrapper = Web::DOM::StaticRange;
|
||||
}
|
||||
WRAPPER_HACK(StaticRange, Web::DOM)
|
||||
|
@ -40,7 +40,4 @@ private:
|
||||
|
||||
}
|
||||
|
||||
namespace Web::Bindings {
|
||||
inline JS::Object* wrap(JS::Realm&, Web::HTML::CloseEvent& object) { return &object; }
|
||||
using CloseEventWrapper = Web::HTML::CloseEvent;
|
||||
}
|
||||
WRAPPER_HACK(CloseEvent, Web::HTML)
|
||||
|
@ -58,7 +58,4 @@ private:
|
||||
|
||||
}
|
||||
|
||||
namespace Web::Bindings {
|
||||
inline JS::Object* wrap(JS::Realm&, Web::HTML::ErrorEvent& object) { return &object; }
|
||||
using ErrorEventWrapper = Web::HTML::ErrorEvent;
|
||||
}
|
||||
WRAPPER_HACK(ErrorEvent, Web::HTML)
|
||||
|
@ -41,7 +41,4 @@ private:
|
||||
|
||||
}
|
||||
|
||||
namespace Web::Bindings {
|
||||
inline JS::Object* wrap(JS::Realm&, Web::HTML::MessageEvent& object) { return &object; }
|
||||
using MessageEventWrapper = Web::HTML::MessageEvent;
|
||||
}
|
||||
WRAPPER_HACK(MessageEvent, Web::HTML)
|
||||
|
@ -33,7 +33,4 @@ private:
|
||||
|
||||
}
|
||||
|
||||
namespace Web::Bindings {
|
||||
inline JS::Object* wrap(JS::Realm&, Web::HTML::PageTransitionEvent& object) { return &object; }
|
||||
using PageTransitionEventWrapper = Web::HTML::PageTransitionEvent;
|
||||
}
|
||||
WRAPPER_HACK(PageTransitionEvent, Web::HTML)
|
||||
|
@ -42,7 +42,4 @@ private:
|
||||
|
||||
}
|
||||
|
||||
namespace Web::Bindings {
|
||||
inline JS::Object* wrap(JS::Realm&, Web::HTML::PromiseRejectionEvent& object) { return &object; }
|
||||
using PromiseRejectionEventWrapper = Web::HTML::PromiseRejectionEvent;
|
||||
}
|
||||
WRAPPER_HACK(PromiseRejectionEvent, Web::HTML)
|
||||
|
@ -26,7 +26,4 @@ public:
|
||||
|
||||
}
|
||||
|
||||
namespace Web::Bindings {
|
||||
inline JS::Object* wrap(JS::Realm&, Web::UIEvents::FocusEvent& object) { return &object; }
|
||||
using FocusEventWrapper = Web::UIEvents::FocusEvent;
|
||||
}
|
||||
WRAPPER_HACK(FocusEvent, Web::UIEvents)
|
||||
|
@ -71,7 +71,4 @@ private:
|
||||
|
||||
}
|
||||
|
||||
namespace Web::Bindings {
|
||||
inline JS::Object* wrap(JS::Realm&, Web::UIEvents::KeyboardEvent& object) { return &object; }
|
||||
using KeyboardEventWrapper = Web::UIEvents::KeyboardEvent;
|
||||
}
|
||||
WRAPPER_HACK(KeyboardEvent, Web::UIEvents)
|
||||
|
@ -57,7 +57,4 @@ private:
|
||||
|
||||
}
|
||||
|
||||
namespace Web::Bindings {
|
||||
inline JS::Object* wrap(JS::Realm&, Web::UIEvents::MouseEvent& object) { return &object; }
|
||||
using MouseEventWrapper = Web::UIEvents::MouseEvent;
|
||||
}
|
||||
WRAPPER_HACK(MouseEvent, Web::UIEvents)
|
||||
|
@ -49,7 +49,4 @@ protected:
|
||||
|
||||
}
|
||||
|
||||
namespace Web::Bindings {
|
||||
inline JS::Object* wrap(JS::Realm&, Web::UIEvents::UIEvent& object) { return &object; }
|
||||
using UIEventWrapper = Web::UIEvents::UIEvent;
|
||||
}
|
||||
WRAPPER_HACK(UIEvent, Web::UIEvents)
|
||||
|
@ -34,7 +34,4 @@ private:
|
||||
|
||||
}
|
||||
|
||||
namespace Web::Bindings {
|
||||
inline JS::Object* wrap(JS::Realm&, Web::WebGL::WebGLContextEvent& object) { return &object; }
|
||||
using WebGLContextEventWrapper = Web::WebGL::WebGLContextEvent;
|
||||
}
|
||||
WRAPPER_HACK(WebGLContextEvent, Web::WebGL)
|
||||
|
@ -42,7 +42,4 @@ private:
|
||||
|
||||
}
|
||||
|
||||
namespace Web::Bindings {
|
||||
inline JS::Object* wrap(JS::Realm&, Web::XHR::ProgressEvent& object) { return &object; }
|
||||
using ProgressEventWrapper = Web::XHR::ProgressEvent;
|
||||
}
|
||||
WRAPPER_HACK(ProgressEvent, Web::XHR)
|
||||
|
Loading…
Reference in New Issue
Block a user