LibWeb/Bindings: Generate struct definitions from IDL dictionaries

Previously we were inconsistent by generating code for enum definitions
but not generating code for dictionaries. With future changes to the
IDL generator to expose helpers to convert to and from IDL values
this produced circular depdendencies. To solve this problem, also
generate the dictionary definitions in bindings headers.
This commit is contained in:
Shannon Booth
2026-05-01 19:01:23 +02:00
committed by Andreas Kling
parent 7ad946c669
commit 5adfd1c43a
Notes: github-actions[bot] 2026-05-09 08:51:32 +00:00
406 changed files with 1963 additions and 2837 deletions

View File

@@ -12,6 +12,7 @@
#include <LibTextCodec/Decoder.h>
#include <LibWeb/Bindings/ExceptionOrUtils.h>
#include <LibWeb/Bindings/Intrinsics.h>
#include <LibWeb/Bindings/TextDecoder.h>
#include <LibWeb/Bindings/TextDecoderStream.h>
#include <LibWeb/Encoding/TextDecoderStream.h>
#include <LibWeb/Streams/TransformStream.h>
@@ -68,7 +69,7 @@ static size_t find_utf8_safe_decode_boundary(ReadonlyBytes bytes)
}
// https://encoding.spec.whatwg.org/#dom-textdecoderstream
WebIDL::ExceptionOr<GC::Ref<TextDecoderStream>> TextDecoderStream::construct_impl(JS::Realm& realm, FlyString label, TextDecoderOptions const& options)
WebIDL::ExceptionOr<GC::Ref<TextDecoderStream>> TextDecoderStream::construct_impl(JS::Realm& realm, FlyString label, Bindings::TextDecoderOptions const& options)
{
// 1. Let encoding be the result of getting an encoding from label.
auto encoding = TextCodec::get_standardized_encoding(label);