mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 09:39:39 +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
Notes:
sideshowbarker
2024-07-17 06:27:57 +09:00
Author: https://github.com/ADKaster
Commit: beb3519a49
Pull-request: https://github.com/SerenityOS/serenity/pull/15349
Reviewed-by: https://github.com/linusg ✅
9 changed files with 42 additions and 42 deletions
|
@ -7,13 +7,12 @@
|
|||
#include <AK/Debug.h>
|
||||
#include <LibGL/GLContext.h>
|
||||
#include <LibWeb/HTML/HTMLCanvasElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
#include <LibWeb/WebGL/WebGLRenderingContextBase.h>
|
||||
|
||||
namespace Web::WebGL {
|
||||
|
||||
WebGLRenderingContextBase::WebGLRenderingContextBase(HTML::Window& window, HTML::HTMLCanvasElement& canvas_element, NonnullOwnPtr<GL::GLContext> context, WebGLContextAttributes context_creation_parameters, WebGLContextAttributes actual_context_parameters)
|
||||
: PlatformObject(window.realm())
|
||||
WebGLRenderingContextBase::WebGLRenderingContextBase(JS::Realm& realm, HTML::HTMLCanvasElement& canvas_element, NonnullOwnPtr<GL::GLContext> context, WebGLContextAttributes context_creation_parameters, WebGLContextAttributes actual_context_parameters)
|
||||
: PlatformObject(realm)
|
||||
, m_canvas_element(canvas_element)
|
||||
, m_context(move(context))
|
||||
, m_context_creation_parameters(move(context_creation_parameters))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue