From acc7c2f7f317ed9d011c641ae04be69b881d9dd5 Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Fri, 25 Jul 2025 15:26:12 +0200 Subject: [PATCH] LibWeb: Do not use namespace in interface names Gives us 20 additional WPT subtest passes in `wasm/jsapi`. --- .../LibWeb/BindingsGenerator/IDLGenerators.cpp | 2 +- Tests/LibWeb/Text/expected/Wasm/WebAssembly-instantiate.txt | 2 +- .../wpt-import/wasm/jsapi/global/constructor.any.txt | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp index f8bd60ee875..8fefac9e272 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp @@ -5169,7 +5169,7 @@ void @constructor_class@::initialize(JS::Realm& realm) generator.append(R"~~~( define_direct_property(vm.names.length, JS::Value(@constructor.length@), JS::Attribute::Configurable); - define_direct_property(vm.names.name, JS::PrimitiveString::create(vm, "@namespaced_name@"_string), JS::Attribute::Configurable); + define_direct_property(vm.names.name, JS::PrimitiveString::create(vm, "@name@"_string), JS::Attribute::Configurable); define_direct_property(vm.names.prototype, &ensure_web_prototype<@prototype_class@>(realm, "@namespaced_name@"_fly_string), 0); )~~~"); diff --git a/Tests/LibWeb/Text/expected/Wasm/WebAssembly-instantiate.txt b/Tests/LibWeb/Text/expected/Wasm/WebAssembly-instantiate.txt index c1b9d253546..a6299bf9d06 100644 --- a/Tests/LibWeb/Text/expected/Wasm/WebAssembly-instantiate.txt +++ b/Tests/LibWeb/Text/expected/Wasm/WebAssembly-instantiate.txt @@ -47,6 +47,6 @@ DataView ------------- Hello from wasm!!!!!! ------------- -WebAssembly.Module +Module ------------- Hello from wasm!!!!!! diff --git a/Tests/LibWeb/Text/expected/wpt-import/wasm/jsapi/global/constructor.any.txt b/Tests/LibWeb/Text/expected/wpt-import/wasm/jsapi/global/constructor.any.txt index 7627cb4648a..fe719164842 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/wasm/jsapi/global/constructor.any.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/wasm/jsapi/global/constructor.any.txt @@ -2,9 +2,8 @@ Harness status: OK Found 60 tests -59 Pass -1 Fail -Fail name +60 Pass +Pass name Pass length Pass No arguments Pass Calling