mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:37:36 +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:
parent
4bb6345b2f
commit
beb3519a49
9 changed files with 42 additions and 42 deletions
|
@ -16,12 +16,12 @@ class WebGLRenderingContext final : public WebGLRenderingContextBase {
|
|||
WEB_PLATFORM_OBJECT(WebGLRenderingContext, WebGLRenderingContextBase);
|
||||
|
||||
public:
|
||||
static JS::ThrowCompletionOr<JS::GCPtr<WebGLRenderingContext>> create(HTML::Window&, HTML::HTMLCanvasElement& canvas_element, JS::Value options);
|
||||
static JS::ThrowCompletionOr<JS::GCPtr<WebGLRenderingContext>> create(JS::Realm&, HTML::HTMLCanvasElement& canvas_element, JS::Value options);
|
||||
|
||||
virtual ~WebGLRenderingContext() override;
|
||||
|
||||
private:
|
||||
WebGLRenderingContext(HTML::Window&, HTML::HTMLCanvasElement&, NonnullOwnPtr<GL::GLContext> context, WebGLContextAttributes context_creation_parameters, WebGLContextAttributes actual_context_parameters);
|
||||
WebGLRenderingContext(JS::Realm&, HTML::HTMLCanvasElement&, NonnullOwnPtr<GL::GLContext> context, WebGLContextAttributes context_creation_parameters, WebGLContextAttributes actual_context_parameters);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue