1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:38:13 +00:00

LibWeb: Remove unecessary dependence on Window from WebGL and WebSocket

These classes only needed Window to get at its realm. Pass a realm
directly to construct WebGL and WebSocket classes.
This commit is contained in:
Andrew Kaster 2022-09-25 18:12:50 -06:00 committed by Linus Groh
parent 4bb6345b2f
commit beb3519a49
9 changed files with 42 additions and 42 deletions

View file

@ -19,16 +19,16 @@ class WebGLContextEvent final : public DOM::Event {
WEB_PLATFORM_OBJECT(WebGLContextEvent, DOM::Event);
public:
static WebGLContextEvent* create(HTML::Window&, FlyString const& type, WebGLContextEventInit const& event_init);
static WebGLContextEvent* create_with_global_object(HTML::Window&, FlyString const& type, WebGLContextEventInit const& event_init);
WebGLContextEvent(HTML::Window&, FlyString const& type, WebGLContextEventInit const& event_init);
static WebGLContextEvent* create(JS::Realm&, FlyString const& type, WebGLContextEventInit const& event_init);
static WebGLContextEvent* construct_impl(JS::Realm&, FlyString const& type, WebGLContextEventInit const& event_init);
virtual ~WebGLContextEvent() override;
String const& status_message() const { return m_status_message; }
private:
WebGLContextEvent(JS::Realm&, FlyString const& type, WebGLContextEventInit const& event_init);
String m_status_message { String::empty() };
};