mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
Meta: Support nullable BufferSource as Optional in IDL generator
This IDL change is needed for webaudio's WaveShaperNode, where a null BufferSource for a curve attribute results in a zero-length buffer. WebGL also has a nullable BufferSource arg in bufferData(...). But there, a null data/srcData value returns GL_INVALID_VALUE.
This commit is contained in:
committed by
Alexander Kalenik
parent
95955f40b1
commit
793a4eeb8e
Notes:
github-actions[bot]
2026-03-26 23:04:44 +00:00
Author: https://github.com/jonbgamble Commit: https://github.com/LadybirdBrowser/ladybird/commit/793a4eeb8e8 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7915 Reviewed-by: https://github.com/gmta Reviewed-by: https://github.com/kalenikaliaksandr ✅
@@ -8,6 +8,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <AK/NonnullOwnPtr.h>
|
||||
#include <AK/Optional.h>
|
||||
#include <LibGC/Ptr.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
#include <LibWeb/WebGL/WebGL2RenderingContextImpl.h>
|
||||
@@ -24,7 +25,7 @@ public:
|
||||
WebGL2RenderingContextOverloads(JS::Realm&, NonnullOwnPtr<OpenGLContext>);
|
||||
|
||||
void buffer_data(WebIDL::UnsignedLong target, WebIDL::LongLong size, WebIDL::UnsignedLong usage);
|
||||
void buffer_data(WebIDL::UnsignedLong target, GC::Root<WebIDL::BufferSource> src_data, WebIDL::UnsignedLong usage);
|
||||
void buffer_data(WebIDL::UnsignedLong target, Optional<GC::Root<WebIDL::BufferSource>> src_data, WebIDL::UnsignedLong usage);
|
||||
void buffer_sub_data(WebIDL::UnsignedLong target, WebIDL::LongLong dst_byte_offset, GC::Root<WebIDL::BufferSource> src_data);
|
||||
void buffer_data(WebIDL::UnsignedLong target, GC::Root<WebIDL::ArrayBufferView> src_data, WebIDL::UnsignedLong usage, WebIDL::UnsignedLongLong src_offset, WebIDL::UnsignedLong length);
|
||||
void buffer_sub_data(WebIDL::UnsignedLong target, WebIDL::LongLong dst_byte_offset, GC::Root<WebIDL::ArrayBufferView> src_data, WebIDL::UnsignedLongLong src_offset, WebIDL::UnsignedLong length);
|
||||
|
||||
Reference in New Issue
Block a user