diff --git a/Libraries/LibWeb/CMakeLists.txt b/Libraries/LibWeb/CMakeLists.txt index a4c6e2c64f5..3d1a39f508b 100644 --- a/Libraries/LibWeb/CMakeLists.txt +++ b/Libraries/LibWeb/CMakeLists.txt @@ -788,6 +788,7 @@ set(SOURCES WebGL/WebGLRenderingContextBase.cpp WebGL/WebGLShader.cpp WebGL/WebGLTexture.cpp + WebGL/WebGLUniformLocation.cpp WebIDL/AbstractOperations.cpp WebIDL/Buffers.cpp WebIDL/CallbackType.cpp diff --git a/Libraries/LibWeb/WebGL/WebGLUniformLocation.cpp b/Libraries/LibWeb/WebGL/WebGLUniformLocation.cpp new file mode 100644 index 00000000000..3baa7ceb120 --- /dev/null +++ b/Libraries/LibWeb/WebGL/WebGLUniformLocation.cpp @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2024, Jelle Raaijmakers + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include + +namespace Web::WebGL { + +JS_DEFINE_ALLOCATOR(WebGLUniformLocation); + +WebGLUniformLocation::WebGLUniformLocation(JS::Realm& realm) + : WebGLObject(realm) +{ +} + +WebGLUniformLocation::~WebGLUniformLocation() = default; + +} diff --git a/Libraries/LibWeb/WebGL/WebGLUniformLocation.h b/Libraries/LibWeb/WebGL/WebGLUniformLocation.h new file mode 100644 index 00000000000..4b69fb835ea --- /dev/null +++ b/Libraries/LibWeb/WebGL/WebGLUniformLocation.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2024, Jelle Raaijmakers + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include + +namespace Web::WebGL { + +class WebGLUniformLocation final : public WebGLObject { + WEB_PLATFORM_OBJECT(WebGLUniformLocation, WebGLObject); + JS_DECLARE_ALLOCATOR(WebGLUniformLocation); + +public: + virtual ~WebGLUniformLocation(); + +protected: + explicit WebGLUniformLocation(JS::Realm&); +}; + +} diff --git a/Libraries/LibWeb/WebGL/WebGLUniformLocation.idl b/Libraries/LibWeb/WebGL/WebGLUniformLocation.idl new file mode 100644 index 00000000000..6cfb52972ab --- /dev/null +++ b/Libraries/LibWeb/WebGL/WebGLUniformLocation.idl @@ -0,0 +1,6 @@ +#import + +// https://registry.khronos.org/webgl/specs/latest/1.0/#5.10 +[Exposed=(Window,Worker)] +interface WebGLUniformLocation { +}; diff --git a/Libraries/LibWeb/idl_files.cmake b/Libraries/LibWeb/idl_files.cmake index 6d05276a4b8..9dcb284e837 100644 --- a/Libraries/LibWeb/idl_files.cmake +++ b/Libraries/LibWeb/idl_files.cmake @@ -368,6 +368,7 @@ libweb_js_bindings(WebGL/WebGLRenderbuffer) libweb_js_bindings(WebGL/WebGLRenderingContext) libweb_js_bindings(WebGL/WebGLShader) libweb_js_bindings(WebGL/WebGLTexture) +libweb_js_bindings(WebGL/WebGLUniformLocation) libweb_js_bindings(WebIDL/DOMException) libweb_js_bindings(WebSockets/WebSocket) libweb_js_bindings(WebVTT/VTTCue) diff --git a/Meta/gn/secondary/Userland/Libraries/LibWeb/idl_files.gni b/Meta/gn/secondary/Userland/Libraries/LibWeb/idl_files.gni index 1c8905e42e3..01a460872bc 100644 --- a/Meta/gn/secondary/Userland/Libraries/LibWeb/idl_files.gni +++ b/Meta/gn/secondary/Userland/Libraries/LibWeb/idl_files.gni @@ -380,6 +380,7 @@ standard_idl_files = [ "//Userland/Libraries/LibWeb/WebGL/WebGLRenderingContext.idl", "//Userland/Libraries/LibWeb/WebGL/WebGLShader.idl", "//Userland/Libraries/LibWeb/WebGL/WebGLTexture.idl", + "//Userland/Libraries/LibWeb/WebGL/WebGLUniformLocation.idl", "//Userland/Libraries/LibWeb/WebIDL/DOMException.idl", "//Userland/Libraries/LibWeb/WebSockets/WebSocket.idl", "//Userland/Libraries/LibWeb/WebVTT/VTTCue.idl", diff --git a/Tests/LibWeb/Text/expected/all-window-properties.txt b/Tests/LibWeb/Text/expected/all-window-properties.txt index ca5a080275e..ebd5084b54d 100644 --- a/Tests/LibWeb/Text/expected/all-window-properties.txt +++ b/Tests/LibWeb/Text/expected/all-window-properties.txt @@ -399,6 +399,7 @@ WebGLRenderbuffer WebGLRenderingContext WebGLShader WebGLTexture +WebGLUniformLocation WebKitCSSMatrix WebSocket WheelEvent